88 lines
558 KiB
JavaScript
88 lines
558 KiB
JavaScript
var og=Object.defineProperty;var rg=(n,e,t)=>e in n?og(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var lt=(n,e,t)=>rg(n,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"]'))l(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&l(s)}).observe(document,{childList:!0,subtree:!0});function t(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function l(i){if(i.ep)return;i.ep=!0;const o=t(i);fetch(i.href,o)}})();function ie(){}function ag(n,e){for(const t in e)n[t]=e[t];return n}function zf(n){return n()}function Wo(){return Object.create(null)}function Se(n){n.forEach(zf)}function wl(n){return typeof n=="function"}function rt(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}let yi;function Ul(n,e){return n===e?!0:(yi||(yi=document.createElement("a")),yi.href=e,n===yi.href)}function cg(n){return Object.keys(n).length===0}function ug(n,e,t,l){if(n){const i=Bf(n,e,t,l);return n[0](i)}}function Bf(n,e,t,l){return n[1]&&l?ag(t.ctx.slice(),n[1](l(e))):t.ctx}function fg(n,e,t,l){if(n[2]&&l){const i=n[2](l(t));if(e.dirty===void 0)return i;if(typeof i=="object"){const o=[],s=Math.max(e.dirty.length,i.length);for(let c=0;c<s;c+=1)o[c]=e.dirty[c]|i[c];return o}return e.dirty|i}return e.dirty}function dg(n,e,t,l,i,o){if(i){const s=Bf(e,t,l,o);n.p(s,i)}}function pg(n){if(n.ctx.length>32){const e=[],t=n.ctx.length/32;for(let l=0;l<t;l++)e[l]=-1;return e}return-1}function Go(n){return n??""}const Ps=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function a(n,e){n.appendChild(e)}function C(n,e,t){n.insertBefore(e,t||null)}function S(n){n.parentNode&&n.parentNode.removeChild(n)}function tt(n,e){for(let t=0;t<n.length;t+=1)n[t]&&n[t].d(e)}function f(n){return document.createElement(n)}function ae(n){return document.createElementNS("http://www.w3.org/2000/svg",n)}function F(n){return document.createTextNode(n)}function w(){return F(" ")}function _t(){return F("")}function O(n,e,t,l){return n.addEventListener(e,t,l),()=>n.removeEventListener(e,t,l)}function Wi(n){return function(e){return e.preventDefault(),n.call(this,e)}}function Ve(n){return function(e){return e.stopPropagation(),n.call(this,e)}}function Jt(n){return function(e){e.target===this&&n.call(this,e)}}function r(n,e,t){t==null?n.removeAttribute(e):n.getAttribute(e)!==t&&n.setAttribute(e,t)}function Gl(n){return n===""?null:+n}function hg(n){return Array.from(n.childNodes)}function Q(n,e){e=""+e,n.data!==e&&(n.data=e)}function Me(n,e){n.value=e??""}function an(n,e,t,l){t==null?n.style.removeProperty(e):n.style.setProperty(e,t,"")}function xn(n,e,t){for(let l=0;l<n.options.length;l+=1){const i=n.options[l];if(i.__value===e){i.selected=!0;return}}(!t||e!==void 0)&&(n.selectedIndex=-1)}function Ri(n){const e=n.querySelector(":checked");return e&&e.__value}function ce(n,e,t){n.classList.toggle(e,!!t)}function mg(n,e,{bubbles:t=!1,cancelable:l=!1}={}){return new CustomEvent(n,{detail:e,bubbles:t,cancelable:l})}class Di{constructor(e=!1){lt(this,"is_svg",!1);lt(this,"e");lt(this,"n");lt(this,"t");lt(this,"a");this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,t,l=null){this.e||(this.is_svg?this.e=ae(t.nodeName):this.e=f(t.nodeType===11?"TEMPLATE":t.nodeName),this.t=t.tagName!=="TEMPLATE"?t:t.content,this.c(e)),this.i(l)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes)}i(e){for(let t=0;t<this.n.length;t+=1)C(this.t,this.n[t],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(S)}}function $n(n,e){return new n(e)}let si;function li(n){si=n}function qs(){if(!si)throw new Error("Function called outside component initialization");return si}function ci(n){qs().$$.on_mount.push(n)}function ui(n){qs().$$.on_destroy.push(n)}function bn(){const n=qs();return(e,t,{cancelable:l=!1}={})=>{const i=n.$$.callbacks[e];if(i){const o=mg(e,t,{cancelable:l});return i.slice().forEach(s=>{s.call(n,o)}),!o.defaultPrevented}return!0}}function js(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(l=>l.call(this,e))}const zl=[],On=[];let Fl=[];const Ko=[],Ff=Promise.resolve();let As=!1;function Uf(){As||(As=!0,Ff.then(Hf))}function gg(){return Uf(),Ff}function yl(n){Fl.push(n)}const gs=new Set;let Ol=0;function Hf(){if(Ol!==0)return;const n=si;do{try{for(;Ol<zl.length;){const e=zl[Ol];Ol++,li(e),_g(e.$$)}}catch(e){throw zl.length=0,Ol=0,e}for(li(null),zl.length=0,Ol=0;On.length;)On.pop()();for(let e=0;e<Fl.length;e+=1){const t=Fl[e];gs.has(t)||(gs.add(t),t())}Fl.length=0}while(zl.length);for(;Ko.length;)Ko.pop()();As=!1,gs.clear(),li(n)}function _g(n){if(n.fragment!==null){n.update(),Se(n.before_update);const e=n.dirty;n.dirty=[-1],n.fragment&&n.fragment.p(n.ctx,e),n.after_update.forEach(yl)}}function bg(n){const e=[],t=[];Fl.forEach(l=>n.indexOf(l)===-1?e.push(l):t.push(l)),t.forEach(l=>l()),Fl=e}const Mi=new Set;let bl;function ft(){bl={r:0,c:[],p:bl}}function dt(){bl.r||Se(bl.c),bl=bl.p}function fe(n,e){n&&n.i&&(Mi.delete(n),n.i(e))}function be(n,e,t,l){if(n&&n.o){if(Mi.has(n))return;Mi.add(n),bl.c.push(()=>{Mi.delete(n),l&&(t&&n.d(1),l())}),n.o(e)}else l&&l()}function Te(n){return(n==null?void 0:n.length)!==void 0?n:Array.from(n)}function Wf(n,e){be(n,1,1,()=>{e.delete(n.key)})}function Gf(n,e,t,l,i,o,s,c,u,d,p,h){let m=n.length,g=o.length,b=m;const v={};for(;b--;)v[n[b].key]=b;const y=[],E=new Map,T=new Map,I=[];for(b=g;b--;){const A=h(i,o,b),L=t(A);let j=s.get(L);j?I.push(()=>j.p(A,e)):(j=d(L,A),j.c()),E.set(L,y[b]=j),L in v&&T.set(L,Math.abs(b-v[L]))}const N=new Set,R=new Set;function M(A){fe(A,1),A.m(c,p),s.set(A.key,A),p=A.first,g--}for(;m&&g;){const A=y[g-1],L=n[m-1],j=A.key,B=L.key;A===L?(p=A.first,m--,g--):E.has(B)?!s.has(j)||N.has(j)?M(A):R.has(B)?m--:T.get(j)>T.get(B)?(R.add(j),M(A)):(N.add(B),m--):(u(L,s),m--)}for(;m--;){const A=n[m];E.has(A.key)||u(A,s)}for(;g;)M(y[g-1]);return Se(I),y}function Ge(n){n&&n.c()}function He(n,e,t){const{fragment:l,after_update:i}=n.$$;l&&l.m(e,t),yl(()=>{const o=n.$$.on_mount.map(zf).filter(wl);n.$$.on_destroy?n.$$.on_destroy.push(...o):Se(o),n.$$.on_mount=[]}),i.forEach(yl)}function We(n,e){const t=n.$$;t.fragment!==null&&(bg(t.after_update),Se(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function kg(n,e){n.$$.dirty[0]===-1&&(zl.push(n),Uf(),n.$$.dirty.fill(0)),n.$$.dirty[e/31|0]|=1<<e%31}function at(n,e,t,l,i,o,s=null,c=[-1]){const u=si;li(n);const d=n.$$={fragment:null,ctx:[],props:o,update:ie,not_equal:i,bound:Wo(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(u?u.$$.context:[])),callbacks:Wo(),dirty:c,skip_bound:!1,root:e.target||u.$$.root};s&&s(d.root);let p=!1;if(d.ctx=t?t(n,e.props||{},(h,m,...g)=>{const b=g.length?g[0]:m;return d.ctx&&i(d.ctx[h],d.ctx[h]=b)&&(!d.skip_bound&&d.bound[h]&&d.bound[h](b),p&&kg(n,h)),m}):[],d.update(),p=!0,Se(d.before_update),d.fragment=l?l(d.ctx):!1,e.target){if(e.hydrate){const h=hg(e.target);d.fragment&&d.fragment.l(h),h.forEach(S)}else d.fragment&&d.fragment.c();e.intro&&fe(n.$$.fragment),He(n,e.target,e.anchor),Hf()}li(u)}class ct{constructor(){lt(this,"$$");lt(this,"$$set")}$destroy(){We(this,1),this.$destroy=ie}$on(e,t){if(!wl(t))return ie;const l=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return l.push(t),()=>{const i=l.indexOf(t);i!==-1&&l.splice(i,1)}}$set(e){this.$$set&&!cg(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const vg="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(vg);function wg(n){let e,t;return{c(){e=ae("path"),t=ae("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(l,i){C(l,e,i),C(l,t,i)},d(l){l&&(S(e),S(t))}}}function yg(n){let e,t,l,i,o;return{c(){e=ae("path"),t=ae("polyline"),l=ae("line"),i=ae("line"),o=ae("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(l,"x1","16"),r(l,"y1","13"),r(l,"x2","8"),r(l,"y2","13"),r(i,"x1","16"),r(i,"y1","17"),r(i,"x2","8"),r(i,"y2","17"),r(o,"points","10 9 9 9 8 9")},m(s,c){C(s,e,c),C(s,t,c),C(s,l,c),C(s,i,c),C(s,o,c)},d(s){s&&(S(e),S(t),S(l),S(i),S(o))}}}function Eg(n){let e,t;return{c(){e=ae("polyline"),t=ae("polyline"),r(e,"points","16 18 22 12 16 6"),r(t,"points","8 6 2 12 8 18")},m(l,i){C(l,e,i),C(l,t,i)},d(l){l&&(S(e),S(t))}}}function Tg(n){let e,t,l,i;return{c(){e=ae("path"),t=ae("polyline"),l=ae("line"),i=ae("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(l,"x1","3"),r(l,"y1","8"),r(l,"x2","21"),r(l,"y2","8"),r(i,"x","10"),r(i,"y","12"),r(i,"width","4"),r(i,"height","4"),r(i,"rx","1")},m(o,s){C(o,e,s),C(o,t,s),C(o,l,s),C(o,i,s)},d(o){o&&(S(e),S(t),S(l),S(i))}}}function Sg(n){let e,t,l,i,o;return{c(){e=ae("path"),t=ae("polyline"),l=ae("line"),i=ae("line"),o=ae("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(l,"x1","9"),r(l,"y1","12"),r(l,"x2","15"),r(l,"y2","12"),r(i,"x1","9"),r(i,"y1","15"),r(i,"x2","13"),r(i,"y2","15"),r(o,"x1","12"),r(o,"y1","15"),r(o,"x2","12"),r(o,"y2","18")},m(s,c){C(s,e,c),C(s,t,c),C(s,l,c),C(s,i,c),C(s,o,c)},d(s){s&&(S(e),S(t),S(l),S(i),S(o))}}}function Cg(n){let e,t,l,i,o,s;return{c(){e=ae("path"),t=ae("polyline"),l=ae("line"),i=ae("line"),o=ae("line"),s=ae("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(l,"x1","8"),r(l,"y1","12"),r(l,"x2","16"),r(l,"y2","12"),r(i,"x1","8"),r(i,"y1","16"),r(i,"x2","16"),r(i,"y2","16"),r(o,"x1","8"),r(o,"y1","14"),r(o,"x2","12"),r(o,"y2","14"),r(s,"x1","12"),r(s,"y1","12"),r(s,"x2","12"),r(s,"y2","18")},m(c,u){C(c,e,u),C(c,t,u),C(c,l,u),C(c,i,u),C(c,o,u),C(c,s,u)},d(c){c&&(S(e),S(t),S(l),S(i),S(o),S(s))}}}function Ag(n){let e,t,l,i;return{c(){e=ae("path"),t=ae("polyline"),l=ae("line"),i=ae("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(l,"x1","16"),r(l,"y1","13"),r(l,"x2","8"),r(l,"y2","13"),r(i,"x1","16"),r(i,"y1","17"),r(i,"x2","8"),r(i,"y2","17")},m(o,s){C(o,e,s),C(o,t,s),C(o,l,s),C(o,i,s)},d(o){o&&(S(e),S(t),S(l),S(i))}}}function Ng(n){let e,t,l,i,o;return{c(){e=ae("path"),t=ae("polyline"),l=ae("line"),i=ae("line"),o=ae("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(l,"x1","8"),r(l,"y1","12"),r(l,"x2","16"),r(l,"y2","12"),r(i,"x1","8"),r(i,"y1","16"),r(i,"x2","16"),r(i,"y2","16"),r(o,"x1","8"),r(o,"y1","14"),r(o,"x2","12"),r(o,"y2","14")},m(s,c){C(s,e,c),C(s,t,c),C(s,l,c),C(s,i,c),C(s,o,c)},d(s){s&&(S(e),S(t),S(l),S(i),S(o))}}}function Ig(n){let e,t,l;return{c(){e=ae("path"),t=ae("circle"),l=ae("circle"),r(e,"d","M9 18V5l12-2v13"),r(t,"cx","6"),r(t,"cy","18"),r(t,"r","3"),r(l,"cx","18"),r(l,"cy","16"),r(l,"r","3")},m(i,o){C(i,e,o),C(i,t,o),C(i,l,o)},d(i){i&&(S(e),S(t),S(l))}}}function Rg(n){let e,t;return{c(){e=ae("rect"),t=ae("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(l,i){C(l,e,i),C(l,t,i)},d(l){l&&(S(e),S(t))}}}function Mg(n){let e,t,l;return{c(){e=ae("rect"),t=ae("circle"),l=ae("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(l,"points","21 15 16 10 5 21")},m(i,o){C(i,e,o),C(i,t,o),C(i,l,o)},d(i){i&&(S(e),S(t),S(l))}}}function Lg(n){let e;return{c(){e=ae("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,l){C(t,e,l)},d(t){t&&S(e)}}}function Og(n){let e;function t(o,s){return o[0]==="folder"?Lg:o[0]==="image"?Mg:o[0]==="video"?Rg:o[0]==="audio"?Ig:o[0]==="pdf"?Ng:o[0]==="document"?Ag:o[0]==="spreadsheet"?Cg:o[0]==="presentation"?Sg:o[0]==="archive"?Tg:o[0]==="code"?Eg:o[0]==="text"?yg:wg}let l=t(n),i=l(n);return{c(){e=ae("svg"),i.c(),r(e,"width",n[1]),r(e,"height",n[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(o,s){C(o,e,s),i.m(e,null)},p(o,[s]){l!==(l=t(o))&&(i.d(1),i=l(o),i&&(i.c(),i.m(e,null))),s&2&&r(e,"width",o[1]),s&2&&r(e,"height",o[1])},i:ie,o:ie,d(o){o&&S(e),i.d()}}}function Dg(n,e,t){let{kind:l="generic"}=e,{size:i=20}=e;return n.$$set=o=>{"kind"in o&&t(0,l=o.kind),"size"in o&&t(1,i=o.size)},[l,i]}class Kf extends ct{constructor(e){super(),at(this,e,Dg,Og,rt,{kind:0,size:1})}}const Pg={"nav.today":"Сегодня","nav.inbox":"Неразобранное","nav.trash":"Корзина","nav.activity":"Активность","nav.journal":"Журнал","nav.clients":"Клиенты","nav.projects":"Проекты","nav.recipes":"Рецепты","nav.documents":"Документы","nav.archive":"Архив","nav.sections":"Разделы","nav.cases":"Дела","nav.noCases":"Нет дел","nav.sync":"Синхронизация","nav.syncSettings":"Настройки синхронизации","nav.syncNow":"Синхронизировать","nav.selectPrompt":"Выберите раздел или дело","nav.brand":"Верстак","nav.system":"Системное","nav.workspace":"Рабочее пространство","nav.noNodes":"Нет узлов","nav.openFolder":"Открыть папку","nav.createInside":"Создать внутри","nav.createNode":"Создать элемент","nav.moveToRoot":"Переместить в корень","inbox.subtitle":"Захваченные материалы, которые нужно разложить по делам","inbox.sortByDate":"по дате","inbox.sortByName":"по имени","inbox.sortByType":"по типу","inbox.sortAsc":"по возрастанию","inbox.sortDesc":"по убыванию","inbox.groupByContext":"Группировать по месту захвата","inbox.noContext":"Без места захвата","inbox.empty":"Неразобранных элементов нет","inbox.pasteClipboard":"Вставить из буфера","inbox.captured":"Добавлено","inbox.clipboardEmpty":"Буфер обмена пуст","inbox.clipboardUnavailable":"Буфер обмена недоступен","inbox.assign":"Разложить","inbox.keepHere":"Прикрепить в захваченном месте","inbox.localEmpty":"Для этого дела неразобранных материалов нет","inbox.capturedIn":"Захвачено в","inbox.suggestedTarget":"Цель","inbox.assignTitle":"Разложить материал","inbox.assignTarget":"Дело","inbox.assignSearchPlaceholder":"Найти дело","inbox.assignSearchHint":"Начните набирать название Дела","inbox.deleteTitle":"Удалить материал","inbox.deleteConfirm":"Удалить «{title}» из неразобранного?","capture.kind.text":"Текст","capture.kind.url":"Ссылка","capture.kind.file":"Файл","capture.kind.folder":"Папка","capture.kind.image":"Изображение","capture.source.clipboard":"Буфер обмена","capture.source.clipboard_button":"Кнопка буфера","capture.source.drop":"Перетаскивание","capture.source.paste":"Вставка","capture.source.browser":"Браузер","capture.source.manual":"Вручную","capture.dropOverlayNode":"Будет добавлено в Неразобранное для: {title}","capture.dropOverlayGlobal":"Будет добавлено в глобальное Неразобранное","trash.openFolder":"Открыть папку корзины","trash.empty":"Корзина пуста","trash.emptyTrash":"Очистить корзину","trash.restore":"Восстановить","trash.deletedNodes":"Удаленные элементы","tab.overview":"Обзор","tab.notes":"Заметки","tab.files":"Файлы","tab.inbox":"Неразобранное","tab.links":"Ссылки","tab.actions":"Действия","tab.worklog":"Журнал","tab.activity":"Активность","common.save":"Сохранить","common.cancel":"Отмена","common.delete":"Удалить","common.rename":"Переименовать","common.close":"Закрыть","common.create":"Создать","common.confirm":"Подтверждение","common.back":"← Назад","common.backLabel":"Назад","common.loading":"Загрузка...","common.error":"Ошибка:","common.yes":"Да","common.ok":"OK","common.copy":"Копировать","common.cut":"Вырезать","common.paste":"Вставить","common.duplicate":"Дублировать","common.run":"Запустить","common.test":"Test","common.all":"Все","common.open":"Открыть","common.no":"Нет","common.date":"Дата","common.search":"Найти","common.testAgain":"Проверить","common.connect":"Подключиться","common.disconnect":"Отключиться","common.settings":"Настройки","common.name":"Название","common.type":"Тип","common.section":"Раздел","common.created":"Создано","common.empty":"Нет","common.newName":"Новое имя","search.placeholder":"Поиск по Верстаку...","search.noResults":"Ничего не найдено","welcome.title":"Верстак","welcome.selectSection":"Выберите раздел в боковой панели.","welcome.createCase":"Или создайте новое дело кнопкой «+».","welcome.addCase":"Добавить дело","event.noteCreated":"Заметка создана","event.noteUpdated":"Заметка изменена","event.fileAdded":"Файл добавлен","event.fileDeleted":"Файл удалён","event.fileRenamed":"Файл переименован","event.fileCopied":"Файл скопирован","event.fileMoved":"Файл перемещён","event.folderAdded":"Папка добавлена","event.folderDeleted":"Папка удалена","event.folderRenamed":"Папка переименована","event.caseCreated":"Дело создано","event.caseUpdated":"Дело изменено","event.noteDeleted":"Заметка удалена","event.folderMoved":"Папка перемещена","event.nodeDeleted":"Узел удалён","event.actionCreated":"Действие создано","event.actionDone":"Действие выполнено","event.worklogAdded":"Запись времени добавлена","kind.project":"Проект","kind.client":"Клиент","kind.document":"Документ","kind.recipe":"Рецепт","kind.folder":"Папка","kind.note":"Заметка","kind.file":"Файл","kind.archive":"Архив","kind.case":"Дело","kind.link":"Ссылка","kind.action":"Действие","links.empty":"Ссылок пока нет","links.editTitle":"Редактировать ссылку","links.note":"Заметка","links.copyUrl":"Копировать URL","links.copied":"URL скопирован","links.copyUnavailable":"Не удалось скопировать URL","links.deleteTitle":"Удалить ссылку","links.deleteConfirm":"Удалить ссылку «{title}»?","action.openUrl":"Открыть URL","action.openFile":"Открыть файл","action.openFolder":"Открыть папку","action.runCommand":"Запустить команду","action.runScript":"Запустить скрипт","action.openTerminal":"Открыть терминал","action.launchApp":"Запустить приложение","action.addAction":"+ Добавить действие","action.newAction":"Новое действие","action.noActions":"Действий пока нет","action.run":"Запустить","action.dataUrl":"URL","action.dataPath":"Путь","action.dataCommand":"Команда","action.urlPlaceholder":"https://example.com","action.pathPlaceholder":"/path/to/file","action.commandPlaceholder":"команда","action.namePlaceholder":"Например: Открыть сайт","note.add":"+ Добавить заметку","note.new":"Новая заметка","note.title":"Название заметки","note.noNotes":"Нет заметок","note.createFirst":"Создайте первую заметку для этого дела.","note.placeholder":"Начните писать...","note.unsavedTitle":"Несохранённые изменения","note.unsavedMessage":"Закрыть редактор? Все несохранённые изменения будут потеряны.","note.unsavedClose":"Закрыть","note.mode.edit":"Редактор","note.mode.preview":"Просмотр","note.mode.split":"Разделённый","note.toolbar.bold":"Жирный (Ctrl+B)","note.toolbar.italic":"Курсив (Ctrl+I)","note.toolbar.heading":"Заголовок","note.toolbar.link":"Ссылка","note.toolbar.code":"Код","note.toolbar.codeBlock":"Блок кода","note.toolbar.bulletList":"Маркированный список","note.toolbar.numberedList":"Нумерованный список","note.toolbar.checkbox":"Чекбокс","note.toolbar.quote":"Цитата","note.toolbar.internalLink":"Внутренняя ссылка Verstak","note.internal.secretNotImplemented":"Сейф доступов ещё не реализован","note.internal.caseNotFound":"Дело не найдено","note.internal.noteNotFound":"Заметка не найдена","note.internal.fileNotFound":"Файл не найден","note.internal.fileFound":"Файл найден: {title}","note.rename":"Переименовать заметку","note.deleteConfirm":"Удалить заметку «{title}»?","note.renameError":"Не удалось переименовать заметку","note.internalLink.title":"Вставить внутреннюю ссылку","note.internalLink.label":"Текст ссылки","note.internalLink.url":"Адрес ссылки","note.internalLink.labelPlaceholder":"Например: Админка","note.internalLink.urlPlaceholder":"verstak://secret/sec_...","note.preview.empty":"Пустая заметка. Переключитесь в режим редактора, чтобы начать писать.","note.preview.error":"Ошибка рендеринга markdown","link.label":"Текст ссылки","link.url":"URL или verstak:// ссылка","link.urlPlaceholder":"https://... или verstak://secret/sec_...","link.insert":"Вставить","file.addFile":"+ Добавить файл","file.addFolder":"+ Добавить папку","file.newFile":"+ Новый файл","file.addFileSimple":"Добавить файл","file.addFolderSimple":"Добавить папку","file.noFiles":"В этой папке пока нет файлов","file.noFilesCase":"В этом проекте пока нет файлов","file.hint":"Добавьте файл или папку, чтобы сохранить материалы проекта.","file.root":"Файлы","file.preview":"Предпросмотр","file.openExternal":"Открыть во внешней программе","file.openFolder":"Открыть папку","file.showInExplorer":"Показать в проводнике","file.more":"Ещё","file.delete":"Удалить","file.ariaFolder":"Папка","file.ariaFile":"Файл","file.scanning":"Сканирование...","file.pickSingle":"Выберите файл","file.pickMultiple":"Выберите файлы","file.pickDirectory":"Выберите папку","file.importTitle":"Добавить в","file.importFiles":"Файлов:","file.importFolders":"Папок:","file.importSize":"Размер:","file.importCopy":"Скопировать","file.importLink":"Привязать","file.selectCaseFirst":"Сначала выберите дело для добавления файлов","worklog.title":"Журнал","worklog.whatDone":"Что сделано","worklog.minutes":"Мин","worklog.min":"мин","worklog.log":"Записать","worklog.addEntry":"Добавить запись","worklog.acceptSuggestion":"Принять предложение","worklog.editEntry":"Редактировать запись","worklog.deleteEntry":"Удалить запись","worklog.deleteConfirm":"Удалить эту запись работы? Связанные события останутся в активности, но связь с записью будет удалена.","worklog.date":"Дата","worklog.empty":"Записей работы пока нет","worklog.details":"Детали","worklog.source":"Источник","worklog.sourceSuggestion":"Из предложения","worklog.sourceSuggestionNoEvents":"Из предложения, но связанные события отсутствуют","worklog.sourceManual":"Ручная запись","worklog.sourceUnknown":"Источник неизвестен","worklog.suggestions":"Предложения на сегодня","worklog.apply":"Применить","sync.title":"Синхронизация","sync.settings":"Настройки синхронизации","sync.status":"Статус","sync.server":"Сервер","sync.device":"Устройство","sync.deviceId":"ID устройства","sync.unpushed":"Неотправлено","sync.lastSync":"Последняя синх.","sync.revoked":"Отозвано","sync.connected":"Подключено","sync.notConnected":"Не подключено","sync.disabled":"Отключена","sync.serverUrl":"URL сервера","sync.serverUrlPlaceholder":"https://example.com:47732","sync.username":"Логин","sync.usernamePlaceholder":"username","sync.password":"Пароль","sync.passwordPlaceholder":"password","sync.interval":"Автосинхронизация (мин)","sync.saveInterval":"Сохранить интервал","sync.syncNow":"Синхронизировать","sync.disconnect":"Отключиться","sync.connect":"Подключиться","sync.test":"Проверить","sync.settingsSaved":"интервал сохранён","today.title":"Сегодня","today.changedCases":"Изменён сегодня","today.timeline":"Лента за сегодня","today.empty":"Сегодня пока тихо","today.emptyHint":"Здесь появятся дела, заметки, файлы и действия, с которыми вы работали сегодня.","today.plural.case_one":"дело","today.plural.case_few":"дела","today.plural.case_many":"дел","today.plural.note_one":"заметка","today.plural.note_few":"заметки","today.plural.note_many":"заметок","today.plural.file_one":"файл","today.plural.file_few":"файла","today.plural.file_many":"файлов","today.plural.event_one":"событие","today.plural.event_few":"события","today.plural.event_many":"событий","today.feed":"Лента","today.suggestionsTab":"Предложения","today.inProgress":"В работе","today.captured":"Захвачено","today.feedEmpty":"Сегодня событий нет","today.inProgressEmpty":"Сегодня ничего не изменяли","today.capturedEmpty":"Сегодня ничего не захвачено","today.feedHint":"События за сегодня: изменения файлов, заметок, действий и другие события.","today.sortByTime":"по времени","today.sortByName":"по имени","today.sortByType":"по типу","today.sortAsc":"по возрастанию","today.sortDesc":"по убыванию","journal.title":"Журнал работы","journal.worklogTab":"Журнал работы","journal.empty":"Нет записей за выбранный период","journal.dateFrom":"От","journal.dateTo":"До","journal.filter":"Фильтр","journal.total":"Всего","journal.exportCSV":"CSV","journal.exportMarkdown":"Markdown","journal.billable":"К оплате","journal.billableYes":"К оплате","journal.billableNo":"Не к оплате","journal.billableHint":"К оплате — можно включать в счёт клиенту","journal.approx":"Тип времени","journal.approxExact":"Точное","journal.approxEstimated":"Оценочное","journal.approxHint":"Оценочное — время предложено системой или введено как примерное","journal.includeChildrenDisabledHint":"Работает только при выбранном деле/клиенте/проекте","journal.node":"Дело","journal.path":"Путь","journal.byDay":"По дням","journal.byNode":"По делам","journal.includeChildren":"Учитывать вложенные дела","journal.nodeSearch":"Поиск дела...","journal.relatedEvents":"Связанные события","journal.filterHeading":"Фильтры","journal.exportHeading":"Экспорт отчёта","journal.reset":"Сбросить","suggest.title":"Предложения на сегодня","suggest.apply":"Записать","suggest.dismiss":"Скрыть","suggest.open":"Открыть","suggest.confidence.low":"Низкая уверенность","suggest.confidence.medium":"Средняя уверенность","suggest.confidence.high":"Высокая уверенность","suggest.minutes":"мин","suggest.edit":"Изменить","suggest.noSuggestions":"Нет предложений для журнала","suggest.detectedEvents":"Что обнаружено","activity.title":"Активность","activity.empty":"Активность пока не зафиксирована","activity.perCaseEmpty":"Активность пока не зафиксирована","overview.type":"Тип","overview.section":"Раздел","overview.created":"Создано","overview.newNote":"Новая заметка","overview.addFile":"Добавить файл","overview.addAction":"Добавить действие","overview.logTime":"Записать время","overview.recentNotes":"Последние заметки","overview.recentEntries":"Последние записи","rename.title":"Переименовать","rename.emptyError":"Имя не может быть пустым","rename.invalidError":"Недопустимое имя","delete.confirmTitle":"Удаление","delete.confirmMessage":"Удалить","delete.folder":"папку","delete.file":"файл","template.optionNone":"Пустое дело","template.optional":"Шаблон (опционально)","template.none.desc":"Без шаблона, простой узел-контейнер","template.folder":"Папка","template.folder.desc":"Папка для группировки элементов внутри рабочего пространства","template.project":"Проект","template.project.desc":"Отдельный проект или задача с файлами, заметками и журналом","template.client":"Клиент","template.client.desc":"Организация или человек, для которых ведутся работы","template.document":"Документ","template.document.desc":"Документ с описанием, заметками и файлами","template.recipe":"Рецепт","template.recipe.desc":"Повторяемая процедура или инструкция","template.note":"Заметка","template.file":"Файл","template.select":"Выберите тип","mime.jpeg":"Изображение JPEG","mime.png":"Изображение PNG","mime.gif":"Изображение GIF","mime.webp":"Изображение WebP","mime.svg":"Изображение SVG","mime.bmp":"Изображение BMP","mime.tiff":"Изображение TIFF","mime.avif":"Изображение AVIF","mime.pdf":"PDF документ","mime.word":"Документ Word","mime.excel":"Таблица Excel","mime.ppt":"Презентация PowerPoint","mime.zip":"ZIP архив","mime.gzip":"GZIP архив","mime.tar":"TAR архив","mime.sevenz":"7z архив","mime.rar":"RAR архив","mime.text":"Текстовый файл","mime.html":"HTML файл","mime.css":"CSS файл","mime.js":"JavaScript файл","mime.json":"JSON файл","mime.xml":"XML файл","mime.yaml":"YAML файл","mime.binary":"Бинарный файл","mime.executable":"Исполняемый файл","mime.folder":"Папка","mime.unknown":"Неизвестно","mime.file":"Файл","error.nameEmpty":"Имя не может быть пустым","error.nameInvalid":"Недопустимое имя","error.selectCaseFirst":"Сначала выберите дело","error.vaultNotOpen":"Хранилище не открыто","delete.files":"файлов ({count})","file.namePrompt":"Введите имя файла:","file.pdfUnavailable":"Предпросмотр PDF недоступен.","file.previewUnavailable":"Предпросмотр недоступен для этого типа файлов.","case.new":"Новое дело","case.namePlaceholder":"Название дела","settings.title":"Настройки","settings.general":"Общие","settings.generalDesc":"Основные настройки интерфейса.","settings.workspace":"Рабочее пространство","settings.workspaceDesc":"Управление хранилищем данных.","settings.appearance":"Внешний вид","settings.localization":"Локализация","settings.templates":"Шаблоны","settings.plugins":"Плагины","settings.files":"Файлы","settings.activity":"Активность","settings.sync":"Синхронизация","settings.backup":"Резервные копии","settings.close":"Закрыть настройки","settings.noPlugins":"Плагины пока не установлены.","settings.openPluginsDir":"Открыть папку plugins","settings.activityStub":"Здесь будут настройки отслеживания активности.","settings.backupStub":"Здесь будут настройки резервного копирования.","settings.theme":"Тема интерфейса","settings.themeSystem":"Системная","settings.themeLight":"Светлая","settings.themeDark":"Тёмная","settings.language":"Язык интерфейса","settings.langRu":"Русский","settings.langEn":"Английский","settings.langSoon":"будет доступно позже","settings.save":"Сохранить настройки","settings.saved":"Настройки сохранены","settings.vaultPath":"Путь к рабочему пространству","settings.noVaultInfo":"Нет информации о хранилище.","settings.vaultInfo":"Информация о рабочем пространстве","settings.openVault":"Открыть папку vault","settings.changeVault":"Изменить путь","settings.checkIntegrity":"Проверить целостность","settings.templatesDesc":"Включите или выключите шаблоны создания элементов.","settings.templateEnabled":"Включён","settings.templateDisabled":"Выключен","settings.filesStub":"Здесь будут настройки файлового хранилища.","settings.syncEnabled":"Синхронизация включена","settings.syncDisabled":"Синхронизация отключена","settings.syncDesc":"Настройте подключение к серверу синхронизации.","settings.serverUrl":"URL сервера","settings.deviceName":"Имя устройства","settings.deviceId":"ID устройства","settings.lastSync":"Последняя синхронизация","settings.lastError":"Последняя ошибка","settings.pendingChanges":"Ожидающие изменения","settings.checkConnection":"Проверить подключение","settings.syncNow":"Синхронизировать сейчас","settings.reconnect":"Переподключить","settings.disconnect":"Отключить устройство","settings.resetKey":"Сбросить ключ","settings.confirmDisconnect":"Вы уверены, что хотите отключить устройство?","settings.confirmDisconnectDesc":"Синхронизация будет остановлена. Для повторного подключения потребуется логин и пароль.","settings.confirmResetKey":"Сбросить ключ синхронизации?","settings.confirmResetKeyDesc":"Текущий ключ устройства будет удалён. Потребуется переподключение.","settings.connected":"Подключено","settings.disconnected":"Не подключено","settings.notConfigured":"Не настроено","settings.error":"Ошибка","settings.revoked":"Отозвано","settings.status":"Статус","firstrun.title":"Добро пожаловать в Верстак","firstrun.desc":"Верстак хранит данные в локальном рабочем пространстве — vault.","firstrun.pathLabel":"Путь к vault","firstrun.defaultPath":"Путь по умолчанию","firstrun.browse":"Выбрать папку","firstrun.create":"Создать рабочее пространство","firstrun.quit":"Выйти","firstrun.pathExists":"Папка существует. Будет создан новый vault.","firstrun.pathHasVault":"Найден существующий vault. Будет подключён.","firstrun.pathNew":"Путь не существует. Будет создан новый vault.","firstrun.errorNoWrite":"Нет прав на запись в выбранную папку.","firstrun.creating":"Создание рабочего пространства...","firstrun.created":"Рабочее пространство создано!","recovery.title":"Рабочее пространство не найдено","recovery.expected":"Ожидался путь","recovery.choose":"Выбрать другой vault","recovery.create":"Создать новый vault","recovery.settings":"Открыть настройки","recovery.quit":"Выйти","recovery.createConfirm":"Будет создано новое пустое рабочее пространство. Старый путь в настройках будет заменён.","recovery.createConfirmTitle":"Создать новое рабочее пространство?","sync.status.connected":"Синхронизация доступна","sync.status.disconnected":"Сервер недоступен","sync.status.disabled":"Синхронизация не настроена","sync.status.syncing":"Синхронизация...","sync.status.error":"Ошибка синхронизации","sync.changes":"изменений","sync.details":"Подробнее","sync.configure":"Настроить","sync.retry":"Повторить","sync.run":"Синхронизировать","sync.running":"Синхронизация...","sync.conflictsCount":"Конфликты: {count}","sync.applyErrorsCount":"Ошибки применения: {count}","sync.pushedPulled":"Отправлено: {pushed}, получено: {pulled}","error.generic":"Произошла ошибка","error.invalidCredentials":"Неверный логин или пароль","error.accountBlocked":"Аккаунт заблокирован","error.emailNotConfirmed":"Email не подтверждён","error.tokenInvalid":"Неверный или просроченный токен","error.tokenExpired":"Срок действия токена истёк"},qg={"nav.today":"Today","nav.inbox":"Inbox","nav.trash":"Trash","nav.activity":"Activity","nav.journal":"Journal","nav.clients":"Clients","nav.projects":"Projects","nav.recipes":"Recipes","nav.documents":"Documents","nav.archive":"Archive","nav.sections":"Sections","nav.cases":"Cases","nav.noCases":"No cases","nav.sync":"Sync","nav.syncSettings":"Sync settings","nav.syncNow":"Sync now","nav.selectPrompt":"Select a section or case","nav.brand":"Verstak","nav.system":"System","nav.workspace":"Workspace","nav.noNodes":"No nodes","nav.openFolder":"Open folder","nav.createInside":"Create inside","nav.createNode":"Create element","nav.moveToRoot":"Move to root","inbox.subtitle":"Captured materials that still need to be assigned to cases","inbox.sortByDate":"by date","inbox.sortByName":"by name","inbox.sortByType":"by type","inbox.sortAsc":"ascending","inbox.sortDesc":"descending","inbox.groupByContext":"Group by capture location","inbox.noContext":"No capture location","inbox.empty":"No unprocessed items","inbox.pasteClipboard":"Paste from clipboard","inbox.captured":"Added","inbox.clipboardEmpty":"Clipboard is empty","inbox.clipboardUnavailable":"Clipboard is unavailable","inbox.assign":"Assign","inbox.keepHere":"Attach at captured location","inbox.localEmpty":"No unprocessed materials for this case","inbox.capturedIn":"Captured in","inbox.suggestedTarget":"Target","inbox.assignTitle":"Assign material","inbox.assignTarget":"Case","inbox.assignSearchPlaceholder":"Find case","inbox.assignSearchHint":"Start typing a Case name","inbox.deleteTitle":"Delete material","inbox.deleteConfirm":'Delete "{title}" from inbox?',"capture.kind.text":"Text","capture.kind.url":"Link","capture.kind.file":"File","capture.kind.folder":"Folder","capture.kind.image":"Image","capture.source.clipboard":"Clipboard","capture.source.clipboard_button":"Clipboard button","capture.source.drop":"Drop","capture.source.paste":"Paste","capture.source.browser":"Browser","capture.source.manual":"Manual","capture.dropOverlayNode":"Will be added to Inbox for: {title}","capture.dropOverlayGlobal":"Will be added to global Inbox","trash.openFolder":"Open trash folder","trash.empty":"Trash is empty","trash.emptyTrash":"Empty trash","trash.restore":"Restore","trash.deletedNodes":"Deleted items","tab.overview":"Overview","tab.notes":"Notes","tab.files":"Files","tab.inbox":"Inbox","tab.links":"Links","tab.actions":"Actions","tab.worklog":"Work Log","tab.activity":"Activity","common.save":"Save","common.cancel":"Cancel","common.delete":"Delete","common.rename":"Rename","common.close":"Close","common.create":"Create","common.confirm":"Confirm","common.back":"← Back","common.backLabel":"Back","common.loading":"Loading...","common.error":"Error:","common.yes":"Yes","common.ok":"OK","common.copy":"Copy","common.cut":"Cut","common.paste":"Paste","common.duplicate":"Duplicate","common.run":"Run","common.test":"Test","common.all":"All","common.open":"Open","common.no":"No","common.date":"Date","common.search":"Search","common.testAgain":"Check","common.connect":"Connect","common.disconnect":"Disconnect","common.settings":"Settings","common.name":"Name","common.type":"Type","common.section":"Section","common.created":"Created","common.empty":"None","common.newName":"New name","search.placeholder":"Search Verstak...","search.noResults":"No results found","welcome.title":"Verstak","welcome.selectSection":"Select a section in the sidebar.","welcome.createCase":"Or create a new case with the + button.","welcome.addCase":"Add case","event.noteCreated":"Note created","event.noteUpdated":"Note updated","event.fileAdded":"File added","event.fileDeleted":"File deleted","event.fileRenamed":"File renamed","event.fileCopied":"File copied","event.fileMoved":"File moved","event.folderAdded":"Folder added","event.folderDeleted":"Folder deleted","event.folderRenamed":"Folder renamed","event.caseCreated":"Case created","event.caseUpdated":"Case updated","event.noteDeleted":"Note deleted","event.folderMoved":"Folder moved","event.nodeDeleted":"Node deleted","event.actionCreated":"Action created","event.actionDone":"Action completed","event.worklogAdded":"Time entry added","kind.project":"Project","kind.client":"Client","kind.document":"Document","kind.recipe":"Recipe","kind.folder":"Folder","kind.note":"Note","kind.file":"File","kind.archive":"Archive","kind.case":"Case","kind.link":"Link","kind.action":"Action","links.empty":"No links yet","links.editTitle":"Edit link","links.note":"Note","links.copyUrl":"Copy URL","links.copied":"URL copied","links.copyUnavailable":"Could not copy URL","links.deleteTitle":"Delete link","links.deleteConfirm":'Delete link "{title}"?',"action.openUrl":"Open URL","action.openFile":"Open file","action.openFolder":"Open folder","action.runCommand":"Run command","action.runScript":"Run script","action.openTerminal":"Open terminal","action.launchApp":"Launch app","action.addAction":"+ Add action","action.newAction":"New action","action.noActions":"No actions yet","action.run":"Run","action.dataUrl":"URL","action.dataPath":"Path","action.dataCommand":"Command","action.urlPlaceholder":"https://example.com","action.pathPlaceholder":"/path/to/file","action.commandPlaceholder":"command","action.namePlaceholder":"Example: Open website","note.add":"+ Add note","note.new":"New note","note.title":"Note title","note.noNotes":"No notes","note.createFirst":"Create the first note for this case.","note.placeholder":"Start writing...","note.unsavedTitle":"Unsaved changes","note.unsavedMessage":"Close the editor? All unsaved changes will be lost.","note.unsavedClose":"Close","note.mode.edit":"Edit","note.mode.preview":"Preview","note.mode.split":"Split","note.toolbar.bold":"Bold (Ctrl+B)","note.toolbar.italic":"Italic (Ctrl+I)","note.toolbar.heading":"Heading","note.toolbar.link":"Link","note.toolbar.code":"Code","note.toolbar.codeBlock":"Code block","note.toolbar.bulletList":"Bullet list","note.toolbar.numberedList":"Numbered list","note.toolbar.checkbox":"Checkbox","note.toolbar.quote":"Quote","note.toolbar.internalLink":"Verstak internal link","note.internal.secretNotImplemented":"Secrets vault is not yet implemented","note.internal.caseNotImplemented":"Case navigation is not yet implemented","note.internal.noteNotImplemented":"Note navigation is not yet implemented","note.internal.fileNotImplemented":"File navigation is not yet implemented","note.rename":"Rename note","note.deleteConfirm":'Delete note "{title}"?',"note.renameError":"Failed to rename note","note.internalLink.title":"Insert internal link","note.internalLink.label":"Link text","note.internalLink.url":"Link address","note.internalLink.labelPlaceholder":"e.g. Admin panel","note.internalLink.urlPlaceholder":"verstak://secret/sec_...","note.preview.empty":"Empty note. Switch to edit mode to start writing.","note.preview.error":"Markdown render error","link.label":"Link text","link.url":"URL or verstak:// link","link.urlPlaceholder":"https://... or verstak://secret/sec_...","link.insert":"Insert","file.addFile":"+ Add file","file.addFolder":"+ Add folder","file.newFile":"+ New file","file.addFileSimple":"Add file","file.addFolderSimple":"Add folder","file.noFiles":"No files in this folder yet","file.noFilesCase":"No files in this project yet","file.hint":"Add a file or folder to store project materials.","file.root":"Files","file.preview":"Preview","file.openExternal":"Open in external program","file.openFolder":"Open folder","file.showInExplorer":"Show in explorer","file.more":"More","file.delete":"Delete","file.ariaFolder":"Folder","file.ariaFile":"File","file.scanning":"Scanning...","file.pickSingle":"Select file","file.pickMultiple":"Select files","file.pickDirectory":"Select folder","file.importTitle":"Add to","file.importFiles":"Files:","file.importFolders":"Folders:","file.importSize":"Size:","file.importCopy":"Copy","file.importLink":"Link","file.selectCaseFirst":"Select a case before adding files","worklog.title":"Work Log","worklog.whatDone":"What was done","worklog.minutes":"Min","worklog.min":"min","worklog.log":"Log","worklog.addEntry":"Add entry","worklog.acceptSuggestion":"Accept suggestion","worklog.editEntry":"Edit entry","worklog.deleteEntry":"Delete entry","worklog.deleteConfirm":"Delete this work entry? Related events stay in activity, but their link to this entry will be removed.","worklog.date":"Date","worklog.empty":"No work logged yet","worklog.details":"Details","worklog.source":"Source","worklog.sourceSuggestion":"From suggestion","worklog.sourceSuggestionNoEvents":"From suggestion, but related events missing","worklog.sourceManual":"Manual entry","worklog.sourceUnknown":"Unknown source","worklog.suggestions":"Suggestions for today","worklog.apply":"Apply","sync.title":"Sync","sync.settings":"Sync settings","sync.status":"Status","sync.server":"Server","sync.device":"Device","sync.deviceId":"Device ID","sync.unpushed":"Unpushed","sync.lastSync":"Last sync","sync.revoked":"Revoked","sync.connected":"Connected","sync.notConnected":"Not connected","sync.disabled":"Disabled","sync.serverUrl":"Server URL","sync.serverUrlPlaceholder":"https://example.com:47732","sync.username":"Username","sync.usernamePlaceholder":"username","sync.password":"Password","sync.passwordPlaceholder":"password","sync.interval":"Auto sync (min)","sync.saveInterval":"Save interval","sync.syncNow":"Sync now","sync.disconnect":"Disconnect","sync.connect":"Connect","sync.test":"Check","sync.settingsSaved":"interval saved","today.title":"Today","today.changedCases":"Changed today","today.timeline":"Timeline for today","today.empty":"Nothing happened today yet","today.emptyHint":"Cases, notes, files, and actions you worked with today will appear here.","today.plural.case_one":"case","today.plural.case_few":"cases","today.plural.case_many":"cases","today.plural.note_one":"note","today.plural.note_few":"notes","today.plural.note_many":"notes","today.plural.file_one":"file","today.plural.file_few":"files","today.plural.file_many":"files","today.plural.event_one":"event","today.plural.event_few":"events","today.plural.event_many":"events","today.feed":"Feed","today.suggestionsTab":"Suggestions","today.inProgress":"In Progress","today.captured":"Captured","today.feedEmpty":"No events today","today.inProgressEmpty":"Nothing modified today","today.capturedEmpty":"Nothing captured today","today.feedHint":"Today's events: file changes, notes, actions and other events.","today.sortByTime":"by time","today.sortByName":"by name","today.sortByType":"by type","today.sortAsc":"ascending","today.sortDesc":"descending","journal.title":"Work Log","journal.worklogTab":"Work Log","journal.empty":"No entries for the selected period","journal.dateFrom":"From","journal.dateTo":"To","journal.filter":"Filter","journal.total":"Total","journal.exportCSV":"CSV","journal.exportMarkdown":"Markdown","journal.billable":"Billable","journal.billableYes":"Billable","journal.billableNo":"Not billable","journal.billableHint":"Billable — can be included in client invoice","journal.approx":"Time type","journal.approxExact":"Exact","journal.approxEstimated":"Estimated","journal.approxHint":"Estimated — time suggested by the system or entered as approximate","journal.includeChildrenDisabledHint":"Only works when a case/client/project is selected","journal.node":"Case","journal.path":"Path","journal.byDay":"By day","journal.byNode":"By case","journal.includeChildren":"Include subtasks","journal.nodeSearch":"Search case...","journal.relatedEvents":"Related events","journal.filterHeading":"Filters","journal.exportHeading":"Export Report","journal.reset":"Reset","suggest.title":"Suggestions","suggest.apply":"Log","suggest.dismiss":"Dismiss","suggest.open":"Open","suggest.confidence.low":"Low confidence","suggest.confidence.medium":"Medium confidence","suggest.confidence.high":"High confidence","suggest.minutes":"min","suggest.edit":"Edit","suggest.noSuggestions":"No suggestions","suggest.detectedEvents":"What was detected","activity.title":"Activity","activity.empty":"No activity recorded yet","activity.perCaseEmpty":"No activity recorded yet","overview.type":"Type","overview.section":"Section","overview.created":"Created","overview.newNote":"New note","overview.addFile":"Add file","overview.addAction":"Add action","overview.logTime":"Log time","overview.recentNotes":"Recent notes","overview.recentEntries":"Recent entries","rename.title":"Rename","rename.emptyError":"Name cannot be empty","rename.invalidError":"Invalid name","delete.confirmTitle":"Delete","delete.confirmMessage":"Delete","delete.folder":"folder","delete.file":"file","template.optionNone":"Empty case","template.optional":"Template (optional)","template.none.desc":"No template, simple container node","template.folder":"Folder","template.folder.desc":"A folder to group items inside a workspace","template.project":"Project","template.project.desc":"A distinct project or task with files, notes and work log","template.client":"Client","template.client.desc":"An organization or person for whom work is performed","template.document":"Document","template.document.desc":"A document with description, notes and files","template.recipe":"Recipe","template.recipe.desc":"A repeatable procedure or instruction","template.note":"Note","template.file":"File","template.select":"Select type","mime.jpeg":"JPEG image","mime.png":"PNG image","mime.gif":"GIF image","mime.webp":"WebP image","mime.svg":"SVG image","mime.bmp":"BMP image","mime.tiff":"TIFF image","mime.avif":"AVIF image","mime.pdf":"PDF document","mime.word":"Word document","mime.excel":"Excel spreadsheet","mime.ppt":"PowerPoint presentation","mime.zip":"ZIP archive","mime.gzip":"GZIP archive","mime.tar":"TAR archive","mime.sevenz":"7z archive","mime.rar":"RAR archive","mime.text":"Text file","mime.html":"HTML file","mime.css":"CSS file","mime.js":"JavaScript file","mime.json":"JSON file","mime.xml":"XML file","mime.yaml":"YAML file","mime.binary":"Binary file","mime.executable":"Executable file","mime.folder":"Folder","mime.unknown":"Unknown","mime.file":"File","error.nameEmpty":"Name cannot be empty","error.nameInvalid":"Invalid name","error.selectCaseFirst":"Select a case first","error.vaultNotOpen":"Vault not open","delete.files":"files ({count})","file.namePrompt":"Enter file name:","file.pdfUnavailable":"PDF preview is unavailable.","file.previewUnavailable":"Preview is unavailable for this file type.","case.new":"New case","case.namePlaceholder":"Case name","settings.title":"Settings","settings.general":"General","settings.generalDesc":"Basic interface settings.","settings.workspace":"Workspace","settings.workspaceDesc":"Manage data storage.","settings.appearance":"Appearance","settings.localization":"Localization","settings.templates":"Templates","settings.plugins":"Plugins","settings.files":"Files","settings.activity":"Activity","settings.sync":"Sync","settings.backup":"Backups","settings.close":"Close settings","settings.noPlugins":"No plugins installed yet.","settings.openPluginsDir":"Open plugins folder","settings.activityStub":"Activity tracking settings will be here.","settings.backupStub":"Backup settings will be here.","settings.theme":"Interface theme","settings.themeSystem":"System","settings.themeLight":"Light","settings.themeDark":"Dark","settings.language":"Interface language","settings.langRu":"Russian","settings.langEn":"English","settings.langSoon":"coming soon","settings.save":"Save settings","settings.saved":"Settings saved","settings.vaultPath":"Workspace path","settings.noVaultInfo":"No workspace information.","settings.vaultInfo":"Workspace information","settings.openVault":"Open vault folder","settings.changeVault":"Change path","settings.checkIntegrity":"Check integrity","settings.templatesDesc":"Enable or disable templates for creating items.","settings.templateEnabled":"Enabled","settings.templateDisabled":"Disabled","settings.filesStub":"File storage settings will be here.","settings.syncEnabled":"Sync enabled","settings.syncDisabled":"Sync disabled","settings.syncDesc":"Configure connection to the sync server.","settings.serverUrl":"Server URL","settings.deviceName":"Device name","settings.deviceId":"Device ID","settings.lastSync":"Last sync","settings.lastError":"Last error","settings.pendingChanges":"Pending changes","settings.checkConnection":"Check connection","settings.syncNow":"Sync now","settings.reconnect":"Reconnect","settings.disconnect":"Disconnect device","settings.resetKey":"Reset key","settings.confirmDisconnect":"Are you sure you want to disconnect this device?","settings.confirmDisconnectDesc":"Sync will stop. Reconnecting will require username and password.","settings.confirmResetKey":"Reset sync key?","settings.confirmResetKeyDesc":"The current device key will be removed. Reconnection will be required.","settings.connected":"Connected","settings.disconnected":"Disconnected","settings.notConfigured":"Not configured","settings.error":"Error","settings.revoked":"Revoked","settings.status":"Status","firstrun.title":"Welcome to Verstak","firstrun.desc":"Verstak stores data in a local workspace called a vault.","firstrun.pathLabel":"Vault path","firstrun.defaultPath":"Default path","firstrun.browse":"Choose folder","firstrun.create":"Create workspace","firstrun.quit":"Quit","firstrun.pathExists":"The folder exists. A new vault will be created.","firstrun.pathHasVault":"Existing vault found. It will be connected.","firstrun.pathNew":"The path does not exist. A new vault will be created.","firstrun.errorNoWrite":"No write permission for the selected folder.","firstrun.creating":"Creating workspace...","firstrun.created":"Workspace created!","recovery.title":"Workspace not found","recovery.expected":"Expected path","recovery.choose":"Choose another vault","recovery.create":"Create new vault","recovery.settings":"Open settings","recovery.quit":"Quit","recovery.createConfirm":"A new empty workspace will be created. The old path in settings will be replaced.","recovery.createConfirmTitle":"Create a new workspace?","sync.status.connected":"Sync available","sync.status.disconnected":"Server unavailable","sync.status.disabled":"Sync is not configured","sync.status.syncing":"Syncing...","sync.status.error":"Sync error","sync.changes":"changes","sync.details":"Details","sync.configure":"Configure","sync.retry":"Retry","sync.run":"Sync","sync.running":"Syncing...","sync.conflictsCount":"Conflicts: {count}","sync.applyErrorsCount":"Apply errors: {count}","sync.pushedPulled":"Pushed: {pushed}, pulled: {pulled}","error.generic":"An error occurred","error.invalidCredentials":"Invalid username or password","error.accountBlocked":"Account blocked","error.emailNotConfirmed":"Email not confirmed","error.tokenInvalid":"Invalid or expired token","error.tokenExpired":"Token expired"},Vo={ru:Pg,en:qg};let Zo="ru";function k(n,e){var i;const t=Vo[Zo];let l=t==null?void 0:t[n];if(l==null&&Zo!=="ru"&&(l=(i=Vo.ru)==null?void 0:i[n]),l==null&&(l=n),e!=null)for(const[o,s]of Object.entries(e))l=l.replace(`{${o}}`,String(s));return l}function Pi(n){if(n==null||n<0)return"—";if(n===0)return"0 B";const e=["B","KB","MB","GB"],t=Math.min(Math.floor(Math.log(n)/Math.log(1024)),e.length-1),l=n/Math.pow(1024,t);return(t===0?l.toFixed(0):l.toFixed(1))+" "+e[t]}const Ns={"image/jpeg":k("mime.jpeg"),"image/png":k("mime.png"),"image/gif":k("mime.gif"),"image/webp":k("mime.webp"),"image/svg+xml":k("mime.svg"),"image/bmp":k("mime.bmp"),"image/tiff":k("mime.tiff"),"image/avif":k("mime.avif"),"application/pdf":k("mime.pdf"),"application/msword":k("mime.word"),"application/vnd.openxmlformats-officedocument.wordprocessingml.document":k("mime.word"),"application/vnd.ms-excel":k("mime.excel"),"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":k("mime.excel"),"application/vnd.ms-powerpoint":k("mime.ppt"),"application/vnd.openxmlformats-officedocument.presentationml.presentation":k("mime.ppt"),"application/zip":k("mime.zip"),"application/gzip":k("mime.gzip"),"application/x-tar":k("mime.tar"),"application/x-7z-compressed":k("mime.sevenz"),"application/x-rar-compressed":k("mime.rar"),"text/plain":k("mime.text"),"text/html":k("mime.html"),"text/css":k("mime.css"),"text/javascript":k("mime.js"),"application/json":k("mime.json"),"application/xml":k("mime.xml"),"application/x-yaml":k("mime.yaml"),"application/octet-stream":k("mime.binary"),"application/x-msdos-program":k("mime.executable"),"inode/directory":k("mime.folder")};function Yo(n){return n?Ns[n]||n:k("mime.unknown")}function jg(n){if(n.type==="folder")return k("mime.folder");const e=(n.mime||"").toLowerCase();if(Ns[e])return Ns[e];const l=(n.name||"").toLowerCase().split(".").pop();return l?l.toUpperCase():k("mime.file")}function Vf(n){if(n.type==="folder")return"folder";const e=(n.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 l=(n.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(l)?"code":"generic"}const Zf=["image/jpeg","image/png","image/gif","image/webp","image/bmp","image/tiff","image/avif","image/svg+xml"],Yf=["text/plain","text/html","text/css","text/javascript","application/json","application/xml","application/x-yaml","text/x-shellscript","text/csv","text/tab-separated-values","text/x-python","text/x-java","text/x-c","text/x-cpp","text/x-ruby","text/x-perl","text/x-php","text/x-go","text/x-rust","text/markdown"],Xf=["txt","log","conf","ini","yaml","yml","json","xml","csv","tsv","sh","py","js","ts","css","html","md","markdown","cfg","env","gitignore","dockerignore","toml","bat","cmd","ps1","sql","graphql","proto","gradle","cmake","makefile","dockerfile","vbs","lua","r","m","scala","kt","swift","dart","elm","erl","ex","exs","fs","fsi","fsx","hs","lhs","ml","mli","pl","pm","rb","rake","rs","scm","ss","clj","cljs","cljc","edn","lisp","lsp","el","vim","vimrc","zsh","bash","fish","csh","ksh","tcsh","awk","sed","make","mk","nim","nims","d","go","java","svelte","vue","jsx","tsx","coffee","litcoffee","scss","sass","less","styl","properties","dotenv","editorconfig","gitattributes","browserslistrc","htaccess","nginx","shader","glsl","vert","frag","asm","h","hpp","cxx","cc","cpp","capnp","flatbuf","prisma","dtd","xsl","xsd","sch","svg","vtt","srt","sub","m3u","m3u8","pls","xspf","cue","toc","nfo","diz","readme","changelog","copying","license","authors","contributors","setup","config","strings","po","pot","locale","translation"],Jf=["jpg","jpeg","png","gif","webp","bmp","tiff","tif","avif","svg"];function Qf(n){if(n.type==="folder")return!1;const e=(n.mime||"").toLowerCase(),l=(n.name||"").toLowerCase().split(".").pop();return!!(Zf.includes(e)||Jf.includes(l)||e.includes("pdf")||Yf.includes(e)||Xf.includes(l))}function xf(n){const e=(n.mime||"").toLowerCase(),l=(n.name||"").toLowerCase().split(".").pop();return Zf.includes(e)||Jf.includes(l)}function $f(n){const e=(n.mime||"").toLowerCase(),l=(n.name||"").toLowerCase().split(".").pop();return Yf.includes(e)||Xf.includes(l)&&l!=="md"&&l!=="markdown"}function ed(n){return(n.mime||"").toLowerCase().includes("pdf")}function ii(n){const e=(n.name||"").toLowerCase();return e.endsWith(".md")||e.endsWith(".markdown")}function zg(n){return xf(n)||ed(n)}const{window:Bg}=Ps;function Fg(n){let e,t,l,i=Pi(n[0].size)+"",o;return{c(){e=f("span"),e.textContent="·",t=w(),l=f("span"),o=F(i),r(e,"class","meta-sep svelte-1skuef2")},m(s,c){C(s,e,c),C(s,t,c),C(s,l,c),a(l,o)},p(s,c){c[0]&1&&i!==(i=Pi(s[0].size)+"")&&Q(o,i)},d(s){s&&(S(e),S(t),S(l))}}}function Ug(n){let e,t,l,i,o;return{c(){e=f("button"),e.innerHTML='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path 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"></path><line x1="9" y1="14" x2="15" y2="14"></line></svg>',t=w(),l=f("button"),l.innerHTML='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path 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"></path></svg>',r(e,"class","action-btn svelte-1skuef2"),r(e,"title",k("file.openFolder")),r(e,"aria-label",k("file.openFolder")),r(l,"class","action-btn svelte-1skuef2"),r(l,"title",k("file.showInExplorer")),r(l,"aria-label",k("file.showInExplorer"))},m(s,c){C(s,e,c),C(s,t,c),C(s,l,c),i||(o=[O(e,"click",Ve(n[30])),O(l,"click",Ve(n[11]))],i=!0)},p:ie,d(s){s&&(S(e),S(t),S(l)),i=!1,Se(o)}}}function Hg(n){let e,t,l,i,o,s,c;return{c(){e=f("button"),e.innerHTML='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path><circle cx="12" cy="12" r="3"></circle></svg>',t=w(),l=f("button"),l.innerHTML='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line></svg>',i=w(),o=f("button"),o.innerHTML='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path 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"></path></svg>',r(e,"class","action-btn svelte-1skuef2"),r(e,"title",k("file.preview")),r(e,"aria-label",k("file.preview")),r(l,"class","action-btn svelte-1skuef2"),r(l,"title",k("file.openExternal")),r(l,"aria-label",k("file.openExternal")),r(o,"class","action-btn svelte-1skuef2"),r(o,"title",k("file.showInExplorer")),r(o,"aria-label",k("file.showInExplorer"))},m(u,d){C(u,e,d),C(u,t,d),C(u,l,d),C(u,i,d),C(u,o,d),s||(c=[O(e,"click",Ve(n[29])),O(l,"click",Ve(n[10])),O(o,"click",Ve(n[11]))],s=!0)},p:ie,d(u){u&&(S(e),S(t),S(l),S(i),S(o)),s=!1,Se(c)}}}function Xo(n){let e,t,l,i,o,s,c,u,d=k("common.open")+"",p,h,m,g,b,v,y,E,T=k("file.openExternal")+"",I,N,R,M,A,L,j=k("file.showInExplorer")+"",B,U,z,W,G,X,H,D,q,P=k("common.rename")+"",Y,Z,J,te,ne,le,me,oe=k("common.duplicate")+"",ze,Ye,Re,ee,re,Ne,Be,ve,Ue,Je=k("common.cut")+"",Ae,Qe,Fe,Ce,Ke,De,Ze,Pe=k("common.copy")+"",ue,ke,$,we,ge,Ie,it,ut,Xe,mt=k("common.delete")+"",xe,he,qe;return{c(){e=f("div"),t=w(),l=f("div"),i=f("button"),o=ae("svg"),s=ae("path"),c=ae("circle"),u=w(),p=F(d),h=w(),m=f("button"),g=ae("svg"),b=ae("path"),v=ae("polyline"),y=ae("line"),E=w(),I=F(T),N=w(),R=f("button"),M=ae("svg"),A=ae("path"),L=w(),B=F(j),U=w(),z=f("div"),W=w(),G=f("button"),X=ae("svg"),H=ae("path"),D=ae("path"),q=w(),Y=F(P),Z=w(),J=f("button"),te=ae("svg"),ne=ae("rect"),le=ae("path"),me=w(),ze=F(oe),Ye=w(),Re=f("button"),ee=ae("svg"),re=ae("circle"),Ne=ae("circle"),Be=ae("line"),ve=ae("line"),Ue=w(),Ae=F(Je),Qe=w(),Fe=f("button"),Ce=ae("svg"),Ke=ae("rect"),De=ae("path"),Ze=w(),ue=F(Pe),ke=w(),$=f("div"),we=w(),ge=f("button"),Ie=ae("svg"),it=ae("polyline"),ut=ae("path"),Xe=w(),xe=F(mt),r(e,"class","menu-backdrop svelte-1skuef2"),r(e,"role","presentation"),r(s,"d","M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"),r(c,"cx","12"),r(c,"cy","12"),r(c,"r","3"),r(o,"width","14"),r(o,"height","14"),r(o,"viewBox","0 0 24 24"),r(o,"fill","none"),r(o,"stroke","currentColor"),r(o,"stroke-width","2"),r(o,"stroke-linecap","round"),r(o,"stroke-linejoin","round"),r(i,"class","menu-item svelte-1skuef2"),r(i,"role","menuitem"),r(b,"d","M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"),r(v,"points","15 3 21 3 21 9"),r(y,"x1","10"),r(y,"y1","14"),r(y,"x2","21"),r(y,"y2","3"),r(g,"width","14"),r(g,"height","14"),r(g,"viewBox","0 0 24 24"),r(g,"fill","none"),r(g,"stroke","currentColor"),r(g,"stroke-width","2"),r(g,"stroke-linecap","round"),r(g,"stroke-linejoin","round"),r(m,"class","menu-item svelte-1skuef2"),r(m,"role","menuitem"),r(A,"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(M,"width","14"),r(M,"height","14"),r(M,"viewBox","0 0 24 24"),r(M,"fill","none"),r(M,"stroke","currentColor"),r(M,"stroke-width","2"),r(M,"stroke-linecap","round"),r(M,"stroke-linejoin","round"),r(R,"class","menu-item svelte-1skuef2"),r(R,"role","menuitem"),r(z,"class","menu-sep svelte-1skuef2"),r(H,"d","M12 20h9"),r(D,"d","M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"),r(X,"width","14"),r(X,"height","14"),r(X,"viewBox","0 0 24 24"),r(X,"fill","none"),r(X,"stroke","currentColor"),r(X,"stroke-width","2"),r(X,"stroke-linecap","round"),r(X,"stroke-linejoin","round"),r(G,"class","menu-item svelte-1skuef2"),r(G,"role","menuitem"),r(ne,"x","9"),r(ne,"y","9"),r(ne,"width","13"),r(ne,"height","13"),r(ne,"rx","2"),r(ne,"ry","2"),r(le,"d","M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"),r(te,"width","14"),r(te,"height","14"),r(te,"viewBox","0 0 24 24"),r(te,"fill","none"),r(te,"stroke","currentColor"),r(te,"stroke-width","2"),r(te,"stroke-linecap","round"),r(te,"stroke-linejoin","round"),r(J,"class","menu-item svelte-1skuef2"),r(J,"role","menuitem"),r(re,"cx","6"),r(re,"cy","6"),r(re,"r","3"),r(Ne,"cx","6"),r(Ne,"cy","18"),r(Ne,"r","3"),r(Be,"x1","20"),r(Be,"y1","4"),r(Be,"x2","8.12"),r(Be,"y2","15.88"),r(ve,"x1","8.12"),r(ve,"y1","8.12"),r(ve,"x2","20"),r(ve,"y2","20"),r(ee,"width","14"),r(ee,"height","14"),r(ee,"viewBox","0 0 24 24"),r(ee,"fill","none"),r(ee,"stroke","currentColor"),r(ee,"stroke-width","2"),r(ee,"stroke-linecap","round"),r(ee,"stroke-linejoin","round"),r(Re,"class","menu-item svelte-1skuef2"),r(Re,"role","menuitem"),r(Ke,"x","9"),r(Ke,"y","9"),r(Ke,"width","13"),r(Ke,"height","13"),r(Ke,"rx","2"),r(Ke,"ry","2"),r(De,"d","M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"),r(Ce,"width","14"),r(Ce,"height","14"),r(Ce,"viewBox","0 0 24 24"),r(Ce,"fill","none"),r(Ce,"stroke","currentColor"),r(Ce,"stroke-width","2"),r(Ce,"stroke-linecap","round"),r(Ce,"stroke-linejoin","round"),r(Fe,"class","menu-item svelte-1skuef2"),r(Fe,"role","menuitem"),r($,"class","menu-sep svelte-1skuef2"),r(it,"points","3 6 5 6 21 6"),r(ut,"d","M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"),r(Ie,"width","14"),r(Ie,"height","14"),r(Ie,"viewBox","0 0 24 24"),r(Ie,"fill","none"),r(Ie,"stroke","currentColor"),r(Ie,"stroke-width","2"),r(Ie,"stroke-linecap","round"),r(Ie,"stroke-linejoin","round"),r(ge,"class","menu-item menu-item-danger svelte-1skuef2"),r(ge,"role","menuitem"),r(l,"class","menu svelte-1skuef2"),an(l,"left",n[3]+"px"),an(l,"top",n[4]+"px"),an(l,"position","fixed"),r(l,"role","menu"),r(l,"tabindex","-1")},m(pt,yt){C(pt,e,yt),C(pt,t,yt),C(pt,l,yt),a(l,i),a(i,o),a(o,s),a(o,c),a(i,u),a(i,p),a(l,h),a(l,m),a(m,g),a(g,b),a(g,v),a(g,y),a(m,E),a(m,I),a(l,N),a(l,R),a(R,M),a(M,A),a(R,L),a(R,B),a(l,U),a(l,z),a(l,W),a(l,G),a(G,X),a(X,H),a(X,D),a(G,q),a(G,Y),a(l,Z),a(l,J),a(J,te),a(te,ne),a(te,le),a(J,me),a(J,ze),a(l,Ye),a(l,Re),a(Re,ee),a(ee,re),a(ee,Ne),a(ee,Be),a(ee,ve),a(Re,Ue),a(Re,Ae),a(l,Qe),a(l,Fe),a(Fe,Ce),a(Ce,Ke),a(Ce,De),a(Fe,Ze),a(Fe,ue),a(l,ke),a(l,$),a(l,we),a(l,ge),a(ge,Ie),a(Ie,it),a(Ie,ut),a(ge,Xe),a(ge,xe),he||(qe=[O(e,"click",Ve(n[19])),O(i,"click",n[17]),O(m,"click",n[10]),O(R,"click",n[11]),O(G,"click",n[13]),O(J,"click",n[14]),O(Re,"click",n[15]),O(Fe,"click",n[16]),O(ge,"click",n[12]),O(l,"click",Ve(n[28])),O(l,"keydown",n[31])],he=!0)},p(pt,yt){yt[0]&8&&an(l,"left",pt[3]+"px"),yt[0]&16&&an(l,"top",pt[4]+"px")},d(pt){pt&&(S(e),S(t),S(l)),he=!1,Se(qe)}}}function Wg(n){let e,t,l,i,o,s,c=n[0].name+"",u,d,p,h,m,g,b,v,y,E,T,I,N,R,M,A,L,j,B,U,z,W;l=new Kf({props:{kind:n[6],size:22}});let G=!n[7]&&Fg(n);function X(P,Y){return P[7]?Ug:Hg}let D=X(n)(n),q=n[2]&&Xo(n);return{c(){e=f("div"),t=f("div"),Ge(l.$$.fragment),i=w(),o=f("div"),s=f("div"),u=F(c),p=w(),h=f("div"),m=f("span"),m.textContent=`${n[8]}`,g=w(),G&&G.c(),b=w(),v=f("div"),D.c(),y=w(),E=f("button"),T=ae("svg"),I=ae("circle"),N=ae("circle"),R=ae("circle"),M=w(),A=f("button"),A.innerHTML='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path></svg>',j=w(),q&&q.c(),B=_t(),r(t,"class","file-row-icon svelte-1skuef2"),r(s,"class","file-row-name svelte-1skuef2"),r(s,"title",d=n[0].name),r(h,"class","file-row-meta svelte-1skuef2"),r(o,"class","file-row-body svelte-1skuef2"),r(I,"cx","12"),r(I,"cy","5"),r(I,"r","2"),r(N,"cx","12"),r(N,"cy","12"),r(N,"r","2"),r(R,"cx","12"),r(R,"cy","19"),r(R,"r","2"),r(T,"width","16"),r(T,"height","16"),r(T,"viewBox","0 0 24 24"),r(T,"fill","currentColor"),r(E,"class","action-btn svelte-1skuef2"),r(E,"title",k("file.more")),r(E,"aria-label",k("file.more")),r(E,"aria-expanded",n[2]),r(A,"class","action-btn action-btn-danger svelte-1skuef2"),r(A,"title",k("common.delete")),r(A,"aria-label",k("common.delete")),r(v,"class","file-row-actions svelte-1skuef2"),r(e,"class","file-row svelte-1skuef2"),r(e,"role","button"),r(e,"tabindex","0"),r(e,"draggable","true"),r(e,"aria-label",L=n[7]?k("file.ariaFolder")+" "+n[0].name:k("file.ariaFile")+" "+n[0].name),ce(e,"file-row--selected",n[1])},m(P,Y){C(P,e,Y),a(e,t),He(l,t,null),a(e,i),a(e,o),a(o,s),a(s,u),a(o,p),a(o,h),a(h,m),a(h,g),G&&G.m(h,null),a(e,b),a(e,v),D.m(v,null),a(v,y),a(v,E),a(E,T),a(T,I),a(T,N),a(T,R),a(v,M),a(v,A),C(P,j,Y),q&&q.m(P,Y),C(P,B,Y),U=!0,z||(W=[O(Bg,"click",n[19]),O(E,"click",Ve(n[18])),O(A,"click",Ve(n[12])),O(e,"click",n[9]),O(e,"keydown",n[24]),O(e,"contextmenu",n[23]),O(e,"dragstart",n[20]),O(e,"dragover",n[21]),O(e,"drop",n[22])],z=!0)},p(P,Y){(!U||Y[0]&1)&&c!==(c=P[0].name+"")&&Q(u,c),(!U||Y[0]&1&&d!==(d=P[0].name))&&r(s,"title",d),P[7]||G.p(P,Y),D.p(P,Y),(!U||Y[0]&4)&&r(E,"aria-expanded",P[2]),(!U||Y[0]&1&&L!==(L=P[7]?k("file.ariaFolder")+" "+P[0].name:k("file.ariaFile")+" "+P[0].name))&&r(e,"aria-label",L),(!U||Y[0]&2)&&ce(e,"file-row--selected",P[1]),P[2]?q?q.p(P,Y):(q=Xo(P),q.c(),q.m(B.parentNode,B)):q&&(q.d(1),q=null)},i(P){U||(fe(l.$$.fragment,P),U=!0)},o(P){be(l.$$.fragment,P),U=!1},d(P){P&&(S(e),S(j),S(B)),We(l),G&&G.d(),D.d(),q&&q.d(P),z=!1,Se(W)}}}function Gg(n,e,t){let{item:l}=e,{selected:i=!1}=e,{onDragStart:o}=e,{onDragOver:s}=e,{onDrop:c}=e;const u=bn(),d=Vf(l),p=l.type==="folder",h=jg(l);let m=!1,g=0,b=0,v=null;function y(Y){Y.ctrlKey||Y.metaKey?u("toggleSelect",l.id):Y.shiftKey?u("rangeSelect",l.id):v?(clearTimeout(v),v=null,p?u("navigate",l.id):u("preview",l)):v=setTimeout(()=>{v=null,u("selectOne",l.id)},250)}function E(){u("openExternal",l.fileId)}function T(){t(2,m=!1),u("showInFolder",l.nodeId||l.id)}function I(){t(2,m=!1),u("delete",{id:l.id,type:l.type})}function N(){t(2,m=!1),u("rename",{id:l.id,name:l.name})}function R(){t(2,m=!1),u("duplicate",l.id)}function M(){t(2,m=!1),u("cut",l.id)}function A(){t(2,m=!1),u("copy",l.id)}function L(){t(2,m=!1),p?u("navigate",l.id):u("preview",l)}function j(Y){if(Y){Y.stopPropagation();const Z=Y.currentTarget.getBoundingClientRect();t(3,g=Math.min(Z.right,window.innerWidth-240)),t(4,b=Math.min(Z.bottom,window.innerHeight-320)),console.log("[FileTreeRow] menu source=button x="+g+" y="+b)}t(2,m=!m)}function B(){t(2,m=!1)}function U(Y){o&&o(Y,l.id)}function z(Y){s&&p&&s(Y,l.id)}function W(Y){c&&p&&c(Y,l.id)}function G(Y){Y.preventDefault(),t(3,g=Math.min(Y.clientX,window.innerWidth-240)),t(4,b=Math.min(Y.clientY,window.innerHeight-320)),console.log("[FileTreeRow] menu source=contextmenu x="+g+" y="+b),t(2,m=!0)}function X(Y){(Y.key==="Enter"||Y.key===" ")&&(Y.preventDefault(),y(Y))}function H(Y){js.call(this,n,Y)}const D=()=>u("preview",l),q=()=>u("navigate",l.id),P=Y=>{Y.key==="Escape"&&(Y.stopPropagation(),B())};return n.$$set=Y=>{"item"in Y&&t(0,l=Y.item),"selected"in Y&&t(1,i=Y.selected),"onDragStart"in Y&&t(25,o=Y.onDragStart),"onDragOver"in Y&&t(26,s=Y.onDragOver),"onDrop"in Y&&t(27,c=Y.onDrop)},[l,i,m,g,b,u,d,p,h,y,E,T,I,N,R,M,A,L,j,B,U,z,W,G,X,o,s,c,H,D,q,P]}class Kg extends ct{constructor(e){super(),at(this,e,Gg,Wg,rt,{item:0,selected:1,onDragStart:25,onDragOver:26,onDrop:27},null,[-1,-1])}}function Jo(n,e,t){const l=n.slice();return l[4]=e[t],l[6]=t,l}function Vg(n){let e;return{c(){e=f("span"),e.textContent="/",r(e,"class","sep svelte-csi2lb")},m(t,l){C(t,e,l)},d(t){t&&S(e)}}}function Zg(n){let e,t=n[4].name+"",l,i,o;function s(){return n[2](n[6])}return{c(){e=f("button"),l=F(t),r(e,"class","crumb crumb--link svelte-csi2lb")},m(c,u){C(c,e,u),a(e,l),i||(o=O(e,"click",s),i=!0)},p(c,u){n=c,u&1&&t!==(t=n[4].name+"")&&Q(l,t)},d(c){c&&S(e),i=!1,o()}}}function Yg(n){let e,t=n[4].name+"",l;return{c(){e=f("span"),l=F(t),r(e,"class","crumb crumb--current svelte-csi2lb")},m(i,o){C(i,e,o),a(e,l)},p(i,o){o&1&&t!==(t=i[4].name+"")&&Q(l,t)},d(i){i&&S(e)}}}function Qo(n){let e,t,l=n[6]>0&&Vg();function i(c,u){return c[6]===c[0].length-1?Yg:Zg}let o=i(n),s=o(n);return{c(){l&&l.c(),e=w(),s.c(),t=_t()},m(c,u){l&&l.m(c,u),C(c,e,u),s.m(c,u),C(c,t,u)},p(c,u){o===(o=i(c))&&s?s.p(c,u):(s.d(1),s=o(c),s&&(s.c(),s.m(t.parentNode,t)))},d(c){c&&(S(e),S(t)),l&&l.d(c),s.d(c)}}}function Xg(n){let e,t=Te(n[0]),l=[];for(let i=0;i<t.length;i+=1)l[i]=Qo(Jo(n,t,i));return{c(){e=f("nav");for(let i=0;i<l.length;i+=1)l[i].c();r(e,"class","breadcrumbs svelte-csi2lb")},m(i,o){C(i,e,o);for(let s=0;s<l.length;s+=1)l[s]&&l[s].m(e,null)},p(i,[o]){if(o&3){t=Te(i[0]);let s;for(s=0;s<t.length;s+=1){const c=Jo(i,t,s);l[s]?l[s].p(c,o):(l[s]=Qo(c),l[s].c(),l[s].m(e,null))}for(;s<l.length;s+=1)l[s].d(1);l.length=t.length}},i:ie,o:ie,d(i){i&&S(e),tt(l,i)}}}function Jg(n,e,t){let{crumbs:l=[]}=e;const i=bn();function o(c){i("navigate",c)}const s=c=>o(c);return n.$$set=c=>{"crumbs"in c&&t(0,l=c.crumbs)},[l,o,s]}class td extends ct{constructor(e){super(),at(this,e,Jg,Xg,rt,{crumbs:0})}}function zs(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Sl=zs();function nd(n){Sl=n}var _l={exec:()=>null};function Dl(n){let e=[];return t=>{let l=Math.max(0,Math.min(3,t-1)),i=e[l];return i||(i=n(l),e[l]=i),i}}function ot(n,e=""){let t=typeof n=="string"?n:n.source,l={replace:(i,o)=>{let s=typeof o=="string"?o:o.source;return s=s.replace(Vt.caret,"$1"),t=t.replace(i,s),l},getRegex:()=>new RegExp(t,e)};return l}var Qg=((n="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+n)}catch{return!1}})(),Vt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:n=>new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Dl(n=>new RegExp(`^ {0,${n}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Dl(n=>new RegExp(`^ {0,${n}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:Dl(n=>new RegExp(`^ {0,${n}}(?:\`\`\`|~~~)`)),headingBeginRegex:Dl(n=>new RegExp(`^ {0,${n}}#`)),htmlBeginRegex:Dl(n=>new RegExp(`^ {0,${n}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:Dl(n=>new RegExp(`^ {0,${n}}>`))},xg=/^(?:[ \t]*(?:\n|$))+/,$g=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,e_=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,fi=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,t_=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Bs=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,ld=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,id=ot(ld).replace(/bull/g,Bs).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),n_=ot(ld).replace(/bull/g,Bs).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Fs=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,l_=/^[^\n]+/,Us=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,i_=ot(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Us).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),s_=ot(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Bs).getRegex(),Gi="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Hs=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,o_=ot("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Hs).replace("tag",Gi).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),sd=ot(Fs).replace("hr",fi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Gi).getRegex(),r_=ot(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",sd).getRegex(),Ws={blockquote:r_,code:$g,def:i_,fences:e_,heading:t_,hr:fi,html:o_,lheading:id,list:s_,newline:xg,paragraph:sd,table:_l,text:l_},xo=ot("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",fi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Gi).getRegex(),a_={...Ws,lheading:n_,table:xo,paragraph:ot(Fs).replace("hr",fi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",xo).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Gi).getRegex()},c_={...Ws,html:ot(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Hs).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:_l,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ot(Fs).replace("hr",fi).replace("heading",` *#{1,6} *[^
|
||
]`).replace("lheading",id).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},u_=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,f_=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,od=/^( {2,}|\\)\n(?!\s*$)/,d_=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Kl=/[\p{P}\p{S}]/u,Ki=/[\s\p{P}\p{S}]/u,Gs=/[^\s\p{P}\p{S}]/u,p_=ot(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ki).getRegex(),rd=/(?!~)[\p{P}\p{S}]/u,h_=/(?!~)[\s\p{P}\p{S}]/u,m_=/(?:[^\s\p{P}\p{S}]|~)/u,g_=ot(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Qg?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ad=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,__=ot(ad,"u").replace(/punct/g,Kl).getRegex(),b_=ot(ad,"u").replace(/punct/g,rd).getRegex(),cd="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",k_=ot(cd,"gu").replace(/notPunctSpace/g,Gs).replace(/punctSpace/g,Ki).replace(/punct/g,Kl).getRegex(),v_=ot(cd,"gu").replace(/notPunctSpace/g,m_).replace(/punctSpace/g,h_).replace(/punct/g,rd).getRegex(),w_=ot("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Gs).replace(/punctSpace/g,Ki).replace(/punct/g,Kl).getRegex(),y_=ot(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Kl).getRegex(),E_="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",T_=ot(E_,"gu").replace(/notPunctSpace/g,Gs).replace(/punctSpace/g,Ki).replace(/punct/g,Kl).getRegex(),S_=ot(/\\(punct)/,"gu").replace(/punct/g,Kl).getRegex(),C_=ot(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),A_=ot(Hs).replace("(?:-->|$)","-->").getRegex(),N_=ot("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",A_).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),qi=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,I_=ot(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",qi).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ud=ot(/^!?\[(label)\]\[(ref)\]/).replace("label",qi).replace("ref",Us).getRegex(),fd=ot(/^!?\[(ref)\](?:\[\])?/).replace("ref",Us).getRegex(),R_=ot("reflink|nolink(?!\\()","g").replace("reflink",ud).replace("nolink",fd).getRegex(),$o=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ks={_backpedal:_l,anyPunctuation:S_,autolink:C_,blockSkip:g_,br:od,code:f_,del:_l,delLDelim:_l,delRDelim:_l,emStrongLDelim:__,emStrongRDelimAst:k_,emStrongRDelimUnd:w_,escape:u_,link:I_,nolink:fd,punctuation:p_,reflink:ud,reflinkSearch:R_,tag:N_,text:d_,url:_l},M_={...Ks,link:ot(/^!?\[(label)\]\((.*?)\)/).replace("label",qi).getRegex(),reflink:ot(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",qi).getRegex()},Is={...Ks,emStrongRDelimAst:v_,emStrongLDelim:b_,delLDelim:y_,delRDelim:T_,url:ot(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",$o).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:ot(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",$o).getRegex()},L_={...Is,br:ot(od).replace("{2,}","*").getRegex(),text:ot(Is.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ei={normal:Ws,gfm:a_,pedantic:c_},Jl={normal:Ks,gfm:Is,breaks:L_,pedantic:M_},O_={"&":"&","<":"<",">":">",'"':""","'":"'"},er=n=>O_[n];function Mn(n,e){if(e){if(Vt.escapeTest.test(n))return n.replace(Vt.escapeReplace,er)}else if(Vt.escapeTestNoEncode.test(n))return n.replace(Vt.escapeReplaceNoEncode,er);return n}function tr(n){try{n=encodeURI(n).replace(Vt.percentDecode,"%")}catch{return null}return n}function nr(n,e){var o;let t=n.replace(Vt.findPipe,(s,c,u)=>{let d=!1,p=c;for(;--p>=0&&u[p]==="\\";)d=!d;return d?"|":" |"}),l=t.split(Vt.splitPipe),i=0;if(l[0].trim()||l.shift(),l.length>0&&!((o=l.at(-1))!=null&&o.trim())&&l.pop(),e)if(l.length>e)l.splice(e);else for(;l.length<e;)l.push("");for(;i<l.length;i++)l[i]=l[i].trim().replace(Vt.slashPipe,"|");return l}function Yn(n,e,t){let l=n.length;if(l===0)return"";let i=0;for(;i<l&&n.charAt(l-i-1)===e;)i++;return n.slice(0,l-i)}function lr(n){let e=n.split(`
|
||
`),t=e.length-1;for(;t>=0&&Vt.blankLine.test(e[t]);)t--;return e.length-t<=2?n:e.slice(0,t+1).join(`
|
||
`)}function D_(n,e){if(n.indexOf(e[1])===-1)return-1;let t=0;for(let l=0;l<n.length;l++)if(n[l]==="\\")l++;else if(n[l]===e[0])t++;else if(n[l]===e[1]&&(t--,t<0))return l;return t>0?-2:-1}function P_(n,e=0){let t=e,l="";for(let i of n)if(i===" "){let o=4-t%4;l+=" ".repeat(o),t+=o}else l+=i,t++;return l}function ir(n,e,t,l,i){let o=e.href,s=e.title||null,c=n[1].replace(i.other.outputLinkReplace,"$1");l.state.inLink=!0;let u={type:n[0].charAt(0)==="!"?"image":"link",raw:t,href:o,title:s,text:c,tokens:l.inlineTokens(c)};return l.state.inLink=!1,u}function q_(n,e,t){let l=n.match(t.other.indentCodeCompensation);if(l===null)return e;let i=l[1];return e.split(`
|
||
`).map(o=>{let s=o.match(t.other.beginningSpace);if(s===null)return o;let[c]=s;return c.length>=i.length?o.slice(i.length):o}).join(`
|
||
`)}var ji=class{constructor(n){lt(this,"options");lt(this,"rules");lt(this,"lexer");this.options=n||Sl}space(n){let e=this.rules.block.newline.exec(n);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(n){let e=this.rules.block.code.exec(n);if(e){let t=this.options.pedantic?e[0]:lr(e[0]),l=t.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t,codeBlockStyle:"indented",text:l}}}fences(n){let e=this.rules.block.fences.exec(n);if(e){let t=e[0],l=q_(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:l}}}heading(n){let e=this.rules.block.heading.exec(n);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let l=Yn(t,"#");(this.options.pedantic||!l||this.rules.other.endingSpaceChar.test(l))&&(t=l.trim())}return{type:"heading",raw:Yn(e[0],`
|
||
`),depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(n){let e=this.rules.block.hr.exec(n);if(e)return{type:"hr",raw:Yn(e[0],`
|
||
`)}}blockquote(n){let e=this.rules.block.blockquote.exec(n);if(e){let t=Yn(e[0],`
|
||
`).split(`
|
||
`),l="",i="",o=[];for(;t.length>0;){let s=!1,c=[],u;for(u=0;u<t.length;u++)if(this.rules.other.blockquoteStart.test(t[u]))c.push(t[u]),s=!0;else if(!s)c.push(t[u]);else break;t=t.slice(u);let d=c.join(`
|
||
`),p=d.replace(this.rules.other.blockquoteSetextReplace,`
|
||
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");l=l?`${l}
|
||
${d}`:d,i=i?`${i}
|
||
${p}`:p;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(p,o,!0),this.lexer.state.top=h,t.length===0)break;let m=o.at(-1);if((m==null?void 0:m.type)==="code")break;if((m==null?void 0:m.type)==="blockquote"){let g=m,b=g.raw+`
|
||
`+t.join(`
|
||
`),v=this.blockquote(b);o[o.length-1]=v,l=l.substring(0,l.length-g.raw.length)+v.raw,i=i.substring(0,i.length-g.text.length)+v.text;break}else if((m==null?void 0:m.type)==="list"){let g=m,b=g.raw+`
|
||
`+t.join(`
|
||
`),v=this.list(b);o[o.length-1]=v,l=l.substring(0,l.length-m.raw.length)+v.raw,i=i.substring(0,i.length-g.raw.length)+v.raw,t=b.substring(o.at(-1).raw.length).split(`
|
||
`);continue}}return{type:"blockquote",raw:l,tokens:o,text:i}}}list(n){let e=this.rules.block.list.exec(n);if(e){let t=e[1].trim(),l=t.length>1,i={type:"list",raw:"",ordered:l,start:l?+t.slice(0,-1):"",loose:!1,items:[]};t=l?`\\d{1,9}\\${t.slice(-1)}`:`\\${t}`,this.options.pedantic&&(t=l?t:"[*+-]");let o=this.rules.other.listItemRegex(t),s=!1;for(;n;){let u=!1,d="",p="";if(!(e=o.exec(n))||this.rules.block.hr.test(n))break;d=e[0],n=n.substring(d.length);let h=P_(e[2].split(`
|
||
`,1)[0],e[1].length),m=n.split(`
|
||
`,1)[0],g=!h.trim(),b=0;if(this.options.pedantic?(b=2,p=h.trimStart()):g?b=e[1].length+1:(b=h.search(this.rules.other.nonSpaceChar),b=b>4?1:b,p=h.slice(b),b+=e[1].length),g&&this.rules.other.blankLine.test(m)&&(d+=m+`
|
||
`,n=n.substring(m.length+1),u=!0),!u){let v=this.rules.other.nextBulletRegex(b),y=this.rules.other.hrRegex(b),E=this.rules.other.fencesBeginRegex(b),T=this.rules.other.headingBeginRegex(b),I=this.rules.other.htmlBeginRegex(b),N=this.rules.other.blockquoteBeginRegex(b);for(;n;){let R=n.split(`
|
||
`,1)[0],M;if(m=R,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),M=m):M=m.replace(this.rules.other.tabCharGlobal," "),E.test(m)||T.test(m)||I.test(m)||N.test(m)||v.test(m)||y.test(m))break;if(M.search(this.rules.other.nonSpaceChar)>=b||!m.trim())p+=`
|
||
`+M.slice(b);else{if(g||h.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||E.test(h)||T.test(h)||y.test(h))break;p+=`
|
||
`+m}g=!m.trim(),d+=R+`
|
||
`,n=n.substring(R.length+1),h=M.slice(b)}}i.loose||(s?i.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(s=!0)),i.items.push({type:"list_item",raw:d,task:!!this.options.gfm&&this.rules.other.listIsTask.test(p),loose:!1,text:p,tokens:[]}),i.raw+=d}let c=i.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let u of i.items){this.lexer.state.top=!1,u.tokens=this.lexer.blockTokens(u.text,[]);let d=u.tokens[0];if(u.task&&((d==null?void 0:d.type)==="text"||(d==null?void 0:d.type)==="paragraph")){u.text=u.text.replace(this.rules.other.listReplaceTask,""),d.raw=d.raw.replace(this.rules.other.listReplaceTask,""),d.text=d.text.replace(this.rules.other.listReplaceTask,"");for(let h=this.lexer.inlineQueue.length-1;h>=0;h--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[h].src)){this.lexer.inlineQueue[h].src=this.lexer.inlineQueue[h].src.replace(this.rules.other.listReplaceTask,"");break}let p=this.rules.other.listTaskCheckbox.exec(u.raw);if(p){let h={type:"checkbox",raw:p[0]+" ",checked:p[0]!=="[ ]"};u.checked=h.checked,i.loose?u.tokens[0]&&["paragraph","text"].includes(u.tokens[0].type)&&"tokens"in u.tokens[0]&&u.tokens[0].tokens?(u.tokens[0].raw=h.raw+u.tokens[0].raw,u.tokens[0].text=h.raw+u.tokens[0].text,u.tokens[0].tokens.unshift(h)):u.tokens.unshift({type:"paragraph",raw:h.raw,text:h.raw,tokens:[h]}):u.tokens.unshift(h)}}else u.task&&(u.task=!1);if(!i.loose){let p=u.tokens.filter(m=>m.type==="space"),h=p.length>0&&p.some(m=>this.rules.other.anyLine.test(m.raw));i.loose=h}}if(i.loose)for(let u of i.items){u.loose=!0;for(let d of u.tokens)d.type==="text"&&(d.type="paragraph")}return i}}html(n){let e=this.rules.block.html.exec(n);if(e){let t=lr(e[0]);return{type:"html",block:!0,raw:t,pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:t}}}def(n){let e=this.rules.block.def.exec(n);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),l=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:Yn(e[0],`
|
||
`),href:l,title:i}}}table(n){var s;let e=this.rules.block.table.exec(n);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let t=nr(e[1]),l=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=(s=e[3])!=null&&s.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
||
`):[],o={type:"table",raw:Yn(e[0],`
|
||
`),header:[],align:[],rows:[]};if(t.length===l.length){for(let c of l)this.rules.other.tableAlignRight.test(c)?o.align.push("right"):this.rules.other.tableAlignCenter.test(c)?o.align.push("center"):this.rules.other.tableAlignLeft.test(c)?o.align.push("left"):o.align.push(null);for(let c=0;c<t.length;c++)o.header.push({text:t[c],tokens:this.lexer.inline(t[c]),header:!0,align:o.align[c]});for(let c of i)o.rows.push(nr(c,o.header.length).map((u,d)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:o.align[d]})));return o}}lheading(n){let e=this.rules.block.lheading.exec(n);if(e){let t=e[1].trim();return{type:"heading",raw:Yn(e[0],`
|
||
`),depth:e[2].charAt(0)==="="?1:2,text:t,tokens:this.lexer.inline(t)}}}paragraph(n){let e=this.rules.block.paragraph.exec(n);if(e){let t=e[1].charAt(e[1].length-1)===`
|
||
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(n){let e=this.rules.block.text.exec(n);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(n){let e=this.rules.inline.escape.exec(n);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(n){let e=this.rules.inline.tag.exec(n);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(n){let e=this.rules.inline.link.exec(n);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let o=Yn(t.slice(0,-1),"\\");if((t.length-o.length)%2===0)return}else{let o=D_(e[2],"()");if(o===-2)return;if(o>-1){let s=(e[0].indexOf("!")===0?5:4)+e[1].length+o;e[2]=e[2].substring(0,o),e[0]=e[0].substring(0,s).trim(),e[3]=""}}let l=e[2],i="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(l);o&&(l=o[1],i=o[3])}else i=e[3]?e[3].slice(1,-1):"";return l=l.trim(),this.rules.other.startAngleBracket.test(l)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?l=l.slice(1):l=l.slice(1,-1)),ir(e,{href:l&&l.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(n,e){let t;if((t=this.rules.inline.reflink.exec(n))||(t=this.rules.inline.nolink.exec(n))){let l=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=e[l.toLowerCase()];if(!i){let o=t[0].charAt(0);return{type:"text",raw:o,text:o}}return ir(t,i,t[0],this.lexer,this.rules)}}emStrong(n,e,t=""){let l=this.rules.inline.emStrongLDelim.exec(n);if(!(!l||!l[1]&&!l[2]&&!l[3]&&!l[4]||l[4]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!(l[1]||l[3])||!t||this.rules.inline.punctuation.exec(t))){let i=[...l[0]].length-1,o,s,c=i,u=0,d=l[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,e=e.slice(-1*n.length+i);(l=d.exec(e))!==null;){if(o=l[1]||l[2]||l[3]||l[4]||l[5]||l[6],!o)continue;if(s=[...o].length,l[3]||l[4]){c+=s;continue}else if((l[5]||l[6])&&i%3&&!((i+s)%3)){u+=s;continue}if(c-=s,c>0)continue;s=Math.min(s,s+c+u);let p=[...l[0]][0].length,h=n.slice(0,i+l.index+p+s);if(Math.min(i,s)%2){let g=h.slice(1,-1);return{type:"em",raw:h,text:g,tokens:this.lexer.inlineTokens(g)}}let m=h.slice(2,-2);return{type:"strong",raw:h,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(n){let e=this.rules.inline.code.exec(n);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),l=this.rules.other.nonSpaceChar.test(t),i=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return l&&i&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(n){let e=this.rules.inline.br.exec(n);if(e)return{type:"br",raw:e[0]}}del(n,e,t=""){let l=this.rules.inline.delLDelim.exec(n);if(l&&(!l[1]||!t||this.rules.inline.punctuation.exec(t))){let i=[...l[0]].length-1,o,s,c=i,u=this.rules.inline.delRDelim;for(u.lastIndex=0,e=e.slice(-1*n.length+i);(l=u.exec(e))!==null;){if(o=l[1]||l[2]||l[3]||l[4]||l[5]||l[6],!o||(s=[...o].length,s!==i))continue;if(l[3]||l[4]){c+=s;continue}if(c-=s,c>0)continue;s=Math.min(s,s+c);let d=[...l[0]][0].length,p=n.slice(0,i+l.index+d+s),h=p.slice(i,-i);return{type:"del",raw:p,text:h,tokens:this.lexer.inlineTokens(h)}}}}autolink(n){let e=this.rules.inline.autolink.exec(n);if(e){let t,l;return e[2]==="@"?(t=e[1],l="mailto:"+t):(t=e[1],l=t),{type:"link",raw:e[0],text:t,href:l,tokens:[{type:"text",raw:t,text:t}]}}}url(n){var t;let e;if(e=this.rules.inline.url.exec(n)){let l,i;if(e[2]==="@")l=e[0],i="mailto:"+l;else{let o;do o=e[0],e[0]=((t=this.rules.inline._backpedal.exec(e[0]))==null?void 0:t[0])??"";while(o!==e[0]);l=e[0],e[1]==="www."?i="http://"+e[0]:i=e[0]}return{type:"link",raw:e[0],text:l,href:i,tokens:[{type:"text",raw:l,text:l}]}}}inlineText(n){let e=this.rules.inline.text.exec(n);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},En=class Rs{constructor(e){lt(this,"tokens");lt(this,"options");lt(this,"state");lt(this,"inlineQueue");lt(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Sl,this.options.tokenizer=this.options.tokenizer||new ji,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:Vt,block:Ei.normal,inline:Jl.normal};this.options.pedantic?(t.block=Ei.pedantic,t.inline=Jl.pedantic):this.options.gfm&&(t.block=Ei.gfm,this.options.breaks?t.inline=Jl.breaks:t.inline=Jl.gfm),this.tokenizer.rules=t}static get rules(){return{block:Ei,inline:Jl}}static lex(e,t){return new Rs(t).lex(e)}static lexInline(e,t){return new Rs(t).inlineTokens(e)}lex(e){e=e.replace(Vt.carriageReturn,`
|
||
`),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let l=this.inlineQueue[t];this.inlineTokens(l.src,l.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],l=!1){var o,s,c;this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(Vt.tabCharGlobal," ").replace(Vt.spaceLine,""));let i=1/0;for(;e;){if(e.length<i)i=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let u;if((s=(o=this.options.extensions)==null?void 0:o.block)!=null&&s.some(p=>(u=p.call({lexer:this},e,t))?(e=e.substring(u.raw.length),t.push(u),!0):!1))continue;if(u=this.tokenizer.space(e)){e=e.substring(u.raw.length);let p=t.at(-1);u.raw.length===1&&p!==void 0?p.raw+=`
|
||
`:t.push(u);continue}if(u=this.tokenizer.code(e)){e=e.substring(u.raw.length);let p=t.at(-1);(p==null?void 0:p.type)==="paragraph"||(p==null?void 0:p.type)==="text"?(p.raw+=(p.raw.endsWith(`
|
||
`)?"":`
|
||
`)+u.raw,p.text+=`
|
||
`+u.text,this.inlineQueue.at(-1).src=p.text):t.push(u);continue}if(u=this.tokenizer.fences(e)){e=e.substring(u.raw.length),t.push(u);continue}if(u=this.tokenizer.heading(e)){e=e.substring(u.raw.length),t.push(u);continue}if(u=this.tokenizer.hr(e)){e=e.substring(u.raw.length),t.push(u);continue}if(u=this.tokenizer.blockquote(e)){e=e.substring(u.raw.length),t.push(u);continue}if(u=this.tokenizer.list(e)){e=e.substring(u.raw.length),t.push(u);continue}if(u=this.tokenizer.html(e)){e=e.substring(u.raw.length),t.push(u);continue}if(u=this.tokenizer.def(e)){e=e.substring(u.raw.length);let p=t.at(-1);(p==null?void 0:p.type)==="paragraph"||(p==null?void 0:p.type)==="text"?(p.raw+=(p.raw.endsWith(`
|
||
`)?"":`
|
||
`)+u.raw,p.text+=`
|
||
`+u.raw,this.inlineQueue.at(-1).src=p.text):this.tokens.links[u.tag]||(this.tokens.links[u.tag]={href:u.href,title:u.title},t.push(u));continue}if(u=this.tokenizer.table(e)){e=e.substring(u.raw.length),t.push(u);continue}if(u=this.tokenizer.lheading(e)){e=e.substring(u.raw.length),t.push(u);continue}let d=e;if((c=this.options.extensions)!=null&&c.startBlock){let p=1/0,h=e.slice(1),m;this.options.extensions.startBlock.forEach(g=>{m=g.call({lexer:this},h),typeof m=="number"&&m>=0&&(p=Math.min(p,m))}),p<1/0&&p>=0&&(d=e.substring(0,p+1))}if(this.state.top&&(u=this.tokenizer.paragraph(d))){let p=t.at(-1);l&&(p==null?void 0:p.type)==="paragraph"?(p.raw+=(p.raw.endsWith(`
|
||
`)?"":`
|
||
`)+u.raw,p.text+=`
|
||
`+u.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=p.text):t.push(u),l=d.length!==e.length,e=e.substring(u.raw.length);continue}if(u=this.tokenizer.text(e)){e=e.substring(u.raw.length);let p=t.at(-1);(p==null?void 0:p.type)==="text"?(p.raw+=(p.raw.endsWith(`
|
||
`)?"":`
|
||
`)+u.raw,p.text+=`
|
||
`+u.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=p.text):t.push(u);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){var d,p,h,m,g;this.tokenizer.lexer=this;let l=e,i=null;if(this.tokens.links){let b=Object.keys(this.tokens.links);if(b.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(l))!==null;)b.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(l))!==null;)l=l.slice(0,i.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let o;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(l))!==null;)o=i[2]?i[2].length:0,l=l.slice(0,i.index+o)+"["+"a".repeat(i[0].length-o-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);l=((p=(d=this.options.hooks)==null?void 0:d.emStrongMask)==null?void 0:p.call({lexer:this},l))??l;let s=!1,c="",u=1/0;for(;e;){if(e.length<u)u=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}s||(c=""),s=!1;let b;if((m=(h=this.options.extensions)==null?void 0:h.inline)!=null&&m.some(y=>(b=y.call({lexer:this},e,t))?(e=e.substring(b.raw.length),t.push(b),!0):!1))continue;if(b=this.tokenizer.escape(e)){e=e.substring(b.raw.length),t.push(b);continue}if(b=this.tokenizer.tag(e)){e=e.substring(b.raw.length),t.push(b);continue}if(b=this.tokenizer.link(e)){e=e.substring(b.raw.length),t.push(b);continue}if(b=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(b.raw.length);let y=t.at(-1);b.type==="text"&&(y==null?void 0:y.type)==="text"?(y.raw+=b.raw,y.text+=b.text):t.push(b);continue}if(b=this.tokenizer.emStrong(e,l,c)){e=e.substring(b.raw.length),t.push(b);continue}if(b=this.tokenizer.codespan(e)){e=e.substring(b.raw.length),t.push(b);continue}if(b=this.tokenizer.br(e)){e=e.substring(b.raw.length),t.push(b);continue}if(b=this.tokenizer.del(e,l,c)){e=e.substring(b.raw.length),t.push(b);continue}if(b=this.tokenizer.autolink(e)){e=e.substring(b.raw.length),t.push(b);continue}if(!this.state.inLink&&(b=this.tokenizer.url(e))){e=e.substring(b.raw.length),t.push(b);continue}let v=e;if((g=this.options.extensions)!=null&&g.startInline){let y=1/0,E=e.slice(1),T;this.options.extensions.startInline.forEach(I=>{T=I.call({lexer:this},E),typeof T=="number"&&T>=0&&(y=Math.min(y,T))}),y<1/0&&y>=0&&(v=e.substring(0,y+1))}if(b=this.tokenizer.inlineText(v)){e=e.substring(b.raw.length),b.raw.slice(-1)!=="_"&&(c=b.raw.slice(-1)),s=!0;let y=t.at(-1);(y==null?void 0:y.type)==="text"?(y.raw+=b.raw,y.text+=b.text):t.push(b);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}infiniteLoopError(e){let t="Infinite loop on byte: "+e;if(this.options.silent)console.error(t);else throw new Error(t)}},zi=class{constructor(n){lt(this,"options");lt(this,"parser");this.options=n||Sl}space(n){return""}code({text:n,lang:e,escaped:t}){var o;let l=(o=(e||"").match(Vt.notSpaceStart))==null?void 0:o[0],i=n.replace(Vt.endingNewline,"")+`
|
||
`;return l?'<pre><code class="language-'+Mn(l)+'">'+(t?i:Mn(i,!0))+`</code></pre>
|
||
`:"<pre><code>"+(t?i:Mn(i,!0))+`</code></pre>
|
||
`}blockquote({tokens:n}){return`<blockquote>
|
||
${this.parser.parse(n)}</blockquote>
|
||
`}html({text:n}){return n}def(n){return""}heading({tokens:n,depth:e}){return`<h${e}>${this.parser.parseInline(n)}</h${e}>
|
||
`}hr(n){return`<hr>
|
||
`}list(n){let e=n.ordered,t=n.start,l="";for(let s=0;s<n.items.length;s++){let c=n.items[s];l+=this.listitem(c)}let i=e?"ol":"ul",o=e&&t!==1?' start="'+t+'"':"";return"<"+i+o+`>
|
||
`+l+"</"+i+`>
|
||
`}listitem(n){return`<li>${this.parser.parse(n.tokens)}</li>
|
||
`}checkbox({checked:n}){return"<input "+(n?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:n}){return`<p>${this.parser.parseInline(n)}</p>
|
||
`}table(n){let e="",t="";for(let i=0;i<n.header.length;i++)t+=this.tablecell(n.header[i]);e+=this.tablerow({text:t});let l="";for(let i=0;i<n.rows.length;i++){let o=n.rows[i];t="";for(let s=0;s<o.length;s++)t+=this.tablecell(o[s]);l+=this.tablerow({text:t})}return l&&(l=`<tbody>${l}</tbody>`),`<table>
|
||
<thead>
|
||
`+e+`</thead>
|
||
`+l+`</table>
|
||
`}tablerow({text:n}){return`<tr>
|
||
${n}</tr>
|
||
`}tablecell(n){let e=this.parser.parseInline(n.tokens),t=n.header?"th":"td";return(n.align?`<${t} align="${n.align}">`:`<${t}>`)+e+`</${t}>
|
||
`}strong({tokens:n}){return`<strong>${this.parser.parseInline(n)}</strong>`}em({tokens:n}){return`<em>${this.parser.parseInline(n)}</em>`}codespan({text:n}){return`<code>${Mn(n,!0)}</code>`}br(n){return"<br>"}del({tokens:n}){return`<del>${this.parser.parseInline(n)}</del>`}link({href:n,title:e,tokens:t}){let l=this.parser.parseInline(t),i=tr(n);if(i===null)return l;n=i;let o='<a href="'+n+'"';return e&&(o+=' title="'+Mn(e)+'"'),o+=">"+l+"</a>",o}image({href:n,title:e,text:t,tokens:l}){l&&(t=this.parser.parseInline(l,this.parser.textRenderer));let i=tr(n);if(i===null)return Mn(t);n=i;let o=`<img src="${n}" alt="${Mn(t)}"`;return e&&(o+=` title="${Mn(e)}"`),o+=">",o}text(n){return"tokens"in n&&n.tokens?this.parser.parseInline(n.tokens):"escaped"in n&&n.escaped?n.text:Mn(n.text)}},Vs=class{strong({text:n}){return n}em({text:n}){return n}codespan({text:n}){return n}del({text:n}){return n}html({text:n}){return n}text({text:n}){return n}link({text:n}){return""+n}image({text:n}){return""+n}br(){return""}checkbox({raw:n}){return n}},Tn=class Ms{constructor(e){lt(this,"options");lt(this,"renderer");lt(this,"textRenderer");this.options=e||Sl,this.options.renderer=this.options.renderer||new zi,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Vs}static parse(e,t){return new Ms(t).parse(e)}static parseInline(e,t){return new Ms(t).parseInline(e)}parse(e){var l,i;this.renderer.parser=this;let t="";for(let o=0;o<e.length;o++){let s=e[o];if((i=(l=this.options.extensions)==null?void 0:l.renderers)!=null&&i[s.type]){let u=s,d=this.options.extensions.renderers[u.type].call({parser:this},u);if(d!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(u.type)){t+=d||"";continue}}let c=s;switch(c.type){case"space":{t+=this.renderer.space(c);break}case"hr":{t+=this.renderer.hr(c);break}case"heading":{t+=this.renderer.heading(c);break}case"code":{t+=this.renderer.code(c);break}case"table":{t+=this.renderer.table(c);break}case"blockquote":{t+=this.renderer.blockquote(c);break}case"list":{t+=this.renderer.list(c);break}case"checkbox":{t+=this.renderer.checkbox(c);break}case"html":{t+=this.renderer.html(c);break}case"def":{t+=this.renderer.def(c);break}case"paragraph":{t+=this.renderer.paragraph(c);break}case"text":{t+=this.renderer.text(c);break}default:{let u='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return t}parseInline(e,t=this.renderer){var i,o;this.renderer.parser=this;let l="";for(let s=0;s<e.length;s++){let c=e[s];if((o=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&o[c.type]){let d=this.options.extensions.renderers[c.type].call({parser:this},c);if(d!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(c.type)){l+=d||"";continue}}let u=c;switch(u.type){case"escape":{l+=t.text(u);break}case"html":{l+=t.html(u);break}case"link":{l+=t.link(u);break}case"image":{l+=t.image(u);break}case"checkbox":{l+=t.checkbox(u);break}case"strong":{l+=t.strong(u);break}case"em":{l+=t.em(u);break}case"codespan":{l+=t.codespan(u);break}case"br":{l+=t.br(u);break}case"del":{l+=t.del(u);break}case"text":{l+=t.text(u);break}default:{let d='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return l}},Ii,ei=(Ii=class{constructor(n){lt(this,"options");lt(this,"block");this.options=n||Sl}preprocess(n){return n}postprocess(n){return n}processAllTokens(n){return n}emStrongMask(n){return n}provideLexer(n=this.block){return n?En.lex:En.lexInline}provideParser(n=this.block){return n?Tn.parse:Tn.parseInline}},lt(Ii,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),lt(Ii,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Ii),j_=class{constructor(...n){lt(this,"defaults",zs());lt(this,"options",this.setOptions);lt(this,"parse",this.parseMarkdown(!0));lt(this,"parseInline",this.parseMarkdown(!1));lt(this,"Parser",Tn);lt(this,"Renderer",zi);lt(this,"TextRenderer",Vs);lt(this,"Lexer",En);lt(this,"Tokenizer",ji);lt(this,"Hooks",ei);this.use(...n)}walkTokens(n,e){var l,i;let t=[];for(let o of n)switch(t=t.concat(e.call(this,o)),o.type){case"table":{let s=o;for(let c of s.header)t=t.concat(this.walkTokens(c.tokens,e));for(let c of s.rows)for(let u of c)t=t.concat(this.walkTokens(u.tokens,e));break}case"list":{let s=o;t=t.concat(this.walkTokens(s.items,e));break}default:{let s=o;(i=(l=this.defaults.extensions)==null?void 0:l.childTokens)!=null&&i[s.type]?this.defaults.extensions.childTokens[s.type].forEach(c=>{let u=s[c].flat(1/0);t=t.concat(this.walkTokens(u,e))}):s.tokens&&(t=t.concat(this.walkTokens(s.tokens,e)))}}return t}use(...n){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return n.forEach(t=>{let l={...t};if(l.async=this.defaults.async||l.async||!1,t.extensions&&(t.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let o=e.renderers[i.name];o?e.renderers[i.name]=function(...s){let c=i.renderer.apply(this,s);return c===!1&&(c=o.apply(this,s)),c}:e.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=e[i.level];o?o.unshift(i.tokenizer):e[i.level]=[i.tokenizer],i.start&&(i.level==="block"?e.startBlock?e.startBlock.push(i.start):e.startBlock=[i.start]:i.level==="inline"&&(e.startInline?e.startInline.push(i.start):e.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(e.childTokens[i.name]=i.childTokens)}),l.extensions=e),t.renderer){let i=this.defaults.renderer||new zi(this.defaults);for(let o in t.renderer){if(!(o in i))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let s=o,c=t.renderer[s],u=i[s];i[s]=(...d)=>{let p=c.apply(i,d);return p===!1&&(p=u.apply(i,d)),p||""}}l.renderer=i}if(t.tokenizer){let i=this.defaults.tokenizer||new ji(this.defaults);for(let o in t.tokenizer){if(!(o in i))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let s=o,c=t.tokenizer[s],u=i[s];i[s]=(...d)=>{let p=c.apply(i,d);return p===!1&&(p=u.apply(i,d)),p}}l.tokenizer=i}if(t.hooks){let i=this.defaults.hooks||new ei;for(let o in t.hooks){if(!(o in i))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let s=o,c=t.hooks[s],u=i[s];ei.passThroughHooks.has(o)?i[s]=d=>{if(this.defaults.async&&ei.passThroughHooksRespectAsync.has(o))return(async()=>{let h=await c.call(i,d);return u.call(i,h)})();let p=c.call(i,d);return u.call(i,p)}:i[s]=(...d)=>{if(this.defaults.async)return(async()=>{let h=await c.apply(i,d);return h===!1&&(h=await u.apply(i,d)),h})();let p=c.apply(i,d);return p===!1&&(p=u.apply(i,d)),p}}l.hooks=i}if(t.walkTokens){let i=this.defaults.walkTokens,o=t.walkTokens;l.walkTokens=function(s){let c=[];return c.push(o.call(this,s)),i&&(c=c.concat(i.call(this,s))),c}}this.defaults={...this.defaults,...l}}),this}setOptions(n){return this.defaults={...this.defaults,...n},this}lexer(n,e){return En.lex(n,e??this.defaults)}parser(n,e){return Tn.parse(n,e??this.defaults)}parseMarkdown(n){return(e,t)=>{let l={...t},i={...this.defaults,...l},o=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&l.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=n),i.async)return(async()=>{let s=i.hooks?await i.hooks.preprocess(e):e,c=await(i.hooks?await i.hooks.provideLexer(n):n?En.lex:En.lexInline)(s,i),u=i.hooks?await i.hooks.processAllTokens(c):c;i.walkTokens&&await Promise.all(this.walkTokens(u,i.walkTokens));let d=await(i.hooks?await i.hooks.provideParser(n):n?Tn.parse:Tn.parseInline)(u,i);return i.hooks?await i.hooks.postprocess(d):d})().catch(o);try{i.hooks&&(e=i.hooks.preprocess(e));let s=(i.hooks?i.hooks.provideLexer(n):n?En.lex:En.lexInline)(e,i);i.hooks&&(s=i.hooks.processAllTokens(s)),i.walkTokens&&this.walkTokens(s,i.walkTokens);let c=(i.hooks?i.hooks.provideParser(n):n?Tn.parse:Tn.parseInline)(s,i);return i.hooks&&(c=i.hooks.postprocess(c)),c}catch(s){return o(s)}}}onError(n,e){return t=>{if(t.message+=`
|
||
Please report this to https://github.com/markedjs/marked.`,n){let l="<p>An error occurred:</p><pre>"+Mn(t.message+"",!0)+"</pre>";return e?Promise.resolve(l):l}if(e)return Promise.reject(t);throw t}}},El=new j_;function ht(n,e){return El.parse(n,e)}ht.options=ht.setOptions=function(n){return El.setOptions(n),ht.defaults=El.defaults,nd(ht.defaults),ht};ht.getDefaults=zs;ht.defaults=Sl;ht.use=function(...n){return El.use(...n),ht.defaults=El.defaults,nd(ht.defaults),ht};ht.walkTokens=function(n,e){return El.walkTokens(n,e)};ht.parseInline=El.parseInline;ht.Parser=Tn;ht.parser=Tn.parse;ht.Renderer=zi;ht.TextRenderer=Vs;ht.Lexer=En;ht.lexer=En.lex;ht.Tokenizer=ji;ht.Hooks=ei;ht.parse=ht;ht.options;ht.setOptions;ht.use;ht.walkTokens;ht.parseInline;Tn.parse;En.lex;/*! @license DOMPurify 3.4.10 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.10/LICENSE */function sr(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,l=Array(e);t<e;t++)l[t]=n[t];return l}function z_(n){if(Array.isArray(n))return n}function B_(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var l,i,o,s,c=[],u=!0,d=!1;try{if(o=(t=t.call(n)).next,e!==0)for(;!(u=(l=o.call(t)).done)&&(c.push(l.value),c.length!==e);u=!0);}catch(p){d=!0,i=p}finally{try{if(!u&&t.return!=null&&(s=t.return(),Object(s)!==s))return}finally{if(d)throw i}}return c}}function F_(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function U_(n,e){return z_(n)||B_(n,e)||H_(n,e)||F_()}function H_(n,e){if(n){if(typeof n=="string")return sr(n,e);var t={}.toString.call(n).slice(8,-1);return t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set"?Array.from(n):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?sr(n,e):void 0}}const dd=Object.entries,or=Object.setPrototypeOf,W_=Object.isFrozen,G_=Object.getPrototypeOf,K_=Object.getOwnPropertyDescriptor;let Ht=Object.freeze,Wt=Object.seal,Bl=Object.create,pd=typeof Reflect<"u"&&Reflect,Ls=pd.apply,Os=pd.construct;Ht||(Ht=function(e){return e});Wt||(Wt=function(e){return e});Ls||(Ls=function(e,t){for(var l=arguments.length,i=new Array(l>2?l-2:0),o=2;o<l;o++)i[o-2]=arguments[o];return e.apply(t,i)});Os||(Os=function(e){for(var t=arguments.length,l=new Array(t>1?t-1:0),i=1;i<t;i++)l[i-1]=arguments[i];return new e(...l)});const Ql=It(Array.prototype.forEach),V_=It(Array.prototype.lastIndexOf),rr=It(Array.prototype.pop),Pl=It(Array.prototype.push),Z_=It(Array.prototype.splice),Qn=Array.isArray,ti=It(String.prototype.toLowerCase),_s=It(String.prototype.toString),ar=It(String.prototype.match),xl=It(String.prototype.replace),cr=It(String.prototype.indexOf),Y_=It(String.prototype.trim),X_=It(Number.prototype.toString),J_=It(Boolean.prototype.toString),ur=typeof BigInt>"u"?null:It(BigInt.prototype.toString),fr=typeof Symbol>"u"?null:It(Symbol.prototype.toString),Xt=It(Object.prototype.hasOwnProperty),$l=It(Object.prototype.toString),Ut=It(RegExp.prototype.test),pl=Q_(TypeError);function It(n){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,l=new Array(t>1?t-1:0),i=1;i<t;i++)l[i-1]=arguments[i];return Ls(n,e,l)}}function Q_(n){return function(){for(var e=arguments.length,t=new Array(e),l=0;l<e;l++)t[l]=arguments[l];return Os(n,t)}}function st(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ti;if(or&&or(n,null),!Qn(e))return n;let l=e.length;for(;l--;){let i=e[l];if(typeof i=="string"){const o=t(i);o!==i&&(W_(e)||(e[l]=o),i=o)}n[i]=!0}return n}function x_(n){for(let e=0;e<n.length;e++)Xt(n,e)||(n[e]=null);return n}function Yt(n){const e=Bl(null);for(const l of dd(n)){var t=U_(l,2);const i=t[0],o=t[1];Xt(n,i)&&(Qn(o)?e[i]=x_(o):o&&typeof o=="object"&&o.constructor===Object?e[i]=Yt(o):e[i]=o)}return e}function $_(n){switch(typeof n){case"string":return n;case"number":return X_(n);case"boolean":return J_(n);case"bigint":return ur?ur(n):"0";case"symbol":return fr?fr(n):"Symbol()";case"undefined":return $l(n);case"function":case"object":{if(n===null)return $l(n);const e=n,t=Ln(e,"toString");if(typeof t=="function"){const l=t(e);return typeof l=="string"?l:$l(l)}return $l(n)}default:return $l(n)}}function Ln(n,e){for(;n!==null;){const l=K_(n,e);if(l){if(l.get)return It(l.get);if(typeof l.value=="function")return It(l.value)}n=G_(n)}function t(){return null}return t}function eb(n){try{return Ut(n,""),!0}catch{return!1}}const dr=Ht(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),bs=Ht(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ks=Ht(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),tb=Ht(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),vs=Ht(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),nb=Ht(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),pr=Ht(["#text"]),hr=Ht(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),ws=Ht(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),mr=Ht(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Ti=Ht(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),lb=Wt(/{{[\w\W]*|^[\w\W]*}}/g),ib=Wt(/<%[\w\W]*|^[\w\W]*%>/g),sb=Wt(/\${[\w\W]*/g),ob=Wt(/^data-[\-\w.\u00B7-\uFFFF]+$/),rb=Wt(/^aria-[\-\w]+$/),gr=Wt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ab=Wt(/^(?:\w+script|data):/i),cb=Wt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ub=Wt(/^html$/i),fb=Wt(/^[a-z][.\w]*(-[.\w]+)+$/i),_r=Wt(/<[/\w!]/g),db=Wt(/<[/\w]/g),pb=Wt(/<\/no(script|embed|frames)/i),hb=Wt(/\/>/i),Rn={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},mb=function(){return typeof window>"u"?null:window},gb=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let l=null;const i="data-tt-policy-suffix";t&&t.hasAttribute(i)&&(l=t.getAttribute(i));const o="dompurify"+(l?"#"+l:"");try{return e.createPolicy(o,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},br=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Xn=function(e,t,l,i){return Xt(e,t)&&Qn(e[t])?st(i.base?Yt(i.base):{},e[t],i.transform):l};function hd(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:mb();const e=ye=>hd(ye);if(e.version="3.4.10",e.removed=[],!n||!n.document||n.document.nodeType!==Rn.document||!n.Element)return e.isSupported=!1,e;let t=n.document;const l=t,i=l.currentScript;n.DocumentFragment;const o=n.HTMLTemplateElement,s=n.Node,c=n.Element,u=n.NodeFilter,d=n.NamedNodeMap;d===void 0&&(n.NamedNodeMap||n.MozNamedAttrMap),n.HTMLFormElement;const p=n.DOMParser,h=n.trustedTypes,m=c.prototype,g=Ln(m,"cloneNode"),b=Ln(m,"remove"),v=Ln(m,"nextSibling"),y=Ln(m,"childNodes"),E=Ln(m,"parentNode"),T=Ln(m,"shadowRoot"),I=Ln(m,"attributes"),N=s&&s.prototype?Ln(s.prototype,"nodeType"):null,R=s&&s.prototype?Ln(s.prototype,"nodeName"):null;if(typeof o=="function"){const ye=t.createElement("template");ye.content&&ye.content.ownerDocument&&(t=ye.content.ownerDocument)}let M,A="",L,j=!1,B=0;const U=function(){if(B>0)throw pl('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},z=function(V){U(),B++;try{return M.createHTML(V)}finally{B--}},W=function(V){U(),B++;try{return M.createScriptURL(V)}finally{B--}},G=function(){return j||(L=gb(h,i),j=!0),L},X=t,H=X.implementation,D=X.createNodeIterator,q=X.createDocumentFragment,P=X.getElementsByTagName,Y=l.importNode;let Z=br();e.isSupported=typeof dd=="function"&&typeof E=="function"&&H&&H.createHTMLDocument!==void 0;const J=lb,te=ib,ne=sb,le=ob,me=rb,oe=ab,ze=cb,Ye=fb;let Re=gr,ee=null;const re=st({},[...dr,...bs,...ks,...vs,...pr]);let Ne=null;const Be=st({},[...hr,...ws,...mr,...Ti]);let ve=Object.seal(Bl(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ue=null,Je=null;const Ae=Object.seal(Bl(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Qe=!0,Fe=!0,Ce=!1,Ke=!0,De=!1,Ze=!0,Pe=!1,ue=!1,ke=!1,$=!1,we=!1,ge=!1,Ie=!0,it=!1;const ut="user-content-";let Xe=!0,mt=!1,xe={},he=null;const qe=st({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let pt=null;const yt=st({},["audio","video","img","source","image","track"]);let At=null;const en=st({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),bt="http://www.w3.org/1998/Math/MathML",Ot="http://www.w3.org/2000/svg",Nt="http://www.w3.org/1999/xhtml";let Dt=Nt,fn=!1,tn=null;const Pt=st({},[bt,Ot,Nt],_s),Dn=Ht(["mi","mo","mn","ms","mtext"]);let Ct=st({},Dn);const Rt=Ht(["annotation-xml"]);let gt=st({},Rt);const tl=st({},["title","style","font","a","script"]);let kn=null;const Al=["application/xhtml+xml","text/html"],nn="text/html";let kt=null,qt=null;const ln=t.createElement("form"),dn=function(V){return V instanceof RegExp||V instanceof Function},Gt=function(){let V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(qt&&qt===V)return;(!V||typeof V!="object")&&(V={}),V=Yt(V),kn=Al.indexOf(V.PARSER_MEDIA_TYPE)===-1?nn:V.PARSER_MEDIA_TYPE,kt=kn==="application/xhtml+xml"?_s:ti,ee=Xn(V,"ALLOWED_TAGS",re,{transform:kt}),Ne=Xn(V,"ALLOWED_ATTR",Be,{transform:kt}),tn=Xn(V,"ALLOWED_NAMESPACES",Pt,{transform:_s}),At=Xn(V,"ADD_URI_SAFE_ATTR",en,{transform:kt,base:en}),pt=Xn(V,"ADD_DATA_URI_TAGS",yt,{transform:kt,base:yt}),he=Xn(V,"FORBID_CONTENTS",qe,{transform:kt}),Ue=Xn(V,"FORBID_TAGS",Yt({}),{transform:kt}),Je=Xn(V,"FORBID_ATTR",Yt({}),{transform:kt}),xe=Xt(V,"USE_PROFILES")?V.USE_PROFILES&&typeof V.USE_PROFILES=="object"?Yt(V.USE_PROFILES):V.USE_PROFILES:!1,Qe=V.ALLOW_ARIA_ATTR!==!1,Fe=V.ALLOW_DATA_ATTR!==!1,Ce=V.ALLOW_UNKNOWN_PROTOCOLS||!1,Ke=V.ALLOW_SELF_CLOSE_IN_ATTR!==!1,De=V.SAFE_FOR_TEMPLATES||!1,Ze=V.SAFE_FOR_XML!==!1,Pe=V.WHOLE_DOCUMENT||!1,$=V.RETURN_DOM||!1,we=V.RETURN_DOM_FRAGMENT||!1,ge=V.RETURN_TRUSTED_TYPE||!1,ke=V.FORCE_BODY||!1,Ie=V.SANITIZE_DOM!==!1,it=V.SANITIZE_NAMED_PROPS||!1,Xe=V.KEEP_CONTENT!==!1,mt=V.IN_PLACE||!1,Re=eb(V.ALLOWED_URI_REGEXP)?V.ALLOWED_URI_REGEXP:gr,Dt=typeof V.NAMESPACE=="string"?V.NAMESPACE:Nt,Ct=Xt(V,"MATHML_TEXT_INTEGRATION_POINTS")&&V.MATHML_TEXT_INTEGRATION_POINTS&&typeof V.MATHML_TEXT_INTEGRATION_POINTS=="object"?Yt(V.MATHML_TEXT_INTEGRATION_POINTS):st({},Dn),gt=Xt(V,"HTML_INTEGRATION_POINTS")&&V.HTML_INTEGRATION_POINTS&&typeof V.HTML_INTEGRATION_POINTS=="object"?Yt(V.HTML_INTEGRATION_POINTS):st({},Rt);const se=Xt(V,"CUSTOM_ELEMENT_HANDLING")&&V.CUSTOM_ELEMENT_HANDLING&&typeof V.CUSTOM_ELEMENT_HANDLING=="object"?Yt(V.CUSTOM_ELEMENT_HANDLING):Bl(null);if(ve=Bl(null),Xt(se,"tagNameCheck")&&dn(se.tagNameCheck)&&(ve.tagNameCheck=se.tagNameCheck),Xt(se,"attributeNameCheck")&&dn(se.attributeNameCheck)&&(ve.attributeNameCheck=se.attributeNameCheck),Xt(se,"allowCustomizedBuiltInElements")&&typeof se.allowCustomizedBuiltInElements=="boolean"&&(ve.allowCustomizedBuiltInElements=se.allowCustomizedBuiltInElements),Wt(ve),De&&(Fe=!1),we&&($=!0),xe&&(ee=st({},pr),Ne=Bl(null),xe.html===!0&&(st(ee,dr),st(Ne,hr)),xe.svg===!0&&(st(ee,bs),st(Ne,ws),st(Ne,Ti)),xe.svgFilters===!0&&(st(ee,ks),st(Ne,ws),st(Ne,Ti)),xe.mathMl===!0&&(st(ee,vs),st(Ne,mr),st(Ne,Ti))),Ae.tagCheck=null,Ae.attributeCheck=null,Xt(V,"ADD_TAGS")&&(typeof V.ADD_TAGS=="function"?Ae.tagCheck=V.ADD_TAGS:Qn(V.ADD_TAGS)&&(ee===re&&(ee=Yt(ee)),st(ee,V.ADD_TAGS,kt))),Xt(V,"ADD_ATTR")&&(typeof V.ADD_ATTR=="function"?Ae.attributeCheck=V.ADD_ATTR:Qn(V.ADD_ATTR)&&(Ne===Be&&(Ne=Yt(Ne)),st(Ne,V.ADD_ATTR,kt))),Xt(V,"ADD_URI_SAFE_ATTR")&&Qn(V.ADD_URI_SAFE_ATTR)&&st(At,V.ADD_URI_SAFE_ATTR,kt),Xt(V,"FORBID_CONTENTS")&&Qn(V.FORBID_CONTENTS)&&(he===qe&&(he=Yt(he)),st(he,V.FORBID_CONTENTS,kt)),Xt(V,"ADD_FORBID_CONTENTS")&&Qn(V.ADD_FORBID_CONTENTS)&&(he===qe&&(he=Yt(he)),st(he,V.ADD_FORBID_CONTENTS,kt)),Xe&&(ee["#text"]=!0),Pe&&st(ee,["html","head","body"]),ee.table&&(st(ee,["tbody"]),delete Ue.tbody),V.TRUSTED_TYPES_POLICY){if(typeof V.TRUSTED_TYPES_POLICY.createHTML!="function")throw pl('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof V.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw pl('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const Ee=M;M=V.TRUSTED_TYPES_POLICY;try{A=z("")}catch(Oe){throw M=Ee,Oe}}else V.TRUSTED_TYPES_POLICY===null?(M=void 0,A=""):(M===void 0&&(M=G()),M&&typeof A=="string"&&(A=z("")));(Z.uponSanitizeElement.length>0||Z.uponSanitizeAttribute.length>0)&&ee===re&&(ee=Yt(ee)),Z.uponSanitizeAttribute.length>0&&Ne===Be&&(Ne=Yt(Ne)),Ht&&Ht(V),qt=V},Qt=st({},[...bs,...ks,...tb]),Sn=st({},[...vs,...nb]),pn=function(V,se,Ee){return se.namespaceURI===Nt?V==="svg":se.namespaceURI===bt?V==="svg"&&(Ee==="annotation-xml"||Ct[Ee]):!!Qt[V]},Pn=function(V,se,Ee){return se.namespaceURI===Nt?V==="math":se.namespaceURI===Ot?V==="math"&>[Ee]:!!Sn[V]},hn=function(V,se,Ee){return se.namespaceURI===Ot&&!gt[Ee]||se.namespaceURI===bt&&!Ct[Ee]?!1:!Sn[V]&&(tl[V]||!Qt[V])},nl=function(V){let se=E(V);(!se||!se.tagName)&&(se={namespaceURI:Dt,tagName:"template"});const Ee=ti(V.tagName),Oe=ti(se.tagName);return tn[V.namespaceURI]?V.namespaceURI===Ot?pn(Ee,se,Oe):V.namespaceURI===bt?Pn(Ee,se,Oe):V.namespaceURI===Nt?hn(Ee,se,Oe):!!(kn==="application/xhtml+xml"&&tn[V.namespaceURI]):!1},jt=function(V){Pl(e.removed,{element:V});try{E(V).removeChild(V)}catch{if(b(V),!E(V))throw pl("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},sn=function(V){const se=y(V);if(se){const Oe=[];Ql(se,et=>{Pl(Oe,et)}),Ql(Oe,et=>{try{b(et)}catch{}})}const Ee=I(V);if(Ee)for(let Oe=Ee.length-1;Oe>=0;--Oe){const et=Ee[Oe],nt=et&&et.name;if(typeof nt=="string")try{V.removeAttribute(nt)}catch{}}},xt=function(V,se){try{Pl(e.removed,{attribute:se.getAttributeNode(V),from:se})}catch{Pl(e.removed,{attribute:null,from:se})}if(se.removeAttribute(V),V==="is")if($||we)try{jt(se)}catch{}else try{se.setAttribute(V,"")}catch{}},Cn=function(V){const se=I(V);if(se)for(let Ee=se.length-1;Ee>=0;--Ee){const Oe=se[Ee],et=Oe&&Oe.name;if(!(typeof et!="string"||Ne[kt(et)]))try{V.removeAttribute(et)}catch{}}},ll=function(V){const se=[V];for(;se.length>0;){const Ee=se.pop();(N?N(Ee):Ee.nodeType)===Rn.element&&Cn(Ee);const et=y(Ee);if(et)for(let nt=et.length-1;nt>=0;--nt)se.push(et[nt])}},qn=function(V){let se=null,Ee=null;if(ke)V="<remove></remove>"+V;else{const nt=ar(V,/^[\r\n\t ]+/);Ee=nt&&nt[0]}kn==="application/xhtml+xml"&&Dt===Nt&&(V='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+V+"</body></html>");const Oe=M?z(V):V;if(Dt===Nt)try{se=new p().parseFromString(Oe,kn)}catch{}if(!se||!se.documentElement){se=H.createDocument(Dt,"template",null);try{se.documentElement.innerHTML=fn?A:Oe}catch{}}const et=se.body||se.documentElement;return V&&Ee&&et.insertBefore(t.createTextNode(Ee),et.childNodes[0]||null),Dt===Nt?P.call(se,Pe?"html":"body")[0]:Pe?se.documentElement:et},Wn=function(V){return D.call(V.ownerDocument||V,V,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},mn=function(V){return V=xl(V,J," "),V=xl(V,te," "),V=xl(V,ne," "),V},gn=function(V){var se;V.normalize();const Ee=D.call(V.ownerDocument||V,V,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null);let Oe=Ee.nextNode();for(;Oe;)Oe.data=mn(Oe.data),Oe=Ee.nextNode();const et=(se=V.querySelectorAll)===null||se===void 0?void 0:se.call(V,"template");et&&Ql(et,nt=>{$t(nt.content)&&gn(nt.content)})},An=function(V){const se=R?R(V):null;return typeof se!="string"||kt(se)!=="form"?!1:typeof V.nodeName!="string"||typeof V.textContent!="string"||typeof V.removeChild!="function"||V.attributes!==I(V)||typeof V.removeAttribute!="function"||typeof V.setAttribute!="function"||typeof V.namespaceURI!="string"||typeof V.insertBefore!="function"||typeof V.hasChildNodes!="function"||V.nodeType!==N(V)||V.childNodes!==y(V)},$t=function(V){if(!N||typeof V!="object"||V===null)return!1;try{return N(V)===Rn.documentFragment}catch{return!1}},vn=function(V){if(!N||typeof V!="object"||V===null)return!1;try{return typeof N(V)=="number"}catch{return!1}};function Mt(ye,V,se){ye.length!==0&&Ql(ye,Ee=>{Ee.call(e,V,se,qt)})}const Gn=function(V,se){return!!(Ze&&V.hasChildNodes()&&!vn(V.firstElementChild)&&Ut(_r,V.textContent)&&Ut(_r,V.innerHTML)||Ze&&V.namespaceURI===Nt&&se==="style"&&vn(V.firstElementChild)||V.nodeType===Rn.processingInstruction||Ze&&V.nodeType===Rn.comment&&Ut(db,V.data))},Nl=function(V,se){if(!Ue[se]&&_e(se)&&(ve.tagNameCheck instanceof RegExp&&Ut(ve.tagNameCheck,se)||ve.tagNameCheck instanceof Function&&ve.tagNameCheck(se)))return!1;if(Xe&&!he[se]){const Ee=E(V),Oe=y(V);if(Oe&&Ee){const et=Oe.length;for(let nt=et-1;nt>=0;--nt){const St=mt?Oe[nt]:g(Oe[nt],!0);Ee.insertBefore(St,v(V))}}}return jt(V),!0},il=function(V){if(Mt(Z.beforeSanitizeElements,V,null),An(V))return jt(V),!0;const se=kt(R?R(V):V.nodeName);if(Mt(Z.uponSanitizeElement,V,{tagName:se,allowedTags:ee}),Gn(V,se))return jt(V),!0;if(Ue[se]||!(Ae.tagCheck instanceof Function&&Ae.tagCheck(se))&&!ee[se])return Nl(V,se);if((N?N(V):V.nodeType)===Rn.element&&!nl(V)||(se==="noscript"||se==="noembed"||se==="noframes")&&Ut(pb,V.innerHTML))return jt(V),!0;if(De&&V.nodeType===Rn.text){const Oe=mn(V.textContent);V.textContent!==Oe&&(Pl(e.removed,{element:V.cloneNode()}),V.textContent=Oe)}return Mt(Z.afterSanitizeElements,V,null),!1},sl=function(V,se,Ee){if(Je[se]||Ie&&(se==="id"||se==="name")&&(Ee in t||Ee in ln))return!1;const Oe=Ne[se]||Ae.attributeCheck instanceof Function&&Ae.attributeCheck(se,V);if(!(Fe&&Ut(le,se))){if(!(Qe&&Ut(me,se))){if(Oe){if(!At[se]){if(!Ut(Re,xl(Ee,ze,""))){if(!((se==="src"||se==="xlink:href"||se==="href")&&V!=="script"&&cr(Ee,"data:")===0&&pt[V])){if(!(Ce&&!Ut(oe,xl(Ee,ze,"")))){if(Ee)return!1}}}}}else if(!(_e(V)&&(ve.tagNameCheck instanceof RegExp&&Ut(ve.tagNameCheck,V)||ve.tagNameCheck instanceof Function&&ve.tagNameCheck(V))&&(ve.attributeNameCheck instanceof RegExp&&Ut(ve.attributeNameCheck,se)||ve.attributeNameCheck instanceof Function&&ve.attributeNameCheck(se,V))||se==="is"&&ve.allowCustomizedBuiltInElements&&(ve.tagNameCheck instanceof RegExp&&Ut(ve.tagNameCheck,Ee)||ve.tagNameCheck instanceof Function&&ve.tagNameCheck(Ee))))return!1}}return!0},x=st({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),_e=function(V){return!x[ti(V)]&&Ut(Ye,V)},$e=function(V,se,Ee,Oe){if(M&&typeof h=="object"&&typeof h.getAttributeType=="function"&&!Ee)switch(h.getAttributeType(V,se)){case"TrustedHTML":return z(Oe);case"TrustedScriptURL":return W(Oe)}return Oe},wt=function(V,se,Ee,Oe){try{Ee?V.setAttributeNS(Ee,se,Oe):V.setAttribute(se,Oe),An(V)?jt(V):rr(e.removed)}catch{xt(se,V)}},wn=function(V){Mt(Z.beforeSanitizeAttributes,V,null);const se=V.attributes;if(!se||An(V))return;const Ee={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ne,forceKeepAttr:void 0};let Oe=se.length;const et=kt(V.nodeName);for(;Oe--;){const nt=se[Oe],St=nt.name,Et=nt.namespaceURI,zt=nt.value,on=kt(St),ol=zt;let Bt=St==="value"?ol:Y_(ol);if(Ee.attrName=on,Ee.attrValue=Bt,Ee.keepAttr=!0,Ee.forceKeepAttr=void 0,Mt(Z.uponSanitizeAttribute,V,Ee),Bt=Ee.attrValue,it&&(on==="id"||on==="name")&&cr(Bt,ut)!==0&&(xt(St,V),Bt=ut+Bt),Ze&&Ut(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Bt)){xt(St,V);continue}if(on==="attributename"&&ar(Bt,"href")){xt(St,V);continue}if(!Ee.forceKeepAttr){if(!Ee.keepAttr){xt(St,V);continue}if(!Ke&&Ut(hb,Bt)){xt(St,V);continue}if(De&&(Bt=mn(Bt)),!sl(et,on,Bt)){xt(St,V);continue}Bt=$e(et,on,Et,Bt),Bt!==ol&&wt(V,St,Et,Bt)}}Mt(Z.afterSanitizeAttributes,V,null)},Zt=function(V){let se=null;const Ee=Wn(V);for(Mt(Z.beforeSanitizeShadowDOM,V,null);se=Ee.nextNode();)if(Mt(Z.uponSanitizeShadowNode,se,null),il(se),wn(se),$t(se.content)&&Zt(se.content),(N?N(se):se.nodeType)===Rn.element){const et=T(se);$t(et)&&(_n(et),Zt(et))}Mt(Z.afterSanitizeShadowDOM,V,null)},_n=function(V){const se=[{node:V,shadow:null}];for(;se.length>0;){const Ee=se.pop();if(Ee.shadow){Zt(Ee.shadow);continue}const Oe=Ee.node,nt=(N?N(Oe):Oe.nodeType)===Rn.element,St=y(Oe);if(St)for(let Et=St.length-1;Et>=0;--Et)se.push({node:St[Et],shadow:null});if(nt){const Et=R?R(Oe):null;if(typeof Et=="string"&&kt(Et)==="template"){const zt=Oe.content;$t(zt)&&se.push({node:zt,shadow:null})}}if(nt){const Et=T(Oe);$t(Et)&&se.push({node:null,shadow:Et},{node:Et,shadow:null})}}};return e.sanitize=function(ye){let V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},se=null,Ee=null,Oe=null,et=null;if(fn=!ye,fn&&(ye="<!-->"),typeof ye!="string"&&!vn(ye)&&(ye=$_(ye),typeof ye!="string"))throw pl("dirty is not a string, aborting");if(!e.isSupported)return ye;ue||Gt(V),e.removed=[];const nt=mt&&typeof ye!="string"&&vn(ye);if(nt){const zt=R?R(ye):ye.nodeName;if(typeof zt=="string"){const on=kt(zt);if(!ee[on]||Ue[on])throw pl("root node is forbidden and cannot be sanitized in-place")}if(An(ye))throw pl("root node is clobbered and cannot be sanitized in-place");try{_n(ye)}catch(on){throw sn(ye),on}}else if(vn(ye))se=qn("<!---->"),Ee=se.ownerDocument.importNode(ye,!0),Ee.nodeType===Rn.element&&Ee.nodeName==="BODY"||Ee.nodeName==="HTML"?se=Ee:se.appendChild(Ee),_n(Ee);else{if(!$&&!De&&!Pe&&ye.indexOf("<")===-1)return M&&ge?z(ye):ye;if(se=qn(ye),!se)return $?null:ge?A:""}se&&ke&&jt(se.firstChild);const St=Wn(nt?ye:se);try{for(;Oe=St.nextNode();)il(Oe),wn(Oe),$t(Oe.content)&&Zt(Oe.content)}catch(zt){throw nt&&sn(ye),zt}if(nt)return Ql(e.removed,zt=>{zt.element&&ll(zt.element)}),De&&gn(ye),ye;if($){if(De&&gn(se),we)for(et=q.call(se.ownerDocument);se.firstChild;)et.appendChild(se.firstChild);else et=se;return(Ne.shadowroot||Ne.shadowrootmode)&&(et=Y.call(l,et,!0)),et}let Et=Pe?se.outerHTML:se.innerHTML;return Pe&&ee["!doctype"]&&se.ownerDocument&&se.ownerDocument.doctype&&se.ownerDocument.doctype.name&&Ut(ub,se.ownerDocument.doctype.name)&&(Et="<!DOCTYPE "+se.ownerDocument.doctype.name+`>
|
||
`+Et),De&&(Et=mn(Et)),M&&ge?z(Et):Et},e.setConfig=function(){let ye=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Gt(ye),ue=!0},e.clearConfig=function(){qt=null,ue=!1,M=L,A=""},e.isValidAttribute=function(ye,V,se){qt||Gt({});const Ee=kt(ye),Oe=kt(V);return sl(Ee,Oe,se)},e.addHook=function(ye,V){typeof V=="function"&&Pl(Z[ye],V)},e.removeHook=function(ye,V){if(V!==void 0){const se=V_(Z[ye],V);return se===-1?void 0:Z_(Z[ye],se,1)[0]}return rr(Z[ye])},e.removeHooks=function(ye){Z[ye]=[]},e.removeAllHooks=function(){Z=br()},e}var md=hd();function _b(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function gd(n){return n instanceof Map?n.clear=n.delete=n.set=function(){throw new Error("map is read-only")}:n instanceof Set&&(n.add=n.clear=n.delete=function(){throw new Error("set is read-only")}),Object.freeze(n),Object.getOwnPropertyNames(n).forEach(e=>{const t=n[e],l=typeof t;(l==="object"||l==="function")&&!Object.isFrozen(t)&&gd(t)}),n}class kr{constructor(e){e.data===void 0&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function _d(n){return n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function el(n,...e){const t=Object.create(null);for(const l in n)t[l]=n[l];return e.forEach(function(l){for(const i in l)t[i]=l[i]}),t}const bb="</span>",vr=n=>!!n.scope,kb=(n,{prefix:e})=>{if(n.startsWith("language:"))return n.replace("language:","language-");if(n.includes(".")){const t=n.split(".");return[`${e}${t.shift()}`,...t.map((l,i)=>`${l}${"_".repeat(i+1)}`)].join(" ")}return`${e}${n}`};class vb{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=_d(e)}openNode(e){if(!vr(e))return;const t=kb(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){vr(e)&&(this.buffer+=bb)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}const wr=(n={})=>{const e={children:[]};return Object.assign(e,n),e};class Zs{constructor(){this.rootNode=wr(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t=wr({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return typeof t=="string"?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(l=>this._walk(e,l)),e.closeNode(t)),e}static _collapse(e){typeof e!="string"&&e.children&&(e.children.every(t=>typeof t=="string")?e.children=[e.children.join("")]:e.children.forEach(t=>{Zs._collapse(t)}))}}class wb extends Zs{constructor(e){super(),this.options=e}addText(e){e!==""&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){const l=e.root;t&&(l.scope=`language:${t}`),this.add(l)}toHTML(){return new vb(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function oi(n){return n?typeof n=="string"?n:n.source:null}function bd(n){return Cl("(?=",n,")")}function yb(n){return Cl("(?:",n,")*")}function Eb(n){return Cl("(?:",n,")?")}function Cl(...n){return n.map(t=>oi(t)).join("")}function Tb(n){const e=n[n.length-1];return typeof e=="object"&&e.constructor===Object?(n.splice(n.length-1,1),e):{}}function Ys(...n){return"("+(Tb(n).capture?"":"?:")+n.map(l=>oi(l)).join("|")+")"}function kd(n){return new RegExp(n.toString()+"|").exec("").length-1}function Sb(n,e){const t=n&&n.exec(e);return t&&t.index===0}const Cb=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function Xs(n,{joinWith:e}){let t=0;return n.map(l=>{t+=1;const i=t;let o=oi(l),s="";for(;o.length>0;){const c=Cb.exec(o);if(!c){s+=o;break}s+=o.substring(0,c.index),o=o.substring(c.index+c[0].length),c[0][0]==="\\"&&c[1]?s+="\\"+String(Number(c[1])+i):(s+=c[0],c[0]==="("&&t++)}return s}).map(l=>`(${l})`).join(e)}const Ab=/\b\B/,vd="[a-zA-Z]\\w*",Js="[a-zA-Z_]\\w*",wd="\\b\\d+(\\.\\d+)?",yd="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Ed="\\b(0b[01]+)",Nb="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Ib=(n={})=>{const e=/^#![ ]*\//;return n.binary&&(n.begin=Cl(e,/.*\b/,n.binary,/\b.*/)),el({scope:"meta",begin:e,end:/$/,relevance:0,"on:begin":(t,l)=>{t.index!==0&&l.ignoreMatch()}},n)},ri={begin:"\\\\[\\s\\S]",relevance:0},Rb={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[ri]},Mb={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[ri]},Lb={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Vi=function(n,e,t={}){const l=el({scope:"comment",begin:n,end:e,contains:[]},t);l.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const i=Ys("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return l.contains.push({begin:Cl(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),l},Ob=Vi("//","$"),Db=Vi("/\\*","\\*/"),Pb=Vi("#","$"),qb={scope:"number",begin:wd,relevance:0},jb={scope:"number",begin:yd,relevance:0},zb={scope:"number",begin:Ed,relevance:0},Bb={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[ri,{begin:/\[/,end:/\]/,relevance:0,contains:[ri]}]},Fb={scope:"title",begin:vd,relevance:0},Ub={scope:"title",begin:Js,relevance:0},Hb={begin:"\\.\\s*"+Js,relevance:0},Wb=function(n){return Object.assign(n,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})};var Si=Object.freeze({__proto__:null,APOS_STRING_MODE:Rb,BACKSLASH_ESCAPE:ri,BINARY_NUMBER_MODE:zb,BINARY_NUMBER_RE:Ed,COMMENT:Vi,C_BLOCK_COMMENT_MODE:Db,C_LINE_COMMENT_MODE:Ob,C_NUMBER_MODE:jb,C_NUMBER_RE:yd,END_SAME_AS_BEGIN:Wb,HASH_COMMENT_MODE:Pb,IDENT_RE:vd,MATCH_NOTHING_RE:Ab,METHOD_GUARD:Hb,NUMBER_MODE:qb,NUMBER_RE:wd,PHRASAL_WORDS_MODE:Lb,QUOTE_STRING_MODE:Mb,REGEXP_MODE:Bb,RE_STARTERS_RE:Nb,SHEBANG:Ib,TITLE_MODE:Fb,UNDERSCORE_IDENT_RE:Js,UNDERSCORE_TITLE_MODE:Ub});function Gb(n,e){n.input[n.index-1]==="."&&e.ignoreMatch()}function Kb(n,e){n.className!==void 0&&(n.scope=n.className,delete n.className)}function Vb(n,e){e&&n.beginKeywords&&(n.begin="\\b("+n.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",n.__beforeBegin=Gb,n.keywords=n.keywords||n.beginKeywords,delete n.beginKeywords,n.relevance===void 0&&(n.relevance=0))}function Zb(n,e){Array.isArray(n.illegal)&&(n.illegal=Ys(...n.illegal))}function Yb(n,e){if(n.match){if(n.begin||n.end)throw new Error("begin & end are not supported with match");n.begin=n.match,delete n.match}}function Xb(n,e){n.relevance===void 0&&(n.relevance=1)}const Jb=(n,e)=>{if(!n.beforeMatch)return;if(n.starts)throw new Error("beforeMatch cannot be used with starts");const t=Object.assign({},n);Object.keys(n).forEach(l=>{delete n[l]}),n.keywords=t.keywords,n.begin=Cl(t.beforeMatch,bd(t.begin)),n.starts={relevance:0,contains:[Object.assign(t,{endsParent:!0})]},n.relevance=0,delete t.beforeMatch},Qb=["of","and","for","in","not","or","if","then","parent","list","value"],xb="keyword";function Td(n,e,t=xb){const l=Object.create(null);return typeof n=="string"?i(t,n.split(" ")):Array.isArray(n)?i(t,n):Object.keys(n).forEach(function(o){Object.assign(l,Td(n[o],e,o))}),l;function i(o,s){e&&(s=s.map(c=>c.toLowerCase())),s.forEach(function(c){const u=c.split("|");l[u[0]]=[o,$b(u[0],u[1])]})}}function $b(n,e){return e?Number(e):ek(n)?0:1}function ek(n){return Qb.includes(n.toLowerCase())}const yr={},vl=n=>{console.error(n)},Er=(n,...e)=>{console.log(`WARN: ${n}`,...e)},ql=(n,e)=>{yr[`${n}/${e}`]||(console.log(`Deprecated as of ${n}. ${e}`),yr[`${n}/${e}`]=!0)},Bi=new Error;function Sd(n,e,{key:t}){let l=0;const i=n[t],o={},s={};for(let c=1;c<=e.length;c++)s[c+l]=i[c],o[c+l]=!0,l+=kd(e[c-1]);n[t]=s,n[t]._emit=o,n[t]._multi=!0}function tk(n){if(Array.isArray(n.begin)){if(n.skip||n.excludeBegin||n.returnBegin)throw vl("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Bi;if(typeof n.beginScope!="object"||n.beginScope===null)throw vl("beginScope must be object"),Bi;Sd(n,n.begin,{key:"beginScope"}),n.begin=Xs(n.begin,{joinWith:""})}}function nk(n){if(Array.isArray(n.end)){if(n.skip||n.excludeEnd||n.returnEnd)throw vl("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Bi;if(typeof n.endScope!="object"||n.endScope===null)throw vl("endScope must be object"),Bi;Sd(n,n.end,{key:"endScope"}),n.end=Xs(n.end,{joinWith:""})}}function lk(n){n.scope&&typeof n.scope=="object"&&n.scope!==null&&(n.beginScope=n.scope,delete n.scope)}function ik(n){lk(n),typeof n.beginScope=="string"&&(n.beginScope={_wrap:n.beginScope}),typeof n.endScope=="string"&&(n.endScope={_wrap:n.endScope}),tk(n),nk(n)}function sk(n){function e(s,c){return new RegExp(oi(s),"m"+(n.case_insensitive?"i":"")+(n.unicodeRegex?"u":"")+(c?"g":""))}class t{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(c,u){u.position=this.position++,this.matchIndexes[this.matchAt]=u,this.regexes.push([u,c]),this.matchAt+=kd(c)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const c=this.regexes.map(u=>u[1]);this.matcherRe=e(Xs(c,{joinWith:"|"}),!0),this.lastIndex=0}exec(c){this.matcherRe.lastIndex=this.lastIndex;const u=this.matcherRe.exec(c);if(!u)return null;const d=u.findIndex((h,m)=>m>0&&h!==void 0),p=this.matchIndexes[d];return u.splice(0,d),Object.assign(u,p)}}class l{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(c){if(this.multiRegexes[c])return this.multiRegexes[c];const u=new t;return this.rules.slice(c).forEach(([d,p])=>u.addRule(d,p)),u.compile(),this.multiRegexes[c]=u,u}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(c,u){this.rules.push([c,u]),u.type==="begin"&&this.count++}exec(c){const u=this.getMatcher(this.regexIndex);u.lastIndex=this.lastIndex;let d=u.exec(c);if(this.resumingScanAtSamePosition()&&!(d&&d.index===this.lastIndex)){const p=this.getMatcher(0);p.lastIndex=this.lastIndex+1,d=p.exec(c)}return d&&(this.regexIndex+=d.position+1,this.regexIndex===this.count&&this.considerAll()),d}}function i(s){const c=new l;return s.contains.forEach(u=>c.addRule(u.begin,{rule:u,type:"begin"})),s.terminatorEnd&&c.addRule(s.terminatorEnd,{type:"end"}),s.illegal&&c.addRule(s.illegal,{type:"illegal"}),c}function o(s,c){const u=s;if(s.isCompiled)return u;[Kb,Yb,ik,Jb].forEach(p=>p(s,c)),n.compilerExtensions.forEach(p=>p(s,c)),s.__beforeBegin=null,[Vb,Zb,Xb].forEach(p=>p(s,c)),s.isCompiled=!0;let d=null;return typeof s.keywords=="object"&&s.keywords.$pattern&&(s.keywords=Object.assign({},s.keywords),d=s.keywords.$pattern,delete s.keywords.$pattern),d=d||/\w+/,s.keywords&&(s.keywords=Td(s.keywords,n.case_insensitive)),u.keywordPatternRe=e(d,!0),c&&(s.begin||(s.begin=/\B|\b/),u.beginRe=e(u.begin),!s.end&&!s.endsWithParent&&(s.end=/\B|\b/),s.end&&(u.endRe=e(u.end)),u.terminatorEnd=oi(u.end)||"",s.endsWithParent&&c.terminatorEnd&&(u.terminatorEnd+=(s.end?"|":"")+c.terminatorEnd)),s.illegal&&(u.illegalRe=e(s.illegal)),s.contains||(s.contains=[]),s.contains=[].concat(...s.contains.map(function(p){return ok(p==="self"?s:p)})),s.contains.forEach(function(p){o(p,u)}),s.starts&&o(s.starts,c),u.matcher=i(u),u}if(n.compilerExtensions||(n.compilerExtensions=[]),n.contains&&n.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return n.classNameAliases=el(n.classNameAliases||{}),o(n)}function Cd(n){return n?n.endsWithParent||Cd(n.starts):!1}function ok(n){return n.variants&&!n.cachedVariants&&(n.cachedVariants=n.variants.map(function(e){return el(n,{variants:null},e)})),n.cachedVariants?n.cachedVariants:Cd(n)?el(n,{starts:n.starts?el(n.starts):null}):Object.isFrozen(n)?el(n):n}var rk="11.11.1";class ak extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const ys=_d,Tr=el,Sr=Symbol("nomatch"),ck=7,Ad=function(n){const e=Object.create(null),t=Object.create(null),l=[];let i=!0;const o="Could not find the language '{}', did you forget to load/include a language module?",s={disableAutodetect:!0,name:"Plain text",contains:[]};let c={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:wb};function u(H){return c.noHighlightRe.test(H)}function d(H){let D=H.className+" ";D+=H.parentNode?H.parentNode.className:"";const q=c.languageDetectRe.exec(D);if(q){const P=L(q[1]);return P||(Er(o.replace("{}",q[1])),Er("Falling back to no-highlight mode for this block.",H)),P?q[1]:"no-highlight"}return D.split(/\s+/).find(P=>u(P)||L(P))}function p(H,D,q){let P="",Y="";typeof D=="object"?(P=H,q=D.ignoreIllegals,Y=D.language):(ql("10.7.0","highlight(lang, code, ...args) has been deprecated."),ql("10.7.0",`Please use highlight(code, options) instead.
|
||
https://github.com/highlightjs/highlight.js/issues/2277`),Y=H,P=D),q===void 0&&(q=!0);const Z={code:P,language:Y};G("before:highlight",Z);const J=Z.result?Z.result:h(Z.language,Z.code,q);return J.code=Z.code,G("after:highlight",J),J}function h(H,D,q,P){const Y=Object.create(null);function Z(ue,ke){return ue.keywords[ke]}function J(){if(!Ae.keywords){Fe.addText(Ce);return}let ue=0;Ae.keywordPatternRe.lastIndex=0;let ke=Ae.keywordPatternRe.exec(Ce),$="";for(;ke;){$+=Ce.substring(ue,ke.index);const we=ve.case_insensitive?ke[0].toLowerCase():ke[0],ge=Z(Ae,we);if(ge){const[Ie,it]=ge;if(Fe.addText($),$="",Y[we]=(Y[we]||0)+1,Y[we]<=ck&&(Ke+=it),Ie.startsWith("_"))$+=ke[0];else{const ut=ve.classNameAliases[Ie]||Ie;le(ke[0],ut)}}else $+=ke[0];ue=Ae.keywordPatternRe.lastIndex,ke=Ae.keywordPatternRe.exec(Ce)}$+=Ce.substring(ue),Fe.addText($)}function te(){if(Ce==="")return;let ue=null;if(typeof Ae.subLanguage=="string"){if(!e[Ae.subLanguage]){Fe.addText(Ce);return}ue=h(Ae.subLanguage,Ce,!0,Qe[Ae.subLanguage]),Qe[Ae.subLanguage]=ue._top}else ue=g(Ce,Ae.subLanguage.length?Ae.subLanguage:null);Ae.relevance>0&&(Ke+=ue.relevance),Fe.__addSublanguage(ue._emitter,ue.language)}function ne(){Ae.subLanguage!=null?te():J(),Ce=""}function le(ue,ke){ue!==""&&(Fe.startScope(ke),Fe.addText(ue),Fe.endScope())}function me(ue,ke){let $=1;const we=ke.length-1;for(;$<=we;){if(!ue._emit[$]){$++;continue}const ge=ve.classNameAliases[ue[$]]||ue[$],Ie=ke[$];ge?le(Ie,ge):(Ce=Ie,J(),Ce=""),$++}}function oe(ue,ke){return ue.scope&&typeof ue.scope=="string"&&Fe.openNode(ve.classNameAliases[ue.scope]||ue.scope),ue.beginScope&&(ue.beginScope._wrap?(le(Ce,ve.classNameAliases[ue.beginScope._wrap]||ue.beginScope._wrap),Ce=""):ue.beginScope._multi&&(me(ue.beginScope,ke),Ce="")),Ae=Object.create(ue,{parent:{value:Ae}}),Ae}function ze(ue,ke,$){let we=Sb(ue.endRe,$);if(we){if(ue["on:end"]){const ge=new kr(ue);ue["on:end"](ke,ge),ge.isMatchIgnored&&(we=!1)}if(we){for(;ue.endsParent&&ue.parent;)ue=ue.parent;return ue}}if(ue.endsWithParent)return ze(ue.parent,ke,$)}function Ye(ue){return Ae.matcher.regexIndex===0?(Ce+=ue[0],1):(Pe=!0,0)}function Re(ue){const ke=ue[0],$=ue.rule,we=new kr($),ge=[$.__beforeBegin,$["on:begin"]];for(const Ie of ge)if(Ie&&(Ie(ue,we),we.isMatchIgnored))return Ye(ke);return $.skip?Ce+=ke:($.excludeBegin&&(Ce+=ke),ne(),!$.returnBegin&&!$.excludeBegin&&(Ce=ke)),oe($,ue),$.returnBegin?0:ke.length}function ee(ue){const ke=ue[0],$=D.substring(ue.index),we=ze(Ae,ue,$);if(!we)return Sr;const ge=Ae;Ae.endScope&&Ae.endScope._wrap?(ne(),le(ke,Ae.endScope._wrap)):Ae.endScope&&Ae.endScope._multi?(ne(),me(Ae.endScope,ue)):ge.skip?Ce+=ke:(ge.returnEnd||ge.excludeEnd||(Ce+=ke),ne(),ge.excludeEnd&&(Ce=ke));do Ae.scope&&Fe.closeNode(),!Ae.skip&&!Ae.subLanguage&&(Ke+=Ae.relevance),Ae=Ae.parent;while(Ae!==we.parent);return we.starts&&oe(we.starts,ue),ge.returnEnd?0:ke.length}function re(){const ue=[];for(let ke=Ae;ke!==ve;ke=ke.parent)ke.scope&&ue.unshift(ke.scope);ue.forEach(ke=>Fe.openNode(ke))}let Ne={};function Be(ue,ke){const $=ke&&ke[0];if(Ce+=ue,$==null)return ne(),0;if(Ne.type==="begin"&&ke.type==="end"&&Ne.index===ke.index&&$===""){if(Ce+=D.slice(ke.index,ke.index+1),!i){const we=new Error(`0 width match regex (${H})`);throw we.languageName=H,we.badRule=Ne.rule,we}return 1}if(Ne=ke,ke.type==="begin")return Re(ke);if(ke.type==="illegal"&&!q){const we=new Error('Illegal lexeme "'+$+'" for mode "'+(Ae.scope||"<unnamed>")+'"');throw we.mode=Ae,we}else if(ke.type==="end"){const we=ee(ke);if(we!==Sr)return we}if(ke.type==="illegal"&&$==="")return Ce+=`
|
||
`,1;if(Ze>1e5&&Ze>ke.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Ce+=$,$.length}const ve=L(H);if(!ve)throw vl(o.replace("{}",H)),new Error('Unknown language: "'+H+'"');const Ue=sk(ve);let Je="",Ae=P||Ue;const Qe={},Fe=new c.__emitter(c);re();let Ce="",Ke=0,De=0,Ze=0,Pe=!1;try{if(ve.__emitTokens)ve.__emitTokens(D,Fe);else{for(Ae.matcher.considerAll();;){Ze++,Pe?Pe=!1:Ae.matcher.considerAll(),Ae.matcher.lastIndex=De;const ue=Ae.matcher.exec(D);if(!ue)break;const ke=D.substring(De,ue.index),$=Be(ke,ue);De=ue.index+$}Be(D.substring(De))}return Fe.finalize(),Je=Fe.toHTML(),{language:H,value:Je,relevance:Ke,illegal:!1,_emitter:Fe,_top:Ae}}catch(ue){if(ue.message&&ue.message.includes("Illegal"))return{language:H,value:ys(D),illegal:!0,relevance:0,_illegalBy:{message:ue.message,index:De,context:D.slice(De-100,De+100),mode:ue.mode,resultSoFar:Je},_emitter:Fe};if(i)return{language:H,value:ys(D),illegal:!1,relevance:0,errorRaised:ue,_emitter:Fe,_top:Ae};throw ue}}function m(H){const D={value:ys(H),illegal:!1,relevance:0,_top:s,_emitter:new c.__emitter(c)};return D._emitter.addText(H),D}function g(H,D){D=D||c.languages||Object.keys(e);const q=m(H),P=D.filter(L).filter(B).map(ne=>h(ne,H,!1));P.unshift(q);const Y=P.sort((ne,le)=>{if(ne.relevance!==le.relevance)return le.relevance-ne.relevance;if(ne.language&&le.language){if(L(ne.language).supersetOf===le.language)return 1;if(L(le.language).supersetOf===ne.language)return-1}return 0}),[Z,J]=Y,te=Z;return te.secondBest=J,te}function b(H,D,q){const P=D&&t[D]||q;H.classList.add("hljs"),H.classList.add(`language-${P}`)}function v(H){let D=null;const q=d(H);if(u(q))return;if(G("before:highlightElement",{el:H,language:q}),H.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",H);return}if(H.children.length>0&&(c.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(H)),c.throwUnescapedHTML))throw new ak("One of your code blocks includes unescaped HTML.",H.innerHTML);D=H;const P=D.textContent,Y=q?p(P,{language:q,ignoreIllegals:!0}):g(P);H.innerHTML=Y.value,H.dataset.highlighted="yes",b(H,q,Y.language),H.result={language:Y.language,re:Y.relevance,relevance:Y.relevance},Y.secondBest&&(H.secondBest={language:Y.secondBest.language,relevance:Y.secondBest.relevance}),G("after:highlightElement",{el:H,result:Y,text:P})}function y(H){c=Tr(c,H)}const E=()=>{N(),ql("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function T(){N(),ql("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let I=!1;function N(){function H(){N()}if(document.readyState==="loading"){I||window.addEventListener("DOMContentLoaded",H,!1),I=!0;return}document.querySelectorAll(c.cssSelector).forEach(v)}function R(H,D){let q=null;try{q=D(n)}catch(P){if(vl("Language definition for '{}' could not be registered.".replace("{}",H)),i)vl(P);else throw P;q=s}q.name||(q.name=H),e[H]=q,q.rawDefinition=D.bind(null,n),q.aliases&&j(q.aliases,{languageName:H})}function M(H){delete e[H];for(const D of Object.keys(t))t[D]===H&&delete t[D]}function A(){return Object.keys(e)}function L(H){return H=(H||"").toLowerCase(),e[H]||e[t[H]]}function j(H,{languageName:D}){typeof H=="string"&&(H=[H]),H.forEach(q=>{t[q.toLowerCase()]=D})}function B(H){const D=L(H);return D&&!D.disableAutodetect}function U(H){H["before:highlightBlock"]&&!H["before:highlightElement"]&&(H["before:highlightElement"]=D=>{H["before:highlightBlock"](Object.assign({block:D.el},D))}),H["after:highlightBlock"]&&!H["after:highlightElement"]&&(H["after:highlightElement"]=D=>{H["after:highlightBlock"](Object.assign({block:D.el},D))})}function z(H){U(H),l.push(H)}function W(H){const D=l.indexOf(H);D!==-1&&l.splice(D,1)}function G(H,D){const q=H;l.forEach(function(P){P[q]&&P[q](D)})}function X(H){return ql("10.7.0","highlightBlock will be removed entirely in v12.0"),ql("10.7.0","Please use highlightElement now."),v(H)}Object.assign(n,{highlight:p,highlightAuto:g,highlightAll:N,highlightElement:v,highlightBlock:X,configure:y,initHighlighting:E,initHighlightingOnLoad:T,registerLanguage:R,unregisterLanguage:M,listLanguages:A,getLanguage:L,registerAliases:j,autoDetection:B,inherit:Tr,addPlugin:z,removePlugin:W}),n.debugMode=function(){i=!1},n.safeMode=function(){i=!0},n.versionString=rk,n.regex={concat:Cl,lookahead:bd,either:Ys,optional:Eb,anyNumberOfTimes:yb};for(const H in Si)typeof Si[H]=="object"&&gd(Si[H]);return Object.assign(n,Si),n},Hl=Ad({});Hl.newInstance=()=>Ad({});var uk=Hl;Hl.HighlightJS=Hl;Hl.default=Hl;const cn=_b(uk),Cr="[A-Za-z$_][0-9A-Za-z$_]*",fk=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],dk=["true","false","null","undefined","NaN","Infinity"],Nd=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Id=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Rd=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],pk=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],hk=[].concat(Rd,Nd,Id);function mk(n){const e=n.regex,t=(q,{after:P})=>{const Y="</"+q[0].slice(1);return q.input.indexOf(Y,P)!==-1},l=Cr,i={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,s={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(q,P)=>{const Y=q[0].length+q.index,Z=q.input[Y];if(Z==="<"||Z===","){P.ignoreMatch();return}Z===">"&&(t(q,{after:Y})||P.ignoreMatch());let J;const te=q.input.substring(Y);if(J=te.match(/^\s*=/)){P.ignoreMatch();return}if((J=te.match(/^\s+extends\s+/))&&J.index===0){P.ignoreMatch();return}}},c={$pattern:Cr,keyword:fk,literal:dk,built_in:hk,"variable.language":pk},u="[0-9](_?[0-9])*",d=`\\.(${u})`,p="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",h={className:"number",variants:[{begin:`(\\b(${p})((${d})|\\.)?|(${d}))[eE][+-]?(${u})\\b`},{begin:`\\b(${p})\\b((${d})\\b|\\.)?|(${d})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},m={className:"subst",begin:"\\$\\{",end:"\\}",keywords:c,contains:[]},g={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[n.BACKSLASH_ESCAPE,m],subLanguage:"xml"}},b={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[n.BACKSLASH_ESCAPE,m],subLanguage:"css"}},v={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[n.BACKSLASH_ESCAPE,m],subLanguage:"graphql"}},y={className:"string",begin:"`",end:"`",contains:[n.BACKSLASH_ESCAPE,m]},T={className:"comment",variants:[n.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:l+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),n.C_BLOCK_COMMENT_MODE,n.C_LINE_COMMENT_MODE]},I=[n.APOS_STRING_MODE,n.QUOTE_STRING_MODE,g,b,v,y,{match:/\$\d+/},h];m.contains=I.concat({begin:/\{/,end:/\}/,keywords:c,contains:["self"].concat(I)});const N=[].concat(T,m.contains),R=N.concat([{begin:/(\s*)\(/,end:/\)/,keywords:c,contains:["self"].concat(N)}]),M={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:R},A={variants:[{match:[/class/,/\s+/,l,/\s+/,/extends/,/\s+/,e.concat(l,"(",e.concat(/\./,l),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,l],scope:{1:"keyword",3:"title.class"}}]},L={relevance:0,match:e.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Nd,...Id]}},j={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},B={variants:[{match:[/function/,/\s+/,l,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[M],illegal:/%/},U={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function z(q){return e.concat("(?!",q.join("|"),")")}const W={match:e.concat(/\b/,z([...Rd,"super","import"].map(q=>`${q}\\s*\\(`)),l,e.lookahead(/\s*\(/)),className:"title.function",relevance:0},G={begin:e.concat(/\./,e.lookahead(e.concat(l,/(?![0-9A-Za-z$_(])/))),end:l,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},X={match:[/get|set/,/\s+/,l,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},M]},H="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+n.UNDERSCORE_IDENT_RE+")\\s*=>",D={match:[/const|var|let/,/\s+/,l,/\s*/,/=\s*/,/(async\s*)?/,e.lookahead(H)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[M]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:c,exports:{PARAMS_CONTAINS:R,CLASS_REFERENCE:L},illegal:/#(?![$_A-z])/,contains:[n.SHEBANG({label:"shebang",binary:"node",relevance:5}),j,n.APOS_STRING_MODE,n.QUOTE_STRING_MODE,g,b,v,y,T,{match:/\$\d+/},h,L,{scope:"attr",match:l+e.lookahead(":"),relevance:0},D,{begin:"("+n.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[T,n.REGEXP_MODE,{className:"function",begin:H,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:n.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:R}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:o},{begin:s.begin,"on:begin":s.isTrulyOpeningTag,end:s.end}],subLanguage:"xml",contains:[{begin:s.begin,end:s.end,skip:!0,contains:["self"]}]}]},B,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+n.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[M,n.inherit(n.TITLE_MODE,{begin:l,className:"title.function"})]},{match:/\.\.\./,relevance:0},G,{match:"\\$"+l,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[M]},W,U,A,X,{match:/\$[(.]/}]}}const Fi="[A-Za-z$_][0-9A-Za-z$_]*",Md=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],Ld=["true","false","null","undefined","NaN","Infinity"],Od=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Dd=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Pd=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],qd=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],jd=[].concat(Pd,Od,Dd);function gk(n){const e=n.regex,t=(q,{after:P})=>{const Y="</"+q[0].slice(1);return q.input.indexOf(Y,P)!==-1},l=Fi,i={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,s={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(q,P)=>{const Y=q[0].length+q.index,Z=q.input[Y];if(Z==="<"||Z===","){P.ignoreMatch();return}Z===">"&&(t(q,{after:Y})||P.ignoreMatch());let J;const te=q.input.substring(Y);if(J=te.match(/^\s*=/)){P.ignoreMatch();return}if((J=te.match(/^\s+extends\s+/))&&J.index===0){P.ignoreMatch();return}}},c={$pattern:Fi,keyword:Md,literal:Ld,built_in:jd,"variable.language":qd},u="[0-9](_?[0-9])*",d=`\\.(${u})`,p="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",h={className:"number",variants:[{begin:`(\\b(${p})((${d})|\\.)?|(${d}))[eE][+-]?(${u})\\b`},{begin:`\\b(${p})\\b((${d})\\b|\\.)?|(${d})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},m={className:"subst",begin:"\\$\\{",end:"\\}",keywords:c,contains:[]},g={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[n.BACKSLASH_ESCAPE,m],subLanguage:"xml"}},b={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[n.BACKSLASH_ESCAPE,m],subLanguage:"css"}},v={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[n.BACKSLASH_ESCAPE,m],subLanguage:"graphql"}},y={className:"string",begin:"`",end:"`",contains:[n.BACKSLASH_ESCAPE,m]},T={className:"comment",variants:[n.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:l+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),n.C_BLOCK_COMMENT_MODE,n.C_LINE_COMMENT_MODE]},I=[n.APOS_STRING_MODE,n.QUOTE_STRING_MODE,g,b,v,y,{match:/\$\d+/},h];m.contains=I.concat({begin:/\{/,end:/\}/,keywords:c,contains:["self"].concat(I)});const N=[].concat(T,m.contains),R=N.concat([{begin:/(\s*)\(/,end:/\)/,keywords:c,contains:["self"].concat(N)}]),M={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:R},A={variants:[{match:[/class/,/\s+/,l,/\s+/,/extends/,/\s+/,e.concat(l,"(",e.concat(/\./,l),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,l],scope:{1:"keyword",3:"title.class"}}]},L={relevance:0,match:e.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Od,...Dd]}},j={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},B={variants:[{match:[/function/,/\s+/,l,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[M],illegal:/%/},U={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function z(q){return e.concat("(?!",q.join("|"),")")}const W={match:e.concat(/\b/,z([...Pd,"super","import"].map(q=>`${q}\\s*\\(`)),l,e.lookahead(/\s*\(/)),className:"title.function",relevance:0},G={begin:e.concat(/\./,e.lookahead(e.concat(l,/(?![0-9A-Za-z$_(])/))),end:l,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},X={match:[/get|set/,/\s+/,l,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},M]},H="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+n.UNDERSCORE_IDENT_RE+")\\s*=>",D={match:[/const|var|let/,/\s+/,l,/\s*/,/=\s*/,/(async\s*)?/,e.lookahead(H)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[M]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:c,exports:{PARAMS_CONTAINS:R,CLASS_REFERENCE:L},illegal:/#(?![$_A-z])/,contains:[n.SHEBANG({label:"shebang",binary:"node",relevance:5}),j,n.APOS_STRING_MODE,n.QUOTE_STRING_MODE,g,b,v,y,T,{match:/\$\d+/},h,L,{scope:"attr",match:l+e.lookahead(":"),relevance:0},D,{begin:"("+n.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[T,n.REGEXP_MODE,{className:"function",begin:H,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:n.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:R}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:o},{begin:s.begin,"on:begin":s.isTrulyOpeningTag,end:s.end}],subLanguage:"xml",contains:[{begin:s.begin,end:s.end,skip:!0,contains:["self"]}]}]},B,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+n.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[M,n.inherit(n.TITLE_MODE,{begin:l,className:"title.function"})]},{match:/\.\.\./,relevance:0},G,{match:"\\$"+l,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[M]},W,U,A,X,{match:/\$[(.]/}]}}function _k(n){const e=n.regex,t=gk(n),l=Fi,i=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],o={begin:[/namespace/,/\s+/,n.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},s={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:i},contains:[t.exports.CLASS_REFERENCE]},c={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},u=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],d={$pattern:Fi,keyword:Md.concat(u),literal:Ld,built_in:jd.concat(i),"variable.language":qd},p={className:"meta",begin:"@"+l},h=(v,y,E)=>{const T=v.contains.findIndex(I=>I.label===y);if(T===-1)throw new Error("can not find mode to replace");v.contains.splice(T,1,E)};Object.assign(t.keywords,d),t.exports.PARAMS_CONTAINS.push(p);const m=t.contains.find(v=>v.scope==="attr"),g=Object.assign({},m,{match:e.concat(l,e.lookahead(/\s*\?:/))});t.exports.PARAMS_CONTAINS.push([t.exports.CLASS_REFERENCE,m,g]),t.contains=t.contains.concat([p,o,s,g]),h(t,"shebang",n.SHEBANG()),h(t,"use_strict",c);const b=t.contains.find(v=>v.label==="func.def");return b.relevance=0,Object.assign(t,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),t}function bk(n){const e=n.regex,t=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),l=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],c={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:l,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},u={className:"meta",begin:/^(>>>|\.\.\.) /},d={className:"subst",begin:/\{/,end:/\}/,keywords:c,illegal:/#/},p={begin:/\{\{/,relevance:0},h={className:"string",contains:[n.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[n.BACKSLASH_ESCAPE,u],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[n.BACKSLASH_ESCAPE,u],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[n.BACKSLASH_ESCAPE,u,p,d]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[n.BACKSLASH_ESCAPE,u,p,d]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[n.BACKSLASH_ESCAPE,p,d]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[n.BACKSLASH_ESCAPE,p,d]},n.APOS_STRING_MODE,n.QUOTE_STRING_MODE]},m="[0-9](_?[0-9])*",g=`(\\b(${m}))?\\.(${m})|\\b(${m})\\.`,b=`\\b|${l.join("|")}`,v={className:"number",relevance:0,variants:[{begin:`(\\b(${m})|(${g}))[eE][+-]?(${m})[jJ]?(?=${b})`},{begin:`(${g})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${b})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${b})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${b})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${b})`},{begin:`\\b(${m})[jJ](?=${b})`}]},y={className:"comment",begin:e.lookahead(/# type:/),end:/$/,keywords:c,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},E={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:["self",u,v,h,n.HASH_COMMENT_MODE]}]};return d.contains=[h,v,u],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:c,illegal:/(<\/|\?)|=>/,contains:[u,v,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},h,y,n.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,t],scope:{1:"keyword",3:"title.function"},contains:[E]},{variants:[{match:[/\bclass/,/\s+/,t,/\s*/,/\(\s*/,t,/\s*\)/]},{match:[/\bclass/,/\s+/,t]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[v,E,h]}]}}function kk(n){const o={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:o,illegal:"</",contains:[n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE,{className:"string",variants:[n.QUOTE_STRING_MODE,n.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[n.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:o,illegal:/["']/}]}]}}function vk(n){const e=n.regex,t={},l={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[t]}]};Object.assign(t,{className:"variable",variants:[{begin:e.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},l]});const i={className:"subst",begin:/\$\(/,end:/\)/,contains:[n.BACKSLASH_ESCAPE]},o=n.inherit(n.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),s={begin:/<<-?\s*(?=\w+)/,starts:{contains:[n.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},c={className:"string",begin:/"/,end:/"/,contains:[n.BACKSLASH_ESCAPE,t,i]};i.contains.push(c);const u={match:/\\"/},d={className:"string",begin:/'/,end:/'/},p={match:/\\'/},h={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},n.NUMBER_MODE,t]},m=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],g=n.SHEBANG({binary:`(${m.join("|")})`,relevance:10}),b={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[n.inherit(n.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},v=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],y=["true","false"],E={match:/(\/[a-z._-]+)+/},T=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],I=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],N=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],R=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:v,literal:y,built_in:[...T,...I,"set","shopt",...N,...R]},contains:[g,n.SHEBANG(),b,h,o,s,E,c,u,d,p,t]}}function wk(n){const e={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},t={match:/[{}[\],:]/,className:"punctuation",relevance:0},l=["true","false","null"],i={scope:"literal",beginKeywords:l.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:l},contains:[e,t,n.QUOTE_STRING_MODE,i,n.C_NUMBER_MODE,n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}function yk(n){const e="true false yes no null",t="[\\w#;/?:@&=+$,.~*'()[\\]]+",l={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},i={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},o={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},s={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[n.BACKSLASH_ESCAPE,i]},c=n.inherit(s,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),m={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},g={end:",",endsWithParent:!0,excludeEnd:!0,keywords:e,relevance:0},b={begin:/\{/,end:/\}/,contains:[g],illegal:"\\n",relevance:0},v={begin:"\\[",end:"\\]",contains:[g],illegal:"\\n",relevance:0},y=[l,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+t},{className:"type",begin:"!<"+t+">"},{className:"type",begin:"!"+t},{className:"type",begin:"!!"+t},{className:"meta",begin:"&"+n.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+n.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},n.HASH_COMMENT_MODE,{beginKeywords:e,keywords:{literal:e}},m,{className:"number",begin:n.C_NUMBER_RE+"\\b",relevance:0},b,v,o,s],E=[...y];return E.pop(),E.push(c),g.contains=E,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:y}}function Ek(n){const e=n.regex,t={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},l={begin:"^[-\\*]{3,}",end:"$"},i={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},o={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},s={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},c=/[A-Za-z][A-Za-z0-9+.-]*/,u={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:e.concat(/\[.+?\]\(/,c,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},d={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},p={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},h=n.inherit(d,{contains:[]}),m=n.inherit(p,{contains:[]});d.contains.push(m),p.contains.push(h);let g=[t,u];return[d,p,h,m].forEach(E=>{E.contains=E.contains.concat(g)}),g=g.concat(d,p),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:g},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:g}]}]},t,o,d,p,{className:"quote",begin:"^>\\s+",contains:g,end:"$"},i,l,u,s,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}const Tk=n=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:n.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[n.APOS_STRING_MODE,n.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:n.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),Sk=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],Ck=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],Ak=[...Sk,...Ck],Nk=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),Ik=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),Rk=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),Mk=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function Lk(n){const e=n.regex,t=Tk(n),l={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},i="and or not only",o=/@-?\w[\w]*(-\w+)*/,s="[a-zA-Z-][a-zA-Z0-9_-]*",c=[n.APOS_STRING_MODE,n.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[t.BLOCK_COMMENT,l,t.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+s,relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+Ik.join("|")+")"},{begin:":(:)?("+Rk.join("|")+")"}]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Mk.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[t.BLOCK_COMMENT,t.HEXCOLOR,t.IMPORTANT,t.CSS_NUMBER_MODE,...c,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...c,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},t.FUNCTION_DISPATCH]},{begin:e.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:o},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:i,attribute:Nk.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...c,t.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+Ak.join("|")+")\\b"}]}}function Ok(n){const e=n.regex,t=n.COMMENT("--","$"),l={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},i={begin:/"/,end:/"/,contains:[{match:/""/}]},o=["true","false","unknown"],s=["double precision","large object","with timezone","without timezone"],c=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],u=["add","asc","collation","desc","final","first","last","view"],d=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],p=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],h=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],m=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],g=p,b=[...d,...u].filter(R=>!p.includes(R)),v={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},y={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},E={match:e.concat(/\b/,e.either(...g),/\s*\(/),relevance:0,keywords:{built_in:g}};function T(R){return e.concat(/\b/,e.either(...R.map(M=>M.replace(/\s+/,"\\s+"))),/\b/)}const I={scope:"keyword",match:T(m),relevance:0};function N(R,{exceptions:M,when:A}={}){const L=A;return M=M||[],R.map(j=>j.match(/\|\d+$/)||M.includes(j)?j:L(j)?`${j}|0`:j)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:N(b,{when:R=>R.length<3}),literal:o,type:c,built_in:h},contains:[{scope:"type",match:T(s)},I,E,v,l,i,n.C_NUMBER_MODE,n.C_BLOCK_COMMENT_MODE,t,y]}}function Dk(n){const e=n.regex,t=e.concat(/[\p{L}_]/u,e.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),l=/[\p{L}0-9._:-]+/u,i={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},o={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},s=n.inherit(o,{begin:/\(/,end:/\)/}),c=n.inherit(n.APOS_STRING_MODE,{className:"string"}),u=n.inherit(n.QUOTE_STRING_MODE,{className:"string"}),d={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:l,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[o,u,c,s,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[o,s,u,c]}]}]},n.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[u]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[d],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[d],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:e.concat(/</,e.lookahead(e.concat(t,e.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:t,relevance:0,starts:d}]},{className:"tag",begin:e.concat(/<\//,e.lookahead(e.concat(t,/>/))),contains:[{className:"name",begin:t,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}cn.registerLanguage("javascript",mk);cn.registerLanguage("typescript",_k);cn.registerLanguage("python",bk);cn.registerLanguage("go",kk);cn.registerLanguage("bash",vk);cn.registerLanguage("json",wk);cn.registerLanguage("yaml",yk);cn.registerLanguage("markdown",Ek);cn.registerLanguage("css",Lk);cn.registerLanguage("sql",Ok);cn.registerLanguage("xml",Dk);const zd=/^(https?|mailto|verstak):/i,Bd=new Set(["case","note","file","secret"]);md.addHook("afterSanitizeAttributes",n=>{if(n.tagName==="A"){const e=(n.getAttribute("href")||"").trim();if(n.hasAttribute("data-verstak-href"))return;zd.test(e)||(n.removeAttribute("href"),n.setAttribute("data-blocked-href",e),n.classList.add("md-link--blocked"),n.setAttribute("role","link"),n.setAttribute("aria-disabled","true"))}n.tagName==="IMG"&&n.remove()});const Vl=new ht.Renderer;Vl.link=function({href:n,title:e,text:t}){const l=(n||"").trim();if(!zd.test(l)){const c=kl(t);return`<span class="md-link--blocked" data-blocked-href="${Jn(l)}" role="link" aria-disabled="true">${c}</span>`}if(l.startsWith("verstak://")){const c=Fd(l);if(c&&Bd.has(c.type)){const p=Jn(l),h=kl(t);return`<a href="#" class="md-link md-link--internal" data-verstak-href="${p}" data-verstak-type="${Jn(c.type)}" data-verstak-id="${Jn(c.id)}">${h}</a>`}const u=kl(t);return`<span class="md-link--blocked" data-blocked-href="${Jn(l)}">${u}</span>`}const i=Jn(l),o=kl(t),s=e?` title="${Jn(e)}"`:"";return`<a href="${i}" class="md-link md-link--external" target="_blank" rel="noopener noreferrer"${s}>${o}</a>`};Vl.image=function({href:n,title:e,text:t}){return`<span class="md-image-blocked" title="Images are not supported yet">[Image: ${kl(t)}]</span>`};Vl.code=function({text:n,lang:e}){const t=e&&cn.getLanguage(e)?e:"plaintext";let l;try{l=cn.highlight(n,{language:t}).value}catch{l=kl(n)}return`<pre class="md-code-block"><code class="hljs language-${Jn(t)}">${l}</code></pre>`};Vl.codespan=function({text:n}){return`<code class="md-code-inline">${kl(n)}</code>`};Vl.listitem=function({text:n,task:e,checked:t}){return e?`<li class="md-task-item"><input type="checkbox" disabled ${t?"checked":""} class="md-task-checkbox"/><span class="md-task-text">${n}</span></li>`:`<li>${n}</li>`};ht.setOptions({renderer:Vl,gfm:!0,breaks:!1,pedantic:!1});function Pk(n){const e=ht.parse(n);return md.sanitize(e,{ADD_ATTR:["target","class","data-verstak-href","data-verstak-type","data-verstak-id","data-blocked-href","role","aria-disabled","checked"],ADD_TAGS:["input","span"],ALLOW_UNKNOWN_PROTOCOLS:!0})}function Fd(n){const e=n.match(/^verstak:\/\/([a-zA-Z_]+)\/(.+)$/);return e?{type:e[1],id:e[2]}:null}function qk(n){return n.replace(/([[\]()])/g,"\\$1")}function jk(n){return Bd.has(n)}function kl(n){return n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Jn(n){return n.replace(/"/g,""").replace(/'/g,"'")}function zk(n){let e,t;return{c(){e=new Di(!1),t=_t(),e.a=t},m(l,i){e.m(n[1],l,i),C(l,t,i)},p(l,i){i&2&&e.p(l[1])},d(l){l&&(S(t),e.d())}}}function Bk(n){let e;return{c(){e=f("div"),e.textContent=`${k("note.preview.empty")}`,r(e,"class","md-empty svelte-jdvhib")},m(t,l){C(t,e,l)},p:ie,d(t){t&&S(e)}}}function Fk(n){let e,t,l,i,o;return{c(){e=f("div"),t=f("p"),t.textContent=`⚠️ ${k("note.preview.error")}`,l=w(),i=f("p"),o=F(n[2]),r(i,"class","md-error-detail svelte-jdvhib"),r(e,"class","md-error svelte-jdvhib")},m(s,c){C(s,e,c),a(e,t),a(e,l),a(e,i),a(i,o)},p(s,c){c&4&&Q(o,s[2])},d(s){s&&S(e)}}}function Uk(n){let e,t,l,i;function o(u,d){var p;return d&1&&(t=null),u[2]?Fk:(t==null&&(t=!((p=u[0])!=null&&p.trim())),t?Bk:zk)}let s=o(n,-1),c=s(n);return{c(){e=f("div"),c.c(),r(e,"class","markdown-body svelte-jdvhib"),r(e,"role","article"),r(e,"tabindex","0")},m(u,d){C(u,e,d),c.m(e,null),l||(i=[O(e,"click",n[3]),O(e,"keydown",n[4])],l=!0)},p(u,[d]){s===(s=o(u,d))&&c?c.p(u,d):(c.d(1),c=s(u),c&&(c.c(),c.m(e,null)))},i:ie,o:ie,d(u){u&&S(e),c.d(),l=!1,Se(i)}}}function Hk(n,e,t){let{content:l=""}=e;const i=bn();let o="",s="";function c(d){const p=d.target.closest("[data-verstak-href]");if(!p)return;const h=p.getAttribute("data-verstak-href");if(!h)return;d.preventDefault(),d.stopPropagation();const m=Fd(h);!m||!jk(m.type)||i("verstak-link",{type:m.type,id:m.id,href:h})}const u=d=>{(d.key==="Enter"||d.key===" ")&&c(d)};return n.$$set=d=>{"content"in d&&t(0,l=d.content)},n.$$.update=()=>{if(n.$$.dirty&1)try{t(1,o=Pk(l||"")),t(2,s="")}catch(d){t(2,s=String(d)),t(1,o="")}},[l,o,s,c,u]}class Tl extends ct{constructor(e){super(),at(this,e,Hk,Uk,rt,{content:0})}}function Wk(n){let e,t,l,i,o,s;return{c(){e=f("div"),t=f("p"),t.textContent=`${k("file.previewUnavailable")}`,l=w(),i=f("button"),i.textContent=`${k("file.openExternal")}`,r(i,"class","btn btn-sm svelte-1h605ik"),r(e,"class","preview-status svelte-1h605ik")},m(c,u){C(c,e,u),a(e,t),a(e,l),a(e,i),o||(s=O(i,"click",n[10]),o=!0)},p:ie,i:ie,o:ie,d(c){c&&S(e),o=!1,s()}}}function Gk(n){let e,t;function l(s,c){return c&2&&(e=null),e==null&&(e=!!(s[1]&&s[1].startsWith("data:"))),e?Qk:Jk}let i=l(n,-1),o=i(n);return{c(){o.c(),t=_t()},m(s,c){o.m(s,c),C(s,t,c)},p(s,c){i===(i=l(s,c))&&o?o.p(s,c):(o.d(1),o=i(s),o&&(o.c(),o.m(t.parentNode,t)))},i:ie,o:ie,d(s){s&&S(t),o.d(s)}}}function Kk(n){let e,t,l;return{c(){e=f("pre"),t=f("code"),l=F(n[1]),r(e,"class","preview-text svelte-1h605ik")},m(i,o){C(i,e,o),a(e,t),a(t,l)},p(i,o){o&2&&Q(l,i[1])},i:ie,o:ie,d(i){i&&S(e)}}}function Vk(n){let e,t,l;return t=new Tl({props:{content:n[1]}}),{c(){e=f("div"),Ge(t.$$.fragment),r(e,"class","preview-markdown-container svelte-1h605ik")},m(i,o){C(i,e,o),He(t,e,null),l=!0},p(i,o){const s={};o&2&&(s.content=i[1]),t.$set(s)},i(i){l||(fe(t.$$.fragment,i),l=!0)},o(i){be(t.$$.fragment,i),l=!1},d(i){i&&S(e),We(t)}}}function Zk(n){let e,t,l,i;return{c(){e=f("div"),t=f("img"),Ul(t.src,l=n[1])||r(t,"src",l),r(t,"alt",i=n[0].name),r(t,"class","preview-image svelte-1h605ik"),r(e,"class","preview-image-container svelte-1h605ik")},m(o,s){C(o,e,s),a(e,t)},p(o,s){s&2&&!Ul(t.src,l=o[1])&&r(t,"src",l),s&1&&i!==(i=o[0].name)&&r(t,"alt",i)},i:ie,o:ie,d(o){o&&S(e)}}}function Yk(n){let e,t,l,i,o,s,c;return{c(){e=f("div"),t=f("p"),l=F(n[3]),i=w(),o=f("button"),o.textContent=`${k("file.openExternal")}`,r(o,"class","btn btn-sm svelte-1h605ik"),r(e,"class","preview-status svelte-1h605ik")},m(u,d){C(u,e,d),a(e,t),a(t,l),a(e,i),a(e,o),s||(c=O(o,"click",n[10]),s=!0)},p(u,d){d&8&&Q(l,u[3])},i:ie,o:ie,d(u){u&&S(e),s=!1,c()}}}function Xk(n){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${k("common.loading")}`,r(e,"class","preview-status svelte-1h605ik")},m(l,i){C(l,e,i),a(e,t)},p:ie,i:ie,o:ie,d(l){l&&S(e)}}}function Jk(n){let e,t,l,i,o,s;return{c(){e=f("div"),t=f("p"),t.textContent=`${k("file.pdfUnavailable")}`,l=w(),i=f("button"),i.textContent=`${k("file.openExternal")}`,r(i,"class","btn btn-sm svelte-1h605ik"),r(e,"class","preview-status svelte-1h605ik")},m(c,u){C(c,e,u),a(e,t),a(e,l),a(e,i),o||(s=O(i,"click",n[10]),o=!0)},p:ie,d(c){c&&S(e),o=!1,s()}}}function Qk(n){let e,t,l;return{c(){e=f("div"),t=f("embed"),Ul(t.src,l=n[1])||r(t,"src",l),r(t,"type","application/pdf"),r(t,"class","preview-pdf svelte-1h605ik"),r(e,"class","preview-pdf-container svelte-1h605ik")},m(i,o){C(i,e,o),a(e,t)},p(i,o){o&2&&!Ul(t.src,l=i[1])&&r(t,"src",l)},d(i){i&&S(e)}}}function xk(n){let e,t,l,i,o,s,c,u=n[0].name+"",d,p,h,m,g=Pi(n[0].size)+"",b,v,y=Yo(n[0].mime)+"",E,T,I,N,R,M,A,L,j,B,U,z,W,G;o=new Kf({props:{kind:n[9],size:18}});const X=[Xk,Yk,Zk,Vk,Kk,Gk,Wk],H=[];function D(q,P){return q[2]?0:q[3]?1:q[7]&&q[1]?2:q[4]?3:q[6]?4:q[5]?5:6}return A=D(n),L=H[A]=X[A](n),{c(){e=f("div"),t=f("div"),l=f("header"),i=f("div"),Ge(o.$$.fragment),s=w(),c=f("span"),d=F(u),h=w(),m=f("div"),b=F(g),v=F(" · "),E=F(y),T=w(),I=f("div"),N=f("button"),N.innerHTML='<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>',R=w(),M=f("div"),L.c(),j=w(),B=f("footer"),U=f("button"),U.textContent=`${k("file.openExternal")}`,r(c,"class","preview-name svelte-1h605ik"),r(c,"title",p=n[0].name),r(i,"class","preview-title svelte-1h605ik"),r(m,"class","preview-meta svelte-1h605ik"),r(N,"class","action-btn action-btn-close svelte-1h605ik"),r(N,"title","Close"),r(N,"aria-label","Close preview"),r(I,"class","preview-actions svelte-1h605ik"),r(l,"class","preview-header svelte-1h605ik"),r(M,"class","preview-body svelte-1h605ik"),r(U,"class","btn btn-sm svelte-1h605ik"),r(B,"class","preview-footer svelte-1h605ik"),r(t,"class","modal svelte-1h605ik"),r(e,"class","overlay svelte-1h605ik"),r(e,"role","presentation")},m(q,P){C(q,e,P),a(e,t),a(t,l),a(l,i),He(o,i,null),a(i,s),a(i,c),a(c,d),a(l,h),a(l,m),a(m,b),a(m,v),a(m,E),a(l,T),a(l,I),a(I,N),a(t,R),a(t,M),H[A].m(M,null),a(t,j),a(t,B),a(B,U),z=!0,W||(G=[O(N,"click",n[11]),O(U,"click",n[10]),O(e,"click",Jt(n[12])),O(e,"keydown",n[13])],W=!0)},p(q,[P]){(!z||P&1)&&u!==(u=q[0].name+"")&&Q(d,u),(!z||P&1&&p!==(p=q[0].name))&&r(c,"title",p),(!z||P&1)&&g!==(g=Pi(q[0].size)+"")&&Q(b,g),(!z||P&1)&&y!==(y=Yo(q[0].mime)+"")&&Q(E,y);let Y=A;A=D(q),A===Y?H[A].p(q,P):(ft(),be(H[Y],1,1,()=>{H[Y]=null}),dt(),L=H[A],L?L.p(q,P):(L=H[A]=X[A](q),L.c()),fe(L,1),L.m(M,null))},i(q){z||(fe(o.$$.fragment,q),fe(L),z=!0)},o(q){be(o.$$.fragment,q),be(L),z=!1},d(q){q&&S(e),We(o),H[A].d(),W=!1,Se(G)}}}function $k(n,e,t){let l,i,o,s,{item:c}=e,{content:u=""}=e,{loading:d=!1}=e,{error:p=""}=e;const h=bn(),m=Vf(c);function g(T){T.key==="Escape"&&h("close")}function b(){h("openExternal",c.fileId)}ci(()=>{window.addEventListener("keydown",g)}),ui(()=>{window.removeEventListener("keydown",g)});const v=()=>h("close"),y=()=>h("close"),E=T=>{T.key==="Escape"&&(T.preventDefault(),h("close"))};return n.$$set=T=>{"item"in T&&t(0,c=T.item),"content"in T&&t(1,u=T.content),"loading"in T&&t(2,d=T.loading),"error"in T&&t(3,p=T.error)},n.$$.update=()=>{n.$$.dirty&3&&t(7,l=xf(c)&&u&&u.startsWith("data:")),n.$$.dirty&3&&t(4,i=ii(c)&&u),n.$$.dirty&19&&t(6,o=($f(c)||ii(c))&&u&&!i),n.$$.dirty&1&&t(5,s=ed(c))},[c,u,d,p,i,s,o,l,h,m,b,v,y,E]}class Ud extends ct{constructor(e){super(),at(this,e,$k,xk,rt,{item:0,content:1,loading:2,error:3})}}function ev(n){let e,t,l,i,o,s,c,u,d,p,h,m,g,b,v,y,E;return{c(){e=f("div"),t=f("div"),l=f("h3"),i=F(n[0]),o=w(),s=f("p"),c=F(n[1]),u=w(),d=f("div"),p=f("button"),h=F(n[2]),g=w(),b=f("button"),v=F(n[3]),r(l,"class","svelte-1fv6yyk"),r(s,"class","message svelte-1fv6yyk"),r(p,"class",m="btn "+(n[4]?"btn-danger":"btn-primary")+" svelte-1fv6yyk"),r(b,"class","btn svelte-1fv6yyk"),r(d,"class","actions svelte-1fv6yyk"),r(t,"class","modal svelte-1fv6yyk"),r(e,"class","overlay svelte-1fv6yyk"),r(e,"role","presentation")},m(T,I){C(T,e,I),a(e,t),a(t,l),a(l,i),a(t,o),a(t,s),a(s,c),a(t,u),a(t,d),a(d,p),a(p,h),a(d,g),a(d,b),a(b,v),y||(E=[O(p,"click",n[6]),O(b,"click",n[7]),O(e,"click",Jt(n[8])),O(e,"keydown",n[9])],y=!0)},p(T,[I]){I&1&&Q(i,T[0]),I&2&&Q(c,T[1]),I&4&&Q(h,T[2]),I&16&&m!==(m="btn "+(T[4]?"btn-danger":"btn-primary")+" svelte-1fv6yyk")&&r(p,"class",m),I&8&&Q(v,T[3])},i:ie,o:ie,d(T){T&&S(e),y=!1,Se(E)}}}function tv(n,e,t){let{title:l=k("common.confirm")}=e,{message:i=""}=e,{confirmText:o=k("common.delete")}=e,{cancelText:s=k("common.cancel")}=e,{danger:c=!1}=e;const u=bn(),d=()=>u("confirm"),p=()=>u("cancel"),h=()=>u("cancel"),m=g=>{g.key==="Escape"&&(g.preventDefault(),u("cancel"))};return n.$$set=g=>{"title"in g&&t(0,l=g.title),"message"in g&&t(1,i=g.message),"confirmText"in g&&t(2,o=g.confirmText),"cancelText"in g&&t(3,s=g.cancelText),"danger"in g&&t(4,c=g.danger)},[l,i,o,s,c,u,d,p,h,m]}class Hd extends ct{constructor(e){super(),at(this,e,tv,ev,rt,{title:0,message:1,confirmText:2,cancelText:3,danger:4})}}function nv(n){let e,t,l;return{c(){e=ae("circle"),t=ae("line"),l=ae("line"),r(e,"cx","12"),r(e,"cy","12"),r(e,"r","10"),r(t,"x1","12"),r(t,"y1","16"),r(t,"x2","12"),r(t,"y2","12"),r(l,"x1","12"),r(l,"y1","8"),r(l,"x2","12.01"),r(l,"y2","8")},m(i,o){C(i,e,o),C(i,t,o),C(i,l,o)},d(i){i&&(S(e),S(t),S(l))}}}function lv(n){let e,t,l,i;return{c(){e=ae("rect"),t=ae("polyline"),l=ae("line"),i=ae("line"),r(e,"x","3"),r(e,"y","5"),r(e,"width","18"),r(e,"height","14"),r(e,"rx","2"),r(t,"points","3 10 21 10"),r(l,"x1","8"),r(l,"y1","5"),r(l,"x2","8"),r(l,"y2","19"),r(i,"x1","16"),r(i,"y1","5"),r(i,"x2","16"),r(i,"y2","19")},m(o,s){C(o,e,s),C(o,t,s),C(o,l,s),C(o,i,s)},d(o){o&&(S(e),S(t),S(l),S(i))}}}function iv(n){let e,t;return{c(){e=ae("path"),t=ae("polyline"),r(e,"d","M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"),r(t,"points","13 2 13 9 20 9")},m(l,i){C(l,e,i),C(l,t,i)},d(l){l&&(S(e),S(t))}}}function sv(n){let e,t;return{c(){e=ae("path"),t=ae("path"),r(e,"d","M12 20h9"),r(t,"d","M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z")},m(l,i){C(l,e,i),C(l,t,i)},d(l){l&&(S(e),S(t))}}}function ov(n){let e,t,l,i,o;return{c(){e=ae("path"),t=ae("path"),l=ae("line"),i=ae("line"),o=ae("line"),r(e,"d","M4 19.5A2.5 2.5 0 0 1 6.5 17H20"),r(t,"d","M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"),r(l,"x1","8"),r(l,"y1","7"),r(l,"x2","16"),r(l,"y2","7"),r(i,"x1","8"),r(i,"y1","11"),r(i,"x2","14"),r(i,"y2","11"),r(o,"x1","8"),r(o,"y1","15"),r(o,"x2","12"),r(o,"y2","15")},m(s,c){C(s,e,c),C(s,t,c),C(s,l,c),C(s,i,c),C(s,o,c)},d(s){s&&(S(e),S(t),S(l),S(i),S(o))}}}function rv(n){let e,t,l,i;return{c(){e=ae("path"),t=ae("polyline"),l=ae("line"),i=ae("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(l,"x1","16"),r(l,"y1","13"),r(l,"x2","8"),r(l,"y2","13"),r(i,"x1","16"),r(i,"y1","17"),r(i,"x2","8"),r(i,"y2","17")},m(o,s){C(o,e,s),C(o,t,s),C(o,l,s),C(o,i,s)},d(o){o&&(S(e),S(t),S(l),S(i))}}}function av(n){let e,t;return{c(){e=ae("path"),t=ae("circle"),r(e,"d","M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"),r(t,"cx","12"),r(t,"cy","7"),r(t,"r","4")},m(l,i){C(l,e,i),C(l,t,i)},d(l){l&&(S(e),S(t))}}}function cv(n){let e,t,l,i;return{c(){e=ae("rect"),t=ae("rect"),l=ae("rect"),i=ae("rect"),r(e,"x","3"),r(e,"y","3"),r(e,"width","7"),r(e,"height","7"),r(e,"rx","1"),r(t,"x","14"),r(t,"y","3"),r(t,"width","7"),r(t,"height","4"),r(t,"rx","1"),r(l,"x","14"),r(l,"y","10"),r(l,"width","7"),r(l,"height","11"),r(l,"rx","1"),r(i,"x","3"),r(i,"y","14"),r(i,"width","7"),r(i,"height","7"),r(i,"rx","1")},m(o,s){C(o,e,s),C(o,t,s),C(o,l,s),C(o,i,s)},d(o){o&&(S(e),S(t),S(l),S(i))}}}function uv(n){let e;return{c(){e=ae("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,l){C(t,e,l)},d(t){t&&S(e)}}}function fv(n){let e;function t(o,s){return o[0]==="folder"?uv:o[0]==="project"?cv:o[0]==="client"?av:o[0]==="document"?rv:o[0]==="recipe"?ov:o[0]==="note"?sv:o[0]==="file"?iv:o[0]==="case"?lv:nv}let l=t(n),i=l(n);return{c(){e=ae("svg"),i.c(),r(e,"width",n[1]),r(e,"height",n[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(o,s){C(o,e,s),i.m(e,null)},p(o,[s]){l!==(l=t(o))&&(i.d(1),i=l(o),i&&(i.c(),i.m(e,null))),s&2&&r(e,"width",o[1]),s&2&&r(e,"height",o[1])},i:ie,o:ie,d(o){o&&S(e),i.d()}}}function dv(n,e,t){let{kind:l="generic"}=e,{size:i=18}=e;return n.$$set=o=>{"kind"in o&&t(0,l=o.kind),"size"in o&&t(1,i=o.size)},[l,i]}class Zi extends ct{constructor(e){super(),at(this,e,dv,fv,rt,{kind:0,size:1})}}function Ar(n,e,t){const l=n.slice();return l[44]=e[t],l}function pv(n){let e;return{c(){e=f("span"),r(e,"class","tree-toggle-placeholder svelte-zj71cl")},m(t,l){C(t,e,l)},p:ie,d(t){t&&S(e)}}}function hv(n){let e,t,l=n[1][n[44].id]?"▾":"▸",i,o,s;function c(){return n[25](n[44])}return{c(){e=f("button"),t=f("span"),i=F(l),r(t,"class","tree-arrow"),r(e,"class","tree-toggle svelte-zj71cl")},m(u,d){C(u,e,d),a(e,t),a(t,i),o||(s=O(e,"click",Ve(c)),o=!0)},p(u,d){n=u,d[0]&3&&l!==(l=n[1][n[44].id]?"▾":"▸")&&Q(i,l)},d(u){u&&S(e),o=!1,s()}}}function Nr(n){let e,t;return e=new Wd({props:{nodes:n[44].children||[],expanded:n[1],selectedNodeId:n[2],level:n[3]+1,onSelect:n[4],onToggle:n[5],onContextMenu:n[6],onDrop:n[7]}}),{c(){Ge(e.$$.fragment)},m(l,i){He(e,l,i),t=!0},p(l,i){const o={};i[0]&1&&(o.nodes=l[44].children||[]),i[0]&2&&(o.expanded=l[1]),i[0]&4&&(o.selectedNodeId=l[2]),i[0]&8&&(o.level=l[3]+1),i[0]&16&&(o.onSelect=l[4]),i[0]&32&&(o.onToggle=l[5]),i[0]&64&&(o.onContextMenu=l[6]),i[0]&128&&(o.onDrop=l[7]),e.$set(o)},i(l){t||(fe(e.$$.fragment,l),t=!0)},o(l){be(e.$$.fragment,l),t=!1},d(l){We(e,l)}}}function Ir(n,e){let t,l,i,o,s,c,u,d=e[44].title+"",p,h,m=e[1][e[44].id]&&Ds(e[44]),g,b,v,y;function E(D,q){return q[0]&1&&(l=null),l==null&&(l=!!ni(D[44])),l?hv:pv}let T=E(e,[-1,-1]),I=T(e);s=new Zi({props:{kind:Rr(e[44]),size:16}});function N(...D){return e[26](e[44],...D)}function R(...D){return e[27](e[44],...D)}function M(){return e[28](e[44])}function A(...D){return e[29](e[44],...D)}function L(...D){return e[30](e[44],...D)}function j(...D){return e[31](e[44],...D)}function B(...D){return e[32](e[44],...D)}function U(...D){return e[33](e[44],...D)}function z(...D){return e[34](e[44],...D)}function W(...D){return e[35](e[44],...D)}function G(...D){return e[36](e[44],...D)}function X(...D){return e[37](e[44],...D)}let H=m&&Nr(e);return{key:n,first:null,c(){t=f("div"),I.c(),i=w(),o=f("span"),Ge(s.$$.fragment),c=w(),u=f("span"),p=F(d),h=w(),H&&H.c(),g=_t(),r(o,"class","tree-icon svelte-zj71cl"),r(o,"role","button"),r(o,"tabindex","-1"),r(u,"class","tree-label svelte-zj71cl"),r(u,"role","button"),r(u,"tabindex","-1"),r(t,"class","tree-item svelte-zj71cl"),an(t,"padding-left",e[3]*16+4+"px"),r(t,"draggable","true"),r(t,"role","button"),r(t,"tabindex","0"),ce(t,"selected",e[2]===e[44].id),ce(t,"drop-valid",e[8]===e[44].id&&e[9][e[44].id]),ce(t,"drop-invalid",e[8]===e[44].id&&!e[9][e[44].id]),this.first=t},m(D,q){C(D,t,q),I.m(t,null),a(t,i),a(t,o),He(s,o,null),a(t,c),a(t,u),a(u,p),C(D,h,q),H&&H.m(D,q),C(D,g,q),b=!0,v||(y=[O(o,"click",N),O(o,"keydown",R),O(o,"dblclick",Ve(e[24])),O(u,"click",Ve(M)),O(u,"keydown",A),O(t,"dragstart",L),O(t,"dragover",j),O(t,"dragleave",B),O(t,"drop",U),O(t,"click",z),O(t,"keydown",W),O(t,"dblclick",G),O(t,"contextmenu",Wi(X))],v=!0)},p(D,q){e=D,T===(T=E(e,q))&&I?I.p(e,q):(I.d(1),I=T(e),I&&(I.c(),I.m(t,i)));const P={};q[0]&1&&(P.kind=Rr(e[44])),s.$set(P),(!b||q[0]&1)&&d!==(d=e[44].title+"")&&Q(p,d),(!b||q[0]&8)&&an(t,"padding-left",e[3]*16+4+"px"),(!b||q[0]&5)&&ce(t,"selected",e[2]===e[44].id),(!b||q[0]&769)&&ce(t,"drop-valid",e[8]===e[44].id&&e[9][e[44].id]),(!b||q[0]&769)&&ce(t,"drop-invalid",e[8]===e[44].id&&!e[9][e[44].id]),q[0]&3&&(m=e[1][e[44].id]&&Ds(e[44])),m?H?(H.p(e,q),q[0]&3&&fe(H,1)):(H=Nr(e),H.c(),fe(H,1),H.m(g.parentNode,g)):H&&(ft(),be(H,1,1,()=>{H=null}),dt())},i(D){b||(fe(s.$$.fragment,D),fe(H),b=!0)},o(D){be(s.$$.fragment,D),be(H),b=!1},d(D){D&&(S(t),S(h),S(g)),I.d(),We(s),H&&H.d(D),v=!1,Se(y)}}}function mv(n){let e=[],t=new Map,l,i,o,s,c=Te(n[0]);const u=d=>d[44].id;for(let d=0;d<c.length;d+=1){let p=Ar(n,c,d),h=u(p);t.set(h,e[d]=Ir(h,p))}return{c(){for(let d=0;d<e.length;d+=1)e[d].c();l=_t()},m(d,p){for(let h=0;h<e.length;h+=1)e[h]&&e[h].m(d,p);C(d,l,p),i=!0,o||(s=O(window,"dragend",n[14]),o=!0)},p(d,p){p[0]&2080767&&(c=Te(d[0]),ft(),e=Gf(e,p,u,1,d,c,t,l.parentNode,Wf,Ir,l,Ar),dt())},i(d){if(!i){for(let p=0;p<c.length;p+=1)fe(e[p]);i=!0}},o(d){for(let p=0;p<e.length;p+=1)be(e[p]);i=!1},d(d){d&&S(l);for(let p=0;p<e.length;p+=1)e[p].d(d);o=!1,s()}}}function Rr(n){return n.type==="client"||n.template_id==="client.default"?"client":n.type==="project"||n.template_id==="project.default"?"project":n.type==="document"||n.template_id==="document.default"?"document":n.type==="recipe"||n.template_id==="recipe.default"?"recipe":n.type==="folder"||n.template_id==="folder.default"?"folder":n.type==="case"?"case":n.type==="note"?"note":n.type==="file"?"file":"generic"}function Ds(n){return n.children!==void 0}function ni(n){return Ds(n)?n.children.length>0:n.has_children===!0}function Mr(n){const e={};function t(l,i){for(const o of l)e[o.id]=i,o.children&&t(o.children,o.id)}return t(n,""),e}function Lr(n){const e=[];function t(l){for(const i of l)e.push(i),i.children&&t(i.children)}return t(n),e}function gv(n){try{return n.dataTransfer.getData("text/plain")}catch{return""}}function _v(n,e,t){let l,i,o,{nodes:s=[]}=e,{expanded:c={}}=e,{selectedNodeId:u=""}=e,{level:d=0}=e,{onSelect:p=void 0}=e,{onToggle:h=void 0}=e,{onContextMenu:m=void 0}=e,{onDrop:g=void 0}=e,b={},v=null,y="",E="";const T=["folder","project","client","document","recipe","case"];ui(()=>{for(const ee of Object.keys(b))clearTimeout(b[ee]);v&&clearInterval(v)});function I(ee){return T.includes(ee.type)}function N(ee,re,Ne){if(!ee||!re||re===ee.id||!I(ee))return!1;let Be=ee.id;for(;Be;){if(Be===re)return!1;Be=Ne[Be]||""}return!0}function R(ee,re){ee.stopPropagation(),ee.dataTransfer.effectAllowed="move",ee.dataTransfer.setData("text/plain",re.id),t(21,y=re.id)}function M(ee,re){ee.preventDefault(),ee.stopPropagation(),ee.dataTransfer.dropEffect="move",E!==re.id&&t(8,E=re.id),ni(re)&&!c[re.id]&&!b[re.id]&&(b[re.id]=setTimeout(()=>{h&&h(re.id),delete b[re.id]},600));const Ne=ee.currentTarget.closest(".workspace-tree-area");if(Ne){const Be=Ne.getBoundingClientRect(),ve=30;ee.clientY-Be.top<ve?v||(v=setInterval(()=>{Ne.scrollTop-=10},50)):Be.bottom-ee.clientY<ve?v||(v=setInterval(()=>{Ne.scrollTop+=10},50)):v&&(clearInterval(v),v=null)}}function A(ee,re){const Ne=ee.relatedTarget;Ne&&ee.currentTarget.contains(Ne)||(E===re.id&&t(8,E=""),b[re.id]&&(clearTimeout(b[re.id]),delete b[re.id]),v&&(clearInterval(v),v=null))}function L(ee,re){ee.preventDefault(),ee.stopPropagation(),b[re.id]&&(clearTimeout(b[re.id]),delete b[re.id]),v&&(clearInterval(v),v=null);const Ne=Lr(s),Be=Mr(Ne),ve=gv(ee);if(!N(re,ve,Be)){t(8,E=""),t(21,y="");return}g&&g(ve,re.id),t(8,E=""),t(21,y="")}function j(){t(8,E=""),t(21,y="");for(const ee of Object.keys(b))clearTimeout(b[ee]),delete b[ee];v&&(clearInterval(v),v=null)}function B(ee,re){ee.target.closest(".tree-toggle")||ee.target.closest(".tree-icon")||p&&p(re)}function U(ee,re){ni(re)&&h&&h(re.id)}function z(ee,re){(ee.key==="Enter"||ee.key===" ")&&(ee.preventDefault(),p&&p(re))}function W(ee,re){ee.stopPropagation(),ni(re)&&h&&h(re.id)}function G(ee,re){(ee.key==="Enter"||ee.key===" ")&&(ee.preventDefault(),ee.stopPropagation(),ni(re)&&h&&h(re.id))}function X(ee,re){(ee.key==="Enter"||ee.key===" ")&&(ee.preventDefault(),p&&p(re))}function H(ee,re,Ne){const Be={};function ve(Ue){for(const Je of Ue)Be[Je.id]=N(Je,re,Ne),Je.children&&ve(Je.children)}return ve(ee),Be}function D(ee){js.call(this,n,ee)}const q=ee=>h&&h(ee.id),P=(ee,re)=>W(re,ee),Y=(ee,re)=>G(re,ee),Z=ee=>p&&p(ee),J=(ee,re)=>X(re,ee),te=(ee,re)=>R(re,ee),ne=(ee,re)=>M(re,ee),le=(ee,re)=>A(re,ee),me=(ee,re)=>L(re,ee),oe=(ee,re)=>B(re,ee),ze=(ee,re)=>z(re,ee),Ye=(ee,re)=>U(re,ee),Re=(ee,re)=>m&&m(re,ee);return n.$$set=ee=>{"nodes"in ee&&t(0,s=ee.nodes),"expanded"in ee&&t(1,c=ee.expanded),"selectedNodeId"in ee&&t(2,u=ee.selectedNodeId),"level"in ee&&t(3,d=ee.level),"onSelect"in ee&&t(4,p=ee.onSelect),"onToggle"in ee&&t(5,h=ee.onToggle),"onContextMenu"in ee&&t(6,m=ee.onContextMenu),"onDrop"in ee&&t(7,g=ee.onDrop)},n.$$.update=()=>{n.$$.dirty[0]&1&&t(23,l=Lr(s)),n.$$.dirty[0]&8388608&&t(22,i=Mr(l)),n.$$.dirty[0]&14680064&&t(9,o=H(l,y,i))},[s,c,u,d,p,h,m,g,E,o,R,M,A,L,j,B,U,z,W,G,X,y,i,l,D,q,P,Y,Z,J,te,ne,le,me,oe,ze,Ye,Re]}class Wd extends ct{constructor(e){super(),at(this,e,_v,mv,rt,{nodes:0,expanded:1,selectedNodeId:2,level:3,onSelect:4,onToggle:5,onContextMenu:6,onDrop:7},null,[-1,-1])}}function Or(n){let e,t;return{c(){e=f("div"),t=F(n[4]),r(e,"class","path-info svelte-a9f1pd")},m(l,i){C(l,e,i),a(e,t)},p(l,i){i&16&&Q(t,l[4])},d(l){l&&S(e)}}}function Dr(n){let e,t;return{c(){e=f("div"),t=F(n[3]),r(e,"class","error-msg svelte-a9f1pd")},m(l,i){C(l,e,i),a(e,t)},p(l,i){i&8&&Q(t,l[3])},d(l){l&&S(e)}}}function bv(n){let e,t,l,i,o,s,c,u,d,p,h,m,g,b,v,y,E,T=k("firstrun.browse")+"",I,N,R,M,A,L,j=(n[2]?k("firstrun.creating"):k("firstrun.create"))+"",B,U,z,W,G,X,H=n[4]&&Or(n),D=n[3]&&Dr(n);return{c(){e=f("div"),t=f("div"),l=f("img"),o=w(),s=f("h1"),s.textContent=`${k("firstrun.title")}`,c=w(),u=f("p"),u.textContent=`${k("firstrun.desc")}`,d=w(),p=f("div"),h=f("label"),h.textContent=`${k("firstrun.pathLabel")}`,m=w(),g=f("div"),b=f("input"),y=w(),E=f("button"),I=F(T),N=w(),H&&H.c(),R=w(),D&&D.c(),M=w(),A=f("div"),L=f("button"),B=F(j),z=w(),W=f("button"),W.textContent=`${k("firstrun.quit")}`,r(l,"class","first-run-logo svelte-a9f1pd"),Ul(l.src,i="/assets/app-icons/icon_64x64.png")||r(l,"src",i),r(l,"width","64"),r(l,"height","64"),r(l,"alt",""),r(s,"class","svelte-a9f1pd"),r(u,"class","first-run-desc svelte-a9f1pd"),r(h,"class","form-label svelte-a9f1pd"),r(h,"for","vault-path"),r(b,"id","vault-path"),r(b,"type","text"),r(b,"placeholder",v=n[1]||k("firstrun.defaultPath")),b.disabled=n[2],r(b,"class","svelte-a9f1pd"),r(E,"class","btn"),E.disabled=n[2],r(g,"class","input-row svelte-a9f1pd"),r(p,"class","form-group svelte-a9f1pd"),r(L,"class","btn btn-primary btn-lg svelte-a9f1pd"),L.disabled=U=!n[0].trim()||n[2],r(W,"class","btn btn-lg svelte-a9f1pd"),r(A,"class","first-run-actions svelte-a9f1pd"),r(t,"class","first-run-card svelte-a9f1pd"),r(e,"class","first-run-screen svelte-a9f1pd")},m(q,P){C(q,e,P),a(e,t),a(t,l),a(t,o),a(t,s),a(t,c),a(t,u),a(t,d),a(t,p),a(p,h),a(p,m),a(p,g),a(g,b),Me(b,n[0]),a(g,y),a(g,E),a(E,I),a(t,N),H&&H.m(t,null),a(t,R),D&&D.m(t,null),a(t,M),a(t,A),a(A,L),a(L,B),a(A,z),a(A,W),G||(X=[O(b,"input",n[12]),O(b,"input",n[6]),O(b,"keydown",n[9]),O(E,"click",n[5]),O(L,"click",n[7]),O(W,"click",n[8])],G=!0)},p(q,[P]){P&2&&v!==(v=q[1]||k("firstrun.defaultPath"))&&r(b,"placeholder",v),P&4&&(b.disabled=q[2]),P&1&&b.value!==q[0]&&Me(b,q[0]),P&4&&(E.disabled=q[2]),q[4]?H?H.p(q,P):(H=Or(q),H.c(),H.m(t,R)):H&&(H.d(1),H=null),q[3]?D?D.p(q,P):(D=Dr(q),D.c(),D.m(t,M)):D&&(D.d(1),D=null),P&4&&j!==(j=(q[2]?k("firstrun.creating"):k("firstrun.create"))+"")&&Q(B,j),P&5&&U!==(U=!q[0].trim()||q[2])&&(L.disabled=U)},i:ie,o:ie,d(q){q&&S(e),H&&H.d(),D&&D.d(),G=!1,Se(X)}}}function Ci(n,...e){try{if(window.go&&window.go.main&&window.go.main.App){const t=window.go.main.App[n];if(typeof t=="function")return t(...e)}}catch(t){console.error("Wails error:",n,t)}return Promise.reject(new Error("Wails not connected: "+n))}function kv(n,e,t){let{onComplete:l=null}=e,{onQuit:i=null}=e,o="",s="",c=!1,u="",d="",p=null;async function h(){try{const T=await Ci("GetDefaultVaultPath");t(1,s=T||""),t(0,o=s||""),o&&await g()}catch{t(1,s="")}}h();async function m(){try{const T=await Ci("PickDirectory");T&&(t(0,o=T),await g())}catch(T){t(3,u=String(T))}}async function g(){if(!o||!o.trim()){t(4,d=""),p=null;return}try{p=await Ci("CheckVaultPath",o.trim()),p&&t(4,d=p.description)}catch{t(4,d=""),p=null}}async function b(){if(!(!o||!o.trim())){if(t(2,c=!0),t(3,u=""),p&&!p.writable){t(3,u=k("firstrun.errorNoWrite")),t(2,c=!1);return}try{const T=await Ci("CreateVault",o.trim());T&&T.status==="ready"&&l&&l(T)}catch(T){t(3,u=String(T))}t(2,c=!1)}}function v(){i&&i()}function y(T){T.key==="Enter"&&!c&&o.trim()&&b()}function E(){o=this.value,t(0,o)}return n.$$set=T=>{"onComplete"in T&&t(10,l=T.onComplete),"onQuit"in T&&t(11,i=T.onQuit)},[o,s,c,u,d,m,g,b,v,y,l,i,E]}class vv extends ct{constructor(e){super(),at(this,e,kv,bv,rt,{onComplete:10,onQuit:11})}}function Pr(n){let e,t;return{c(){e=f("div"),t=F(n[2]),r(e,"class","error-msg svelte-s3o8c3")},m(l,i){C(l,e,i),a(e,t)},p(l,i){i&4&&Q(t,l[2])},d(l){l&&S(e)}}}function qr(n){let e,t,l,i,o,s,c,u,d=k("common.yes")+"",p,h,m,g,b;return{c(){e=f("div"),t=f("div"),l=f("h3"),l.textContent=`${k("recovery.createConfirmTitle")}`,i=w(),o=f("p"),o.textContent=`${k("recovery.createConfirm")}`,s=w(),c=f("div"),u=f("button"),p=F(d),h=w(),m=f("button"),m.textContent=`${k("common.cancel")}`,r(l,"class","svelte-s3o8c3"),r(o,"class","modal-desc svelte-s3o8c3"),r(u,"class","btn btn-primary"),u.disabled=n[1],r(m,"class","btn"),r(c,"class","modal-actions svelte-s3o8c3"),r(t,"class","modal svelte-s3o8c3"),r(e,"class","modal-overlay svelte-s3o8c3"),r(e,"role","button"),r(e,"tabindex","0")},m(v,y){C(v,e,y),a(e,t),a(t,l),a(t,i),a(t,o),a(t,s),a(t,c),a(c,u),a(u,p),a(c,h),a(c,m),g||(b=[O(u,"click",n[6]),O(m,"click",n[7]),O(e,"click",Jt(n[7])),O(e,"keydown",n[11])],g=!0)},p(v,y){y&2&&(u.disabled=v[1])},d(v){v&&S(e),g=!1,Se(b)}}}function wv(n){let e,t,l,i,o,s,c,u,d,p=(n[0]||"—")+"",h,m,g,b,v,y=k("recovery.choose")+"",E,T,I,N=k("recovery.create")+"",R,M,A,L,j,B,U,z=n[2]&&Pr(n),W=n[3]&&qr(n);return{c(){e=f("div"),t=f("div"),l=f("div"),l.textContent="⚠",i=w(),o=f("h1"),o.textContent=`${k("recovery.title")}`,s=w(),c=f("p"),c.textContent=`${k("recovery.expected")}:`,u=w(),d=f("code"),h=F(p),m=w(),z&&z.c(),g=w(),b=f("div"),v=f("button"),E=F(y),T=w(),I=f("button"),R=F(N),M=w(),A=f("button"),A.textContent=`${k("recovery.quit")}`,L=w(),W&&W.c(),j=_t(),r(l,"class","recovery-icon svelte-s3o8c3"),r(o,"class","svelte-s3o8c3"),r(c,"class","recovery-desc svelte-s3o8c3"),r(d,"class","recovery-path svelte-s3o8c3"),r(v,"class","btn btn-primary btn-lg svelte-s3o8c3"),v.disabled=n[1],r(I,"class","btn btn-lg svelte-s3o8c3"),I.disabled=n[1],r(A,"class","btn btn-lg svelte-s3o8c3"),r(b,"class","recovery-actions svelte-s3o8c3"),r(t,"class","recovery-card svelte-s3o8c3"),r(e,"class","recovery-screen svelte-s3o8c3")},m(G,X){C(G,e,X),a(e,t),a(t,l),a(t,i),a(t,o),a(t,s),a(t,c),a(t,u),a(t,d),a(d,h),a(t,m),z&&z.m(t,null),a(t,g),a(t,b),a(b,v),a(v,E),a(b,T),a(b,I),a(I,R),a(b,M),a(b,A),C(G,L,X),W&&W.m(G,X),C(G,j,X),B||(U=[O(v,"click",n[4]),O(I,"click",n[5]),O(A,"click",n[8])],B=!0)},p(G,[X]){X&1&&p!==(p=(G[0]||"—")+"")&&Q(h,p),G[2]?z?z.p(G,X):(z=Pr(G),z.c(),z.m(t,g)):z&&(z.d(1),z=null),X&2&&(v.disabled=G[1]),X&2&&(I.disabled=G[1]),G[3]?W?W.p(G,X):(W=qr(G),W.c(),W.m(j.parentNode,j)):W&&(W.d(1),W=null)},i:ie,o:ie,d(G){G&&(S(e),S(L),S(j)),z&&z.d(),W&&W.d(G),B=!1,Se(U)}}}function Es(n,...e){try{if(window.go&&window.go.main&&window.go.main.App){const t=window.go.main.App[n];if(typeof t=="function")return t(...e)}}catch(t){console.error("Wails error:",n,t)}return Promise.reject(new Error("Wails not connected: "+n))}function yv(n,e,t){let{vaultPath:l=""}=e,{onComplete:i=null}=e,{onQuit:o=null}=e,s=!1,c="",u=!1;async function d(){try{const v=await Es("PickDirectory");if(!v)return;t(1,s=!0),t(2,c="");const y=await Es("OpenVault",v);y&&y.status==="ready"&&i&&i(y)}catch(v){t(2,c=String(v))}t(1,s=!1)}function p(){t(3,u=!0)}async function h(){t(3,u=!1),t(1,s=!0),t(2,c="");try{const v=await Es("CreateVault",l);v&&v.status==="ready"&&i&&i(v)}catch(v){t(2,c=String(v))}t(1,s=!1)}function m(){t(3,u=!1)}function g(){o&&o()}const b=v=>v.key==="Enter"&&m();return n.$$set=v=>{"vaultPath"in v&&t(0,l=v.vaultPath),"onComplete"in v&&t(9,i=v.onComplete),"onQuit"in v&&t(10,o=v.onQuit)},[l,s,c,u,d,p,h,m,g,i,o,b]}class Ev extends ct{constructor(e){super(),at(this,e,yv,wv,rt,{vaultPath:0,onComplete:9,onQuit:10})}}function jr(n,e,t){const l=n.slice();return l[5]=e[t],l}function Tv(n){let e,t;return{c(){e=ae("circle"),t=ae("path"),r(e,"cx","12"),r(e,"cy","12"),r(e,"r","3"),r(t,"d","M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42")},m(l,i){C(l,e,i),C(l,t,i)},d(l){l&&(S(e),S(t))}}}function Sv(n){let e,t,l;return{c(){e=ae("path"),t=ae("path"),l=ae("path"),r(e,"d","M5 4h12l2 2v14H5z"),r(t,"d","M8 4v6h8V4"),r(l,"d","M8 20v-6h8v6")},m(i,o){C(i,e,o),C(i,t,o),C(i,l,o)},d(i){i&&(S(e),S(t),S(l))}}}function Cv(n){let e,t,l,i;return{c(){e=ae("path"),t=ae("path"),l=ae("path"),i=ae("path"),r(e,"d","M20 11a8 8 0 0 0-14-4l-2 2"),r(t,"d","M4 5v4h4"),r(l,"d","M4 13a8 8 0 0 0 14 4l2-2"),r(i,"d","M20 19v-4h-4")},m(o,s){C(o,e,s),C(o,t,s),C(o,l,s),C(o,i,s)},d(o){o&&(S(e),S(t),S(l),S(i))}}}function Av(n){let e;return{c(){e=ae("path"),r(e,"d","M4 19V9M10 19V5M16 19v-7M22 19H2")},m(t,l){C(t,e,l)},d(t){t&&S(e)}}}function Nv(n){let e;return{c(){e=ae("path"),r(e,"d","M3 6h6l2 2h10v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6z")},m(t,l){C(t,e,l)},d(t){t&&S(e)}}}function Iv(n){let e,t;return{c(){e=ae("path"),t=ae("path"),r(e,"d","M9 3v5M15 3v5M7 8h10v3a5 5 0 0 1-10 0V8z"),r(t,"d","M12 16v5")},m(l,i){C(l,e,i),C(l,t,i)},d(l){l&&(S(e),S(t))}}}function Rv(n){let e,t;return{c(){e=ae("rect"),t=ae("path"),r(e,"x","4"),r(e,"y","3"),r(e,"width","16"),r(e,"height","18"),r(e,"rx","2"),r(t,"d","M8 7h8M8 11h8M8 15h5")},m(l,i){C(l,e,i),C(l,t,i)},d(l){l&&(S(e),S(t))}}}function Mv(n){let e,t,l;return{c(){e=ae("path"),t=ae("path"),l=ae("path"),r(e,"d","M3 10.5 12 3l9 7.5"),r(t,"d","M5 9.5V21h14V9.5"),r(l,"d","M10 21v-6h4v6")},m(i,o){C(i,e,o),C(i,t,o),C(i,l,o)},d(i){i&&(S(e),S(t),S(l))}}}function Lv(n){let e,t;return{c(){e=ae("circle"),t=ae("path"),r(e,"cx","12"),r(e,"cy","12"),r(e,"r","3"),r(t,"d","M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 0 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V22h-4v-.2a1.7 1.7 0 0 0-1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 0 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H2v-4h.2a1.7 1.7 0 0 0 1.5-1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 0 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3 1.7 1.7 0 0 0 1-1.5V2h4v.2a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 0 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8 1.7 1.7 0 0 0 1.5 1h.2v4h-.2a1.7 1.7 0 0 0-1.4 1z")},m(l,i){C(l,e,i),C(l,t,i)},d(l){l&&(S(e),S(t))}}}function zr(n){let e,t,l,i,o,s,c,u;function d(g,b){if(g[5].id==="general")return Lv;if(g[5].id==="workspace")return Mv;if(g[5].id==="templates")return Rv;if(g[5].id==="plugins")return Iv;if(g[5].id==="files")return Nv;if(g[5].id==="activity")return Av;if(g[5].id==="sync")return Cv;if(g[5].id==="backup")return Sv;if(g[5].id==="browserBridge")return Tv}let p=d(n),h=p&&p(n);function m(){return n[4](n[5])}return{c(){e=f("button"),t=f("span"),l=ae("svg"),h&&h.c(),i=w(),o=f("span"),o.textContent=`${n[5].label}`,s=w(),r(l,"width","16"),r(l,"height","16"),r(l,"viewBox","0 0 24 24"),r(l,"fill","none"),r(l,"stroke","currentColor"),r(l,"stroke-width","1.8"),r(l,"stroke-linecap","round"),r(l,"stroke-linejoin","round"),r(l,"aria-hidden","true"),r(t,"class","settings-nav-icon svelte-8ag2z0"),r(o,"class","settings-nav-label svelte-8ag2z0"),r(e,"class","settings-nav-item svelte-8ag2z0"),ce(e,"active",n[0]===n[5].id),ce(e,"disabled",n[5].id==="files"||n[5].id==="activity"||n[5].id==="backup")},m(g,b){C(g,e,b),a(e,t),a(t,l),h&&h.m(l,null),a(e,i),a(e,o),a(e,s),c||(u=O(e,"click",m),c=!0)},p(g,b){n=g,b&3&&ce(e,"active",n[0]===n[5].id)},d(g){g&&S(e),h&&h.d(),c=!1,u()}}}function Ov(n){let e,t=Te(n[1]),l=[];for(let i=0;i<t.length;i+=1)l[i]=zr(jr(n,t,i));return{c(){e=f("nav");for(let i=0;i<l.length;i+=1)l[i].c();r(e,"class","settings-sidebar svelte-8ag2z0")},m(i,o){C(i,e,o);for(let s=0;s<l.length;s+=1)l[s]&&l[s].m(e,null)},p(i,[o]){if(o&7){t=Te(i[1]);let s;for(s=0;s<t.length;s+=1){const c=jr(i,t,s);l[s]?l[s].p(c,o):(l[s]=zr(c),l[s].c(),l[s].m(e,null))}for(;s<l.length;s+=1)l[s].d(1);l.length=t.length}},i:ie,o:ie,d(i){i&&S(e),tt(l,i)}}}function Dv(n,e,t){let{activeSection:l="general"}=e,{onSelect:i=null}=e;const o=[{id:"general",label:k("settings.general")},{id:"workspace",label:k("settings.workspace")},{id:"templates",label:k("settings.templates")},{id:"plugins",label:k("settings.plugins")},{id:"files",label:k("settings.files")},{id:"activity",label:k("settings.activity")},{id:"sync",label:k("settings.sync")},{id:"backup",label:k("settings.backup")},{id:"browserBridge",label:"Browser Bridge"}];function s(u){i&&i(u)}const c=u=>s(u.id);return n.$$set=u=>{"activeSection"in u&&t(0,l=u.activeSection),"onSelect"in u&&t(3,i=u.onSelect)},[l,o,s,i,c]}class Pv extends ct{constructor(e){super(),at(this,e,Dv,Ov,rt,{activeSection:0,onSelect:3})}}function Br(n){let e;return{c(){e=f("div"),e.textContent=`${k("settings.saved")}`,r(e,"class","save-notice svelte-1e2uhdh")},m(t,l){C(t,e,l)},d(t){t&&S(e)}}}function qv(n){let e,t,l,i,o,s,c,u,d,p,h,m,g,b,v,y,E,T,I,N,R,M,A,L,j,B,U,z,W,G,X,H,D,q=n[1]&&Br();return{c(){e=f("div"),t=f("h2"),t.textContent=`${k("settings.general")}`,l=w(),i=f("p"),i.textContent=`${k("settings.generalDesc")}`,o=w(),s=f("div"),c=f("h3"),c.textContent=`${k("settings.appearance")}`,u=w(),d=f("div"),p=f("label"),h=f("span"),h.textContent=`${k("settings.theme")}`,m=w(),g=f("select"),b=f("option"),b.textContent=`${k("settings.themeSystem")}`,v=f("option"),v.textContent=`${k("settings.themeLight")} (${k("settings.langSoon")})`,y=f("option"),y.textContent=`${k("settings.themeDark")} (${k("settings.langSoon")})`,E=w(),T=f("div"),I=f("h3"),I.textContent=`${k("settings.localization")}`,N=w(),R=f("div"),M=f("label"),A=f("span"),A.textContent=`${k("settings.language")}`,L=w(),j=f("select"),B=f("option"),B.textContent=`${k("settings.langRu")}`,U=f("option"),U.textContent=`${k("settings.langEn")} (${k("settings.langSoon")})`,z=w(),W=f("div"),q&&q.c(),G=w(),X=f("button"),X.textContent=`${k("settings.save")}`,r(t,"class","svelte-1e2uhdh"),r(i,"class","section-desc svelte-1e2uhdh"),r(c,"class","card-title svelte-1e2uhdh"),r(h,"class","label-text svelte-1e2uhdh"),b.__value="system",Me(b,b.__value),v.__value="light",Me(v,v.__value),v.disabled=!0,y.__value="dark",Me(y,y.__value),y.disabled=!0,n[0]===void 0&&yl(()=>n[5].call(g)),r(d,"class","form-group svelte-1e2uhdh"),r(s,"class","settings-card svelte-1e2uhdh"),r(I,"class","card-title svelte-1e2uhdh"),r(A,"class","label-text svelte-1e2uhdh"),B.__value="ru",Me(B,B.__value),U.__value="en",Me(U,U.__value),j.disabled=!0,r(R,"class","form-group svelte-1e2uhdh"),r(T,"class","settings-card svelte-1e2uhdh"),r(X,"class","btn btn-primary"),r(W,"class","settings-actions svelte-1e2uhdh"),r(e,"class","settings-section svelte-1e2uhdh")},m(P,Y){C(P,e,Y),a(e,t),a(e,l),a(e,i),a(e,o),a(e,s),a(s,c),a(s,u),a(s,d),a(d,p),a(p,h),a(p,m),a(p,g),a(g,b),a(g,v),a(g,y),xn(g,n[0],!0),a(e,E),a(e,T),a(T,I),a(T,N),a(T,R),a(R,M),a(M,A),a(M,L),a(M,j),a(j,B),a(j,U),a(e,z),a(e,W),q&&q.m(W,null),a(W,G),a(W,X),H||(D=[O(g,"change",n[5]),O(X,"click",n[2])],H=!0)},p(P,[Y]){Y&1&&xn(g,P[0]),P[1]?q||(q=Br(),q.c(),q.m(W,G)):q&&(q.d(1),q=null)},i:ie,o:ie,d(P){P&&S(e),q&&q.d(),H=!1,Se(D)}}}function jv(n,e,t){let{appConfig:l=null}=e,{onSave:i=null}=e,o="system",s=!1;function c(){l&&t(0,o=l.theme||"system")}async function u(){l&&(t(3,l.theme=o,l),i&&await i(l),t(1,s=!0),setTimeout(()=>t(1,s=!1),2e3))}function d(){o=Ri(this),t(0,o)}return n.$$set=p=>{"appConfig"in p&&t(3,l=p.appConfig),"onSave"in p&&t(4,i=p.onSave)},n.$$.update=()=>{n.$$.dirty&8&&l&&c()},[o,s,u,l,i,d]}class zv extends ct{constructor(e){super(),at(this,e,jv,qv,rt,{appConfig:3,onSave:4})}}function Fr(n){let e,t;return{c(){e=f("div"),t=F(n[1]),r(e,"class","notice svelte-1zbky3")},m(l,i){C(l,e,i),a(e,t)},p(l,i){i&2&&Q(t,l[1])},d(l){l&&S(e)}}}function Bv(n){let e;return{c(){e=f("p"),e.textContent=`${k("settings.noVaultInfo")}`,r(e,"class","no-data svelte-1zbky3")},m(t,l){C(t,e,l)},p:ie,d(t){t&&S(e)}}}function Fv(n){let e,t,l,i,o,s=n[0].path+"",c,u,d,p,h,m,g=n[0].dbPath+"",b,v,y,E=n[0].nodeCount!==void 0&&Ur(n),T=n[0].fileCount!==void 0&&Hr(n);return{c(){e=f("div"),t=f("div"),l=f("span"),l.textContent=`${k("settings.vaultPath")}`,i=w(),o=f("span"),c=F(s),u=w(),d=f("div"),p=f("span"),p.textContent="DB",h=w(),m=f("span"),b=F(g),v=w(),E&&E.c(),y=w(),T&&T.c(),r(l,"class","info-label svelte-1zbky3"),r(o,"class","info-value mono svelte-1zbky3"),r(t,"class","info-row svelte-1zbky3"),r(p,"class","info-label svelte-1zbky3"),r(m,"class","info-value mono small svelte-1zbky3"),r(d,"class","info-row svelte-1zbky3"),r(e,"class","vault-info svelte-1zbky3")},m(I,N){C(I,e,N),a(e,t),a(t,l),a(t,i),a(t,o),a(o,c),a(e,u),a(e,d),a(d,p),a(d,h),a(d,m),a(m,b),a(e,v),E&&E.m(e,null),a(e,y),T&&T.m(e,null)},p(I,N){N&1&&s!==(s=I[0].path+"")&&Q(c,s),N&1&&g!==(g=I[0].dbPath+"")&&Q(b,g),I[0].nodeCount!==void 0?E?E.p(I,N):(E=Ur(I),E.c(),E.m(e,y)):E&&(E.d(1),E=null),I[0].fileCount!==void 0?T?T.p(I,N):(T=Hr(I),T.c(),T.m(e,null)):T&&(T.d(1),T=null)},d(I){I&&S(e),E&&E.d(),T&&T.d()}}}function Ur(n){let e,t,l,i,o=n[0].nodeCount+"",s;return{c(){e=f("div"),t=f("span"),t.textContent="Nodes",l=w(),i=f("span"),s=F(o),r(t,"class","info-label svelte-1zbky3"),r(i,"class","info-value svelte-1zbky3"),r(e,"class","info-row svelte-1zbky3")},m(c,u){C(c,e,u),a(e,t),a(e,l),a(e,i),a(i,s)},p(c,u){u&1&&o!==(o=c[0].nodeCount+"")&&Q(s,o)},d(c){c&&S(e)}}}function Hr(n){let e,t,l,i,o=n[0].fileCount+"",s;return{c(){e=f("div"),t=f("span"),t.textContent="Files",l=w(),i=f("span"),s=F(o),r(t,"class","info-label svelte-1zbky3"),r(i,"class","info-value svelte-1zbky3"),r(e,"class","info-row svelte-1zbky3")},m(c,u){C(c,e,u),a(e,t),a(e,l),a(e,i),a(i,s)},p(c,u){u&1&&o!==(o=c[0].fileCount+"")&&Q(s,o)},d(c){c&&S(e)}}}function Uv(n){let e,t,l,i,o,s,c,u,d,p,h,m,g,b,v,y,E=n[1]&&Fr(n);function T(R,M){return R[0]?Fv:Bv}let I=T(n),N=I(n);return{c(){e=f("div"),t=f("h2"),t.textContent=`${k("settings.workspace")}`,l=w(),i=f("p"),i.textContent=`${k("settings.workspaceDesc")}`,o=w(),E&&E.c(),s=w(),c=f("div"),N.c(),u=w(),d=f("div"),p=f("button"),p.textContent=`${k("settings.openVault")}`,h=w(),m=f("button"),m.textContent=`${k("settings.changeVault")}`,g=w(),b=f("button"),b.textContent=`${k("settings.checkIntegrity")}`,r(t,"class","svelte-1zbky3"),r(i,"class","section-desc svelte-1zbky3"),r(c,"class","settings-card svelte-1zbky3"),r(p,"class","btn svelte-1zbky3"),r(m,"class","btn svelte-1zbky3"),r(b,"class","btn svelte-1zbky3"),r(d,"class","workspace-actions svelte-1zbky3"),r(e,"class","settings-section svelte-1zbky3")},m(R,M){C(R,e,M),a(e,t),a(e,l),a(e,i),a(e,o),E&&E.m(e,null),a(e,s),a(e,c),N.m(c,null),a(e,u),a(e,d),a(d,p),a(d,h),a(d,m),a(d,g),a(d,b),v||(y=[O(p,"click",n[2]),O(m,"click",n[4]),O(b,"click",n[3])],v=!0)},p(R,[M]){R[1]?E?E.p(R,M):(E=Fr(R),E.c(),E.m(e,s)):E&&(E.d(1),E=null),I===(I=T(R))&&N?N.p(R,M):(N.d(1),N=I(R),N&&(N.c(),N.m(c,null)))},i:ie,o:ie,d(R){R&&S(e),E&&E.d(),N.d(),v=!1,Se(y)}}}function jl(n,...e){try{if(window.go&&window.go.main&&window.go.main.App){const t=window.go.main.App[n];if(typeof t=="function")return t(...e)}}catch(t){console.error("Wails error:",n,t)}return Promise.reject(new Error("Wails not connected: "+n))}function Hv(n,e,t){let{onRefresh:l=null}=e,i=null,o="";async function s(){try{t(0,i=await jl("GetVaultInfo"))}catch{t(0,i=null)}}s();async function c(){try{await jl("OpenVaultFolder")}catch(p){t(1,o=String(p))}}async function u(){try{const p=await jl("VaultCheck");p.healthy?t(1,o="Vault healthy"):t(1,o="Issues found: "+(p.errors||[]).join("; "))}catch(p){t(1,o=String(p))}}async function d(){try{const p=await jl("PickDirectory");if(!p)return;const h=await jl("OpenVault",p);h&&h.status==="ready"&&(t(0,i=await jl("GetVaultInfo")),l&&l())}catch(p){t(1,o=String(p))}}return n.$$set=p=>{"onRefresh"in p&&t(5,l=p.onRefresh)},[i,o,c,u,d,l]}class Wv extends ct{constructor(e){super(),at(this,e,Hv,Uv,rt,{onRefresh:5})}}function Wr(n,e,t){const l=n.slice();return l[6]=e[t],l}function Gv(n){let e,t=Te(n[0]),l=[];for(let i=0;i<t.length;i+=1)l[i]=Gr(Wr(n,t,i));return{c(){e=f("div");for(let i=0;i<l.length;i+=1)l[i].c();r(e,"class","template-list svelte-ksamnw")},m(i,o){C(i,e,o);for(let s=0;s<l.length;s+=1)l[s]&&l[s].m(e,null)},p(i,o){if(o&5){t=Te(i[0]);let s;for(s=0;s<t.length;s+=1){const c=Wr(i,t,s);l[s]?l[s].p(c,o):(l[s]=Gr(c),l[s].c(),l[s].m(e,null))}for(;s<l.length;s+=1)l[s].d(1);l.length=t.length}},d(i){i&&S(e),tt(l,i)}}}function Kv(n){let e;return{c(){e=f("p"),e.textContent=`${k("common.empty")}`,r(e,"class","no-data svelte-ksamnw")},m(t,l){C(t,e,l)},p:ie,d(t){t&&S(e)}}}function Vv(n){let e;return{c(){e=f("p"),e.textContent=`${k("common.loading")}`,r(e,"class","loading svelte-ksamnw")},m(t,l){C(t,e,l)},p:ie,d(t){t&&S(e)}}}function Gr(n){let e,t,l,i=(k("template."+n[6].id)||n[6].title)+"",o,s,c,u,d=n[6].type+"",p,h,m,g,b,v,y,E,T=(n[6].enabled?k("settings.templateEnabled"):k("settings.templateDisabled"))+"",I,N,R,M;function A(){return n[4](n[6])}return{c(){e=f("div"),t=f("div"),l=f("span"),o=F(i),s=w(),c=f("span"),u=F("("),p=F(d),h=F(")"),m=w(),g=f("label"),b=f("input"),y=w(),E=f("span"),I=F(T),N=w(),r(l,"class","template-name svelte-ksamnw"),r(c,"class","template-type svelte-ksamnw"),r(t,"class","template-info svelte-ksamnw"),r(b,"type","checkbox"),b.checked=v=n[6].enabled,r(b,"class","svelte-ksamnw"),r(E,"class","toggle-text svelte-ksamnw"),r(g,"class","toggle-label svelte-ksamnw"),r(e,"class","template-item svelte-ksamnw")},m(L,j){C(L,e,j),a(e,t),a(t,l),a(l,o),a(t,s),a(t,c),a(c,u),a(c,p),a(c,h),a(e,m),a(e,g),a(g,b),a(g,y),a(g,E),a(E,I),a(e,N),R||(M=O(b,"change",A),R=!0)},p(L,j){n=L,j&1&&i!==(i=(k("template."+n[6].id)||n[6].title)+"")&&Q(o,i),j&1&&d!==(d=n[6].type+"")&&Q(p,d),j&1&&v!==(v=n[6].enabled)&&(b.checked=v),j&1&&T!==(T=(n[6].enabled?k("settings.templateEnabled"):k("settings.templateDisabled"))+"")&&Q(I,T)},d(L){L&&S(e),R=!1,M()}}}function Zv(n){let e,t,l,i,o;function s(d,p){return d[1]?Vv:d[0].length===0?Kv:Gv}let c=s(n),u=c(n);return{c(){e=f("div"),t=f("h2"),t.textContent=`${k("settings.templates")}`,l=w(),i=f("p"),i.textContent=`${k("settings.templatesDesc")}`,o=w(),u.c(),r(t,"class","svelte-ksamnw"),r(i,"class","section-desc svelte-ksamnw"),r(e,"class","settings-section svelte-ksamnw")},m(d,p){C(d,e,p),a(e,t),a(e,l),a(e,i),a(e,o),u.m(e,null)},p(d,[p]){c===(c=s(d))&&u?u.p(d,p):(u.d(1),u=c(d),u&&(u.c(),u.m(e,null)))},i:ie,o:ie,d(d){d&&S(e),u.d()}}}function Kr(n,...e){try{if(window.go&&window.go.main&&window.go.main.App){const t=window.go.main.App[n];if(typeof t=="function")return t(...e)}}catch(t){console.error("Wails error:",n,t)}return Promise.reject(new Error("Wails not connected: "+n))}function Yv(n,e,t){let{onRefresh:l=null}=e,i=[],o=!0;async function s(){t(1,o=!0);try{t(0,i=await Kr("AllTemplates")||[])}catch{t(0,i=[])}t(1,o=!1)}s();async function c(d){const p=!d.enabled;try{await Kr("SetTemplateEnabled",d.id,p),d.enabled=p,t(0,i),l&&l()}catch(h){console.error(h)}}const u=d=>c(d);return n.$$set=d=>{"onRefresh"in d&&t(3,l=d.onRefresh)},[i,o,c,l,u]}class Xv extends ct{constructor(e){super(),at(this,e,Yv,Zv,rt,{onRefresh:3})}}function Vr(n,e,t){const l=n.slice();return l[12]=e[t],l}function Jv(n){let e,t=Te(n[0]),l=[];for(let i=0;i<t.length;i+=1)l[i]=$r(Vr(n,t,i));return{c(){e=f("div");for(let i=0;i<l.length;i+=1)l[i].c();r(e,"class","plugin-list svelte-i9gngw")},m(i,o){C(i,e,o);for(let s=0;s<l.length;s+=1)l[s]&&l[s].m(e,null)},p(i,o){if(o&57){t=Te(i[0]);let s;for(s=0;s<t.length;s+=1){const c=Vr(i,t,s);l[s]?l[s].p(c,o):(l[s]=$r(c),l[s].c(),l[s].m(e,null))}for(;s<l.length;s+=1)l[s].d(1);l.length=t.length}},d(i){i&&S(e),tt(l,i)}}}function Qv(n){let e;return{c(){e=f("div"),e.innerHTML='<p>Нет установленных плагинов.</p> <p class="hint svelte-i9gngw">Создайте папку <code class="svelte-i9gngw">.verstak/plugins/</code> в хранилище и добавьте туда плагины.</p>',r(e,"class","empty-state svelte-i9gngw")},m(t,l){C(t,e,l)},p:ie,d(t){t&&S(e)}}}function xv(n){let e,t;return{c(){e=f("p"),t=F(n[2]),r(e,"class","error svelte-i9gngw")},m(l,i){C(l,e,i),a(e,t)},p(l,i){i&4&&Q(t,l[2])},d(l){l&&S(e)}}}function $v(n){let e;return{c(){e=f("p"),e.textContent=`${k("common.loading")}`,r(e,"class","loading svelte-i9gngw")},m(t,l){C(t,e,l)},p:ie,d(t){t&&S(e)}}}function Zr(n){let e,t,l=n[12].version+"",i;return{c(){e=f("span"),t=F("v"),i=F(l),r(e,"class","plugin-version svelte-i9gngw")},m(o,s){C(o,e,s),a(e,t),a(e,i)},p(o,s){s&1&&l!==(l=o[12].version+"")&&Q(i,l)},d(o){o&&S(e)}}}function Yr(n){let e,t=n[12].description+"",l;return{c(){e=f("div"),l=F(t),r(e,"class","plugin-desc svelte-i9gngw")},m(i,o){C(i,e,o),a(e,l)},p(i,o){o&1&&t!==(t=i[12].description+"")&&Q(l,t)},d(i){i&&S(e)}}}function Xr(n){let e,t=(k("settings.author")||"Автор")+"",l,i,o=n[12].author+"",s;return{c(){e=f("span"),l=F(t),i=F(": "),s=F(o)},m(c,u){C(c,e,u),a(e,l),a(e,i),a(e,s)},p(c,u){u&1&&o!==(o=c[12].author+"")&&Q(s,o)},d(c){c&&S(e)}}}function Jr(n){let e,t=n[12].uiContribs.sidebarItems.length+"",l,i;return{c(){e=f("span"),l=F(t),i=F(" пункт(а) в сайдбаре")},m(o,s){C(o,e,s),a(e,l),a(e,i)},p(o,s){s&1&&t!==(t=o[12].uiContribs.sidebarItems.length+"")&&Q(l,t)},d(o){o&&S(e)}}}function Qr(n){let e,t=n[12].uiContribs.nodeTabs.length+"",l,i;return{c(){e=f("span"),l=F(t),i=F(" вкладок(и) в карточке дела")},m(o,s){C(o,e,s),a(e,l),a(e,i)},p(o,s){s&1&&t!==(t=o[12].uiContribs.nodeTabs.length+"")&&Q(l,t)},d(o){o&&S(e)}}}function xr(n){let e;return{c(){e=f("span"),e.textContent="🗖 HTML-панель"},m(t,l){C(t,e,l)},d(t){t&&S(e)}}}function e0(n){let e,t,l,i,o,s,c,u;function d(){return n[8](n[12])}function p(){return n[9](n[12])}return{c(){e=f("div"),t=f("button"),l=f("span"),o=w(),s=f("button"),s.textContent="🗑",r(l,"class","toggle-knob svelte-i9gngw"),r(t,"class","toggle-btn svelte-i9gngw"),r(t,"role","switch"),r(t,"aria-checked",i=n[12].active),ce(t,"active",n[12].active),r(s,"class","uninstall-btn btn-sm svelte-i9gngw"),r(s,"title","Удалить плагин (очистить данные)"),r(e,"class","toggle-group svelte-i9gngw")},m(h,m){C(h,e,m),a(e,t),a(t,l),a(e,o),a(e,s),c||(u=[O(t,"click",d),O(s,"click",p)],c=!0)},p(h,m){n=h,m&1&&i!==(i=n[12].active)&&r(t,"aria-checked",i),m&1&&ce(t,"active",n[12].active)},d(h){h&&S(e),c=!1,Se(u)}}}function t0(n){let e,t,l;function i(){return n[7](n[12])}return{c(){e=f("button"),e.textContent="📦 Установить",r(e,"class","install-btn svelte-i9gngw")},m(o,s){C(o,e,s),t||(l=O(e,"click",i),t=!0)},p(o,s){n=o},d(o){o&&S(e),t=!1,l()}}}function $r(n){var j,B,U,z;let e,t,l,i=n[12].name+"",o,s,c,u,d,p,h,m,g,b,v,y=n[12].version&&Zr(n),E=n[12].description&&Yr(n),T=n[12].author&&Xr(n),I=((B=(j=n[12].uiContribs)==null?void 0:j.sidebarItems)==null?void 0:B.length)&&Jr(n),N=((z=(U=n[12].uiContribs)==null?void 0:U.nodeTabs)==null?void 0:z.length)&&Qr(n),R=n[12].hasPanel&&xr();function M(W,G){return W[12].installed?e0:t0}let A=M(n),L=A(n);return{c(){e=f("div"),t=f("div"),l=f("div"),o=F(i),s=w(),y&&y.c(),c=w(),E&&E.c(),u=w(),d=f("div"),T&&T.c(),p=w(),I&&I.c(),h=w(),N&&N.c(),m=w(),R&&R.c(),g=w(),b=f("div"),L.c(),v=w(),r(l,"class","plugin-name svelte-i9gngw"),r(d,"class","plugin-meta svelte-i9gngw"),r(t,"class","plugin-info svelte-i9gngw"),r(b,"class","plugin-toggle svelte-i9gngw"),r(e,"class","plugin-card svelte-i9gngw")},m(W,G){C(W,e,G),a(e,t),a(t,l),a(l,o),a(l,s),y&&y.m(l,null),a(t,c),E&&E.m(t,null),a(t,u),a(t,d),T&&T.m(d,null),a(d,p),I&&I.m(d,null),a(d,h),N&&N.m(d,null),a(d,m),R&&R.m(d,null),a(e,g),a(e,b),L.m(b,null),a(e,v)},p(W,G){var X,H,D,q;G&1&&i!==(i=W[12].name+"")&&Q(o,i),W[12].version?y?y.p(W,G):(y=Zr(W),y.c(),y.m(l,null)):y&&(y.d(1),y=null),W[12].description?E?E.p(W,G):(E=Yr(W),E.c(),E.m(t,u)):E&&(E.d(1),E=null),W[12].author?T?T.p(W,G):(T=Xr(W),T.c(),T.m(d,p)):T&&(T.d(1),T=null),(H=(X=W[12].uiContribs)==null?void 0:X.sidebarItems)!=null&&H.length?I?I.p(W,G):(I=Jr(W),I.c(),I.m(d,h)):I&&(I.d(1),I=null),(q=(D=W[12].uiContribs)==null?void 0:D.nodeTabs)!=null&&q.length?N?N.p(W,G):(N=Qr(W),N.c(),N.m(d,m)):N&&(N.d(1),N=null),W[12].hasPanel?R||(R=xr(),R.c(),R.m(d,null)):R&&(R.d(1),R=null),A===(A=M(W))&&L?L.p(W,G):(L.d(1),L=A(W),L&&(L.c(),L.m(b,null)))},d(W){W&&S(e),y&&y.d(),E&&E.d(),T&&T.d(),I&&I.d(),N&&N.d(),R&&R.d(),L.d()}}}function n0(n){let e,t,l,i,o;function s(d,p){return d[1]?$v:d[2]?xv:d[0].length===0?Qv:Jv}let c=s(n),u=c(n);return{c(){e=f("div"),t=f("h3"),t.textContent=`${k("settings.plugins")||"Плагины"}`,l=w(),i=f("p"),i.textContent="Включение и отключение плагинов. Изменения применяются сразу.",o=w(),u.c(),r(t,"class","svelte-i9gngw"),r(i,"class","hint svelte-i9gngw"),r(e,"class","settings-plugins svelte-i9gngw")},m(d,p){C(d,e,p),a(e,t),a(e,l),a(e,i),a(e,o),u.m(e,null)},p(d,[p]){c===(c=s(d))&&u?u.p(d,p):(u.d(1),u=c(d),u&&(u.c(),u.m(e,null)))},i:ie,o:ie,d(d){d&&S(e),u.d()}}}function hl(n,...e){try{if(window.go&&window.go.main&&window.go.main.App){const t=window.go.main.App[n];if(typeof t=="function")return t(...e)}}catch(t){console.error("Wails error:",n,t)}return Promise.reject(new Error("Wails not connected: "+n))}function l0(n,e,t){let{onPluginToggle:l=null}=e,i=[],o=!0,s="";ci(async()=>{try{t(0,i=await hl("ListPlugins")||[])}catch(g){t(2,s=String(g))}t(1,o=!1)});async function c(g){const b=!g.active;try{await hl("SetPluginEnabled",g.name,b),t(0,i=await hl("ListPlugins")||[]),l&&l()}catch(v){t(2,s=String(v))}}async function u(g){t(2,s="");try{await hl("InstallPlugin",g.name),g.installed=!0,t(0,i=await hl("ListPlugins")||[]),l&&l()}catch(b){t(2,s=String(b))}}async function d(g){if(confirm(`Удалить плагин «${g.name}»? Все данные плагина будут очищены. Файлы плагина сохранятся.`)){t(2,s="");try{await hl("UninstallPlugin",g.name),g.installed=!1,g.active=!1,t(0,i=await hl("ListPlugins")||[]),l&&l()}catch(b){t(2,s=String(b))}}}const p=g=>u(g),h=g=>c(g),m=g=>d(g);return n.$$set=g=>{"onPluginToggle"in g&&t(6,l=g.onPluginToggle)},n.$$.update=()=>{n.$$.dirty&1&&i.reduce((g,b)=>{var v,y;return g+(((y=(v=b.uiContribs)==null?void 0:v.sidebarItems)==null?void 0:y.length)||0)},0),n.$$.dirty&1&&i.reduce((g,b)=>{var v,y;return g+(((y=(v=b.uiContribs)==null?void 0:v.nodeTabs)==null?void 0:y.length)||0)},0)},[i,o,s,c,u,d,l,p,h,m]}class i0 extends ct{constructor(e){super(),at(this,e,l0,n0,rt,{onPluginToggle:6})}}function s0(n){let e,t,l,i;return{c(){e=f("div"),t=f("h2"),t.textContent=`${k("settings.files")}`,l=w(),i=f("p"),i.textContent=`${k("settings.filesStub")}`,r(t,"class","svelte-19bo7bn"),r(i,"class","section-desc svelte-19bo7bn"),r(e,"class","settings-section svelte-19bo7bn")},m(o,s){C(o,e,s),a(e,t),a(e,l),a(e,i)},p:ie,i:ie,o:ie,d(o){o&&S(e)}}}class o0 extends ct{constructor(e){super(),at(this,e,null,s0,rt,{})}}function r0(n){let e,t,l,i;return{c(){e=f("div"),t=f("h2"),t.textContent=`${k("settings.activity")}`,l=w(),i=f("p"),i.textContent=`${k("settings.activityStub")}`,r(t,"class","svelte-19bo7bn"),r(i,"class","section-desc svelte-19bo7bn"),r(e,"class","settings-section svelte-19bo7bn")},m(o,s){C(o,e,s),a(e,t),a(e,l),a(e,i)},p:ie,i:ie,o:ie,d(o){o&&S(e)}}}class a0 extends ct{constructor(e){super(),at(this,e,null,r0,rt,{})}}function ea(n){let e,t;return{c(){e=f("div"),t=F(n[2]),r(e,"class","error-msg svelte-1fx1e1e")},m(l,i){C(l,e,i),a(e,t)},p(l,i){i[0]&4&&Q(t,l[2])},d(l){l&&S(e)}}}function ta(n){let e,t;return{c(){e=f("div"),t=F(n[3]),r(e,"class","result-msg svelte-1fx1e1e"),ce(e,"warning",n[4]==="warning")},m(l,i){C(l,e,i),a(e,t)},p(l,i){i[0]&8&&Q(t,l[3]),i[0]&16&&ce(e,"warning",l[4]==="warning")},d(l){l&&S(e)}}}function c0(n){let e,t,l,i,o,s,c,u,d,p,h,m,g,b,v,y,E,T,I,N,R,M,A=k("settings.checkConnection")+"",L,j,B,U,z=k("common.connect")+"",W,G,X,H,D,q=n[11]!==null&&na(n);return{c(){e=f("div"),t=f("div"),l=f("div"),i=f("label"),o=f("span"),o.textContent=`${k("settings.serverUrl")}`,s=w(),c=f("input"),u=w(),d=f("div"),p=f("label"),h=f("span"),h.textContent=`${k("sync.username")}`,m=w(),g=f("input"),b=w(),v=f("div"),y=f("label"),E=f("span"),E.textContent=`${k("sync.password")}`,T=w(),I=f("input"),N=w(),R=f("div"),M=f("button"),L=F(A),B=w(),U=f("button"),W=F(z),X=w(),q&&q.c(),r(o,"class","label-text"),r(c,"type","text"),r(c,"placeholder","https://example.com"),r(l,"class","form-group svelte-1fx1e1e"),r(h,"class","label-text"),r(g,"type","text"),r(d,"class","form-group svelte-1fx1e1e"),r(E,"class","label-text"),r(I,"type","password"),r(v,"class","form-group svelte-1fx1e1e"),r(M,"class","btn"),M.disabled=j=n[1]||!n[5],r(U,"class","btn btn-primary"),U.disabled=G=n[1]||!n[5]||!n[6]||!n[7],r(R,"class","sync-setup-actions svelte-1fx1e1e"),r(t,"class","sync-setup svelte-1fx1e1e"),r(e,"class","settings-card svelte-1fx1e1e")},m(P,Y){C(P,e,Y),a(e,t),a(t,l),a(l,i),a(i,o),a(i,s),a(i,c),Me(c,n[5]),a(t,u),a(t,d),a(d,p),a(p,h),a(p,m),a(p,g),Me(g,n[6]),a(t,b),a(t,v),a(v,y),a(y,E),a(y,T),a(y,I),Me(I,n[7]),a(t,N),a(t,R),a(R,M),a(M,L),a(R,B),a(R,U),a(U,W),a(t,X),q&&q.m(t,null),H||(D=[O(c,"input",n[23]),O(g,"input",n[24]),O(I,"input",n[25]),O(M,"click",n[12]),O(U,"click",n[13])],H=!0)},p(P,Y){Y[0]&32&&c.value!==P[5]&&Me(c,P[5]),Y[0]&64&&g.value!==P[6]&&Me(g,P[6]),Y[0]&128&&I.value!==P[7]&&Me(I,P[7]),Y[0]&34&&j!==(j=P[1]||!P[5])&&(M.disabled=j),Y[0]&226&&G!==(G=P[1]||!P[5]||!P[6]||!P[7])&&(U.disabled=G),P[11]!==null?q?q.p(P,Y):(q=na(P),q.c(),q.m(t,null)):q&&(q.d(1),q=null)},d(P){P&&S(e),q&&q.d(),H=!1,Se(D)}}}function u0(n){let e,t,l,i,o,s,c=n[20](n[0].lastStatus)+"",u,d,p,h,m,g,b,v,y,E=k("settings.syncNow")+"",T,I,N,R=k("settings.disconnect")+"",M,A,L,j=k("settings.resetKey")+"",B,U,z,W,G,X,H,D,q,P,Y,Z,J=n[0].serverUrl&&la(n),te=n[0].deviceName&&ia(n),ne=n[0].deviceId&&sa(n),le=n[0].lastSyncAt&&oa(n),me=n[0].lastError&&ra(n);return{c(){e=f("div"),t=f("div"),l=f("div"),i=f("span"),i.textContent=`${k("settings.status")}`,o=w(),s=f("span"),u=F(c),d=w(),J&&J.c(),p=w(),te&&te.c(),h=w(),ne&&ne.c(),m=w(),le&&le.c(),g=w(),me&&me.c(),b=w(),v=f("div"),y=f("button"),T=F(E),I=w(),N=f("button"),M=F(R),A=w(),L=f("button"),B=F(j),U=w(),z=f("div"),W=f("label"),G=f("span"),G.textContent=`${k("sync.interval")}`,X=w(),H=f("div"),D=f("input"),q=w(),P=f("button"),P.textContent=`${k("common.save")}`,r(i,"class","info-label svelte-1fx1e1e"),r(s,"class","info-value svelte-1fx1e1e"),ce(s,"status-ok",n[0].lastStatus==="connected"),ce(s,"status-err",n[0].lastStatus==="error"||n[0].lastStatus==="revoked"),r(l,"class","info-row svelte-1fx1e1e"),r(t,"class","sync-info svelte-1fx1e1e"),r(e,"class","settings-card svelte-1fx1e1e"),r(y,"class","btn btn-primary"),y.disabled=n[1],r(N,"class","btn"),N.disabled=n[1],r(L,"class","btn"),L.disabled=n[1],r(v,"class","sync-actions svelte-1fx1e1e"),r(G,"class","label-text"),r(D,"type","number"),r(D,"min","0"),r(D,"placeholder","0"),r(D,"class","svelte-1fx1e1e"),r(P,"class","btn btn-sm"),r(H,"class","interval-row svelte-1fx1e1e"),r(z,"class","sync-interval svelte-1fx1e1e")},m(oe,ze){C(oe,e,ze),a(e,t),a(t,l),a(l,i),a(l,o),a(l,s),a(s,u),a(t,d),J&&J.m(t,null),a(t,p),te&&te.m(t,null),a(t,h),ne&&ne.m(t,null),a(t,m),le&&le.m(t,null),a(t,g),me&&me.m(t,null),C(oe,b,ze),C(oe,v,ze),a(v,y),a(y,T),a(v,I),a(v,N),a(N,M),a(v,A),a(v,L),a(L,B),C(oe,U,ze),C(oe,z,ze),a(z,W),a(W,G),a(W,X),a(W,H),a(H,D),Me(D,n[8]),a(H,q),a(H,P),Y||(Z=[O(y,"click",n[14]),O(N,"click",n[16]),O(L,"click",n[18]),O(D,"input",n[22]),O(P,"click",n[15])],Y=!0)},p(oe,ze){ze[0]&1&&c!==(c=oe[20](oe[0].lastStatus)+"")&&Q(u,c),ze[0]&1&&ce(s,"status-ok",oe[0].lastStatus==="connected"),ze[0]&1&&ce(s,"status-err",oe[0].lastStatus==="error"||oe[0].lastStatus==="revoked"),oe[0].serverUrl?J?J.p(oe,ze):(J=la(oe),J.c(),J.m(t,p)):J&&(J.d(1),J=null),oe[0].deviceName?te?te.p(oe,ze):(te=ia(oe),te.c(),te.m(t,h)):te&&(te.d(1),te=null),oe[0].deviceId?ne?ne.p(oe,ze):(ne=sa(oe),ne.c(),ne.m(t,m)):ne&&(ne.d(1),ne=null),oe[0].lastSyncAt?le?le.p(oe,ze):(le=oa(oe),le.c(),le.m(t,g)):le&&(le.d(1),le=null),oe[0].lastError?me?me.p(oe,ze):(me=ra(oe),me.c(),me.m(t,null)):me&&(me.d(1),me=null),ze[0]&2&&(y.disabled=oe[1]),ze[0]&2&&(N.disabled=oe[1]),ze[0]&2&&(L.disabled=oe[1]),ze[0]&256&&Gl(D.value)!==oe[8]&&Me(D,oe[8])},d(oe){oe&&(S(e),S(b),S(v),S(U),S(z)),J&&J.d(),te&&te.d(),ne&&ne.d(),le&&le.d(),me&&me.d(),Y=!1,Se(Z)}}}function na(n){let e,t=(n[11]?k("common.test")+" OK":k("error.generic"))+"",l;return{c(){e=f("div"),l=F(t),r(e,"class","connection-result svelte-1fx1e1e"),ce(e,"ok",n[11]),ce(e,"fail",!n[11])},m(i,o){C(i,e,o),a(e,l)},p(i,o){o[0]&2048&&t!==(t=(i[11]?k("common.test")+" OK":k("error.generic"))+"")&&Q(l,t),o[0]&2048&&ce(e,"ok",i[11]),o[0]&2048&&ce(e,"fail",!i[11])},d(i){i&&S(e)}}}function la(n){let e,t,l,i,o=n[0].serverUrl+"",s;return{c(){e=f("div"),t=f("span"),t.textContent=`${k("settings.serverUrl")}`,l=w(),i=f("span"),s=F(o),r(t,"class","info-label svelte-1fx1e1e"),r(i,"class","info-value mono svelte-1fx1e1e"),r(e,"class","info-row svelte-1fx1e1e")},m(c,u){C(c,e,u),a(e,t),a(e,l),a(e,i),a(i,s)},p(c,u){u[0]&1&&o!==(o=c[0].serverUrl+"")&&Q(s,o)},d(c){c&&S(e)}}}function ia(n){let e,t,l,i,o=n[0].deviceName+"",s;return{c(){e=f("div"),t=f("span"),t.textContent=`${k("settings.deviceName")}`,l=w(),i=f("span"),s=F(o),r(t,"class","info-label svelte-1fx1e1e"),r(i,"class","info-value svelte-1fx1e1e"),r(e,"class","info-row svelte-1fx1e1e")},m(c,u){C(c,e,u),a(e,t),a(e,l),a(e,i),a(i,s)},p(c,u){u[0]&1&&o!==(o=c[0].deviceName+"")&&Q(s,o)},d(c){c&&S(e)}}}function sa(n){let e,t,l,i,o=n[0].deviceId+"",s;return{c(){e=f("div"),t=f("span"),t.textContent=`${k("settings.deviceId")}`,l=w(),i=f("span"),s=F(o),r(t,"class","info-label svelte-1fx1e1e"),r(i,"class","info-value mono svelte-1fx1e1e"),r(e,"class","info-row svelte-1fx1e1e")},m(c,u){C(c,e,u),a(e,t),a(e,l),a(e,i),a(i,s)},p(c,u){u[0]&1&&o!==(o=c[0].deviceId+"")&&Q(s,o)},d(c){c&&S(e)}}}function oa(n){let e,t,l,i,o=n[0].lastSyncAt+"",s;return{c(){e=f("div"),t=f("span"),t.textContent=`${k("settings.lastSync")}`,l=w(),i=f("span"),s=F(o),r(t,"class","info-label svelte-1fx1e1e"),r(i,"class","info-value svelte-1fx1e1e"),r(e,"class","info-row svelte-1fx1e1e")},m(c,u){C(c,e,u),a(e,t),a(e,l),a(e,i),a(i,s)},p(c,u){u[0]&1&&o!==(o=c[0].lastSyncAt+"")&&Q(s,o)},d(c){c&&S(e)}}}function ra(n){let e,t,l,i,o=n[0].lastError+"",s;return{c(){e=f("div"),t=f("span"),t.textContent=`${k("settings.lastError")}`,l=w(),i=f("span"),s=F(o),r(t,"class","info-label svelte-1fx1e1e"),r(i,"class","info-value error svelte-1fx1e1e"),r(e,"class","info-row svelte-1fx1e1e")},m(c,u){C(c,e,u),a(e,t),a(e,l),a(e,i),a(i,s)},p(c,u){u[0]&1&&o!==(o=c[0].lastError+"")&&Q(s,o)},d(c){c&&S(e)}}}function aa(n){let e,t,l,i,o,s,c,u,d,p,h,m;return{c(){e=f("button"),t=f("div"),l=f("h3"),l.textContent=`${k("settings.confirmDisconnect")}`,i=w(),o=f("p"),o.textContent=`${k("settings.confirmDisconnectDesc")}`,s=w(),c=f("div"),u=f("button"),u.textContent=`${k("common.disconnect")}`,d=w(),p=f("button"),p.textContent=`${k("common.cancel")}`,r(l,"class","svelte-1fx1e1e"),r(o,"class","modal-desc svelte-1fx1e1e"),r(u,"class","btn btn-danger"),r(p,"class","btn"),r(c,"class","modal-actions svelte-1fx1e1e"),r(t,"class","modal svelte-1fx1e1e"),r(e,"class","modal-overlay svelte-1fx1e1e")},m(g,b){C(g,e,b),a(e,t),a(t,l),a(t,i),a(t,o),a(t,s),a(t,c),a(c,u),a(c,d),a(c,p),h||(m=[O(u,"click",n[17]),O(p,"click",n[26]),O(e,"click",n[27])],h=!0)},p:ie,d(g){g&&S(e),h=!1,Se(m)}}}function ca(n){let e,t,l,i,o,s,c,u,d,p,h,m;return{c(){e=f("button"),t=f("div"),l=f("h3"),l.textContent=`${k("settings.confirmResetKey")}`,i=w(),o=f("p"),o.textContent=`${k("settings.confirmResetKeyDesc")}`,s=w(),c=f("div"),u=f("button"),u.textContent=`${k("settings.resetKey")}`,d=w(),p=f("button"),p.textContent=`${k("common.cancel")}`,r(l,"class","svelte-1fx1e1e"),r(o,"class","modal-desc svelte-1fx1e1e"),r(u,"class","btn btn-danger"),r(p,"class","btn"),r(c,"class","modal-actions svelte-1fx1e1e"),r(t,"class","modal svelte-1fx1e1e"),r(e,"class","modal-overlay svelte-1fx1e1e")},m(g,b){C(g,e,b),a(e,t),a(t,l),a(t,i),a(t,o),a(t,s),a(t,c),a(c,u),a(c,d),a(c,p),h||(m=[O(u,"click",n[19]),O(p,"click",n[28]),O(e,"click",n[29])],h=!0)},p:ie,d(g){g&&S(e),h=!1,Se(m)}}}function f0(n){let e,t,l,i,o,s,c,u,d,p,h=n[2]&&ea(n),m=n[3]&&!n[2]&&ta(n);function g(T,I){return T[0]&&T[0].enabled?u0:c0}let b=g(n),v=b(n),y=n[9]&&aa(n),E=n[10]&&ca(n);return{c(){e=f("div"),t=f("h2"),t.textContent=`${k("settings.sync")}`,l=w(),i=f("p"),i.textContent=`${k("settings.syncDesc")}`,o=w(),h&&h.c(),s=w(),m&&m.c(),c=w(),v.c(),u=w(),y&&y.c(),d=w(),E&&E.c(),p=_t(),r(t,"class","svelte-1fx1e1e"),r(i,"class","section-desc svelte-1fx1e1e"),r(e,"class","settings-section svelte-1fx1e1e")},m(T,I){C(T,e,I),a(e,t),a(e,l),a(e,i),a(e,o),h&&h.m(e,null),a(e,s),m&&m.m(e,null),a(e,c),v.m(e,null),C(T,u,I),y&&y.m(T,I),C(T,d,I),E&&E.m(T,I),C(T,p,I)},p(T,I){T[2]?h?h.p(T,I):(h=ea(T),h.c(),h.m(e,s)):h&&(h.d(1),h=null),T[3]&&!T[2]?m?m.p(T,I):(m=ta(T),m.c(),m.m(e,c)):m&&(m.d(1),m=null),b===(b=g(T))&&v?v.p(T,I):(v.d(1),v=b(T),v&&(v.c(),v.m(e,null))),T[9]?y?y.p(T,I):(y=aa(T),y.c(),y.m(d.parentNode,d)):y&&(y.d(1),y=null),T[10]?E?E.p(T,I):(E=ca(T),E.c(),E.m(p.parentNode,p)):E&&(E.d(1),E=null)},i:ie,o:ie,d(T){T&&(S(e),S(u),S(d),S(p)),h&&h.d(),m&&m.d(),v.d(),y&&y.d(T),E&&E.d(T)}}}function ml(n,...e){try{if(window.go&&window.go.main&&window.go.main.App){const t=window.go.main.App[n];if(typeof t=="function")return t(...e)}}catch(t){console.error("Wails error:",n,t)}return Promise.reject(new Error("Wails not connected: "+n))}function d0(n,e,t){let{onRefresh:l=null}=e,i=null,o=!1,s="",c="",u="",d="",p="",h="",m=0,g=!1,b=!1,v=null;async function y(){try{t(0,i=await ml("GetSyncSettings")),i&&(t(5,d=i.serverUrl||""),t(8,m=i.syncInterval||0))}catch{t(0,i=null)}}y();async function E(){t(1,o=!0),t(2,s=""),t(4,u=""),t(11,v=null);try{await ml("SyncTestConnection",d,p,h),t(11,v=!0),t(3,c="connection ok")}catch(P){t(11,v=!1),t(3,c="connection failed: "+String(P))}t(1,o=!1)}async function T(){t(1,o=!0),t(2,s=""),t(4,u="");try{await ml("SyncConfigure",d,p,h),t(3,c="configured"),t(6,p=""),t(7,h=""),await y(),l&&l()}catch(P){t(2,s=String(P))}t(1,o=!1)}function I(P){const Y=Array.isArray(P==null?void 0:P.conflicts)?P.conflicts:[],Z=Array.isArray(P==null?void 0:P.applyErrors)?P.applyErrors:[],J=[];return Y.length>0&&J.push(k("sync.conflictsCount",{count:Y.length})),Z.length>0&&J.push(k("sync.applyErrorsCount",{count:Z.length})),J.join(" · ")}async function N(){t(1,o=!0),t(2,s=""),t(4,u="");try{const P=await ml("SyncNow"),Y=k("sync.pushedPulled",{pushed:(P==null?void 0:P.pushed)||0,pulled:(P==null?void 0:P.pulled)||0}),Z=I(P);t(3,c=Z?Y+" · "+Z:Y),t(4,u=Z?"warning":""),await y(),l&&l()}catch(P){t(2,s=String(P))}t(1,o=!1)}async function R(){try{await ml("SyncSetInterval",m),t(3,c=k("sync.settingsSaved")),t(4,u="")}catch(P){t(2,s=String(P))}}function M(){t(9,g=!0)}async function A(){t(9,g=!1),t(1,o=!0),t(4,u="");try{await ml("SyncDisconnect"),t(3,c="disconnected"),await y(),l&&l()}catch(P){t(2,s=String(P))}t(1,o=!1)}function L(){t(10,b=!0)}async function j(){t(10,b=!1),t(1,o=!0),t(4,u="");try{await ml("ResetSyncKey"),t(3,c="key reset"),await y(),l&&l()}catch(P){t(2,s=String(P))}t(1,o=!1)}function B(P){return P?{connected:k("settings.connected"),disconnected:k("settings.disconnected"),disabled:k("settings.notConfigured"),error:k("settings.error"),revoked:k("settings.revoked")}[P]||P:k("settings.notConfigured")}function U(){m=Gl(this.value),t(8,m)}function z(){d=this.value,t(5,d)}function W(){p=this.value,t(6,p)}function G(){h=this.value,t(7,h)}const X=()=>t(9,g=!1),H=()=>t(9,g=!1),D=()=>t(10,b=!1),q=()=>t(10,b=!1);return n.$$set=P=>{"onRefresh"in P&&t(21,l=P.onRefresh)},[i,o,s,c,u,d,p,h,m,g,b,v,E,T,N,R,M,A,L,j,B,l,U,z,W,G,X,H,D,q]}class p0 extends ct{constructor(e){super(),at(this,e,d0,f0,rt,{onRefresh:21},null,[-1,-1])}}function h0(n){let e,t,l,i;return{c(){e=f("div"),t=f("h2"),t.textContent=`${k("settings.backup")}`,l=w(),i=f("p"),i.textContent=`${k("settings.backupStub")}`,r(t,"class","svelte-19bo7bn"),r(i,"class","section-desc svelte-19bo7bn"),r(e,"class","settings-section svelte-19bo7bn")},m(o,s){C(o,e,s),a(e,t),a(e,l),a(e,i)},p:ie,i:ie,o:ie,d(o){o&&S(e)}}}class m0 extends ct{constructor(e){super(),at(this,e,null,h0,rt,{})}}function ua(n){let e,t;return{c(){e=f("div"),t=F(n[5]),r(e,"class","status-msg svelte-13i6m7m"),ce(e,"ok",n[6]==="ok"),ce(e,"error",n[6]==="error")},m(l,i){C(l,e,i),a(e,t)},p(l,i){i&32&&Q(t,l[5]),i&64&&ce(e,"ok",l[6]==="ok"),i&64&&ce(e,"error",l[6]==="error")},d(l){l&&S(e)}}}function fa(n){let e,t,l,i,o,s;return{c(){e=f("div"),t=f("span"),t.textContent="Активный порт",l=w(),i=f("span"),o=F("127.0.0.1:"),s=F(n[3]),r(t,"class","info-label svelte-13i6m7m"),r(i,"class","info-value mono svelte-13i6m7m"),r(e,"class","info-row svelte-13i6m7m")},m(c,u){C(c,e,u),a(e,t),a(e,l),a(e,i),a(i,o),a(i,s)},p(c,u){u&8&&Q(s,c[3])},d(c){c&&S(e)}}}function da(n){let e,t,l,i;return{c(){e=f("button"),t=F("Перезапустить сервер"),r(e,"class","btn"),e.disabled=n[4]},m(o,s){C(o,e,s),a(e,t),l||(i=O(e,"click",n[8]),l=!0)},p(o,s){s&16&&(e.disabled=o[4])},d(o){o&&S(e),l=!1,i()}}}function g0(n){let e,t,l,i,o,s,c,u,d,p,h,m,g,b,v,y,E,T,I,N,R,M,A,L,j,B,U,z=n[2]?"Запущен":"Остановлен",W,G,X,H,D,q,P,Y,Z,J=n[5]&&ua(n),te=n[2]&&n[3]&&fa(n),ne=n[0]&&da(n);return{c(){e=f("div"),t=f("h2"),t.textContent="Browser Bridge",l=w(),i=f("p"),i.textContent=`Локальный HTTP-сервер для приёма событий от браузерного расширения Verstak Bridge.
|
||
Работает только на 127.0.0.1.`,o=w(),J&&J.c(),s=w(),c=f("div"),u=f("div"),d=f("label"),p=f("input"),h=w(),m=f("span"),m.textContent="Включить Browser Bridge",g=w(),b=f("div"),v=f("label"),y=f("span"),y.textContent="Порт",E=w(),T=f("input"),N=w(),R=f("p"),R.textContent="По умолчанию: 9786. Требуется перезапуск сервера при изменении.",M=w(),A=f("div"),L=f("div"),j=f("span"),j.textContent="Статус",B=w(),U=f("span"),W=F(z),G=w(),te&&te.c(),X=w(),H=f("div"),D=f("button"),q=F("Сохранить"),P=w(),ne&&ne.c(),r(t,"class","svelte-13i6m7m"),r(i,"class","section-desc svelte-13i6m7m"),r(p,"type","checkbox"),r(m,"class","toggle-text svelte-13i6m7m"),r(d,"class","toggle-label svelte-13i6m7m"),r(u,"class","form-group svelte-13i6m7m"),r(y,"class","label-text svelte-13i6m7m"),r(T,"type","number"),r(T,"min","1024"),r(T,"max","65535"),T.disabled=I=!n[0],r(T,"class","svelte-13i6m7m"),r(R,"class","field-hint svelte-13i6m7m"),r(b,"class","form-group svelte-13i6m7m"),r(j,"class","info-label svelte-13i6m7m"),r(U,"class","info-value svelte-13i6m7m"),ce(U,"status-ok",n[2]),ce(U,"status-off",!n[2]),r(L,"class","info-row svelte-13i6m7m"),r(A,"class","bridge-status svelte-13i6m7m"),r(c,"class","settings-card svelte-13i6m7m"),r(D,"class","btn btn-primary"),D.disabled=n[4],r(H,"class","actions svelte-13i6m7m"),r(e,"class","settings-section svelte-13i6m7m")},m(le,me){C(le,e,me),a(e,t),a(e,l),a(e,i),a(e,o),J&&J.m(e,null),a(e,s),a(e,c),a(c,u),a(u,d),a(d,p),p.checked=n[0],a(d,h),a(d,m),a(c,g),a(c,b),a(b,v),a(v,y),a(v,E),a(v,T),Me(T,n[1]),a(b,N),a(b,R),a(c,M),a(c,A),a(A,L),a(L,j),a(L,B),a(L,U),a(U,W),a(A,G),te&&te.m(A,null),a(e,X),a(e,H),a(H,D),a(D,q),a(H,P),ne&&ne.m(H,null),Y||(Z=[O(p,"change",n[10]),O(T,"input",n[11]),O(D,"click",n[7])],Y=!0)},p(le,[me]){le[5]?J?J.p(le,me):(J=ua(le),J.c(),J.m(e,s)):J&&(J.d(1),J=null),me&1&&(p.checked=le[0]),me&1&&I!==(I=!le[0])&&(T.disabled=I),me&2&&Gl(T.value)!==le[1]&&Me(T,le[1]),me&4&&z!==(z=le[2]?"Запущен":"Остановлен")&&Q(W,z),me&4&&ce(U,"status-ok",le[2]),me&4&&ce(U,"status-off",!le[2]),le[2]&&le[3]?te?te.p(le,me):(te=fa(le),te.c(),te.m(A,null)):te&&(te.d(1),te=null),me&16&&(D.disabled=le[4]),le[0]?ne?ne.p(le,me):(ne=da(le),ne.c(),ne.m(H,null)):ne&&(ne.d(1),ne=null)},i:ie,o:ie,d(le){le&&S(e),J&&J.d(),te&&te.d(),ne&&ne.d(),Y=!1,Se(Z)}}}function _0(n,e,t){let{appConfig:l=null}=e,i=!1,o=9786,s=!1,c=0,u=!1,d="",p="";function h(){if(l&&l.vault&&l.vault.bridge){const E=l.vault.bridge;t(0,i=E.enabled!==!1),t(1,o=E.port||9786)}}async function m(){try{if(window.go&&window.go.main&&window.go.main.App){const E=await window.go.main.App.BridgeInfo();t(2,s=E.running||!1),t(3,c=E.port||0)}}catch{t(2,s=!1),t(3,c=0)}}h(),m();async function g(){t(4,u=!0),t(5,d=""),t(6,p="");try{l||t(9,l={}),l.vault||t(9,l.vault={},l),l.vault.bridge||t(9,l.vault.bridge={},l),t(9,l.vault.bridge.enabled=i,l),t(9,l.vault.bridge.port=o,l),window.go&&window.go.main&&window.go.main.App&&await window.go.main.App.SaveAppConfig(l),t(5,d="saved"),t(6,p="ok"),await m()}catch(E){t(5,d=String(E)),t(6,p="error")}t(4,u=!1)}async function b(){t(4,u=!0),t(5,d=""),t(6,p="");try{window.go&&window.go.main&&window.go.main.App&&await window.go.main.App.RestartBridge(),t(5,d="bridge restarted"),t(6,p="ok"),await m()}catch(E){t(5,d=String(E)),t(6,p="error")}t(4,u=!1)}function v(){i=this.checked,t(0,i)}function y(){o=Gl(this.value),t(1,o)}return n.$$set=E=>{"appConfig"in E&&t(9,l=E.appConfig)},[i,o,s,c,u,d,p,g,b,l,v,y]}class b0 extends ct{constructor(e){super(),at(this,e,_0,g0,rt,{appConfig:9})}}const{window:k0}=Ps;function v0(n){let e,t;return e=new b0({props:{appConfig:n[2]}}),{c(){Ge(e.$$.fragment)},m(l,i){He(e,l,i),t=!0},p(l,i){const o={};i&4&&(o.appConfig=l[2]),e.$set(o)},i(l){t||(fe(e.$$.fragment,l),t=!0)},o(l){be(e.$$.fragment,l),t=!1},d(l){We(e,l)}}}function w0(n){let e,t;return e=new m0({}),{c(){Ge(e.$$.fragment)},m(l,i){He(e,l,i),t=!0},p:ie,i(l){t||(fe(e.$$.fragment,l),t=!0)},o(l){be(e.$$.fragment,l),t=!1},d(l){We(e,l)}}}function y0(n){let e,t;return e=new p0({props:{onRefresh:n[7]}}),{c(){Ge(e.$$.fragment)},m(l,i){He(e,l,i),t=!0},p:ie,i(l){t||(fe(e.$$.fragment,l),t=!0)},o(l){be(e.$$.fragment,l),t=!1},d(l){We(e,l)}}}function E0(n){let e,t;return e=new a0({}),{c(){Ge(e.$$.fragment)},m(l,i){He(e,l,i),t=!0},p:ie,i(l){t||(fe(e.$$.fragment,l),t=!0)},o(l){be(e.$$.fragment,l),t=!1},d(l){We(e,l)}}}function T0(n){let e,t;return e=new o0({}),{c(){Ge(e.$$.fragment)},m(l,i){He(e,l,i),t=!0},p:ie,i(l){t||(fe(e.$$.fragment,l),t=!0)},o(l){be(e.$$.fragment,l),t=!1},d(l){We(e,l)}}}function S0(n){let e,t;return e=new i0({props:{onPluginToggle:n[0]}}),{c(){Ge(e.$$.fragment)},m(l,i){He(e,l,i),t=!0},p(l,i){const o={};i&1&&(o.onPluginToggle=l[0]),e.$set(o)},i(l){t||(fe(e.$$.fragment,l),t=!0)},o(l){be(e.$$.fragment,l),t=!1},d(l){We(e,l)}}}function C0(n){let e,t;return e=new Xv({props:{onRefresh:n[3]}}),{c(){Ge(e.$$.fragment)},m(l,i){He(e,l,i),t=!0},p:ie,i(l){t||(fe(e.$$.fragment,l),t=!0)},o(l){be(e.$$.fragment,l),t=!1},d(l){We(e,l)}}}function A0(n){let e,t;return e=new Wv({props:{onRefresh:n[3]}}),{c(){Ge(e.$$.fragment)},m(l,i){He(e,l,i),t=!0},p:ie,i(l){t||(fe(e.$$.fragment,l),t=!0)},o(l){be(e.$$.fragment,l),t=!1},d(l){We(e,l)}}}function N0(n){let e,t;return e=new zv({props:{appConfig:n[2],onSave:n[6]}}),{c(){Ge(e.$$.fragment)},m(l,i){He(e,l,i),t=!0},p(l,i){const o={};i&4&&(o.appConfig=l[2]),e.$set(o)},i(l){t||(fe(e.$$.fragment,l),t=!0)},o(l){be(e.$$.fragment,l),t=!1},d(l){We(e,l)}}}function I0(n){let e,t,l,i,o,s,c,u,d,p,h,m,g,b,v,y;d=new Pv({props:{activeSection:n[1],onSelect:n[4]}});const E=[N0,A0,C0,S0,T0,E0,y0,w0,v0],T=[];function I(N,R){return N[1]==="general"?0:N[1]==="workspace"?1:N[1]==="templates"?2:N[1]==="plugins"?3:N[1]==="files"?4:N[1]==="activity"?5:N[1]==="sync"?6:N[1]==="backup"?7:N[1]==="browserBridge"?8:-1}return~(m=I(n))&&(g=T[m]=E[m](n)),{c(){e=f("button"),t=f("div"),l=f("div"),i=f("h2"),i.textContent=`${k("settings.title")}`,o=w(),s=f("button"),s.innerHTML='<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>',c=w(),u=f("div"),Ge(d.$$.fragment),p=w(),h=f("div"),g&&g.c(),r(i,"class","svelte-zf2zsc"),r(s,"class","close-btn svelte-zf2zsc"),r(s,"title",k("settings.close")),r(l,"class","settings-header svelte-zf2zsc"),r(h,"class","settings-content svelte-zf2zsc"),r(u,"class","settings-body svelte-zf2zsc"),r(t,"class","settings-window svelte-zf2zsc"),r(e,"class","settings-overlay svelte-zf2zsc")},m(N,R){C(N,e,R),a(e,t),a(t,l),a(l,i),a(l,o),a(l,s),a(t,c),a(t,u),He(d,u,null),a(u,p),a(u,h),~m&&T[m].m(h,null),b=!0,v||(y=[O(k0,"keydown",n[8]),O(s,"click",n[5]),O(e,"click",Jt(n[5]))],v=!0)},p(N,[R]){const M={};R&2&&(M.activeSection=N[1]),d.$set(M);let A=m;m=I(N),m===A?~m&&T[m].p(N,R):(g&&(ft(),be(T[A],1,1,()=>{T[A]=null}),dt()),~m?(g=T[m],g?g.p(N,R):(g=T[m]=E[m](N),g.c()),fe(g,1),g.m(h,null)):g=null)},i(N){b||(fe(d.$$.fragment,N),fe(g),b=!0)},o(N){be(d.$$.fragment,N),be(g),b=!1},d(N){N&&S(e),We(d),~m&&T[m].d(),v=!1,Se(y)}}}function pa(n,...e){try{if(window.go&&window.go.main&&window.go.main.App){const t=window.go.main.App[n];if(typeof t=="function")return t(...e)}}catch(t){console.error("Wails error:",n,t)}return Promise.reject(new Error("Wails not connected: "+n))}function R0(n,e,t){let{onClose:l=null}=e,{onSyncRefresh:i=null}=e,{onPluginToggle:o=null}=e,{initialSection:s="general"}=e,c=s,u=null;async function d(){try{t(2,u=await pa("GetAppConfig"))}catch{t(2,u=null)}}d();function p(v){t(1,c=v)}function h(){l&&l()}async function m(v){try{await pa("SaveAppConfig",v),t(2,u=v)}catch(y){console.error(y)}}function g(){i&&i()}function b(v){v.key==="Escape"&&h()}return n.$$set=v=>{"onClose"in v&&t(9,l=v.onClose),"onSyncRefresh"in v&&t(10,i=v.onSyncRefresh),"onPluginToggle"in v&&t(0,o=v.onPluginToggle),"initialSection"in v&&t(11,s=v.initialSection)},[o,c,u,d,p,h,m,g,b,l,i,s]}class M0 extends ct{constructor(e){super(),at(this,e,R0,I0,rt,{onClose:9,onSyncRefresh:10,onPluginToggle:0,initialSection:11})}}function L0(n){let e,t,l,i,o,s,c,u;return{c(){e=f("div"),t=f("span"),l=w(),i=f("span"),i.textContent=`${k("sync.status.disabled")}`,o=w(),s=f("button"),s.textContent=`${k("sync.configure")}`,r(t,"class","sync-dot dot-disabled svelte-1rxbx0"),r(i,"class","sync-label svelte-1rxbx0"),r(s,"class","btn btn-xs svelte-1rxbx0"),r(e,"class","sync-status-row svelte-1rxbx0")},m(d,p){C(d,e,p),a(e,t),a(e,l),a(e,i),a(e,o),a(e,s),c||(u=O(s,"click",function(){wl(n[5])&&n[5].apply(this,arguments)}),c=!0)},p(d,p){n=d},d(d){d&&S(e),c=!1,u()}}}function O0(n){let e,t,l,i,o,s=n[7](n[0])+"",c,u,d,p,h,m=(n[1]?k("sync.running"):k("sync.run"))+"",g,b,v,y,E,T,I,N=n[0].unpushedOps>0&&ha(n),R=n[2]&&ma(n);return{c(){e=f("div"),t=f("span"),i=w(),o=f("span"),c=F(s),u=w(),N&&N.c(),d=w(),p=f("div"),h=f("button"),g=F(m),b=w(),v=f("button"),v.textContent=`${k("sync.details")}`,y=w(),R&&R.c(),E=_t(),r(t,"class",l="sync-dot "+n[6](n[0])+" svelte-1rxbx0"),r(o,"class","sync-label svelte-1rxbx0"),r(h,"class","btn btn-xs svelte-1rxbx0"),h.disabled=n[1],r(v,"class","btn btn-xs btn-link svelte-1rxbx0"),r(p,"class","sync-actions-row svelte-1rxbx0"),r(e,"class","sync-status-row svelte-1rxbx0")},m(M,A){C(M,e,A),a(e,t),a(e,i),a(e,o),a(o,c),a(e,u),N&&N.m(e,null),a(e,d),a(e,p),a(p,h),a(h,g),a(p,b),a(p,v),C(M,y,A),R&&R.m(M,A),C(M,E,A),T||(I=[O(h,"click",function(){wl(n[4])&&n[4].apply(this,arguments)}),O(v,"click",function(){wl(n[5])&&n[5].apply(this,arguments)})],T=!0)},p(M,A){n=M,A&1&&l!==(l="sync-dot "+n[6](n[0])+" svelte-1rxbx0")&&r(t,"class",l),A&1&&s!==(s=n[7](n[0])+"")&&Q(c,s),n[0].unpushedOps>0?N?N.p(n,A):(N=ha(n),N.c(),N.m(e,d)):N&&(N.d(1),N=null),A&2&&m!==(m=(n[1]?k("sync.running"):k("sync.run"))+"")&&Q(g,m),A&2&&(h.disabled=n[1]),n[2]?R?R.p(n,A):(R=ma(n),R.c(),R.m(E.parentNode,E)):R&&(R.d(1),R=null)},d(M){M&&(S(e),S(y),S(E)),N&&N.d(),R&&R.d(M),T=!1,Se(I)}}}function ha(n){let e,t=n[0].unpushedOps+"",l,i,o=k("sync.changes")+"",s;return{c(){e=f("span"),l=F(t),i=w(),s=F(o),r(e,"class","sync-count svelte-1rxbx0")},m(c,u){C(c,e,u),a(e,l),a(e,i),a(e,s)},p(c,u){u&1&&t!==(t=c[0].unpushedOps+"")&&Q(l,t)},d(c){c&&S(e)}}}function ma(n){let e,t,l;return{c(){e=f("div"),t=F(n[2]),r(e,"class",l=Go(n[3]==="warning"?"sync-message sync-message-warning":"sync-message")+" svelte-1rxbx0")},m(i,o){C(i,e,o),a(e,t)},p(i,o){o&4&&Q(t,i[2]),o&8&&l!==(l=Go(i[3]==="warning"?"sync-message sync-message-warning":"sync-message")+" svelte-1rxbx0")&&r(e,"class",l)},d(i){i&&S(e)}}}function D0(n){let e;function t(o,s){var c;return(c=o[0])!=null&&c.configured?O0:L0}let l=t(n),i=l(n);return{c(){e=f("div"),i.c(),r(e,"class","sync-status-widget svelte-1rxbx0")},m(o,s){C(o,e,s),i.m(e,null)},p(o,[s]){l===(l=t(o))&&i?i.p(o,s):(i.d(1),i=l(o),i&&(i.c(),i.m(e,null)))},i:ie,o:ie,d(o){o&&S(e),i.d()}}}function P0(n,e,t){let{syncStatus:l=null}=e,{syncLoading:i=!1}=e,{syncMessage:o=""}=e,{syncMessageKind:s=""}=e,{onSync:c=null}=e,{onOpenSettings:u=null}=e;function d(h){return!h||!h.configured?"dot-disabled":i?"dot-syncing":h.revoked?"dot-disabled":h.connected?"dot-connected":h.configured?"dot-warning":"dot-disabled"}function p(h){return!h||!h.configured?k("sync.status.disabled"):i?k("sync.status.syncing"):h.revoked?k("sync.status.error"):h.connected?k("sync.status.connected"):k("sync.status.disconnected")}return n.$$set=h=>{"syncStatus"in h&&t(0,l=h.syncStatus),"syncLoading"in h&&t(1,i=h.syncLoading),"syncMessage"in h&&t(2,o=h.syncMessage),"syncMessageKind"in h&&t(3,s=h.syncMessageKind),"onSync"in h&&t(4,c=h.onSync),"onOpenSettings"in h&&t(5,u=h.onOpenSettings)},[l,i,o,s,c,u,d,p]}class q0 extends ct{constructor(e){super(),at(this,e,P0,D0,rt,{syncStatus:0,syncLoading:1,syncMessage:2,syncMessageKind:3,onSync:4,onOpenSettings:5})}}function ga(n,e,t){const l=n.slice();return l[10]=e[t],l}function j0(n){let e,t=Te(n[0]),l=[];for(let i=0;i<t.length;i+=1)l[i]=ya(ga(n,t,i));return{c(){e=f("div");for(let i=0;i<l.length;i+=1)l[i].c();r(e,"class","event-list svelte-slao4o")},m(i,o){C(i,e,o);for(let s=0;s<l.length;s+=1)l[s]&&l[s].m(e,null)},p(i,o){if(o&93){t=Te(i[0]);let s;for(s=0;s<t.length;s+=1){const c=ga(i,t,s);l[s]?l[s].p(c,o):(l[s]=ya(c),l[s].c(),l[s].m(e,null))}for(;s<l.length;s+=1)l[s].d(1);l.length=t.length}},d(i){i&&S(e),tt(l,i)}}}function z0(n){let e;function t(o,s){return o[1]?F0:B0}let l=t(n),i=l(n);return{c(){e=f("div"),i.c(),r(e,"class","empty-state svelte-slao4o")},m(o,s){C(o,e,s),i.m(e,null)},p(o,s){l!==(l=t(o))&&(i.d(1),i=l(o),i&&(i.c(),i.m(e,null)))},d(o){o&&S(e),i.d()}}}function _a(n){let e,t=n[10].active_seconds+"",l,i;return{c(){e=f("span"),l=F(t),i=F("с"),r(e,"class","duration svelte-slao4o")},m(o,s){C(o,e,s),a(e,l),a(e,i)},p(o,s){s&1&&t!==(t=o[10].active_seconds+"")&&Q(l,t)},d(o){o&&S(e)}}}function ba(n){let e,t=n[6](n[10].ts_start)+"",l;return{c(){e=f("span"),l=F(t),r(e,"class","time svelte-slao4o")},m(i,o){C(i,e,o),a(e,l)},p(i,o){o&65&&t!==(t=i[6](i[10].ts_start)+"")&&Q(l,t)},d(i){i&&S(e)}}}function ka(n){let e,t=n[10].status+"",l,i;return{c(){e=f("span"),l=F(t),r(e,"class",i="status-badge status-"+n[10].status+" svelte-slao4o")},m(o,s){C(o,e,s),a(e,l)},p(o,s){s&1&&t!==(t=o[10].status+"")&&Q(l,t),s&1&&i!==(i="status-badge status-"+o[10].status+" svelte-slao4o")&&r(e,"class",i)},d(o){o&&S(e)}}}function va(n){let e,t,l=Ui(n[10].selected_text,120)+"",i,o;return{c(){e=f("div"),t=F('"'),i=F(l),o=F('"'),r(e,"class","event-text svelte-slao4o")},m(s,c){C(s,e,c),a(e,t),a(e,i),a(e,o)},p(s,c){c&1&&l!==(l=Ui(s[10].selected_text,120)+"")&&Q(i,l)},d(s){s&&S(e)}}}function wa(n){let e,t,l,i,o,s,c,u;function d(){return n[7](n[10])}function p(){return n[8](n[10])}function h(){return n[9](n[10])}return{c(){e=f("div"),t=f("button"),t.textContent="✓",l=w(),i=f("button"),i.textContent="📎",o=w(),s=f("button"),s.textContent="✕",r(t,"class","btn-accept svelte-slao4o"),r(t,"title","Принять как worklog"),r(i,"class","btn-attach svelte-slao4o"),r(i,"title","Прикрепить к делу"),r(s,"class","btn-dismiss svelte-slao4o"),r(s,"title","Удалить"),r(e,"class","event-actions svelte-slao4o")},m(m,g){C(m,e,g),a(e,t),a(e,l),a(e,i),a(e,o),a(e,s),c||(u=[O(t,"click",d),O(i,"click",p),O(s,"click",h)],c=!0)},p(m,g){n=m},d(m){m&&S(e),c=!1,Se(u)}}}function ya(n){let e,t,l=Ea(n[10].type)+"",i,o,s,c,u=(n[10].domain||"?")+"",d,p,h,m=Ui(n[10].title||n[10].url,80)+"",g,b,v,y,E,T,I,N,R,M=n[10].active_seconds>0&&_a(n),A=n[10].ts_start&&ba(n),L=n[10].status!=="pending"&&ka(n),j=n[10].selected_text&&va(n),B=n[10].status==="pending"&&wa(n);return{c(){e=f("div"),t=f("div"),i=F(l),o=w(),s=f("div"),c=f("div"),d=F(u),p=w(),h=f("div"),g=F(m),v=w(),y=f("div"),M&&M.c(),E=w(),A&&A.c(),T=w(),L&&L.c(),I=w(),j&&j.c(),N=w(),B&&B.c(),R=w(),r(t,"class","event-icon svelte-slao4o"),r(c,"class","event-domain svelte-slao4o"),r(h,"class","event-title svelte-slao4o"),r(h,"title",b=n[10].title),r(y,"class","event-meta svelte-slao4o"),r(s,"class","event-body svelte-slao4o"),r(e,"class","event-item svelte-slao4o"),ce(e,"pending",n[10].status==="pending")},m(U,z){C(U,e,z),a(e,t),a(t,i),a(e,o),a(e,s),a(s,c),a(c,d),a(s,p),a(s,h),a(h,g),a(s,v),a(s,y),M&&M.m(y,null),a(y,E),A&&A.m(y,null),a(y,T),L&&L.m(y,null),a(s,I),j&&j.m(s,null),a(e,N),B&&B.m(e,null),a(e,R)},p(U,z){z&1&&l!==(l=Ea(U[10].type)+"")&&Q(i,l),z&1&&u!==(u=(U[10].domain||"?")+"")&&Q(d,u),z&1&&m!==(m=Ui(U[10].title||U[10].url,80)+"")&&Q(g,m),z&1&&b!==(b=U[10].title)&&r(h,"title",b),U[10].active_seconds>0?M?M.p(U,z):(M=_a(U),M.c(),M.m(y,E)):M&&(M.d(1),M=null),U[10].ts_start?A?A.p(U,z):(A=ba(U),A.c(),A.m(y,T)):A&&(A.d(1),A=null),U[10].status!=="pending"?L?L.p(U,z):(L=ka(U),L.c(),L.m(y,null)):L&&(L.d(1),L=null),U[10].selected_text?j?j.p(U,z):(j=va(U),j.c(),j.m(s,null)):j&&(j.d(1),j=null),U[10].status==="pending"?B?B.p(U,z):(B=wa(U),B.c(),B.m(e,R)):B&&(B.d(1),B=null),z&1&&ce(e,"pending",U[10].status==="pending")},d(U){U&&S(e),M&&M.d(),A&&A.d(),L&&L.d(),j&&j.d(),B&&B.d()}}}function B0(n){let e;return{c(){e=f("p"),e.textContent=`${k("noBrowserEvents","Нет событий браузера")}`,r(e,"class","empty-text svelte-slao4o")},m(t,l){C(t,e,l)},d(t){t&&S(e)}}}function F0(n){let e;return{c(){e=f("p"),e.textContent=`${k("loading","Загрузка...")}`,r(e,"class","loading svelte-slao4o")},m(t,l){C(t,e,l)},d(t){t&&S(e)}}}function U0(n){let e,t,l,i,o,s=n[1]?"⏳":"🔄",c,u,d,p;function h(b,v){return b[0].length===0?z0:j0}let m=h(n),g=m(n);return{c(){e=f("div"),t=f("div"),l=f("h3"),l.textContent=`${k("browserEvents","События браузера")}`,i=w(),o=f("button"),c=F(s),u=w(),g.c(),r(l,"class","svelte-slao4o"),r(o,"class","refresh-btn svelte-slao4o"),o.disabled=n[1],r(t,"class","browser-header svelte-slao4o"),r(e,"class","browser-events svelte-slao4o")},m(b,v){C(b,e,v),a(e,t),a(t,l),a(t,i),a(t,o),a(o,c),a(e,u),g.m(e,null),d||(p=O(o,"click",function(){wl(n[5])&&n[5].apply(this,arguments)}),d=!0)},p(b,[v]){n=b,v&2&&s!==(s=n[1]?"⏳":"🔄")&&Q(c,s),v&2&&(o.disabled=n[1]),m===(m=h(n))&&g?g.p(n,v):(g.d(1),g=m(n),g&&(g.c(),g.m(e,null)))},i:ie,o:ie,d(b){b&&S(e),g.d(),d=!1,p()}}}function Ea(n){return n==="page_visit"?"🌐":n==="note_capture"?"📝":n==="screenshot"?"📸":"•"}function Ui(n,e){return n?n.length>e?n.substring(0,e)+"...":n:""}function H0(n,e,t){let{events:l=[]}=e,{loading:i=!1}=e,{onAccept:o=g=>{}}=e,{onDismiss:s=g=>{}}=e,{onAttach:c=g=>{}}=e,{onRefresh:u=()=>{}}=e,{formatTime:d=g=>""}=e;const p=g=>o(g),h=g=>c(g),m=g=>s(g);return n.$$set=g=>{"events"in g&&t(0,l=g.events),"loading"in g&&t(1,i=g.loading),"onAccept"in g&&t(2,o=g.onAccept),"onDismiss"in g&&t(3,s=g.onDismiss),"onAttach"in g&&t(4,c=g.onAttach),"onRefresh"in g&&t(5,u=g.onRefresh),"formatTime"in g&&t(6,d=g.formatTime)},[l,i,o,s,c,u,d,p,h,m]}class W0 extends ct{constructor(e){super(),at(this,e,H0,U0,rt,{events:0,loading:1,onAccept:2,onDismiss:3,onAttach:4,onRefresh:5,formatTime:6})}}function Ta(n,e,t){const l=n.slice();return l[69]=e[t],l}function Sa(n,e,t){const l=n.slice();return l[69]=e[t],l}function Ca(n,e,t){const l=n.slice();return l[64]=e[t],l[65]=e,l[66]=t,l}function Aa(n,e,t){const l=n.slice();return l[61]=e[t],l}function Na(n,e,t){const l=n.slice();return l[61]=e[t],l}function Ia(n){let e,t;return{c(){e=f("span"),t=F(n[4]),r(e,"class","tab-badge svelte-ii7vwz")},m(l,i){C(l,e,i),a(e,t)},p(l,i){i[0]&16&&Q(t,l[4])},d(l){l&&S(e)}}}function Ra(n){let e,t=n[3].length+"",l;return{c(){e=f("span"),l=F(t),r(e,"class","tab-badge svelte-ii7vwz")},m(i,o){C(i,e,o),a(e,l)},p(i,o){o[0]&8&&t!==(t=i[3].length+"")&&Q(l,t)},d(i){i&&S(e)}}}function Ma(n){let e,t=n[15].length+"",l;return{c(){e=f("span"),l=F(t),r(e,"class","tab-badge svelte-ii7vwz")},m(i,o){C(i,e,o),a(e,l)},p(i,o){o[0]&32768&&t!==(t=i[15].length+"")&&Q(l,t)},d(i){i&&S(e)}}}function G0(n){let e,t,l;return t=new W0({props:{events:n[15],loading:n[16],formatTime:n[5],onAccept:n[17],onDismiss:n[18],onAttach:n[19],onRefresh:n[20]}}),{c(){e=f("div"),Ge(t.$$.fragment),r(e,"class","today-tab-content svelte-ii7vwz")},m(i,o){C(i,e,o),He(t,e,null),l=!0},p(i,o){const s={};o[0]&32768&&(s.events=i[15]),o[0]&65536&&(s.loading=i[16]),o[0]&32&&(s.formatTime=i[5]),o[0]&131072&&(s.onAccept=i[17]),o[0]&262144&&(s.onDismiss=i[18]),o[0]&524288&&(s.onAttach=i[19]),o[0]&1048576&&(s.onRefresh=i[20]),t.$set(s)},i(i){l||(fe(t.$$.fragment,i),l=!0)},o(i){be(t.$$.fragment,i),l=!1},d(i){i&&S(e),We(t)}}}function K0(n){let e,t,l,i,o,s,c,u,d,p,h=n[25]==="asc"?"↑":"↓",m,g,b,v;function y(I,N){return I[3].length===0?J0:X0}let E=y(n),T=E(n);return{c(){e=f("div"),t=f("div"),l=f("div"),i=f("button"),i.textContent=`${k("today.sortByTime")}`,o=w(),s=f("button"),s.textContent=`${k("today.sortByName")}`,c=w(),u=f("button"),u.textContent=`${k("today.sortByType")}`,d=w(),p=f("span"),m=F(h),g=w(),T.c(),r(i,"class","sort-btn svelte-ii7vwz"),ce(i,"active",n[24]==="time"),r(s,"class","sort-btn svelte-ii7vwz"),ce(s,"active",n[24]==="name"),r(u,"class","sort-btn svelte-ii7vwz"),ce(u,"active",n[24]==="type"),r(p,"class","sort-dir svelte-ii7vwz"),r(l,"class","sort-controls svelte-ii7vwz"),r(t,"class","tab-controls svelte-ii7vwz"),r(e,"class","today-tab-content svelte-ii7vwz")},m(I,N){C(I,e,N),a(e,t),a(t,l),a(l,i),a(l,o),a(l,s),a(l,c),a(l,u),a(l,d),a(l,p),a(p,m),a(e,g),T.m(e,null),b||(v=[O(i,"click",n[56]),O(s,"click",n[57]),O(u,"click",n[58])],b=!0)},p(I,N){N[0]&16777216&&ce(i,"active",I[24]==="time"),N[0]&16777216&&ce(s,"active",I[24]==="name"),N[0]&16777216&&ce(u,"active",I[24]==="type"),N[0]&33554432&&h!==(h=I[25]==="asc"?"↑":"↓")&&Q(m,h),E===(E=y(I))&&T?T.p(I,N):(T.d(1),T=E(I),T&&(T.c(),T.m(e,null)))},i:ie,o:ie,d(I){I&&S(e),T.d(),b=!1,Se(v)}}}function V0(n){let e,t,l,i,o,s,c,u,d,p,h=n[23]==="asc"?"↑":"↓",m,g,b,v;function y(I,N){return I[2].length===0?x0:Q0}let E=y(n),T=E(n);return{c(){e=f("div"),t=f("div"),l=f("div"),i=f("button"),i.textContent=`${k("today.sortByTime")}`,o=w(),s=f("button"),s.textContent=`${k("today.sortByName")}`,c=w(),u=f("button"),u.textContent=`${k("today.sortByType")}`,d=w(),p=f("span"),m=F(h),g=w(),T.c(),r(i,"class","sort-btn svelte-ii7vwz"),ce(i,"active",n[22]==="time"),r(s,"class","sort-btn svelte-ii7vwz"),ce(s,"active",n[22]==="name"),r(u,"class","sort-btn svelte-ii7vwz"),ce(u,"active",n[22]==="type"),r(p,"class","sort-dir svelte-ii7vwz"),r(l,"class","sort-controls svelte-ii7vwz"),r(t,"class","tab-controls svelte-ii7vwz"),r(e,"class","today-tab-content svelte-ii7vwz")},m(I,N){C(I,e,N),a(e,t),a(t,l),a(l,i),a(l,o),a(l,s),a(l,c),a(l,u),a(l,d),a(l,p),a(p,m),a(e,g),T.m(e,null),b||(v=[O(i,"click",n[51]),O(s,"click",n[52]),O(u,"click",n[53])],b=!0)},p(I,N){N[0]&4194304&&ce(i,"active",I[22]==="time"),N[0]&4194304&&ce(s,"active",I[22]==="name"),N[0]&4194304&&ce(u,"active",I[22]==="type"),N[0]&8388608&&h!==(h=I[23]==="asc"?"↑":"↓")&&Q(m,h),E===(E=y(I))&&T?T.p(I,N):(T.d(1),T=E(I),T&&(T.c(),T.m(e,null)))},i:ie,o:ie,d(I){I&&S(e),T.d(),b=!1,Se(v)}}}function Z0(n){let e;function t(o,s){return o[0].length===0?e2:$0}let l=t(n),i=l(n);return{c(){e=f("div"),i.c(),r(e,"class","today-tab-content svelte-ii7vwz")},m(o,s){C(o,e,s),i.m(e,null)},p(o,s){l===(l=t(o))&&i?i.p(o,s):(i.d(1),i=l(o),i&&(i.c(),i.m(e,null)))},i:ie,o:ie,d(o){o&&S(e),i.d()}}}function Y0(n){let e;function t(o,s){return!o[1]||!o[1].events||o[1].events.length===0?n2:t2}let l=t(n),i=l(n);return{c(){e=f("div"),i.c(),r(e,"class","today-tab-content svelte-ii7vwz")},m(o,s){C(o,e,s),i.m(e,null)},p(o,s){l===(l=t(o))&&i?i.p(o,s):(i.d(1),i=l(o),i&&(i.c(),i.m(e,null)))},i:ie,o:ie,d(o){o&&S(e),i.d()}}}function X0(n){let e,t=Te(Ga(n[3],n[24],n[25])),l=[];for(let i=0;i<t.length;i+=1)l[i]=La(Ta(n,t,i));return{c(){e=f("div");for(let i=0;i<l.length;i+=1)l[i].c();r(e,"class","capture-list svelte-ii7vwz")},m(i,o){C(i,e,o);for(let s=0;s<l.length;s+=1)l[s]&&l[s].m(e,null)},p(i,o){if(o[0]&50348328){t=Te(Ga(i[3],i[24],i[25]));let s;for(s=0;s<t.length;s+=1){const c=Ta(i,t,s);l[s]?l[s].p(c,o):(l[s]=La(c),l[s].c(),l[s].m(e,null))}for(;s<l.length;s+=1)l[s].d(1);l.length=t.length}},d(i){i&&S(e),tt(l,i)}}}function J0(n){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${k("today.capturedEmpty")}`,r(t,"class","svelte-ii7vwz"),r(e,"class","today-empty svelte-ii7vwz")},m(l,i){C(l,e,i),a(e,t)},p:ie,d(l){l&&S(e)}}}function La(n){let e,t,l=Ka(n[69].captureKind||n[69].sourceKind)+"",i,o,s,c,u=n[69].title+"",d,p,h,m=n[8](n[69])+"",g,b,v,y=n[5](n[69].capturedAt||n[69].createdAt)+"",E,T,I,N;function R(){return n[59](n[69])}function M(...A){return n[60](n[69],...A)}return{c(){e=f("div"),t=f("span"),i=F(l),o=w(),s=f("div"),c=f("span"),d=F(u),p=w(),h=f("span"),g=F(m),b=w(),v=f("span"),E=F(y),T=w(),r(t,"class","capture-icon svelte-ii7vwz"),r(c,"class","capture-title svelte-ii7vwz"),r(h,"class","capture-meta svelte-ii7vwz"),r(s,"class","capture-body svelte-ii7vwz"),r(v,"class","capture-time svelte-ii7vwz"),r(e,"class","capture-item svelte-ii7vwz"),r(e,"role","button"),r(e,"tabindex","0")},m(A,L){C(A,e,L),a(e,t),a(t,i),a(e,o),a(e,s),a(s,c),a(c,d),a(s,p),a(s,h),a(h,g),a(e,b),a(e,v),a(v,E),a(e,T),I||(N=[O(e,"click",R),O(e,"keydown",M)],I=!0)},p(A,L){n=A,L[0]&50331656&&l!==(l=Ka(n[69].captureKind||n[69].sourceKind)+"")&&Q(i,l),L[0]&50331656&&u!==(u=n[69].title+"")&&Q(d,u),L[0]&50331912&&m!==(m=n[8](n[69])+"")&&Q(g,m),L[0]&50331688&&y!==(y=n[5](n[69].capturedAt||n[69].createdAt)+"")&&Q(E,y)},d(A){A&&S(e),I=!1,Se(N)}}}function Q0(n){let e,t=Te(n[30](n[2],n[22],n[23])),l=[];for(let i=0;i<t.length;i+=1)l[i]=Da(Sa(n,t,i));return{c(){e=f("div");for(let i=0;i<l.length;i+=1)l[i].c();r(e,"class","ip-list svelte-ii7vwz")},m(i,o){C(i,e,o);for(let s=0;s<l.length;s+=1)l[s]&&l[s].m(e,null)},p(i,o){if(o[0]&1086325988){t=Te(i[30](i[2],i[22],i[23]));let s;for(s=0;s<t.length;s+=1){const c=Sa(i,t,s);l[s]?l[s].p(c,o):(l[s]=Da(c),l[s].c(),l[s].m(e,null))}for(;s<l.length;s+=1)l[s].d(1);l.length=t.length}},d(i){i&&S(e),tt(l,i)}}}function x0(n){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${k("today.inProgressEmpty")}`,r(t,"class","svelte-ii7vwz"),r(e,"class","today-empty svelte-ii7vwz")},m(l,i){C(l,e,i),a(e,t)},p:ie,d(l){l&&S(e)}}}function Oa(n){let e,t=n[69].nodePath+"",l;return{c(){e=f("span"),l=F(t),r(e,"class","ip-path svelte-ii7vwz")},m(i,o){C(i,e,o),a(e,l)},p(i,o){o[0]&12582916&&t!==(t=i[69].nodePath+"")&&Q(l,t)},d(i){i&&S(e)}}}function Da(n){let e,t,l=n[7](n[69].eventType)+"",i,o,s,c,u=n[69].title+"",d,p,h,m,g=n[6](n[69].eventType)+"",b,v,y,E=n[5](n[69].createdAt)+"",T,I,N,R,M=n[69].nodePath&&Oa(n);function A(){return n[54](n[69])}function L(...j){return n[55](n[69],...j)}return{c(){e=f("div"),t=f("span"),i=F(l),o=w(),s=f("div"),c=f("span"),d=F(u),p=w(),M&&M.c(),h=w(),m=f("span"),b=F(g),v=w(),y=f("span"),T=F(E),I=w(),r(t,"class","ip-icon svelte-ii7vwz"),r(c,"class","ip-title svelte-ii7vwz"),r(s,"class","ip-body svelte-ii7vwz"),r(m,"class","ip-type svelte-ii7vwz"),r(y,"class","ip-time svelte-ii7vwz"),r(e,"class","ip-item svelte-ii7vwz"),r(e,"role","button"),r(e,"tabindex","0")},m(j,B){C(j,e,B),a(e,t),a(t,i),a(e,o),a(e,s),a(s,c),a(c,d),a(s,p),M&&M.m(s,null),a(e,h),a(e,m),a(m,b),a(e,v),a(e,y),a(y,T),a(e,I),N||(R=[O(e,"click",A),O(e,"keydown",L)],N=!0)},p(j,B){n=j,B[0]&12583044&&l!==(l=n[7](n[69].eventType)+"")&&Q(i,l),B[0]&12582916&&u!==(u=n[69].title+"")&&Q(d,u),n[69].nodePath?M?M.p(n,B):(M=Oa(n),M.c(),M.m(s,null)):M&&(M.d(1),M=null),B[0]&12582980&&g!==(g=n[6](n[69].eventType)+"")&&Q(b,g),B[0]&12582948&&E!==(E=n[5](n[69].createdAt)+"")&&Q(T,E)},d(j){j&&S(e),M&&M.d(),N=!1,Se(R)}}}function $0(n){let e,t=Te(n[0]),l=[];for(let i=0;i<t.length;i+=1)l[i]=Fa(Ca(n,t,i));return{c(){e=f("div");for(let i=0;i<l.length;i+=1)l[i].c();r(e,"class","suggestions-list svelte-ii7vwz")},m(i,o){C(i,e,o);for(let s=0;s<l.length;s+=1)l[s]&&l[s].m(e,null)},p(i,o){if(o[0]&201341537){t=Te(i[0]);let s;for(s=0;s<t.length;s+=1){const c=Ca(i,t,s);l[s]?l[s].p(c,o):(l[s]=Fa(c),l[s].c(),l[s].m(e,null))}for(;s<l.length;s+=1)l[s].d(1);l.length=t.length}},d(i){i&&S(e),tt(l,i)}}}function e2(n){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${k("suggest.noSuggestions")}`,r(t,"class","svelte-ii7vwz"),r(e,"class","today-empty svelte-ii7vwz")},m(l,i){C(l,e,i),a(e,t)},p:ie,d(l){l&&S(e)}}}function Pa(n){let e,t=n[64].events.length+"",l,i,o=k("suggest.detectedEvents")+"",s;return{c(){e=F("· "),l=F(t),i=w(),s=F(o)},m(c,u){C(c,e,u),C(c,l,u),C(c,i,u),C(c,s,u)},p(c,u){u[0]&1&&t!==(t=c[64].events.length+"")&&Q(l,t)},d(c){c&&(S(e),S(l),S(i),S(s))}}}function qa(n){let e,t,l,i=Te(n[64].events),o=[];for(let s=0;s<i.length;s+=1)o[s]=Ba(Aa(n,i,s));return{c(){e=f("div"),t=f("div"),t.textContent=`${k("suggest.detectedEvents")}`,l=w();for(let s=0;s<o.length;s+=1)o[s].c();r(t,"class","suggestion-detail-title svelte-ii7vwz"),r(e,"class","suggestion-detail svelte-ii7vwz")},m(s,c){C(s,e,c),a(e,t),a(e,l);for(let u=0;u<o.length;u+=1)o[u]&&o[u].m(e,null)},p(s,c){if(c[0]&10337){i=Te(s[64].events);let u;for(u=0;u<i.length;u+=1){const d=Aa(s,i,u);o[u]?o[u].p(d,c):(o[u]=Ba(d),o[u].c(),o[u].m(e,null))}for(;u<o.length;u+=1)o[u].d(1);o.length=i.length}},d(s){s&&S(e),tt(o,s)}}}function ja(n){let e,t=n[61].nodePath+"",l;return{c(){e=f("span"),l=F(t),r(e,"class","suggestion-event-path svelte-ii7vwz")},m(i,o){C(i,e,o),a(e,l)},p(i,o){o[0]&1&&t!==(t=i[61].nodePath+"")&&Q(l,t)},d(i){i&&S(e)}}}function za(n){let e,t,l;function i(){return n[50](n[61])}return{c(){e=f("button"),e.textContent=`${k("file.showInExplorer")}`,r(e,"class","link-btn svelte-ii7vwz")},m(o,s){C(o,e,s),t||(l=O(e,"click",i),t=!0)},p(o,s){n=o},d(o){o&&S(e),t=!1,l()}}}function Ba(n){let e,t,l=n[5](n[61].createdAt)+"",i,o,s,c,u=n[6](n[61].eventType)+"",d,p,h,m=n[61].title+"",g,b,v,y,E=n[61].targetType==="file"||n[61].eventType.startsWith("file_"),T,I,N,R=n[61].nodePath&&ja(n);function M(){return n[49](n[61])}let A=E&&za(n);return{c(){e=f("div"),t=f("span"),i=F(l),o=w(),R&&R.c(),s=w(),c=f("span"),d=F(u),p=w(),h=f("span"),g=F(m),b=w(),v=f("button"),v.textContent=`${k("common.open")}`,y=w(),A&&A.c(),T=w(),r(t,"class","suggestion-event-time svelte-ii7vwz"),r(c,"class","suggestion-event-type svelte-ii7vwz"),r(h,"class","suggestion-event-title svelte-ii7vwz"),r(v,"class","link-btn svelte-ii7vwz"),r(e,"class","suggestion-detail-event svelte-ii7vwz")},m(L,j){C(L,e,j),a(e,t),a(t,i),a(e,o),R&&R.m(e,null),a(e,s),a(e,c),a(c,d),a(e,p),a(e,h),a(h,g),a(e,b),a(e,v),a(e,y),A&&A.m(e,null),a(e,T),I||(N=O(v,"click",M),I=!0)},p(L,j){n=L,j[0]&33&&l!==(l=n[5](n[61].createdAt)+"")&&Q(i,l),n[61].nodePath?R?R.p(n,j):(R=ja(n),R.c(),R.m(e,s)):R&&(R.d(1),R=null),j[0]&65&&u!==(u=n[6](n[61].eventType)+"")&&Q(d,u),j[0]&1&&m!==(m=n[61].title+"")&&Q(g,m),j[0]&1&&(E=n[61].targetType==="file"||n[61].eventType.startsWith("file_")),E?A?A.p(n,j):(A=za(n),A.c(),A.m(e,T)):A&&(A.d(1),A=null)},d(L){L&&S(e),R&&R.d(),A&&A.d(),I=!1,N()}}}function Fa(n){let e,t,l,i,o=n[64].nodeTitle+"",s,c,u,d=n[64].summary+"",p,h,m,g=n[64].suggestedMin+"",b,v,y=k("worklog.min")+"",E,T,I,N,R,M,A,L,j,B,U,z,W,G,X,H,D,q,P,Y,Z;function J(){return n[42](n[64])}let te=n[64].events&&n[64].events.length>0&&Pa(n);function ne(...ee){return n[43](n[64],n[65],n[66],...ee)}function le(){return n[44](n[64])}function me(){return n[45](n[64])}function oe(){return n[46](n[64])}function ze(){return n[47](n[64],n[65],n[66])}function Ye(...ee){return n[48](n[64],n[65],n[66],...ee)}let Re=n[64]._expanded&&n[64].events&&n[64].events.length>0&&qa(n);return{c(){e=f("div"),t=f("div"),l=f("div"),i=f("button"),s=F(o),c=w(),u=f("span"),p=F(d),h=w(),m=f("span"),b=F(g),v=w(),E=F(y),te&&te.c(),T=w(),I=f("div"),N=f("span"),A=w(),L=f("input"),B=w(),U=f("span"),U.textContent=`${k("suggest.minutes")}`,z=w(),W=f("button"),W.textContent=`${k("suggest.edit")}`,G=w(),X=f("button"),X.textContent=`${k("suggest.apply")}`,H=w(),D=f("button"),D.textContent=`${k("common.delete")}`,q=w(),Re&&Re.c(),P=w(),r(i,"class","suggestion-node link-btn svelte-ii7vwz"),r(u,"class","suggestion-summary svelte-ii7vwz"),r(m,"class","suggestion-meta svelte-ii7vwz"),r(l,"class","suggestion-info svelte-ii7vwz"),r(N,"class","suggestion-confidence-dot svelte-ii7vwz"),r(N,"title",R=k("suggest.confidence."+n[64].confidence)),r(N,"aria-label",M=k("suggest.confidence."+n[64].confidence)),ce(N,"low",n[64].confidence==="low"),ce(N,"medium",n[64].confidence==="medium"),ce(N,"high",n[64].confidence==="high"),r(L,"type","number"),r(L,"class","suggestion-min-input svelte-ii7vwz"),L.value=j=n[64].suggestedMin,r(L,"min","1"),r(L,"max","480"),r(U,"class","suggestion-min-label svelte-ii7vwz"),r(W,"class","btn btn-sm svelte-ii7vwz"),r(X,"class","btn btn-sm btn-primary svelte-ii7vwz"),r(D,"class","btn btn-sm btn-danger svelte-ii7vwz"),r(I,"class","suggestion-actions svelte-ii7vwz"),r(t,"class","suggestion-main svelte-ii7vwz"),r(t,"role","button"),r(t,"tabindex","0"),r(e,"class","suggestion-card svelte-ii7vwz"),ce(e,"expanded",n[64]._expanded)},m(ee,re){C(ee,e,re),a(e,t),a(t,l),a(l,i),a(i,s),a(l,c),a(l,u),a(u,p),a(l,h),a(l,m),a(m,b),a(m,v),a(m,E),te&&te.m(m,null),a(t,T),a(t,I),a(I,N),a(I,A),a(I,L),a(I,B),a(I,U),a(I,z),a(I,W),a(I,G),a(I,X),a(I,H),a(I,D),a(e,q),Re&&Re.m(e,null),a(e,P),Y||(Z=[O(i,"click",Ve(J)),O(L,"change",Ve(ne)),O(W,"click",Ve(le)),O(X,"click",Ve(me)),O(D,"click",Ve(oe)),O(t,"click",ze),O(t,"keydown",Ye)],Y=!0)},p(ee,re){n=ee,re[0]&1&&o!==(o=n[64].nodeTitle+"")&&Q(s,o),re[0]&1&&d!==(d=n[64].summary+"")&&Q(p,d),re[0]&1&&g!==(g=n[64].suggestedMin+"")&&Q(b,g),n[64].events&&n[64].events.length>0?te?te.p(n,re):(te=Pa(n),te.c(),te.m(m,null)):te&&(te.d(1),te=null),re[0]&1&&R!==(R=k("suggest.confidence."+n[64].confidence))&&r(N,"title",R),re[0]&1&&M!==(M=k("suggest.confidence."+n[64].confidence))&&r(N,"aria-label",M),re[0]&1&&ce(N,"low",n[64].confidence==="low"),re[0]&1&&ce(N,"medium",n[64].confidence==="medium"),re[0]&1&&ce(N,"high",n[64].confidence==="high"),re[0]&1&&j!==(j=n[64].suggestedMin)&&L.value!==j&&(L.value=j),n[64]._expanded&&n[64].events&&n[64].events.length>0?Re?Re.p(n,re):(Re=qa(n),Re.c(),Re.m(e,P)):Re&&(Re.d(1),Re=null),re[0]&1&&ce(e,"expanded",n[64]._expanded)},d(ee){ee&&S(e),te&&te.d(),Re&&Re.d(),Y=!1,Se(Z)}}}function t2(n){let e,t=Te(n[1].events),l=[];for(let i=0;i<t.length;i+=1)l[i]=Ha(Na(n,t,i));return{c(){e=f("div");for(let i=0;i<l.length;i+=1)l[i].c();r(e,"class","feed-list svelte-ii7vwz")},m(i,o){C(i,e,o);for(let s=0;s<l.length;s+=1)l[s]&&l[s].m(e,null)},p(i,o){if(o[0]&805306466){t=Te(i[1].events);let s;for(s=0;s<t.length;s+=1){const c=Na(i,t,s);l[s]?l[s].p(c,o):(l[s]=Ha(c),l[s].c(),l[s].m(e,null))}for(;s<l.length;s+=1)l[s].d(1);l.length=t.length}},d(i){i&&S(e),tt(l,i)}}}function n2(n){let e,t,l,i;return{c(){e=f("div"),t=f("p"),t.textContent=`${k("today.feedEmpty")}`,l=w(),i=f("p"),i.textContent=`${k("today.feedHint")}`,r(t,"class","svelte-ii7vwz"),r(i,"class","hint svelte-ii7vwz"),r(e,"class","today-empty svelte-ii7vwz")},m(o,s){C(o,e,s),a(e,t),a(e,l),a(e,i)},p:ie,d(o){o&&S(e)}}}function Ua(n){let e,t=Hi(n[61])+"",l;return{c(){e=f("span"),l=F(t),r(e,"class","feed-path svelte-ii7vwz")},m(i,o){C(i,e,o),a(e,l)},p(i,o){o[0]&2&&t!==(t=Hi(i[61])+"")&&Q(l,t)},d(i){i&&S(e)}}}function Ha(n){let e,t,l=Wa(n[61].eventType)+"",i,o,s,c,u,d=n[28](n[61])+"",p,h,m,g,b,v=(n[61].title||"")+"",y,E,T,I=Hi(n[61]),N,R,M=n[6](n[61].eventType)+"",A,L,j,B=n[5](n[61].createdAt)+"",U,z,W,G,X,H,D=I&&Ua(n);function q(){return n[39](n[61])}function P(){return n[40](n[61])}function Y(...Z){return n[41](n[61],...Z)}return{c(){e=f("div"),t=f("span"),i=F(l),o=w(),s=f("div"),c=f("div"),u=f("span"),p=F(d),h=w(),m=f("span"),m.textContent=":",g=w(),b=f("span"),y=F(v),E=w(),T=f("div"),D&&D.c(),N=w(),R=f("span"),A=F(M),L=w(),j=f("span"),U=F(B),z=w(),W=f("button"),W.innerHTML='<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>',G=w(),r(t,"class","feed-icon svelte-ii7vwz"),r(u,"class","feed-type svelte-ii7vwz"),r(m,"class","feed-colon svelte-ii7vwz"),r(b,"class","feed-title link-btn svelte-ii7vwz"),r(c,"class","feed-title-line svelte-ii7vwz"),r(R,"class","feed-event-type svelte-ii7vwz"),r(j,"class","feed-time svelte-ii7vwz"),r(T,"class","feed-meta-line svelte-ii7vwz"),r(s,"class","feed-body svelte-ii7vwz"),r(W,"class","feed-nav-btn svelte-ii7vwz"),r(W,"title",k("common.open")),r(e,"class","feed-item svelte-ii7vwz"),r(e,"role","button"),r(e,"tabindex","0")},m(Z,J){C(Z,e,J),a(e,t),a(t,i),a(e,o),a(e,s),a(s,c),a(c,u),a(u,p),a(c,h),a(c,m),a(c,g),a(c,b),a(b,y),a(s,E),a(s,T),D&&D.m(T,null),a(T,N),a(T,R),a(R,A),a(T,L),a(T,j),a(j,U),a(e,z),a(e,W),a(e,G),X||(H=[O(W,"click",Ve(q)),O(e,"click",P),O(e,"keydown",Y)],X=!0)},p(Z,J){n=Z,J[0]&2&&l!==(l=Wa(n[61].eventType)+"")&&Q(i,l),J[0]&2&&d!==(d=n[28](n[61])+"")&&Q(p,d),J[0]&2&&v!==(v=(n[61].title||"")+"")&&Q(y,v),J[0]&2&&(I=Hi(n[61])),I?D?D.p(n,J):(D=Ua(n),D.c(),D.m(T,N)):D&&(D.d(1),D=null),J[0]&66&&M!==(M=n[6](n[61].eventType)+"")&&Q(A,M),J[0]&34&&B!==(B=n[5](n[61].createdAt)+"")&&Q(U,B)},d(Z){Z&&S(e),D&&D.d(),X=!1,Se(H)}}}function l2(n){var Y;let e,t,l,i=(((Y=n[1])==null?void 0:Y.date)||"")+"",o,s,c,u,d,p,h=k("today.suggestionsTab")+"",m,g,b,v,y,E,T=k("today.captured")+"",I,N,R,M,A,L,j,B,U,z,W,G=n[4]>0&&Ia(n),X=n[3].length>0&&Ra(n),H=n[15].length>0&&Ma(n);const D=[Y0,Z0,V0,K0,G0],q=[];function P(Z,J){return Z[21]==="feed"?0:Z[21]==="suggestions"?1:Z[21]==="inprogress"?2:Z[21]==="captured"?3:Z[21]==="browser"?4:-1}return~(j=P(n))&&(B=q[j]=D[j](n)),{c(){e=f("div"),t=f("div"),l=f("span"),o=F(i),s=w(),c=f("div"),u=f("button"),u.textContent=`${k("today.feed")}`,d=w(),p=f("button"),m=F(h),g=w(),G&&G.c(),b=w(),v=f("button"),v.textContent=`${k("today.inProgress")}`,y=w(),E=f("button"),I=F(T),N=w(),X&&X.c(),R=w(),M=f("button"),A=F(`Браузер
|
||
`),H&&H.c(),L=w(),B&&B.c(),r(l,"class","today-date svelte-ii7vwz"),r(t,"class","today-header svelte-ii7vwz"),r(u,"class","today-tab svelte-ii7vwz"),ce(u,"active",n[21]==="feed"),r(p,"class","today-tab svelte-ii7vwz"),ce(p,"active",n[21]==="suggestions"),r(v,"class","today-tab svelte-ii7vwz"),ce(v,"active",n[21]==="inprogress"),r(E,"class","today-tab svelte-ii7vwz"),ce(E,"active",n[21]==="captured"),r(M,"class","today-tab svelte-ii7vwz"),ce(M,"active",n[21]==="browser"),r(c,"class","today-tabs svelte-ii7vwz"),r(e,"class","today-screen svelte-ii7vwz")},m(Z,J){C(Z,e,J),a(e,t),a(t,l),a(l,o),a(e,s),a(e,c),a(c,u),a(c,d),a(c,p),a(p,m),a(p,g),G&&G.m(p,null),a(c,b),a(c,v),a(c,y),a(c,E),a(E,I),a(E,N),X&&X.m(E,null),a(c,R),a(c,M),a(M,A),H&&H.m(M,null),a(e,L),~j&&q[j].m(e,null),U=!0,z||(W=[O(u,"click",n[34]),O(p,"click",n[35]),O(v,"click",n[36]),O(E,"click",n[37]),O(M,"click",n[38])],z=!0)},p(Z,J){var ne;(!U||J[0]&2)&&i!==(i=(((ne=Z[1])==null?void 0:ne.date)||"")+"")&&Q(o,i),(!U||J[0]&2097152)&&ce(u,"active",Z[21]==="feed"),Z[4]>0?G?G.p(Z,J):(G=Ia(Z),G.c(),G.m(p,null)):G&&(G.d(1),G=null),(!U||J[0]&2097152)&&ce(p,"active",Z[21]==="suggestions"),(!U||J[0]&2097152)&&ce(v,"active",Z[21]==="inprogress"),Z[3].length>0?X?X.p(Z,J):(X=Ra(Z),X.c(),X.m(E,null)):X&&(X.d(1),X=null),(!U||J[0]&2097152)&&ce(E,"active",Z[21]==="captured"),Z[15].length>0?H?H.p(Z,J):(H=Ma(Z),H.c(),H.m(M,null)):H&&(H.d(1),H=null),(!U||J[0]&2097152)&&ce(M,"active",Z[21]==="browser");let te=j;j=P(Z),j===te?~j&&q[j].p(Z,J):(B&&(ft(),be(q[te],1,1,()=>{q[te]=null}),dt()),~j?(B=q[j],B?B.p(Z,J):(B=q[j]=D[j](Z),B.c()),fe(B,1),B.m(e,null)):B=null)},i(Z){U||(fe(B),U=!0)},o(Z){be(B),U=!1},d(Z){Z&&S(e),G&&G.d(),X&&X.d(),H&&H.d(),~j&&q[j].d(),z=!1,Se(W)}}}function Wa(n){return n==="note_created"||n==="file_added"||n==="folder_added"||n==="node_created"?"+":n==="file_deleted"||n==="folder_deleted"?"×":n==="file_renamed"||n==="folder_renamed"||n==="node_updated"?"~":n==="file_copied"?"⧉":n==="file_moved"||n==="folder_moved"?"→":n==="note_updated"?"✎":n==="action_created"?"▶":n==="action_done"?"✓":n==="worklog_added"?"⏱":"•"}function Hi(n){const e=[];return n.nodePath&&e.push(n.nodePath),e.length>0?e.join(" → "):""}function Ga(n,e,t){const l=[...n];return l.sort((i,o)=>{let s=0;if(e==="name")s=(i.title||"").localeCompare(o.title||"");else if(e==="type"){const c=i.captureKind||i.sourceKind||"",u=o.captureKind||o.sourceKind||"";s=c.localeCompare(u)}else s=(i.capturedAt||i.createdAt||"").localeCompare(o.capturedAt||o.createdAt||"");return t==="asc"?s:-s}),l}function Ka(n){return{text:"📝",url:"🔗",file:"📄",image:"🖼",folder:"📁"}[n]||"📦"}function i2(n,e,t){let{todayDashboard:l=null}=e,{suggestions:i=[]}=e,{inProgressItems:o=[]}=e,{todayCaptures:s=[]}=e,{suggestionCount:c=0}=e,{formatTime:u=$=>""}=e,{eventLabel:d=$=>$}=e,{eventIcon:p=$=>""}=e,{inboxMetaText:h=$=>""}=e,{onOpenNodeById:m=$=>{}}=e,{onOpenActivityEvent:g=$=>{}}=e,{onOpenActivityTarget:b=$=>{}}=e,{onOpenSuggestionWorklog:v=$=>{}}=e,{onAcceptSuggestion:y=$=>{}}=e,{onDeleteSuggestion:E=$=>{}}=e,{onOpenNodeFolder:T=$=>{}}=e,{onOpenInboxArtifact:I=$=>{}}=e,{onOpenTrashNode:N=$=>{}}=e,{browserEvents:R=[]}=e,{browserLoading:M=!1}=e,{onBrowserAccept:A=$=>{}}=e,{onBrowserDismiss:L=$=>{}}=e,{onBrowserAttach:j=$=>{}}=e,{onBrowserRefresh:B=()=>{}}=e,U="feed";function z($){y($)}function W($){E($)}function G($){return!$||!$.eventType?"":d($.eventType)}function X($){if(!(!$||!$.eventType)){if($.eventType==="folder_deleted"){$.targetId&&N($.targetId);return}if(["file_added","file_deleted","file_renamed","file_copied","file_moved","folder_added","folder_renamed","folder_moved"].includes($.eventType)){$.targetId?b($):$.nodeId&&m($.nodeId);return}if(["note_created","note_updated","note_deleted"].includes($.eventType)){$.targetType==="note"&&$.targetId?b($):$.nodeId&&m($.nodeId);return}if($.eventType==="worklog_added"){$.nodeId&&m($.nodeId);return}if(["action_created","action_done"].includes($.eventType)){$.nodeId&&m($.nodeId);return}($.id||$.nodeId)&&g($)}}function H($,we,ge){const Ie=[...$];return Ie.sort((it,ut)=>{let Xe=0;return we==="name"?Xe=(it.title||"").localeCompare(ut.title||""):we==="type"?Xe=(d(it.eventType)||"").localeCompare(d(ut.eventType)||""):Xe=(it.createdAt||"").localeCompare(ut.createdAt||""),ge==="asc"?Xe:-Xe}),Ie}let D="time",q="desc",P="time",Y="desc";const Z=()=>t(21,U="feed"),J=()=>t(21,U="suggestions"),te=()=>t(21,U="inprogress"),ne=()=>t(21,U="captured"),le=()=>t(21,U="browser"),me=$=>X($),oe=$=>X($),ze=($,we)=>we.key==="Enter"&&X($),Ye=$=>m($.nodeId),Re=($,we,ge,Ie)=>t(0,we[ge].suggestedMin=parseInt(Ie.target.value),i),ee=$=>v($),re=$=>z($),Ne=$=>W($),Be=($,we,ge)=>t(0,we[ge]._expanded=!$._expanded,i),ve=($,we,ge,Ie)=>Ie.key==="Enter"&&t(0,we[ge]._expanded=!$._expanded,i),Ue=$=>b($),Je=$=>T($.nodeId),Ae=()=>{t(22,D="time"),t(23,q=D==="time"&&q==="desc"?"asc":"desc")},Qe=()=>{t(22,D="name"),t(23,q=D==="name"&&q==="desc"?"asc":"desc")},Fe=()=>{t(22,D="type"),t(23,q=D==="type"&&q==="desc"?"asc":"desc")},Ce=$=>g($),Ke=($,we)=>we.key==="Enter"&&g($),De=()=>{t(24,P="time"),t(25,Y=P==="time"&&Y==="desc"?"asc":"desc")},Ze=()=>{t(24,P="name"),t(25,Y=P==="name"&&Y==="desc"?"asc":"desc")},Pe=()=>{t(24,P="type"),t(25,Y=P==="type"&&Y==="desc"?"asc":"desc")},ue=$=>I($),ke=($,we)=>we.key==="Enter"&&I($);return n.$$set=$=>{"todayDashboard"in $&&t(1,l=$.todayDashboard),"suggestions"in $&&t(0,i=$.suggestions),"inProgressItems"in $&&t(2,o=$.inProgressItems),"todayCaptures"in $&&t(3,s=$.todayCaptures),"suggestionCount"in $&&t(4,c=$.suggestionCount),"formatTime"in $&&t(5,u=$.formatTime),"eventLabel"in $&&t(6,d=$.eventLabel),"eventIcon"in $&&t(7,p=$.eventIcon),"inboxMetaText"in $&&t(8,h=$.inboxMetaText),"onOpenNodeById"in $&&t(9,m=$.onOpenNodeById),"onOpenActivityEvent"in $&&t(10,g=$.onOpenActivityEvent),"onOpenActivityTarget"in $&&t(11,b=$.onOpenActivityTarget),"onOpenSuggestionWorklog"in $&&t(12,v=$.onOpenSuggestionWorklog),"onAcceptSuggestion"in $&&t(31,y=$.onAcceptSuggestion),"onDeleteSuggestion"in $&&t(32,E=$.onDeleteSuggestion),"onOpenNodeFolder"in $&&t(13,T=$.onOpenNodeFolder),"onOpenInboxArtifact"in $&&t(14,I=$.onOpenInboxArtifact),"onOpenTrashNode"in $&&t(33,N=$.onOpenTrashNode),"browserEvents"in $&&t(15,R=$.browserEvents),"browserLoading"in $&&t(16,M=$.browserLoading),"onBrowserAccept"in $&&t(17,A=$.onBrowserAccept),"onBrowserDismiss"in $&&t(18,L=$.onBrowserDismiss),"onBrowserAttach"in $&&t(19,j=$.onBrowserAttach),"onBrowserRefresh"in $&&t(20,B=$.onBrowserRefresh)},[i,l,o,s,c,u,d,p,h,m,g,b,v,T,I,R,M,A,L,j,B,U,D,q,P,Y,z,W,G,X,H,y,E,N,Z,J,te,ne,le,me,oe,ze,Ye,Re,ee,re,Ne,Be,ve,Ue,Je,Ae,Qe,Fe,Ce,Ke,De,Ze,Pe,ue,ke]}class s2 extends ct{constructor(e){super(),at(this,e,i2,l2,rt,{todayDashboard:1,suggestions:0,inProgressItems:2,todayCaptures:3,suggestionCount:4,formatTime:5,eventLabel:6,eventIcon:7,inboxMetaText:8,onOpenNodeById:9,onOpenActivityEvent:10,onOpenActivityTarget:11,onOpenSuggestionWorklog:12,onAcceptSuggestion:31,onDeleteSuggestion:32,onOpenNodeFolder:13,onOpenInboxArtifact:14,onOpenTrashNode:33,browserEvents:15,browserLoading:16,onBrowserAccept:17,onBrowserDismiss:18,onBrowserAttach:19,onBrowserRefresh:20},null,[-1,-1,-1])}}function o2(n){let e,t,l,i,o=n[3]&&Va(n);return{c(){e=f("div"),o&&o.c(),t=w(),l=f("iframe"),r(l,"class","plugin-frame svelte-xgfxht"),r(l,"srcdoc",n[1]),r(l,"sandbox","allow-scripts allow-same-origin"),r(l,"title",i=n[0]+" panel"),r(e,"class","plugin-frame-container svelte-xgfxht")},m(s,c){C(s,e,c),o&&o.m(e,null),a(e,t),a(e,l),n[9](l)},p(s,c){s[3]?o?o.p(s,c):(o=Va(s),o.c(),o.m(e,t)):o&&(o.d(1),o=null),c&2&&r(l,"srcdoc",s[1]),c&1&&i!==(i=s[0]+" panel")&&r(l,"title",i)},d(s){s&&S(e),o&&o.d(),n[9](null)}}}function r2(n){let e,t,l,i,o,s,c;return{c(){e=f("div"),t=f("p"),l=F("Плагин «"),i=F(n[0]),o=F("» активен, но HTML-панель не настроена."),s=w(),c=f("p"),c.innerHTML='Для отображения контента добавьте поле <code class="svelte-xgfxht">panel</code> в <code class="svelte-xgfxht">plugin.json</code>.',r(c,"class","hint"),r(e,"class","empty-state svelte-xgfxht")},m(u,d){C(u,e,d),a(e,t),a(t,l),a(t,i),a(t,o),a(e,s),a(e,c)},p(u,d){d&1&&Q(i,u[0])},d(u){u&&S(e)}}}function a2(n){let e;return{c(){e=f("p"),e.textContent="Загрузка…",r(e,"class","loading svelte-xgfxht")},m(t,l){C(t,e,l)},p:ie,d(t){t&&S(e)}}}function Va(n){let e,t,l;return{c(){e=f("div"),t=F("⚠ "),l=F(n[3]),r(e,"class","plugin-error-bar svelte-xgfxht")},m(i,o){C(i,e,o),a(e,t),a(e,l)},p(i,o){o&8&&Q(l,i[3])},d(i){i&&S(e)}}}function c2(n){let e;function t(o,s){return o[2]?a2:o[1]?o2:r2}let l=t(n),i=l(n);return{c(){e=f("div"),i.c(),r(e,"class","plugin-page svelte-xgfxht")},m(o,s){C(o,e,s),i.m(e,null)},p(o,[s]){l===(l=t(o))&&i?i.p(o,s):(i.d(1),i=l(o),i&&(i.c(),i.m(e,null)))},i:ie,o:ie,d(o){o&&S(e),i.d()}}}function gl(n,...e){try{if(window.go&&window.go.main&&window.go.main.App){const t=window.go.main.App[n];if(typeof t=="function")return t(...e)}}catch(t){console.error("Wails error:",n,t)}return Promise.reject(new Error("Wails not connected: "+n))}function u2(n,e,t){let l,i,o,s,{sectionId:c=""}=e,u="",d=!0,p="",h=null,m=[],g=!1;function b(A){console.log("[CalendarPluginPage] postToIframe: iframeReady="+g+", hasEl="+!!h+", hasCW="+!!(h!=null&&h.contentWindow)),h&&h.contentWindow&&g?(console.log("[CalendarPluginPage] postToIframe: sending msg.type="+A.type),h.contentWindow.postMessage(A,"*")):(console.log("[CalendarPluginPage] postToIframe: queuing msg.type="+A.type),m.push(A))}function v(A){if(!h||!h.contentWindow||A.source!==h.contentWindow)return;const L=A.data;if(!(!L||typeof L!="object")&&!(!L.source||typeof L.source!="string")&&!(!L.action||typeof L.action!="string"))switch(L.action){case"ready":for(g=!0;m.length>0;)h.contentWindow.postMessage(m.shift(),"*");y();break;case"get-events":E(L.data);break;case"create-event":T(L.data);break;case"update-event":I(L.data);break;case"delete-event":N(L.data);break;default:console.log("[CalendarPluginPage] Unknown iframe action:",L.action)}}async function y(){try{console.log("[CalendarPluginPage] loadCalendarData: step 1");const A=new Date,L=A.getFullYear(),j=A.getMonth(),B=new Date(L,j,1).toISOString().slice(0,10)+"T00:00:00",U=new Date(L,j+1,0).toISOString().slice(0,10)+"T23:59:59";console.log("[CalendarPluginPage] loadCalendarData: step 2, start="+B+", end="+U),console.log("[CalendarPluginPage] loadCalendarData: step 3, calling get_events...");const z=gl("CallPluginFunction",i,s+"get_events",JSON.stringify({start:B,end:U}));console.log("[CalendarPluginPage] loadCalendarData: step 4, calling get_categories...");const W=gl("CallPluginFunction",i,s+"get_categories","{}");console.log("[CalendarPluginPage] loadCalendarData: step 5, awaiting Promise.all...");const[G,X]=await Promise.all([z,W]);console.log("[CalendarPluginPage] loadCalendarData: step 6, got results, eventsRaw="+typeof G+", categoriesRaw="+typeof X);const H=G?JSON.parse(G):[],D=X?JSON.parse(X):[];b({source:"verstak",type:"calendar-data",events:H,categories:D});try{window.go.main.App.WriteDebugLog("[CalendarPluginPage] calendar-data sent to iframe, events.len="+H.length+", categories.len="+((D==null?void 0:D.length)||0)+", typeof events="+typeof H+", typeof eventsRaw="+typeof G+", eventsRaw.length="+G.length+", eventsRaw.substr(0,10)="+String(G).substring(0,10))}catch{}}catch(A){console.error("[CalendarPluginPage] loadCalendarData:",A),console.log("[CalendarPluginPage] error details:",JSON.stringify({message:String(A),stack:A==null?void 0:A.stack})),t(3,p=String(A))}}async function E(A){try{const L=JSON.stringify({start:A.start,end:A.end}),j=await gl("CallPluginFunction",i,s+"get_events",L),B=j?JSON.parse(j):[];b({source:"verstak",type:"calendar-data",events:B})}catch(L){console.error("[CalendarPluginPage] get-events:",L)}}async function T(A){try{const L=JSON.stringify(A),j=await gl("CallPluginFunction",i,s+"create_event",L),B=j?JSON.parse(j):{};b({source:"verstak",type:"event-created",event:B}),y()}catch(L){console.error("[CalendarPluginPage] create-event:",L),b({source:"verstak",type:"error",message:String(L)})}}async function I(A){try{const L=JSON.stringify(A);await gl("CallPluginFunction",i,s+"update_event",L),b({source:"verstak",type:"event-updated",event:A}),y()}catch(L){console.error("[CalendarPluginPage] update-event:",L)}}async function N(A){try{const L=JSON.stringify({id:A.id});await gl("CallPluginFunction",i,s+"delete_event",L),b({source:"verstak",type:"event-deleted",id:A.id}),y()}catch(L){console.error("[CalendarPluginPage] delete-event:",L)}}ci(async()=>{try{t(1,u=await gl("GetPluginPanelHTML",i)||"")}catch(A){t(3,p=String(A))}t(2,d=!1),window.addEventListener("message",v)}),ui(()=>{window.removeEventListener("message",v)});function R(A,L){b({source:"verstak",type:"drop",date:L,data:A})}function M(A){On[A?"unshift":"push"](()=>{h=A,t(4,h)})}return n.$$set=A=>{"sectionId"in A&&t(5,c=A.sectionId)},n.$$.update=()=>{n.$$.dirty&32&&t(8,l=c.split(":")),n.$$.dirty&256&&t(0,i=l[1]||""),n.$$.dirty&256&&t(7,o=l[2]||"main"),n.$$.dirty&128&&o.charAt(0).toUpperCase()+o.slice(1),n.$$.dirty&1&&(s=i?i+".":"")},[i,u,d,p,h,c,R,o,l,M]}class f2 extends ct{constructor(e){super(),at(this,e,u2,c2,rt,{sectionId:5,handleDrop:6})}get handleDrop(){return this.$$.ctx[6]}}const Gd={й:"q",ц:"w",у:"e",к:"r",е:"t",н:"y",г:"u",ш:"i",щ:"o",з:"p",х:"[",ъ:"]",ф:"a",ы:"s",в:"d",а:"f",п:"g",р:"h",о:"j",л:"k",д:"l",ж:";",э:"'",я:"z",ч:"x",с:"c",м:"v",и:"b",т:"n",ь:"m",ю:",",ё:"`",Й:"Q",Ц:"W",У:"E",К:"R",Е:"T",Н:"Y",Г:"U",Ш:"I",Щ:"O",З:"P",Х:"{",Ъ:"}",Ф:"A",Ы:"S",В:"D",А:"F",П:"G",Р:"H",О:"J",Л:"K",Д:"L",Ж:":",Э:'"',Я:"Z",Ч:"X",С:"C",М:"V",И:"B",Т:"N",Ь:"M",Ю:"<",Ё:"~"},Kd={};for(const[n,e]of Object.entries(Gd))Kd[e]=n;function Vd(n,e){let t="";for(const l of n)t+=e[l]??l;return t}function d2(n){return Vd(n,Gd)}function p2(n){return Vd(n,Kd)}function Zd(n){const e=new Set;e.add(n);const t=d2(n);t!==n&&e.add(t);const l=p2(n);l!==n&&e.add(l);const i=new Set;for(const o of e)i.add(o.toLowerCase());for(const o of i)e.add(o);return Array.from(e)}function Za(n,e,t){const l=n.slice();return l[25]=e[t],l[27]=t,l}function Ya(n){let e;function t(o,s){return o[3]?g2:o[1].length===0?m2:h2}let l=t(n),i=l(n);return{c(){e=f("div"),i.c(),r(e,"class","global-search-results svelte-1dlr37h")},m(o,s){C(o,e,s),i.m(e,null)},p(o,s){l===(l=t(o))&&i?i.p(o,s):(i.d(1),i=l(o),i&&(i.c(),i.m(e,null)))},d(o){o&&S(e),i.d()}}}function h2(n){let e,t=Te(n[1]),l=[];for(let i=0;i<t.length;i+=1)l[i]=Qa(Za(n,t,i));return{c(){for(let i=0;i<l.length;i+=1)l[i].c();e=_t()},m(i,o){for(let s=0;s<l.length;s+=1)l[s]&&l[s].m(i,o);C(i,e,o)},p(i,o){if(o&338){t=Te(i[1]);let s;for(s=0;s<t.length;s+=1){const c=Za(i,t,s);l[s]?l[s].p(c,o):(l[s]=Qa(c),l[s].c(),l[s].m(e.parentNode,e))}for(;s<l.length;s+=1)l[s].d(1);l.length=t.length}},d(i){i&&S(e),tt(l,i)}}}function m2(n){let e;return{c(){e=f("div"),e.textContent=`${k("search.noResults")}`,r(e,"class","global-search-empty svelte-1dlr37h")},m(t,l){C(t,e,l)},p:ie,d(t){t&&S(e)}}}function g2(n){let e;return{c(){e=f("div"),e.textContent=`${k("common.loading")}`,r(e,"class","global-search-empty svelte-1dlr37h")},m(t,l){C(t,e,l)},p:ie,d(t){t&&S(e)}}}function Xa(n){let e,t=n[6](n[25])+"",l;return{c(){e=f("span"),l=F(t),r(e,"class","global-search-meta svelte-1dlr37h")},m(i,o){C(i,e,o),a(e,l)},p(i,o){o&2&&t!==(t=i[6](i[25])+"")&&Q(l,t)},d(i){i&&S(e)}}}function Ja(n){let e,t=n[25].snippet+"",l;return{c(){e=f("span"),l=F(t),r(e,"class","global-search-snippet svelte-1dlr37h")},m(i,o){C(i,e,o),a(e,l)},p(i,o){o&2&&t!==(t=i[25].snippet+"")&&Q(l,t)},d(i){i&&S(e)}}}function Qa(n){let e,t,l=n[25].title+"",i,o,s=n[6](n[25]),c,u,d,p,h=s&&Xa(n),m=n[25].snippet&&Ja(n);function g(){return n[17](n[25])}return{c(){e=f("button"),t=f("span"),i=F(l),o=w(),h&&h.c(),c=w(),m&&m.c(),u=w(),r(t,"class","global-search-title svelte-1dlr37h"),r(e,"class","global-search-result svelte-1dlr37h"),ce(e,"selected",n[27]===n[4])},m(b,v){C(b,e,v),a(e,t),a(t,i),a(e,o),h&&h.m(e,null),a(e,c),m&&m.m(e,null),a(e,u),d||(p=O(e,"mousedown",Wi(g)),d=!0)},p(b,v){n=b,v&2&&l!==(l=n[25].title+"")&&Q(i,l),v&2&&(s=n[6](n[25])),s?h?h.p(n,v):(h=Xa(n),h.c(),h.m(e,c)):h&&(h.d(1),h=null),n[25].snippet?m?m.p(n,v):(m=Ja(n),m.c(),m.m(e,u)):m&&(m.d(1),m=null),v&16&&ce(e,"selected",n[27]===n[4])},d(b){b&&S(e),h&&h.d(),m&&m.d(),d=!1,p()}}}function _2(n){let e,t,l,i,o,s=n[2]&&Ya(n);return{c(){e=f("div"),t=f("input"),l=w(),s&&s.c(),r(t,"class","global-search-input svelte-1dlr37h"),r(t,"type","search"),r(t,"placeholder",k("search.placeholder")),r(t,"aria-label",k("search.placeholder")),r(t,"autocomplete","off"),r(e,"class","global-search svelte-1dlr37h")},m(c,u){C(c,e,u),a(e,t),n[13](t),Me(t,n[0]),a(e,l),s&&s.m(e,null),i||(o=[O(t,"input",n[14]),O(t,"input",n[9]),O(t,"focus",n[15]),O(t,"keydown",n[10]),O(t,"blur",n[16])],i=!0)},p(c,[u]){u&1&&t.value!==c[0]&&Me(t,c[0]),c[2]?s?s.p(c,u):(s=Ya(c),s.c(),s.m(e,null)):s&&(s.d(1),s=null)},i:ie,o:ie,d(c){c&&S(e),n[13](null),s&&s.d(),i=!1,Se(o)}}}function Yd(n){return String(n||"").trim()}function b2(n){return Yd(n.path)}function k2(n){return!n||!(n instanceof Element)?!1:!!n.closest('input, textarea, select, [contenteditable="true"], [contenteditable=""]')}function v2(n,e,t){let{wailsCall:l=async()=>[]}=e,{typeLabel:i=z=>z||""}=e;const o=bn();let s="",c=[],u=!1,d=!1,p=0,h,m;function g(z){const W=[],G=i(z.type),X=b2(z);return G&&W.push(G),X&&W.push(X),W.join(" · ")}async function b(){const z=Yd(s);if(z.length<2){t(1,c=[]),t(2,u=!1),t(3,d=!1);return}t(3,d=!0);try{const W=Zd(z),G=new Set,X=[];for(const q of W)G.has(q)||(G.add(q),X.push(q));const H=await Promise.all(X.map(q=>l("Search",q).catch(()=>[]))),D=new Map;for(let q=0;q<H.length;q++){const P=H[q]||[];for(const Y of P){const Z=Y.type+":"+Y.nodeId+":"+(Y.targetId||"")+":"+Y.title;D.has(Z)||D.set(Z,Y)}}t(1,c=Array.from(D.values())),t(4,p=0),t(2,u=c.length>0)}catch{t(1,c=[]),t(2,u=!1)}finally{t(3,d=!1)}}function v(){clearTimeout(m),m=setTimeout(b,180)}function y(){t(2,u=!1),t(4,p=0)}function E(){t(0,s=""),t(1,c=[]),y()}function T(z){z&&(o("open",z),E(),h==null||h.blur())}function I(){v()}function N(z){if(z.key==="Escape"){z.preventDefault(),E(),h==null||h.blur();return}!u||c.length===0||(z.key==="ArrowDown"?(z.preventDefault(),t(4,p=Math.min(c.length-1,p+1))):z.key==="ArrowUp"?(z.preventDefault(),t(4,p=Math.max(0,p-1))):z.key==="Enter"&&(z.preventDefault(),T(c[p])))}async function R(){await gg(),h==null||h.focus(),h==null||h.select()}function M(z){if((z.ctrlKey||z.metaKey)&&z.key.toLowerCase()==="k"){z.preventDefault(),R();return}z.key==="/"&&!k2(z.target)&&(z.preventDefault(),R())}ci(()=>{window.addEventListener("keydown",M)}),ui(()=>{window.removeEventListener("keydown",M),clearTimeout(m)});function A(z){On[z?"unshift":"push"](()=>{h=z,t(5,h)})}function L(){s=this.value,t(0,s)}const j=()=>{c.length>0&&t(2,u=!0)},B=()=>setTimeout(y,160),U=z=>T(z);return n.$$set=z=>{"wailsCall"in z&&t(11,l=z.wailsCall),"typeLabel"in z&&t(12,i=z.typeLabel)},[s,c,u,d,p,h,g,y,T,I,N,l,i,A,L,j,B,U]}class w2 extends ct{constructor(e){super(),at(this,e,v2,_2,rt,{wailsCall:11,typeLabel:12})}}const y2=n=>({}),xa=n=>({});function $a(n){let e,t;return{c(){e=f("span"),t=F(n[1]),r(e,"class","header-subtitle svelte-7x8q9h")},m(l,i){C(l,e,i),a(e,t)},p(l,i){i&2&&Q(t,l[1])},d(l){l&&S(e)}}}function E2(n){let e,t,l,i=(n[0]||"")+"",o,s,c,u,d,p,h,m=n[1]&&$a(n);d=new w2({props:{wailsCall:n[2],typeLabel:n[3]}}),d.$on("open",n[7]);const g=n[6].actions,b=ug(g,n,n[5],xa);return{c(){e=f("header"),t=f("div"),l=f("span"),o=F(i),s=w(),m&&m.c(),c=w(),u=f("div"),Ge(d.$$.fragment),p=w(),b&&b.c(),r(l,"class","header-title svelte-7x8q9h"),ce(l,"placeholder",!n[0]),r(t,"class","header-left svelte-7x8q9h"),r(u,"class","header-right svelte-7x8q9h"),r(e,"class","header svelte-7x8q9h")},m(v,y){C(v,e,y),a(e,t),a(t,l),a(l,o),a(t,s),m&&m.m(t,null),a(e,c),a(e,u),He(d,u,null),a(u,p),b&&b.m(u,null),h=!0},p(v,[y]){(!h||y&1)&&i!==(i=(v[0]||"")+"")&&Q(o,i),(!h||y&1)&&ce(l,"placeholder",!v[0]),v[1]?m?m.p(v,y):(m=$a(v),m.c(),m.m(t,null)):m&&(m.d(1),m=null);const E={};y&4&&(E.wailsCall=v[2]),y&8&&(E.typeLabel=v[3]),d.$set(E),b&&b.p&&(!h||y&32)&&dg(b,g,v,v[5],h?fg(g,v[5],y,y2):pg(v[5]),xa)},i(v){h||(fe(d.$$.fragment,v),fe(b,v),h=!0)},o(v){be(d.$$.fragment,v),be(b,v),h=!1},d(v){v&&S(e),m&&m.d(),We(d),b&&b.d(v)}}}function T2(n,e,t){let{$$slots:l={},$$scope:i}=e,{title:o=""}=e,{subtitle:s=""}=e,{wailsCall:c=async()=>[]}=e,{typeLabel:u=h=>h||""}=e,{onOpenSearchResult:d=()=>{}}=e;const p=h=>d(h.detail);return n.$$set=h=>{"title"in h&&t(0,o=h.title),"subtitle"in h&&t(1,s=h.subtitle),"wailsCall"in h&&t(2,c=h.wailsCall),"typeLabel"in h&&t(3,u=h.typeLabel),"onOpenSearchResult"in h&&t(4,d=h.onOpenSearchResult),"$$scope"in h&&t(5,i=h.$$scope)},[o,s,c,u,d,i,l,p]}class S2 extends ct{constructor(e){super(),at(this,e,T2,E2,rt,{title:0,subtitle:1,wailsCall:2,typeLabel:3,onOpenSearchResult:4})}}const C2={open:'<path d="M15 3h6v6"/><path d="M10 14 21 3"/><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/>',showInExplorer:'<path d="M3 6.5A2.5 2.5 0 0 1 5.5 4H9l2 2h8.5A2.5 2.5 0 0 1 22 8.5v8A2.5 2.5 0 0 1 19.5 19h-15A2.5 2.5 0 0 1 2 16.5v-10"/><path d="M12 11h6"/><path d="m15 8 3 3-3 3"/>',delete:'<polyline points="3 6 5 6 21 6"/><path d="M19 6l-1 14H6L5 6"/><path d="M10 11v6"/><path d="M14 11v6"/><path d="M9 6V4h6v2"/>',restore:'<path d="M3 7v6h6"/><path d="M21 17a9 9 0 0 0-15-6.7L3 13"/><path d="M12 12v5"/><path d="m9 14 3-3 3 3"/>',purge:'<path d="M3 6h18"/><path d="M8 6V4h8v2"/><path d="m9 11 6 6"/><path d="m15 11-6 6"/><path d="M6 6l1 14h10l1-14"/>',move:'<path d="M5 9V5h4"/><path d="m5 5 6 6"/><path d="M19 15v4h-4"/><path d="m19 19-6-6"/><path d="M19 5h-4"/><path d="M19 5v4"/><path d="m14 10 5-5"/><path d="M5 19h4"/><path d="M5 19v-4"/><path d="m10 14-5 5"/>',attach:'<path d="M21.44 11.05 12 20.49a6 6 0 0 1-8.49-8.49l9.44-9.44a4 4 0 1 1 5.66 5.66L9.17 17.66a2 2 0 1 1-2.83-2.83l8.49-8.48"/>',back:'<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>',emptyTrash:'<path d="M3 6h18"/><path d="M8 6V4h8v2"/><path d="M6 6l1 14h10l1-14"/><path d="M10 11v5"/><path d="M14 11v5"/>',folder:'<path d="M3 6.5A2.5 2.5 0 0 1 5.5 4H9l2 2h8.5A2.5 2.5 0 0 1 22 8.5v8A2.5 2.5 0 0 1 19.5 19h-15A2.5 2.5 0 0 1 2 16.5v-10"/>'};function Tt(n,e=16){return`<svg width="${e}" height="${e}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">${C2[n]||""}</svg>`}function A2(n){let e,t,l,i,o,s,c,u,d,p,h,m,g,b,v,y,E,T,I,N,R,M,A,L,j,B,U,z,W,G,X,H,D,q,P,Y,Z,J;return{c(){e=f("div"),t=f("div"),l=f("div"),i=f("button"),i.innerHTML='<span class="md-btn-label md-btn-bold svelte-1etjgc1">B</span>',o=w(),s=f("button"),s.innerHTML='<span class="md-btn-label md-btn-italic svelte-1etjgc1">I</span>',c=w(),u=f("button"),u.innerHTML='<span class="md-btn-label svelte-1etjgc1">H</span>',d=w(),p=f("div"),h=w(),m=f("div"),g=f("button"),g.innerHTML='<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>',b=w(),v=f("button"),v.innerHTML='<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6"></polyline><polyline points="8 6 2 12 8 18"></polyline></svg>',y=w(),E=f("button"),T=f("span"),T.textContent="</>",I=w(),N=f("div"),R=w(),M=f("div"),A=f("button"),A.innerHTML='<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="8" y1="6" x2="21" y2="6"></line><line x1="8" y1="12" x2="21" y2="12"></line><line x1="8" y1="18" x2="21" y2="18"></line><line x1="3" y1="6" x2="3.01" y2="6"></line><line x1="3" y1="12" x2="3.01" y2="12"></line><line x1="3" y1="18" x2="3.01" y2="18"></line></svg>',L=w(),j=f("button"),j.innerHTML='<span class="md-btn-label md-btn-sm svelte-1etjgc1">1.</span>',B=w(),U=f("button"),U.innerHTML='<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 11 12 14 22 4"></polyline><path d="M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"></path></svg>',z=w(),W=f("button"),W.innerHTML='<span class="md-btn-label md-btn-sm md-btn-quote svelte-1etjgc1">"</span>',G=w(),X=f("div"),H=w(),D=f("div"),q=f("button"),q.innerHTML='<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"></circle><path d="M12 2v2"></path><path d="M12 20v2"></path><path d="M4.93 4.93l1.41 1.41"></path><path d="M17.66 17.66l1.41 1.41"></path><path d="M2 12h2"></path><path d="M20 12h2"></path><path d="M6.34 17.66l-1.41 1.41"></path><path d="M19.07 4.93l-1.41 1.41"></path></svg>',P=w(),Y=f("textarea"),r(i,"type","button"),r(i,"class","md-toolbar-btn svelte-1etjgc1"),r(i,"title",k("note.toolbar.bold")),r(i,"aria-label",k("note.toolbar.bold")),r(s,"type","button"),r(s,"class","md-toolbar-btn svelte-1etjgc1"),r(s,"title",k("note.toolbar.italic")),r(s,"aria-label",k("note.toolbar.italic")),r(u,"type","button"),r(u,"class","md-toolbar-btn svelte-1etjgc1"),r(u,"title",k("note.toolbar.heading")),r(u,"aria-label",k("note.toolbar.heading")),r(l,"class","md-toolbar-group svelte-1etjgc1"),r(p,"class","md-toolbar-sep svelte-1etjgc1"),r(g,"type","button"),r(g,"class","md-toolbar-btn svelte-1etjgc1"),r(g,"title",k("note.toolbar.link")),r(g,"aria-label",k("note.toolbar.link")),r(v,"type","button"),r(v,"class","md-toolbar-btn svelte-1etjgc1"),r(v,"title",k("note.toolbar.code")),r(v,"aria-label",k("note.toolbar.code")),r(T,"class","md-btn-label md-btn-sm svelte-1etjgc1"),r(E,"type","button"),r(E,"class","md-toolbar-btn svelte-1etjgc1"),r(E,"title",k("note.toolbar.codeBlock")),r(E,"aria-label",k("note.toolbar.codeBlock")),r(m,"class","md-toolbar-group svelte-1etjgc1"),r(N,"class","md-toolbar-sep svelte-1etjgc1"),r(A,"type","button"),r(A,"class","md-toolbar-btn svelte-1etjgc1"),r(A,"title",k("note.toolbar.bulletList")),r(A,"aria-label",k("note.toolbar.bulletList")),r(j,"type","button"),r(j,"class","md-toolbar-btn svelte-1etjgc1"),r(j,"title",k("note.toolbar.numberedList")),r(j,"aria-label",k("note.toolbar.numberedList")),r(U,"type","button"),r(U,"class","md-toolbar-btn svelte-1etjgc1"),r(U,"title",k("note.toolbar.checkbox")),r(U,"aria-label",k("note.toolbar.checkbox")),r(W,"type","button"),r(W,"class","md-toolbar-btn svelte-1etjgc1"),r(W,"title",k("note.toolbar.quote")),r(W,"aria-label",k("note.toolbar.quote")),r(M,"class","md-toolbar-group svelte-1etjgc1"),r(X,"class","md-toolbar-sep svelte-1etjgc1"),r(q,"type","button"),r(q,"class","md-toolbar-btn md-toolbar-btn--internal svelte-1etjgc1"),r(q,"title",k("note.toolbar.internalLink")),r(q,"aria-label",k("note.toolbar.internalLink")),r(D,"class","md-toolbar-group svelte-1etjgc1"),r(t,"class","md-toolbar svelte-1etjgc1"),r(t,"role","toolbar"),r(t,"aria-label","Markdown formatting"),r(Y,"class","md-textarea svelte-1etjgc1"),r(Y,"placeholder",n[2]),r(Y,"spellcheck","true"),r(e,"class","md-editor svelte-1etjgc1"),ce(e,"mode-edit",n[1]==="edit"||n[1]==="split")},m(te,ne){C(te,e,ne),a(e,t),a(t,l),a(l,i),a(l,o),a(l,s),a(l,c),a(l,u),a(t,d),a(t,p),a(t,h),a(t,m),a(m,g),a(m,b),a(m,v),a(m,y),a(m,E),a(E,T),a(t,I),a(t,N),a(t,R),a(t,M),a(M,A),a(M,L),a(M,j),a(M,B),a(M,U),a(M,z),a(M,W),a(t,G),a(t,X),a(t,H),a(t,D),a(D,q),a(e,P),a(e,Y),Me(Y,n[0]),n[19](Y),Z||(J=[O(i,"click",n[4]),O(s,"click",n[5]),O(u,"click",n[8]),O(g,"click",n[7]),O(v,"click",n[6]),O(E,"click",n[13]),O(A,"click",n[10]),O(j,"click",n[11]),O(U,"click",n[12]),O(W,"click",n[9]),O(q,"click",n[14]),O(Y,"input",n[18]),O(Y,"input",n[15]),O(Y,"keydown",n[16])],Z=!0)},p(te,[ne]){ne&4&&r(Y,"placeholder",te[2]),ne&1&&Me(Y,te[0]),ne&2&&ce(e,"mode-edit",te[1]==="edit"||te[1]==="split")},i:ie,o:ie,d(te){te&&S(e),n[19](null),Z=!1,Se(J)}}}function N2(n,e,t){let{content:l=""}=e,{viewMode:i="edit"}=e,{placeholder:o=""}=e;const s=bn();let c;function u(B){const U=c;if(!U)return;const z=U.selectionStart,W=U.selectionEnd,G=l.substring(0,z),X=l.substring(W),H=G+B+X;t(0,l=H),s("content-change",{content:H}),requestAnimationFrame(()=>{U.focus(),U.selectionStart=U.selectionEnd=z+B.length})}function d(B,U="",z=""){const W=c;if(!W)return;const G=W.selectionStart,X=W.selectionEnd,H=l.substring(G,X),q=B+(H||z)+U,P=l.substring(0,G)+q+l.substring(X);t(0,l=P),s("content-change",{content:P}),requestAnimationFrame(()=>{W.focus(),H?(W.selectionStart=G+B.length,W.selectionEnd=G+B.length+H.length):(W.selectionStart=G+B.length,W.selectionEnd=G+B.length+z.length)})}function p(B){const U=c;if(!U)return;const z=U.selectionStart,W=U.selectionEnd;let G=z;for(;G>0&&l[G-1]!==`
|
||
`;)G--;let X=W;for(;X<l.length&&l[X]!==`
|
||
`;)X++;const P=l.substring(G,X).split(`
|
||
`).map(Z=>Z.startsWith(B)?Z:B+Z).join(`
|
||
`),Y=l.substring(0,G)+P+l.substring(X);t(0,l=Y),s("content-change",{content:Y}),requestAnimationFrame(()=>{U.focus(),U.selectionStart=G,U.selectionEnd=G+P.length})}function h(){d("**","**","bold text")}function m(){d("*","*","italic text")}function g(){d("`","`","code")}function b(){s("insert-link")}function v(){p("## ")}function y(){p("> ")}function E(){p("- ")}function T(){const B=c;if(!B)return;let z=B.selectionStart;for(;z>0&&l[z-1]!==`
|
||
`;)z--;let W=B.selectionEnd;for(;W<l.length&&l[W]!==`
|
||
`;)W++;const X=l.substring(z,W).split(`
|
||
`);let H=1;const q=X.map(Y=>{const Z=Y.trim();return Y.replace(/^\s*\d+\.\s*/,""),`${H++}. ${Z||"item"}`}).join(`
|
||
`),P=l.substring(0,z)+q+l.substring(W);t(0,l=P),s("content-change",{content:P}),requestAnimationFrame(()=>{B.focus(),B.selectionStart=z,B.selectionEnd=z+q.length})}function I(){p("- [ ] ")}function N(){const B=c;if(!B)return;const U=B.selectionStart,z=B.selectionEnd,W=l.substring(U,z),G=W?"```\n"+W+"\n```":"```\ncode here\n```",X=l.substring(0,U)+G+l.substring(z);t(0,l=X),s("content-change",{content:X}),requestAnimationFrame(()=>{B.focus(),W?(B.selectionStart=U+4,B.selectionEnd=U+4+W.length):(B.selectionStart=U+4,B.selectionEnd=U+4+9)})}function R(){s("insert-internal-link")}function M(B){t(0,l=B.target.value),s("content-change",{content:l})}function A(B){if((B.ctrlKey||B.metaKey)&&B.key==="s"){B.preventDefault(),s("save");return}if(B.key==="Tab"){B.preventDefault();const U=B.target,z=U.selectionStart,W=U.selectionEnd;if(B.shiftKey){let G=z;for(;G>0&&l[G-1]!==`
|
||
`;)G--;let X=W;for(;X<l.length&&l[X]!==`
|
||
`;)X++;const D=l.substring(G,X).replace(/^ {1,2}/gm,""),q=l.substring(0,G)+D+l.substring(X);t(0,l=q),s("content-change",{content:q}),requestAnimationFrame(()=>{U.focus(),U.selectionStart=G,U.selectionEnd=G+D.length})}else if(z===W){const G=l.substring(0,z)+" "+l.substring(W);t(0,l=G),s("content-change",{content:G}),requestAnimationFrame(()=>{U.focus(),U.selectionStart=U.selectionEnd=z+2})}else{let G=z;for(;G>0&&l[G-1]!==`
|
||
`;)G--;let X=W;for(;X<l.length&&l[X]!==`
|
||
`;)X++;const D=l.substring(G,X).replace(/^/gm," "),q=l.substring(0,G)+D+l.substring(X);t(0,l=q),s("content-change",{content:q}),requestAnimationFrame(()=>{U.focus(),U.selectionStart=G,U.selectionEnd=G+D.length})}}}function L(){l=this.value,t(0,l)}function j(B){On[B?"unshift":"push"](()=>{c=B,t(3,c)})}return n.$$set=B=>{"content"in B&&t(0,l=B.content),"viewMode"in B&&t(1,i=B.viewMode),"placeholder"in B&&t(2,o=B.placeholder)},[l,i,o,c,h,m,g,b,v,y,E,T,I,N,R,M,A,u,L,j]}class Wl extends ct{constructor(e){super(),at(this,e,N2,A2,rt,{content:0,viewMode:1,placeholder:2,insertText:17})}get insertText(){return this.$$.ctx[17]}}function I2(n){let e,t,l,i,o,s,c,u={content:n[0],placeholder:n[2],viewMode:"split"};return l=new Wl({props:u}),n[15](l),l.$on("content-change",n[5]),l.$on("save",n[6]),l.$on("insert-link",n[7]),l.$on("insert-internal-link",n[8]),s=new Tl({props:{content:n[0]}}),s.$on("verstak-link",n[9]),{c(){e=f("div"),t=f("div"),Ge(l.$$.fragment),i=w(),o=f("div"),Ge(s.$$.fragment),r(t,"class","split-editor svelte-8tdyp9"),r(o,"class","split-preview svelte-8tdyp9"),r(e,"class","split-pane svelte-8tdyp9")},m(d,p){C(d,e,p),a(e,t),He(l,t,null),a(e,i),a(e,o),He(s,o,null),c=!0},p(d,p){const h={};p&1&&(h.content=d[0]),p&4&&(h.placeholder=d[2]),l.$set(h);const m={};p&1&&(m.content=d[0]),s.$set(m)},i(d){c||(fe(l.$$.fragment,d),fe(s.$$.fragment,d),c=!0)},o(d){be(l.$$.fragment,d),be(s.$$.fragment,d),c=!1},d(d){d&&S(e),n[15](null),We(l),We(s)}}}function R2(n){let e,t,l;return t=new Tl({props:{content:n[0]}}),t.$on("verstak-link",n[9]),{c(){e=f("div"),Ge(t.$$.fragment),r(e,"class","preview-pane svelte-8tdyp9")},m(i,o){C(i,e,o),He(t,e,null),l=!0},p(i,o){const s={};o&1&&(s.content=i[0]),t.$set(s)},i(i){l||(fe(t.$$.fragment,i),l=!0)},o(i){be(t.$$.fragment,i),l=!1},d(i){i&&S(e),We(t)}}}function M2(n){let e,t,l={content:n[0],placeholder:n[2],viewMode:"edit"};return e=new Wl({props:l}),n[14](e),e.$on("content-change",n[5]),e.$on("save",n[6]),e.$on("insert-link",n[7]),e.$on("insert-internal-link",n[8]),{c(){Ge(e.$$.fragment)},m(i,o){He(e,i,o),t=!0},p(i,o){const s={};o&1&&(s.content=i[0]),o&4&&(s.placeholder=i[2]),e.$set(s)},i(i){t||(fe(e.$$.fragment,i),t=!0)},o(i){be(e.$$.fragment,i),t=!1},d(i){n[14](null),We(e,i)}}}function L2(n){let e,t,l,i=k("note.mode.edit")+"",o,s,c,u,d=k("note.mode.preview")+"",p,h,m,g,b=k("note.mode.split")+"",v,y,E,T,I,N,R,M,A;const L=[M2,R2,I2],j=[];function B(U,z){return U[1]==="edit"?0:U[1]==="preview"?1:U[1]==="split"?2:-1}return~(I=B(n))&&(N=j[I]=L[I](n)),{c(){e=f("div"),t=f("div"),l=f("button"),o=F(i),c=w(),u=f("button"),p=F(d),m=w(),g=f("button"),v=F(b),E=w(),T=f("div"),N&&N.c(),r(l,"type","button"),r(l,"class","mode-btn svelte-8tdyp9"),r(l,"role","tab"),r(l,"aria-selected",s=n[1]==="edit"),ce(l,"active",n[1]==="edit"),r(u,"type","button"),r(u,"class","mode-btn svelte-8tdyp9"),r(u,"role","tab"),r(u,"aria-selected",h=n[1]==="preview"),ce(u,"active",n[1]==="preview"),r(g,"type","button"),r(g,"class","mode-btn svelte-8tdyp9"),r(g,"role","tab"),r(g,"aria-selected",y=n[1]==="split"),ce(g,"active",n[1]==="split"),r(t,"class","mode-switcher svelte-8tdyp9"),r(t,"role","tablist"),r(t,"aria-label","Note view mode"),r(T,"class","panel-content svelte-8tdyp9"),r(e,"class","note-editor-panel svelte-8tdyp9"),ce(e,"mode-edit",n[1]==="edit"),ce(e,"mode-preview",n[1]==="preview"),ce(e,"mode-split",n[1]==="split")},m(U,z){C(U,e,z),a(e,t),a(t,l),a(l,o),a(t,c),a(t,u),a(u,p),a(t,m),a(t,g),a(g,v),a(e,E),a(e,T),~I&&j[I].m(T,null),R=!0,M||(A=[O(l,"click",n[11]),O(u,"click",n[12]),O(g,"click",n[13])],M=!0)},p(U,[z]){(!R||z&2&&s!==(s=U[1]==="edit"))&&r(l,"aria-selected",s),(!R||z&2)&&ce(l,"active",U[1]==="edit"),(!R||z&2&&h!==(h=U[1]==="preview"))&&r(u,"aria-selected",h),(!R||z&2)&&ce(u,"active",U[1]==="preview"),(!R||z&2&&y!==(y=U[1]==="split"))&&r(g,"aria-selected",y),(!R||z&2)&&ce(g,"active",U[1]==="split");let W=I;I=B(U),I===W?~I&&j[I].p(U,z):(N&&(ft(),be(j[W],1,1,()=>{j[W]=null}),dt()),~I?(N=j[I],N?N.p(U,z):(N=j[I]=L[I](U),N.c()),fe(N,1),N.m(T,null)):N=null),(!R||z&2)&&ce(e,"mode-edit",U[1]==="edit"),(!R||z&2)&&ce(e,"mode-preview",U[1]==="preview"),(!R||z&2)&&ce(e,"mode-split",U[1]==="split")},i(U){R||(fe(N),R=!0)},o(U){be(N),R=!1},d(U){U&&S(e),~I&&j[I].d(),M=!1,Se(A)}}}function O2(n,e,t){let{content:l=""}=e,{viewMode:i="edit"}=e,{placeholder:o=""}=e;const s=bn();let c;function u(N){s("mode-change",{mode:N})}function d(N){t(0,l=N.detail.content),s("content-change",N.detail)}function p(){s("save")}function h(){s("insert-link")}function m(){s("insert-internal-link")}function g(N){s("verstak-link",N.detail)}function b(N){c&&typeof c.insertText=="function"&&c.insertText(N)}const v=()=>u("edit"),y=()=>u("preview"),E=()=>u("split");function T(N){On[N?"unshift":"push"](()=>{c=N,t(3,c)})}function I(N){On[N?"unshift":"push"](()=>{c=N,t(3,c)})}return n.$$set=N=>{"content"in N&&t(0,l=N.content),"viewMode"in N&&t(1,i=N.viewMode),"placeholder"in N&&t(2,o=N.placeholder)},[l,i,o,c,u,d,p,h,m,g,b,v,y,E,T,I]}class D2 extends ct{constructor(e){super(),at(this,e,O2,L2,rt,{content:0,viewMode:1,placeholder:2,insertText:10})}get insertText(){return this.$$.ctx[10]}}function ec(n,e,t){const l=n.slice();return l[25]=e[t],l[27]=t,l}function tc(n,e,t){const l=n.slice();return l[28]=e[t],l}function nc(n){let e,t,l,i,o,s,c,u,d,p,h,m,g=Te(n[10]),b=[];for(let T=0;T<g.length;T+=1)b[T]=lc(tc(n,g,T));function v(T,I){return T[2]==="secret"?q2:P2}let y=v(n),E=y(n);return{c(){e=f("div"),t=f("div"),l=f("div"),i=f("input"),o=w(),s=f("div");for(let T=0;T<b.length;T+=1)b[T].c();c=w(),E.c(),u=w(),d=f("div"),p=f("button"),p.textContent="Отмена",r(i,"type","text"),r(i,"placeholder","Поиск..."),r(i,"class","picker-search-input svelte-12kipyi"),r(i,"autocomplete","off"),r(l,"class","picker-header svelte-12kipyi"),r(s,"class","picker-types svelte-12kipyi"),r(s,"role","tablist"),r(s,"aria-label","Тип объекта"),r(p,"type","button"),r(p,"class","btn"),r(d,"class","picker-footer svelte-12kipyi"),r(t,"class","picker-modal svelte-12kipyi"),r(t,"role","dialog"),r(t,"aria-modal","true"),r(t,"aria-label","Выбрать объект"),r(e,"class","picker-modal-overlay svelte-12kipyi")},m(T,I){C(T,e,I),a(e,t),a(t,l),a(l,i),n[15](i),Me(i,n[3]),a(t,o),a(t,s);for(let N=0;N<b.length;N+=1)b[N]&&b[N].m(s,null);a(t,c),E.m(t,null),a(t,u),a(t,d),a(d,p),h||(m=[O(i,"input",n[16]),O(i,"input",n[11]),O(i,"keydown",n[12]),O(p,"click",n[19]),O(e,"click",Jt(n[20])),O(e,"keydown",n[21])],h=!0)},p(T,I){if(I&8&&i.value!==T[3]&&Me(i,T[3]),I&17412){g=Te(T[10]);let N;for(N=0;N<g.length;N+=1){const R=tc(T,g,N);b[N]?b[N].p(R,I):(b[N]=lc(R),b[N].c(),b[N].m(s,null))}for(;N<b.length;N+=1)b[N].d(1);b.length=g.length}y===(y=v(T))&&E?E.p(T,I):(E.d(1),E=y(T),E&&(E.c(),E.m(t,u)))},d(T){T&&S(e),n[15](null),tt(b,T),E.d(),h=!1,Se(m)}}}function lc(n){let e,t=n[28].label+"",l,i,o,s,c;function u(){return n[17](n[28])}return{c(){e=f("button"),l=F(t),i=w(),r(e,"type","button"),r(e,"class","picker-type-btn svelte-12kipyi"),r(e,"role","tab"),r(e,"aria-selected",o=n[2]===n[28].id),e.disabled=n[28].id==="secret",ce(e,"active",n[2]===n[28].id),ce(e,"disabled",n[28].id==="secret")},m(d,p){C(d,e,p),a(e,l),a(e,i),s||(c=O(e,"click",u),s=!0)},p(d,p){n=d,p&4&&o!==(o=n[2]===n[28].id)&&r(e,"aria-selected",o),p&1028&&ce(e,"active",n[2]===n[28].id)},d(d){d&&S(e),s=!1,c()}}}function P2(n){let e,t;function l(s,c){return c&168&&(t=null),s[7]?F2:s[8]?B2:(t==null&&(t=s[3].trim().length>=2&&s[5].length===0&&!s[7]),t?z2:j2)}let i=l(n,-1),o=i(n);return{c(){e=f("div"),o.c(),r(e,"class","picker-results svelte-12kipyi"),r(e,"role","listbox")},m(s,c){C(s,e,c),o.m(e,null)},p(s,c){i===(i=l(s,c))&&o?o.p(s,c):(o.d(1),o=i(s),o&&(o.c(),o.m(e,null)))},d(s){s&&S(e),o.d()}}}function q2(n){let e;return{c(){e=f("div"),e.innerHTML="<p>🔒 Сейф доступов ещё не реализован</p>",r(e,"class","picker-secret-placeholder svelte-12kipyi")},m(t,l){C(t,e,l)},p:ie,d(t){t&&S(e)}}}function j2(n){let e,t=Te(n[5]),l=[];for(let i=0;i<t.length;i+=1)l[i]=sc(ec(n,t,i));return{c(){for(let i=0;i<l.length;i+=1)l[i].c();e=_t()},m(i,o){for(let s=0;s<l.length;s+=1)l[s]&&l[s].m(i,o);C(i,e,o)},p(i,o){if(o&8288){t=Te(i[5]);let s;for(s=0;s<t.length;s+=1){const c=ec(i,t,s);l[s]?l[s].p(c,o):(l[s]=sc(c),l[s].c(),l[s].m(e.parentNode,e))}for(;s<l.length;s+=1)l[s].d(1);l.length=t.length}},d(i){i&&S(e),tt(l,i)}}}function z2(n){let e,t=n[4].length>0?"Нет результатов для этого типа":"Ничего не найдено",l;return{c(){e=f("div"),l=F(t),r(e,"class","picker-empty svelte-12kipyi")},m(i,o){C(i,e,o),a(e,l)},p(i,o){o&16&&t!==(t=i[4].length>0?"Нет результатов для этого типа":"Ничего не найдено")&&Q(l,t)},d(i){i&&S(e)}}}function B2(n){let e,t;return{c(){e=f("div"),t=F(n[8]),r(e,"class","picker-error svelte-12kipyi")},m(l,i){C(l,e,i),a(e,t)},p(l,i){i&256&&Q(t,l[8])},d(l){l&&S(e)}}}function F2(n){let e;return{c(){e=f("div"),e.textContent="Загрузка...",r(e,"class","picker-loading svelte-12kipyi")},m(t,l){C(t,e,l)},p:ie,d(t){t&&S(e)}}}function ic(n){let e,t=n[25].path+"",l;return{c(){e=f("span"),l=F(t),r(e,"class","picker-result-path svelte-12kipyi")},m(i,o){C(i,e,o),a(e,l)},p(i,o){o&32&&t!==(t=i[25].path+"")&&Q(l,t)},d(i){i&&S(e)}}}function sc(n){let e,t,l=n[25].title+"",i,o,s,c,u,d,p=n[25].path&&ic(n);function h(){return n[18](n[25])}return{c(){e=f("button"),t=f("span"),i=F(l),o=w(),p&&p.c(),s=w(),r(t,"class","picker-result-title svelte-12kipyi"),r(e,"type","button"),r(e,"class","picker-result svelte-12kipyi"),r(e,"role","option"),r(e,"aria-selected",c=n[27]===n[6]),ce(e,"selected",n[27]===n[6])},m(m,g){C(m,e,g),a(e,t),a(t,i),a(e,o),p&&p.m(e,null),a(e,s),u||(d=O(e,"click",h),u=!0)},p(m,g){n=m,g&32&&l!==(l=n[25].title+"")&&Q(i,l),n[25].path?p?p.p(n,g):(p=ic(n),p.c(),p.m(e,s)):p&&(p.d(1),p=null),g&64&&c!==(c=n[27]===n[6])&&r(e,"aria-selected",c),g&64&&ce(e,"selected",n[27]===n[6])},d(m){m&&S(e),p&&p.d(),u=!1,d()}}}function U2(n){let e,t=n[0]&&nc(n);return{c(){t&&t.c(),e=_t()},m(l,i){t&&t.m(l,i),C(l,e,i)},p(l,[i]){l[0]?t?t.p(l,i):(t=nc(l),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},i:ie,o:ie,d(l){l&&S(e),t&&t.d(l)}}}function oc(n){return n==="note"?"note":n==="file"?"file":n==="secret"?"secret":"case"}function H2(n,e,t){let{visible:l=!1}=e;const i=bn(),o=[{id:"case",label:"Дело"},{id:"note",label:"Заметка"},{id:"file",label:"Файл"},{id:"secret",label:"Секрет"}];let s="note",c="",u=[],d=[],p=0,h=!1,m="",g;function b(){t(5,d=u.filter(z=>oc(z.type)===s)),t(6,p=0)}async function v(){if(!c.trim()||c.trim().length<2){t(4,u=[]),t(5,d=[]);return}t(7,h=!0),t(8,m="");try{const z=Zd(c.trim()),W=new Set,G=[];for(const D of z)W.has(D)||(W.add(D),G.push(D));const X=await Promise.all(G.map(D=>window.go.main.App.SearchNodes(D).catch(()=>[]))),H=new Map;for(const D of X)for(const q of D||[])H.has(q.id)||H.set(q.id,q);t(4,u=Array.from(H.values())),b()}catch(z){t(8,m=String(z)),t(4,u=[]),t(5,d=[])}finally{t(7,h=!1)}}function y(){clearTimeout(N),N=setTimeout(v,250)}function E(z){z.key==="ArrowDown"?(z.preventDefault(),t(6,p=Math.min(p+1,d.length-1))):z.key==="ArrowUp"?(z.preventDefault(),t(6,p=Math.max(p-1,0))):z.key==="Enter"?(z.preventDefault(),d[p]&&T(d[p])):z.key==="Escape"&&i("close")}function T(z){const G=`[${qk(z.title||z.id)}](verstak://${oc(z.type)}/${z.id})`;i("insert",{markdown:G})}function I(z){t(2,s=z),b(),g&&g.focus()}let N;function R(z){On[z?"unshift":"push"](()=>{g=z,t(1,g)})}function M(){c=this.value,t(3,c)}const A=z=>z.id!=="secret"&&I(z.id),L=z=>T(z),j=()=>i("close"),B=()=>i("close"),U=z=>z.key==="Escape"&&i("close");return n.$$set=z=>{"visible"in z&&t(0,l=z.visible)},n.$$.update=()=>{n.$$.dirty&3&&l&&g&&setTimeout(()=>g.focus(),50)},[l,g,s,c,u,d,p,h,m,i,o,y,E,T,I,R,M,A,L,j,B,U]}class W2 extends ct{constructor(e){super(),at(this,e,H2,U2,rt,{visible:0})}}function rc(n,e,t){const l=n.slice();return l[18]=e[t],l}function ac(n){let e,t,l,i,o,s,c,u,d;return{c(){e=f("div"),t=f("input"),l=w(),i=f("div"),o=f("button"),o.textContent="Создать",s=w(),c=f("button"),c.textContent="Отмена",r(t,"type","text"),r(t,"placeholder","Название заметки"),r(t,"class","svelte-1d78tu1"),r(o,"class","btn btn-primary svelte-1d78tu1"),r(c,"class","btn svelte-1d78tu1"),r(i,"class","form-actions svelte-1d78tu1"),r(e,"class","create-form svelte-1d78tu1")},m(p,h){C(p,e,h),a(e,t),Me(t,n[3]),a(e,l),a(e,i),a(i,o),a(i,s),a(i,c),u||(d=[O(t,"input",n[12]),O(t,"keydown",n[7]),O(o,"click",n[6]),O(c,"click",n[5])],u=!0)},p(p,h){h&8&&t.value!==p[3]&&Me(t,p[3])},d(p){p&&S(e),u=!1,Se(d)}}}function G2(n){let e,t=Te(n[0]),l=[];for(let i=0;i<t.length;i+=1)l[i]=cc(rc(n,t,i));return{c(){e=f("div");for(let i=0;i<l.length;i+=1)l[i].c();r(e,"class","notes-list svelte-1d78tu1")},m(i,o){C(i,e,o);for(let s=0;s<l.length;s+=1)l[s]&&l[s].m(e,null)},p(i,o){if(o&1795){t=Te(i[0]);let s;for(s=0;s<t.length;s+=1){const c=rc(i,t,s);l[s]?l[s].p(c,o):(l[s]=cc(c),l[s].c(),l[s].m(e,null))}for(;s<l.length;s+=1)l[s].d(1);l.length=t.length}},d(i){i&&S(e),tt(l,i)}}}function K2(n){let e;return{c(){e=f("div"),e.innerHTML='<p class="svelte-1d78tu1">Нет заметок</p><p class="hint svelte-1d78tu1">Создайте первую заметку</p>',r(e,"class","empty-state svelte-1d78tu1")},m(t,l){C(t,e,l)},p:ie,d(t){t&&S(e)}}}function cc(n){let e,t,l,i=n[18].title+"",o,s,c,u=n[1](n[18].createdAt)+"",d,p,h,m,g,b,v,y,E;function T(){return n[13](n[18])}function I(){return n[14](n[18])}function N(){return n[15](n[18])}function R(...M){return n[16](n[18],...M)}return{c(){e=f("div"),t=f("div"),l=f("div"),o=F(i),s=w(),c=f("div"),d=F(u),p=w(),h=f("div"),m=f("button"),m.innerHTML='<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"></path></svg>',g=w(),b=f("button"),b.innerHTML='<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path></svg>',v=w(),r(l,"class","note-card-title svelte-1d78tu1"),r(c,"class","note-card-date svelte-1d78tu1"),r(t,"class","note-card-info svelte-1d78tu1"),r(m,"class","note-action-btn svelte-1d78tu1"),r(m,"title","Переименовать"),r(b,"class","note-action-btn note-action-danger svelte-1d78tu1"),r(b,"title","Удалить"),r(h,"class","note-card-actions svelte-1d78tu1"),r(e,"class","note-card svelte-1d78tu1"),r(e,"role","button"),r(e,"tabindex","0")},m(M,A){C(M,e,A),a(e,t),a(t,l),a(l,o),a(t,s),a(t,c),a(c,d),a(e,p),a(e,h),a(h,m),a(h,g),a(h,b),a(e,v),y||(E=[O(m,"click",T),O(b,"click",I),O(h,"click",Ve(n[11])),O(e,"click",N),O(e,"keydown",R)],y=!0)},p(M,A){n=M,A&1&&i!==(i=n[18].title+"")&&Q(o,i),A&3&&u!==(u=n[1](n[18].createdAt)+"")&&Q(d,u)},d(M){M&&S(e),y=!1,Se(E)}}}function V2(n){let e,t,l,i,o,s,c,u=n[2]&&ac(n);function d(m,g){if(m[0].length===0&&!m[2])return K2;if(m[0].length>0)return G2}let p=d(n),h=p&&p(n);return{c(){e=f("div"),t=f("div"),l=f("button"),l.textContent="Добавить заметку",i=w(),u&&u.c(),o=w(),h&&h.c(),r(l,"class","btn btn-primary svelte-1d78tu1"),r(t,"class","tab-toolbar svelte-1d78tu1"),r(e,"class","notes-tab svelte-1d78tu1")},m(m,g){C(m,e,g),a(e,t),a(t,l),a(e,i),u&&u.m(e,null),a(e,o),h&&h.m(e,null),s||(c=O(l,"click",n[4]),s=!0)},p(m,[g]){m[2]?u?u.p(m,g):(u=ac(m),u.c(),u.m(e,o)):u&&(u.d(1),u=null),p===(p=d(m))&&h?h.p(m,g):(h&&h.d(1),h=p&&p(m),h&&(h.c(),h.m(e,null)))},i:ie,o:ie,d(m){m&&S(e),u&&u.d(),h&&h.d(),s=!1,c()}}}function Z2(n,e,t){let{notes:l=[]}=e,{formatDate:i=R=>""}=e;const o=bn();let s=!1,c="";function u(){t(2,s=!0),t(3,c="")}function d(){t(2,s=!1),t(3,c="")}function p(){c.trim()&&(o("submitCreateNote",{title:c.trim()}),t(2,s=!1),t(3,c=""))}function h(R){R.key==="Enter"&&p()}function m(R){o("openNote",{note:R})}function g(R,M){o("startRename",{noteId:R,currentTitle:M})}function b(R){o("deleteNote",{note:R})}function v(R){js.call(this,n,R)}function y(){c=this.value,t(3,c)}const E=R=>g(R.id,R.title),T=R=>b(R),I=R=>m(R),N=(R,M)=>M.key==="Enter"&&m(R);return n.$$set=R=>{"notes"in R&&t(0,l=R.notes),"formatDate"in R&&t(1,i=R.formatDate)},[l,i,s,c,u,d,p,h,m,g,b,v,y,E,T,I,N]}class Y2 extends ct{constructor(e){super(),at(this,e,Z2,V2,rt,{notes:0,formatDate:1})}}function uc(n,e,t){const l=n.slice();return l[13]=e[t],l}function fc(n,e,t){const l=n.slice();return l[16]=e[t],l}function dc(n){let e,t,l,i=Te(n[1].slice(0,5)),o=[];for(let s=0;s<i.length;s+=1)o[s]=pc(fc(n,i,s));return{c(){e=f("div"),t=f("h3"),t.textContent=`${k("overview.recentNotes")}`,l=w();for(let s=0;s<o.length;s+=1)o[s].c();r(t,"class","svelte-3r30e3"),r(e,"class","recent-section svelte-3r30e3")},m(s,c){C(s,e,c),a(e,t),a(e,l);for(let u=0;u<o.length;u+=1)o[u]&&o[u].m(e,null)},p(s,c){if(c&522){i=Te(s[1].slice(0,5));let u;for(u=0;u<i.length;u+=1){const d=fc(s,i,u);o[u]?o[u].p(d,c):(o[u]=pc(d),o[u].c(),o[u].m(e,null))}for(;u<o.length;u+=1)o[u].d(1);o.length=i.length}},d(s){s&&S(e),tt(o,s)}}}function pc(n){let e,t,l=n[16].title+"",i,o,s=n[3](n[16].createdAt)+"",c,u,d,p;function h(){return n[10](n[16])}function m(...g){return n[11](n[16],...g)}return{c(){e=f("div"),t=f("span"),i=F(l),o=f("span"),c=F(s),u=w(),r(o,"class","recent-date svelte-3r30e3"),r(e,"class","recent-note svelte-3r30e3"),r(e,"role","button"),r(e,"tabindex","0")},m(g,b){C(g,e,b),a(e,t),a(t,i),a(e,o),a(o,c),a(e,u),d||(p=[O(e,"click",h),O(e,"keydown",m)],d=!0)},p(g,b){n=g,b&2&&l!==(l=n[16].title+"")&&Q(i,l),b&10&&s!==(s=n[3](n[16].createdAt)+"")&&Q(c,s)},d(g){g&&S(e),d=!1,Se(p)}}}function hc(n){let e,t,l,i=Te(n[2].slice(0,3)),o=[];for(let s=0;s<i.length;s+=1)o[s]=mc(uc(n,i,s));return{c(){e=f("div"),t=f("h3"),t.textContent=`${k("overview.recentEntries")}`,l=w();for(let s=0;s<o.length;s+=1)o[s].c();r(t,"class","svelte-3r30e3"),r(e,"class","recent-section svelte-3r30e3")},m(s,c){C(s,e,c),a(e,t),a(e,l);for(let u=0;u<o.length;u+=1)o[u]&&o[u].m(e,null)},p(s,c){if(c&4){i=Te(s[2].slice(0,3));let u;for(u=0;u<i.length;u+=1){const d=uc(s,i,u);o[u]?o[u].p(d,c):(o[u]=mc(d),o[u].c(),o[u].m(e,null))}for(;u<o.length;u+=1)o[u].d(1);o.length=i.length}},d(s){s&&S(e),tt(o,s)}}}function mc(n){let e,t=n[13].summary+"",l,i,o=n[13].minutes+"",s,c,u=k("worklog.min")+"",d,p;return{c(){e=f("div"),l=F(t),i=F(" ("),s=F(o),c=w(),d=F(u),p=F(")"),r(e,"class","recent-entry svelte-3r30e3")},m(h,m){C(h,e,m),a(e,l),a(e,i),a(e,s),a(e,c),a(e,d),a(e,p)},p(h,m){m&4&&t!==(t=h[13].summary+"")&&Q(l,t),m&4&&o!==(o=h[13].minutes+"")&&Q(s,o)},d(h){h&&S(e)}}}function X2(n){let e,t,l=n[0].title+"",i,o,s,c,u,d,p=n[4](n[0].type)+"",h,m,g,b,v,y=(n[0].section||"—")+"",E,T,I,N,R,M=n[3](n[0].createdAt)+"",A,L,j,B,U,z,W,G,X=k("overview.newNote")+"",H,D,q,P,Y,Z,J=k("overview.addFile")+"",te,ne,le,me,oe,ze,Ye=k("overview.addAction")+"",Re,ee,re,Ne,Be,ve,Ue,Je=k("overview.logTime")+"",Ae,Qe,Fe,Ce,Ke,De=n[1].length>0&&dc(n),Ze=n[2].length>0&&hc(n);return{c(){e=f("div"),t=f("h2"),i=F(l),o=w(),s=f("div"),c=f("div"),u=f("span"),u.textContent=`${k("overview.type")}`,d=f("span"),h=F(p),m=w(),g=f("div"),b=f("span"),b.textContent=`${k("overview.section")}`,v=f("span"),E=F(y),T=w(),I=f("div"),N=f("span"),N.textContent=`${k("overview.created")}`,R=f("span"),A=F(M),L=w(),j=f("div"),B=f("button"),U=ae("svg"),z=ae("path"),W=ae("path"),G=w(),H=F(X),D=w(),q=f("button"),P=ae("svg"),Y=ae("path"),Z=w(),te=F(J),ne=w(),le=f("button"),me=ae("svg"),oe=ae("polygon"),ze=w(),Re=F(Ye),ee=w(),re=f("button"),Ne=ae("svg"),Be=ae("circle"),ve=ae("polyline"),Ue=w(),Ae=F(Je),Qe=w(),De&&De.c(),Fe=w(),Ze&&Ze.c(),r(t,"class","svelte-3r30e3"),r(u,"class","meta-label svelte-3r30e3"),r(c,"class","meta-item svelte-3r30e3"),r(b,"class","meta-label svelte-3r30e3"),r(g,"class","meta-item svelte-3r30e3"),r(N,"class","meta-label svelte-3r30e3"),r(I,"class","meta-item svelte-3r30e3"),r(s,"class","meta-grid svelte-3r30e3"),r(z,"d","M12 20h9"),r(W,"d","M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"),r(U,"width","16"),r(U,"height","16"),r(U,"viewBox","0 0 24 24"),r(U,"fill","none"),r(U,"stroke","currentColor"),r(U,"stroke-width","2"),r(U,"stroke-linecap","round"),r(U,"stroke-linejoin","round"),r(B,"class","qa-btn svelte-3r30e3"),r(Y,"d","M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48"),r(P,"width","16"),r(P,"height","16"),r(P,"viewBox","0 0 24 24"),r(P,"fill","none"),r(P,"stroke","currentColor"),r(P,"stroke-width","2"),r(P,"stroke-linecap","round"),r(P,"stroke-linejoin","round"),r(q,"class","qa-btn svelte-3r30e3"),r(oe,"points","13 2 3 14 12 14 11 22 21 10 12 10 13 2"),r(me,"width","16"),r(me,"height","16"),r(me,"viewBox","0 0 24 24"),r(me,"fill","none"),r(me,"stroke","currentColor"),r(me,"stroke-width","2"),r(me,"stroke-linecap","round"),r(me,"stroke-linejoin","round"),r(le,"class","qa-btn svelte-3r30e3"),r(Be,"cx","12"),r(Be,"cy","12"),r(Be,"r","10"),r(ve,"points","12 6 12 12 16 14"),r(Ne,"width","16"),r(Ne,"height","16"),r(Ne,"viewBox","0 0 24 24"),r(Ne,"fill","none"),r(Ne,"stroke","currentColor"),r(Ne,"stroke-width","2"),r(Ne,"stroke-linecap","round"),r(Ne,"stroke-linejoin","round"),r(re,"class","qa-btn svelte-3r30e3"),r(j,"class","quick-actions svelte-3r30e3"),r(e,"class","overview svelte-3r30e3")},m(Pe,ue){C(Pe,e,ue),a(e,t),a(t,i),a(e,o),a(e,s),a(s,c),a(c,u),a(c,d),a(d,h),a(s,m),a(s,g),a(g,b),a(g,v),a(v,E),a(s,T),a(s,I),a(I,N),a(I,R),a(R,A),a(e,L),a(e,j),a(j,B),a(B,U),a(U,z),a(U,W),a(B,G),a(B,H),a(j,D),a(j,q),a(q,P),a(P,Y),a(q,Z),a(q,te),a(j,ne),a(j,le),a(le,me),a(me,oe),a(le,ze),a(le,Re),a(j,ee),a(j,re),a(re,Ne),a(Ne,Be),a(Ne,ve),a(re,Ue),a(re,Ae),a(e,Qe),De&&De.m(e,null),a(e,Fe),Ze&&Ze.m(e,null),Ce||(Ke=[O(B,"click",n[5]),O(q,"click",n[6]),O(le,"click",n[7]),O(re,"click",n[8])],Ce=!0)},p(Pe,[ue]){ue&1&&l!==(l=Pe[0].title+"")&&Q(i,l),ue&17&&p!==(p=Pe[4](Pe[0].type)+"")&&Q(h,p),ue&1&&y!==(y=(Pe[0].section||"—")+"")&&Q(E,y),ue&9&&M!==(M=Pe[3](Pe[0].createdAt)+"")&&Q(A,M),Pe[1].length>0?De?De.p(Pe,ue):(De=dc(Pe),De.c(),De.m(e,Fe)):De&&(De.d(1),De=null),Pe[2].length>0?Ze?Ze.p(Pe,ue):(Ze=hc(Pe),Ze.c(),Ze.m(e,null)):Ze&&(Ze.d(1),Ze=null)},i:ie,o:ie,d(Pe){Pe&&S(e),De&&De.d(),Ze&&Ze.d(),Ce=!1,Se(Ke)}}}function J2(n,e,t){let{selectedNode:l=null}=e,{notes:i=[]}=e,{worklog:o=[]}=e,{formatDate:s=y=>""}=e,{nodeKindLabel:c=y=>y||""}=e;const u=bn();function d(){u("createNote")}function p(){u("addFile")}function h(){u("createAction")}function m(){u("switchTab",{tab:"worklog"})}function g(y){u("openNote",{note:y})}const b=y=>g(y),v=(y,E)=>E.key==="Enter"&&g(y);return n.$$set=y=>{"selectedNode"in y&&t(0,l=y.selectedNode),"notes"in y&&t(1,i=y.notes),"worklog"in y&&t(2,o=y.worklog),"formatDate"in y&&t(3,s=y.formatDate),"nodeKindLabel"in y&&t(4,c=y.nodeKindLabel)},[l,i,o,s,c,d,p,h,m,g,b,v]}class Q2 extends ct{constructor(e){super(),at(this,e,J2,X2,rt,{selectedNode:0,notes:1,worklog:2,formatDate:3,nodeKindLabel:4})}}function gc(n,e,t){const l=n.slice();return l[120]=e[t],l}function x2(n){let e,t,l=k("file.addFile")+"",i,o,s,c=k("file.addFolder")+"",u,d,p,h,m,g,b,v,y,E,T,I,N=n[17].items.length>0&&_c(n);const R=[tw,ew],M=[];function A(j,B){return j[2]?0:1}g=A(n),b=M[g]=R[g](n);let L=n[19]&&!n[21]&&kc();return{c(){e=f("div"),t=f("button"),i=F(l),o=w(),s=f("button"),u=F(c),d=w(),p=f("button"),p.textContent=`${k("file.newFile")}`,h=w(),N&&N.c(),m=w(),b.c(),v=w(),L&&L.c(),y=_t(),r(t,"class","btn btn-primary svelte-jre32j"),t.disabled=n[19],r(s,"class","btn svelte-jre32j"),s.disabled=n[19],r(p,"class","btn svelte-jre32j"),r(e,"class","tab-toolbar svelte-jre32j")},m(j,B){C(j,e,B),a(e,t),a(t,i),a(e,o),a(e,s),a(s,u),a(e,d),a(e,p),a(e,h),N&&N.m(e,null),C(j,m,B),M[g].m(j,B),C(j,v,B),L&&L.m(j,B),C(j,y,B),E=!0,T||(I=[O(t,"click",n[38]),O(s,"click",n[39]),O(p,"click",n[40])],T=!0)},p(j,B){(!E||B[0]&524288)&&(t.disabled=j[19]),(!E||B[0]&524288)&&(s.disabled=j[19]),j[17].items.length>0?N?N.p(j,B):(N=_c(j),N.c(),N.m(e,null)):N&&(N.d(1),N=null);let U=g;g=A(j),g===U?M[g].p(j,B):(ft(),be(M[U],1,1,()=>{M[U]=null}),dt(),b=M[g],b?b.p(j,B):(b=M[g]=R[g](j),b.c()),fe(b,1),b.m(v.parentNode,v)),j[19]&&!j[21]?L||(L=kc(),L.c(),L.m(y.parentNode,y)):L&&(L.d(1),L=null)},i(j){E||(fe(b),E=!0)},o(j){be(b),E=!1},d(j){j&&(S(e),S(m),S(v),S(y)),N&&N.d(),M[g].d(j),L&&L.d(j),T=!1,Se(I)}}}function $2(n){let e,t,l,i,o,s,c,u=k("file.backToFiles")+"",d,p,h,m=n[10].name+"",g,b,v,y,E,T,I,N,R,M,A,L,j,B,U,z,W=n[14]&&vc(),G=n[14]&&wc(n);const X=[fw,uw,cw,aw,rw,ow],H=[];function D(P,Y){return P[12]?0:P[13]?1:P[14]&&P[15]==="view"?2:P[14]&&P[15]==="edit"?3:P[14]&&P[15]==="split"?4:5}A=D(n),L=H[A]=X[A](n);let q=n[16]&&yc(n);return{c(){e=f("div"),t=f("div"),l=f("button"),i=ae("svg"),o=ae("line"),s=ae("polyline"),c=w(),d=F(u),p=w(),h=f("span"),g=F(m),v=w(),W&&W.c(),y=w(),E=f("div"),T=w(),G&&G.c(),I=w(),N=f("button"),N.textContent=`${k("file.openExternal")}`,R=w(),M=f("div"),L.c(),j=w(),q&&q.c(),r(o,"x1","19"),r(o,"y1","12"),r(o,"x2","5"),r(o,"y2","12"),r(s,"points","12 19 5 12 12 5"),r(i,"width","14"),r(i,"height","14"),r(i,"viewBox","0 0 24 24"),r(i,"fill","none"),r(i,"stroke","currentColor"),r(i,"stroke-width","2"),r(i,"stroke-linecap","round"),r(i,"stroke-linejoin","round"),r(l,"class","btn btn-sm back-btn svelte-jre32j"),r(h,"class","fe-filename svelte-jre32j"),r(h,"title",b=n[10].name),r(E,"class","fe-spacer svelte-jre32j"),r(N,"class","btn btn-sm svelte-jre32j"),r(t,"class","fe-toolbar svelte-jre32j"),r(M,"class","fe-body svelte-jre32j"),r(e,"class","file-editor-mode svelte-jre32j")},m(P,Y){C(P,e,Y),a(e,t),a(t,l),a(l,i),a(i,o),a(i,s),a(l,c),a(l,d),a(t,p),a(t,h),a(h,g),a(t,v),W&&W.m(t,null),a(t,y),a(t,E),a(t,T),G&&G.m(t,null),a(t,I),a(t,N),a(e,R),a(e,M),H[A].m(M,null),a(e,j),q&&q.m(e,null),B=!0,U||(z=[O(l,"click",n[35]),O(N,"click",n[71])],U=!0)},p(P,Y){(!B||Y[0]&1024)&&m!==(m=P[10].name+"")&&Q(g,m),(!B||Y[0]&1024&&b!==(b=P[10].name))&&r(h,"title",b),P[14]?W||(W=vc(),W.c(),W.m(t,y)):W&&(W.d(1),W=null),P[14]?G?G.p(P,Y):(G=wc(P),G.c(),G.m(t,I)):G&&(G.d(1),G=null);let Z=A;A=D(P),A===Z?H[A].p(P,Y):(ft(),be(H[Z],1,1,()=>{H[Z]=null}),dt(),L=H[A],L?L.p(P,Y):(L=H[A]=X[A](P),L.c()),fe(L,1),L.m(M,null)),P[16]?q?q.p(P,Y):(q=yc(P),q.c(),q.m(e,null)):q&&(q.d(1),q=null)},i(P){B||(fe(L),B=!0)},o(P){be(L),B=!1},d(P){P&&S(e),W&&W.d(),G&&G.d(),H[A].d(),q&&q.d(),U=!1,Se(z)}}}function _c(n){let e,t=k("common.paste")+"",l,i,o=n[17].items.length+"",s,c,u;return{c(){e=f("button"),l=F(t),i=w(),s=F(o),r(e,"class","btn svelte-jre32j")},m(d,p){C(d,e,p),a(e,l),a(e,i),a(e,s),c||(u=O(e,"click",n[45]),c=!0)},p(d,p){p[0]&131072&&o!==(o=d[17].items.length+"")&&Q(s,o)},d(d){d&&S(e),c=!1,u()}}}function ew(n){let e,t,l,i,o,s,c;const u=[lw,nw],d=[];function p(b,v){return b[4].length>0?0:1}e=p(n),t=d[e]=u[e](n);const h=[sw,iw],m=[];function g(b,v){return b[5].length===0?0:1}return i=g(n),o=m[i]=h[i](n),{c(){t.c(),l=w(),o.c(),s=_t()},m(b,v){d[e].m(b,v),C(b,l,v),m[i].m(b,v),C(b,s,v),c=!0},p(b,v){let y=e;e=p(b),e===y?d[e].p(b,v):(ft(),be(d[y],1,1,()=>{d[y]=null}),dt(),t=d[e],t?t.p(b,v):(t=d[e]=u[e](b),t.c()),fe(t,1),t.m(l.parentNode,l));let E=i;i=g(b),i===E?m[i].p(b,v):(ft(),be(m[E],1,1,()=>{m[E]=null}),dt(),o=m[i],o?o.p(b,v):(o=m[i]=h[i](b),o.c()),fe(o,1),o.m(s.parentNode,s))},i(b){c||(fe(t),fe(o),c=!0)},o(b){be(t),be(o),c=!1},d(b){b&&(S(l),S(s)),d[e].d(b),m[i].d(b)}}}function tw(n){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${k("common.loading")}`,r(e,"class","empty-state")},m(l,i){C(l,e,i),a(e,t)},p:ie,i:ie,o:ie,d(l){l&&S(e)}}}function nw(n){let e,t;return e=new td({props:{crumbs:[{name:k("file.root")}]}}),{c(){Ge(e.$$.fragment)},m(l,i){He(e,l,i),t=!0},p:ie,i(l){t||(fe(e.$$.fragment,l),t=!0)},o(l){be(e.$$.fragment,l),t=!1},d(l){We(e,l)}}}function lw(n){let e,t,l,i,o,s,c,u=k("common.backLabel")+"",d,p,h,m;return e=new td({props:{crumbs:[{name:k("file.root")},...n[4]]}}),e.$on("navigate",n[77]),{c(){Ge(e.$$.fragment),t=w(),l=f("button"),i=ae("svg"),o=ae("line"),s=ae("polyline"),c=w(),d=F(u),r(o,"x1","19"),r(o,"y1","12"),r(o,"x2","5"),r(o,"y2","12"),r(s,"points","12 19 5 12 12 5"),r(i,"width","14"),r(i,"height","14"),r(i,"viewBox","0 0 24 24"),r(i,"fill","none"),r(i,"stroke","currentColor"),r(i,"stroke-width","2"),r(i,"stroke-linecap","round"),r(i,"stroke-linejoin","round"),r(l,"class","btn btn-sm back-btn svelte-jre32j")},m(g,b){He(e,g,b),C(g,t,b),C(g,l,b),a(l,i),a(i,o),a(i,s),a(l,c),a(l,d),p=!0,h||(m=O(l,"click",n[32]),h=!0)},p(g,b){const v={};b[0]&16&&(v.crumbs=[{name:k("file.root")},...g[4]]),e.$set(v)},i(g){p||(fe(e.$$.fragment,g),p=!0)},o(g){be(e.$$.fragment,g),p=!1},d(g){g&&(S(t),S(l)),We(e,g),h=!1,m()}}}function iw(n){let e,t=[],l=new Map,i,o=Te(n[5]);const s=c=>c[120].id;for(let c=0;c<o.length;c+=1){let u=gc(n,o,c),d=s(u);l.set(d,t[c]=bc(d,u))}return{c(){e=f("div");for(let c=0;c<t.length;c+=1)t[c].c();r(e,"class","file-list svelte-jre32j")},m(c,u){C(c,e,u);for(let d=0;d<t.length;d+=1)t[d]&&t[d].m(e,null);i=!0},p(c,u){u[0]&262178|u[1]&270515209&&(o=Te(c[5]),ft(),t=Gf(t,u,s,1,c,o,l,e,Wf,bc,null,gc),dt())},i(c){if(!i){for(let u=0;u<o.length;u+=1)fe(t[u]);i=!0}},o(c){for(let u=0;u<t.length;u+=1)be(t[u]);i=!1},d(c){c&&S(e);for(let u=0;u<t.length;u+=1)t[u].d()}}}function sw(n){let e,t,l,i,o=(n[4].length>0?k("file.noFiles"):k("file.noFilesCase"))+"",s,c,u,d,p,h,m,g,b,v;return{c(){e=f("div"),t=f("div"),t.innerHTML='<svg width="40" height="40" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline></svg>',l=w(),i=f("p"),s=F(o),c=w(),u=f("p"),u.textContent=`${k("file.hint")}`,d=w(),p=f("div"),h=f("button"),h.textContent=`${k("file.addFileSimple")}`,m=w(),g=f("button"),g.textContent=`${k("file.addFolderSimple")}`,r(t,"class","empty-icon"),r(u,"class","hint"),r(h,"class","btn btn-primary svelte-jre32j"),r(g,"class","btn svelte-jre32j"),r(p,"class","empty-actions"),r(e,"class","empty-state")},m(y,E){C(y,e,E),a(e,t),a(e,l),a(e,i),a(i,s),a(e,c),a(e,u),a(e,d),a(e,p),a(p,h),a(p,m),a(p,g),b||(v=[O(h,"click",n[38]),O(g,"click",n[39])],b=!0)},p(y,E){E[0]&16&&o!==(o=(y[4].length>0?k("file.noFiles"):k("file.noFilesCase"))+"")&&Q(s,o)},i:ie,o:ie,d(y){y&&S(e),b=!1,Se(v)}}}function bc(n,e){let t,l,i;return l=new Kg({props:{item:e[120],selected:e[18].includes(e[120].id),onDragStart:e[49],onDragOver:e[50],onDrop:e[51]}}),l.$on("navigate",e[78]),l.$on("preview",e[79]),l.$on("openExternal",e[80]),l.$on("showInFolder",e[81]),l.$on("delete",e[82]),l.$on("rename",e[83]),l.$on("duplicate",e[84]),l.$on("cut",e[85]),l.$on("copy",e[86]),l.$on("selectOne",e[87]),l.$on("toggleSelect",e[88]),l.$on("rangeSelect",e[89]),{key:n,first:null,c(){t=_t(),Ge(l.$$.fragment),this.first=t},m(o,s){C(o,t,s),He(l,o,s),i=!0},p(o,s){e=o;const c={};s[0]&32&&(c.item=e[120]),s[0]&262176&&(c.selected=e[18].includes(e[120].id)),l.$set(c)},i(o){i||(fe(l.$$.fragment,o),i=!0)},o(o){be(l.$$.fragment,o),i=!1},d(o){o&&S(t),We(l,o)}}}function kc(n){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${k("file.scanning")}`,r(e,"class","empty-state")},m(l,i){C(l,e,i),a(e,t)},d(l){l&&S(e)}}}function vc(n){let e;return{c(){e=f("span"),e.textContent="markdown",r(e,"class","fe-badge svelte-jre32j")},m(t,l){C(t,e,l)},d(t){t&&S(e)}}}function wc(n){let e,t,l,i,o,s,c,u;return{c(){e=f("div"),t=f("button"),t.textContent=`${k("note.mode.preview")}`,l=w(),i=f("button"),i.textContent=`${k("note.mode.edit")}`,o=w(),s=f("button"),s.textContent=`${k("note.mode.split")}`,r(t,"type","button"),r(t,"class","fe-mode-btn svelte-jre32j"),ce(t,"active",n[15]==="view"),r(i,"type","button"),r(i,"class","fe-mode-btn svelte-jre32j"),ce(i,"active",n[15]==="edit"),r(s,"type","button"),r(s,"class","fe-mode-btn svelte-jre32j"),ce(s,"active",n[15]==="split"),r(e,"class","fe-mode-switcher svelte-jre32j"),r(e,"role","tablist"),r(e,"aria-label","View mode")},m(d,p){C(d,e,p),a(e,t),a(e,l),a(e,i),a(e,o),a(e,s),c||(u=[O(t,"click",n[68]),O(i,"click",n[69]),O(s,"click",n[70])],c=!0)},p(d,p){p[0]&32768&&ce(t,"active",d[15]==="view"),p[0]&32768&&ce(i,"active",d[15]==="edit"),p[0]&32768&&ce(s,"active",d[15]==="split")},d(d){d&&S(e),c=!1,Se(u)}}}function ow(n){let e,t,l;return{c(){e=f("pre"),t=f("code"),l=F(n[11]),r(t,"class","svelte-jre32j"),r(e,"class","fe-plain-text svelte-jre32j")},m(i,o){C(i,e,o),a(e,t),a(t,l)},p(i,o){o[0]&2048&&Q(l,i[11])},i:ie,o:ie,d(i){i&&S(e)}}}function rw(n){let e,t,l,i,o,s,c;var u=Wl;function d(m,g){return{props:{content:m[11],viewMode:"split"}}}u&&(l=$n(u,d(n)),l.$on("content-change",n[75]),l.$on("save",n[76]));var p=Tl;function h(m,g){return{props:{content:m[11]}}}return p&&(s=$n(p,h(n))),{c(){e=f("div"),t=f("div"),l&&Ge(l.$$.fragment),i=w(),o=f("div"),s&&Ge(s.$$.fragment),r(t,"class","fe-split-pane fe-split-editor svelte-jre32j"),r(o,"class","fe-split-pane fe-split-preview svelte-jre32j"),r(e,"class","fe-split svelte-jre32j")},m(m,g){C(m,e,g),a(e,t),l&&He(l,t,null),a(e,i),a(e,o),s&&He(s,o,null),c=!0},p(m,g){if(u!==(u=Wl)){if(l){ft();const b=l;be(b.$$.fragment,1,0,()=>{We(b,1)}),dt()}u?(l=$n(u,d(m)),l.$on("content-change",m[75]),l.$on("save",m[76]),Ge(l.$$.fragment),fe(l.$$.fragment,1),He(l,t,null)):l=null}else if(u){const b={};g[0]&2048&&(b.content=m[11]),l.$set(b)}if(p!==(p=Tl)){if(s){ft();const b=s;be(b.$$.fragment,1,0,()=>{We(b,1)}),dt()}p?(s=$n(p,h(m)),Ge(s.$$.fragment),fe(s.$$.fragment,1),He(s,o,null)):s=null}else if(p){const b={};g[0]&2048&&(b.content=m[11]),s.$set(b)}},i(m){c||(l&&fe(l.$$.fragment,m),s&&fe(s.$$.fragment,m),c=!0)},o(m){l&&be(l.$$.fragment,m),s&&be(s.$$.fragment,m),c=!1},d(m){m&&S(e),l&&We(l),s&&We(s)}}}function aw(n){let e,t,l;var i=Wl;function o(s,c){return{props:{content:s[11],viewMode:"edit"}}}return i&&(e=$n(i,o(n)),e.$on("content-change",n[73]),e.$on("save",n[74])),{c(){e&&Ge(e.$$.fragment),t=_t()},m(s,c){e&&He(e,s,c),C(s,t,c),l=!0},p(s,c){if(i!==(i=Wl)){if(e){ft();const u=e;be(u.$$.fragment,1,0,()=>{We(u,1)}),dt()}i?(e=$n(i,o(s)),e.$on("content-change",s[73]),e.$on("save",s[74]),Ge(e.$$.fragment),fe(e.$$.fragment,1),He(e,t.parentNode,t)):e=null}else if(i){const u={};c[0]&2048&&(u.content=s[11]),e.$set(u)}},i(s){l||(e&&fe(e.$$.fragment,s),l=!0)},o(s){e&&be(e.$$.fragment,s),l=!1},d(s){s&&S(t),e&&We(e,s)}}}function cw(n){let e,t,l;var i=Tl;function o(s,c){return{props:{content:s[11]}}}return i&&(t=$n(i,o(n))),{c(){e=f("div"),t&&Ge(t.$$.fragment),r(e,"class","fe-markdown-preview svelte-jre32j")},m(s,c){C(s,e,c),t&&He(t,e,null),l=!0},p(s,c){if(i!==(i=Tl)){if(t){ft();const u=t;be(u.$$.fragment,1,0,()=>{We(u,1)}),dt()}i?(t=$n(i,o(s)),Ge(t.$$.fragment),fe(t.$$.fragment,1),He(t,e,null)):t=null}else if(i){const u={};c[0]&2048&&(u.content=s[11]),t.$set(u)}},i(s){l||(t&&fe(t.$$.fragment,s),l=!0)},o(s){t&&be(t.$$.fragment,s),l=!1},d(s){s&&S(e),t&&We(t)}}}function uw(n){let e,t,l,i,o,s,c;return{c(){e=f("div"),t=f("p"),l=F(n[13]),i=w(),o=f("button"),o.textContent=`${k("file.openExternal")}`,r(o,"class","btn btn-sm svelte-jre32j"),r(e,"class","fe-status fe-error svelte-jre32j")},m(u,d){C(u,e,d),a(e,t),a(t,l),a(e,i),a(e,o),s||(c=O(o,"click",n[72]),s=!0)},p(u,d){d[0]&8192&&Q(l,u[13])},i:ie,o:ie,d(u){u&&S(e),s=!1,c()}}}function fw(n){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${k("common.loading")}`,r(e,"class","fe-status svelte-jre32j")},m(l,i){C(l,e,i),a(e,t)},p:ie,i:ie,o:ie,d(l){l&&S(e)}}}function yc(n){let e,t,l,i;return{c(){e=f("div"),t=f("button"),t.textContent=`${k("common.save")}`,r(t,"class","btn btn-primary btn-sm svelte-jre32j"),r(e,"class","fe-footer svelte-jre32j")},m(o,s){C(o,e,s),a(e,t),l||(i=O(t,"click",n[36]),l=!0)},p:ie,d(o){o&&S(e),l=!1,i()}}}function Ec(n){let e,t,l,i,o,s,c,u,d,p,h,m,g,b,v,y,E,T=n[24]&&Tc(n);return{c(){e=f("div"),t=f("div"),l=f("h3"),l.textContent=`${k("rename.title")}`,i=w(),o=f("div"),s=f("label"),c=f("span"),c.textContent=`${k("common.newName")}`,u=w(),d=f("input"),p=w(),T&&T.c(),h=w(),m=f("div"),g=f("button"),g.textContent=`${k("common.rename")}`,b=w(),v=f("button"),v.textContent=`${k("common.cancel")}`,r(c,"class","label-text"),r(d,"type","text"),r(o,"class","form-group"),r(g,"class","btn btn-primary svelte-jre32j"),r(v,"class","btn svelte-jre32j"),r(m,"class","modal-actions"),r(t,"class","modal"),r(e,"class","modal-overlay"),r(e,"role","button"),r(e,"tabindex","0")},m(I,N){C(I,e,N),a(e,t),a(t,l),a(t,i),a(t,o),a(o,s),a(s,c),a(s,u),a(s,d),Me(d,n[23]),a(t,p),T&&T.m(t,null),a(t,h),a(t,m),a(m,g),a(m,b),a(m,v),y||(E=[O(d,"input",n[90]),O(d,"keydown",n[54]),O(g,"click",n[52]),O(v,"click",n[53]),O(e,"click",Jt(n[53])),O(e,"keydown",n[91])],y=!0)},p(I,N){N[0]&8388608&&d.value!==I[23]&&Me(d,I[23]),I[24]?T?T.p(I,N):(T=Tc(I),T.c(),T.m(t,h)):T&&(T.d(1),T=null)},d(I){I&&S(e),T&&T.d(),y=!1,Se(E)}}}function Tc(n){let e,t;return{c(){e=f("div"),t=F(n[24]),r(e,"class","rename-error svelte-jre32j")},m(l,i){C(l,e,i),a(e,t)},p(l,i){i[0]&16777216&&Q(t,l[24])},d(l){l&&S(e)}}}function Sc(n){let e,t;return e=new Hd({props:{title:n[26],message:n[27],confirmText:n[29],danger:n[28]}}),e.$on("confirm",n[55]),e.$on("cancel",n[56]),{c(){Ge(e.$$.fragment)},m(l,i){He(e,l,i),t=!0},p(l,i){const o={};i[0]&67108864&&(o.title=l[26]),i[0]&134217728&&(o.message=l[27]),i[0]&536870912&&(o.confirmText=l[29]),i[0]&268435456&&(o.danger=l[28]),e.$set(o)},i(l){t||(fe(e.$$.fragment,l),t=!0)},o(l){be(e.$$.fragment,l),t=!1},d(l){We(e,l)}}}function Cc(n){let e,t,l,i=k("file.importTitle")+"",o,s,c=(n[0]?n[0].title:"")+"",u,d,p,h,m,g,b,v=n[20].files+"",y,E,T,I,N,R=n[20].folders+"",M,A,L,j,B,U=(n[20].totalBytes/1024).toFixed(1)+"",z,W,G,X,H,D,q,P,Y,Z,J,te,ne=n[20].isDangerous&&Ac(n);return{c(){e=f("div"),t=f("div"),l=f("h3"),o=F(i),s=F(" «"),u=F(c),d=F("»"),p=w(),h=f("div"),m=f("div"),g=f("span"),g.textContent=`${k("file.importFiles")}`,b=f("span"),y=F(v),E=w(),T=f("div"),I=f("span"),I.textContent=`${k("file.importFolders")}`,N=f("span"),M=F(R),A=w(),L=f("div"),j=f("span"),j.textContent=`${k("file.importSize")}`,B=f("span"),z=F(U),W=F(" KB"),G=w(),ne&&ne.c(),X=w(),H=f("div"),D=f("button"),D.textContent=`${k("file.importCopy")}`,q=w(),P=f("button"),P.textContent=`${k("file.importLink")}`,Y=w(),Z=f("button"),Z.textContent=`${k("common.cancel")}`,r(m,"class","summary-row svelte-jre32j"),r(T,"class","summary-row svelte-jre32j"),r(L,"class","summary-row svelte-jre32j"),r(h,"class","import-summary svelte-jre32j"),r(D,"class","btn btn-primary svelte-jre32j"),r(P,"class","btn svelte-jre32j"),r(Z,"class","btn svelte-jre32j"),r(H,"class","modal-actions"),r(t,"class","modal"),r(e,"class","modal-overlay"),r(e,"role","button"),r(e,"tabindex","0")},m(le,me){C(le,e,me),a(e,t),a(t,l),a(l,o),a(l,s),a(l,u),a(l,d),a(t,p),a(t,h),a(h,m),a(m,g),a(m,b),a(b,y),a(h,E),a(h,T),a(T,I),a(T,N),a(N,M),a(h,A),a(h,L),a(L,j),a(L,B),a(B,z),a(B,W),a(h,G),ne&&ne.m(h,null),a(t,X),a(t,H),a(H,D),a(H,q),a(H,P),a(H,Y),a(H,Z),J||(te=[O(D,"click",n[92]),O(P,"click",n[93]),O(Z,"click",n[58]),O(e,"click",Jt(n[58])),O(e,"keydown",n[94])],J=!0)},p(le,me){me[0]&1&&c!==(c=(le[0]?le[0].title:"")+"")&&Q(u,c),me[0]&1048576&&v!==(v=le[20].files+"")&&Q(y,v),me[0]&1048576&&R!==(R=le[20].folders+"")&&Q(M,R),me[0]&1048576&&U!==(U=(le[20].totalBytes/1024).toFixed(1)+"")&&Q(z,U),le[20].isDangerous?ne?ne.p(le,me):(ne=Ac(le),ne.c(),ne.m(h,null)):ne&&(ne.d(1),ne=null)},d(le){le&&S(e),ne&&ne.d(),J=!1,Se(te)}}}function Ac(n){let e,t,l,i,o,s,c=n[20].dangerReason+"",u;return{c(){e=f("div"),t=ae("svg"),l=ae("path"),i=ae("line"),o=ae("line"),s=w(),u=F(c),r(l,"d","M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"),r(i,"x1","12"),r(i,"y1","9"),r(i,"x2","12"),r(i,"y2","13"),r(o,"x1","12"),r(o,"y1","17"),r(o,"x2","12.01"),r(o,"y2","17"),r(t,"width","14"),r(t,"height","14"),r(t,"viewBox","0 0 24 24"),r(t,"fill","none"),r(t,"stroke","currentColor"),r(t,"stroke-width","2"),r(t,"stroke-linecap","round"),r(t,"stroke-linejoin","round"),r(e,"class","summary-warn svelte-jre32j")},m(d,p){C(d,e,p),a(e,t),a(t,l),a(t,i),a(t,o),a(e,s),a(e,u)},p(d,p){p[0]&1048576&&c!==(c=d[20].dangerReason+"")&&Q(u,c)},d(d){d&&S(e)}}}function Nc(n){let e,t;return e=new Ud({props:{item:n[6],content:n[7],loading:n[8],error:n[9]}}),e.$on("close",n[37]),e.$on("openExternal",n[95]),{c(){Ge(e.$$.fragment)},m(l,i){He(e,l,i),t=!0},p(l,i){const o={};i[0]&64&&(o.item=l[6]),i[0]&128&&(o.content=l[7]),i[0]&256&&(o.loading=l[8]),i[0]&512&&(o.error=l[9]),e.$set(o)},i(l){t||(fe(e.$$.fragment,l),t=!0)},o(l){be(e.$$.fragment,l),t=!1},d(l){We(e,l)}}}function dw(n){let e,t,l,i,o,s,c,u,d;const p=[$2,x2],h=[];function m(E,T){return E[10]?0:1}t=m(n),l=h[t]=p[t](n);let g=n[22]&&Ec(n),b=n[25]&&Sc(n),v=n[21]&&n[20]&&Cc(n),y=n[6]&&Nc(n);return{c(){e=f("div"),l.c(),i=w(),g&&g.c(),o=w(),b&&b.c(),s=w(),v&&v.c(),c=w(),y&&y.c(),u=_t(),r(e,"class","files-tab svelte-jre32j")},m(E,T){C(E,e,T),h[t].m(e,null),C(E,i,T),g&&g.m(E,T),C(E,o,T),b&&b.m(E,T),C(E,s,T),v&&v.m(E,T),C(E,c,T),y&&y.m(E,T),C(E,u,T),d=!0},p(E,T){let I=t;t=m(E),t===I?h[t].p(E,T):(ft(),be(h[I],1,1,()=>{h[I]=null}),dt(),l=h[t],l?l.p(E,T):(l=h[t]=p[t](E),l.c()),fe(l,1),l.m(e,null)),E[22]?g?g.p(E,T):(g=Ec(E),g.c(),g.m(o.parentNode,o)):g&&(g.d(1),g=null),E[25]?b?(b.p(E,T),T[0]&33554432&&fe(b,1)):(b=Sc(E),b.c(),fe(b,1),b.m(s.parentNode,s)):b&&(ft(),be(b,1,1,()=>{b=null}),dt()),E[21]&&E[20]?v?v.p(E,T):(v=Cc(E),v.c(),v.m(c.parentNode,c)):v&&(v.d(1),v=null),E[6]?y?(y.p(E,T),T[0]&64&&fe(y,1)):(y=Nc(E),y.c(),fe(y,1),y.m(u.parentNode,u)):y&&(ft(),be(y,1,1,()=>{y=null}),dt())},i(E){d||(fe(l),fe(b),fe(y),d=!0)},o(E){be(l),be(b),be(y),d=!1},d(E){E&&(S(e),S(i),S(o),S(s),S(c),S(u)),h[t].d(),g&&g.d(E),b&&b.d(E),v&&v.d(E),y&&y.d(E)}}}function pw(n,e,t){let{selectedNode:l=null}=e,{wailsCall:i=async()=>{}}=e;function o(x){try{i("WriteDebugLog","[FilesTab] "+x)}catch{}}const s=bn();let c=!1,u=null,d=[],p=[],h=null,m="",g=!1,b="",v=null,y="",E=!1,T="",I=!1,N="view",R=!1,M={items:[],mode:"copy"},A=[],L=[],j=!1,B=null,U=!1,z="",W="",G=!1,X="",H="",D="",q=!1,P="",Y="",Z=!1,J=k("common.delete"),te=null,ne=null;function le(x){t(4,d=[]),t(3,u=null),t(18,A=[]),L=[],t(6,h=null),t(7,m=""),Je(),ze(x)}let me=null;function oe(){Ce()}function ze(x){ee(x)}function Ye(x){const _e=p.find($e=>$e.id===x);_e&&ve(_e)}function Re(x){t(18,A=[x])}async function ee(x){t(2,c=!0);try{let _e=await i("ListItems",x)||[];o("loadFolder nodeId="+x+" count="+_e.length+" first="+(_e[0]?JSON.stringify({id:_e[0].id,name:_e[0].name,type:_e[0].type,fileId:_e[0].fileId}):"none")),_e.sort(($e,wt)=>$e.type!==wt.type?$e.type==="folder"?-1:1:($e.name||"").localeCompare(wt.name||"")),t(5,p=_e)}catch(_e){o("loadFolder ERROR nodeId="+x+" err="+String(_e)),t(5,p=[])}t(2,c=!1)}async function re(x){if(l){try{const _e=await i("GetNodeDetail",x);_e&&t(4,d=[...d,{id:x,name:_e.title}])}catch{t(4,d=[...d,{id:x,name:"..."}])}t(3,u=x),await ee(x)}}function Ne(){if(d.length<2)t(4,d=[]),t(3,u=null),l&&ee(l.id);else{const x=d[d.length-2];t(4,d=d.slice(0,-1)),t(3,u=x.id),ee(x.id)}}function Be(x){const _e=d[x];t(4,d=d.slice(0,x+1)),t(3,u=_e.id),ee(_e.id)}async function ve(x){if(o("openFile item="+JSON.stringify({id:x.id,name:x.name,type:x.type,fileId:x.fileId})),x&&x.fileId&&ii(x))try{const _e=await i("CheckFileAction",x.fileId);if(o("CheckFileAction result="+JSON.stringify(_e)),_e&&_e.action==="note"){s("openNote",{id:_e.noteId,title:_e.noteTitle});return}}catch(_e){o("CheckFileAction ERROR: "+String(_e))}if(x&&x.fileId&&($f(x)||ii(x))){o("opening text editor for "+x.name),Ue(x,ii(x));return}if(x&&x.fileId&&Qf(x)){o("opening preview modal for "+x.name),Qe(x);return}if(x&&x.fileId&&x.type!=="folder"){o("fallback: trying text editor for unknown type "+x.name),Ue(x,!1);return}o("no suitable opener for "+x.name)}async function Ue(x,_e){t(10,v=x),t(11,y=""),t(13,T=""),t(12,E=!0),t(14,I=_e);try{t(11,y=await i("ReadFileText",x.fileId)||"")}catch($e){t(13,T=String($e))}t(12,E=!1)}function Je(){t(10,v=null),t(11,y=""),t(13,T=""),t(14,I=!1),t(15,N="view"),t(16,R=!1)}function Ae(){!v||!R||(i("SaveFileText",v.fileId,y),t(16,R=!1))}async function Qe(x){t(6,h=x),t(7,m=""),t(9,b=""),t(8,g=!0);try{zg(x)&&t(7,m=await i("GetFileBase64",x.fileId)||"")}catch(_e){t(9,b=String(_e))}t(8,g=!1)}function Fe(){t(6,h=null),t(7,m=""),t(9,b="")}async function Ce(){const x=await i("PickFile");if(!x)return;const _e=u||l.id;await Rt(_e,x)}async function Ke(){const x=await i("PickDirectory");if(!x)return;const _e=u||l.id;await Rt(_e,x)}async function De(){const x=prompt(k("file.namePrompt"));if(!(!x||!x.trim()))try{const _e=u||l.id;await i("CreateEmptyFile",_e,x.trim()),await ee(_e),s("refreshParent",{nodeId:_e})}catch(_e){s("error",{message:String(_e)})}}async function Ze(x){try{await i("DuplicateNode",x);const _e=u||l.id;await ee(_e),s("refreshParent",{nodeId:_e})}catch(_e){s("error",{message:String(_e)})}}function Pe(x){const _e=p.find($e=>$e.id===x);_e&&Ot(_e.id,_e.name)}function ue(x){t(17,M={items:[x],mode:"cut"})}function ke(x){t(17,M={items:[x],mode:"copy"})}async function $(){if(M.items.length===0)return;const x=u||l.id;try{if(M.mode==="copy")for(const _e of M.items)await i("DuplicateNode",_e);else for(const _e of M.items)await i("MoveNode",_e,x);t(17,M={items:[],mode:"copy"}),await ee(x)}catch(_e){s("error",{message:String(_e)})}}function we(x){A.includes(x)?t(18,A=A.filter(_e=>_e!==x)):t(18,A=[...A,x])}function ge(x){t(18,A=[x])}function Ie(){t(18,A=p.map(x=>x.id))}function it(x){if(p.length===0)return;const _e=A.length>0?A[A.length-1]:p[0].id,$e=p.findIndex(V=>V.id===_e),wt=p.findIndex(V=>V.id===x);if($e===-1||wt===-1)return;const wn=Math.min($e,wt),Zt=Math.max($e,wt),_n=p.slice(wn,Zt+1).map(V=>V.id),ye=new Set(A);_n.forEach(V=>ye.add(V)),t(18,A=[...ye])}function ut(){t(18,A=[])}function Xe(x){return x.length>0?x:p.map(_e=>_e.id)}async function mt(){const x=Xe(A),_e=p.find(wt=>wt.id===x[0]);let $e;x.length===1&&(_e==null?void 0:_e.type)==="folder"?$e=k("delete.folder"):x.length===1?$e=k("delete.file"):$e=k("delete.files",{count:x.length}),tn({title:k("delete.confirmTitle"),message:k("delete.confirmMessage")+" "+$e+"?",confirmText:k("common.delete"),danger:!0,onConfirm:async()=>{for(const wn of x)try{await i("DeleteFileOrFolder",wn)}catch(Zt){s("error",{message:String(Zt)})}t(18,A=[]);const wt=u||l.id;await ee(wt)}})}function xe(){const x=Xe(A);t(17,M={items:x,mode:"cut"}),t(18,A=[])}function he(){const x=Xe(A);t(17,M={items:x,mode:"copy"}),t(18,A=[])}function qe(x,_e){x.stopPropagation();const $e=A.includes(_e)?A:[_e];L=$e,x.dataTransfer.effectAllowed="move",x.dataTransfer.setData("text/plain",$e.join(","))}function pt(x,_e){const $e=p.find(wt=>wt.id===_e);$e&&$e.type==="folder"&&(x.preventDefault(),x.stopPropagation(),x.dataTransfer.dropEffect="move")}async function yt(x,_e){if(x.preventDefault(),x.stopPropagation(),L.length!==0){for(const $e of L)try{await i("MoveNode",$e,_e)}catch(wt){s("error",{message:String(wt)})}L=[],t(18,A=[]),await ee(u||l.id)}}function At(){if(A.length===1){const x=p.find(_e=>_e.id===A[0]);x&&(x.type==="folder"?re(x.id):ve(x))}}function en(){if(A.length===1){const x=p.find(_e=>_e.id===A[0]);x&&x.fileId&&i("OpenFile",x.fileId)}}function bt(){if(A.length===1){const x=p.find(_e=>_e.id===A[0]);x&&Ot(x.id,x.name)}}function Ot(x,_e){X=x,t(23,H=_e),t(24,D=""),t(22,G=!0)}async function Nt(){const x=H.trim();if(!x){t(24,D=k("rename.emptyError"));return}try{await i("ValidateName",x)}catch{t(24,D=k("rename.invalidError"));return}t(22,G=!1);const _e=X;X="";try{await i("RenameNode",_e,x),l&&l.id===_e&&t(0,l={...l,title:x}),s("refreshParent",{nodeId:u||l.id}),u&&await ee(u)}catch($e){s("error",{message:String($e)})}}function Dt(){t(22,G=!1),X="",t(23,H=""),t(24,D="")}function fn(x){x.key==="Enter"?Nt():t(24,D="")}function tn(x){t(26,P=x.title||k("common.confirm")),t(27,Y=x.message||""),t(28,Z=x.danger!==void 0?x.danger:!0),t(29,J=x.confirmText||k("common.delete")),te=x.onConfirm||null,ne=x.onCancel||null,t(25,q=!0)}function Pt(){t(25,q=!1),te=null,ne=null}function Dn(){te&&te(),Pt()}function Ct(){ne&&ne(),Pt()}async function Rt(x,_e){t(19,j=!0);try{const $e=await i("PreviewImport",_e);t(20,B=$e),z=_e,W=x,t(21,U=!0)}catch($e){s("error",{message:String($e)})}t(19,j=!1)}async function gt(x){try{const _e=W||l.id;x==="copy"?await i("AddPathCopy",_e,z):await i("AddPathLink",_e,z),t(21,U=!1),t(20,B=null),t(4,d=[]),t(3,u=null),await ee(_e),s("refreshParent",{nodeId:_e})}catch(_e){s("error",{message:String(_e)})}}function tl(){t(21,U=!1),t(20,B=null)}async function kn({id:x,type:_e}){const $e=k(_e==="folder"?"delete.folder":"delete.file");tn({title:k("delete.confirmTitle"),message:k("delete.confirmMessage")+" "+$e+"?",confirmText:k("common.delete"),danger:!0,onConfirm:async()=>{try{await i("DeleteFileOrFolder",x);const wt=u||l.id;await ee(wt)}catch(wt){s("error",{message:String(wt)})}}})}function Al(x){if(x.ctrlKey||x.metaKey)x.key==="c"||x.key==="C"?(x.preventDefault(),he()):x.key==="x"||x.key==="X"?(x.preventDefault(),xe()):x.key==="v"||x.key==="V"?(x.preventDefault(),$()):x.key==="a"||x.key==="A"?(x.preventDefault(),Ie()):x.key==="o"||x.key==="O"?(x.preventDefault(),en()):x.key==="Enter"&&(x.preventDefault(),At());else if(x.key==="Enter")x.preventDefault(),At();else if(x.key==="Delete"){if(v){x.preventDefault(),Je();return}if(h){x.preventDefault(),Fe();return}if(A.length>0){x.preventDefault(),mt();return}}else if(x.key==="Escape"){if(v){Je();return}if(h){Fe();return}if(A.length>0){ut();return}}else x.key==="F2"&&(x.preventDefault(),bt())}function nn(){t(4,d=[]),t(3,u=null),t(5,p=[]),t(18,A=[]),L=[],t(6,h=null),t(7,m=""),t(9,b=""),t(17,M={items:[],mode:"copy"}),t(19,j=!1),t(20,B=null),t(21,U=!1),t(22,G=!1),t(25,q=!1)}const kt=()=>t(15,N="view"),qt=()=>t(15,N="edit"),ln=()=>t(15,N="split"),dn=()=>i("OpenFile",v.fileId),Gt=()=>i("OpenFile",v.fileId),Qt=x=>{t(11,y=x.detail.content),t(16,R=!0)},Sn=()=>Ae(),pn=x=>{t(11,y=x.detail.content),t(16,R=!0)},Pn=()=>Ae(),hn=x=>{const _e=x.detail;_e===0?(t(4,d=[]),t(3,u=null),l&&ee(l.id)):Be(_e-1)},nl=x=>re(x.detail),jt=x=>ve(x.detail),sn=x=>i("OpenFile",x.detail),xt=x=>i("OpenFolder",x.detail),Cn=x=>kn(x.detail),ll=x=>Pe(x.detail.id),qn=x=>Ze(x.detail),Wn=x=>ue(x.detail),mn=x=>ke(x.detail),gn=x=>ge(x.detail),An=x=>we(x.detail),$t=x=>it(x.detail);function vn(){H=this.value,t(23,H)}const Mt=x=>x.key==="Escape"&&Dt(),Gn=()=>gt("copy"),Nl=()=>gt("link"),il=x=>x.key==="Escape"&&tl(),sl=x=>i("OpenFile",x.detail);return n.$$set=x=>{"selectedNode"in x&&t(0,l=x.selectedNode),"wailsCall"in x&&t(1,i=x.wailsCall)},n.$$.update=()=>{n.$$.dirty[0]&1|n.$$.dirty[2]&32&&l&&l.id&&l.id!==me&&(o("selectedNode changed: id="+l.id+" title="+l.title+" type="+l.type),t(67,me=l.id),le(l.id))},[l,i,c,u,d,p,h,m,g,b,v,y,E,T,I,N,R,M,A,j,B,U,G,H,D,q,P,Y,Z,J,ee,re,Ne,Be,ve,Je,Ae,Fe,Ce,Ke,De,Ze,Pe,ue,ke,$,we,ge,it,qe,pt,yt,Nt,Dt,fn,Dn,Ct,gt,tl,kn,le,oe,ze,Ye,Re,Al,nn,me,kt,qt,ln,dn,Gt,Qt,Sn,pn,Pn,hn,nl,jt,sn,xt,Cn,ll,qn,Wn,mn,gn,An,$t,vn,Mt,Gn,Nl,il,sl]}class hw extends ct{constructor(e){super(),at(this,e,pw,dw,rt,{selectedNode:0,wailsCall:1,resetToNode:60,addFile:61,loadFolder:62,openFileById:63,focusItem:64,handleFilesKeydown:65,resetState:66},null,[-1,-1,-1,-1])}get resetToNode(){return this.$$.ctx[60]}get addFile(){return this.$$.ctx[61]}get loadFolder(){return this.$$.ctx[62]}get openFileById(){return this.$$.ctx[63]}get focusItem(){return this.$$.ctx[64]}get handleFilesKeydown(){return this.$$.ctx[65]}get resetState(){return this.$$.ctx[66]}}const{Boolean:Xd}=Ps;function Ic(n,e,t){const l=n.slice();return l[463]=e[t],l}function Rc(n,e,t){const l=n.slice();return l[466]=e[t],l}function Mc(n,e,t){const l=n.slice();return l[469]=e[t],l}function Lc(n,e,t){const l=n.slice();return l[469]=e[t],l}function Oc(n,e,t){const l=n.slice();return l[486]=e[t],l}function Dc(n,e,t){const l=n.slice();return l[513]=e[t],l}function Pc(n,e,t){const l=n.slice();return l[486]=e[t],l}function qc(n,e,t){const l=n.slice();return l[513]=e[t],l}function jc(n,e,t){const l=n.slice();return l[520]=e[t],l}function zc(n,e,t){const l=n.slice();return l[520]=e[t],l}function Bc(n,e,t){const l=n.slice();return l[489]=e[t],l[509]=e,l[510]=t,l}function Fc(n,e,t){const l=n.slice();return l[486]=e[t],l}function Uc(n,e,t){const l=n.slice();return l[506]=e[t],l}function Hc(n,e,t){const l=n.slice();return l[474]=e[t],l}function Wc(n,e,t){const l=n.slice();return l[499]=e[t],l}function Gc(n,e,t){const l=n.slice();return l[474]=e[t],l}function Kc(n,e,t){const l=n.slice();return l[486]=e[t],l}function Vc(n,e,t){const l=n.slice();return l[483]=e[t],l}function Zc(n,e,t){const l=n.slice();return l[486]=e[t],l}function Yc(n,e,t){const l=n.slice();return l[489]=e[t],l[490]=e,l[491]=t,l}function Xc(n,e,t){const l=n.slice();return l[486]=e[t],l}function Jc(n,e,t){const l=n.slice();return l[480]=e[t],l}function Qc(n,e,t){const l=n.slice();return l[477]=e[t],l}function xc(n,e,t){const l=n.slice();return l[474]=e[t],l}function $c(n,e,t){const l=n.slice();return l[496]=e[t],l}function eu(n,e,t){const l=n.slice();return l[527]=e[t],l}function mw(n){let e,t,l,i,o,s,c,u,d,p,h,m,g,b,v,y,E,T,I,N,R,M,A,L,j,B,U,z,W,G,X,H,D,q,P,Y,Z,J,te,ne,le,me,oe,ze,Ye,Re,ee,re,Ne,Be,ve,Ue,Je=n[97]&&tu(n),Ae=Te(n[0]),Qe=[];for(let he=0;he<Ae.length;he+=1)Qe[he]=iu(eu(n,Ae,he));const Fe=[kw,bw],Ce=[];function Ke(he,qe){return he[14].length>0?0:1}R=Ke(n),M=Ce[R]=Fe[R](n),j=new q0({props:{syncStatus:n[112],syncLoading:n[113],syncMessage:n[114],syncMessageKind:n[115],onSync:n[228],onOpenSettings:n[234]}}),q=new S2({props:{title:n[119],subtitle:n[118],wailsCall:pe,typeLabel:n[196],onOpenSearchResult:n[223],$$slots:{actions:[yw]},$$scope:{ctx:n}}});let De=n[34]&&ru(n);const Ze=[Mw,Rw,Iw,Nw,Aw,Cw,Sw,Tw,Ew],Pe=[];function ue(he,qe){return qe[0]&2&&(Z=null),he[37]?0:he[2]?1:he[1]==="inbox"?2:he[1]==="trash"?3:he[1]==="journal"?4:he[1]==="today"?5:he[1]==="activity"?6:(Z==null&&(Z=!!(he[1]&&he[1].startsWith("plugin:"))),Z?7:8)}J=ue(n,[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]),te=Pe[J]=Ze[J](n);let ke=n[80]&&df(n),$=n[84].visible&&mf(n),we=n[51]&&kf(n),ge=n[85]&&vf(n),Ie=n[104]&&yf(n),it=n[107]&&Tf(n),ut=n[70]&&Nf(n),Xe=n[99]&&Rf(n),mt=n[91]&&Mf(n),xe=n[13]&&Lf(n);return{c(){e=f("div"),Je&&Je.c(),t=w(),l=f("aside"),i=f("div"),o=f("img"),c=w(),u=f("span"),u.textContent=`${k("nav.brand")}`,d=w(),p=f("nav"),h=f("div"),m=f("div"),m.textContent=`${k("nav.system")}`,g=w();for(let he=0;he<Qe.length;he+=1)Qe[he].c();b=w(),v=f("div"),y=f("div"),E=f("span"),E.textContent=`${k("nav.workspace")}`,T=w(),I=f("button"),I.textContent="+",N=w(),M.c(),A=w(),L=f("div"),Ge(j.$$.fragment),B=w(),U=f("div"),z=f("button"),z.innerHTML='<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1uu9qhk"><circle cx="12" cy="12" r="3" class="svelte-1uu9qhk"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z" class="svelte-1uu9qhk"></path></svg>',W=w(),G=f("span"),X=F(n[33]),H=w(),D=f("main"),Ge(q.$$.fragment),P=w(),De&&De.c(),Y=w(),te.c(),ne=w(),ke&&ke.c(),le=w(),$&&$.c(),me=w(),we&&we.c(),oe=w(),ge&&ge.c(),ze=w(),Ie&&Ie.c(),Ye=w(),it&&it.c(),Re=w(),ut&&ut.c(),ee=w(),Xe&&Xe.c(),re=w(),mt&&mt.c(),Ne=w(),xe&&xe.c(),r(o,"class","logo svelte-1uu9qhk"),Ul(o.src,s="/assets/app-icons/icon_32x32.png")||r(o,"src",s),r(o,"width","20"),r(o,"height","20"),r(o,"alt",""),r(u,"class","brand-name svelte-1uu9qhk"),r(i,"class","sidebar-brand svelte-1uu9qhk"),r(m,"class","nav-label svelte-1uu9qhk"),r(h,"class","nav-group svelte-1uu9qhk"),r(E,"class","svelte-1uu9qhk"),r(I,"class","nav-add-btn svelte-1uu9qhk"),r(I,"title",k("common.create")),r(y,"class","nav-label-row svelte-1uu9qhk"),r(v,"class","nav-group svelte-1uu9qhk"),r(p,"class","sidebar-nav svelte-1uu9qhk"),r(z,"class","sidebar-settings-btn svelte-1uu9qhk"),r(z,"title",k("common.settings")),r(G,"class","version svelte-1uu9qhk"),r(U,"class","sidebar-footer-row svelte-1uu9qhk"),r(L,"class","sidebar-footer svelte-1uu9qhk"),r(l,"class","sidebar svelte-1uu9qhk"),r(D,"class","main svelte-1uu9qhk"),r(e,"class","app svelte-1uu9qhk")},m(he,qe){C(he,e,qe),Je&&Je.m(e,null),a(e,t),a(e,l),a(l,i),a(i,o),a(i,c),a(i,u),a(l,d),a(l,p),a(p,h),a(h,m),a(h,g);for(let pt=0;pt<Qe.length;pt+=1)Qe[pt]&&Qe[pt].m(h,null);a(p,b),a(p,v),a(v,y),a(y,E),a(y,T),a(y,I),a(v,N),Ce[R].m(v,null),a(l,A),a(l,L),He(j,L,null),a(L,B),a(L,U),a(U,z),a(U,W),a(U,G),a(G,X),a(e,H),a(e,D),He(q,D,null),a(D,P),De&&De.m(D,null),a(D,Y),Pe[J].m(D,null),a(D,ne),ke&&ke.m(D,null),a(D,le),$&&$.m(D,null),a(D,me),we&&we.m(D,null),a(D,oe),ge&&ge.m(D,null),a(D,ze),Ie&&Ie.m(D,null),a(D,Ye),it&&it.m(D,null),a(D,Re),ut&&ut.m(D,null),a(D,ee),Xe&&Xe.m(D,null),a(D,re),mt&&mt.m(D,null),a(D,Ne),xe&&xe.m(D,null),Be=!0,ve||(Ue=[O(I,"click",n[133]),O(z,"click",n[235])],ve=!0)},p(he,qe){if(he[97]?Je?Je.p(he,qe):(Je=tu(he),Je.c(),Je.m(e,t)):Je&&(Je.d(1),Je=null),qe[0]&3|qe[1]&1073741824|qe[2]&8192|qe[4]&1){Ae=Te(he[0]);let bt;for(bt=0;bt<Ae.length;bt+=1){const Ot=eu(he,Ae,bt);Qe[bt]?Qe[bt].p(Ot,qe):(Qe[bt]=iu(Ot),Qe[bt].c(),Qe[bt].m(h,null))}for(;bt<Qe.length;bt+=1)Qe[bt].d(1);Qe.length=Ae.length}let pt=R;R=Ke(he),R===pt?Ce[R].p(he,qe):(ft(),be(Ce[pt],1,1,()=>{Ce[pt]=null}),dt(),M=Ce[R],M?M.p(he,qe):(M=Ce[R]=Fe[R](he),M.c()),fe(M,1),M.m(v,null));const yt={};qe[3]&524288&&(yt.syncStatus=he[112]),qe[3]&1048576&&(yt.syncLoading=he[113]),qe[3]&2097152&&(yt.syncMessage=he[114]),qe[3]&4194304&&(yt.syncMessageKind=he[115]),j.$set(yt),(!Be||qe[1]&4)&&Q(X,he[33]);const At={};qe[3]&67108864&&(At.title=he[119]),qe[3]&33554432&&(At.subtitle=he[118]),qe[0]&2|qe[2]&16480|qe[17]&8&&(At.$$scope={dirty:qe,ctx:he}),q.$set(At),he[34]?De?De.p(he,qe):(De=ru(he),De.c(),De.m(D,Y)):De&&(De.d(1),De=null);let en=J;J=ue(he,qe),J===en?Pe[J].p(he,qe):(ft(),be(Pe[en],1,1,()=>{Pe[en]=null}),dt(),te=Pe[J],te?te.p(he,qe):(te=Pe[J]=Ze[J](he),te.c()),fe(te,1),te.m(D,ne)),he[80]?ke?(ke.p(he,qe),qe[2]&262144&&fe(ke,1)):(ke=df(he),ke.c(),fe(ke,1),ke.m(D,le)):ke&&(ft(),be(ke,1,1,()=>{ke=null}),dt()),he[84].visible?$?($.p(he,qe),qe[2]&4194304&&fe($,1)):($=mf(he),$.c(),fe($,1),$.m(D,me)):$&&(ft(),be($,1,1,()=>{$=null}),dt()),he[51]?we?we.p(he,qe):(we=kf(he),we.c(),we.m(D,oe)):we&&(we.d(1),we=null),he[85]?ge?ge.p(he,qe):(ge=vf(he),ge.c(),ge.m(D,ze)):ge&&(ge.d(1),ge=null),he[104]?Ie?Ie.p(he,qe):(Ie=yf(he),Ie.c(),Ie.m(D,Ye)):Ie&&(Ie.d(1),Ie=null),he[107]?it?it.p(he,qe):(it=Tf(he),it.c(),it.m(D,Re)):it&&(it.d(1),it=null),he[70]?ut?ut.p(he,qe):(ut=Nf(he),ut.c(),ut.m(D,ee)):ut&&(ut.d(1),ut=null),he[99]?Xe?(Xe.p(he,qe),qe[3]&64&&fe(Xe,1)):(Xe=Rf(he),Xe.c(),fe(Xe,1),Xe.m(D,re)):Xe&&(ft(),be(Xe,1,1,()=>{Xe=null}),dt()),he[91]?mt?(mt.p(he,qe),qe[2]&536870912&&fe(mt,1)):(mt=Mf(he),mt.c(),fe(mt,1),mt.m(D,Ne)):mt&&(ft(),be(mt,1,1,()=>{mt=null}),dt()),he[13]?xe?(xe.p(he,qe),qe[0]&8192&&fe(xe,1)):(xe=Lf(he),xe.c(),fe(xe,1),xe.m(D,null)):xe&&(ft(),be(xe,1,1,()=>{xe=null}),dt())},i(he){Be||(fe(M),fe(j.$$.fragment,he),fe(q.$$.fragment,he),fe(te),fe(ke),fe($),fe(Xe),fe(mt),fe(xe),Be=!0)},o(he){be(M),be(j.$$.fragment,he),be(q.$$.fragment,he),be(te),be(ke),be($),be(Xe),be(mt),be(xe),Be=!1},d(he){he&&S(e),Je&&Je.d(),tt(Qe,he),Ce[R].d(),We(j),We(q),De&&De.d(),Pe[J].d(),ke&&ke.d(),$&&$.d(),we&&we.d(),ge&&ge.d(),Ie&&Ie.d(),it&&it.d(),ut&&ut.d(),Xe&&Xe.d(),mt&&mt.d(),xe&&xe.d(),ve=!1,Se(Ue)}}}function gw(n){var l;let e,t;return e=new Ev({props:{vaultPath:((l=n[10])==null?void 0:l.vaultPath)||"",onComplete:n[230]}}),{c(){Ge(e.$$.fragment)},m(i,o){He(e,i,o),t=!0},p(i,o){var c;const s={};o[0]&1024&&(s.vaultPath=((c=i[10])==null?void 0:c.vaultPath)||""),e.$set(s)},i(i){t||(fe(e.$$.fragment,i),t=!0)},o(i){be(e.$$.fragment,i),t=!1},d(i){We(e,i)}}}function _w(n){let e,t;return e=new vv({props:{onComplete:n[229]}}),{c(){Ge(e.$$.fragment)},m(l,i){He(e,l,i),t=!0},p:ie,i(l){t||(fe(e.$$.fragment,l),t=!0)},o(l){be(e.$$.fragment,l),t=!1},d(l){We(e,l)}}}function tu(n){let e,t,l;return{c(){e=f("div"),t=f("div"),l=F(n[98]),r(t,"class","capture-drop-box svelte-1uu9qhk"),r(e,"class","capture-drop-overlay svelte-1uu9qhk")},m(i,o){C(i,e,o),a(e,t),a(t,l)},p(i,o){o[3]&32&&Q(l,i[98])},d(i){i&&S(e)}}}function nu(n){let e,t;return{c(){e=f("span"),t=F(n[61]),r(e,"class","nav-badge svelte-1uu9qhk")},m(l,i){C(l,e,i),a(e,t)},p(l,i){i[1]&1073741824&&Q(t,l[61])},d(l){l&&S(e)}}}function lu(n){let e,t;return{c(){e=f("span"),t=F(n[75]),r(e,"class","nav-badge svelte-1uu9qhk")},m(l,i){C(l,e,i),a(e,t)},p(l,i){i[2]&8192&&Q(t,l[75])},d(l){l&&S(e)}}}function iu(n){let e,t=n[527].label+"",l,i,o,s,c,u,d,p=n[527].id==="journal"&&n[61]>0&&nu(n),h=n[527].id==="trash"&&n[75]>0&&lu(n);function m(){return n[233](n[527])}return{c(){e=f("button"),l=F(t),i=w(),p&&p.c(),o=w(),h&&h.c(),s=w(),r(e,"class",c="nav-item "+(n[1]===n[527].id?"selected":"")+" svelte-1uu9qhk")},m(g,b){C(g,e,b),a(e,l),a(e,i),p&&p.m(e,null),a(e,o),h&&h.m(e,null),a(e,s),u||(d=O(e,"click",m),u=!0)},p(g,b){n=g,b[0]&1&&t!==(t=n[527].label+"")&&Q(l,t),n[527].id==="journal"&&n[61]>0?p?p.p(n,b):(p=nu(n),p.c(),p.m(e,o)):p&&(p.d(1),p=null),n[527].id==="trash"&&n[75]>0?h?h.p(n,b):(h=lu(n),h.c(),h.m(e,s)):h&&(h.d(1),h=null),b[0]&3&&c!==(c="nav-item "+(n[1]===n[527].id?"selected":"")+" svelte-1uu9qhk")&&r(e,"class",c)},d(g){g&&S(e),p&&p.d(),h&&h.d(),u=!1,d()}}}function bw(n){let e;return{c(){e=f("div"),e.textContent=`${k("nav.noNodes")}`,r(e,"class","nav-empty svelte-1uu9qhk")},m(t,l){C(t,e,l)},p:ie,i:ie,o:ie,d(t){t&&S(e)}}}function kw(n){var s;let e,t,l,i,o;return t=new Wd({props:{nodes:n[14],expanded:n[90],selectedNodeId:((s=n[2])==null?void 0:s.id)||"",onSelect:n[125],onToggle:n[138],onContextMenu:n[136],onDrop:n[139]}}),{c(){e=f("div"),Ge(t.$$.fragment),r(e,"class","workspace-tree-area svelte-1uu9qhk"),r(e,"role","region"),r(e,"aria-label",k("nav.workspace")),ce(e,"drop-valid",n[95])},m(c,u){C(c,e,u),He(t,e,null),l=!0,i||(o=[O(e,"dragover",Wi(n[141])),O(e,"dragleave",n[142]),O(e,"drop",n[140])],i=!0)},p(c,u){var p;const d={};u[0]&16384&&(d.nodes=c[14]),u[2]&268435456&&(d.expanded=c[90]),u[0]&4&&(d.selectedNodeId=((p=c[2])==null?void 0:p.id)||""),t.$set(d),(!l||u[3]&4)&&ce(e,"drop-valid",c[95])},i(c){l||(fe(t.$$.fragment,c),l=!0)},o(c){be(t.$$.fragment,c),l=!1},d(c){c&&S(e),We(t),i=!1,Se(o)}}}function vw(n){let e,t,l,i=Tt("emptyTrash",14)+"",o,s=k("trash.emptyTrash")+"",c,u,d,p,h,m=n[76].length>0&&su(n);return{c(){m&&m.c(),e=w(),t=f("button"),l=new Di(!1),o=w(),c=F(s),u=w(),d=f("button"),d.textContent=`${k("trash.openFolder")}`,l.a=o,r(t,"class","btn btn-sm btn-danger svelte-1uu9qhk"),r(d,"class","btn btn-sm svelte-1uu9qhk")},m(g,b){m&&m.m(g,b),C(g,e,b),C(g,t,b),l.m(i,t),a(t,o),a(t,c),C(g,u,b),C(g,d,b),p||(h=[O(t,"click",n[177]),O(d,"click",n[238])],p=!0)},p(g,b){g[76].length>0?m?m.p(g,b):(m=su(g),m.c(),m.m(e.parentNode,e)):m&&(m.d(1),m=null)},d(g){g&&(S(e),S(t),S(u),S(d)),m&&m.d(g),p=!1,Se(h)}}}function ww(n){let e,t=(n[67]?k("common.loading"):k("inbox.pasteClipboard"))+"",l,i,o,s,c,u=n[68]&&ou(n);return{c(){e=f("button"),l=F(t),i=w(),u&&u.c(),o=_t(),r(e,"class","btn btn-primary svelte-1uu9qhk"),e.disabled=n[67]},m(d,p){C(d,e,p),a(e,l),C(d,i,p),u&&u.m(d,p),C(d,o,p),s||(c=O(e,"click",n[198]),s=!0)},p(d,p){p[2]&32&&t!==(t=(d[67]?k("common.loading"):k("inbox.pasteClipboard"))+"")&&Q(l,t),p[2]&32&&(e.disabled=d[67]),d[68]?u?u.p(d,p):(u=ou(d),u.c(),u.m(o.parentNode,o)):u&&(u.d(1),u=null)},d(d){d&&(S(e),S(i),S(o)),u&&u.d(d),s=!1,c()}}}function su(n){let e,t,l=Tt("restore",14)+"",i,o=k("trash.restore")+"",s,c,u=n[76].length+"",d,p,h,m,g,b=Tt("purge",14)+"",v,y=k("common.delete")+"",E,T,I=n[76].length+"",N,R,M,A;return{c(){e=f("button"),t=new Di(!1),i=w(),s=F(o),c=F(" ("),d=F(u),p=F(")"),h=w(),m=f("button"),g=new Di(!1),v=w(),E=F(y),T=F(" ("),N=F(I),R=F(")"),t.a=i,r(e,"class","btn btn-sm btn-primary svelte-1uu9qhk"),g.a=v,r(m,"class","btn btn-sm btn-danger svelte-1uu9qhk")},m(L,j){C(L,e,j),t.m(l,e),a(e,i),a(e,s),a(e,c),a(e,d),a(e,p),C(L,h,j),C(L,m,j),g.m(b,m),a(m,v),a(m,E),a(m,T),a(m,N),a(m,R),M||(A=[O(e,"click",n[236]),O(m,"click",n[237])],M=!0)},p(L,j){j[2]&16384&&u!==(u=L[76].length+"")&&Q(d,u),j[2]&16384&&I!==(I=L[76].length+"")&&Q(N,I)},d(L){L&&(S(e),S(h),S(m)),M=!1,Se(A)}}}function ou(n){let e,t;return{c(){e=f("span"),t=F(n[68]),r(e,"class","inbox-capture-status svelte-1uu9qhk")},m(l,i){C(l,e,i),a(e,t)},p(l,i){i[2]&64&&Q(t,l[68])},d(l){l&&S(e)}}}function yw(n){let e;function t(o,s){if(o[1]==="inbox")return ww;if(o[1]==="trash")return vw}let l=t(n),i=l&&l(n);return{c(){e=f("div"),i&&i.c(),r(e,"slot","actions"),r(e,"class","header-actions svelte-1uu9qhk")},m(o,s){C(o,e,s),i&&i.m(e,null)},p(o,s){l===(l=t(o))&&i?i.p(o,s):(i&&i.d(1),i=l&&l(o),i&&(i.c(),i.m(e,null)))},d(o){o&&S(e),i&&i.d()}}}function ru(n){let e,t=n[120](n[34])+"",l,i,o,s,c;return{c(){e=f("div"),l=F(t),i=w(),o=f("button"),o.innerHTML='<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" class="svelte-1uu9qhk"><line x1="18" y1="6" x2="6" y2="18" class="svelte-1uu9qhk"></line><line x1="6" y1="6" x2="18" y2="18" class="svelte-1uu9qhk"></line></svg>',r(o,"class","dismiss-btn svelte-1uu9qhk"),r(o,"aria-label","Dismiss"),r(e,"class","error-banner svelte-1uu9qhk"),r(e,"role","button"),r(e,"tabindex","0")},m(u,d){C(u,e,d),a(e,l),a(e,i),a(e,o),s||(c=[O(o,"click",Ve(n[239])),O(e,"click",n[240]),O(e,"keydown",function(){wl(Hn(n[241]))&&Hn(n[241]).apply(this,arguments)})],s=!0)},p(u,d){n=u,d[1]&8&&t!==(t=n[120](n[34])+"")&&Q(l,t)},d(u){u&&S(e),s=!1,Se(c)}}}function Ew(n){let e,t,l;function i(c,u){if(c[89])return Dw;if(c[0].length>0)return Ow;if(c[34])return Lw}let o=i(n),s=o&&o(n);return{c(){e=f("div"),t=f("h2"),t.textContent=`${k("welcome.title")}`,l=w(),s&&s.c(),r(t,"class","svelte-1uu9qhk"),r(e,"class","welcome svelte-1uu9qhk")},m(c,u){C(c,e,u),a(e,t),a(e,l),s&&s.m(e,null)},p(c,u){o===(o=i(c))&&s?s.p(c,u):(s&&s.d(1),s=o&&o(c),s&&(s.c(),s.m(e,null)))},i:ie,o:ie,d(c){c&&S(e),s&&s.d()}}}function Tw(n){let e,t;return e=new f2({props:{sectionId:n[1]}}),{c(){Ge(e.$$.fragment)},m(l,i){He(e,l,i),t=!0},p(l,i){const o={};i[0]&2&&(o.sectionId=l[1]),e.$set(o)},i(l){t||(fe(e.$$.fragment,l),t=!0)},o(l){be(e.$$.fragment,l),t=!1},d(l){We(e,l)}}}function Sw(n){let e;function t(o,s){return o[17].length===0?qw:Pw}let l=t(n),i=l(n);return{c(){e=f("div"),i.c(),r(e,"class","activity-feed svelte-1uu9qhk")},m(o,s){C(o,e,s),i.m(e,null)},p(o,s){l===(l=t(o))&&i?i.p(o,s):(i.d(1),i=l(o),i&&(i.c(),i.m(e,null)))},i:ie,o:ie,d(o){o&&S(e),i.d()}}}function Cw(n){let e,t,l,i;const o=[zw,jw],s=[];function c(u,d){return u[16]?0:1}return e=c(n),t=s[e]=o[e](n),{c(){t.c(),l=_t()},m(u,d){s[e].m(u,d),C(u,l,d),i=!0},p(u,d){let p=e;e=c(u),e===p?s[e].p(u,d):(ft(),be(s[p],1,1,()=>{s[p]=null}),dt(),t=s[e],t?t.p(u,d):(t=s[e]=o[e](u),t.c()),fe(t,1),t.m(l.parentNode,l))},i(u){i||(fe(t),i=!0)},o(u){be(t),i=!1},d(u){u&&S(l),s[e].d(u)}}}function Aw(n){let e,t,l,i=k("suggest.title")+"",o,s,c,u,d,p,h,m=n[61]>0&&uu(n);function g(y,E){return y[28]==="suggestions"?Fw:Bw}let b=g(n),v=b(n);return{c(){e=f("div"),t=f("div"),l=f("button"),o=F(i),s=w(),m&&m.c(),c=w(),u=f("button"),u.textContent=`${k("journal.worklogTab")}`,d=w(),v.c(),r(l,"class","journal-tab svelte-1uu9qhk"),ce(l,"active",n[28]==="suggestions"),r(u,"class","journal-tab svelte-1uu9qhk"),ce(u,"active",n[28]==="worklog"),r(t,"class","journal-tabs svelte-1uu9qhk"),r(e,"class","journal-screen svelte-1uu9qhk")},m(y,E){C(y,e,E),a(e,t),a(t,l),a(l,o),a(l,s),m&&m.m(l,null),a(t,c),a(t,u),a(e,d),v.m(e,null),p||(h=[O(l,"click",n[313]),O(u,"click",n[314])],p=!0)},p(y,E){y[61]>0?m?m.p(y,E):(m=uu(y),m.c(),m.m(l,null)):m&&(m.d(1),m=null),E[0]&268435456&&ce(l,"active",y[28]==="suggestions"),E[0]&268435456&&ce(u,"active",y[28]==="worklog"),b===(b=g(y))&&v?v.p(y,E):(v.d(1),v=b(y),v&&(v.c(),v.m(e,null)))},i:ie,o:ie,d(y){y&&S(e),m&&m.d(),v.d(),p=!1,Se(h)}}}function Nw(n){let e,t,l,i,o,s;function c(p,h){return!p[7]||(p[7].nodes||[]).length===0?ey:$w}let u=c(n),d=u(n);return{c(){e=f("div"),t=f("div"),l=f("div"),i=f("p"),o=F(n[78]),s=w(),d.c(),r(i,"class","svelte-1uu9qhk"),r(l,"class","svelte-1uu9qhk"),r(t,"class","trash-header svelte-1uu9qhk"),r(e,"class","trash-screen svelte-1uu9qhk")},m(p,h){C(p,e,h),a(e,t),a(t,l),a(l,i),a(i,o),a(e,s),d.m(e,null)},p(p,h){h[2]&65536&&Q(o,p[78]),u===(u=c(p))&&d?d.p(p,h):(d.d(1),d=u(p),d&&(d.c(),d.m(e,null)))},i:ie,o:ie,d(p){p&&S(e),d.d()}}}function Iw(n){let e,t,l,i,o,s,c,u,d=n[3].length>0&&Pu(n);function p(g,b){return g[3].length===0?sy:g[117]?iy:ly}let h=p(n),m=h(n);return{c(){e=f("div"),t=f("div"),l=f("div"),i=f("p"),i.textContent=`${k("inbox.subtitle")}`,o=w(),d&&d.c(),s=w(),m.c(),r(i,"class","svelte-1uu9qhk"),r(l,"class","svelte-1uu9qhk"),r(t,"class","inbox-header svelte-1uu9qhk"),r(e,"class","inbox-screen svelte-1uu9qhk"),r(e,"role","region"),r(e,"aria-label",k("nav.inbox")),ce(e,"drop-valid",n[96])},m(g,b){C(g,e,b),a(e,t),a(t,l),a(l,i),a(e,o),d&&d.m(e,null),a(e,s),m.m(e,null),c||(u=[O(e,"dragover",n[199]),O(e,"dragleave",n[200]),O(e,"drop",n[201])],c=!0)},p(g,b){g[3].length>0?d?d.p(g,b):(d=Pu(g),d.c(),d.m(e,s)):d&&(d.d(1),d=null),h===(h=p(g))&&m?m.p(g,b):(m.d(1),m=h(g),m&&(m.c(),m.m(e,null))),b[3]&8&&ce(e,"drop-valid",g[96])},i:ie,o:ie,d(g){g&&S(e),d&&d.d(),m.d(),c=!1,Se(u)}}}function Rw(n){let e,t,l,i,o,s,c=Te(n[122]),u=[];for(let m=0;m<c.length;m+=1)u[m]=Bu($c(n,c,m));const d=[yy,wy,vy,ky,by,_y,gy,my],p=[];function h(m,g){return m[35]==="overview"?0:m[35]==="notes"?1:m[35]==="files"?2:m[35]==="inbox"?3:m[35]==="links"?4:m[35]==="actions"?5:m[35]==="worklog"?6:m[35]==="activity"?7:-1}return~(i=h(n))&&(o=p[i]=d[i](n)),{c(){e=f("div");for(let m=0;m<u.length;m+=1)u[m].c();t=w(),l=f("div"),o&&o.c(),r(e,"class","tabs svelte-1uu9qhk"),r(l,"class","tab-content svelte-1uu9qhk")},m(m,g){C(m,e,g);for(let b=0;b<u.length;b+=1)u[b]&&u[b].m(e,null);C(m,t,g),C(m,l,g),~i&&p[i].m(l,null),s=!0},p(m,g){if(g[1]&16|g[3]&1610612736){c=Te(m[122]);let v;for(v=0;v<c.length;v+=1){const y=$c(m,c,v);u[v]?u[v].p(y,g):(u[v]=Bu(y),u[v].c(),u[v].m(e,null))}for(;v<u.length;v+=1)u[v].d(1);u.length=c.length}let b=i;i=h(m),i===b?~i&&p[i].p(m,g):(o&&(ft(),be(p[b],1,1,()=>{p[b]=null}),dt()),~i?(o=p[i],o?o.p(m,g):(o=p[i]=d[i](m),o.c()),fe(o,1),o.m(l,null)):o=null)},i(m){s||(fe(o),s=!0)},o(m){be(o),s=!1},d(m){m&&(S(e),S(t),S(l)),tt(u,m),~i&&p[i].d()}}}function Mw(n){let e,t,l,i,o,s,c,u,d,p,h,m;function g(E,T){return E[47]===E[37].id?Uy:Fy}let b=g(n),v=b(n),y={content:n[37].content,viewMode:n[40],placeholder:k("note.placeholder")};return d=new D2({props:y}),n[245](d),d.$on("content-change",n[161]),d.$on("mode-change",n[162]),d.$on("save",n[153]),d.$on("insert-link",n[163]),d.$on("insert-internal-link",n[164]),d.$on("verstak-link",n[160]),{c(){e=f("div"),t=f("div"),v.c(),l=w(),i=f("div"),o=f("button"),o.textContent=`${k("common.save")}`,s=w(),c=f("button"),c.textContent=`${k("common.close")}`,u=w(),Ge(d.$$.fragment),r(o,"class","btn btn-primary svelte-1uu9qhk"),r(c,"class","btn svelte-1uu9qhk"),r(i,"class","note-editor-actions svelte-1uu9qhk"),r(t,"class","note-editor-header svelte-1uu9qhk"),r(e,"class","note-editor-wrapper svelte-1uu9qhk")},m(E,T){C(E,e,T),a(e,t),v.m(t,null),a(t,l),a(t,i),a(i,o),a(i,s),a(i,c),a(e,u),He(d,e,null),p=!0,h||(m=[O(o,"click",n[153]),O(c,"click",n[152])],h=!0)},p(E,T){b===(b=g(E))&&v?v.p(E,T):(v.d(1),v=b(E),v&&(v.c(),v.m(t,l)));const I={};T[1]&64&&(I.content=E[37].content),T[1]&512&&(I.viewMode=E[40]),d.$set(I)},i(E){p||(fe(d.$$.fragment,E),p=!0)},o(E){be(d.$$.fragment,E),p=!1},d(E){E&&S(e),v.d(),n[245](null),We(d),h=!1,Se(m)}}}function Lw(n){let e,t=k("common.error")+"",l,i,o;return{c(){e=f("p"),l=F(t),i=w(),o=F(n[34]),r(e,"class","error-text svelte-1uu9qhk")},m(s,c){C(s,e,c),a(e,l),a(e,i),a(e,o)},p(s,c){c[1]&8&&Q(o,s[34])},d(s){s&&S(e)}}}function Ow(n){let e,t,l;return{c(){e=f("p"),e.textContent=`${k("welcome.selectSection")}`,t=w(),l=f("p"),l.textContent=`${k("welcome.createCase")}`,r(e,"class","svelte-1uu9qhk"),r(l,"class","hint svelte-1uu9qhk")},m(i,o){C(i,e,o),C(i,t,o),C(i,l,o)},p:ie,d(i){i&&(S(e),S(t),S(l))}}}function Dw(n){let e;return{c(){e=f("p"),e.textContent=`${k("common.loading")}`,r(e,"class","svelte-1uu9qhk")},m(t,l){C(t,e,l)},p:ie,d(t){t&&S(e)}}}function Pw(n){let e,t=Te(n[17]),l=[];for(let i=0;i<t.length;i+=1)l[i]=cu(Oc(n,t,i));return{c(){e=f("div");for(let i=0;i<l.length;i+=1)l[i].c();r(e,"class","activity-feed-events svelte-1uu9qhk")},m(i,o){C(i,e,o);for(let s=0;s<l.length;s+=1)l[s]&&l[s].m(e,null)},p(i,o){if(o[0]&131072|o[6]&256|o[7]&32){t=Te(i[17]);let s;for(s=0;s<t.length;s+=1){const c=Oc(i,t,s);l[s]?l[s].p(c,o):(l[s]=cu(c),l[s].c(),l[s].m(e,null))}for(;s<l.length;s+=1)l[s].d(1);l.length=t.length}},d(i){i&&S(e),tt(l,i)}}}function qw(n){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${k("activity.empty")}`,r(t,"class","svelte-1uu9qhk"),r(e,"class","empty-state svelte-1uu9qhk")},m(l,i){C(l,e,i),a(e,t)},p:ie,d(l){l&&S(e)}}}function au(n){let e,t=n[486].targetType+"",l;return{c(){e=f("span"),l=F(t),r(e,"class","activity-feed-target svelte-1uu9qhk")},m(i,o){C(i,e,o),a(e,l)},p(i,o){o[0]&131072&&t!==(t=i[486].targetType+"")&&Q(l,t)},d(i){i&&S(e)}}}function cu(n){let e,t,l=ai(n[486].eventType)+"",i,o,s,c,u=n[486].title+"",d,p,h,m,g=n[194](n[486].eventType)+"",b,v,y,E,T=Un(n[486].createdAt)+"",I,N,R=un(n[486].createdAt)+"",M,A,L,j,B=n[486].targetType&&au(n);function U(){return n[351](n[486])}function z(...W){return n[352](n[486],...W)}return{c(){e=f("div"),t=f("span"),i=F(l),o=w(),s=f("div"),c=f("span"),d=F(u),p=w(),h=f("div"),m=f("span"),b=F(g),v=w(),B&&B.c(),y=w(),E=f("span"),I=F(T),N=w(),M=F(R),A=w(),r(t,"class","activity-feed-icon svelte-1uu9qhk"),r(c,"class","activity-feed-title svelte-1uu9qhk"),r(m,"class","activity-feed-type svelte-1uu9qhk"),r(E,"class","activity-feed-time svelte-1uu9qhk"),r(h,"class","activity-feed-meta svelte-1uu9qhk"),r(s,"class","activity-feed-body svelte-1uu9qhk"),r(e,"class","activity-feed-event svelte-1uu9qhk"),r(e,"role","button"),r(e,"tabindex","0")},m(W,G){C(W,e,G),a(e,t),a(t,i),a(e,o),a(e,s),a(s,c),a(c,d),a(s,p),a(s,h),a(h,m),a(m,b),a(h,v),B&&B.m(h,null),a(h,y),a(h,E),a(E,I),a(E,N),a(E,M),a(e,A),L||(j=[O(e,"click",U),O(e,"keydown",z)],L=!0)},p(W,G){n=W,G[0]&131072&&l!==(l=ai(n[486].eventType)+"")&&Q(i,l),G[0]&131072&&u!==(u=n[486].title+"")&&Q(d,u),G[0]&131072&&g!==(g=n[194](n[486].eventType)+"")&&Q(b,g),n[486].targetType?B?B.p(n,G):(B=au(n),B.c(),B.m(h,y)):B&&(B.d(1),B=null),G[0]&131072&&T!==(T=Un(n[486].createdAt)+"")&&Q(I,T),G[0]&131072&&R!==(R=un(n[486].createdAt)+"")&&Q(M,R)},d(W){W&&S(e),B&&B.d(),L=!1,Se(j)}}}function jw(n){let e,t,l,i;return{c(){e=f("div"),t=f("p"),t.textContent=`${k("today.empty")}`,l=w(),i=f("p"),i.textContent=`${k("today.emptyHint")}`,r(t,"class","svelte-1uu9qhk"),r(i,"class","hint svelte-1uu9qhk"),r(e,"class","today-empty svelte-1uu9qhk")},m(o,s){C(o,e,s),a(e,t),a(e,l),a(e,i)},p:ie,i:ie,o:ie,d(o){o&&S(e)}}}function zw(n){let e,t;return e=new s2({props:{todayDashboard:n[16],suggestions:n[60],inProgressItems:n[62],todayCaptures:n[63],suggestionCount:n[60].length,formatTime:un,eventLabel:n[194],eventIcon:ai,inboxMetaText:n[197],onOpenNodeById:n[342],onOpenActivityEvent:n[343],onOpenActivityTarget:n[344],onOpenSuggestionWorklog:n[345],onAcceptSuggestion:n[346],onDeleteSuggestion:n[347],onOpenNodeFolder:n[348],onOpenInboxArtifact:n[349],onOpenTrashNode:n[350],browserEvents:n[64],browserLoading:n[65],onBrowserAccept:n[181],onBrowserDismiss:n[182],onBrowserAttach:n[183],onBrowserRefresh:n[180]}}),{c(){Ge(e.$$.fragment)},m(l,i){He(e,l,i),t=!0},p(l,i){const o={};i[0]&65536&&(o.todayDashboard=l[16]),i[1]&536870912&&(o.suggestions=l[60]),i[2]&1&&(o.inProgressItems=l[62]),i[2]&2&&(o.todayCaptures=l[63]),i[1]&536870912&&(o.suggestionCount=l[60].length),i[2]&4&&(o.browserEvents=l[64]),i[2]&8&&(o.browserLoading=l[65]),e.$set(o)},i(l){t||(fe(e.$$.fragment,l),t=!0)},o(l){be(e.$$.fragment,l),t=!1},d(l){We(e,l)}}}function uu(n){let e,t;return{c(){e=f("span"),t=F(n[61]),r(e,"class","tab-badge svelte-1uu9qhk")},m(l,i){C(l,e,i),a(e,t)},p(l,i){i[1]&1073741824&&Q(t,l[61])},d(l){l&&S(e)}}}function Bw(n){let e,t,l,i,o,s,c,u,d,p,h,m,g,b,v,y,E,T,I,N,R,M,A,L,j,B,U,z,W,G,X,H,D,q,P,Y,Z,J,te,ne,le,me,oe,ze,Ye,Re,ee,re,Ne,Be,ve,Ue,Je,Ae,Qe,Fe,Ce=n[19]&&fu(n),Ke=n[27]&&gu(n);function De(ge,Ie){return ge[26]?Hw:Uw}let Ze=De(n),Pe=Ze(n),ue=n[23]&&ku(n);function ke(ge,Ie){return ge[18].length===0?Gw:Ww}let $=ke(n),we=$(n);return{c(){Ce&&Ce.c(),e=w(),t=f("div"),l=f("div"),i=f("div"),i.textContent=`${k("journal.exportHeading")}`,o=w(),s=f("div"),c=f("button"),c.textContent=`${k("journal.exportCSV")}`,u=w(),d=f("button"),d.textContent=`${k("journal.exportMarkdown")}`,p=w(),h=f("button"),h.textContent="PDF",m=w(),Ke&&Ke.c(),g=w(),b=f("div"),v=f("div"),v.textContent=`${k("journal.filterHeading")}`,y=w(),E=f("div"),T=f("label"),I=f("span"),I.textContent=`${k("journal.dateFrom")}`,N=w(),R=f("input"),M=w(),A=f("label"),L=f("span"),L.textContent=`${k("journal.dateTo")}`,j=w(),B=f("input"),U=w(),z=f("label"),W=f("span"),W.textContent=`${k("journal.node")}`,G=w(),X=f("div"),Pe.c(),H=w(),ue&&ue.c(),D=w(),q=f("label"),P=f("span"),P.textContent=`${k("journal.billable")}`,Y=w(),Z=f("select"),J=f("option"),J.textContent=`${k("common.all")}`,te=f("option"),te.textContent=`${k("journal.billableYes")}`,ne=f("option"),ne.textContent=`${k("journal.billableNo")}`,le=w(),me=f("label"),oe=f("span"),oe.textContent=`${k("journal.approx")}`,ze=w(),Ye=f("select"),Re=f("option"),Re.textContent=`${k("common.all")}`,ee=f("option"),ee.textContent=`${k("journal.approxExact")}`,re=f("option"),re.textContent=`${k("journal.approxEstimated")}`,Ne=w(),Be=f("button"),Be.textContent=`${k("journal.filter")}`,ve=w(),Ue=f("button"),Ue.textContent=`${k("journal.reset")}`,Je=w(),we.c(),Ae=_t(),r(i,"class","journal-export-heading svelte-1uu9qhk"),r(c,"class","btn btn-sm svelte-1uu9qhk"),r(d,"class","btn btn-sm svelte-1uu9qhk"),r(h,"class","btn btn-sm svelte-1uu9qhk"),r(s,"class","journal-export-row svelte-1uu9qhk"),r(l,"class","journal-export-section svelte-1uu9qhk"),r(v,"class","journal-filter-heading svelte-1uu9qhk"),r(I,"class","label-text svelte-1uu9qhk"),r(R,"type","date"),r(R,"class","svelte-1uu9qhk"),r(T,"class","svelte-1uu9qhk"),r(L,"class","label-text svelte-1uu9qhk"),r(B,"type","date"),r(B,"class","svelte-1uu9qhk"),r(A,"class","svelte-1uu9qhk"),r(W,"class","label-text svelte-1uu9qhk"),r(X,"class","journal-node-picker svelte-1uu9qhk"),an(X,"position","relative"),r(z,"class","svelte-1uu9qhk"),r(P,"class","label-text svelte-1uu9qhk"),J.__value="all",Me(J,J.__value),r(J,"class","svelte-1uu9qhk"),te.__value="yes",Me(te,te.__value),r(te,"class","svelte-1uu9qhk"),ne.__value="no",Me(ne,ne.__value),r(ne,"class","svelte-1uu9qhk"),r(Z,"class","svelte-1uu9qhk"),n[24]===void 0&&yl(()=>n[334].call(Z)),r(q,"title",k("journal.billableHint")),r(q,"class","svelte-1uu9qhk"),r(oe,"class","label-text svelte-1uu9qhk"),Re.__value="all",Me(Re,Re.__value),r(Re,"class","svelte-1uu9qhk"),ee.__value="no",Me(ee,ee.__value),r(ee,"class","svelte-1uu9qhk"),re.__value="yes",Me(re,re.__value),r(re,"class","svelte-1uu9qhk"),r(Ye,"class","svelte-1uu9qhk"),n[25]===void 0&&yl(()=>n[335].call(Ye)),r(me,"title",k("journal.approxHint")),r(me,"class","svelte-1uu9qhk"),r(Be,"class","btn btn-sm svelte-1uu9qhk"),r(Ue,"class","btn btn-sm svelte-1uu9qhk"),r(E,"class","journal-filters-row svelte-1uu9qhk"),r(b,"class","journal-filter-section svelte-1uu9qhk"),r(t,"class","journal-header svelte-1uu9qhk")},m(ge,Ie){Ce&&Ce.m(ge,Ie),C(ge,e,Ie),C(ge,t,Ie),a(t,l),a(l,i),a(l,o),a(l,s),a(s,c),a(s,u),a(s,d),a(s,p),a(s,h),a(s,m),Ke&&Ke.m(s,null),a(t,g),a(t,b),a(b,v),a(b,y),a(b,E),a(E,T),a(T,I),a(T,N),a(T,R),Me(R,n[20]),a(E,M),a(E,A),a(A,L),a(A,j),a(A,B),Me(B,n[21]),a(E,U),a(E,z),a(z,W),a(z,G),a(z,X),Pe.m(X,null),a(E,H),ue&&ue.m(E,null),a(E,D),a(E,q),a(q,P),a(q,Y),a(q,Z),a(Z,J),a(Z,te),a(Z,ne),xn(Z,n[24],!0),a(E,le),a(E,me),a(me,oe),a(me,ze),a(me,Ye),a(Ye,Re),a(Ye,ee),a(Ye,re),xn(Ye,n[25],!0),a(E,Ne),a(E,Be),a(E,ve),a(E,Ue),C(ge,Je,Ie),we.m(ge,Ie),C(ge,Ae,Ie),Qe||(Fe=[O(c,"click",n[324]),O(d,"click",n[325]),O(h,"click",n[326]),O(R,"input",n[327]),O(B,"input",n[328]),O(Z,"change",n[334]),O(Ye,"change",n[335]),O(Be,"click",n[186]),O(Ue,"click",n[193])],Qe=!0)},p(ge,Ie){ge[19]?Ce?Ce.p(ge,Ie):(Ce=fu(ge),Ce.c(),Ce.m(e.parentNode,e)):Ce&&(Ce.d(1),Ce=null),ge[27]?Ke?Ke.p(ge,Ie):(Ke=gu(ge),Ke.c(),Ke.m(s,null)):Ke&&(Ke.d(1),Ke=null),Ie[0]&1048576&&Me(R,ge[20]),Ie[0]&2097152&&Me(B,ge[21]),Ze===(Ze=De(ge))&&Pe?Pe.p(ge,Ie):(Pe.d(1),Pe=Ze(ge),Pe&&(Pe.c(),Pe.m(X,null))),ge[23]?ue?ue.p(ge,Ie):(ue=ku(ge),ue.c(),ue.m(E,D)):ue&&(ue.d(1),ue=null),Ie[0]&16777216&&xn(Z,ge[24]),Ie[0]&33554432&&xn(Ye,ge[25]),$===($=ke(ge))&&we?we.p(ge,Ie):(we.d(1),we=$(ge),we&&(we.c(),we.m(Ae.parentNode,Ae)))},d(ge){ge&&(S(e),S(t),S(Je),S(Ae)),Ce&&Ce.d(ge),Ke&&Ke.d(),Pe.d(),ue&&ue.d(),we.d(ge),Qe=!1,Se(Fe)}}}function Fw(n){let e;function t(o,s){return o[60].length===0?xw:Qw}let l=t(n),i=l(n);return{c(){i.c(),e=_t()},m(o,s){i.m(o,s),C(o,e,s)},p(o,s){l===(l=t(o))&&i?i.p(o,s):(i.d(1),i=l(o),i&&(i.c(),i.m(e.parentNode,e)))},d(o){o&&S(e),i.d(o)}}}function fu(n){let e,t,l=k("journal.total")+"",i,o,s=Math.floor(n[19].totalMinutes/60)+"",c,u,d=n[19].totalMinutes%60+"",p,h,m=n[19].totalEntries+"",g,b,v=k("worklog.min")+"",y,E,T,I,N=n[19].byDay&&n[19].byDay.length>0&&du(n),R=n[19].byNode&&n[19].byNode.length>0&&hu(n);return{c(){e=f("div"),t=f("div"),i=F(l),o=F(": "),c=F(s),u=F("ч "),p=F(d),h=F("м ("),g=F(m),b=w(),y=F(v),E=F(")"),T=w(),N&&N.c(),I=w(),R&&R.c(),r(t,"class","summary-total svelte-1uu9qhk"),r(e,"class","journal-summary svelte-1uu9qhk")},m(M,A){C(M,e,A),a(e,t),a(t,i),a(t,o),a(t,c),a(t,u),a(t,p),a(t,h),a(t,g),a(t,b),a(t,y),a(t,E),a(e,T),N&&N.m(e,null),a(e,I),R&&R.m(e,null)},p(M,A){A[0]&524288&&s!==(s=Math.floor(M[19].totalMinutes/60)+"")&&Q(c,s),A[0]&524288&&d!==(d=M[19].totalMinutes%60+"")&&Q(p,d),A[0]&524288&&m!==(m=M[19].totalEntries+"")&&Q(g,m),M[19].byDay&&M[19].byDay.length>0?N?N.p(M,A):(N=du(M),N.c(),N.m(e,I)):N&&(N.d(1),N=null),M[19].byNode&&M[19].byNode.length>0?R?R.p(M,A):(R=hu(M),R.c(),R.m(e,null)):R&&(R.d(1),R=null)},d(M){M&&S(e),N&&N.d(),R&&R.d()}}}function du(n){let e,t,l,i=Te(n[19].byDay),o=[];for(let s=0;s<i.length;s+=1)o[s]=pu(zc(n,i,s));return{c(){e=f("div"),t=f("div"),t.textContent=`${k("journal.byDay")}`,l=w();for(let s=0;s<o.length;s+=1)o[s].c();r(t,"class","summary-label svelte-1uu9qhk"),r(e,"class","summary-section svelte-1uu9qhk")},m(s,c){C(s,e,c),a(e,t),a(e,l);for(let u=0;u<o.length;u+=1)o[u]&&o[u].m(e,null)},p(s,c){if(c[0]&524288){i=Te(s[19].byDay);let u;for(u=0;u<i.length;u+=1){const d=zc(s,i,u);o[u]?o[u].p(d,c):(o[u]=pu(d),o[u].c(),o[u].m(e,null))}for(;u<o.length;u+=1)o[u].d(1);o.length=i.length}},d(s){s&&S(e),tt(o,s)}}}function pu(n){let e,t,l=n[520].label+"",i,o,s=Math.floor(n[520].minutes/60)+"",c,u,d=n[520].minutes%60+"",p,h,m,g=n[520].count+"",b;return{c(){e=f("div"),t=f("span"),i=F(l),o=f("span"),c=F(s),u=F("ч "),p=F(d),h=F("м"),m=f("span"),b=F(g),r(t,"class","svelte-1uu9qhk"),r(o,"class","svelte-1uu9qhk"),r(m,"class","summary-count svelte-1uu9qhk"),r(e,"class","summary-row svelte-1uu9qhk")},m(v,y){C(v,e,y),a(e,t),a(t,i),a(e,o),a(o,c),a(o,u),a(o,p),a(o,h),a(e,m),a(m,b)},p(v,y){y[0]&524288&&l!==(l=v[520].label+"")&&Q(i,l),y[0]&524288&&s!==(s=Math.floor(v[520].minutes/60)+"")&&Q(c,s),y[0]&524288&&d!==(d=v[520].minutes%60+"")&&Q(p,d),y[0]&524288&&g!==(g=v[520].count+"")&&Q(b,g)},d(v){v&&S(e)}}}function hu(n){let e,t,l,i=Te(n[19].byNode),o=[];for(let s=0;s<i.length;s+=1)o[s]=mu(jc(n,i,s));return{c(){e=f("div"),t=f("div"),t.textContent=`${k("journal.byNode")}`,l=w();for(let s=0;s<o.length;s+=1)o[s].c();r(t,"class","summary-label svelte-1uu9qhk"),r(e,"class","summary-section svelte-1uu9qhk")},m(s,c){C(s,e,c),a(e,t),a(e,l);for(let u=0;u<o.length;u+=1)o[u]&&o[u].m(e,null)},p(s,c){if(c[0]&524288){i=Te(s[19].byNode);let u;for(u=0;u<i.length;u+=1){const d=jc(s,i,u);o[u]?o[u].p(d,c):(o[u]=mu(d),o[u].c(),o[u].m(e,null))}for(;u<o.length;u+=1)o[u].d(1);o.length=i.length}},d(s){s&&S(e),tt(o,s)}}}function mu(n){let e,t,l=n[520].label+"",i,o,s=Math.floor(n[520].minutes/60)+"",c,u,d=n[520].minutes%60+"",p,h,m,g=n[520].count+"",b;return{c(){e=f("div"),t=f("span"),i=F(l),o=f("span"),c=F(s),u=F("ч "),p=F(d),h=F("м"),m=f("span"),b=F(g),r(t,"class","svelte-1uu9qhk"),r(o,"class","svelte-1uu9qhk"),r(m,"class","summary-count svelte-1uu9qhk"),r(e,"class","summary-row svelte-1uu9qhk")},m(v,y){C(v,e,y),a(e,t),a(t,i),a(e,o),a(o,c),a(o,u),a(o,p),a(o,h),a(e,m),a(m,b)},p(v,y){y[0]&524288&&l!==(l=v[520].label+"")&&Q(i,l),y[0]&524288&&s!==(s=Math.floor(v[520].minutes/60)+"")&&Q(c,s),y[0]&524288&&d!==(d=v[520].minutes%60+"")&&Q(p,d),y[0]&524288&&g!==(g=v[520].count+"")&&Q(b,g)},d(v){v&&S(e)}}}function gu(n){let e,t;return{c(){e=f("span"),t=F(n[27]),r(e,"class","journal-status-msg svelte-1uu9qhk")},m(l,i){C(l,e,i),a(e,t)},p(l,i){i[0]&134217728&&Q(t,l[27])},d(l){l&&S(e)}}}function Uw(n){let e,t,l,i,o,s=n[31]&&_u(n);return{c(){e=f("input"),t=w(),s&&s.c(),l=_t(),r(e,"type","text"),r(e,"placeholder",k("journal.nodeSearch")),r(e,"class","svelte-1uu9qhk")},m(c,u){C(c,e,u),Me(e,n[29]),C(c,t,u),s&&s.m(c,u),C(c,l,u),i||(o=[O(e,"input",n[330]),O(e,"input",n[190]),O(e,"blur",n[331])],i=!0)},p(c,u){u[0]&536870912&&e.value!==c[29]&&Me(e,c[29]),c[31]?s?s.p(c,u):(s=_u(c),s.c(),s.m(l.parentNode,l)):s&&(s.d(1),s=null)},d(c){c&&(S(e),S(t),S(l)),s&&s.d(c),i=!1,Se(o)}}}function Hw(n){let e,t,l,i,o,s;return{c(){e=f("button"),t=F(n[26]),l=w(),i=f("span"),i.textContent="✕",r(i,"class","journal-node-clear svelte-1uu9qhk"),r(e,"class","journal-selected-node svelte-1uu9qhk")},m(c,u){C(c,e,u),a(e,t),a(e,l),a(e,i),o||(s=O(e,"click",n[329]),o=!0)},p(c,u){u[0]&67108864&&Q(t,c[26])},d(c){c&&S(e),o=!1,s()}}}function _u(n){let e,t=Te(n[30]),l=[];for(let i=0;i<t.length;i+=1)l[i]=bu(qc(n,t,i));return{c(){e=f("div");for(let i=0;i<l.length;i+=1)l[i].c();r(e,"class","journal-search-dropdown svelte-1uu9qhk")},m(i,o){C(i,e,o);for(let s=0;s<l.length;s+=1)l[s]&&l[s].m(e,null)},p(i,o){if(o[0]&1073741824|o[6]&32){t=Te(i[30]);let s;for(s=0;s<t.length;s+=1){const c=qc(i,t,s);l[s]?l[s].p(c,o):(l[s]=bu(c),l[s].c(),l[s].m(e,null))}for(;s<l.length;s+=1)l[s].d(1);l.length=t.length}},d(i){i&&S(e),tt(l,i)}}}function bu(n){let e,t,l=n[513].title+"",i,o,s,c=n[513].path+"",u,d,p,h;function m(){return n[332](n[513])}return{c(){e=f("button"),t=f("span"),i=F(l),o=w(),s=f("span"),u=F(c),d=w(),r(t,"class","journal-search-title svelte-1uu9qhk"),r(s,"class","journal-search-path svelte-1uu9qhk"),r(e,"class","journal-search-item svelte-1uu9qhk")},m(g,b){C(g,e,b),a(e,t),a(t,i),a(e,o),a(e,s),a(s,u),a(e,d),p||(h=O(e,"click",m),p=!0)},p(g,b){n=g,b[0]&1073741824&&l!==(l=n[513].title+"")&&Q(i,l),b[0]&1073741824&&c!==(c=n[513].path+"")&&Q(u,c)},d(g){g&&S(e),p=!1,h()}}}function ku(n){let e,t,l,i,o,s;return{c(){e=f("label"),t=f("input"),l=w(),i=f("span"),i.textContent=`${k("journal.includeChildren")}`,r(t,"type","checkbox"),r(t,"class","journal-include-chk svelte-1uu9qhk"),r(i,"class","svelte-1uu9qhk"),r(e,"class","checkbox-label svelte-1uu9qhk")},m(c,u){C(c,e,u),a(e,t),t.checked=n[22],a(e,l),a(e,i),o||(s=O(t,"change",n[333]),o=!0)},p(c,u){u[0]&4194304&&(t.checked=c[22])},d(c){c&&S(e),o=!1,s()}}}function Ww(n){let e,t,l,i,o,s,c,u,d,p,h,m,g,b,v,y,E,T,I,N,R,M=Te(n[18]),A=[];for(let L=0;L<M.length;L+=1)A[L]=Cu(Dc(n,M,L));return{c(){e=f("div"),t=f("table"),l=f("thead"),i=f("tr"),o=f("th"),s=w(),c=f("th"),c.textContent=`${k("journal.title")}`,u=w(),d=f("th"),d.textContent=`${k("journal.node")}`,p=w(),h=f("th"),h.textContent=`${k("journal.path")}`,m=w(),g=f("th"),g.textContent=`${k("worklog.minutes")}`,b=w(),v=f("th"),v.textContent=`${k("journal.billable")}`,y=w(),E=f("th"),E.textContent=`${k("journal.approx")}`,T=w(),I=f("th"),I.textContent=`${k("common.date")}`,N=w(),R=f("tbody");for(let L=0;L<A.length;L+=1)A[L].c();r(o,"class","journal-toggle-col svelte-1uu9qhk"),r(c,"class","svelte-1uu9qhk"),r(d,"class","svelte-1uu9qhk"),r(h,"class","svelte-1uu9qhk"),r(g,"class","svelte-1uu9qhk"),r(v,"class","svelte-1uu9qhk"),r(E,"class","svelte-1uu9qhk"),r(I,"class","svelte-1uu9qhk"),r(i,"class","svelte-1uu9qhk"),r(l,"class","svelte-1uu9qhk"),r(R,"class","svelte-1uu9qhk"),r(t,"class","journal-table svelte-1uu9qhk"),r(e,"class","journal-table-wrap svelte-1uu9qhk")},m(L,j){C(L,e,j),a(e,t),a(t,l),a(l,i),a(i,o),a(i,s),a(i,c),a(i,u),a(i,d),a(i,p),a(i,h),a(i,m),a(i,g),a(i,b),a(i,v),a(i,y),a(i,E),a(i,T),a(i,I),a(t,N),a(t,R);for(let B=0;B<A.length;B+=1)A[B]&&A[B].m(R,null)},p(L,j){if(j[0]&262144|j[5]&9216|j[6]&260|j[7]&24){M=Te(L[18]);let B;for(B=0;B<M.length;B+=1){const U=Dc(L,M,B);A[B]?A[B].p(U,j):(A[B]=Cu(U),A[B].c(),A[B].m(R,null))}for(;B<A.length;B+=1)A[B].d(1);A.length=M.length}},d(L){L&&S(e),tt(A,L)}}}function Gw(n){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${k("journal.empty")}`,r(t,"class","svelte-1uu9qhk"),r(e,"class","empty-state svelte-1uu9qhk")},m(l,i){C(l,e,i),a(e,t)},p:ie,d(l){l&&S(e)}}}function vu(n){let e;return{c(){e=F("✓")},m(t,l){C(t,e,l)},d(t){t&&S(e)}}}function wu(n){let e;return{c(){e=F("~")},m(t,l){C(t,e,l)},d(t){t&&S(e)}}}function yu(n){let e,t,l,i,o,s,c,u,d,p,h,m,g,b,v,y;function E(){return n[339](n[513])}function T(){return n[340](n[513])}let I=n[513].details&&Eu(n);function N(L,j){return L[513].source==="manual"?Jw:L[513].source==="suggestion"&&L[513]._events&&L[513]._events.length>0?Xw:L[513].source==="suggestion"?Yw:L[513].source==="unknown"||L[513].source==="imported"?Zw:L[513]._hasEvents?Vw:Kw}let R=N(n),M=R(n),A=n[513]._events&&Tu(n);return{c(){e=f("tr"),t=f("td"),l=f("div"),i=f("div"),o=f("button"),o.textContent=`${k("worklog.editEntry")}`,s=w(),c=f("button"),c.textContent=`${k("worklog.deleteEntry")}`,u=w(),I&&I.c(),d=w(),p=f("div"),h=f("span"),h.textContent=`${k("worklog.source")}`,m=w(),M.c(),g=w(),A&&A.c(),b=w(),r(o,"class","btn btn-sm svelte-1uu9qhk"),r(c,"class","btn btn-sm btn-danger svelte-1uu9qhk"),r(i,"class","journal-detail-actions svelte-1uu9qhk"),r(h,"class","journal-detail-label svelte-1uu9qhk"),r(p,"class","journal-detail-section svelte-1uu9qhk"),r(l,"class","journal-detail-body svelte-1uu9qhk"),r(t,"colspan","8"),r(t,"class","svelte-1uu9qhk"),r(e,"class","journal-row-detail svelte-1uu9qhk")},m(L,j){C(L,e,j),a(e,t),a(t,l),a(l,i),a(i,o),a(i,s),a(i,c),a(l,u),I&&I.m(l,null),a(l,d),a(l,p),a(p,h),a(p,m),M.m(p,null),a(l,g),A&&A.m(l,null),a(e,b),v||(y=[O(o,"click",Ve(E)),O(c,"click",Ve(T))],v=!0)},p(L,j){n=L,n[513].details?I?I.p(n,j):(I=Eu(n),I.c(),I.m(l,d)):I&&(I.d(1),I=null),R!==(R=N(n))&&(M.d(1),M=R(n),M&&(M.c(),M.m(p,null))),n[513]._events?A?A.p(n,j):(A=Tu(n),A.c(),A.m(l,null)):A&&(A.d(1),A=null)},d(L){L&&S(e),I&&I.d(),M.d(),A&&A.d(),v=!1,Se(y)}}}function Eu(n){let e,t,l,i,o=n[513].details+"",s;return{c(){e=f("div"),t=f("span"),t.textContent=`${k("worklog.details")}`,l=w(),i=f("p"),s=F(o),r(t,"class","journal-detail-label svelte-1uu9qhk"),r(i,"class","svelte-1uu9qhk"),r(e,"class","journal-detail-section svelte-1uu9qhk")},m(c,u){C(c,e,u),a(e,t),a(e,l),a(e,i),a(i,s)},p(c,u){u[0]&262144&&o!==(o=c[513].details+"")&&Q(s,o)},d(c){c&&S(e)}}}function Kw(n){let e;return{c(){e=f("p"),e.textContent=`${k("worklog.sourceUnknown")}`,r(e,"class","svelte-1uu9qhk")},m(t,l){C(t,e,l)},d(t){t&&S(e)}}}function Vw(n){let e;return{c(){e=f("p"),e.textContent=`${k("worklog.sourceSuggestion")}`,r(e,"class","svelte-1uu9qhk")},m(t,l){C(t,e,l)},d(t){t&&S(e)}}}function Zw(n){let e;return{c(){e=f("p"),e.textContent=`${k("worklog.sourceUnknown")}`,r(e,"class","svelte-1uu9qhk")},m(t,l){C(t,e,l)},d(t){t&&S(e)}}}function Yw(n){let e;return{c(){e=f("p"),e.textContent=`${k("worklog.sourceSuggestionNoEvents")}`,r(e,"class","svelte-1uu9qhk")},m(t,l){C(t,e,l)},d(t){t&&S(e)}}}function Xw(n){let e;return{c(){e=f("p"),e.textContent=`${k("worklog.sourceSuggestion")}`,r(e,"class","svelte-1uu9qhk")},m(t,l){C(t,e,l)},d(t){t&&S(e)}}}function Jw(n){let e;return{c(){e=f("p"),e.textContent=`${k("worklog.sourceManual")}`,r(e,"class","svelte-1uu9qhk")},m(t,l){C(t,e,l)},d(t){t&&S(e)}}}function Tu(n){let e,t,l,i=Te(n[513]._events),o=[];for(let s=0;s<i.length;s+=1)o[s]=Su(Pc(n,i,s));return{c(){e=f("div"),t=f("span"),t.textContent=`${k("journal.relatedEvents")}`,l=w();for(let s=0;s<o.length;s+=1)o[s].c();r(t,"class","journal-detail-label svelte-1uu9qhk"),r(e,"class","journal-detail-section svelte-1uu9qhk")},m(s,c){C(s,e,c),a(e,t),a(e,l);for(let u=0;u<o.length;u+=1)o[u]&&o[u].m(e,null)},p(s,c){if(c[0]&262144|c[6]&256|c[7]&16){i=Te(s[513]._events);let u;for(u=0;u<i.length;u+=1){const d=Pc(s,i,u);o[u]?o[u].p(d,c):(o[u]=Su(d),o[u].c(),o[u].m(e,null))}for(;u<o.length;u+=1)o[u].d(1);o.length=i.length}},d(s){s&&S(e),tt(o,s)}}}function Su(n){let e,t,l=un(n[486].createdAt)+"",i,o,s,c=n[194](n[486].eventType)+"",u,d,p,h=n[486].title+"",m,g,b,v,y,E;function T(){return n[341](n[486])}return{c(){e=f("div"),t=f("span"),i=F(l),o=w(),s=f("span"),u=F(c),d=w(),p=f("span"),m=F(h),g=w(),b=f("button"),b.textContent=`${k("common.open")}`,v=w(),r(t,"class","journal-event-time svelte-1uu9qhk"),r(s,"class","journal-event-type svelte-1uu9qhk"),r(p,"class","journal-event-title svelte-1uu9qhk"),r(b,"class","link-btn svelte-1uu9qhk"),r(e,"class","journal-event-row svelte-1uu9qhk")},m(I,N){C(I,e,N),a(e,t),a(t,i),a(e,o),a(e,s),a(s,u),a(e,d),a(e,p),a(p,m),a(e,g),a(e,b),a(e,v),y||(E=O(b,"click",T),y=!0)},p(I,N){n=I,N[0]&262144&&l!==(l=un(n[486].createdAt)+"")&&Q(i,l),N[0]&262144&&c!==(c=n[194](n[486].eventType)+"")&&Q(u,c),N[0]&262144&&h!==(h=n[486].title+"")&&Q(m,h)},d(I){I&&S(e),y=!1,E()}}}function Cu(n){let e,t,l,i=n[513]._expanded?"▾":"▸",o,s,c,u=n[513].summary+"",d,p,h,m,g=n[513].nodeTitle+"",b,v,y,E=n[513].nodePath+"",T,I,N,R=n[513].minutes+"",M,A,L,j,B,U,z,W=n[513].date+"",G,X,H,D,q;function P(){return n[336](n[513])}let Y=n[513].billable&&vu(),Z=n[513].approximate&&wu();function J(){return n[337](n[513])}function te(...le){return n[338](n[513],...le)}let ne=n[513]._expanded&&yu(n);return{c(){e=f("tr"),t=f("td"),l=f("span"),o=F(i),s=w(),c=f("td"),d=F(u),p=w(),h=f("td"),m=f("button"),b=F(g),v=w(),y=f("td"),T=F(E),I=w(),N=f("td"),M=F(R),A=w(),L=f("td"),Y&&Y.c(),j=w(),B=f("td"),Z&&Z.c(),U=w(),z=f("td"),G=F(W),X=w(),ne&&ne.c(),H=_t(),r(l,"class","journal-toggle-icon svelte-1uu9qhk"),r(t,"class","journal-toggle-col svelte-1uu9qhk"),r(c,"class","journal-summary-cell svelte-1uu9qhk"),r(m,"class","link-btn svelte-1uu9qhk"),r(h,"class","svelte-1uu9qhk"),r(y,"class","journal-path-cell svelte-1uu9qhk"),r(N,"class","journal-min-cell svelte-1uu9qhk"),r(L,"class","journal-bool-cell svelte-1uu9qhk"),r(B,"class","journal-bool-cell svelte-1uu9qhk"),r(z,"class","journal-date-cell svelte-1uu9qhk"),r(e,"class","journal-row svelte-1uu9qhk"),r(e,"role","button"),r(e,"tabindex","0"),ce(e,"expanded",n[513]._expanded)},m(le,me){C(le,e,me),a(e,t),a(t,l),a(l,o),a(e,s),a(e,c),a(c,d),a(e,p),a(e,h),a(h,m),a(m,b),a(e,v),a(e,y),a(y,T),a(e,I),a(e,N),a(N,M),a(e,A),a(e,L),Y&&Y.m(L,null),a(e,j),a(e,B),Z&&Z.m(B,null),a(e,U),a(e,z),a(z,G),C(le,X,me),ne&&ne.m(le,me),C(le,H,me),D||(q=[O(m,"click",Ve(P)),O(e,"click",J),O(e,"keydown",te)],D=!0)},p(le,me){n=le,me[0]&262144&&i!==(i=n[513]._expanded?"▾":"▸")&&Q(o,i),me[0]&262144&&u!==(u=n[513].summary+"")&&Q(d,u),me[0]&262144&&g!==(g=n[513].nodeTitle+"")&&Q(b,g),me[0]&262144&&E!==(E=n[513].nodePath+"")&&Q(T,E),me[0]&262144&&R!==(R=n[513].minutes+"")&&Q(M,R),n[513].billable?Y||(Y=vu(),Y.c(),Y.m(L,null)):Y&&(Y.d(1),Y=null),n[513].approximate?Z||(Z=wu(),Z.c(),Z.m(B,null)):Z&&(Z.d(1),Z=null),me[0]&262144&&W!==(W=n[513].date+"")&&Q(G,W),me[0]&262144&&ce(e,"expanded",n[513]._expanded),n[513]._expanded?ne?ne.p(n,me):(ne=yu(n),ne.c(),ne.m(H.parentNode,H)):ne&&(ne.d(1),ne=null)},d(le){le&&(S(e),S(X),S(H)),Y&&Y.d(),Z&&Z.d(),ne&&ne.d(le),D=!1,Se(q)}}}function Qw(n){let e,t=Te(n[60]),l=[];for(let i=0;i<t.length;i+=1)l[i]=Lu(Bc(n,t,i));return{c(){e=f("div");for(let i=0;i<l.length;i+=1)l[i].c();r(e,"class","journal-suggestions svelte-1uu9qhk")},m(i,o){C(i,e,o);for(let s=0;s<l.length;s+=1)l[s]&&l[s].m(e,null)},p(i,o){if(o[1]&536870912|o[4]&2097152|o[5]&1098907648|o[6]&256|o[7]&24){t=Te(i[60]);let s;for(s=0;s<t.length;s+=1){const c=Bc(i,t,s);l[s]?l[s].p(c,o):(l[s]=Lu(c),l[s].c(),l[s].m(e,null))}for(;s<l.length;s+=1)l[s].d(1);l.length=t.length}},d(i){i&&S(e),tt(l,i)}}}function xw(n){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${k("suggest.noSuggestions")}`,r(t,"class","svelte-1uu9qhk"),r(e,"class","empty-state svelte-1uu9qhk")},m(l,i){C(l,e,i),a(e,t)},p:ie,d(l){l&&S(e)}}}function Au(n){let e,t=n[489].events.length+"",l,i,o=k("suggest.detectedEvents")+"",s;return{c(){e=F("· "),l=F(t),i=w(),s=F(o)},m(c,u){C(c,e,u),C(c,l,u),C(c,i,u),C(c,s,u)},p(c,u){u[1]&536870912&&t!==(t=c[489].events.length+"")&&Q(l,t)},d(c){c&&(S(e),S(l),S(i),S(s))}}}function Nu(n){let e,t,l,i=Te(n[489].events),o=[];for(let s=0;s<i.length;s+=1)o[s]=Mu(Fc(n,i,s));return{c(){e=f("div"),t=f("div"),t.textContent=`${k("suggest.detectedEvents")}`,l=w();for(let s=0;s<o.length;s+=1)o[s].c();r(t,"class","suggestion-detail-title svelte-1uu9qhk"),r(e,"class","suggestion-detail svelte-1uu9qhk")},m(s,c){C(s,e,c),a(e,t),a(e,l);for(let u=0;u<o.length;u+=1)o[u]&&o[u].m(e,null)},p(s,c){if(c[1]&536870912|c[4]&2097152|c[6]&256|c[7]&16){i=Te(s[489].events);let u;for(u=0;u<i.length;u+=1){const d=Fc(s,i,u);o[u]?o[u].p(d,c):(o[u]=Mu(d),o[u].c(),o[u].m(e,null))}for(;u<o.length;u+=1)o[u].d(1);o.length=i.length}},d(s){s&&S(e),tt(o,s)}}}function Iu(n){let e,t=n[486].nodePath+"",l;return{c(){e=f("span"),l=F(t),r(e,"class","suggestion-event-path svelte-1uu9qhk")},m(i,o){C(i,e,o),a(e,l)},p(i,o){o[1]&536870912&&t!==(t=i[486].nodePath+"")&&Q(l,t)},d(i){i&&S(e)}}}function Ru(n){let e,t,l;function i(){return n[323](n[486])}return{c(){e=f("button"),e.textContent=`${k("file.showInExplorer")}`,r(e,"class","link-btn svelte-1uu9qhk")},m(o,s){C(o,e,s),t||(l=O(e,"click",i),t=!0)},p(o,s){n=o},d(o){o&&S(e),t=!1,l()}}}function Mu(n){let e,t,l=un(n[486].createdAt)+"",i,o,s,c,u=n[194](n[486].eventType)+"",d,p,h,m=n[486].title+"",g,b,v,y,E=n[486].targetType==="file"||n[486].eventType.startsWith("file_"),T,I,N,R=n[486].nodePath&&Iu(n);function M(){return n[322](n[486])}let A=E&&Ru(n);return{c(){e=f("div"),t=f("span"),i=F(l),o=w(),R&&R.c(),s=w(),c=f("span"),d=F(u),p=w(),h=f("span"),g=F(m),b=w(),v=f("button"),v.textContent=`${k("common.open")}`,y=w(),A&&A.c(),T=w(),r(t,"class","suggestion-event-time svelte-1uu9qhk"),r(c,"class","suggestion-event-type svelte-1uu9qhk"),r(h,"class","suggestion-event-title svelte-1uu9qhk"),r(v,"class","link-btn svelte-1uu9qhk"),r(e,"class","suggestion-detail-event svelte-1uu9qhk")},m(L,j){C(L,e,j),a(e,t),a(t,i),a(e,o),R&&R.m(e,null),a(e,s),a(e,c),a(c,d),a(e,p),a(e,h),a(h,g),a(e,b),a(e,v),a(e,y),A&&A.m(e,null),a(e,T),I||(N=O(v,"click",M),I=!0)},p(L,j){n=L,j[1]&536870912&&l!==(l=un(n[486].createdAt)+"")&&Q(i,l),n[486].nodePath?R?R.p(n,j):(R=Iu(n),R.c(),R.m(e,s)):R&&(R.d(1),R=null),j[1]&536870912&&u!==(u=n[194](n[486].eventType)+"")&&Q(d,u),j[1]&536870912&&m!==(m=n[486].title+"")&&Q(g,m),j[1]&536870912&&(E=n[486].targetType==="file"||n[486].eventType.startsWith("file_")),E?A?A.p(n,j):(A=Ru(n),A.c(),A.m(e,T)):A&&(A.d(1),A=null)},d(L){L&&S(e),R&&R.d(),A&&A.d(),I=!1,N()}}}function Lu(n){let e,t,l,i,o=n[489].nodeTitle+"",s,c,u,d=n[489].summary+"",p,h,m,g=n[489].suggestedMin+"",b,v,y=k("worklog.min")+"",E,T,I,N,R,M,A,L,j,B,U,z,W,G,X,H,D,q,P,Y,Z;function J(){return n[315](n[489])}let te=n[489].events&&n[489].events.length>0&&Au(n);function ne(...ee){return n[316](n[489],n[509],n[510],...ee)}function le(){return n[317](n[489])}function me(){return n[318](n[489])}function oe(){return n[319](n[489])}function ze(){return n[320](n[489],n[509],n[510])}function Ye(...ee){return n[321](n[489],n[509],n[510],...ee)}let Re=n[489]._expanded&&n[489].events&&n[489].events.length>0&&Nu(n);return{c(){e=f("div"),t=f("div"),l=f("div"),i=f("button"),s=F(o),c=w(),u=f("span"),p=F(d),h=w(),m=f("span"),b=F(g),v=w(),E=F(y),te&&te.c(),T=w(),I=f("div"),N=f("span"),A=w(),L=f("input"),B=w(),U=f("span"),U.textContent=`${k("suggest.minutes")}`,z=w(),W=f("button"),W.textContent=`${k("suggest.edit")}`,G=w(),X=f("button"),X.textContent=`${k("suggest.apply")}`,H=w(),D=f("button"),D.textContent=`${k("common.delete")}`,q=w(),Re&&Re.c(),P=w(),r(i,"class","suggestion-node link-btn svelte-1uu9qhk"),r(u,"class","suggestion-summary svelte-1uu9qhk"),r(m,"class","suggestion-meta svelte-1uu9qhk"),r(l,"class","suggestion-info svelte-1uu9qhk"),r(N,"class","suggestion-confidence-dot svelte-1uu9qhk"),r(N,"title",R=k("suggest.confidence."+n[489].confidence)),r(N,"aria-label",M=k("suggest.confidence."+n[489].confidence)),ce(N,"low",n[489].confidence==="low"),ce(N,"medium",n[489].confidence==="medium"),ce(N,"high",n[489].confidence==="high"),r(L,"type","number"),r(L,"class","suggestion-min-input svelte-1uu9qhk"),L.value=j=n[489].suggestedMin,r(L,"min","1"),r(L,"max","480"),r(U,"class","suggestion-min-label svelte-1uu9qhk"),r(W,"class","btn btn-sm svelte-1uu9qhk"),r(X,"class","btn btn-sm btn-primary svelte-1uu9qhk"),r(D,"class","btn btn-sm btn-danger svelte-1uu9qhk"),r(I,"class","suggestion-actions svelte-1uu9qhk"),r(t,"class","suggestion-main svelte-1uu9qhk"),r(t,"role","button"),r(t,"tabindex","0"),r(e,"class","suggestion-card svelte-1uu9qhk"),ce(e,"expanded",n[489]._expanded)},m(ee,re){C(ee,e,re),a(e,t),a(t,l),a(l,i),a(i,s),a(l,c),a(l,u),a(u,p),a(l,h),a(l,m),a(m,b),a(m,v),a(m,E),te&&te.m(m,null),a(t,T),a(t,I),a(I,N),a(I,A),a(I,L),a(I,B),a(I,U),a(I,z),a(I,W),a(I,G),a(I,X),a(I,H),a(I,D),a(e,q),Re&&Re.m(e,null),a(e,P),Y||(Z=[O(i,"click",Ve(J)),O(L,"change",Ve(ne)),O(W,"click",Ve(le)),O(X,"click",Ve(me)),O(D,"click",Ve(oe)),O(t,"click",ze),O(t,"keydown",Ye)],Y=!0)},p(ee,re){n=ee,re[1]&536870912&&o!==(o=n[489].nodeTitle+"")&&Q(s,o),re[1]&536870912&&d!==(d=n[489].summary+"")&&Q(p,d),re[1]&536870912&&g!==(g=n[489].suggestedMin+"")&&Q(b,g),n[489].events&&n[489].events.length>0?te?te.p(n,re):(te=Au(n),te.c(),te.m(m,null)):te&&(te.d(1),te=null),re[1]&536870912&&R!==(R=k("suggest.confidence."+n[489].confidence))&&r(N,"title",R),re[1]&536870912&&M!==(M=k("suggest.confidence."+n[489].confidence))&&r(N,"aria-label",M),re[1]&536870912&&ce(N,"low",n[489].confidence==="low"),re[1]&536870912&&ce(N,"medium",n[489].confidence==="medium"),re[1]&536870912&&ce(N,"high",n[489].confidence==="high"),re[1]&536870912&&j!==(j=n[489].suggestedMin)&&L.value!==j&&(L.value=j),n[489]._expanded&&n[489].events&&n[489].events.length>0?Re?Re.p(n,re):(Re=Nu(n),Re.c(),Re.m(e,P)):Re&&(Re.d(1),Re=null),re[1]&536870912&&ce(e,"expanded",n[489]._expanded)},d(ee){ee&&S(e),te&&te.d(),Re&&Re.d(),Y=!1,Se(Z)}}}function $w(n){let e,t,l,i,o,s,c,u,d,p,h,m=n[8]&&Ou(n);function g(y,E){return y[77].length===0?ny:ty}let b=g(n),v=b(n);return{c(){e=f("div"),t=f("section"),l=f("div"),m&&m.c(),i=w(),o=f("div"),s=f("h3"),c=F(n[79]),u=w(),d=f("p"),p=F(n[78]),h=w(),v.c(),r(s,"class","svelte-1uu9qhk"),r(d,"class","svelte-1uu9qhk"),r(o,"class","svelte-1uu9qhk"),r(l,"class","trash-section-head svelte-1uu9qhk"),r(t,"class","trash-section svelte-1uu9qhk"),r(e,"class","trash-browser svelte-1uu9qhk")},m(y,E){C(y,e,E),a(e,t),a(t,l),m&&m.m(l,null),a(l,i),a(l,o),a(o,s),a(s,c),a(o,u),a(o,d),a(d,p),a(t,h),v.m(t,null)},p(y,E){y[8]?m?m.p(y,E):(m=Ou(y),m.c(),m.m(l,i)):m&&(m.d(1),m=null),E[2]&131072&&Q(c,y[79]),E[2]&65536&&Q(p,y[78]),b===(b=g(y))&&v?v.p(y,E):(v.d(1),v=b(y),v&&(v.c(),v.m(t,null)))},d(y){y&&S(e),m&&m.d(),v.d()}}}function ey(n){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${k("trash.empty")}`,r(t,"class","svelte-1uu9qhk"),r(e,"class","empty-state svelte-1uu9qhk")},m(l,i){C(l,e,i),a(e,t)},p:ie,d(l){l&&S(e)}}}function Ou(n){let e,t=Tt("back")+"",l,i;return{c(){e=f("button"),r(e,"class","inbox-icon-btn svelte-1uu9qhk"),r(e,"title",k("common.backLabel")),r(e,"aria-label",k("common.backLabel"))},m(o,s){C(o,e,s),e.innerHTML=t,l||(i=O(e,"click",n[171]),l=!0)},p:ie,d(o){o&&S(e),l=!1,i()}}}function ty(n){let e,t=Te(n[77]),l=[];for(let i=0;i<t.length;i+=1)l[i]=Du(Uc(n,t,i));return{c(){for(let i=0;i<l.length;i+=1)l[i].c();e=_t()},m(i,o){for(let s=0;s<l.length;s+=1)l[s]&&l[s].m(i,o);C(i,e,o)},p(i,o){if(o[2]&49152|o[5]&4096e3){t=Te(i[77]);let s;for(s=0;s<t.length;s+=1){const c=Uc(i,t,s);l[s]?l[s].p(c,o):(l[s]=Du(c),l[s].c(),l[s].m(e.parentNode,e))}for(;s<l.length;s+=1)l[s].d(1);l.length=t.length}},d(i){i&&S(e),tt(l,i)}}}function ny(n){let e;return{c(){e=f("p"),e.textContent=`${k("common.empty")}`,r(e,"class","trash-empty-line svelte-1uu9qhk")},m(t,l){C(t,e,l)},p:ie,d(t){t&&S(e)}}}function Du(n){let e,t,l,i,o,s=Tt(n[506].type!=="file"&&n[506].type!=="note"?"folder":"open")+"",c,u,d,p,h=n[506].title+"",m,g,b,v=n[506].nodePath+"",y,E,T,I=Un(n[506].deletedAt)+"",N,R,M,A,L,j=Tt("restore")+"",B,U,z=Tt("purge")+"",W,G,X;function H(){return n[306](n[506])}function D(){return n[307](n[506])}function q(...te){return n[308](n[506],...te)}function P(){return n[309](n[506])}function Y(...te){return n[310](n[506],...te)}function Z(){return n[311](n[506])}function J(){return n[312](n[506])}return{c(){e=f("div"),t=f("input"),i=w(),o=f("span"),u=w(),d=f("button"),p=f("span"),m=F(h),g=w(),b=f("span"),y=F(v),E=w(),T=f("span"),N=F(I),M=w(),A=f("div"),L=f("button"),B=w(),U=f("button"),W=w(),r(t,"type","checkbox"),t.checked=l=n[76].includes(n[506].id),r(t,"class","svelte-1uu9qhk"),r(o,"class","trash-row-icon svelte-1uu9qhk"),r(o,"role","button"),r(o,"tabindex","0"),r(o,"title",c=n[506].type!=="file"?k("file.openFolder"):k("common.open")),r(p,"class","trash-row-title svelte-1uu9qhk"),r(b,"class","trash-row-meta svelte-1uu9qhk"),r(T,"class","trash-row-date svelte-1uu9qhk"),r(d,"class","trash-row-main svelte-1uu9qhk"),r(d,"title",R=n[506].type!=="file"?k("file.openFolder"):k("common.open")),r(L,"class","inbox-icon-btn inbox-icon-btn-primary svelte-1uu9qhk"),r(L,"title",k("trash.restore")),r(L,"aria-label",k("trash.restore")),r(U,"class","inbox-icon-btn inbox-icon-btn-danger svelte-1uu9qhk"),r(U,"title",k("common.delete")),r(U,"aria-label",k("common.delete")),r(A,"class","trash-row-actions svelte-1uu9qhk"),r(e,"class","trash-row svelte-1uu9qhk"),ce(e,"selected",n[76].includes(n[506].id)),ce(e,"folder",n[506].type!=="file"&&n[506].type!=="note")},m(te,ne){C(te,e,ne),a(e,t),a(e,i),a(e,o),o.innerHTML=s,a(e,u),a(e,d),a(d,p),a(p,m),a(d,g),a(d,b),a(b,y),a(d,E),a(d,T),a(T,N),a(e,M),a(e,A),a(A,L),L.innerHTML=j,a(A,B),a(A,U),U.innerHTML=z,a(e,W),G||(X=[O(t,"change",H),O(o,"click",Ve(D)),O(o,"keydown",q),O(d,"click",Ve(P)),O(d,"keydown",Y),O(L,"click",Z),O(U,"click",J)],G=!0)},p(te,ne){n=te,ne[2]&49152&&l!==(l=n[76].includes(n[506].id))&&(t.checked=l),ne[2]&32768&&s!==(s=Tt(n[506].type!=="file"&&n[506].type!=="note"?"folder":"open")+"")&&(o.innerHTML=s),ne[2]&32768&&c!==(c=n[506].type!=="file"?k("file.openFolder"):k("common.open"))&&r(o,"title",c),ne[2]&32768&&h!==(h=n[506].title+"")&&Q(m,h),ne[2]&32768&&v!==(v=n[506].nodePath+"")&&Q(y,v),ne[2]&32768&&I!==(I=Un(n[506].deletedAt)+"")&&Q(N,I),ne[2]&32768&&R!==(R=n[506].type!=="file"?k("file.openFolder"):k("common.open"))&&r(d,"title",R),ne[2]&49152&&ce(e,"selected",n[76].includes(n[506].id)),ne[2]&32768&&ce(e,"folder",n[506].type!=="file"&&n[506].type!=="note")},d(te){te&&S(e),G=!1,Se(X)}}}function Pu(n){let e,t,l,i,o,s,c,u,d,p=n[5]==="asc"?"↑":"↓",h,m,g,b,v,y,E,T,I,N;return{c(){e=f("div"),t=f("div"),l=f("button"),l.textContent=`${k("inbox.sortByDate")}`,i=w(),o=f("button"),o.textContent=`${k("inbox.sortByName")}`,s=w(),c=f("button"),c.textContent=`${k("inbox.sortByType")}`,u=w(),d=f("span"),h=F(p),m=w(),g=f("span"),b=w(),v=f("label"),y=f("input"),E=w(),T=f("span"),T.textContent=`${k("inbox.groupByContext")}`,r(l,"class","sort-btn svelte-1uu9qhk"),ce(l,"active",n[4]==="date"),r(o,"class","sort-btn svelte-1uu9qhk"),ce(o,"active",n[4]==="name"),r(c,"class","sort-btn svelte-1uu9qhk"),ce(c,"active",n[4]==="type"),r(d,"class","sort-dir svelte-1uu9qhk"),r(g,"class","inbox-controls-divider svelte-1uu9qhk"),r(y,"type","checkbox"),r(y,"class","svelte-1uu9qhk"),r(T,"class","svelte-1uu9qhk"),r(v,"class","checkbox-label-inline svelte-1uu9qhk"),r(t,"class","inbox-sort-row svelte-1uu9qhk"),r(e,"class","inbox-controls svelte-1uu9qhk")},m(R,M){C(R,e,M),a(e,t),a(t,l),a(t,i),a(t,o),a(t,s),a(t,c),a(t,u),a(t,d),a(d,h),a(t,m),a(t,g),a(t,b),a(t,v),a(v,y),y.checked=n[6],a(v,E),a(v,T),I||(N=[O(l,"click",n[288]),O(o,"click",n[289]),O(c,"click",n[290]),O(y,"change",n[291])],I=!0)},p(R,M){M[0]&16&&ce(l,"active",R[4]==="date"),M[0]&16&&ce(o,"active",R[4]==="name"),M[0]&16&&ce(c,"active",R[4]==="type"),M[0]&32&&p!==(p=R[5]==="asc"?"↑":"↓")&&Q(h,p),M[0]&64&&(y.checked=R[6])},d(R){R&&S(e),I=!1,Se(N)}}}function ly(n){let e,t=Te(n[9]),l=[];for(let i=0;i<t.length;i+=1)l[i]=qu(Hc(n,t,i));return{c(){e=f("div");for(let i=0;i<l.length;i+=1)l[i].c();r(e,"class","inbox-list svelte-1uu9qhk")},m(i,o){C(i,e,o);for(let s=0;s<l.length;s+=1)l[s]&&l[s].m(e,null)},p(i,o){if(o[0]&512|o[4]&6291456|o[6]&6359040){t=Te(i[9]);let s;for(s=0;s<t.length;s+=1){const c=Hc(i,t,s);l[s]?l[s].p(c,o):(l[s]=qu(c),l[s].c(),l[s].m(e,null))}for(;s<l.length;s+=1)l[s].d(1);l.length=t.length}},d(i){i&&S(e),tt(l,i)}}}function iy(n){let e,t=Te(n[117]),l=[];for(let i=0;i<t.length;i+=1)l[i]=zu(Wc(n,t,i));return{c(){for(let i=0;i<l.length;i+=1)l[i].c();e=_t()},m(i,o){for(let s=0;s<l.length;s+=1)l[s]&&l[s].m(i,o);C(i,e,o)},p(i,o){if(o[3]&16777216|o[4]&6291456|o[6]&6359040){t=Te(i[117]);let s;for(s=0;s<t.length;s+=1){const c=Wc(i,t,s);l[s]?l[s].p(c,o):(l[s]=zu(c),l[s].c(),l[s].m(e.parentNode,e))}for(;s<l.length;s+=1)l[s].d(1);l.length=t.length}},d(i){i&&S(e),tt(l,i)}}}function sy(n){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${k("inbox.empty")}`,r(t,"class","svelte-1uu9qhk"),r(e,"class","empty-state svelte-1uu9qhk")},m(l,i){C(l,e,i),a(e,t)},p:ie,d(l){l&&S(e)}}}function oy(n){let e;return{c(){e=f("span"),r(e,"class","inbox-icon-slot svelte-1uu9qhk"),r(e,"aria-hidden","true")},m(t,l){C(t,e,l)},p:ie,d(t){t&&S(e)}}}function ry(n){let e,t=Tt("attach")+"",l,i;function o(){return n[299](n[474])}return{c(){e=f("button"),r(e,"class","inbox-icon-btn inbox-icon-btn-primary svelte-1uu9qhk"),r(e,"title",k("inbox.keepHere")),r(e,"aria-label",k("inbox.keepHere"))},m(s,c){C(s,e,c),e.innerHTML=t,l||(i=O(e,"click",Ve(o)),l=!0)},p(s,c){n=s},d(s){s&&S(e),l=!1,i()}}}function ay(n){let e;return{c(){e=f("span"),r(e,"class","inbox-icon-slot svelte-1uu9qhk"),r(e,"aria-hidden","true")},m(t,l){C(t,e,l)},p:ie,d(t){t&&S(e)}}}function cy(n){let e,t=Tt("showInExplorer")+"",l,i;function o(){return n[302](n[474])}return{c(){e=f("button"),r(e,"class","inbox-icon-btn svelte-1uu9qhk"),r(e,"title",k("file.showInExplorer")),r(e,"aria-label",k("file.showInExplorer"))},m(s,c){C(s,e,c),e.innerHTML=t,l||(i=O(e,"click",Ve(o)),l=!0)},p(s,c){n=s},d(s){s&&S(e),l=!1,i()}}}function qu(n){let e,t,l,i=n[474].title+"",o,s,c,u=n[197](n[474])+"",d,p,h,m,g,b=Tt("move")+"",v,y,E=Tt("open")+"",T,I,N,R,M=Tt("delete")+"",A,L,j;function B(Z,J){return Z[474].suggestedTargetNodeId?ry:oy}let U=B(n),z=U(n);function W(){return n[300](n[474])}function G(){return n[301](n[474])}function X(Z,J){return J[0]&512&&(I=null),I==null&&(I=!!Qs(Z[474])),I?cy:ay}let H=X(n,[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]),D=H(n);function q(){return n[303](n[474])}function P(){return n[304](n[474])}function Y(...Z){return n[305](n[474],...Z)}return{c(){e=f("div"),t=f("div"),l=f("span"),o=F(i),s=w(),c=f("span"),d=F(u),p=w(),h=f("div"),z.c(),m=w(),g=f("button"),v=w(),y=f("button"),T=w(),D.c(),N=w(),R=f("button"),A=w(),r(l,"class","inbox-item-title svelte-1uu9qhk"),r(c,"class","inbox-item-meta svelte-1uu9qhk"),r(t,"class","inbox-item-main svelte-1uu9qhk"),r(g,"class","inbox-icon-btn svelte-1uu9qhk"),r(g,"title",k("inbox.assign")),r(g,"aria-label",k("inbox.assign")),r(y,"class","inbox-icon-btn svelte-1uu9qhk"),r(y,"title",k("common.open")),r(y,"aria-label",k("common.open")),r(R,"class","inbox-icon-btn inbox-icon-btn-danger svelte-1uu9qhk"),r(R,"title",k("common.delete")),r(R,"aria-label",k("common.delete")),r(h,"class","inbox-item-actions svelte-1uu9qhk"),r(e,"class","inbox-item svelte-1uu9qhk"),r(e,"role","button"),r(e,"tabindex","0")},m(Z,J){C(Z,e,J),a(e,t),a(t,l),a(l,o),a(t,s),a(t,c),a(c,d),a(e,p),a(e,h),z.m(h,null),a(h,m),a(h,g),g.innerHTML=b,a(h,v),a(h,y),y.innerHTML=E,a(h,T),D.m(h,null),a(h,N),a(h,R),R.innerHTML=M,a(e,A),L||(j=[O(g,"click",Ve(W)),O(y,"click",Ve(G)),O(R,"click",Ve(q)),O(e,"click",P),O(e,"keydown",Y)],L=!0)},p(Z,J){n=Z,J[0]&512&&i!==(i=n[474].title+"")&&Q(o,i),J[0]&512&&u!==(u=n[197](n[474])+"")&&Q(d,u),U===(U=B(n))&&z?z.p(n,J):(z.d(1),z=U(n),z&&(z.c(),z.m(h,m))),H===(H=X(n,J))&&D?D.p(n,J):(D.d(1),D=H(n),D&&(D.c(),D.m(h,N)))},d(Z){Z&&S(e),z.d(),D.d(),L=!1,Se(j)}}}function uy(n){let e;return{c(){e=f("span"),r(e,"class","inbox-icon-slot svelte-1uu9qhk"),r(e,"aria-hidden","true")},m(t,l){C(t,e,l)},p:ie,d(t){t&&S(e)}}}function fy(n){let e,t=Tt("attach")+"",l,i;function o(){return n[292](n[474])}return{c(){e=f("button"),r(e,"class","inbox-icon-btn inbox-icon-btn-primary svelte-1uu9qhk"),r(e,"title",k("inbox.keepHere")),r(e,"aria-label",k("inbox.keepHere"))},m(s,c){C(s,e,c),e.innerHTML=t,l||(i=O(e,"click",Ve(o)),l=!0)},p(s,c){n=s},d(s){s&&S(e),l=!1,i()}}}function dy(n){let e;return{c(){e=f("span"),r(e,"class","inbox-icon-slot svelte-1uu9qhk"),r(e,"aria-hidden","true")},m(t,l){C(t,e,l)},p:ie,d(t){t&&S(e)}}}function py(n){let e,t=Tt("showInExplorer")+"",l,i;function o(){return n[295](n[474])}return{c(){e=f("button"),r(e,"class","inbox-icon-btn svelte-1uu9qhk"),r(e,"title",k("file.showInExplorer")),r(e,"aria-label",k("file.showInExplorer"))},m(s,c){C(s,e,c),e.innerHTML=t,l||(i=O(e,"click",Ve(o)),l=!0)},p(s,c){n=s},d(s){s&&S(e),l=!1,i()}}}function ju(n){let e,t,l,i=n[474].title+"",o,s,c,u=n[197](n[474])+"",d,p,h,m,g,b=Tt("move")+"",v,y,E=Tt("open")+"",T,I,N,R,M=Tt("delete")+"",A,L,j;function B(Z,J){return Z[474].suggestedTargetNodeId?fy:uy}let U=B(n),z=U(n);function W(){return n[293](n[474])}function G(){return n[294](n[474])}function X(Z,J){return J[3]&16777216&&(I=null),I==null&&(I=!!Qs(Z[474])),I?py:dy}let H=X(n,[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]),D=H(n);function q(){return n[296](n[474])}function P(){return n[297](n[474])}function Y(...Z){return n[298](n[474],...Z)}return{c(){e=f("div"),t=f("div"),l=f("span"),o=F(i),s=w(),c=f("span"),d=F(u),p=w(),h=f("div"),z.c(),m=w(),g=f("button"),v=w(),y=f("button"),T=w(),D.c(),N=w(),R=f("button"),A=w(),r(l,"class","inbox-item-title svelte-1uu9qhk"),r(c,"class","inbox-item-meta svelte-1uu9qhk"),r(t,"class","inbox-item-main svelte-1uu9qhk"),r(g,"class","inbox-icon-btn svelte-1uu9qhk"),r(g,"title",k("inbox.assign")),r(g,"aria-label",k("inbox.assign")),r(y,"class","inbox-icon-btn svelte-1uu9qhk"),r(y,"title",k("common.open")),r(y,"aria-label",k("common.open")),r(R,"class","inbox-icon-btn inbox-icon-btn-danger svelte-1uu9qhk"),r(R,"title",k("common.delete")),r(R,"aria-label",k("common.delete")),r(h,"class","inbox-item-actions svelte-1uu9qhk"),r(e,"class","inbox-item svelte-1uu9qhk"),r(e,"role","button"),r(e,"tabindex","0")},m(Z,J){C(Z,e,J),a(e,t),a(t,l),a(l,o),a(t,s),a(t,c),a(c,d),a(e,p),a(e,h),z.m(h,null),a(h,m),a(h,g),g.innerHTML=b,a(h,v),a(h,y),y.innerHTML=E,a(h,T),D.m(h,null),a(h,N),a(h,R),R.innerHTML=M,a(e,A),L||(j=[O(g,"click",Ve(W)),O(y,"click",Ve(G)),O(R,"click",Ve(q)),O(e,"click",P),O(e,"keydown",Y)],L=!0)},p(Z,J){n=Z,J[3]&16777216&&i!==(i=n[474].title+"")&&Q(o,i),J[3]&16777216&&u!==(u=n[197](n[474])+"")&&Q(d,u),U===(U=B(n))&&z?z.p(n,J):(z.d(1),z=U(n),z&&(z.c(),z.m(h,m))),H===(H=X(n,J))&&D?D.p(n,J):(D.d(1),D=H(n),D&&(D.c(),D.m(h,N)))},d(Z){Z&&S(e),z.d(),D.d(),L=!1,Se(j)}}}function zu(n){let e,t,l=n[499].label+"",i,o,s,c=n[499].items.length+"",u,d,p,h,m=Te(n[499].items),g=[];for(let b=0;b<m.length;b+=1)g[b]=ju(Gc(n,m,b));return{c(){e=f("div"),t=f("div"),i=F(l),o=w(),s=f("span"),u=F(c),d=w(),p=f("div");for(let b=0;b<g.length;b+=1)g[b].c();h=w(),r(s,"class","inbox-group-count svelte-1uu9qhk"),r(t,"class","inbox-group-header svelte-1uu9qhk"),r(p,"class","inbox-list svelte-1uu9qhk"),r(e,"class","inbox-group svelte-1uu9qhk")},m(b,v){C(b,e,v),a(e,t),a(t,i),a(t,o),a(t,s),a(s,u),a(e,d),a(e,p);for(let y=0;y<g.length;y+=1)g[y]&&g[y].m(p,null);a(e,h)},p(b,v){if(v[3]&16777216&&l!==(l=b[499].label+"")&&Q(i,l),v[3]&16777216&&c!==(c=b[499].items.length+"")&&Q(u,c),v[3]&16777216|v[4]&6291456|v[6]&6359040){m=Te(b[499].items);let y;for(y=0;y<m.length;y+=1){const E=Gc(b,m,y);g[y]?g[y].p(E,v):(g[y]=ju(E),g[y].c(),g[y].m(p,null))}for(;y<g.length;y+=1)g[y].d(1);g.length=m.length}},d(b){b&&S(e),tt(g,b)}}}function hy(n){let e;return{c(){e=f("span"),r(e,"class","tab-separator svelte-1uu9qhk"),r(e,"aria-hidden","true")},m(t,l){C(t,e,l)},d(t){t&&S(e)}}}function Bu(n){let e,t,l,i,o=n[496].id==="activity"&&hy();function s(){return n[246](n[496])}return{c(){o&&o.c(),e=w(),t=f("button"),t.textContent=`${n[496].label}`,r(t,"class","tab svelte-1uu9qhk"),ce(t,"active",n[35]===n[496].id)},m(c,u){o&&o.m(c,u),C(c,e,u),C(c,t,u),l||(i=O(t,"click",s),l=!0)},p(c,u){n=c,u[1]&16|u[3]&536870912&&ce(t,"active",n[35]===n[496].id)},d(c){c&&(S(e),S(t)),o&&o.d(c),l=!1,i()}}}function my(n){let e;function t(o,s){return o[32].length===0?Ty:Ey}let l=t(n),i=l(n);return{c(){e=f("div"),i.c(),r(e,"class","activity-tab svelte-1uu9qhk")},m(o,s){C(o,e,s),i.m(e,null)},p(o,s){l===(l=t(o))&&i?i.p(o,s):(i.d(1),i=l(o),i&&(i.c(),i.m(e,null)))},i:ie,o:ie,d(o){o&&S(e),i.d()}}}function gy(n){let e,t,l,i,o=n[2]&&n[60].filter(n[232]).length>0,s,c,u,d=o&&Wu(n);function p(g,b){return g[50].length===0?Cy:Sy}let h=p(n),m=h(n);return{c(){e=f("div"),t=f("div"),l=f("button"),l.textContent=`+ ${k("worklog.addEntry")}`,i=w(),d&&d.c(),s=w(),m.c(),r(l,"class","btn btn-primary btn-sm svelte-1uu9qhk"),r(t,"class","worklog-toolbar svelte-1uu9qhk"),r(e,"class","worklog-tab svelte-1uu9qhk")},m(g,b){C(g,e,b),a(e,t),a(t,l),a(e,i),d&&d.m(e,null),a(e,s),m.m(e,null),c||(u=O(l,"click",n[271]),c=!0)},p(g,b){b[0]&4|b[1]&536870912&&(o=g[2]&&g[60].filter(g[232]).length>0),o?d?d.p(g,b):(d=Wu(g),d.c(),d.m(e,s)):d&&(d.d(1),d=null),h===(h=p(g))&&m?m.p(g,b):(m.d(1),m=h(g),m&&(m.c(),m.m(e,null)))},i:ie,o:ie,d(g){g&&S(e),d&&d.d(),m.d(),c=!1,u()}}}function _y(n){let e,t,l,i,o,s;function c(p,h){return p[49].length===0?Oy:Ly}let u=c(n),d=u(n);return{c(){e=f("div"),t=f("div"),l=f("button"),l.textContent=`${k("action.addAction")}`,i=w(),d.c(),r(l,"class","btn btn-primary svelte-1uu9qhk"),r(t,"class","tab-toolbar svelte-1uu9qhk"),r(e,"class","actions-tab svelte-1uu9qhk")},m(p,h){C(p,e,h),a(e,t),a(t,l),a(e,i),d.m(e,null),o||(s=O(l,"click",n[215]),o=!0)},p(p,h){u===(u=c(p))&&d?d.p(p,h):(d.d(1),d=u(p),d&&(d.c(),d.m(e,null)))},i:ie,o:ie,d(p){p&&S(e),d.d(),o=!1,s()}}}function by(n){let e,t;function l(c,u){return c[69].length===0?Py:Dy}let i=l(n),o=i(n),s=n[74]&&cf(n);return{c(){e=f("div"),o.c(),t=w(),s&&s.c(),r(e,"class","links-tab svelte-1uu9qhk")},m(c,u){C(c,e,u),o.m(e,null),a(e,t),s&&s.m(e,null)},p(c,u){i===(i=l(c))&&o?o.p(c,u):(o.d(1),o=i(c),o&&(o.c(),o.m(e,t))),c[74]?s?s.p(c,u):(s=cf(c),s.c(),s.m(e,null)):s&&(s.d(1),s=null)},i:ie,o:ie,d(c){c&&S(e),o.d(),s&&s.d()}}}function ky(n){let e;function t(o,s){return o[66].length===0?jy:qy}let l=t(n),i=l(n);return{c(){e=f("div"),i.c(),r(e,"class","inbox-tab svelte-1uu9qhk")},m(o,s){C(o,e,s),i.m(e,null)},p(o,s){l===(l=t(o))&&i?i.p(o,s):(i.d(1),i=l(o),i&&(i.c(),i.m(e,null)))},i:ie,o:ie,d(o){o&&S(e),i.d()}}}function vy(n){let e,t,l={selectedNode:n[2],wailsCall:pe};return e=new hw({props:l}),n[254](e),e.$on("openNote",n[255]),e.$on("refreshParent",n[256]),e.$on("error",n[257]),{c(){Ge(e.$$.fragment)},m(i,o){He(e,i,o),t=!0},p(i,o){const s={};o[0]&4&&(s.selectedNode=i[2]),e.$set(s)},i(i){t||(fe(e.$$.fragment,i),t=!0)},o(i){be(e.$$.fragment,i),t=!1},d(i){n[254](null),We(e,i)}}}function wy(n){let e,t;return e=new Y2({props:{notes:n[36],formatDate:Un}}),e.$on("submitCreateNote",n[250]),e.$on("openNote",n[251]),e.$on("startRename",n[252]),e.$on("deleteNote",n[253]),{c(){Ge(e.$$.fragment)},m(l,i){He(e,l,i),t=!0},p(l,i){const o={};i[1]&32&&(o.notes=l[36]),e.$set(o)},i(l){t||(fe(e.$$.fragment,l),t=!0)},o(l){be(e.$$.fragment,l),t=!1},d(l){We(e,l)}}}function yy(n){let e,t;return e=new Q2({props:{selectedNode:n[2],notes:n[36],worklog:n[50],formatDate:Un,nodeKindLabel:n[195]}}),e.$on("createNote",n[247]),e.$on("addFile",n[248]),e.$on("createAction",n[215]),e.$on("openNote",n[249]),{c(){Ge(e.$$.fragment)},m(l,i){He(e,l,i),t=!0},p(l,i){const o={};i[0]&4&&(o.selectedNode=l[2]),i[1]&32&&(o.notes=l[36]),i[1]&524288&&(o.worklog=l[50]),e.$set(o)},i(l){t||(fe(e.$$.fragment,l),t=!0)},o(l){be(e.$$.fragment,l),t=!1},d(l){We(e,l)}}}function Ey(n){let e,t=Te(n[32]),l=[];for(let i=0;i<t.length;i+=1)l[i]=Hu(Kc(n,t,i));return{c(){e=f("div");for(let i=0;i<l.length;i+=1)l[i].c();r(e,"class","activity-events svelte-1uu9qhk")},m(i,o){C(i,e,o);for(let s=0;s<l.length;s+=1)l[s]&&l[s].m(e,null)},p(i,o){if(o[1]&2|o[6]&256|o[7]&32){t=Te(i[32]);let s;for(s=0;s<t.length;s+=1){const c=Kc(i,t,s);l[s]?l[s].p(c,o):(l[s]=Hu(c),l[s].c(),l[s].m(e,null))}for(;s<l.length;s+=1)l[s].d(1);l.length=t.length}},d(i){i&&S(e),tt(l,i)}}}function Ty(n){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${k("activity.perCaseEmpty")}`,r(t,"class","svelte-1uu9qhk"),r(e,"class","empty-state svelte-1uu9qhk")},m(l,i){C(l,e,i),a(e,t)},p:ie,d(l){l&&S(e)}}}function Fu(n){let e,t=n[486].nodePath+"",l;return{c(){e=f("span"),l=F(t),r(e,"class","activity-event-path svelte-1uu9qhk")},m(i,o){C(i,e,o),a(e,l)},p(i,o){o[1]&2&&t!==(t=i[486].nodePath+"")&&Q(l,t)},d(i){i&&S(e)}}}function Uu(n){let e,t=n[486].targetType+"",l;return{c(){e=f("span"),l=F(t),r(e,"class","activity-event-target svelte-1uu9qhk")},m(i,o){C(i,e,o),a(e,l)},p(i,o){o[1]&2&&t!==(t=i[486].targetType+"")&&Q(l,t)},d(i){i&&S(e)}}}function Hu(n){let e,t,l=ai(n[486].eventType)+"",i,o,s,c=n[486].title+"",u,d,p,h,m=n[194](n[486].eventType)+"",g,b,v,y,E=un(n[486].createdAt)+"",T,I,N,R,M=n[486].nodePath&&Fu(n),A=n[486].targetType&&Uu(n);function L(){return n[286](n[486])}function j(...B){return n[287](n[486],...B)}return{c(){e=f("div"),t=f("span"),i=F(l),o=w(),s=f("span"),u=F(c),d=w(),M&&M.c(),p=w(),h=f("span"),g=F(m),b=w(),A&&A.c(),v=w(),y=f("span"),T=F(E),I=w(),r(t,"class","activity-event-icon svelte-1uu9qhk"),r(s,"class","activity-event-title svelte-1uu9qhk"),r(h,"class","activity-event-type svelte-1uu9qhk"),r(y,"class","activity-event-time svelte-1uu9qhk"),r(e,"class","activity-event svelte-1uu9qhk"),r(e,"role","button"),r(e,"tabindex","0")},m(B,U){C(B,e,U),a(e,t),a(t,i),a(e,o),a(e,s),a(s,u),a(e,d),M&&M.m(e,null),a(e,p),a(e,h),a(h,g),a(e,b),A&&A.m(e,null),a(e,v),a(e,y),a(y,T),a(e,I),N||(R=[O(e,"click",L),O(e,"keydown",j)],N=!0)},p(B,U){n=B,U[1]&2&&l!==(l=ai(n[486].eventType)+"")&&Q(i,l),U[1]&2&&c!==(c=n[486].title+"")&&Q(u,c),n[486].nodePath?M?M.p(n,U):(M=Fu(n),M.c(),M.m(e,p)):M&&(M.d(1),M=null),U[1]&2&&m!==(m=n[194](n[486].eventType)+"")&&Q(g,m),n[486].targetType?A?A.p(n,U):(A=Uu(n),A.c(),A.m(e,v)):A&&(A.d(1),A=null),U[1]&2&&E!==(E=un(n[486].createdAt)+"")&&Q(T,E)},d(B){B&&S(e),M&&M.d(),A&&A.d(),N=!1,Se(R)}}}function Wu(n){let e,t,l,i=Te(n[60].filter(n[272])),o=[];for(let s=0;s<i.length;s+=1)o[s]=Xu(Yc(n,i,s));return{c(){e=f("div"),t=f("div"),t.textContent=`${k("worklog.suggestions")}`,l=w();for(let s=0;s<o.length;s+=1)o[s].c();r(t,"class","suggestions-title svelte-1uu9qhk"),r(e,"class","worklog-tab-suggestions svelte-1uu9qhk")},m(s,c){C(s,e,c),a(e,t),a(e,l);for(let u=0;u<o.length;u+=1)o[u]&&o[u].m(e,null)},p(s,c){if(c[0]&4|c[1]&536870912|c[4]&2097152|c[5]&562036736|c[6]&256|c[7]&16){i=Te(s[60].filter(s[272]));let u;for(u=0;u<i.length;u+=1){const d=Yc(s,i,u);o[u]?o[u].p(d,c):(o[u]=Xu(d),o[u].c(),o[u].m(e,null))}for(;u<o.length;u+=1)o[u].d(1);o.length=i.length}},d(s){s&&S(e),tt(o,s)}}}function Gu(n){let e,t=n[489].events.length+"",l,i,o=k("suggest.detectedEvents")+"",s;return{c(){e=F("· "),l=F(t),i=w(),s=F(o)},m(c,u){C(c,e,u),C(c,l,u),C(c,i,u),C(c,s,u)},p(c,u){u[0]&4|u[1]&536870912&&t!==(t=c[489].events.length+"")&&Q(l,t)},d(c){c&&(S(e),S(l),S(i),S(s))}}}function Ku(n){let e,t,l,i=Te(n[489].events),o=[];for(let s=0;s<i.length;s+=1)o[s]=Yu(Xc(n,i,s));return{c(){e=f("div"),t=f("div"),t.textContent=`${k("suggest.detectedEvents")}`,l=w();for(let s=0;s<o.length;s+=1)o[s].c();r(t,"class","suggestion-detail-title svelte-1uu9qhk"),r(e,"class","suggestion-detail svelte-1uu9qhk")},m(s,c){C(s,e,c),a(e,t),a(e,l);for(let u=0;u<o.length;u+=1)o[u]&&o[u].m(e,null)},p(s,c){if(c[0]&4|c[1]&536870912|c[4]&2097152|c[6]&256|c[7]&16){i=Te(s[489].events);let u;for(u=0;u<i.length;u+=1){const d=Xc(s,i,u);o[u]?o[u].p(d,c):(o[u]=Yu(d),o[u].c(),o[u].m(e,null))}for(;u<o.length;u+=1)o[u].d(1);o.length=i.length}},d(s){s&&S(e),tt(o,s)}}}function Vu(n){let e,t=n[486].nodePath+"",l;return{c(){e=f("span"),l=F(t),r(e,"class","suggestion-event-path svelte-1uu9qhk")},m(i,o){C(i,e,o),a(e,l)},p(i,o){o[0]&4|o[1]&536870912&&t!==(t=i[486].nodePath+"")&&Q(l,t)},d(i){i&&S(e)}}}function Zu(n){let e,t,l;function i(){return n[279](n[486])}return{c(){e=f("button"),e.textContent=`${k("file.showInExplorer")}`,r(e,"class","link-btn svelte-1uu9qhk")},m(o,s){C(o,e,s),t||(l=O(e,"click",i),t=!0)},p(o,s){n=o},d(o){o&&S(e),t=!1,l()}}}function Yu(n){let e,t,l=un(n[486].createdAt)+"",i,o,s,c,u=n[194](n[486].eventType)+"",d,p,h,m=n[486].title+"",g,b,v,y,E=n[486].targetType==="file"||n[486].eventType.startsWith("file_"),T,I,N,R=n[486].nodePath&&Vu(n);function M(){return n[278](n[486])}let A=E&&Zu(n);return{c(){e=f("div"),t=f("span"),i=F(l),o=w(),R&&R.c(),s=w(),c=f("span"),d=F(u),p=w(),h=f("span"),g=F(m),b=w(),v=f("button"),v.textContent=`${k("common.open")}`,y=w(),A&&A.c(),T=w(),r(t,"class","suggestion-event-time svelte-1uu9qhk"),r(c,"class","suggestion-event-type svelte-1uu9qhk"),r(h,"class","suggestion-event-title svelte-1uu9qhk"),r(v,"class","link-btn svelte-1uu9qhk"),r(e,"class","suggestion-detail-event svelte-1uu9qhk")},m(L,j){C(L,e,j),a(e,t),a(t,i),a(e,o),R&&R.m(e,null),a(e,s),a(e,c),a(c,d),a(e,p),a(e,h),a(h,g),a(e,b),a(e,v),a(e,y),A&&A.m(e,null),a(e,T),I||(N=O(v,"click",M),I=!0)},p(L,j){n=L,j[0]&4|j[1]&536870912&&l!==(l=un(n[486].createdAt)+"")&&Q(i,l),n[486].nodePath?R?R.p(n,j):(R=Vu(n),R.c(),R.m(e,s)):R&&(R.d(1),R=null),j[0]&4|j[1]&536870912&&u!==(u=n[194](n[486].eventType)+"")&&Q(d,u),j[0]&4|j[1]&536870912&&m!==(m=n[486].title+"")&&Q(g,m),j[0]&4|j[1]&536870912&&(E=n[486].targetType==="file"||n[486].eventType.startsWith("file_")),E?A?A.p(n,j):(A=Zu(n),A.c(),A.m(e,T)):A&&(A.d(1),A=null)},d(L){L&&S(e),R&&R.d(),A&&A.d(),I=!1,N()}}}function Xu(n){let e,t,l,i,o=n[489].summary+"",s,c,u,d=n[489].suggestedMin+"",p,h,m=k("worklog.min")+"",g,b,v,y,E,T,I,N,R,M,A,L,j,B,U,z,W=n[489].events&&n[489].events.length>0&&Gu(n);function G(){return n[273](n[489])}function X(){return n[274](n[489])}function H(){return n[275](n[489])}function D(){return n[276](n[489],n[490],n[491])}function q(...Y){return n[277](n[489],n[490],n[491],...Y)}let P=n[489]._expanded&&n[489].events&&n[489].events.length>0&&Ku(n);return{c(){e=f("div"),t=f("div"),l=f("div"),i=f("span"),s=F(o),c=w(),u=f("span"),p=F(d),h=w(),g=F(m),W&&W.c(),b=w(),v=f("div"),y=f("span"),I=w(),N=f("button"),N.textContent=`${k("suggest.edit")}`,R=w(),M=f("button"),M.textContent=`${k("worklog.apply")}`,A=w(),L=f("button"),L.textContent=`${k("common.delete")}`,j=w(),P&&P.c(),B=w(),r(i,"class","suggestion-summary svelte-1uu9qhk"),r(u,"class","suggestion-meta svelte-1uu9qhk"),r(l,"class","suggestion-info svelte-1uu9qhk"),r(y,"class","suggestion-confidence-dot svelte-1uu9qhk"),r(y,"title",E=k("suggest.confidence."+n[489].confidence)),r(y,"aria-label",T=k("suggest.confidence."+n[489].confidence)),ce(y,"low",n[489].confidence==="low"),ce(y,"medium",n[489].confidence==="medium"),ce(y,"high",n[489].confidence==="high"),r(N,"class","btn btn-sm svelte-1uu9qhk"),r(M,"class","btn btn-sm btn-primary svelte-1uu9qhk"),r(L,"class","btn btn-sm btn-danger svelte-1uu9qhk"),r(v,"class","suggestion-actions svelte-1uu9qhk"),r(t,"class","suggestion-main svelte-1uu9qhk"),r(t,"role","button"),r(t,"tabindex","0"),r(e,"class","suggestion-card svelte-1uu9qhk"),ce(e,"expanded",n[489]._expanded)},m(Y,Z){C(Y,e,Z),a(e,t),a(t,l),a(l,i),a(i,s),a(l,c),a(l,u),a(u,p),a(u,h),a(u,g),W&&W.m(u,null),a(t,b),a(t,v),a(v,y),a(v,I),a(v,N),a(v,R),a(v,M),a(v,A),a(v,L),a(e,j),P&&P.m(e,null),a(e,B),U||(z=[O(N,"click",Ve(G)),O(M,"click",Ve(X)),O(L,"click",Ve(H)),O(t,"click",D),O(t,"keydown",q)],U=!0)},p(Y,Z){n=Y,Z[0]&4|Z[1]&536870912&&o!==(o=n[489].summary+"")&&Q(s,o),Z[0]&4|Z[1]&536870912&&d!==(d=n[489].suggestedMin+"")&&Q(p,d),n[489].events&&n[489].events.length>0?W?W.p(n,Z):(W=Gu(n),W.c(),W.m(u,null)):W&&(W.d(1),W=null),Z[0]&4|Z[1]&536870912&&E!==(E=k("suggest.confidence."+n[489].confidence))&&r(y,"title",E),Z[0]&4|Z[1]&536870912&&T!==(T=k("suggest.confidence."+n[489].confidence))&&r(y,"aria-label",T),Z[0]&4|Z[1]&536870912&&ce(y,"low",n[489].confidence==="low"),Z[0]&4|Z[1]&536870912&&ce(y,"medium",n[489].confidence==="medium"),Z[0]&4|Z[1]&536870912&&ce(y,"high",n[489].confidence==="high"),n[489]._expanded&&n[489].events&&n[489].events.length>0?P?P.p(n,Z):(P=Ku(n),P.c(),P.m(e,B)):P&&(P.d(1),P=null),Z[0]&4|Z[1]&536870912&&ce(e,"expanded",n[489]._expanded)},d(Y){Y&&S(e),W&&W.d(),P&&P.d(),U=!1,Se(z)}}}function Sy(n){let e,t=Te(n[50]),l=[];for(let i=0;i<t.length;i+=1)l[i]=sf(Vc(n,t,i));return{c(){for(let i=0;i<l.length;i+=1)l[i].c();e=_t()},m(i,o){for(let s=0;s<l.length;s+=1)l[s]&&l[s].m(i,o);C(i,e,o)},p(i,o){if(o[1]&524288|o[4]&2097152|o[5]&9216|o[6]&264|o[7]&16){t=Te(i[50]);let s;for(s=0;s<t.length;s+=1){const c=Vc(i,t,s);l[s]?l[s].p(c,o):(l[s]=sf(c),l[s].c(),l[s].m(e.parentNode,e))}for(;s<l.length;s+=1)l[s].d(1);l.length=t.length}},d(i){i&&S(e),tt(l,i)}}}function Cy(n){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${k("worklog.empty")}`,r(t,"class","svelte-1uu9qhk"),r(e,"class","empty-state svelte-1uu9qhk")},m(l,i){C(l,e,i),a(e,t)},p:ie,d(l){l&&S(e)}}}function Ju(n){let e,t=n[483].nodePath+"",l;return{c(){e=f("span"),l=F(t),r(e,"class","worklog-entry-path svelte-1uu9qhk")},m(i,o){C(i,e,o),a(e,l)},p(i,o){o[1]&524288&&t!==(t=i[483].nodePath+"")&&Q(l,t)},d(i){i&&S(e)}}}function Qu(n){let e;return{c(){e=f("span"),e.textContent=`${k("journal.billableYes")}`,r(e,"class","wl-tag-billable svelte-1uu9qhk")},m(t,l){C(t,e,l)},d(t){t&&S(e)}}}function xu(n){let e;return{c(){e=f("span"),e.textContent=`${k("journal.approxEstimated")}`,r(e,"class","wl-tag-approx svelte-1uu9qhk")},m(t,l){C(t,e,l)},d(t){t&&S(e)}}}function $u(n){let e,t,l,i,o,s,c,u,d,p,h,m,g;function b(){return n[280](n[483])}function v(){return n[281](n[483])}let y=n[483].details&&ef(n);function E(R,M){return R[483].source==="manual"?My:R[483].source==="suggestion"&&R[483]._events&&R[483]._events.length>0?Ry:R[483].source==="suggestion"?Iy:R[483].source==="unknown"||R[483].source==="imported"?Ny:Ay}let T=E(n),I=T(n),N=n[483].source==="suggestion"&&n[483]._events&&n[483]._events.length>0&&tf(n);return{c(){e=f("div"),t=f("div"),l=f("button"),l.textContent=`${k("worklog.editEntry")}`,i=w(),o=f("button"),o.textContent=`${k("worklog.deleteEntry")}`,s=w(),y&&y.c(),c=w(),u=f("div"),d=f("span"),d.textContent=`${k("worklog.source")}`,p=w(),I.c(),h=w(),N&&N.c(),r(l,"class","btn btn-sm svelte-1uu9qhk"),r(o,"class","btn btn-sm btn-danger svelte-1uu9qhk"),r(t,"class","worklog-entry-actions svelte-1uu9qhk"),r(d,"class","wl-detail-label svelte-1uu9qhk"),r(u,"class","wl-detail-section svelte-1uu9qhk"),r(e,"class","worklog-entry-detail svelte-1uu9qhk")},m(R,M){C(R,e,M),a(e,t),a(t,l),a(t,i),a(t,o),a(e,s),y&&y.m(e,null),a(e,c),a(e,u),a(u,d),a(u,p),I.m(u,null),a(e,h),N&&N.m(e,null),m||(g=[O(l,"click",Ve(b)),O(o,"click",Ve(v))],m=!0)},p(R,M){n=R,n[483].details?y?y.p(n,M):(y=ef(n),y.c(),y.m(e,c)):y&&(y.d(1),y=null),T!==(T=E(n))&&(I.d(1),I=T(n),I&&(I.c(),I.m(u,null))),n[483].source==="suggestion"&&n[483]._events&&n[483]._events.length>0?N?N.p(n,M):(N=tf(n),N.c(),N.m(e,null)):N&&(N.d(1),N=null)},d(R){R&&S(e),y&&y.d(),I.d(),N&&N.d(),m=!1,Se(g)}}}function ef(n){let e,t,l,i,o=n[483].details+"",s;return{c(){e=f("div"),t=f("span"),t.textContent=`${k("worklog.details")}`,l=w(),i=f("p"),s=F(o),r(t,"class","wl-detail-label svelte-1uu9qhk"),r(i,"class","svelte-1uu9qhk"),r(e,"class","wl-detail-section svelte-1uu9qhk")},m(c,u){C(c,e,u),a(e,t),a(e,l),a(e,i),a(i,s)},p(c,u){u[1]&524288&&o!==(o=c[483].details+"")&&Q(s,o)},d(c){c&&S(e)}}}function Ay(n){let e;return{c(){e=f("p"),e.textContent=`${k("worklog.sourceUnknown")}`,r(e,"class","svelte-1uu9qhk")},m(t,l){C(t,e,l)},d(t){t&&S(e)}}}function Ny(n){let e;return{c(){e=f("p"),e.textContent=`${k("worklog.sourceUnknown")}`,r(e,"class","svelte-1uu9qhk")},m(t,l){C(t,e,l)},d(t){t&&S(e)}}}function Iy(n){let e;return{c(){e=f("p"),e.textContent=`${k("worklog.sourceSuggestionNoEvents")}`,r(e,"class","svelte-1uu9qhk")},m(t,l){C(t,e,l)},d(t){t&&S(e)}}}function Ry(n){let e;return{c(){e=f("p"),e.textContent=`${k("worklog.sourceSuggestion")}`,r(e,"class","svelte-1uu9qhk")},m(t,l){C(t,e,l)},d(t){t&&S(e)}}}function My(n){let e;return{c(){e=f("p"),e.textContent=`${k("worklog.sourceManual")}`,r(e,"class","svelte-1uu9qhk")},m(t,l){C(t,e,l)},d(t){t&&S(e)}}}function tf(n){let e,t,l,i=Te(n[483]._events),o=[];for(let s=0;s<i.length;s+=1)o[s]=lf(Zc(n,i,s));return{c(){e=f("div"),t=f("span"),t.textContent=`${k("journal.relatedEvents")}`,l=w();for(let s=0;s<o.length;s+=1)o[s].c();r(t,"class","wl-detail-label svelte-1uu9qhk"),r(e,"class","wl-detail-section svelte-1uu9qhk")},m(s,c){C(s,e,c),a(e,t),a(e,l);for(let u=0;u<o.length;u+=1)o[u]&&o[u].m(e,null)},p(s,c){if(c[1]&524288|c[4]&2097152|c[6]&256|c[7]&16){i=Te(s[483]._events);let u;for(u=0;u<i.length;u+=1){const d=Zc(s,i,u);o[u]?o[u].p(d,c):(o[u]=lf(d),o[u].c(),o[u].m(e,null))}for(;u<o.length;u+=1)o[u].d(1);o.length=i.length}},d(s){s&&S(e),tt(o,s)}}}function nf(n){let e,t,l;function i(){return n[283](n[486])}return{c(){e=f("button"),e.textContent=`${k("file.showInExplorer")}`,r(e,"class","link-btn svelte-1uu9qhk")},m(o,s){C(o,e,s),t||(l=O(e,"click",i),t=!0)},p(o,s){n=o},d(o){o&&S(e),t=!1,l()}}}function lf(n){let e,t,l=un(n[486].createdAt)+"",i,o,s,c=n[194](n[486].eventType)+"",u,d,p,h=n[486].title+"",m,g,b,v,y=n[486].targetType==="file"||n[486].eventType.startsWith("file_"),E,T,I;function N(){return n[282](n[486])}let R=y&&nf(n);return{c(){e=f("div"),t=f("span"),i=F(l),o=w(),s=f("span"),u=F(c),d=w(),p=f("span"),m=F(h),g=w(),b=f("button"),b.textContent=`${k("common.open")}`,v=w(),R&&R.c(),E=w(),r(t,"class","journal-event-time svelte-1uu9qhk"),r(s,"class","journal-event-type svelte-1uu9qhk"),r(p,"class","journal-event-title svelte-1uu9qhk"),r(b,"class","link-btn svelte-1uu9qhk"),r(e,"class","journal-event-row svelte-1uu9qhk")},m(M,A){C(M,e,A),a(e,t),a(t,i),a(e,o),a(e,s),a(s,u),a(e,d),a(e,p),a(p,m),a(e,g),a(e,b),a(e,v),R&&R.m(e,null),a(e,E),T||(I=O(b,"click",N),T=!0)},p(M,A){n=M,A[1]&524288&&l!==(l=un(n[486].createdAt)+"")&&Q(i,l),A[1]&524288&&c!==(c=n[194](n[486].eventType)+"")&&Q(u,c),A[1]&524288&&h!==(h=n[486].title+"")&&Q(m,h),A[1]&524288&&(y=n[486].targetType==="file"||n[486].eventType.startsWith("file_")),y?R?R.p(n,A):(R=nf(n),R.c(),R.m(e,E)):R&&(R.d(1),R=null)},d(M){M&&S(e),R&&R.d(),T=!1,I()}}}function sf(n){let e,t,l,i=n[483]._expanded?"▾":"▸",o,s,c,u=n[483].summary+"",d,p,h,m,g=n[483].minutes+"",b,v,y=k("worklog.min")+"",E,T,I,N,R,M=n[483].date+"",A,L,j,B,U,z=n[483].nodePath&&Ju(n),W=n[483].billable&&Qu(),G=n[483].approximate&&xu(),X=n[483]._expanded&&$u(n);function H(){return n[284](n[483])}function D(...q){return n[285](n[483],...q)}return{c(){e=f("div"),t=f("div"),l=f("span"),o=F(i),s=w(),c=f("span"),d=F(u),p=w(),z&&z.c(),h=w(),m=f("span"),b=F(g),v=w(),E=F(y),T=w(),W&&W.c(),I=w(),G&&G.c(),N=w(),R=f("span"),A=F(M),L=w(),X&&X.c(),j=w(),r(l,"class","worklog-toggle svelte-1uu9qhk"),r(c,"class","worklog-entry-summary svelte-1uu9qhk"),r(m,"class","worklog-entry-mins svelte-1uu9qhk"),r(R,"class","worklog-entry-date svelte-1uu9qhk"),r(t,"class","worklog-entry-head svelte-1uu9qhk"),r(e,"class","worklog-entry svelte-1uu9qhk"),r(e,"role","button"),r(e,"tabindex","0"),ce(e,"expanded",n[483]._expanded)},m(q,P){C(q,e,P),a(e,t),a(t,l),a(l,o),a(t,s),a(t,c),a(c,d),a(t,p),z&&z.m(t,null),a(t,h),a(t,m),a(m,b),a(m,v),a(m,E),a(t,T),W&&W.m(t,null),a(t,I),G&&G.m(t,null),a(t,N),a(t,R),a(R,A),a(e,L),X&&X.m(e,null),a(e,j),B||(U=[O(e,"click",H),O(e,"keydown",D)],B=!0)},p(q,P){n=q,P[1]&524288&&i!==(i=n[483]._expanded?"▾":"▸")&&Q(o,i),P[1]&524288&&u!==(u=n[483].summary+"")&&Q(d,u),n[483].nodePath?z?z.p(n,P):(z=Ju(n),z.c(),z.m(t,h)):z&&(z.d(1),z=null),P[1]&524288&&g!==(g=n[483].minutes+"")&&Q(b,g),n[483].billable?W||(W=Qu(),W.c(),W.m(t,I)):W&&(W.d(1),W=null),n[483].approximate?G||(G=xu(),G.c(),G.m(t,N)):G&&(G.d(1),G=null),P[1]&524288&&M!==(M=n[483].date+"")&&Q(A,M),n[483]._expanded?X?X.p(n,P):(X=$u(n),X.c(),X.m(e,j)):X&&(X.d(1),X=null),P[1]&524288&&ce(e,"expanded",n[483]._expanded)},d(q){q&&S(e),z&&z.d(),W&&W.d(),G&&G.d(),X&&X.d(),B=!1,Se(U)}}}function Ly(n){let e,t=Te(n[49]),l=[];for(let i=0;i<t.length;i+=1)l[i]=of(Jc(n,t,i));return{c(){for(let i=0;i<l.length;i+=1)l[i].c();e=_t()},m(i,o){for(let s=0;s<l.length;s+=1)l[s]&&l[s].m(i,o);C(i,e,o)},p(i,o){if(o[1]&262144|o[7]&6){t=Te(i[49]);let s;for(s=0;s<t.length;s+=1){const c=Jc(i,t,s);l[s]?l[s].p(c,o):(l[s]=of(c),l[s].c(),l[s].m(e.parentNode,e))}for(;s<l.length;s+=1)l[s].d(1);l.length=t.length}},d(i){i&&S(e),tt(l,i)}}}function Oy(n){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${k("action.noActions")}`,r(t,"class","svelte-1uu9qhk"),r(e,"class","empty-state svelte-1uu9qhk")},m(l,i){C(l,e,i),a(e,t)},p:ie,d(l){l&&S(e)}}}function of(n){let e,t,l,i=n[480].title+"",o,s,c,u=n[219](n[480].type)+"",d,p,h,m=n[480].data+"",g,b,v,y,E,T,I,N,R;function M(){return n[269](n[480])}function A(){return n[270](n[480])}return{c(){e=f("div"),t=f("div"),l=f("span"),o=F(i),s=w(),c=f("span"),d=F(u),p=w(),h=f("span"),g=F(m),b=w(),v=f("div"),y=f("button"),y.textContent=`${k("action.run")}`,E=w(),T=f("button"),T.innerHTML='<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" class="svelte-1uu9qhk"><polyline points="3 6 5 6 21 6" class="svelte-1uu9qhk"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" class="svelte-1uu9qhk"></path></svg>',I=w(),r(l,"class","action-title svelte-1uu9qhk"),r(c,"class","action-type svelte-1uu9qhk"),r(h,"class","action-data svelte-1uu9qhk"),r(t,"class","action-info svelte-1uu9qhk"),r(y,"class","btn btn-sm svelte-1uu9qhk"),r(T,"class","btn btn-sm btn-danger svelte-1uu9qhk"),r(v,"class","action-btns svelte-1uu9qhk"),r(e,"class","action-card svelte-1uu9qhk")},m(L,j){C(L,e,j),a(e,t),a(t,l),a(l,o),a(t,s),a(t,c),a(c,d),a(t,p),a(t,h),a(h,g),a(e,b),a(e,v),a(v,y),a(v,E),a(v,T),a(e,I),N||(R=[O(y,"click",M),O(T,"click",A)],N=!0)},p(L,j){n=L,j[1]&262144&&i!==(i=n[480].title+"")&&Q(o,i),j[1]&262144&&u!==(u=n[219](n[480].type)+"")&&Q(d,u),j[1]&262144&&m!==(m=n[480].data+"")&&Q(g,m)},d(L){L&&S(e),N=!1,Se(R)}}}function Dy(n){let e,t=Te(n[69]),l=[];for(let i=0;i<t.length;i+=1)l[i]=af(Qc(n,t,i));return{c(){e=f("div");for(let i=0;i<l.length;i+=1)l[i].c();r(e,"class","links-list svelte-1uu9qhk")},m(i,o){C(i,e,o);for(let s=0;s<l.length;s+=1)l[s]&&l[s].m(e,null)},p(i,o){if(o[2]&128|o[6]&478150656){t=Te(i[69]);let s;for(s=0;s<t.length;s+=1){const c=Qc(i,t,s);l[s]?l[s].p(c,o):(l[s]=af(c),l[s].c(),l[s].m(e,null))}for(;s<l.length;s+=1)l[s].d(1);l.length=t.length}},d(i){i&&S(e),tt(l,i)}}}function Py(n){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${k("links.empty")}`,r(t,"class","svelte-1uu9qhk"),r(e,"class","empty-state svelte-1uu9qhk")},m(l,i){C(l,e,i),a(e,t)},p:ie,d(l){l&&S(e)}}}function rf(n){let e,t=n[477].note+"",l;return{c(){e=f("span"),l=F(t),r(e,"class","link-note svelte-1uu9qhk")},m(i,o){C(i,e,o),a(e,l)},p(i,o){o[2]&128&&t!==(t=i[477].note+"")&&Q(l,t)},d(i){i&&S(e)}}}function af(n){let e,t,l,i=n[477].title+"",o,s,c,u=(n[477].hostname||n[477].url)+"",d,p,h,m,g=Un(n[477].createdAt)+"",b,v,y,E,T,I,N,R,M,A,L,j,B,U,z=n[477].note&&rf(n);function W(){return n[265](n[477])}function G(){return n[266](n[477])}function X(){return n[267](n[477])}function H(){return n[268](n[477])}return{c(){e=f("div"),t=f("div"),l=f("span"),o=F(i),s=w(),c=f("span"),d=F(u),h=w(),m=f("span"),b=F(g),v=w(),z&&z.c(),y=w(),E=f("div"),T=f("button"),T.textContent=`${k("common.open")}`,I=w(),N=f("button"),N.textContent=`${k("links.copyUrl")}`,R=w(),M=f("button"),M.textContent=`${k("common.rename")}`,A=w(),L=f("button"),L.textContent=`${k("common.delete")}`,j=w(),r(l,"class","link-title svelte-1uu9qhk"),r(c,"class","link-url svelte-1uu9qhk"),r(c,"title",p=n[477].url),r(m,"class","link-date svelte-1uu9qhk"),r(t,"class","link-main svelte-1uu9qhk"),r(T,"class","btn btn-sm btn-primary svelte-1uu9qhk"),r(N,"class","btn btn-sm svelte-1uu9qhk"),r(M,"class","btn btn-sm svelte-1uu9qhk"),r(L,"class","btn btn-sm btn-danger svelte-1uu9qhk"),r(E,"class","link-actions svelte-1uu9qhk"),r(e,"class","link-card svelte-1uu9qhk")},m(D,q){C(D,e,q),a(e,t),a(t,l),a(l,o),a(t,s),a(t,c),a(c,d),a(t,h),a(t,m),a(m,b),a(t,v),z&&z.m(t,null),a(e,y),a(e,E),a(E,T),a(E,I),a(E,N),a(E,R),a(E,M),a(E,A),a(E,L),a(e,j),B||(U=[O(T,"click",W),O(N,"click",G),O(M,"click",X),O(L,"click",H)],B=!0)},p(D,q){n=D,q[2]&128&&i!==(i=n[477].title+"")&&Q(o,i),q[2]&128&&u!==(u=(n[477].hostname||n[477].url)+"")&&Q(d,u),q[2]&128&&p!==(p=n[477].url)&&r(c,"title",p),q[2]&128&&g!==(g=Un(n[477].createdAt)+"")&&Q(b,g),n[477].note?z?z.p(n,q):(z=rf(n),z.c(),z.m(t,null)):z&&(z.d(1),z=null)},d(D){D&&S(e),z&&z.d(),B=!1,Se(U)}}}function cf(n){let e,t;return{c(){e=f("div"),t=F(n[74]),r(e,"class","link-status svelte-1uu9qhk")},m(l,i){C(l,e,i),a(e,t)},p(l,i){i[2]&4096&&Q(t,l[74])},d(l){l&&S(e)}}}function qy(n){let e,t=Te(n[66]),l=[];for(let i=0;i<t.length;i+=1)l[i]=uf(xc(n,t,i));return{c(){e=f("div");for(let i=0;i<l.length;i+=1)l[i].c();r(e,"class","inbox-list svelte-1uu9qhk")},m(i,o){C(i,e,o);for(let s=0;s<l.length;s+=1)l[s]&&l[s].m(e,null)},p(i,o){if(o[2]&16|o[4]&6291456|o[6]&6359040){t=Te(i[66]);let s;for(s=0;s<t.length;s+=1){const c=xc(i,t,s);l[s]?l[s].p(c,o):(l[s]=uf(c),l[s].c(),l[s].m(e,null))}for(;s<l.length;s+=1)l[s].d(1);l.length=t.length}},d(i){i&&S(e),tt(l,i)}}}function jy(n){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${k("inbox.localEmpty")}`,r(t,"class","svelte-1uu9qhk"),r(e,"class","empty-state svelte-1uu9qhk")},m(l,i){C(l,e,i),a(e,t)},p:ie,d(l){l&&S(e)}}}function zy(n){let e;return{c(){e=f("span"),r(e,"class","inbox-icon-slot svelte-1uu9qhk"),r(e,"aria-hidden","true")},m(t,l){C(t,e,l)},p:ie,d(t){t&&S(e)}}}function By(n){let e,t=Tt("showInExplorer")+"",l,i;function o(){return n[261](n[474])}return{c(){e=f("button"),r(e,"class","inbox-icon-btn svelte-1uu9qhk"),r(e,"title",k("file.showInExplorer")),r(e,"aria-label",k("file.showInExplorer"))},m(s,c){C(s,e,c),e.innerHTML=t,l||(i=O(e,"click",Ve(o)),l=!0)},p(s,c){n=s},d(s){s&&S(e),l=!1,i()}}}function uf(n){let e,t,l,i=n[474].title+"",o,s,c,u=n[197](n[474])+"",d,p,h,m,g=Tt("attach")+"",b,v,y=Tt("move")+"",E,T,I=Tt("open")+"",N,R,M,A,L=Tt("delete")+"",j,B,U;function z(){return n[258](n[474])}function W(){return n[259](n[474])}function G(){return n[260](n[474])}function X(Z,J){return J[2]&16&&(R=null),R==null&&(R=!!Qs(Z[474])),R?By:zy}let H=X(n,[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]),D=H(n);function q(){return n[262](n[474])}function P(){return n[263](n[474])}function Y(...Z){return n[264](n[474],...Z)}return{c(){e=f("div"),t=f("div"),l=f("span"),o=F(i),s=w(),c=f("span"),d=F(u),p=w(),h=f("div"),m=f("button"),b=w(),v=f("button"),E=w(),T=f("button"),N=w(),D.c(),M=w(),A=f("button"),j=w(),r(l,"class","inbox-item-title svelte-1uu9qhk"),r(c,"class","inbox-item-meta svelte-1uu9qhk"),r(t,"class","inbox-item-main svelte-1uu9qhk"),r(m,"class","inbox-icon-btn inbox-icon-btn-primary svelte-1uu9qhk"),r(m,"title",k("inbox.keepHere")),r(m,"aria-label",k("inbox.keepHere")),r(v,"class","inbox-icon-btn svelte-1uu9qhk"),r(v,"title",k("inbox.assign")),r(v,"aria-label",k("inbox.assign")),r(T,"class","inbox-icon-btn svelte-1uu9qhk"),r(T,"title",k("common.open")),r(T,"aria-label",k("common.open")),r(A,"class","inbox-icon-btn inbox-icon-btn-danger svelte-1uu9qhk"),r(A,"title",k("common.delete")),r(A,"aria-label",k("common.delete")),r(h,"class","inbox-item-actions svelte-1uu9qhk"),r(e,"class","inbox-item svelte-1uu9qhk"),r(e,"role","button"),r(e,"tabindex","0")},m(Z,J){C(Z,e,J),a(e,t),a(t,l),a(l,o),a(t,s),a(t,c),a(c,d),a(e,p),a(e,h),a(h,m),m.innerHTML=g,a(h,b),a(h,v),v.innerHTML=y,a(h,E),a(h,T),T.innerHTML=I,a(h,N),D.m(h,null),a(h,M),a(h,A),A.innerHTML=L,a(e,j),B||(U=[O(m,"click",Ve(z)),O(v,"click",Ve(W)),O(T,"click",Ve(G)),O(A,"click",Ve(q)),O(e,"click",P),O(e,"keydown",Y)],B=!0)},p(Z,J){n=Z,J[2]&16&&i!==(i=n[474].title+"")&&Q(o,i),J[2]&16&&u!==(u=n[197](n[474])+"")&&Q(d,u),H===(H=X(n,J))&&D?D.p(n,J):(D.d(1),D=H(n),D&&(D.c(),D.m(h,M)))},d(Z){Z&&S(e),D.d(),B=!1,Se(U)}}}function Fy(n){let e,t=n[37].title+"",l,i,o,s,c,u,d,p=n[37].dirty&&ff();return{c(){e=f("span"),l=F(t),i=w(),o=f("button"),o.innerHTML='<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1uu9qhk"><path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z" class="svelte-1uu9qhk"></path></svg>',s=w(),p&&p.c(),c=_t(),r(e,"class","note-title svelte-1uu9qhk"),r(o,"class","btn btn-sm note-rename-btn svelte-1uu9qhk"),r(o,"title",k("common.rename"))},m(h,m){C(h,e,m),a(e,l),C(h,i,m),C(h,o,m),C(h,s,m),p&&p.m(h,m),C(h,c,m),u||(d=O(o,"click",n[244]),u=!0)},p(h,m){m[1]&64&&t!==(t=h[37].title+"")&&Q(l,t),h[37].dirty?p||(p=ff(),p.c(),p.m(c.parentNode,c)):p&&(p.d(1),p=null)},d(h){h&&(S(e),S(i),S(o),S(s),S(c)),p&&p.d(h),u=!1,d()}}}function Uy(n){let e,t,l,i,o,s,c,u;return{c(){e=f("div"),t=f("input"),l=w(),i=f("button"),i.textContent=`${k("common.save")}`,o=w(),s=f("button"),s.textContent=`${k("common.cancel")}`,r(t,"type","text"),r(t,"class","note-rename-input svelte-1uu9qhk"),r(i,"class","btn btn-primary btn-sm svelte-1uu9qhk"),r(s,"class","btn btn-sm svelte-1uu9qhk"),r(e,"class","note-rename-inline svelte-1uu9qhk")},m(d,p){C(d,e,p),a(e,t),Me(t,n[48]),a(e,l),a(e,i),a(e,o),a(e,s),c||(u=[O(t,"input",n[242]),O(t,"keydown",n[243]),O(i,"click",n[159]),O(s,"click",n[158])],c=!0)},p(d,p){p[1]&131072&&t.value!==d[48]&&Me(t,d[48])},d(d){d&&S(e),c=!1,Se(u)}}}function ff(n){let e;return{c(){e=f("span"),e.textContent="●",r(e,"class","dirty-mark svelte-1uu9qhk")},m(t,l){C(t,e,l)},d(t){t&&S(e)}}}function df(n){let e,t,l,i,o,s,c,u,d,p,h,m,g,b,v,y,E,T,I,N,R,M,A,L,j,B,U=k("common.create")+"",z,W,G,X,H,D,q,P=n[82]&&pf(n);h=new Zi({props:{kind:"folder",size:24}});let Y=Te(n[15]),Z=[];for(let te=0;te<Y.length;te+=1)Z[te]=hf(Lc(n,Y,te));const J=te=>be(Z[te],1,1,()=>{Z[te]=null});return{c(){e=f("div"),t=f("div"),l=f("h3"),l.textContent=`${k("nav.createNode")}`,i=w(),P&&P.c(),o=w(),s=f("div"),c=f("span"),c.textContent=`${k("template.select")}`,u=w(),d=f("div"),p=f("button"),Ge(h.$$.fragment),m=w(),g=f("div"),b=f("span"),b.textContent=`${k("template.optionNone")}`,v=w(),y=f("span"),y.textContent=`${k("template.none.desc")}`,E=w();for(let te=0;te<Z.length;te+=1)Z[te].c();T=w(),I=f("div"),N=f("label"),R=f("span"),R.textContent=`${k("common.name")}`,M=w(),A=f("input"),L=w(),j=f("div"),B=f("button"),z=F(U),G=w(),X=f("button"),X.textContent=`${k("common.cancel")}`,r(l,"class","svelte-1uu9qhk"),r(c,"class","form-label svelte-1uu9qhk"),r(b,"class","template-card-title svelte-1uu9qhk"),r(y,"class","template-card-desc svelte-1uu9qhk"),r(g,"class","template-card-text svelte-1uu9qhk"),r(p,"class","template-card svelte-1uu9qhk"),ce(p,"selected",n[83]===null),r(d,"class","template-cards svelte-1uu9qhk"),r(d,"role","group"),r(d,"aria-label",k("template.select")),r(s,"class","form-group svelte-1uu9qhk"),r(R,"class","label-text svelte-1uu9qhk"),r(A,"type","text"),r(A,"placeholder",k("case.namePlaceholder")),r(A,"class","svelte-1uu9qhk"),r(N,"class","svelte-1uu9qhk"),r(I,"class","form-group svelte-1uu9qhk"),r(B,"class","btn btn-primary svelte-1uu9qhk"),B.disabled=W=!n[81].trim()||n[83]===void 0,r(X,"class","btn svelte-1uu9qhk"),r(j,"class","modal-actions svelte-1uu9qhk"),r(t,"class","modal modal-create svelte-1uu9qhk"),r(e,"class","modal-overlay svelte-1uu9qhk"),r(e,"role","button"),r(e,"tabindex","0")},m(te,ne){C(te,e,ne),a(e,t),a(t,l),a(t,i),P&&P.m(t,null),a(t,o),a(t,s),a(s,c),a(s,u),a(s,d),a(d,p),He(h,p,null),a(p,m),a(p,g),a(g,b),a(g,v),a(g,y),a(d,E);for(let le=0;le<Z.length;le+=1)Z[le]&&Z[le].m(d,null);a(t,T),a(t,I),a(I,N),a(N,R),a(N,M),a(N,A),Me(A,n[81]),a(t,L),a(t,j),a(j,B),a(B,z),a(j,G),a(j,X),H=!0,D||(q=[O(p,"click",n[353]),O(A,"input",n[355]),O(A,"keydown",n[356]),O(B,"click",n[135]),O(X,"click",n[134]),O(e,"click",Jt(n[134])),O(e,"keydown",Hn(n[134]))],D=!0)},p(te,ne){if(te[82]?P?P.p(te,ne):(P=pf(te),P.c(),P.m(t,o)):P&&(P.d(1),P=null),(!H||ne[2]&2097152)&&ce(p,"selected",te[83]===null),ne[0]&32768|ne[2]&2097152){Y=Te(te[15]);let le;for(le=0;le<Y.length;le+=1){const me=Lc(te,Y,le);Z[le]?(Z[le].p(me,ne),fe(Z[le],1)):(Z[le]=hf(me),Z[le].c(),fe(Z[le],1),Z[le].m(d,null))}for(ft(),le=Y.length;le<Z.length;le+=1)J(le);dt()}ne[2]&524288&&A.value!==te[81]&&Me(A,te[81]),(!H||ne[2]&2621440&&W!==(W=!te[81].trim()||te[83]===void 0))&&(B.disabled=W)},i(te){if(!H){fe(h.$$.fragment,te);for(let ne=0;ne<Y.length;ne+=1)fe(Z[ne]);H=!0}},o(te){be(h.$$.fragment,te),Z=Z.filter(Xd);for(let ne=0;ne<Z.length;ne+=1)be(Z[ne]);H=!1},d(te){te&&S(e),P&&P.d(),We(h),tt(Z,te),D=!1,Se(q)}}}function pf(n){let e,t=k("nav.createInside")+"",l,i,o=n[82].title+"",s,c;return{c(){e=f("div"),l=F(t),i=F(" «"),s=F(o),c=F("»"),r(e,"class","create-context svelte-1uu9qhk")},m(u,d){C(u,e,d),a(e,l),a(e,i),a(e,s),a(e,c)},p(u,d){d[2]&1048576&&o!==(o=u[82].title+"")&&Q(s,o)},d(u){u&&S(e)}}}function hf(n){let e,t,l,i,o,s=k(n[469].title)+"",c,u,d,p=k(n[469].title+".desc")+"",h,m,g,b,v;t=new Zi({props:{kind:n[469].icon||"generic",size:24}});function y(){return n[354](n[469])}return{c(){var E;e=f("button"),Ge(t.$$.fragment),l=w(),i=f("div"),o=f("span"),c=F(s),u=w(),d=f("span"),h=F(p),m=w(),r(o,"class","template-card-title svelte-1uu9qhk"),r(d,"class","template-card-desc svelte-1uu9qhk"),r(i,"class","template-card-text svelte-1uu9qhk"),r(e,"class","template-card svelte-1uu9qhk"),ce(e,"selected",((E=n[83])==null?void 0:E.id)===n[469].id)},m(E,T){C(E,e,T),He(t,e,null),a(e,l),a(e,i),a(i,o),a(o,c),a(i,u),a(i,d),a(d,h),a(e,m),g=!0,b||(v=O(e,"click",y),b=!0)},p(E,T){var N;n=E;const I={};T[0]&32768&&(I.kind=n[469].icon||"generic"),t.$set(I),(!g||T[0]&32768)&&s!==(s=k(n[469].title)+"")&&Q(c,s),(!g||T[0]&32768)&&p!==(p=k(n[469].title+".desc")+"")&&Q(h,p),(!g||T[0]&32768|T[2]&2097152)&&ce(e,"selected",((N=n[83])==null?void 0:N.id)===n[469].id)},i(E){g||(fe(t.$$.fragment,E),g=!0)},o(E){be(t.$$.fragment,E),g=!1},d(E){E&&S(e),We(t),b=!1,v()}}}function mf(n){let e,t,l=n[84].node&&["folder","project","client","document","recipe"].includes(n[84].node.type),i,o,s,c,u,d,p,h,m,g,b=l&&gf(n),v=n[84].node&&n[84].node.parent_id&&bf(n);return{c(){e=f("div"),t=f("div"),b&&b.c(),i=w(),v&&v.c(),o=w(),s=f("button"),s.textContent=`${k("common.rename")}`,c=w(),u=f("button"),u.textContent=`${k("common.delete")}`,d=w(),p=f("button"),p.textContent=`${k("file.showInExplorer")}`,r(s,"class","context-menu-item svelte-1uu9qhk"),r(u,"class","context-menu-item danger svelte-1uu9qhk"),r(p,"class","context-menu-item svelte-1uu9qhk"),r(t,"class","context-menu svelte-1uu9qhk"),an(t,"left",n[84].x+"px"),an(t,"top",n[84].y+"px"),r(e,"class","context-menu-backdrop svelte-1uu9qhk"),r(e,"role","button"),r(e,"tabindex","0")},m(y,E){C(y,e,E),a(e,t),b&&b.m(t,null),a(t,i),v&&v.m(t,null),a(t,o),a(t,s),a(t,c),a(t,u),a(t,d),a(t,p),h=!0,m||(g=[O(s,"click",n[359]),O(u,"click",n[360]),O(p,"click",n[361]),O(e,"click",n[137]),O(e,"contextmenu",Wi(n[137])),O(e,"keydown",Hn(n[137]))],m=!0)},p(y,E){E[2]&4194304&&(l=y[84].node&&["folder","project","client","document","recipe"].includes(y[84].node.type)),l?b?(b.p(y,E),E[2]&4194304&&fe(b,1)):(b=gf(y),b.c(),fe(b,1),b.m(t,i)):b&&(ft(),be(b,1,1,()=>{b=null}),dt()),y[84].node&&y[84].node.parent_id?v?v.p(y,E):(v=bf(y),v.c(),v.m(t,o)):v&&(v.d(1),v=null),(!h||E[2]&4194304)&&an(t,"left",y[84].x+"px"),(!h||E[2]&4194304)&&an(t,"top",y[84].y+"px")},i(y){h||(fe(b),h=!0)},o(y){be(b),h=!1},d(y){y&&S(e),b&&b.d(),v&&v.d(),m=!1,Se(g)}}}function gf(n){let e,t,l,i,o,s=Te(n[15].length>0?n[15]:[{id:"",title:"template.optionNone",icon:"folder"}]),c=[];for(let d=0;d<s.length;d+=1)c[d]=_f(Mc(n,s,d));const u=d=>be(c[d],1,1,()=>{c[d]=null});return{c(){e=f("div"),e.textContent=`${k("common.create")}`,t=w();for(let d=0;d<c.length;d+=1)c[d].c();l=w(),i=f("div"),r(e,"class","context-menu-section svelte-1uu9qhk"),r(i,"class","context-menu-divider svelte-1uu9qhk")},m(d,p){C(d,e,p),C(d,t,p);for(let h=0;h<c.length;h+=1)c[h]&&c[h].m(d,p);C(d,l,p),C(d,i,p),o=!0},p(d,p){if(p[0]&32768|p[4]&256){s=Te(d[15].length>0?d[15]:[{id:"",title:"template.optionNone",icon:"folder"}]);let h;for(h=0;h<s.length;h+=1){const m=Mc(d,s,h);c[h]?(c[h].p(m,p),fe(c[h],1)):(c[h]=_f(m),c[h].c(),fe(c[h],1),c[h].m(l.parentNode,l))}for(ft(),h=s.length;h<c.length;h+=1)u(h);dt()}},i(d){if(!o){for(let p=0;p<s.length;p+=1)fe(c[p]);o=!0}},o(d){c=c.filter(Xd);for(let p=0;p<c.length;p+=1)be(c[p]);o=!1},d(d){d&&(S(e),S(t),S(l),S(i)),tt(c,d)}}}function _f(n){let e,t,l,i,o=k(n[469].title)+"",s,c,u,d;t=new Zi({props:{kind:n[469].icon||"folder",size:16}});function p(){return n[357](n[469])}return{c(){e=f("button"),Ge(t.$$.fragment),l=w(),i=f("span"),s=F(o),r(i,"class","svelte-1uu9qhk"),r(e,"class","context-menu-item svelte-1uu9qhk")},m(h,m){C(h,e,m),He(t,e,null),a(e,l),a(e,i),a(i,s),c=!0,u||(d=O(e,"click",p),u=!0)},p(h,m){n=h;const g={};m[0]&32768&&(g.kind=n[469].icon||"folder"),t.$set(g),(!c||m[0]&32768)&&o!==(o=k(n[469].title)+"")&&Q(s,o)},i(h){c||(fe(t.$$.fragment,h),c=!0)},o(h){be(t.$$.fragment,h),c=!1},d(h){h&&S(e),We(t),u=!1,d()}}}function bf(n){let e,t,l,i,o;return{c(){e=f("button"),e.textContent=`${k("nav.moveToRoot")}`,t=w(),l=f("div"),r(e,"class","context-menu-item svelte-1uu9qhk"),r(l,"class","context-menu-divider svelte-1uu9qhk")},m(s,c){C(s,e,c),C(s,t,c),C(s,l,c),i||(o=O(e,"click",n[358]),i=!0)},p:ie,d(s){s&&(S(e),S(t),S(l)),i=!1,o()}}}function kf(n){let e,t,l,i=(n[59]?k("worklog.acceptSuggestion"):n[58]?k("worklog.editEntry"):k("worklog.addEntry"))+"",o,s,c,u,d,p,h,m,g,b,v,y,E,T,I,N,R,M,A,L,j,B,U,z,W,G,X,H,D,q,P,Y,Z,J,te,ne,le,me,oe,ze=k("common.save")+"",Ye,Re,ee,re,Ne,Be;return{c(){e=f("div"),t=f("div"),l=f("h3"),o=F(i),s=w(),c=f("div"),u=f("label"),d=f("span"),d.textContent=`${k("worklog.date")}`,p=w(),h=f("input"),m=w(),g=f("div"),b=f("label"),v=f("span"),v.textContent=`${k("worklog.whatDone")}`,y=w(),E=f("input"),T=w(),I=f("div"),N=f("label"),R=f("span"),R.textContent=`${k("worklog.minutes")}`,M=w(),A=f("input"),L=w(),j=f("div"),B=f("label"),U=f("span"),U.textContent=`${k("worklog.details")}`,z=w(),W=f("textarea"),G=w(),X=f("div"),H=f("label"),D=f("input"),q=w(),P=f("span"),P.textContent=`${k("journal.billableYes")}`,Y=w(),Z=f("label"),J=f("input"),te=w(),ne=f("span"),ne.textContent=`${k("journal.approxEstimated")}`,le=w(),me=f("div"),oe=f("button"),Ye=F(ze),ee=w(),re=f("button"),re.textContent=`${k("common.cancel")}`,r(l,"class","svelte-1uu9qhk"),r(d,"class","label-text svelte-1uu9qhk"),r(h,"type","date"),r(h,"class","svelte-1uu9qhk"),r(u,"class","svelte-1uu9qhk"),r(c,"class","form-group svelte-1uu9qhk"),r(v,"class","label-text svelte-1uu9qhk"),r(E,"type","text"),r(E,"placeholder",k("worklog.whatDone")),r(E,"class","svelte-1uu9qhk"),r(b,"class","svelte-1uu9qhk"),r(g,"class","form-group svelte-1uu9qhk"),r(R,"class","label-text svelte-1uu9qhk"),r(A,"type","number"),r(A,"min","1"),r(A,"class","svelte-1uu9qhk"),r(N,"class","svelte-1uu9qhk"),r(I,"class","form-group svelte-1uu9qhk"),r(U,"class","label-text svelte-1uu9qhk"),r(W,"class","svelte-1uu9qhk"),r(B,"class","svelte-1uu9qhk"),r(j,"class","form-group svelte-1uu9qhk"),r(D,"type","checkbox"),r(D,"class","svelte-1uu9qhk"),r(P,"class","svelte-1uu9qhk"),r(H,"class","checkbox-label-inline svelte-1uu9qhk"),r(J,"type","checkbox"),r(J,"class","svelte-1uu9qhk"),r(ne,"class","svelte-1uu9qhk"),r(Z,"class","checkbox-label-inline svelte-1uu9qhk"),r(X,"class","form-row svelte-1uu9qhk"),r(oe,"class","btn btn-primary svelte-1uu9qhk"),oe.disabled=Re=!n[52].trim()||!n[53],r(re,"class","btn svelte-1uu9qhk"),r(me,"class","modal-actions svelte-1uu9qhk"),r(t,"class","modal modal-worklog svelte-1uu9qhk"),r(e,"class","modal-overlay svelte-1uu9qhk"),r(e,"role","button"),r(e,"tabindex","0")},m(ve,Ue){C(ve,e,Ue),a(e,t),a(t,l),a(l,o),a(t,s),a(t,c),a(c,u),a(u,d),a(u,p),a(u,h),Me(h,n[54]),a(t,m),a(t,g),a(g,b),a(b,v),a(b,y),a(b,E),Me(E,n[52]),a(t,T),a(t,I),a(I,N),a(N,R),a(N,M),a(N,A),Me(A,n[53]),a(t,L),a(t,j),a(j,B),a(B,U),a(B,z),a(B,W),Me(W,n[55]),a(t,G),a(t,X),a(X,H),a(H,D),D.checked=n[56],a(H,q),a(H,P),a(X,Y),a(X,Z),a(Z,J),J.checked=n[57],a(Z,te),a(Z,ne),a(t,le),a(t,me),a(me,oe),a(oe,Ye),a(me,ee),a(me,re),Ne||(Be=[O(h,"input",n[362]),O(E,"input",n[363]),O(A,"input",n[364]),O(W,"input",n[365]),O(D,"change",n[366]),O(J,"change",n[367]),O(oe,"click",n[167]),O(re,"click",n[166]),O(e,"click",Jt(n[166])),O(e,"keydown",Hn(n[166]))],Ne=!0)},p(ve,Ue){Ue[1]&402653184&&i!==(i=(ve[59]?k("worklog.acceptSuggestion"):ve[58]?k("worklog.editEntry"):k("worklog.addEntry"))+"")&&Q(o,i),Ue[1]&8388608&&Me(h,ve[54]),Ue[1]&2097152&&E.value!==ve[52]&&Me(E,ve[52]),Ue[1]&4194304&&Gl(A.value)!==ve[53]&&Me(A,ve[53]),Ue[1]&16777216&&Me(W,ve[55]),Ue[1]&33554432&&(D.checked=ve[56]),Ue[1]&67108864&&(J.checked=ve[57]),Ue[1]&6291456&&Re!==(Re=!ve[52].trim()||!ve[53])&&(oe.disabled=Re)},d(ve){ve&&S(e),Ne=!1,Se(Be)}}}function vf(n){let e,t,l,i,o,s,c,u,d,p,h,m,g,b,v,y,E,T,I,N=(n[87]==="open_url"?k("action.dataUrl"):n[87]==="open_folder"||n[87]==="open_file"?k("action.dataPath"):k("action.dataCommand"))+"",R,M,A,L,j,B,U,z,W,G,X,H=Te(n[121]),D=[];for(let q=0;q<H.length;q+=1)D[q]=wf(Rc(n,H,q));return{c(){e=f("div"),t=f("div"),l=f("h3"),l.textContent=`${k("action.newAction")}`,i=w(),o=f("div"),s=f("label"),c=f("span"),c.textContent=`${k("common.name")}`,u=w(),d=f("input"),p=w(),h=f("div"),m=f("label"),g=f("span"),g.textContent=`${k("common.type")}`,b=w(),v=f("select");for(let q=0;q<D.length;q+=1)D[q].c();y=w(),E=f("div"),T=f("label"),I=f("span"),R=F(N),M=w(),A=f("input"),j=w(),B=f("div"),U=f("button"),U.textContent=`${k("common.create")}`,z=w(),W=f("button"),W.textContent=`${k("common.cancel")}`,r(l,"class","svelte-1uu9qhk"),r(c,"class","label-text svelte-1uu9qhk"),r(d,"type","text"),r(d,"placeholder",k("action.namePlaceholder")),r(d,"class","svelte-1uu9qhk"),r(s,"class","svelte-1uu9qhk"),r(o,"class","form-group svelte-1uu9qhk"),r(g,"class","label-text svelte-1uu9qhk"),r(v,"class","svelte-1uu9qhk"),n[87]===void 0&&yl(()=>n[370].call(v)),r(m,"class","svelte-1uu9qhk"),r(h,"class","form-group svelte-1uu9qhk"),r(I,"class","label-text svelte-1uu9qhk"),r(A,"type","text"),r(A,"placeholder",L=n[87]==="open_url"?k("action.urlPlaceholder"):n[87]==="open_folder"||n[87]==="open_file"?k("action.pathPlaceholder"):k("action.commandPlaceholder")),r(A,"class","svelte-1uu9qhk"),r(T,"class","svelte-1uu9qhk"),r(E,"class","form-group svelte-1uu9qhk"),r(U,"class","btn btn-primary svelte-1uu9qhk"),r(W,"class","btn svelte-1uu9qhk"),r(B,"class","modal-actions svelte-1uu9qhk"),r(t,"class","modal svelte-1uu9qhk"),r(e,"class","modal-overlay svelte-1uu9qhk"),r(e,"role","button"),r(e,"tabindex","0")},m(q,P){C(q,e,P),a(e,t),a(t,l),a(t,i),a(t,o),a(o,s),a(s,c),a(s,u),a(s,d),Me(d,n[86]),a(t,p),a(t,h),a(h,m),a(m,g),a(m,b),a(m,v);for(let Y=0;Y<D.length;Y+=1)D[Y]&&D[Y].m(v,null);xn(v,n[87],!0),a(t,y),a(t,E),a(E,T),a(T,I),a(I,R),a(T,M),a(T,A),Me(A,n[88]),a(t,j),a(t,B),a(B,U),a(B,z),a(B,W),G||(X=[O(d,"input",n[368]),O(d,"keydown",n[369]),O(v,"change",n[370]),O(A,"input",n[371]),O(A,"keydown",n[372]),O(U,"click",n[217]),O(W,"click",n[216]),O(e,"click",Jt(n[216])),O(e,"keydown",Hn(n[216]))],G=!0)},p(q,P){if(P[2]&16777216&&d.value!==q[86]&&Me(d,q[86]),P[3]&268435456){H=Te(q[121]);let Y;for(Y=0;Y<H.length;Y+=1){const Z=Rc(q,H,Y);D[Y]?D[Y].p(Z,P):(D[Y]=wf(Z),D[Y].c(),D[Y].m(v,null))}for(;Y<D.length;Y+=1)D[Y].d(1);D.length=H.length}P[2]&33554432|P[3]&268435456&&xn(v,q[87]),P[2]&33554432&&N!==(N=(q[87]==="open_url"?k("action.dataUrl"):q[87]==="open_folder"||q[87]==="open_file"?k("action.dataPath"):k("action.dataCommand"))+"")&&Q(R,N),P[2]&33554432|P[3]&268435456&&L!==(L=q[87]==="open_url"?k("action.urlPlaceholder"):q[87]==="open_folder"||q[87]==="open_file"?k("action.pathPlaceholder"):k("action.commandPlaceholder"))&&r(A,"placeholder",L),P[2]&67108864&&A.value!==q[88]&&Me(A,q[88])},d(q){q&&S(e),tt(D,q),G=!1,Se(X)}}}function wf(n){let e,t=n[466].label+"",l;return{c(){e=f("option"),l=F(t),e.__value=n[466].id,Me(e,e.__value),r(e,"class","svelte-1uu9qhk")},m(i,o){C(i,e,o),a(e,l)},p:ie,d(i){i&&S(e)}}}function yf(n){let e,t,l,i,o,s,c,u,d,p,h,m,g,b,v,y,E,T=n[106]&&Ef(n);return{c(){e=f("div"),t=f("div"),l=f("h3"),l.textContent=`${k("rename.title")}`,i=w(),o=f("div"),s=f("label"),c=f("span"),c.textContent=`${k("common.newName")}`,u=w(),d=f("input"),p=w(),T&&T.c(),h=w(),m=f("div"),g=f("button"),g.textContent=`${k("common.rename")}`,b=w(),v=f("button"),v.textContent=`${k("common.cancel")}`,r(l,"class","svelte-1uu9qhk"),r(c,"class","label-text svelte-1uu9qhk"),r(d,"type","text"),r(d,"class","svelte-1uu9qhk"),r(s,"class","svelte-1uu9qhk"),r(o,"class","form-group svelte-1uu9qhk"),r(g,"class","btn btn-primary svelte-1uu9qhk"),r(v,"class","btn svelte-1uu9qhk"),r(m,"class","modal-actions svelte-1uu9qhk"),r(t,"class","modal svelte-1uu9qhk"),r(e,"class","modal-overlay svelte-1uu9qhk"),r(e,"role","button"),r(e,"tabindex","0")},m(I,N){C(I,e,N),a(e,t),a(t,l),a(t,i),a(t,o),a(o,s),a(s,c),a(s,u),a(s,d),Me(d,n[105]),a(t,p),T&&T.m(t,null),a(t,h),a(t,m),a(m,g),a(m,b),a(m,v),y||(E=[O(d,"input",n[373]),O(d,"keydown",n[128]),O(g,"click",n[126]),O(v,"click",n[127]),O(e,"click",Jt(n[127])),O(e,"keydown",Hn(n[127]))],y=!0)},p(I,N){N[3]&4096&&d.value!==I[105]&&Me(d,I[105]),I[106]?T?T.p(I,N):(T=Ef(I),T.c(),T.m(t,h)):T&&(T.d(1),T=null)},d(I){I&&S(e),T&&T.d(),y=!1,Se(E)}}}function Ef(n){let e,t;return{c(){e=f("div"),t=F(n[106]),r(e,"class","rename-error svelte-1uu9qhk")},m(l,i){C(l,e,i),a(e,t)},p(l,i){i[3]&8192&&Q(t,l[106])},d(l){l&&S(e)}}}function Tf(n){let e,t,l,i,o,s=n[107].title+"",c,u,d,p,h,m,g,b,v,y,E,T,I,N,R=k("inbox.assign")+"",M,A,L,j,B,U,z=n[109].length>0&&Sf(n),W=n[111]&&Af();return{c(){e=f("div"),t=f("div"),l=f("h3"),l.textContent=`${k("inbox.assignTitle")}`,i=w(),o=f("div"),c=F(s),u=w(),d=f("div"),p=f("label"),h=f("span"),h.textContent=`${k("inbox.assignTarget")}`,m=w(),g=f("input"),b=w(),v=f("div"),v.textContent=`${k("inbox.assignSearchHint")}`,y=w(),z&&z.c(),E=w(),W&&W.c(),T=w(),I=f("div"),N=f("button"),M=F(R),L=w(),j=f("button"),j.textContent=`${k("common.cancel")}`,r(l,"class","svelte-1uu9qhk"),r(o,"class","create-context svelte-1uu9qhk"),r(h,"class","label-text svelte-1uu9qhk"),r(g,"type","text"),r(g,"placeholder",k("inbox.assignSearchPlaceholder")),r(g,"class","svelte-1uu9qhk"),r(v,"class","assign-hint svelte-1uu9qhk"),r(p,"class","svelte-1uu9qhk"),r(d,"class","form-group assign-search svelte-1uu9qhk"),r(N,"class","btn btn-primary svelte-1uu9qhk"),N.disabled=A=!n[110],r(j,"class","btn svelte-1uu9qhk"),r(I,"class","modal-actions svelte-1uu9qhk"),r(t,"class","modal svelte-1uu9qhk"),r(e,"class","modal-overlay svelte-1uu9qhk"),r(e,"role","button"),r(e,"tabindex","0")},m(G,X){C(G,e,X),a(e,t),a(t,l),a(t,i),a(t,o),a(o,c),a(t,u),a(t,d),a(d,p),a(p,h),a(p,m),a(p,g),Me(g,n[108]),a(p,b),a(p,v),a(d,y),z&&z.m(d,null),a(t,E),W&&W.m(t,null),a(t,T),a(t,I),a(I,N),a(N,M),a(I,L),a(I,j),B||(U=[O(g,"input",n[374]),O(g,"input",n[204]),O(g,"keydown",n[375]),O(N,"click",n[206]),O(j,"click",n[203]),O(e,"click",Jt(n[203])),O(e,"keydown",Hn(n[203]))],B=!0)},p(G,X){X[3]&16384&&s!==(s=G[107].title+"")&&Q(c,s),X[3]&32768&&g.value!==G[108]&&Me(g,G[108]),G[109].length>0?z?z.p(G,X):(z=Sf(G),z.c(),z.m(d,null)):z&&(z.d(1),z=null),G[111]?W||(W=Af(),W.c(),W.m(t,T)):W&&(W.d(1),W=null),X[3]&131072&&A!==(A=!G[110])&&(N.disabled=A)},d(G){G&&S(e),z&&z.d(),W&&W.d(),B=!1,Se(U)}}}function Sf(n){let e,t=Te(n[109]),l=[];for(let i=0;i<t.length;i+=1)l[i]=Cf(Ic(n,t,i));return{c(){e=f("div");for(let i=0;i<l.length;i+=1)l[i].c();r(e,"class","assign-search-results svelte-1uu9qhk")},m(i,o){C(i,e,o);for(let s=0;s<l.length;s+=1)l[s]&&l[s].m(e,null)},p(i,o){if(o[3]&65536|o[6]&524800){t=Te(i[109]);let s;for(s=0;s<t.length;s+=1){const c=Ic(i,t,s);l[s]?l[s].p(c,o):(l[s]=Cf(c),l[s].c(),l[s].m(e,null))}for(;s<l.length;s+=1)l[s].d(1);l.length=t.length}},d(i){i&&S(e),tt(l,i)}}}function Cf(n){let e,t,l=(n[463].path||n[463].title)+"",i,o,s,c=n[195](n[463].type)+"",u,d,p,h;function m(){return n[376](n[463])}return{c(){e=f("button"),t=f("span"),i=F(l),o=w(),s=f("span"),u=F(c),d=w(),r(t,"class","svelte-1uu9qhk"),r(s,"class","svelte-1uu9qhk"),r(e,"class","assign-search-result svelte-1uu9qhk")},m(g,b){C(g,e,b),a(e,t),a(t,i),a(e,o),a(e,s),a(s,u),a(e,d),p||(h=O(e,"click",m),p=!0)},p(g,b){n=g,b[3]&65536&&l!==(l=(n[463].path||n[463].title)+"")&&Q(i,l),b[3]&65536&&c!==(c=n[195](n[463].type)+"")&&Q(u,c)},d(g){g&&S(e),p=!1,h()}}}function Af(n){let e;return{c(){e=f("div"),e.textContent=`${k("common.loading")}`,r(e,"class","assign-status svelte-1uu9qhk")},m(t,l){C(t,e,l)},d(t){t&&S(e)}}}function Nf(n){let e,t,l,i,o,s,c,u,d,p,h,m,g,b,v,y,E,T,I,N,R,M,A,L,j,B=k("common.save")+"",U,z,W,G,X,H,D=n[74]&&If(n);return{c(){e=f("div"),t=f("div"),l=f("h3"),l.textContent=`${k("links.editTitle")}`,i=w(),o=f("div"),s=f("label"),c=f("span"),c.textContent=`${k("common.name")}`,u=w(),d=f("input"),p=w(),h=f("div"),m=f("label"),g=f("span"),g.textContent="URL",b=w(),v=f("input"),y=w(),E=f("div"),T=f("label"),I=f("span"),I.textContent=`${k("links.note")}`,N=w(),R=f("textarea"),M=w(),D&&D.c(),A=w(),L=f("div"),j=f("button"),U=F(B),W=w(),G=f("button"),G.textContent=`${k("common.cancel")}`,r(l,"class","svelte-1uu9qhk"),r(c,"class","label-text svelte-1uu9qhk"),r(d,"type","text"),r(d,"class","svelte-1uu9qhk"),r(s,"class","svelte-1uu9qhk"),r(o,"class","form-group svelte-1uu9qhk"),r(g,"class","label-text svelte-1uu9qhk"),r(v,"type","url"),r(v,"class","svelte-1uu9qhk"),r(m,"class","svelte-1uu9qhk"),r(h,"class","form-group svelte-1uu9qhk"),r(I,"class","label-text svelte-1uu9qhk"),r(R,"class","svelte-1uu9qhk"),r(T,"class","svelte-1uu9qhk"),r(E,"class","form-group svelte-1uu9qhk"),r(j,"class","btn btn-primary svelte-1uu9qhk"),j.disabled=z=!n[72].trim(),r(G,"class","btn svelte-1uu9qhk"),r(L,"class","modal-actions svelte-1uu9qhk"),r(t,"class","modal svelte-1uu9qhk"),r(e,"class","modal-overlay svelte-1uu9qhk"),r(e,"role","button"),r(e,"tabindex","0")},m(q,P){C(q,e,P),a(e,t),a(t,l),a(t,i),a(t,o),a(o,s),a(s,c),a(s,u),a(s,d),Me(d,n[71]),a(t,p),a(t,h),a(h,m),a(m,g),a(m,b),a(m,v),Me(v,n[72]),a(t,y),a(t,E),a(E,T),a(T,I),a(T,N),a(T,R),Me(R,n[73]),a(t,M),D&&D.m(t,null),a(t,A),a(t,L),a(L,j),a(j,U),a(L,W),a(L,G),X||(H=[O(d,"input",n[377]),O(v,"input",n[378]),O(R,"input",n[379]),O(j,"click",n[211]),O(G,"click",n[210]),O(e,"click",Jt(n[210])),O(e,"keydown",Hn(n[210]))],X=!0)},p(q,P){P[2]&512&&d.value!==q[71]&&Me(d,q[71]),P[2]&1024&&v.value!==q[72]&&Me(v,q[72]),P[2]&2048&&Me(R,q[73]),q[74]?D?D.p(q,P):(D=If(q),D.c(),D.m(t,A)):D&&(D.d(1),D=null),P[2]&1024&&z!==(z=!q[72].trim())&&(j.disabled=z)},d(q){q&&S(e),D&&D.d(),X=!1,Se(H)}}}function If(n){let e,t;return{c(){e=f("div"),t=F(n[74]),r(e,"class","rename-error svelte-1uu9qhk")},m(l,i){C(l,e,i),a(e,t)},p(l,i){i[2]&4096&&Q(t,l[74])},d(l){l&&S(e)}}}function Rf(n){let e,t;return e=new Hd({props:{title:n[100],message:n[101],confirmText:n[103],danger:n[102]}}),e.$on("confirm",n[130]),e.$on("cancel",n[131]),{c(){Ge(e.$$.fragment)},m(l,i){He(e,l,i),t=!0},p(l,i){const o={};i[3]&128&&(o.title=l[100]),i[3]&256&&(o.message=l[101]),i[3]&1024&&(o.confirmText=l[103]),i[3]&512&&(o.danger=l[102]),e.$set(o)},i(l){t||(fe(e.$$.fragment,l),t=!0)},o(l){be(e.$$.fragment,l),t=!1},d(l){We(e,l)}}}function Mf(n){let e,t;return e=new Ud({props:{item:n[91],content:n[92],loading:n[93],error:n[94]}}),e.$on("close",n[129]),e.$on("openExternal",n[380]),{c(){Ge(e.$$.fragment)},m(l,i){He(e,l,i),t=!0},p(l,i){const o={};i[2]&536870912&&(o.item=l[91]),i[2]&1073741824&&(o.content=l[92]),i[3]&1&&(o.loading=l[93]),i[3]&2&&(o.error=l[94]),e.$set(o)},i(l){t||(fe(e.$$.fragment,l),t=!0)},o(l){be(e.$$.fragment,l),t=!1},d(l){We(e,l)}}}function Lf(n){let e,t;return e=new M0({props:{onClose:n[226],onSyncRefresh:n[224],onPluginToggle:n[227],initialSection:n[116]}}),{c(){Ge(e.$$.fragment)},m(l,i){He(e,l,i),t=!0},p(l,i){const o={};i[3]&8388608&&(o.initialSection=l[116]),e.$set(o)},i(l){t||(fe(e.$$.fragment,l),t=!0)},o(l){be(e.$$.fragment,l),t=!1},d(l){We(e,l)}}}function Of(n){let e,t,l,i,o,s=k("link.label")+"",c,u,d,p,h,m=k("link.url")+"",g,b,v,y,E,T,I,N,R,M;return{c(){e=f("div"),t=f("div"),l=f("h3"),l.textContent=`${k("note.toolbar.link")}`,i=w(),o=f("label"),c=F(s),u=w(),d=f("input"),p=w(),h=f("label"),g=F(m),b=w(),v=f("input"),y=w(),E=f("div"),T=f("button"),T.textContent=`${k("link.insert")}`,I=w(),N=f("button"),N.textContent=`${k("common.cancel")}`,r(l,"class","svelte-1uu9qhk"),r(d,"type","text"),r(d,"placeholder","Example"),r(d,"class","svelte-1uu9qhk"),r(o,"class","svelte-1uu9qhk"),r(v,"type","text"),r(v,"placeholder",k("link.urlPlaceholder")),r(v,"class","svelte-1uu9qhk"),r(h,"class","svelte-1uu9qhk"),r(T,"type","button"),r(T,"class","btn btn-primary svelte-1uu9qhk"),r(N,"type","button"),r(N,"class","btn svelte-1uu9qhk"),r(E,"class","modal-actions svelte-1uu9qhk"),r(t,"class","modal-box svelte-1uu9qhk"),r(t,"role","document"),r(e,"class","modal-overlay svelte-1uu9qhk"),r(e,"role","dialog"),r(e,"aria-modal","true"),r(e,"aria-label",k("note.toolbar.link"))},m(A,L){C(A,e,L),a(e,t),a(t,l),a(t,i),a(t,o),a(o,c),a(o,u),a(o,d),Me(d,n[42]),a(t,p),a(t,h),a(h,g),a(h,b),a(h,v),Me(v,n[43]),a(t,y),a(t,E),a(E,T),a(E,I),a(E,N),R||(M=[O(d,"input",n[381]),O(d,"keydown",n[382]),O(v,"input",n[383]),O(v,"keydown",n[384]),O(T,"click",n[154]),O(N,"click",n[385]),O(e,"click",Jt(n[386])),O(e,"keydown",n[387])],R=!0)},p(A,L){L[1]&2048&&d.value!==A[42]&&Me(d,A[42]),L[1]&4096&&v.value!==A[43]&&Me(v,A[43])},d(A){A&&S(e),R=!1,Se(M)}}}function Df(n){let e,t;return e=new W2({props:{visible:!0}}),e.$on("insert",n[155]),e.$on("close",n[156]),{c(){Ge(e.$$.fragment)},m(l,i){He(e,l,i),t=!0},p:ie,i(l){t||(fe(e.$$.fragment,l),t=!0)},o(l){be(e.$$.fragment,l),t=!1},d(l){We(e,l)}}}function Pf(n){let e,t,l,i,o,s,c,u,d,p,h,m,g,b,v;return{c(){e=f("div"),t=f("div"),l=f("h3"),l.textContent=`${k("note.rename")}`,i=w(),o=f("div"),s=f("label"),s.textContent=`${k("note.title")}`,c=w(),u=f("input"),d=w(),p=f("div"),h=f("button"),h.textContent=`${k("common.cancel")}`,m=w(),g=f("button"),g.textContent=`${k("common.save")}`,r(l,"class","svelte-1uu9qhk"),r(s,"for","rn-title"),r(s,"class","svelte-1uu9qhk"),r(u,"id","rn-title"),r(u,"type","text"),r(u,"class","svelte-1uu9qhk"),r(o,"class","form-group svelte-1uu9qhk"),r(h,"class","btn svelte-1uu9qhk"),r(g,"class","btn btn-primary svelte-1uu9qhk"),r(p,"class","modal-actions svelte-1uu9qhk"),r(t,"class","modal svelte-1uu9qhk"),an(t,"width","380px"),r(e,"class","modal-overlay svelte-1uu9qhk"),r(e,"role","dialog"),r(e,"aria-modal","true"),r(e,"aria-label",k("note.rename"))},m(y,E){C(y,e,E),a(e,t),a(t,l),a(t,i),a(t,o),a(o,s),a(o,c),a(o,u),Me(u,n[48]),a(t,d),a(t,p),a(p,h),a(p,m),a(p,g),b||(v=[O(u,"input",n[388]),O(u,"keydown",n[389]),O(h,"click",n[158]),O(g,"click",n[159]),O(e,"click",Jt(n[158])),O(e,"keydown",n[390])],b=!0)},p(y,E){E[1]&131072&&u.value!==y[48]&&Me(u,y[48])},d(y){y&&S(e),b=!1,Se(v)}}}function qf(n){let e,t;return{c(){e=f("div"),t=F(n[46]),r(e,"class","verstak-toast svelte-1uu9qhk"),r(e,"role","alert"),r(e,"aria-live","polite")},m(l,i){C(l,e,i),a(e,t)},p(l,i){i[1]&32768&&Q(t,l[46])},d(l){l&&S(e)}}}function Hy(n){var y;let e,t,l,i,o,s,c,u;const d=[_w,gw,mw],p=[];function h(E,T){return E[11]?0:E[12]?1:2}e=h(n),t=p[e]=d[e](n);let m=n[41]&&Of(n),g=n[44]&&Df(n),b=n[47]&&n[47]!==((y=n[37])==null?void 0:y.id)&&Pf(n),v=n[45]&&qf(n);return{c(){t.c(),l=w(),m&&m.c(),i=w(),g&&g.c(),o=w(),b&&b.c(),s=w(),v&&v.c(),c=_t()},m(E,T){p[e].m(E,T),C(E,l,T),m&&m.m(E,T),C(E,i,T),g&&g.m(E,T),C(E,o,T),b&&b.m(E,T),C(E,s,T),v&&v.m(E,T),C(E,c,T),u=!0},p(E,T){var N;let I=e;e=h(E),e===I?p[e].p(E,T):(ft(),be(p[I],1,1,()=>{p[I]=null}),dt(),t=p[e],t?t.p(E,T):(t=p[e]=d[e](E),t.c()),fe(t,1),t.m(l.parentNode,l)),E[41]?m?m.p(E,T):(m=Of(E),m.c(),m.m(i.parentNode,i)):m&&(m.d(1),m=null),E[44]?g?(g.p(E,T),T[1]&8192&&fe(g,1)):(g=Df(E),g.c(),fe(g,1),g.m(o.parentNode,o)):g&&(ft(),be(g,1,1,()=>{g=null}),dt()),E[47]&&E[47]!==((N=E[37])==null?void 0:N.id)?b?b.p(E,T):(b=Pf(E),b.c(),b.m(s.parentNode,s)):b&&(b.d(1),b=null),E[45]?v?v.p(E,T):(v=qf(E),v.c(),v.m(c.parentNode,c)):v&&(v.d(1),v=null)},i(E){u||(fe(t),fe(g),u=!0)},o(E){be(t),be(g),u=!1},d(E){E&&(S(l),S(i),S(o),S(s),S(c)),p[e].d(E),m&&m.d(E),g&&g.d(E),b&&b.d(E),v&&v.d(E)}}}function pe(n,...e){try{if(window.go&&window.go.main&&window.go.main.App){const t=window.go.main.App[n];if(typeof t=="function")return t(...e)}}catch(t){console.error("Wails call error:",n,t)}return Promise.reject(new Error("Wails not connected: "+n))}function Wy(n,e,t){const l=[...n];return l.sort((i,o)=>{let s=0;if(e==="name")s=(i.title||"").localeCompare(o.title||"");else if(e==="type"){const c=i.captureKind||i.sourceKind||i.type||"",u=o.captureKind||o.sourceKind||o.type||"";s=c.localeCompare(u)}else s=(i.capturedAt||i.createdAt||"").localeCompare(o.capturedAt||o.createdAt||"");return t==="asc"?s:-s}),l}function Gy(n,e){return n.section===e.section&&n.nodeId===e.nodeId&&n.tab===e.tab&&n.trashFolderId===e.trashFolderId}function Li(n){return!n||!(n instanceof Element)?!1:!!n.closest('input, textarea, select, [contenteditable="true"], [contenteditable=""]')}function Oi(n,e,t){for(const l of n){if(l.id===e)return l.children=t,l.has_children=t.length>0,!0;if(l.children&&Oi(l.children,e,t))return!0}return!1}function Jd(n){return(n==null?void 0:n.sourceKind)||(n==null?void 0:n.captureKind)||(n==null?void 0:n.type)||""}function Qs(n){return Jd(n)!=="url"&&(n==null?void 0:n.type)!=="link"}function Ky(n,e){return{id:n.id,nodeId:n.id,fileId:e.id||e.fileId,name:e.name||n.title,type:"file",size:e.size||0,mime:e.mime||""}}function Qd(n,e,t){for(const l of n){if(l.id===e)return l.children=t,l.has_children=t.length>0,!0;if(l.children&&Qd(l.children,e,t))return!0}return!1}function Vy(n,e){return e?n.filter(t=>Ts(t)===e):n.filter(t=>!Ts(t)||!n.some(l=>l.id===Ts(t)))}function Ts(n){return(n==null?void 0:n.parentId)||(n==null?void 0:n.parentID)||(n==null?void 0:n.parent_id)||""}function Ai(n){return n.eventIds&&n.eventIds.length?n.eventIds:n.events&&n.events.length?n.events.map(e=>e.id).filter(Boolean):[]}function Ni(n){try{pe("WriteDebugLog",n)}catch{}}function Ss(n){return n?n.map(e=>(e._expanded===void 0&&(e._expanded=!1),e)):[]}function un(n){return n?new Date(n).toLocaleTimeString("ru-RU",{hour:"2-digit",minute:"2-digit"}):""}function ai(n){return n==="note_created"||n==="file_added"||n==="folder_added"||n==="node_created"?"+":n==="file_deleted"||n==="folder_deleted"?"×":n==="file_renamed"||n==="folder_renamed"||n==="note_updated"||n==="node_updated"?"~":n==="file_copied"?"⧉":n==="file_moved"?"→":"•"}function Un(n){if(!n)return"";try{return new Date(n).toLocaleDateString("ru-RU",{day:"numeric",month:"short"})}catch{return n}}function Cs(n){const e=String(n||"").trim();if(!e||/[\s]/.test(e)||e.includes("@"))return"";try{const t=new URL(e);return(t.protocol==="http:"||t.protocol==="https:")&&t.hostname?e:""}catch{try{const l=`https://${e}`,i=new URL(l);return i.hostname&&i.hostname.includes(".")?l:""}catch{return""}}}function Zy(n){return{"image/png":"png","image/jpeg":"jpg","image/gif":"gif","image/webp":"webp"}[n]||"bin"}function Yy(n){return new Promise((e,t)=>{const l=new FileReader;l.onload=()=>{const i=String(l.result||""),o=i.indexOf(",");e(o>=0?i.slice(o+1):i)},l.onerror=()=>t(l.error),l.readAsDataURL(n)})}function Xy(n){const e=String(n||"").split(/\r?\n/).map(t=>t.trim()).filter(Boolean);return e.length?{url:e[0],title:e[1]||""}:null}function Jy(n){return String(n||"").split(/\r?\n/).map(t=>t.trim()).filter(t=>t&&!t.startsWith("#"))[0]||""}function jf(n){const e=Array.from((n==null?void 0:n.types)||[]);return e.includes("Files")||e.includes("text/uri-list")||e.includes("text/x-moz-url")||e.includes("text/plain")&&!e.includes("application/x-verstak-node")}function Qy(n){return["case","client","project","folder","document","recipe"].includes(n.type)}function xy(n){return n.targetType==="note"&&n.targetId?{nodeId:n.nodeId,tab:"notes",targetId:n.targetId}:n.targetType==="file"?{nodeId:n.nodeId,tab:"files",targetId:n.targetId,targetPath:n.targetPath}:n.targetType==="folder"?{nodeId:n.nodeId,tab:"files",targetPath:n.targetPath||n.targetId}:{nodeId:n.nodeId}}function Hn(n){return e=>{Li(e.target)||(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),n())}}function $y(n,e,t){var Ho;let l,i,o,s,c=null,u=!1,d=!1,p=!1,h=!1,m=[],g=[],b=[],v=null,y=[],E=0,T=!0,I=[],N=null,R="",M="",A=!1,L="",j="all",B="all",U="",z="",W="suggestions",G="",X=[],H=!1,D=[],q="",P="";function Y(_){return{"vault not open":k("error.vaultNotOpen")}[_]||_}let Z="",J=null,te="overview",ne=[],le=null,me,oe,ze="edit",Ye=!1,Re="",ee="",re=!1,Ne=!1,Be="",ve=null,Ue="",Je="",Ae=[],Qe=[],Fe=[],Ce=!1,Ke="",De="",Ze="",Pe="",ue=!1,ke=!1,$=null,we=null,ge=[],Ie=0,it=[],ut=[],Xe=[],mt=!1,xe=[],he=[],qe=!1,pt="",yt="date",At="desc",en=!1,bt=[],Ot=null,Nt="",Dt="",fn="",tn="",Pt=null,Dn=0,Ct=[],Rt="",gt=[],tl=[],kn="",Al="",nn=[],kt=!1,qt=!1,ln="",dn=null,Gt=null,Qt={visible:!1,x:0,y:0,node:null},Sn=!1,pn="",Pn="open_url",hn="",nl=[{id:"open_url",label:k("action.openUrl")},{id:"open_file",label:k("action.openFile")},{id:"open_folder",label:k("action.openFolder")},{id:"run_command",label:k("action.runCommand")},{id:"run_script",label:k("action.runScript")},{id:"open_terminal",label:k("action.openTerminal")},{id:"launch_app",label:k("action.launchApp")}],jt=!0,sn={},xt=null,Cn="",ll=!1,qn="",Wn=!1,mn=!1,gn=!1,An="",$t=0,vn=0,Mt=null,Gn=!1,Nl="",il="",sl=!1,x=k("common.delete"),_e=null,$e=null,wt=!1,wn="",Zt="",_n="",ye=null,V="",se=[],Ee=null,Oe=!1,et,nt=null,St=!1,Et="",zt="";const on=[{id:"overview",label:k("tab.overview")},{id:"notes",label:k("tab.notes")},{id:"files",label:k("tab.files")},{id:"links",label:k("tab.links")},{id:"actions",label:k("tab.actions")},{id:"activity",label:k("tab.activity"),group:"service"},{id:"worklog",label:k("tab.worklog"),group:"service"},{id:"inbox",label:k("tab.inbox"),group:"service"}];let ol=null;function Bt(_){const K={};for(const Le of _){const je=Le.captureContextLabel||k("inbox.noContext");K[je]||(K[je]=[]),K[je].push(Le)}const de=[];for(const[Le,je]of Object.entries(K))de.push({label:Le,items:je});return de.sort((Le,je)=>Le.label.localeCompare(je.label)),de}function xd(){return{section:Z||"",nodeId:(J==null?void 0:J.id)||"",tab:J?te:"",trashFolderId:Z==="trash"?Rt:"",trashFolderStack:Z==="trash"?gt.map(_=>({id:_.id,title:_.title})):[]}}function Il(){if(kt)return;const _=xd(),K=nn[nn.length-1];(!K||!Gy(K,_))&&(nn=[...nn,_].slice(-80))}function Yi(){t(8,Rt=""),t(231,gt=[]),t(76,Ct=[])}function xs(){return Gn?(Ji(),!0):h?(Uo(),!0):xt?(to(),!0):ye?(fs(),!0):Ot?(ds(),!0):wt?(t(104,wt=!1),!0):Ce?(mo(),!0):Sn?(zo(),!0):qt?(io(),!0):Qt.visible?(rl(),!0):le?(ho(),!0):!1}async function $d(_){var K;kt=!0;try{if(_.nodeId){const de=await pe("GetNodeDetail",_.nodeId);return de?(await Ft(de),t(35,te=_.tab||"overview"),te==="files"&&((K=oe==null?void 0:oe.resetToNode)==null||K.call(oe,de.id)),!0):!1}else if(_.section)return m.some(de=>de.id===_.section)?(await pi(_.section),_.section==="trash"&&(t(8,Rt=_.trashFolderId||""),t(231,gt=_.trashFolderStack||[]),t(76,Ct=[]),await cl()),!0):!1;return!1}catch{return!1}finally{kt=!1}}async function $s(){if(!xs())for(;nn.length>0;){const _=nn[nn.length-1];if(nn=nn.slice(0,-1),await $d(_))return}}function di(_){_.button!==3&&_.button!==4||Li(_.target)||xs()&&_.button===3||(_.preventDefault(),_.stopPropagation(),_.button===3&&$s())}function rn(_){var K;te!==_&&(Il(),t(35,te=_),_==="files"&&J&&((K=oe==null?void 0:oe.resetToNode)==null||K.call(oe,J.id)))}ci(async()=>{try{if(t(10,c=await pe("GetStartupStatus")),u=!0,c.status==="first_run"){t(11,d=!0),t(89,jt=!1);return}if(c.status==="recovery"){t(12,p=!0),t(89,jt=!1);return}}catch(_){t(34,P=String(_))}try{t(33,q=await pe("VerstakVersion")||"verstak-gui/v2"),t(0,m=await pe("ListSystemViewsWithPlugins")||[]),t(14,g=await pe("ListWorkspaceTree")||[]),t(15,b=await pe("ListEnabledTemplates")||[])}catch(_){t(34,P=String(_)),t(0,m=[{id:"today",label:k("nav.today")},{id:"inbox",label:k("nav.inbox")},{id:"activity",label:k("nav.activity")}]),t(14,g=[]),t(15,b=[])}window.runtime&&window.runtime.EventsOn&&(window.runtime.EventsOn("files-dropped",qp),ol=()=>window.runtime.EventsOff("files-dropped")),window.addEventListener("keydown",no),window.addEventListener("paste",yo),window.addEventListener("dragenter",Co),window.addEventListener("dragover",Ao),window.addEventListener("dragleave",No),window.addEventListener("dragend",Lt),window.addEventListener("dragcancel",Lt),window.addEventListener("drop",Ro),window.addEventListener("mouseup",Lt),window.addEventListener("mouseleave",Lt),window.addEventListener("blur",Lt),document.addEventListener("visibilitychange",Io),window.addEventListener("auxclick",di),window.addEventListener("mouseup",di),t(89,jt=!1),hs(),ns()}),ui(()=>{ol&&ol(),window.removeEventListener("keydown",no),window.removeEventListener("paste",yo),window.removeEventListener("dragenter",Co),window.removeEventListener("dragover",Ao),window.removeEventListener("dragleave",No),window.removeEventListener("dragend",Lt),window.removeEventListener("dragcancel",Lt),window.removeEventListener("drop",Ro),window.removeEventListener("mouseup",Lt),window.removeEventListener("mouseleave",Lt),window.removeEventListener("blur",Lt),document.removeEventListener("visibilitychange",Io),window.removeEventListener("auxclick",di),window.removeEventListener("mouseup",di),Eo()});async function pi(_){Il(),t(1,Z=_),t(2,J=null),t(35,te="overview"),t(36,ne=[]),Ae=[],t(49,Qe=[]),t(50,Fe=[]),t(66,he=[]),t(69,bt=[]),t(60,ge=[]),t(3,xe=[]),t(7,Pt=null),Yi(),t(80,qt=!1),t(34,P=""),t(16,v=null),t(62,it=[]),t(63,ut=[]),t(17,y=[]),E=0,T=!0,t(18,I=[]),t(19,N=null);try{_==="today"?(t(16,v=await pe("ListTodayView")||{cases:[]}),t(60,ge=await pe("GetSuggestions")||[]),t(61,Ie=ge.length),t(62,it=await pe("ListTodayInProgress")||[]),t(63,ut=await pe("ListTodayCaptures")||[])):_==="inbox"?t(3,xe=await pe("ListInboxNodes")||[]):_==="trash"?await cl():_==="journal"?await ul():_==="activity"&&(t(17,y=await pe("ListActivityFeed",50,0)||[]),E=y.length,T=y.length===50)}catch(K){t(34,P=String(K)),t(16,v={cases:[]}),t(3,xe=[]),t(7,Pt=null),t(17,y=[])}}async function Ft(_){Il(),t(2,J=_),t(1,Z=""),t(35,te="overview"),t(36,ne=[]),Ae=[],t(49,Qe=[]),t(50,Fe=[]),t(60,ge=[]),Yi(),t(37,le=null),t(80,qt=!1),t(34,P=""),t(32,D=[]),await Xi(_.id)}async function Xi(_){try{t(36,ne=await pe("ListNotes",_)||[])}catch{}try{Ae=await pe("ListFiles",_)||[]}catch{}try{t(49,Qe=await pe("ListActions",_)||[])}catch{}try{t(50,Fe=Ss(await pe("ListWorklog",_)))}catch{}try{t(66,he=await pe("ListInboxNodesForTarget",_)||[])}catch{t(66,he=[])}try{t(69,bt=await pe("ListLinks",_)||[])}catch{t(69,bt=[])}try{t(60,ge=await pe("GetSuggestions")||[]),t(61,Ie=ge.length)}catch{t(60,ge=[]),t(61,Ie=0)}try{t(32,D=await pe("ListActivityByNode",_,50,0)||[])}catch{}}function ep(_,K){wn=_,t(105,Zt=K),t(106,_n=""),t(104,wt=!0)}async function eo(){const _=Zt.trim();if(!_){t(106,_n=k("rename.emptyError"));return}try{await pe("ValidateName",_)}catch{t(106,_n=k("rename.invalidError"));return}t(104,wt=!1);const K=wn;wn="";try{await pe("RenameNode",K,_),J&&J.id===K&&t(2,J={...J,title:_}),await al()}catch(de){t(34,P=String(de))}}function tp(){t(104,wt=!1),wn="",t(105,Zt=""),t(106,_n="")}function np(_){_.key==="Enter"?eo():t(106,_n="")}function to(){t(91,xt=null),t(92,Cn=""),t(94,qn="")}function no(_){if(_.key==="Escape"&&gn){_.preventDefault(),Lt();return}if(!Li(_.target)){if(_.key==="Backspace"||_.altKey&&_.key==="ArrowLeft"){_.preventDefault(),$s();return}if(te==="files"&&oe)return oe.handleFilesKeydown(_)}}function jn(_){t(100,Nl=_.title||k("common.confirm")),t(101,il=_.message||""),t(102,sl=_.danger!==void 0?_.danger:!0),t(103,x=_.confirmText||k("common.delete")),_e=_.onConfirm||null,$e=_.onCancel||null,t(99,Gn=!0)}function Ji(){t(99,Gn=!1),_e=null,$e=null}function lp(){_e&&_e(),Ji()}function ip(){$e&&$e(),Ji()}function lo(_){t(82,dn=Qt.node),t(83,Gt=_),t(81,ln=""),t(80,qt=!0),rl()}function sp(){t(82,dn=null),t(83,Gt=void 0),t(81,ln=""),t(80,qt=!0)}function io(){t(80,qt=!1),t(81,ln=""),t(82,dn=null),t(83,Gt=void 0)}async function so(){if(!(!ln.trim()||Gt===void 0))try{const _=dn?dn.id:"",K=Gt?Gt.id:"",de=await pe("CreateNodeFromTemplate",_,ln.trim(),K);t(80,qt=!1),t(81,ln="");const Le=de?de.id:null;if(t(82,dn=null),t(83,Gt=void 0),_){t(90,sn={...sn,[_]:!0});const je=await pe("ListWorkspaceChildren",_)||[];Oi(g,_,je),t(14,g=[...g])}else t(14,g=await pe("ListWorkspaceTree")||g);if(Le){const je=await pe("GetNodeDetail",Le);je&&(t(1,Z=""),Ft(je))}}catch(_){t(34,P=String(_))}}function op(_,K){t(84,Qt={visible:!0,x:_.clientX,y:_.clientY,node:K})}function rl(){t(84,Qt={visible:!1,x:0,y:0,node:null})}async function rp(_){const K=!sn[_];if(t(90,sn={...sn,[_]:K}),!K)return;const de=await pe("ListWorkspaceChildren",_)||[];Oi(g,_,de),t(14,g=[...g])}async function ap(_,K){if(!(!_||!K||_===K))try{const de=await pe("MoveNode",_,K);await al();const Le=await pe("GetNodeDetail",_);Le&&(t(1,Z=""),Ft(Le))}catch(de){t(34,P=String(de))}}async function cp(_){_.preventDefault(),_.stopPropagation();try{const K=_.dataTransfer.getData("text/plain");if(!K)return;const de=await pe("GetNodeDetail",K);if(!de||!de.parent_id)return;await pe("MoveNode",K,""),await al();const Le=await pe("GetNodeDetail",K);Le&&(t(1,Z=""),Ft(Le))}catch(K){t(34,P=String(K))}}function up(_){_.preventDefault(),_.dataTransfer.dropEffect="move",t(95,Wn=!0)}function fp(_){t(95,Wn=!1)}function oo(_){ep(_.id,_.title),rl()}function ro(_){rl(),jn({title:k("delete.confirmTitle"),message:k("delete.confirmMessage")+" "+_.title+"?",confirmText:k("common.delete"),danger:!0,onConfirm:async()=>{try{await pe("DeleteNode",_.id),await al(),await ns(),J&&J.id===_.id&&t(2,J=null)}catch(K){t(34,P=String(K))}}})}async function zn(_){rl();const K=typeof _=="string"?_:_.id;try{await pe("OpenFolder",K)}catch(de){t(34,P=String(de))}}async function yn(_){var de,Le;const K=Jd(_);try{if(K==="url"||_.type==="link"){if(!_.url)throw new Error("url required");await pe("OpenURL",_.url);return}if(K==="text"||_.type==="note"){const je=await pe("ReadNote",_.id);t(37,le={id:_.id,title:_.title,content:je||"",dirty:!1});return}if(K==="folder"||_.type==="folder"){Il(),t(1,Z=""),t(2,J=_),t(35,te="files"),await Xi(_.id),(de=oe==null?void 0:oe.resetToNode)==null||de.call(oe,_.id);return}if(K==="file"||K==="image"||_.type==="file"){const vt=(await pe("ListFiles",_.id)||[])[0];if(!vt)throw new Error("file record not found");const Kt=Ky(_,vt);Qf(Kt)?(t(35,te="files"),(Le=oe==null?void 0:oe.openFileById)==null||Le.call(oe,_.id)):await pe("OpenFile",Kt.fileId);return}await Yl(_.id)}catch(je){t(34,P=String(je))}}async function ao(_){rl();try{await pe("MoveNode",_.id,""),await al();const K=await pe("GetNodeDetail",_.id);K&&(t(1,Z=""),Ft(K))}catch(K){t(34,P=String(K))}}async function al(){const _=Object.keys(sn).filter(de=>sn[de]),K=await pe("ListWorkspaceTree")||[];for(const de of _){const je=(await pe("ListWorkspaceChildren",de)||[]).map(vt=>({...vt}));Qd(K,de,je)}t(14,g=K)}async function co(_){const K=await pe("ListWorkspaceChildren",_)||[];Oi(g,_,K),t(14,g=[...g])}async function uo(_){if(!(!_.trim()||!J))try{const K=await pe("CreateNote",J.id,_.trim());t(36,ne=[...ne,K&&K.id?K:{id:Date.now().toString(),title:_.trim(),createdAt:new Date().toISOString()}])}catch{const de={id:Date.now().toString(),title:_.trim(),createdAt:new Date().toISOString()};t(36,ne=[...ne,de])}}async function Kn(_){if(le&&le.dirty){jn({title:k("note.unsavedTitle"),message:k("note.unsavedMessage"),confirmText:k("note.unsavedClose"),danger:!1,onConfirm:async()=>{await fo(_)}});return}await fo(_)}async function fo(_){try{const K=await pe("ReadNote",_.id);t(37,le={id:_.id,title:_.title,content:K||"",dirty:!1})}catch{t(37,le={id:_.id,title:_.title,content:"# "+_.title+`
|
||
|
||
`,dirty:!1})}}function po(_){jn({title:k("common.delete"),message:k("note.deleteConfirm",{title:_.title})||`Удалить заметку «${_.title}»?`,confirmText:k("common.delete"),danger:!0,onConfirm:async()=>{try{await pe("DeleteNote",_.id),t(36,ne=ne.filter(K=>K.id!==_.id)),le&&le.id===_.id&&t(37,le=null);try{await ns()}catch{}}catch(K){t(34,P=String(K))}}})}function ho(){if(le&&le.dirty){jn({title:k("note.unsavedTitle"),message:k("note.unsavedMessage"),confirmText:k("note.unsavedClose"),danger:!1,onConfirm:()=>{t(37,le=null),t(40,ze="edit")}});return}t(37,le=null),t(40,ze="edit")}async function dp(){if(le)try{await pe("SaveNote",le.id,le.content),t(37,le.dirty=!1,le)}catch{t(37,le.dirty=!1,le)}}function pp(){t(42,Re=""),t(43,ee=""),t(41,Ye=!0)}function Qi(){if(!le){t(41,Ye=!1);return}const _=Re.trim()||ee.trim()||"link",K=ee.trim()||"#",de=`[${_}](${K})`;t(37,le.content=le.content+(le.content.endsWith(`
|
||
`)?"":`
|
||
`)+de+`
|
||
`,le),t(37,le.dirty=!0,le),t(41,Ye=!1)}function hp(){t(44,re=!0)}function mp(_){const K=_.detail.markdown;me&&typeof me.insertText=="function"&&me.insertText(K),t(44,re=!1)}function gp(){t(44,re=!1)}function xi(_,K){t(47,ve=_),t(48,Ue=K),Je=K}function Vn(){t(47,ve=null),t(48,Ue=""),Je=""}async function $i(){if(!ve||!Ue.trim()){Vn();return}if(Ue.trim()===Je){Vn();return}try{await pe("RenameNote",ve,Ue.trim()),t(36,ne=ne.map(_=>_.id===ve?{..._,title:Ue.trim()}:_)),le&&le.id===ve&&t(37,le.title=Ue.trim(),le),Vn()}catch(_){t(34,P=String(_)),Vn()}}async function _p(_){const{type:K,id:de}=_.detail;if(de)switch(K){case"case":await bp(de);break;case"note":await kp(de);break;case"file":await vp(de);break;case"secret":Bn(k("note.internal.secretNotImplemented"));break;default:Bn(`verstak://${K}/${de}`)}}async function bp(_){try{const K=await pe("GetNodeDetail",_);if(!K){Bn(k("note.internal.caseNotFound"));return}await Ft(K)}catch{Bn(k("note.internal.caseNotFound"))}}async function kp(_){try{const K=await pe("GetNodeDetail",_);if(!K){Bn(k("note.internal.noteNotFound"));return}const de=K.parent_id||K.parentId||"";if(de){const je=await pe("GetNodeDetail",de);je&&await Ft(je)}rn("notes");const Le=ne.find(je=>je.id===_);Le?await Kn(Le):await Kn({id:K.id,title:K.title})}catch{Bn(k("note.internal.noteNotFound"))}}async function vp(_){var K,de;try{const Le=await pe("GetNodeDetail",_);if(!Le){Bn(k("note.internal.fileNotFound"));return}const je=Le.parent_id||Le.parentId||"";if(je){const vt=await pe("GetNodeDetail",je);vt&&await Ft(vt),rn("files"),(K=oe==null?void 0:oe.resetToNode)==null||K.call(oe,je),(de=oe==null?void 0:oe.openFileById)==null||de.call(oe,_)}else Bn(k("note.internal.fileFound",{title:Le.title}))}catch{Bn(k("note.internal.fileNotFound"))}}function Bn(_){t(46,Be=_),t(45,Ne=!0),setTimeout(()=>{t(45,Ne=!1)},3e3)}function wp(_){le&&(t(37,le.content=_.detail.content,le),t(37,le.dirty=!0,le))}function yp(_){t(40,ze=_.detail.mode)}function Ep(){pp()}function Tp(){hp()}function hi(_=null){t(58,$=_),t(59,we=null),t(52,Ke=_?_.summary:""),t(53,De=_?String(_.minutes||""):""),t(54,Ze=_&&_.date||""),t(55,Pe=_&&_.details||""),t(56,ue=_?!!_.billable:!1),t(57,ke=_?!!_.approximate:!1),t(51,Ce=!0)}function mo(){t(51,Ce=!1),t(58,$=null),t(59,we=null)}async function es(_=""){const K=_||(J?J.id:"");J&&J.id===K&&t(50,Fe=Ss(await pe("ListWorklog",J.id))||Fe),Z==="journal"&&await ul()}async function Sp(){const _=parseInt(De,10);if(!(!Ke.trim()||isNaN(_)||_<=0)&&!(!we&&!$&&!J)){try{if(we){const K=JSON.stringify(Ai(we));await pe("AcceptSuggestionFull",we.nodeId,Ke.trim(),Pe,Ze,_,ke,ue,K),await mi()}else $?(await pe("UpdateWorklogEntry",$.id,Ke.trim(),Pe,Ze,_,ke,ue),await es($.nodeId)):(await pe("CreateWorklogFull",J.id,Ke.trim(),Pe,Ze,_,ke,ue),await es(J.id))}catch(K){t(34,P=String(K));return}t(51,Ce=!1),t(58,$=null),t(59,we=null)}}function ts(_){jn({title:k("worklog.deleteEntry"),message:k("worklog.deleteConfirm"),confirmText:k("common.delete"),danger:!0,onConfirm:async()=>{try{await pe("DeleteWorklogEntry",_.id),await es(_.nodeId)}catch(K){t(34,P=String(K))}}})}async function mi(){t(60,ge=await pe("GetSuggestions")||[]),t(61,Ie=ge.length),J&&t(50,Fe=Ss(await pe("ListWorklog",J.id))),Z==="journal"&&await ul()}async function cl(){t(7,Pt=await pe("ListTrash")||{nodes:[],entries:[],trashPath:"",count:0}),t(75,Dn=Pt.count||0);const _=Pt.nodes||[];t(76,Ct=Ct.filter(K=>_.some(de=>de.id===K))),Rt&&!_.some(K=>K.id===Rt)?Yi():gt.length>0&&(t(231,gt=gt.filter(K=>_.some(de=>de.id===K.id))),t(8,Rt=gt.length>0?gt[gt.length-1].id:""))}async function ns(){try{t(75,Dn=await pe("TrashCount")||0)}catch{t(75,Dn=0)}}function Cp(){return Rt&&(((Pt==null?void 0:Pt.nodes)||[]).find(_=>_.id===Rt)||gt[gt.length-1])||null}function Rl(_){Il(),t(8,Rt=_.id);const K=gt.findIndex(de=>de.id===_.id);K>=0?t(231,gt=gt.slice(0,K+1)):t(231,gt=[...gt,{id:_.id,title:_.title}]),t(76,Ct=[])}function Ap(){if(gt.length===0)return;Il();const _=gt.slice(0,-1);t(231,gt=_),t(8,Rt=_.length>0?_[_.length-1].id:""),t(76,Ct=[])}async function Zl(_){t(91,xt={name:_.title,type:"file",mime:"text/plain",size:0,fileId:_.id}),t(92,Cn=""),t(94,qn=""),t(93,ll=!0);try{_.trashFsPath?t(92,Cn=await pe("ReadTrashFile",_.trashFsPath)||""):t(92,Cn=await pe("ReadTrashFileContent",_.id)||"");const K=(_.title||"").split(".").pop().toLowerCase();["png","jpg","jpeg","gif","webp","bmp","svg"].includes(K)&&t(92,Cn="data:image/"+(K==="svg"?"svg+xml":K)+";base64,"+btoa(previewContent))}catch(K){t(94,qn=String(K))}t(93,ll=!1)}function go(_){t(76,Ct=Ct.includes(_)?Ct.filter(K=>K!==_):[...Ct,_])}function ls(_){return Ct.length>0?Ct:[_]}async function is(_){try{await pe("RestoreTrashNodesJSON",JSON.stringify(_)),await al(),await cl()}catch(K){t(34,P=String(K))}}async function ss(_){jn({title:k("delete.confirmTitle"),message:k("delete.confirmMessage")+" "+_.length+"?",confirmText:k("common.delete"),danger:!0,onConfirm:async()=>{try{await pe("PurgeTrashNodesJSON",JSON.stringify(_)),await cl()}catch(K){t(34,P=String(K))}}})}async function Np(){jn({title:k("delete.confirmTitle"),message:k("trash.empty")+"?",confirmText:k("common.delete"),danger:!0,onConfirm:async()=>{try{await pe("EmptyTrash"),await cl()}catch(_){t(34,P=String(_))}}})}function gi(_){t(59,we=_),t(58,$=null),t(52,Ke=_.summary||""),t(53,De=String(_.suggestedMin||"")),t(54,Ze=""),t(55,Pe=""),t(56,ue=!1),t(57,ke=!0),t(51,Ce=!0)}async function _i(_){try{await pe("DismissSuggestion",_.nodeId,JSON.stringify(Ai(_))),await mi()}catch(K){t(34,P=String(K))}}async function Ip(){t(65,mt=!0);try{const _=await pe("ListBrowserEvents","pending",50,0);t(64,Xe=_||[])}catch(_){console.warn("[browser] load error:",_)}finally{t(65,mt=!1)}}async function Rp(_){await pe("AcceptBrowserEvent",_.id,""),t(64,Xe=Xe.filter(K=>K.id!==_.id))}async function Mp(_){await pe("DismissBrowserEvent",_.id),t(64,Xe=Xe.filter(K=>K.id!==_.id))}async function Lp(_){J&&J.id?(await pe("AttachBrowserEventToNode",_.id,J.id),t(64,Xe=Xe.filter(K=>K.id!==_.id))):(await pe("DismissBrowserEvent",_.id),t(64,Xe=Xe.filter(K=>K.id!==_.id)))}async function os(_){try{const K=Ai(_),de=JSON.stringify(K);Ni("acceptTodaySuggestion: nodeId="+_.nodeId+" eventIds="+de+" events="+JSON.stringify((_.events||[]).map(Le=>({id:Le.id,type:Le.eventType,title:Le.title})))),await pe("AcceptSuggestionWith",_.nodeId,_.summary,_.suggestedMin,"",de),await mi()}catch(K){Ni("acceptTodaySuggestion error: "+K)}}async function _o(_){try{const K=Ai(_),de=JSON.stringify(K);Ni("acceptJournalSuggestion: nodeId="+_.nodeId+" eventIds="+de+" events="+JSON.stringify((_.events||[]).map(Le=>({id:Le.id,type:Le.eventType,title:Le.title})))),await pe("AcceptSuggestionWith",_.nodeId,_.summary,_.suggestedMin,"",de),await mi()}catch(K){Ni("acceptJournalSuggestion error: "+K)}}async function ul(){try{const[_,K,de]=await Promise.all([pe("ListWorklogReport",R,M,L,A,j,B),pe("WorklogReportSummary",R,M,L,A,j,B),pe("GetSuggestions")]);if(t(18,I=(_||[]).map(Le=>(Le._expanded===void 0&&(Le._expanded=!1),Le))),t(19,N=K||null),t(60,ge=de||[]),t(61,Ie=ge.length),L&&!U)if(_&&_.length>0&&_[0].nodePath)t(26,U=_[0].nodePath);else try{t(26,U=await pe("GetNodeTitle",L))}catch{t(26,U="")}}catch{t(18,I=[]),t(19,N=null),t(60,ge=[]),t(61,Ie=0)}}async function bi(_){try{const K=await pe("SaveWorklogReport",_,R,M,L,A,j,B);t(27,z=K),setTimeout(()=>t(27,z=""),4e3)}catch(K){if(String(K).includes("отменено"))return;t(27,z="Ошибка: "+String(K)),setTimeout(()=>t(27,z=""),6e3)}}let bo;async function rs(_){if(_._expanded=!_._expanded,t(18,I),_._expanded&&!_._events&&_._hasEvents===void 0)try{_._events=await pe("GetWorklogEntryEvents",_.id)||[],_._hasEvents=_._events.length>0,t(18,I)}catch{_._events=[],_._hasEvents=!1,t(18,I)}}async function as(_){if(_._expanded=!_._expanded,_._expanded&&_.source==="suggestion"&&!_._events&&_._hasEvents===void 0)try{_._events=await pe("GetWorklogEntryEvents",_.id)||[],_._hasEvents=_._events.length>0}catch(K){K._events=[],K._hasEvents=!1}t(50,Fe)}async function Op(){const _=G.trim();if(!_||_.length<2){t(30,X=[]),t(31,H=!1);return}try{t(30,X=await pe("SearchNodes",_)||[]),t(31,H=X.length>0)}catch{t(30,X=[]),t(31,H=!1)}}function Dp(){clearTimeout(bo),bo=setTimeout(Op,200)}function ko(_){t(23,L=_.id),t(26,U=_.path||_.title),t(22,A=!0),t(29,G=""),t(30,X=[]),t(31,H=!1),ul()}function vo(){t(23,L=""),t(22,A=!1),t(26,U=""),t(29,G=""),t(30,X=[]),t(31,H=!1),ul()}function Pp(){t(20,R=""),t(21,M=""),t(23,L=""),t(22,A=!1),t(24,j="all"),t(25,B="all"),t(26,U=""),t(29,G=""),t(30,X=[]),t(31,H=!1),ul()}async function qp(_){try{if(!_||_.length===0)return;await Yp(_,"drop")}finally{Lt()}}function jp(_){return{note_created:k("event.noteCreated"),note_updated:k("event.noteUpdated"),note_deleted:k("event.noteDeleted"),file_added:k("event.fileAdded"),file_deleted:k("event.fileDeleted"),file_renamed:k("event.fileRenamed"),file_copied:k("event.fileCopied"),file_moved:k("event.fileMoved"),folder_added:k("event.folderAdded"),folder_deleted:k("event.folderDeleted"),folder_renamed:k("event.folderRenamed"),folder_moved:k("event.folderMoved"),node_created:k("event.caseCreated"),node_updated:k("event.caseUpdated"),node_deleted:k("event.nodeDeleted"),action_created:k("event.actionCreated"),action_done:k("event.actionDone"),worklog_added:k("event.worklogAdded")}[_]||_}function cs(_){return{project:k("kind.project"),client:k("kind.client"),document:k("kind.document"),recipe:k("kind.recipe"),folder:k("kind.folder"),note:k("kind.note"),file:k("kind.file"),archive:k("kind.archive"),case:k("kind.case"),link:k("kind.link")}[_]||_||k("kind.case")}function zp(_){return _==="action"?k("kind.action"):cs(_)}function Bp(_){return _?k("capture.kind."+_):""}function Fp(_){return _?k("capture.source."+_):""}function Up(_){const K=[];return _.captureKind&&K.push(Bp(_.captureKind)),_.captureSource&&K.push(Fp(_.captureSource)),_.captureContextLabel&&K.push(`${k("inbox.capturedIn")}: ${_.captureContextLabel}`),_.suggestedTargetLabel&&K.push(`${k("inbox.suggestedTarget")}: ${_.suggestedTargetLabel}`),K.push(Un(_.capturedAt||_.createdAt)),K.filter(Boolean).join(" · ")}function Hp(_){!_||!_.id||(t(3,xe=[_,...xe.filter(K=>K.id!==_.id)]),J&&(_.captureContextNodeId===J.id||_.suggestedTargetNodeId===J.id)&&t(66,he=[_,...he.filter(K=>K.id!==_.id)]))}function Wp(){return J&&J.id?{contextType:"node",nodeId:J.id,suggestedTargetNodeId:J.id}:Z?{contextType:"section",section:Z}:{contextType:"global",section:"root"}}function fl(){return JSON.stringify(Wp())}function Gp(){return J&&J.id?k("capture.dropOverlayNode",{title:J.title}):k("capture.dropOverlayGlobal")}async function Ml(_=null){_&&Hp(_),Z==="inbox"&&t(3,xe=await pe("ListInboxNodes")||xe)}async function Kp(_,K){const de=String(_||"").trim();if(!de)return null;const Le=Cs(de),je=Le?await pe("CaptureURLWithContext",Le,"",K,fl()):await pe("CaptureTextWithContext",de,K,fl());return await Ml(je),je}async function wo(_,K,de){const Le=String(_||"").trim();if(!Le)return null;const je=await pe("CaptureURLWithContext",Le,K||"",de,fl());return await Ml(je),je}async function Vp(_,K){if(!_)return null;const de=_.path||_.webkitRelativePath||"";if(de){const vt=await pe("CapturePathWithContext",de,K,fl());return await Ml(vt),vt}const Le=await Yy(_),je=await pe("CaptureFileDataWithContext",_.name||`clipboard.${Zy(_.type)}`,Le,K,fl());return await Ml(je),je}async function us(_,K){var Zn,Fn,Nn;if(!_)return!1;let de=!1;const Le=Array.from(_.files||[]);for(const In of Le)await Vp(In,K),de=!0;const je=(Zn=_.getData)==null?void 0:Zn.call(_,"text/x-moz-url");if(je){const In=Xy(je),Xl=In?Cs(In.url):"";if(Xl)return await wo(Xl,In.title,K),!0}const vt=(Fn=_.getData)==null?void 0:Fn.call(_,"text/uri-list");if(vt){const In=Jy(vt),Xl=Cs(In);if(Xl)return await wo(Xl,"",K),!0}const Kt=(Nn=_.getData)==null?void 0:Nn.call(_,"text/plain");return String(Kt||"").trim()&&(await Kp(Kt,K),de=!0),de}async function Zp(){if(!qe){t(68,pt=""),t(67,qe=!0);try{const _=await pe("CaptureClipboardTextWithContext",fl());await Ml(_),t(68,pt=k("inbox.captured"))}catch(_){t(34,P=String(_).includes("clipboard is empty")?k("inbox.clipboardEmpty"):k("inbox.clipboardUnavailable"))}finally{t(67,qe=!1)}}}async function Yp(_,K="drop"){if(!qe){t(67,qe=!0),t(68,pt="");try{for(const de of _){const Le=await pe("CapturePathWithContext",de,K,fl());await Ml(Le)}t(68,pt=k("inbox.captured"))}catch(de){t(34,P=String(de))}finally{t(67,qe=!1),t(96,mn=!1)}}}async function yo(_){if(!(d||p)&&!Li(_.target)&&_.clipboardData)try{await us(_.clipboardData,"paste")&&(_.preventDefault(),t(68,pt=k("inbox.captured")))}catch(K){t(34,P=String(K))}}function Eo(){Mt&&(clearTimeout(Mt),Mt=null)}function Lt(){$t=0,t(97,gn=!1),t(98,An=""),vn=0,t(96,mn=!1),Eo()}function To(){Mt||(Mt=setTimeout(()=>{Mt=null,gn&&Date.now()-vn>2e3?Lt():gn&&To()},2500))}function So(_){return jf(_)?(t(98,An=Gp()),t(97,gn=!0),vn=Date.now(),To(),!0):!1}function Co(_){So(_.dataTransfer)&&($t+=1)}function Ao(_){So(_.dataTransfer)&&(_.preventDefault(),_.dataTransfer.dropEffect="copy")}function No(_){$t>0&&($t-=1),(_.clientX<=0||_.clientY<=0||_.clientX>=window.innerWidth||_.clientY>=window.innerHeight||$t<=0)&&Lt()}function Io(){document.hidden&&Lt()}async function Ro(_){if(jf(_.dataTransfer)){_.preventDefault();try{await us(_.dataTransfer,"drop")&&t(68,pt=k("inbox.captured"))}catch(K){t(34,P=String(K))}finally{Lt()}}}function Xp(_){_.preventDefault(),_.dataTransfer.dropEffect="copy",t(96,mn=!0)}function Jp(){t(96,mn=!1)}async function Qp(_){_.preventDefault(),_.stopPropagation();try{await us(_.dataTransfer,"drop")&&t(68,pt=k("inbox.captured"))}catch(K){t(34,P=String(K))}finally{Lt()}}function ki(_){t(107,ye=_),t(108,V=""),t(109,se=[]),t(110,Ee=null)}function fs(){t(107,ye=null),t(108,V=""),t(109,se=[]),t(110,Ee=null),t(111,Oe=!1)}async function xp(){const _=V.trim();if(!_||_.length<2){t(109,se=[]);return}t(111,Oe=!0);try{const K=await pe("SearchNodes",_)||[];t(109,se=K.filter(de=>Qy(de)&&de.id!==(ye==null?void 0:ye.id)))}catch{t(109,se=[])}finally{t(111,Oe=!1)}}function $p(_){t(108,V=_.target.value),t(110,Ee=null),clearTimeout(et),et=setTimeout(xp,200)}function Mo(_){t(110,Ee=_),t(108,V=_.path||_.title),t(109,se=[])}async function Lo(){if(!(!ye||!Ee))try{await Oo(ye,Ee.id),fs()}catch(_){t(34,P=String(_))}}async function Oo(_,K){!_||!K||(await pe("ResolveInboxNode",_.id,K),t(3,xe=xe.filter(de=>de.id!==_.id)),t(66,he=he.filter(de=>de.id!==_.id)),await al(),J&&await Xi(J.id))}async function vi(_){const K=(_==null?void 0:_.suggestedTargetNodeId)||(J==null?void 0:J.id)||"";if(K)try{await Oo(_,K)}catch(de){t(34,P=String(de))}}function wi(_){jn({title:k("inbox.deleteTitle"),message:k("inbox.deleteConfirm",{title:_.title}),confirmText:k("common.delete"),danger:!0,onConfirm:async()=>{try{await pe("DeleteInboxNode",_.id),t(3,xe=xe.filter(K=>K.id!==_.id)),t(66,he=he.filter(K=>K.id!==_.id))}catch(K){t(34,P=String(K))}}})}function Do(_){t(70,Ot=_),t(71,Nt=_.title||""),t(72,Dt=_.url||""),t(73,fn=_.note||""),t(74,tn="")}function ds(){t(70,Ot=null),t(71,Nt=""),t(72,Dt=""),t(73,fn=""),t(74,tn="")}async function e1(){if(!(!Ot||!Dt.trim()))try{const _=await pe("UpdateLink",Ot.id,Nt.trim(),Dt.trim(),fn);t(69,bt=bt.map(K=>K.id===_.id?_:K)),ds()}catch(_){t(74,tn=String(_))}}async function Po(_){jn({title:k("links.deleteTitle"),message:k("links.deleteConfirm",{title:_.title}),confirmText:k("common.delete"),danger:!0,onConfirm:async()=>{try{await pe("DeleteLink",_.id),t(69,bt=bt.filter(K=>K.id!==_.id))}catch(K){t(34,P=String(K))}}})}async function qo(_){try{await pe("OpenLink",_.id)}catch(K){t(34,P=String(K))}}async function jo(_){var K,de;try{await((de=(K=navigator.clipboard)==null?void 0:K.writeText)==null?void 0:de.call(K,_.url)),t(74,tn=k("links.copied"))}catch{t(74,tn=k("links.copyUnavailable"))}}function t1(){t(85,Sn=!0),t(86,pn=""),t(87,Pn="open_url"),t(88,hn="")}function zo(){t(85,Sn=!1),t(86,pn=""),t(88,hn="")}async function ps(){if(!(!pn.trim()||!hn.trim()||!J))try{const _=await pe("CreateAction",J.id,Pn,pn.trim(),hn.trim());_&&_.id&&t(49,Qe=[...Qe,_]),t(85,Sn=!1),t(86,pn=""),t(88,hn="")}catch(_){t(34,P=String(_))}}async function Bo(_){try{await pe("DeleteAction",_),t(49,Qe=Qe.filter(K=>K.id!==_))}catch(K){t(34,P=String(K))}}function n1(_){const K=nl.find(de=>de.id===_);return K?K.label:_}async function Yl(_){try{const K=await pe("GetNodeDetail",_);K&&Ft(K)}catch(K){t(34,P=String(K))}}async function dl(_){var Le,je,vt,Kt,Zn;const K=xy(_),de=K.nodeId;if(de)try{const Fn=await pe("GetNodeDetail",de);if(!Fn)return;if(Ft(Fn),K.tab==="notes"){if(rn("notes"),K.targetId){try{t(36,ne=await pe("ListNotes",de)||[])}catch{}const Nn=ne.find(In=>In.id===K.targetId);Nn&&setTimeout(()=>Kn(Nn),100)}}else if(K.tab==="files")if(rn("files"),K.targetId)try{const Nn=await pe("GetNodeDetail",K.targetId);Nn&&Nn.parent_id?((Le=oe==null?void 0:oe.resetToNode)==null||Le.call(oe,Nn.parent_id),(je=oe==null?void 0:oe.openFileById)==null||je.call(oe,K.targetId)):(vt=oe==null?void 0:oe.resetToNode)==null||vt.call(oe,de)}catch{(Kt=oe==null?void 0:oe.resetToNode)==null||Kt.call(oe,de)}else(Zn=oe==null?void 0:oe.resetToNode)==null||Zn.call(oe,de)}catch(Fn){t(34,P=String(Fn))}}async function Ll(_){return dl(_)}async function l1(_){var K,de,Le;if(!(!_||!_.nodeId))try{if(_.type==="link"){const vt=await pe("GetNodeDetail",_.nodeId);vt&&(await Ft(vt),rn("links"));return}if(_.type==="action"){const vt=await pe("GetNodeDetail",_.nodeId);vt&&(await Ft(vt),rn("actions"));return}const je=await pe("GetNodeDetail",_.nodeId);if(!je)return;if(_.type==="note"){const vt=je.parent_id||je.parentId||"",Kt=vt?await pe("GetNodeDetail",vt):null;if(Kt){await Ft(Kt),rn("notes"),t(36,ne=await pe("ListNotes",Kt.id)||[]);const Zn=ne.find(Fn=>Fn.id===je.id);Zn&&await Kn(Zn)}return}if(_.type==="file"){const vt=je.parent_id||je.parentId||"",Kt=vt?await pe("GetNodeDetail",vt):null;Kt&&(await Ft(Kt),rn("files"),(K=oe==null?void 0:oe.resetToNode)==null||K.call(oe,Kt.id),(de=oe==null?void 0:oe.openFileById)==null||de.call(oe,je.id));return}if(_.type==="folder"){await Ft(je),rn("files"),(Le=oe==null?void 0:oe.resetToNode)==null||Le.call(oe,je.id);return}await Ft(je)}catch(je){t(34,P=String(je))}}async function hs(){try{t(112,nt=await pe("SyncStatus"))}catch{t(112,nt={configured:!1,serverUrl:"",deviceId:"",unpushedOps:0,lastSyncAt:"",syncInterval:0})}}let Fo="general";function ms(_){t(116,Fo=_||"general"),t(13,h=!0)}function Uo(){t(13,h=!1)}async function i1(){try{t(0,m=await pe("ListSystemViewsWithPlugins")||[])}catch{}}function s1(_){const K=Array.isArray(_==null?void 0:_.conflicts)?_.conflicts:[],de=Array.isArray(_==null?void 0:_.applyErrors)?_.applyErrors:[],Le=[];return K.length>0&&Le.push(k("sync.conflictsCount",{count:K.length})),de.length>0&&Le.push(k("sync.applyErrorsCount",{count:de.length})),Le.join(" · ")}async function o1(){t(113,St=!0),t(114,Et=""),t(115,zt="");try{const _=await pe("SyncNow");await hs(),t(114,Et=s1(_)),t(115,zt=Et?"warning":"")}catch(_){console.error("sync error:",_),t(114,Et=`${k("sync.status.error")}: ${(_==null?void 0:_.message)||_}`),t(115,zt="warning")}finally{t(113,St=!1)}}function r1(_){t(11,d=!1),t(10,c=_),t(89,jt=!1),window.location.reload()}function a1(_){t(12,p=!1),t(10,c=_),t(89,jt=!1),window.location.reload()}const c1=_=>_.nodeId===J.id,u1=_=>pi(_.id),f1=()=>ms("sync"),d1=()=>ms(),p1=()=>is(Ct),h1=()=>ss(Ct),m1=()=>pe("OpenTrashFolder"),g1=()=>t(34,P=""),_1=()=>t(34,P=""),b1=()=>t(34,P="");function k1(){Ue=this.value,t(48,Ue)}const v1=_=>{_.key==="Enter"&&$i(),_.key==="Escape"&&Vn()},w1=()=>xi(le.id,le.title);function y1(_){On[_?"unshift":"push"](()=>{me=_,t(38,me)})}const E1=_=>rn(_.id),T1=()=>{rn("notes")},S1=()=>{rn("files"),oe&&oe.addFile()},C1=_=>Kn(_.detail.note),A1=_=>uo(_.detail.title),N1=_=>Kn(_.detail.note),I1=_=>xi(_.detail.noteId,_.detail.currentTitle),R1=_=>po(_.detail.note);function M1(_){On[_?"unshift":"push"](()=>{oe=_,t(39,oe)})}const L1=_=>Kn(_.detail),O1=_=>co(_.detail.nodeId),D1=_=>t(34,P=_.detail.message),P1=_=>vi(_),q1=_=>ki(_),j1=_=>yn(_),z1=_=>zn(_),B1=_=>wi(_),F1=_=>yn(_),U1=(_,K)=>K.key==="Enter"&&yn(_),H1=_=>qo(_),W1=_=>jo(_),G1=_=>Do(_),K1=_=>Po(_),V1=_=>pe("RunAction",_.id),Z1=_=>Bo(_.id),Y1=()=>hi(),X1=_=>_.nodeId===J.id,J1=_=>gi(_),Q1=_=>os(_),x1=_=>_i(_),$1=(_,K,de)=>t(60,K[de]._expanded=!_._expanded,ge,t(2,J)),eh=(_,K,de,Le)=>Le.key==="Enter"&&t(60,K[de]._expanded=!_._expanded,ge,t(2,J)),th=_=>dl(_),nh=_=>zn(_.nodeId),lh=_=>hi(_),ih=_=>ts(_),sh=_=>dl(_),oh=_=>zn(_.nodeId),rh=_=>as(_),ah=(_,K)=>K.key==="Enter"&&as(_),ch=_=>Ll(_),uh=(_,K)=>K.key==="Enter"&&Ll(_),fh=()=>{t(4,yt="date"),t(5,At=yt==="date"&&At==="desc"?"asc":"desc")},dh=()=>{t(4,yt="name"),t(5,At=yt==="name"&&At==="desc"?"asc":"desc")},ph=()=>{t(4,yt="type"),t(5,At=yt==="type"&&At==="desc"?"asc":"desc")};function hh(){en=this.checked,t(6,en)}const mh=_=>vi(_),gh=_=>ki(_),_h=_=>yn(_),bh=_=>zn(_),kh=_=>wi(_),vh=_=>yn(_),wh=(_,K)=>K.key==="Enter"&&yn(_),yh=_=>vi(_),Eh=_=>ki(_),Th=_=>yn(_),Sh=_=>zn(_),Ch=_=>wi(_),Ah=_=>yn(_),Nh=(_,K)=>K.key==="Enter"&&yn(_),Ih=_=>go(_.id),Rh=_=>_.type!=="file"?Rl(_):Zl(_),Mh=(_,K)=>K.key==="Enter"&&(_.type!=="file"?Rl(_):Zl(_)),Lh=_=>_.type!=="file"?Rl(_):Zl(_),Oh=(_,K)=>K.key==="Enter"&&(_.type!=="file"?Rl(_):Zl(_)),Dh=_=>is(ls(_.id)),Ph=_=>ss(ls(_.id)),qh=()=>t(28,W="suggestions"),jh=()=>t(28,W="worklog"),zh=_=>Yl(_.nodeId),Bh=(_,K,de,Le)=>t(60,K[de].suggestedMin=parseInt(Le.target.value),ge),Fh=_=>gi(_),Uh=_=>_o(_),Hh=_=>_i(_),Wh=(_,K,de)=>t(60,K[de]._expanded=!_._expanded,ge),Gh=(_,K,de,Le)=>Le.key==="Enter"&&t(60,K[de]._expanded=!_._expanded,ge),Kh=_=>dl(_),Vh=_=>zn(_.nodeId),Zh=()=>bi("csv"),Yh=()=>bi("markdown"),Xh=()=>bi("pdf");function Jh(){R=this.value,t(20,R)}function Qh(){M=this.value,t(21,M)}const xh=()=>{t(29,G=""),t(26,U=""),vo()};function $h(){G=this.value,t(29,G)}const em=()=>setTimeout(()=>t(31,H=!1),200),tm=_=>ko(_);function nm(){A=this.checked,t(22,A)}function lm(){j=Ri(this),t(24,j)}function im(){B=Ri(this),t(25,B)}const sm=_=>Yl(_.nodeId),om=_=>rs(_),rm=(_,K)=>K.key==="Enter"&&rs(_),am=_=>hi(_),cm=_=>ts(_),um=_=>dl(_),fm=_=>Yl(_),dm=_=>Ll(_),pm=_=>dl(_),hm=_=>gi(_),mm=_=>os(_),gm=_=>_i(_),_m=_=>zn(_),bm=_=>yn(_),km=_=>{pi("trash"),Rl({id:_,title:""}),cl()},vm=_=>Ll(_),wm=(_,K)=>K.key==="Enter"&&Ll(_),ym=()=>t(83,Gt=null),Em=_=>t(83,Gt=_);function Tm(){ln=this.value,t(81,ln)}const Sm=_=>_.key==="Enter"&&so(),Cm=_=>lo(_),Am=()=>ao(Qt.node),Nm=()=>oo(Qt.node),Im=()=>ro(Qt.node),Rm=()=>zn(Qt.node);function Mm(){Ze=this.value,t(54,Ze)}function Lm(){Ke=this.value,t(52,Ke)}function Om(){De=Gl(this.value),t(53,De)}function Dm(){Pe=this.value,t(55,Pe)}function Pm(){ue=this.checked,t(56,ue)}function qm(){ke=this.checked,t(57,ke)}function jm(){pn=this.value,t(86,pn)}const zm=_=>_.key==="Enter"&&ps();function Bm(){Pn=Ri(this),t(87,Pn),t(121,nl)}function Fm(){hn=this.value,t(88,hn)}const Um=_=>_.key==="Enter"&&ps();function Hm(){Zt=this.value,t(105,Zt)}function Wm(){V=this.value,t(108,V)}const Gm=_=>_.key==="Enter"&&Ee&&Lo(),Km=_=>Mo(_);function Vm(){Nt=this.value,t(71,Nt)}function Zm(){Dt=this.value,t(72,Dt)}function Ym(){fn=this.value,t(73,fn)}const Xm=_=>pe("OpenFile",_.detail);function Jm(){Re=this.value,t(42,Re)}const Qm=_=>{_.key==="Enter"&&Qi(),_.key==="Escape"&&t(41,Ye=!1)};function xm(){ee=this.value,t(43,ee)}const $m=_=>{_.key==="Enter"&&Qi(),_.key==="Escape"&&t(41,Ye=!1)},eg=()=>t(41,Ye=!1),tg=()=>t(41,Ye=!1),ng=_=>_.key==="Escape"&&t(41,Ye=!1);function lg(){Ue=this.value,t(48,Ue)}const ig=_=>{_.key==="Enter"&&$i(),_.key==="Escape"&&Vn()},sg=_=>_.key==="Escape"&&Vn();return n.$$.update=()=>{var _;n.$$.dirty[0]&384&&t(77,tl=Vy((Pt==null?void 0:Pt.nodes)||[],Rt)),n.$$.dirty[0]&7&&t(119,l=J?J.title:Z?((_=m.find(K=>K.id===Z))==null?void 0:_.label)||"":k("nav.selectPrompt")),n.$$.dirty[0]&4&&t(118,i=J?cs(J.type):""),n.$$.dirty[0]&56&&t(9,o=Wy(xe,yt,At)),n.$$.dirty[0]&576&&t(117,s=en?Bt(o):null),n.$$.dirty[7]&16384&&t(78,kn=gt.length===0?k("nav.trash"):[k("nav.trash"),...gt.map(K=>K.title)].join(" / "))},t(79,Al=((Ho=Cp())==null?void 0:Ho.title)||k("trash.deletedNodes")),[m,Z,J,xe,yt,At,en,Pt,Rt,o,c,d,p,h,g,b,v,y,I,N,R,M,A,L,j,B,U,z,W,G,X,H,D,q,P,te,ne,le,me,oe,ze,Ye,Re,ee,re,Ne,Be,ve,Ue,Qe,Fe,Ce,Ke,De,Ze,Pe,ue,ke,$,we,ge,Ie,it,ut,Xe,mt,he,qe,pt,bt,Ot,Nt,Dt,fn,tn,Dn,Ct,tl,kn,Al,qt,ln,dn,Gt,Qt,Sn,pn,Pn,hn,jt,sn,xt,Cn,ll,qn,Wn,mn,gn,An,Gn,Nl,il,sl,x,wt,Zt,_n,ye,V,se,Ee,Oe,nt,St,Et,zt,Fo,s,i,l,Y,nl,on,rn,pi,Ft,eo,tp,np,to,lp,ip,lo,sp,io,so,op,rl,rp,ap,cp,up,fp,oo,ro,zn,yn,ao,co,uo,Kn,po,ho,dp,Qi,mp,gp,xi,Vn,$i,_p,wp,yp,Ep,Tp,hi,mo,Sp,ts,cl,Rl,Ap,Zl,go,ls,is,ss,Np,gi,_i,Ip,Rp,Mp,Lp,os,_o,ul,bi,rs,as,Dp,ko,vo,Pp,jp,cs,zp,Up,Zp,Xp,Jp,Qp,ki,fs,$p,Mo,Lo,vi,wi,Do,ds,e1,Po,qo,jo,t1,zo,ps,Bo,n1,Yl,dl,Ll,l1,hs,ms,Uo,i1,o1,r1,a1,gt,c1,u1,f1,d1,p1,h1,m1,g1,_1,b1,k1,v1,w1,y1,E1,T1,S1,C1,A1,N1,I1,R1,M1,L1,O1,D1,P1,q1,j1,z1,B1,F1,U1,H1,W1,G1,K1,V1,Z1,Y1,X1,J1,Q1,x1,$1,eh,th,nh,lh,ih,sh,oh,rh,ah,ch,uh,fh,dh,ph,hh,mh,gh,_h,bh,kh,vh,wh,yh,Eh,Th,Sh,Ch,Ah,Nh,Ih,Rh,Mh,Lh,Oh,Dh,Ph,qh,jh,zh,Bh,Fh,Uh,Hh,Wh,Gh,Kh,Vh,Zh,Yh,Xh,Jh,Qh,xh,$h,em,tm,nm,lm,im,sm,om,rm,am,cm,um,fm,dm,pm,hm,mm,gm,_m,bm,km,vm,wm,ym,Em,Tm,Sm,Cm,Am,Nm,Im,Rm,Mm,Lm,Om,Dm,Pm,qm,jm,zm,Bm,Fm,Um,Hm,Wm,Gm,Km,Vm,Zm,Ym,Xm,Jm,Qm,xm,$m,eg,tg,ng,lg,ig,sg]}class e4 extends ct{constructor(e){super(),at(this,e,$y,Hy,rt,{},null,[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1])}}window.addEventListener("error",n=>{const e=n.error?String(n.error):n.message,t=n.error&&n.error.stack?n.error.stack:"";console.error("[Frontend Error]",e,t);try{window.go&&window.go.main&&window.go.main.App&&typeof window.go.main.App.FrontendLog=="function"&&window.go.main.App.FrontendLog("error",e,t)}catch{}});window.addEventListener("unhandledrejection",n=>{const e=n.reason,t=e instanceof Error?String(e):JSON.stringify(e),l=e instanceof Error&&e.stack?e.stack:"";console.error("[Unhandled Promise Rejection]",t,l);try{window.go&&window.go.main&&window.go.main.App&&typeof window.go.main.App.FrontendLog=="function"&&window.go.main.App.FrontendLog("error","Unhandled rejection: "+t,l)}catch{}});try{new e4({target:document.getElementById("app")})}catch(n){console.error("[Fatal] App mount failed:",n);const e=document.getElementById("app");e&&(e.innerHTML='<div style="padding:24px;color:#ff6b6b;font-family:monospace;white-space:pre-wrap"><h2>Frontend Runtime Error</h2><p>'+String(n)+"</p>"+(n.stack?"<pre>"+n.stack+"</pre>":"")+"</div>")}
|