@loicngr/kobo 1.11.35 → 1.11.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/dist/server/services/agent/engines/claude-code/engine.js +26 -0
  3. package/dist/server/services/agent/engines/claude-code/event-mapper.js +10 -10
  4. package/dist/server/services/agent/orchestrator.js +29 -0
  5. package/dist/server/services/auto-loop-service.js +14 -3
  6. package/dist/server/services/wakeup-service.js +14 -0
  7. package/package.json +1 -1
  8. package/src/client/dist/pwa/assets/{ActivityFeed-YRbIRutK.js → ActivityFeed-BPx-xhFY.js} +1 -1
  9. package/src/client/dist/pwa/assets/{ChangelogPage-DVLWWvvz.js → ChangelogPage-BFGYQ6eY.js} +1 -1
  10. package/src/client/dist/pwa/assets/{ComparisonPanel-LZrvk6a6.js → ComparisonPanel-C6DfjpZZ.js} +1 -1
  11. package/src/client/dist/pwa/assets/{CreatePage-gFrn4xl9.js → CreatePage-ypEzkAKv.js} +1 -1
  12. package/src/client/dist/pwa/assets/{DashboardPage-0odIhseb.js → DashboardPage-DsVRjzzy.js} +1 -1
  13. package/src/client/dist/pwa/assets/{DiffViewer-NWB2uQkz.js → DiffViewer-DSlSAIiW.js} +3 -3
  14. package/src/client/dist/pwa/assets/{DocumentsPanel-3yApHgbl.js → DocumentsPanel-C1eXTw_Q.js} +1 -1
  15. package/src/client/dist/pwa/assets/{DrawerToggleButton-C_bNtZsE.js → DrawerToggleButton-BxYpUb4y.js} +1 -1
  16. package/src/client/dist/pwa/assets/{GitPanel-BMjWwiAX.js → GitPanel-DnBWSdVp.js} +3 -3
  17. package/src/client/dist/pwa/assets/{HealthPage-Vyr1YG2o.js → HealthPage-rX1TiaP9.js} +1 -1
  18. package/src/client/dist/pwa/assets/{MainLayout-s8_9FPE2.js → MainLayout-Ceuh5uJj.js} +2 -2
  19. package/src/client/dist/pwa/assets/{QBtnDropdown-BxuXEBp5.js → QBtnDropdown-K7syiyyH.js} +1 -1
  20. package/src/client/dist/pwa/assets/{QDrawer-BdlDiU6a.js → QDrawer-DapzE8DH.js} +1 -1
  21. package/src/client/dist/pwa/assets/{QSelect-BrSemS3o.js → QSelect-Bodml89k.js} +1 -1
  22. package/src/client/dist/pwa/assets/{QTooltip-CLCFHW2D.js → QTooltip-K-9OdDfq.js} +1 -1
  23. package/src/client/dist/pwa/assets/{SchedulePanel-F9bdAq6K.js → SchedulePanel-CfumTzAa.js} +1 -1
  24. package/src/client/dist/pwa/assets/{SearchPage-CBCefYqc.js → SearchPage-AhZYS-dS.js} +1 -1
  25. package/src/client/dist/pwa/assets/{SettingsPage-BPgTHmKj.js → SettingsPage-BoHXWvKn.js} +1 -1
  26. package/src/client/dist/pwa/assets/{SplitWorkspacePage-DDs2nuoT.js → SplitWorkspacePage-3wK11mcu.js} +1 -1
  27. package/src/client/dist/pwa/assets/{TerminalPanel-CulE0wTU.js → TerminalPanel-CKg0BeNK.js} +1 -1
  28. package/src/client/dist/pwa/assets/{TouchPan-DUgqs2cW.js → TouchPan-D6ctyPYf.js} +1 -1
  29. package/src/client/dist/pwa/assets/{TourReplayButton-CdHpGBdr.js → TourReplayButton-Dn4Dy_kH.js} +1 -1
  30. package/src/client/dist/pwa/assets/{WorkspaceAttentionLabels-W5SvqzXO.js → WorkspaceAttentionLabels-DnoabsfK.js} +1 -1
  31. package/src/client/dist/pwa/assets/{WorkspacePage-B6O7j57u.js → WorkspacePage-BI7CW2yT.js} +3 -3
  32. package/src/client/dist/pwa/assets/{browser-CnuqDTyc.js → browser-DHpSUK8-.js} +1 -1
  33. package/src/client/dist/pwa/assets/{build-path-tree-JodIO7-I.js → build-path-tree-DtEjsZlh.js} +1 -1
  34. package/src/client/dist/pwa/assets/{documents-3ZBK1pXE.js → documents-B2dg1wRf.js} +1 -1
  35. package/src/client/dist/pwa/assets/{editor.api-DZ9WO_J7.js → editor.api-Cd1D35oj.js} +1 -1
  36. package/src/client/dist/pwa/assets/{efforts-LrtJPx-j.js → efforts-IB1vPjJQ.js} +1 -1
  37. package/src/client/dist/pwa/assets/{engineFeatures-DmnHj_uD.js → engineFeatures-DYSyDEJe.js} +1 -1
  38. package/src/client/dist/pwa/assets/{expand-template-Dv4JC2zU.js → expand-template-CNAHiesL.js} +1 -1
  39. package/src/client/dist/pwa/assets/{format-CHjfjuhr.js → format-DidwgbbX.js} +1 -1
  40. package/src/client/dist/pwa/assets/{formatters-BsgH8CoH.js → formatters-BjzyUHlu.js} +1 -1
  41. package/src/client/dist/pwa/assets/{freemarker2-Dla55SIR.js → freemarker2-jNGWawVw.js} +1 -1
  42. package/src/client/dist/pwa/assets/{handlebars-DtuuZy7D.js → handlebars-DfSqClrW.js} +1 -1
  43. package/src/client/dist/pwa/assets/{html-CKYOCR8W.js → html-ByLX-n8T.js} +1 -1
  44. package/src/client/dist/pwa/assets/i18n-CnjXQjxy.js +1 -0
  45. package/src/client/dist/pwa/assets/{index-CIP08MpU.js → index-DcwcFDrZ.js} +2 -2
  46. package/src/client/dist/pwa/assets/{javascript-BxzTnsIQ.js → javascript-Dja1fHfv.js} +1 -1
  47. package/src/client/dist/pwa/assets/{liquid-C8BfPFUy.js → liquid-D315hW6C.js} +1 -1
  48. package/src/client/dist/pwa/assets/{mdx-DZm_YXkC.js → mdx-B5yUwpzv.js} +1 -1
  49. package/src/client/dist/pwa/assets/{monaco-contributions-HDbRHiNR.js → monaco-contributions-NfxrU0r3.js} +1 -1
  50. package/src/client/dist/pwa/assets/{monaco.contribution-DRW-851R.js → monaco.contribution-D1hXPkDZ.js} +2 -2
  51. package/src/client/dist/pwa/assets/{network-auth-Ce9hsryo.js → network-auth-CARVtbNe.js} +1 -1
  52. package/src/client/dist/pwa/assets/{notify-theme-OBpMEBvP.js → notify-theme-CKC3-EAZ.js} +1 -1
  53. package/src/client/dist/pwa/assets/{pending-diff-open-CVQxWyzP.js → pending-diff-open-BlLrQaW7.js} +1 -1
  54. package/src/client/dist/pwa/assets/{permissionModes-CVFHS2ec.js → permissionModes-DMzFEQhr.js} +1 -1
  55. package/src/client/dist/pwa/assets/{project-color-mcpQp2o6.js → project-color-CFjdIj6W.js} +1 -1
  56. package/src/client/dist/pwa/assets/{python-CO5iQN74.js → python-Dc6mnEip.js} +1 -1
  57. package/src/client/dist/pwa/assets/{razor-BC7D8LMf.js → razor-DArVFBGO.js} +1 -1
  58. package/src/client/dist/pwa/assets/{render-chat-markdown-Cb15kvox.js → render-chat-markdown-BTPAjU2g.js} +1 -1
  59. package/src/client/dist/pwa/assets/{typescript-BCHCSNpD.js → typescript-COE1vIyB.js} +1 -1
  60. package/src/client/dist/pwa/assets/{use-tours-DhLhglwr.js → use-tours-C8x2V1w5.js} +1 -1
  61. package/src/client/dist/pwa/assets/{workspace-templates-CoWrOEac.js → workspace-templates-DHyA_GEW.js} +1 -1
  62. package/src/client/dist/pwa/assets/{xml-y9M3NAIZ.js → xml-eYjr4cGR.js} +1 -1
  63. package/src/client/dist/pwa/assets/{yaml-CthlToPo.js → yaml-UooOcssF.js} +1 -1
  64. package/src/client/dist/pwa/index.html +1 -1
  65. package/src/client/dist/pwa/sw.js +1 -1
  66. package/src/client/dist/pwa/assets/i18n-DTfKQUMf.js +0 -1
@@ -1 +1 @@
1
- import{S as e,v as t}from"./reactivity.esm-bundler-DEJj9cFv.js";import{C as n,J as r,N as i,O as a,P as o,R as s,T as c,X as l,b as u,j as d,k as f,l as p}from"./runtime-core.esm-bundler-CDnVUfeZ.js";import{J as ee,U as te,dt as ne,et as m,l as re,st as h,tt as g,w as ie,y as ae}from"./QBtn-CZaBclNw.js";import{a as _,i as oe}from"./pinia-BKqmoVru.js";import{At as se,Nt as v,s as ce}from"./index-CIP08MpU.js";import{c as le,l as y}from"./QSelect-BrSemS3o.js";import{f as ue}from"./permissionModes-CVFHS2ec.js";var b=[`none`,`strict`,`leaf`,`leaf-filtered`],de=Symbol(`QTree`),fe=g({name:`QTreeNode`,props:{node:{type:Object,required:!0}},setup(e){let t=c(de);return()=>t.renderNode(e.node)}});function x(e){let n=new Map,i=new Set(e());return r(e,e=>{let t=new Set(e);i.forEach(e=>{if(!t.has(e)){let t=n.get(e);t!==void 0&&(t.value=!1)}}),t.forEach(e=>{if(!i.has(e)){let t=n.get(e);t!==void 0&&(t.value=!0)}}),i=t},{flush:`sync`}),{has(e){let r=n.get(e);return r===void 0&&(r=t(i.has(e)),n.set(e,r)),r.value},prune(e){n.forEach((t,r)=>{e.has(r)||n.delete(r)})}}}function pe(e,t){if(e.depth===0)return[];let r=e.lines.map(e=>n(`div`,{class:`q-tree__vguide`+(e?` q-tree__vguide--line`:``)}));return r.push(n(`div`,{class:`q-tree__vguide`+(t?` q-tree__vguide--connector`:``)+(e.cont?` q-tree__vguide--line`:``)})),r}function me(e){if(e.icon!==void 0)return n(re,{class:`q-tree__icon q-mr-sm`,name:e.icon,color:e.iconColor});let t=e.img||e.avatar;if(t)return n(`img`,{class:`q-tree__${e.img?`img`:`avatar`} q-mr-sm`,src:t})}var S=g({name:`QTree`,props:{..._,nodes:{type:Array,required:!0},nodeKey:{type:String,required:!0},labelKey:{type:String,default:`label`},childrenKey:{type:String,default:`children`},dense:Boolean,color:String,controlColor:String,textColor:String,selectedColor:String,icon:String,tickStrategy:{type:String,default:`none`,validator:e=>b.includes(e)},ticked:Array,expanded:Array,selected:{},noSelectionUnset:Boolean,defaultExpandAll:Boolean,accordion:Boolean,filter:String,filterMethod:Function,duration:{},noConnectors:Boolean,noTransition:Boolean,virtualScroll:Boolean,virtualScrollTarget:v,virtualScrollItemSize:y.virtualScrollItemSize.type,virtualScrollSliceSize:y.virtualScrollSliceSize,virtualScrollSliceRatioBefore:y.virtualScrollSliceRatioBefore,virtualScrollSliceRatioAfter:y.virtualScrollSliceRatioAfter,virtualScrollStickySizeStart:y.virtualScrollStickySizeStart,virtualScrollStickySizeEnd:y.virtualScrollStickySizeEnd,onVirtualScroll:Function,noNodesLabel:String,noResultsLabel:String},emits:[`update:expanded`,`update:ticked`,`update:selected`,`lazyLoad`,`afterShow`,`afterHide`],setup(c,{slots:g,emit:_}){let{proxy:v}=u(),y=ae(),b=oe(c,y),S=t({}),C=t(c.ticked||[]),w=t(c.expanded||[]),T=p(()=>new Set(w.value)),E=null,D=null,O=new Set,k={},A={},he=p(()=>`q-tree q-tree--${c.dense?`dense`:`standard`}`+(c.noConnectors?` q-tree--no-connectors`:``)+(b()?` q-tree--dark`:``)+(c.color===void 0?``:` text-${c.color}`)),j=t(c.selected!==void 0);r(()=>c.selected!==void 0,e=>{j.value=e},{flush:`sync`});let ge=p(()=>c.icon||y.iconSet.tree.icon),_e=p(()=>c.controlColor||c.color),M=p(()=>c.textColor===void 0?``:` text-${c.textColor}`),ve=p(()=>{let e=c.selectedColor||c.color;return e?` text-${e}`:``}),ye=p(()=>c.filterMethod===void 0?(e,t)=>{let n=t.toLowerCase();return e[c.labelKey]&&e[c.labelKey].toLowerCase().includes(n)}:c.filterMethod),N=p(()=>{let e=new Map,t=[],n=(t,r,i)=>{let a=t.tickStrategy||(i===null?c.tickStrategy:i.tickStrategy),o=t[c.nodeKey],s=t[c.childrenKey],l=Array.isArray(s)&&s.length!==0,u=a===`strict`,d=t.lazy;d===!0&&S.value[o]!==void 0&&Array.isArray(s)&&(d=S.value[o]);let f={key:o,node:t,parentKey:r,childKeys:[],isParent:l,lazy:d,disabled:t.disabled,expandable:!t.disabled&&t.expandable!==!1,selectableBase:t.selectable!==!1,tickableBase:!t.disabled&&t.tickable!==!1,noTickBase:t.noTick===!0||!u&&d&&d!==`loaded`,tickStrategy:a,hasTicking:a!==`none`,strictTicking:u,leafFilteredTicking:a===`leaf-filtered`,leafTicking:a===`leaf`||a===`leaf-filtered`};return e.set(o,f),l&&s.forEach(e=>{f.childKeys.push(n(e,o,f).key)}),f};return c.nodes.forEach(e=>{t.push(n(e,null,null).key)}),{map:e,rootKeys:t}}),P=p(()=>{if(!c.filter)return null;let e=new Set,t=new Set,n=r=>{let i=r[c.nodeKey],a=!!ye.value(r,c.filter);return a&&e.add(i),Array.isArray(r[c.childrenKey])&&r[c.childrenKey].forEach(e=>{n(e)&&(a=!0)}),a&&t.add(i),a};return c.nodes.forEach(n),{own:e,visible:t}});function be(e){let t=P.value;return t===null||t.visible.has(e)}let F=new Map,I=new Map,L=new Map,R=new Map,xe=x(()=>C.value),Se=x(()=>w.value),Ce=x(()=>c.selected!==void 0&&c.selected!==null?[c.selected]:[]);function we(e){let t=F.get(e);return t===void 0&&(t=p(()=>{let t=N.value.map.get(e);return t===void 0||!t.tickableBase?!1:!t.leafTicking||t.parentKey===null||we(t.parentKey).value}),F.set(e,t)),t}function z(e){let t=I.get(e);if(t===void 0){let n;t=p(()=>{let t=N.value.map.get(e);if(t===void 0){n=void 0;return}let r=t.noTickBase,i=we(e).value,a=t.strictTicking||!t.isParent?xe.has(e):!1,o,s;if(t.isParent){let n=t.childKeys.map(e=>z(e).value),c=P.value,l=c===null||c.visible.has(e);if(c!==null&&c.own.has(e)&&r!==!0&&t.disabled!==!0&&i&&t.leafFilteredTicking&&t.childKeys.every((e,t)=>!c.visible.has(e)||n[t].noTick===!0||!n[t].tickable)&&(i=!1),l&&(r!==!0&&!t.strictTicking&&n.every(e=>e.noTick)&&(r=!0),t.leafTicking)){if(a=!1,o=n.some(e=>e.indeterminate===!0),i&&=n.some(e=>e.tickable),!o){let e=n.reduce((e,t)=>t.ticked?e+1:e,0);e===n.length?a=!0:e>0&&(o=!0)}o&&(s=n.every(e=>!e.tickable||!e.ticked))}}return n!==void 0&&n.noTick===r&&n.tickable===i&&n.ticked===a&&n.indeterminate===o&&n.indeterminateNextState===s||(n={noTick:r,tickable:i,ticked:a,indeterminate:o,indeterminateNextState:s}),n}),I.set(e,t)}return t}function B(e){let t=L.get(e);if(t===void 0){let n,r,i;t=p(()=>{let t=N.value.map.get(e);if(t===void 0){n=r=i=void 0;return}let a=z(e).value,o=P.value,s=!t.disabled&&j.value&&t.selectableBase,c=!t.disabled&&(s||t.expandable&&(t.isParent||t.lazy===!0)),l=o===null||o.visible.has(e),u=Ce.has(e)&&s,d=t.isParent?Se.has(e):!1,f=t.isParent&&(o===null||t.childKeys.some(e=>o.visible.has(e)));return n!==void 0&&r===t&&i===a&&n.link===c&&n.matchesFilter===l&&n.selected===u&&n.selectable===s&&n.expanded===d&&n.hasVisibleChildren===f?n:(r=t,i=a,n={key:e,isParent:t.isParent,lazy:t.lazy,disabled:t.disabled,link:c,matchesFilter:l,selected:u,selectable:s,expanded:d,expandable:t.expandable,noTick:a.noTick,tickable:a.tickable,tickStrategy:t.tickStrategy,hasTicking:t.hasTicking,strictTicking:t.strictTicking,leafFilteredTicking:t.leafFilteredTicking,leafTicking:t.leafTicking,ticked:a.ticked,indeterminate:a.indeterminate,indeterminateNextState:a.indeterminateNextState,hasVisibleChildren:f},n)}),L.set(e,t)}return t}function V(e){return B(e).value}function Te(e){let t=R.get(e);return t===void 0&&(t=p(()=>be(e)),R.set(e,t)),t}r(N,({map:e})=>{let t=t=>{t.forEach((n,r)=>{e.has(r)||t.delete(r)})};t(F),t(I),t(L),t(R),xe.prune(e),Se.prune(e),Ce.prune(e),O.forEach(t=>{e.has(t)||O.delete(t)})},{flush:`post`});let H=p(()=>{let e=[],{map:t,rootKeys:n}=N.value,r=P.value,i=T.value,a=(n,o,s,c)=>{let l=r===null?n:n.filter(e=>r.visible.has(e)),u=l.length-1;l.forEach((n,r)=>{let l=t.get(n),d=r<u;e.push({key:n,node:l.node,depth:o,lines:s,cont:d,posinset:r+1,setsize:u+1,parentDisabled:c}),l.isParent&&i.has(n)&&a(l.childKeys,o+1,o===0?s:[...s,d],c||l.disabled===!0)})};return a(n,0,[],!1),e}),Ee=p(()=>c.virtualScroll?H.value.length:0),De=p(()=>c.virtualScrollItemSize===void 0?c.dense?23:35:c.virtualScrollItemSize),U=e(null),W;function Oe(){return U.value}function ke(){return W}let{virtualScrollSliceRange:Ae,localResetVirtualScroll:G,padVirtualScroll:je,onVirtualScrollEvt:Me,scrollTo:Ne}=le({virtualScrollLength:Ee,getVirtualScrollTarget:ke,getVirtualScrollEl:Oe,virtualScrollItemSizeComputed:De});function K(){c.virtualScroll&&U.value!==null&&(W=se(U.value,c.virtualScrollTarget),W.addEventListener(`scroll`,Me,ee.passive))}function q(){W!==void 0&&(W.removeEventListener(`scroll`,Me,ee.passive),W=void 0)}r(Ee,()=>{c.virtualScroll&&G()}),r(()=>c.virtualScroll,e=>{q(),e&&(G(),a(K))}),r(()=>c.virtualScrollTarget,()=>{q(),K()}),o(K),f(K),i(q),d(q);let Pe=p(()=>{let e=[],{map:t,rootKeys:n}=N.value,r=P.value,i=n=>{if(r!==null&&!r.visible.has(n))return;e.push(n);let a=t.get(n);a.isParent&&T.value.has(n)&&a.childKeys.forEach(i)};return n.forEach(i),e});function Fe(){let e=Pe.value;return E!==null&&e.includes(E)?E:c.selected!==void 0&&c.selected!==null&&e.includes(c.selected)&&V(c.selected)?.selected===!0?c.selected:e[0]}function J(e){e!==D&&(D!=null&&A[D]?.setAttribute(`tabindex`,-1),A[e]?.setAttribute(`tabindex`,0),D=e)}r(()=>c.ticked,e=>{C.value=e}),r(()=>c.expanded,e=>{w.value=e});function Ie(e){let t=(n,r)=>{if(n||!r)return n;if(Array.isArray(r))return r.reduce(t,n);if(r[c.nodeKey]===e)return r;if(r[c.childrenKey])return t(null,r[c.childrenKey])};return t(null,c.nodes)}function Le(e){let{map:t}=N.value,n=t.get(e);return n!==void 0&&n.parentKey!==null?t.get(n.parentKey).node:void 0}function Re(e){let{map:t}=N.value;return e.map(e=>t.get(e)?.node)}function ze(){return Re(C.value)}function Be(){let e=[];return N.value.map.forEach((t,n)=>{t.isParent&&t.leafTicking&&z(n).value.indeterminate===!0&&e.push(t.node)}),e}function Ve(){return Re(w.value)}function He(e){return e?V(e)?.expanded===!0:!1}function Ue(){c.expanded===void 0?w.value=[]:_(`update:expanded`,[])}function We(){let e=[],t=n=>{n[c.childrenKey]&&n[c.childrenKey].length!==0&&n.expandable!==!1&&n.disabled!==!0&&(e.push(n[c.nodeKey]),n[c.childrenKey].forEach(t))};c.nodes.forEach(t),c.expanded===void 0?w.value=e:_(`update:expanded`,e)}function Y(e,t,n=Ie(e),r=V(e)){if(r.disabled!==!0){if(r.lazy&&r.lazy!==`loaded`){if(r.lazy===`loading`)return;S.value[e]=`loading`,Array.isArray(n[c.childrenKey])||(n[c.childrenKey]=[]),_(`lazyLoad`,{node:n,key:e,done:t=>{S.value[e]=`loaded`,n[c.childrenKey]=Array.isArray(t)?t:[],a(()=>{V(e)?.isParent===!0&&Ge(e,!0)})},fail:()=>{delete S.value[e],n[c.childrenKey].length===0&&delete n[c.childrenKey]}})}else r.isParent&&r.expandable&&Ge(e,t)}}function Ge(e,t){let n=w.value,r=c.expanded!==void 0;if(r&&(n=[...n]),t){let t=c.accordion?N.value.map.get(e):void 0;if(t!==void 0){let{map:r}=N.value,i=[];t.parentKey===null?N.value.rootKeys.forEach(t=>{t!==e&&i.push(t)}):r.get(t.parentKey).childKeys.forEach(t=>{t!==e&&r.get(t).expandable&&i.push(t)}),i.length!==0&&(n=n.filter(e=>!i.includes(e)))}n=[...n,e].filter((e,t,n)=>n.indexOf(e)===t)}else n=n.filter(t=>t!==e);r?_(`update:expanded`,n):w.value=n}function Ke(e){return e?V(e)?.ticked===!0:!1}function qe(e){return e?V(e)?.indeterminate===!0:!1}function Je(e){let t=e?V(e):void 0;return t===void 0?!1:t.indeterminate===!0?null:t.ticked}function X(e,t){let n=C.value,r=c.ticked!==void 0;r&&(n=[...n]),n=t?[...n,...e].filter((e,t,n)=>n.indexOf(e)===t):n.filter(t=>!e.includes(t)),r?_(`update:ticked`,n):C.value=n}function Ye(e,t,n){let r={tree:v,node:e,key:n,color:c.color,dark:b()};return h(r,`expanded`,()=>t.expanded,e=>{e!==t.expanded&&Y(n,e)}),h(r,`ticked`,()=>t.ticked,e=>{e!==t.ticked&&X([n],e)}),h(r,`indeterminate`,()=>t.indeterminate===!0),r}function Xe(e){return(c.filter?e.filter(e=>Te(e[c.nodeKey]).value):e).map(e=>n(fe,{key:e[c.nodeKey],node:e}))}function Ze(){_(`afterShow`)}function Qe(){_(`afterHide`)}function $e(e,t,r,i,a,o,s){return n(`div`,{class:`q-tree__node-header relative-position row no-wrap items-center q-focusable`+(t.link?` q-tree__node--link q-hoverable`:``)+(t.selected?` q-tree__node--selected`:``)+(t.disabled===!0?` q-tree__node--disabled`:``),ref:e=>{e===null?delete A[r]:A[r]=e},tabindex:r===D?0:-1,"aria-expanded":i?t.expanded?`true`:`false`:null,"aria-selected":t.selectable?t.selected?`true`:`false`:null,"aria-checked":t.hasTicking&&t.noTick!==!0?t.indeterminate===!0?`mixed`:t.ticked?`true`:`false`:null,"aria-disabled":t.disabled===!0?`true`:null,role:`treeitem`,...s,onFocus(){E=r,J(r)},onClick:t=>{ot(e,r,t)},onKeydown(n){n.target===n.currentTarget&&te(n)!==!0&&(n.keyCode===13?ot(e,r,n,!0):n.keyCode===32?t.hasTicking&&t.noTick!==!0&&t.tickable?(m(n),st(r,!t.ticked)):$(e,r,n,!0):at(r,n.keyCode)&&m(n))}},[n(`div`,{class:`q-focus-helper`,tabindex:-1,ref:e=>{e===null?delete k[r]:k[r]=e}}),t.lazy===`loading`?n(ie,{class:`q-tree__spinner`,color:_e.value}):i?n(re,{class:`q-tree__arrow`+(t.expanded?` q-tree__arrow--rotate`:``),name:ge.value,onClick(t){$(e,r,t)}}):null,t.hasTicking&&t.noTick!==!0?n(ce,{class:`q-tree__tickbox`,modelValue:t.indeterminate===!0?null:t.ticked,color:_e.value,dark:b(),dense:!0,keepColor:!0,disable:!t.tickable,tabindex:-1,"aria-hidden":`true`,onMousedown(e){e.preventDefault(),E=r,J(r),Z(r)},"onUpdate:modelValue":e=>{st(r,e)}}):null,n(`div`,{class:`q-tree__node-header-content col row no-wrap items-center`+(t.selected?ve.value:M.value)},[o?o(a):[me(e),n(`div`,e[c.labelKey])]])])}function et(e){let t=e[c.nodeKey],r=B(t).value,i=e.header&&g[`header-${e.header}`]||g[`default-header`];if(r===void 0)return null;r.expanded&&O.add(t);let a=r.expanded||c.noTransition!==!0&&O.has(t),o=r.isParent&&a?Xe(e[c.childrenKey]):[],s=r.hasVisibleChildren||r.lazy&&r.lazy!==`loaded`,u=e.body&&g[`body-${e.body}`]||g[`default-body`],d=i!==void 0||u!==void 0?Ye(e,r,t):null;return u!==void 0&&(u=n(`div`,{class:`q-tree__node-body relative-position`},[n(`div`,{class:M.value},[u(d)])])),n(`div`,{key:t,class:`q-tree__node relative-position q-tree__node--${s?`parent`:`child`}`},[$e(e,r,t,s,d,i),s?c.noTransition?r.expanded?n(`div`,{class:`q-tree__node-collapsible`+M.value,key:`${t}__q`},[u,n(`div`,{class:`q-tree__children`+(r.disabled===!0?` q-tree__node--disabled`:``),role:`group`},o)]):null:n(ue,{duration:c.duration,onShow:Ze,onHide:Qe},()=>a?l(n(`div`,{class:`q-tree__node-collapsible`+M.value,key:`${t}__q`},[u,n(`div`,{class:`q-tree__children`+(r.disabled===!0?` q-tree__node--disabled`:``),role:`group`},o)]),[[ne,r.expanded]]):null):u])}function tt(e){let{key:t,node:r,depth:i}=e,a=B(t).value;if(a===void 0)return null;let o=a.hasVisibleChildren||a.lazy&&a.lazy!==`loaded`,s=r.header&&g[`header-${r.header}`]||g[`default-header`],c=r.body&&g[`body-${r.body}`]||g[`default-body`],l=s!==void 0||c!==void 0?Ye(r,a,t):null;return c=c!==void 0&&(!a.isParent||a.expanded)?n(`div`,{class:`q-tree__vnode-body row no-wrap items-stretch`},[...pe(e,!1),n(`div`,{class:`q-tree__node-body relative-position`},[n(`div`,{class:M.value},[c(l)])])]):null,n(`div`,{key:t,class:`q-tree__vnode q-tree__vnode--${o?`parent`:`child`}`+(i===0?` q-tree__vnode--root`:``)+(a.disabled===!0||e.parentDisabled?` q-tree__node--disabled`:``)},[n(`div`,{class:`q-tree__vnode-header row no-wrap items-stretch`},[...pe(e,!0),$e(r,a,t,o,l,s,{"aria-level":i+1,"aria-setsize":e.setsize,"aria-posinset":e.posinset})]),c])}function nt(){let e=H.value,t;if(e.length===0)t=c.filter?c.noResultsLabel||y.lang.tree.noResults:c.noNodesLabel||y.lang.tree.noNodes;else{let{from:n,to:r}=Ae.value,i=e.slice(n,r),a=Fe();i.length!==0&&(a===void 0||!i.some(e=>e.key===a))&&(a=i[0].key),J(a),t=je(`div`,i.map(tt),{role:`tree`})}return n(`div`,{class:he.value+` q-tree--virtual q-virtual-scroll q-virtual-scroll--vertical`+(c.virtualScrollTarget===void 0?` scroll`:``),ref:U},t)}function rt(e,t){if(c.virtualScroll){let n=H.value.findIndex(t=>t.key===e);n!==-1&&Ne(n,t)}}function Z(e){k[e]?.focus({preventScroll:!0})}function Q(e){if(e!==void 0){E=e,J(e);let t=A[e];if(t!==void 0)t.focus();else if(c.virtualScroll){let t=H.value.findIndex(t=>t.key===e);t!==-1&&(Ne(t),a(()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{A[e]?.focus()})})}))}}}function it(e){return e.find(be)}function at(e,t){let n=V(e);if(n===void 0)return!1;let r=Pe.value,i=r.indexOf(e);if(t===36)return Q(r[0]),!0;if(t===35)return Q(r.at(-1)),!0;if(t===38)return Q(r[i-1]),!0;if(t===40)return Q(r[i+1]),!0;if(t===39)return!n.isParent&&!n.lazy||(n.expanded?Q(it(N.value.map.get(e).childKeys)):Y(e,!0)),!0;if(t===37){if(n.expanded)Y(e,!1);else{let t=N.value.map.get(e).parentKey;Q(t===null?void 0:t)}return!0}return!1}function ot(e,t,n,r){let i=V(t);i!==void 0&&i.disabled!==!0&&(E=t,J(t),r!==!0&&i.selectable&&Z(t),j.value&&i.selectable?c.noSelectionUnset?t!==c.selected&&_(`update:selected`,t===void 0?null:t):_(`update:selected`,t===c.selected?null:t):$(e,t,n,r),typeof e.handler==`function`&&e.handler(e))}function $(e,t,n,r){n!==void 0&&m(n);let i=V(t);i!==void 0&&i.disabled!==!0&&(E=t,J(t),r!==!0&&i.selectable&&Z(t),Y(t,!i.expanded,e,i))}function st(e,t){let n=V(e);if(n!==void 0){if(n.indeterminate===!0&&(t=n.indeterminateNextState),n.strictTicking)X([e],t);else if(n.leafTicking){let n=[],{map:r}=N.value,i=e=>{let a=V(e);a.isParent?(t!==!0&&a.noTick!==!0&&a.tickable&&n.push(e),a.leafTicking&&r.get(e).childKeys.forEach(i)):a.noTick!==!0&&a.tickable&&(!a.leafFilteredTicking||a.matchesFilter)&&n.push(e)};i(e),X(n,t)}}}return c.defaultExpandAll&&We(),c.virtualScroll&&G(),s(de,{renderNode:et}),Object.assign(v,{getNodeByKey:Ie,getParentNode:Le,getTickedNodes:ze,getIndeterminateNodes:Be,getExpandedNodes:Ve,isExpanded:He,collapseAll:Ue,expandAll:We,setExpanded:Y,isTicked:Ke,isIndeterminate:qe,getTickState:Je,setTicked:X,scrollTo:rt}),()=>{if(c.virtualScroll)return nt();J(Fe());let e=Xe(c.nodes);return n(`div`,{class:he.value,role:`tree`},e.length===0?c.filter?c.noResultsLabel||y.lang.tree.noResults:c.noNodesLabel||y.lang.tree.noNodes:e)}}});function C(e){let t=[];for(let n of e){let e=n.path.split(`/`).filter(e=>e.length>0);if(e.length===0)continue;let r=t,i=``;for(let t=0;t<e.length-1;t++){let n=e[t];i=i?`${i}/${n}`:n;let a=r.find(e=>e.isFolder&&e.label===n);a||(a={label:n,nodeKey:`dir:${i}`,isFolder:!0,children:[]},r.push(a)),r=a.children}r.push({label:e[e.length-1],nodeKey:`file:${n.path}`,file:n})}function n(e){e.sort((e,t)=>{let n=e.isFolder===!0;return n===(t.isFolder===!0)?e.label.localeCompare(t.label):n?-1:1});for(let t of e)t.children&&n(t.children)}return n(t),t}function w(e){let t=0;for(let n of e)n.file&&t++,n.children&&(t+=w(n.children));return t}function T(e,t=1/0){let n=[],r=(e,i)=>{if(!(i>t))for(let t of e)t.isFolder&&(n.push(t.nodeKey),t.children&&r(t.children,i+1))};return r(e,1),n}export{S as i,T as n,w as r,C as t};
1
+ import{S as e,v as t}from"./reactivity.esm-bundler-DEJj9cFv.js";import{C as n,J as r,N as i,O as a,P as o,R as s,T as c,X as l,b as u,j as d,k as f,l as p}from"./runtime-core.esm-bundler-CDnVUfeZ.js";import{J as ee,U as te,dt as ne,et as m,l as re,st as h,tt as g,w as ie,y as ae}from"./QBtn-CZaBclNw.js";import{a as _,i as oe}from"./pinia-BKqmoVru.js";import{At as se,Nt as v,s as ce}from"./index-DcwcFDrZ.js";import{c as le,l as y}from"./QSelect-Bodml89k.js";import{f as ue}from"./permissionModes-DMzFEQhr.js";var b=[`none`,`strict`,`leaf`,`leaf-filtered`],de=Symbol(`QTree`),fe=g({name:`QTreeNode`,props:{node:{type:Object,required:!0}},setup(e){let t=c(de);return()=>t.renderNode(e.node)}});function x(e){let n=new Map,i=new Set(e());return r(e,e=>{let t=new Set(e);i.forEach(e=>{if(!t.has(e)){let t=n.get(e);t!==void 0&&(t.value=!1)}}),t.forEach(e=>{if(!i.has(e)){let t=n.get(e);t!==void 0&&(t.value=!0)}}),i=t},{flush:`sync`}),{has(e){let r=n.get(e);return r===void 0&&(r=t(i.has(e)),n.set(e,r)),r.value},prune(e){n.forEach((t,r)=>{e.has(r)||n.delete(r)})}}}function pe(e,t){if(e.depth===0)return[];let r=e.lines.map(e=>n(`div`,{class:`q-tree__vguide`+(e?` q-tree__vguide--line`:``)}));return r.push(n(`div`,{class:`q-tree__vguide`+(t?` q-tree__vguide--connector`:``)+(e.cont?` q-tree__vguide--line`:``)})),r}function me(e){if(e.icon!==void 0)return n(re,{class:`q-tree__icon q-mr-sm`,name:e.icon,color:e.iconColor});let t=e.img||e.avatar;if(t)return n(`img`,{class:`q-tree__${e.img?`img`:`avatar`} q-mr-sm`,src:t})}var S=g({name:`QTree`,props:{..._,nodes:{type:Array,required:!0},nodeKey:{type:String,required:!0},labelKey:{type:String,default:`label`},childrenKey:{type:String,default:`children`},dense:Boolean,color:String,controlColor:String,textColor:String,selectedColor:String,icon:String,tickStrategy:{type:String,default:`none`,validator:e=>b.includes(e)},ticked:Array,expanded:Array,selected:{},noSelectionUnset:Boolean,defaultExpandAll:Boolean,accordion:Boolean,filter:String,filterMethod:Function,duration:{},noConnectors:Boolean,noTransition:Boolean,virtualScroll:Boolean,virtualScrollTarget:v,virtualScrollItemSize:y.virtualScrollItemSize.type,virtualScrollSliceSize:y.virtualScrollSliceSize,virtualScrollSliceRatioBefore:y.virtualScrollSliceRatioBefore,virtualScrollSliceRatioAfter:y.virtualScrollSliceRatioAfter,virtualScrollStickySizeStart:y.virtualScrollStickySizeStart,virtualScrollStickySizeEnd:y.virtualScrollStickySizeEnd,onVirtualScroll:Function,noNodesLabel:String,noResultsLabel:String},emits:[`update:expanded`,`update:ticked`,`update:selected`,`lazyLoad`,`afterShow`,`afterHide`],setup(c,{slots:g,emit:_}){let{proxy:v}=u(),y=ae(),b=oe(c,y),S=t({}),C=t(c.ticked||[]),w=t(c.expanded||[]),T=p(()=>new Set(w.value)),E=null,D=null,O=new Set,k={},A={},he=p(()=>`q-tree q-tree--${c.dense?`dense`:`standard`}`+(c.noConnectors?` q-tree--no-connectors`:``)+(b()?` q-tree--dark`:``)+(c.color===void 0?``:` text-${c.color}`)),j=t(c.selected!==void 0);r(()=>c.selected!==void 0,e=>{j.value=e},{flush:`sync`});let ge=p(()=>c.icon||y.iconSet.tree.icon),_e=p(()=>c.controlColor||c.color),M=p(()=>c.textColor===void 0?``:` text-${c.textColor}`),ve=p(()=>{let e=c.selectedColor||c.color;return e?` text-${e}`:``}),ye=p(()=>c.filterMethod===void 0?(e,t)=>{let n=t.toLowerCase();return e[c.labelKey]&&e[c.labelKey].toLowerCase().includes(n)}:c.filterMethod),N=p(()=>{let e=new Map,t=[],n=(t,r,i)=>{let a=t.tickStrategy||(i===null?c.tickStrategy:i.tickStrategy),o=t[c.nodeKey],s=t[c.childrenKey],l=Array.isArray(s)&&s.length!==0,u=a===`strict`,d=t.lazy;d===!0&&S.value[o]!==void 0&&Array.isArray(s)&&(d=S.value[o]);let f={key:o,node:t,parentKey:r,childKeys:[],isParent:l,lazy:d,disabled:t.disabled,expandable:!t.disabled&&t.expandable!==!1,selectableBase:t.selectable!==!1,tickableBase:!t.disabled&&t.tickable!==!1,noTickBase:t.noTick===!0||!u&&d&&d!==`loaded`,tickStrategy:a,hasTicking:a!==`none`,strictTicking:u,leafFilteredTicking:a===`leaf-filtered`,leafTicking:a===`leaf`||a===`leaf-filtered`};return e.set(o,f),l&&s.forEach(e=>{f.childKeys.push(n(e,o,f).key)}),f};return c.nodes.forEach(e=>{t.push(n(e,null,null).key)}),{map:e,rootKeys:t}}),P=p(()=>{if(!c.filter)return null;let e=new Set,t=new Set,n=r=>{let i=r[c.nodeKey],a=!!ye.value(r,c.filter);return a&&e.add(i),Array.isArray(r[c.childrenKey])&&r[c.childrenKey].forEach(e=>{n(e)&&(a=!0)}),a&&t.add(i),a};return c.nodes.forEach(n),{own:e,visible:t}});function be(e){let t=P.value;return t===null||t.visible.has(e)}let F=new Map,I=new Map,L=new Map,R=new Map,xe=x(()=>C.value),Se=x(()=>w.value),Ce=x(()=>c.selected!==void 0&&c.selected!==null?[c.selected]:[]);function we(e){let t=F.get(e);return t===void 0&&(t=p(()=>{let t=N.value.map.get(e);return t===void 0||!t.tickableBase?!1:!t.leafTicking||t.parentKey===null||we(t.parentKey).value}),F.set(e,t)),t}function z(e){let t=I.get(e);if(t===void 0){let n;t=p(()=>{let t=N.value.map.get(e);if(t===void 0){n=void 0;return}let r=t.noTickBase,i=we(e).value,a=t.strictTicking||!t.isParent?xe.has(e):!1,o,s;if(t.isParent){let n=t.childKeys.map(e=>z(e).value),c=P.value,l=c===null||c.visible.has(e);if(c!==null&&c.own.has(e)&&r!==!0&&t.disabled!==!0&&i&&t.leafFilteredTicking&&t.childKeys.every((e,t)=>!c.visible.has(e)||n[t].noTick===!0||!n[t].tickable)&&(i=!1),l&&(r!==!0&&!t.strictTicking&&n.every(e=>e.noTick)&&(r=!0),t.leafTicking)){if(a=!1,o=n.some(e=>e.indeterminate===!0),i&&=n.some(e=>e.tickable),!o){let e=n.reduce((e,t)=>t.ticked?e+1:e,0);e===n.length?a=!0:e>0&&(o=!0)}o&&(s=n.every(e=>!e.tickable||!e.ticked))}}return n!==void 0&&n.noTick===r&&n.tickable===i&&n.ticked===a&&n.indeterminate===o&&n.indeterminateNextState===s||(n={noTick:r,tickable:i,ticked:a,indeterminate:o,indeterminateNextState:s}),n}),I.set(e,t)}return t}function B(e){let t=L.get(e);if(t===void 0){let n,r,i;t=p(()=>{let t=N.value.map.get(e);if(t===void 0){n=r=i=void 0;return}let a=z(e).value,o=P.value,s=!t.disabled&&j.value&&t.selectableBase,c=!t.disabled&&(s||t.expandable&&(t.isParent||t.lazy===!0)),l=o===null||o.visible.has(e),u=Ce.has(e)&&s,d=t.isParent?Se.has(e):!1,f=t.isParent&&(o===null||t.childKeys.some(e=>o.visible.has(e)));return n!==void 0&&r===t&&i===a&&n.link===c&&n.matchesFilter===l&&n.selected===u&&n.selectable===s&&n.expanded===d&&n.hasVisibleChildren===f?n:(r=t,i=a,n={key:e,isParent:t.isParent,lazy:t.lazy,disabled:t.disabled,link:c,matchesFilter:l,selected:u,selectable:s,expanded:d,expandable:t.expandable,noTick:a.noTick,tickable:a.tickable,tickStrategy:t.tickStrategy,hasTicking:t.hasTicking,strictTicking:t.strictTicking,leafFilteredTicking:t.leafFilteredTicking,leafTicking:t.leafTicking,ticked:a.ticked,indeterminate:a.indeterminate,indeterminateNextState:a.indeterminateNextState,hasVisibleChildren:f},n)}),L.set(e,t)}return t}function V(e){return B(e).value}function Te(e){let t=R.get(e);return t===void 0&&(t=p(()=>be(e)),R.set(e,t)),t}r(N,({map:e})=>{let t=t=>{t.forEach((n,r)=>{e.has(r)||t.delete(r)})};t(F),t(I),t(L),t(R),xe.prune(e),Se.prune(e),Ce.prune(e),O.forEach(t=>{e.has(t)||O.delete(t)})},{flush:`post`});let H=p(()=>{let e=[],{map:t,rootKeys:n}=N.value,r=P.value,i=T.value,a=(n,o,s,c)=>{let l=r===null?n:n.filter(e=>r.visible.has(e)),u=l.length-1;l.forEach((n,r)=>{let l=t.get(n),d=r<u;e.push({key:n,node:l.node,depth:o,lines:s,cont:d,posinset:r+1,setsize:u+1,parentDisabled:c}),l.isParent&&i.has(n)&&a(l.childKeys,o+1,o===0?s:[...s,d],c||l.disabled===!0)})};return a(n,0,[],!1),e}),Ee=p(()=>c.virtualScroll?H.value.length:0),De=p(()=>c.virtualScrollItemSize===void 0?c.dense?23:35:c.virtualScrollItemSize),U=e(null),W;function Oe(){return U.value}function ke(){return W}let{virtualScrollSliceRange:Ae,localResetVirtualScroll:G,padVirtualScroll:je,onVirtualScrollEvt:Me,scrollTo:Ne}=le({virtualScrollLength:Ee,getVirtualScrollTarget:ke,getVirtualScrollEl:Oe,virtualScrollItemSizeComputed:De});function K(){c.virtualScroll&&U.value!==null&&(W=se(U.value,c.virtualScrollTarget),W.addEventListener(`scroll`,Me,ee.passive))}function q(){W!==void 0&&(W.removeEventListener(`scroll`,Me,ee.passive),W=void 0)}r(Ee,()=>{c.virtualScroll&&G()}),r(()=>c.virtualScroll,e=>{q(),e&&(G(),a(K))}),r(()=>c.virtualScrollTarget,()=>{q(),K()}),o(K),f(K),i(q),d(q);let Pe=p(()=>{let e=[],{map:t,rootKeys:n}=N.value,r=P.value,i=n=>{if(r!==null&&!r.visible.has(n))return;e.push(n);let a=t.get(n);a.isParent&&T.value.has(n)&&a.childKeys.forEach(i)};return n.forEach(i),e});function Fe(){let e=Pe.value;return E!==null&&e.includes(E)?E:c.selected!==void 0&&c.selected!==null&&e.includes(c.selected)&&V(c.selected)?.selected===!0?c.selected:e[0]}function J(e){e!==D&&(D!=null&&A[D]?.setAttribute(`tabindex`,-1),A[e]?.setAttribute(`tabindex`,0),D=e)}r(()=>c.ticked,e=>{C.value=e}),r(()=>c.expanded,e=>{w.value=e});function Ie(e){let t=(n,r)=>{if(n||!r)return n;if(Array.isArray(r))return r.reduce(t,n);if(r[c.nodeKey]===e)return r;if(r[c.childrenKey])return t(null,r[c.childrenKey])};return t(null,c.nodes)}function Le(e){let{map:t}=N.value,n=t.get(e);return n!==void 0&&n.parentKey!==null?t.get(n.parentKey).node:void 0}function Re(e){let{map:t}=N.value;return e.map(e=>t.get(e)?.node)}function ze(){return Re(C.value)}function Be(){let e=[];return N.value.map.forEach((t,n)=>{t.isParent&&t.leafTicking&&z(n).value.indeterminate===!0&&e.push(t.node)}),e}function Ve(){return Re(w.value)}function He(e){return e?V(e)?.expanded===!0:!1}function Ue(){c.expanded===void 0?w.value=[]:_(`update:expanded`,[])}function We(){let e=[],t=n=>{n[c.childrenKey]&&n[c.childrenKey].length!==0&&n.expandable!==!1&&n.disabled!==!0&&(e.push(n[c.nodeKey]),n[c.childrenKey].forEach(t))};c.nodes.forEach(t),c.expanded===void 0?w.value=e:_(`update:expanded`,e)}function Y(e,t,n=Ie(e),r=V(e)){if(r.disabled!==!0){if(r.lazy&&r.lazy!==`loaded`){if(r.lazy===`loading`)return;S.value[e]=`loading`,Array.isArray(n[c.childrenKey])||(n[c.childrenKey]=[]),_(`lazyLoad`,{node:n,key:e,done:t=>{S.value[e]=`loaded`,n[c.childrenKey]=Array.isArray(t)?t:[],a(()=>{V(e)?.isParent===!0&&Ge(e,!0)})},fail:()=>{delete S.value[e],n[c.childrenKey].length===0&&delete n[c.childrenKey]}})}else r.isParent&&r.expandable&&Ge(e,t)}}function Ge(e,t){let n=w.value,r=c.expanded!==void 0;if(r&&(n=[...n]),t){let t=c.accordion?N.value.map.get(e):void 0;if(t!==void 0){let{map:r}=N.value,i=[];t.parentKey===null?N.value.rootKeys.forEach(t=>{t!==e&&i.push(t)}):r.get(t.parentKey).childKeys.forEach(t=>{t!==e&&r.get(t).expandable&&i.push(t)}),i.length!==0&&(n=n.filter(e=>!i.includes(e)))}n=[...n,e].filter((e,t,n)=>n.indexOf(e)===t)}else n=n.filter(t=>t!==e);r?_(`update:expanded`,n):w.value=n}function Ke(e){return e?V(e)?.ticked===!0:!1}function qe(e){return e?V(e)?.indeterminate===!0:!1}function Je(e){let t=e?V(e):void 0;return t===void 0?!1:t.indeterminate===!0?null:t.ticked}function X(e,t){let n=C.value,r=c.ticked!==void 0;r&&(n=[...n]),n=t?[...n,...e].filter((e,t,n)=>n.indexOf(e)===t):n.filter(t=>!e.includes(t)),r?_(`update:ticked`,n):C.value=n}function Ye(e,t,n){let r={tree:v,node:e,key:n,color:c.color,dark:b()};return h(r,`expanded`,()=>t.expanded,e=>{e!==t.expanded&&Y(n,e)}),h(r,`ticked`,()=>t.ticked,e=>{e!==t.ticked&&X([n],e)}),h(r,`indeterminate`,()=>t.indeterminate===!0),r}function Xe(e){return(c.filter?e.filter(e=>Te(e[c.nodeKey]).value):e).map(e=>n(fe,{key:e[c.nodeKey],node:e}))}function Ze(){_(`afterShow`)}function Qe(){_(`afterHide`)}function $e(e,t,r,i,a,o,s){return n(`div`,{class:`q-tree__node-header relative-position row no-wrap items-center q-focusable`+(t.link?` q-tree__node--link q-hoverable`:``)+(t.selected?` q-tree__node--selected`:``)+(t.disabled===!0?` q-tree__node--disabled`:``),ref:e=>{e===null?delete A[r]:A[r]=e},tabindex:r===D?0:-1,"aria-expanded":i?t.expanded?`true`:`false`:null,"aria-selected":t.selectable?t.selected?`true`:`false`:null,"aria-checked":t.hasTicking&&t.noTick!==!0?t.indeterminate===!0?`mixed`:t.ticked?`true`:`false`:null,"aria-disabled":t.disabled===!0?`true`:null,role:`treeitem`,...s,onFocus(){E=r,J(r)},onClick:t=>{ot(e,r,t)},onKeydown(n){n.target===n.currentTarget&&te(n)!==!0&&(n.keyCode===13?ot(e,r,n,!0):n.keyCode===32?t.hasTicking&&t.noTick!==!0&&t.tickable?(m(n),st(r,!t.ticked)):$(e,r,n,!0):at(r,n.keyCode)&&m(n))}},[n(`div`,{class:`q-focus-helper`,tabindex:-1,ref:e=>{e===null?delete k[r]:k[r]=e}}),t.lazy===`loading`?n(ie,{class:`q-tree__spinner`,color:_e.value}):i?n(re,{class:`q-tree__arrow`+(t.expanded?` q-tree__arrow--rotate`:``),name:ge.value,onClick(t){$(e,r,t)}}):null,t.hasTicking&&t.noTick!==!0?n(ce,{class:`q-tree__tickbox`,modelValue:t.indeterminate===!0?null:t.ticked,color:_e.value,dark:b(),dense:!0,keepColor:!0,disable:!t.tickable,tabindex:-1,"aria-hidden":`true`,onMousedown(e){e.preventDefault(),E=r,J(r),Z(r)},"onUpdate:modelValue":e=>{st(r,e)}}):null,n(`div`,{class:`q-tree__node-header-content col row no-wrap items-center`+(t.selected?ve.value:M.value)},[o?o(a):[me(e),n(`div`,e[c.labelKey])]])])}function et(e){let t=e[c.nodeKey],r=B(t).value,i=e.header&&g[`header-${e.header}`]||g[`default-header`];if(r===void 0)return null;r.expanded&&O.add(t);let a=r.expanded||c.noTransition!==!0&&O.has(t),o=r.isParent&&a?Xe(e[c.childrenKey]):[],s=r.hasVisibleChildren||r.lazy&&r.lazy!==`loaded`,u=e.body&&g[`body-${e.body}`]||g[`default-body`],d=i!==void 0||u!==void 0?Ye(e,r,t):null;return u!==void 0&&(u=n(`div`,{class:`q-tree__node-body relative-position`},[n(`div`,{class:M.value},[u(d)])])),n(`div`,{key:t,class:`q-tree__node relative-position q-tree__node--${s?`parent`:`child`}`},[$e(e,r,t,s,d,i),s?c.noTransition?r.expanded?n(`div`,{class:`q-tree__node-collapsible`+M.value,key:`${t}__q`},[u,n(`div`,{class:`q-tree__children`+(r.disabled===!0?` q-tree__node--disabled`:``),role:`group`},o)]):null:n(ue,{duration:c.duration,onShow:Ze,onHide:Qe},()=>a?l(n(`div`,{class:`q-tree__node-collapsible`+M.value,key:`${t}__q`},[u,n(`div`,{class:`q-tree__children`+(r.disabled===!0?` q-tree__node--disabled`:``),role:`group`},o)]),[[ne,r.expanded]]):null):u])}function tt(e){let{key:t,node:r,depth:i}=e,a=B(t).value;if(a===void 0)return null;let o=a.hasVisibleChildren||a.lazy&&a.lazy!==`loaded`,s=r.header&&g[`header-${r.header}`]||g[`default-header`],c=r.body&&g[`body-${r.body}`]||g[`default-body`],l=s!==void 0||c!==void 0?Ye(r,a,t):null;return c=c!==void 0&&(!a.isParent||a.expanded)?n(`div`,{class:`q-tree__vnode-body row no-wrap items-stretch`},[...pe(e,!1),n(`div`,{class:`q-tree__node-body relative-position`},[n(`div`,{class:M.value},[c(l)])])]):null,n(`div`,{key:t,class:`q-tree__vnode q-tree__vnode--${o?`parent`:`child`}`+(i===0?` q-tree__vnode--root`:``)+(a.disabled===!0||e.parentDisabled?` q-tree__node--disabled`:``)},[n(`div`,{class:`q-tree__vnode-header row no-wrap items-stretch`},[...pe(e,!0),$e(r,a,t,o,l,s,{"aria-level":i+1,"aria-setsize":e.setsize,"aria-posinset":e.posinset})]),c])}function nt(){let e=H.value,t;if(e.length===0)t=c.filter?c.noResultsLabel||y.lang.tree.noResults:c.noNodesLabel||y.lang.tree.noNodes;else{let{from:n,to:r}=Ae.value,i=e.slice(n,r),a=Fe();i.length!==0&&(a===void 0||!i.some(e=>e.key===a))&&(a=i[0].key),J(a),t=je(`div`,i.map(tt),{role:`tree`})}return n(`div`,{class:he.value+` q-tree--virtual q-virtual-scroll q-virtual-scroll--vertical`+(c.virtualScrollTarget===void 0?` scroll`:``),ref:U},t)}function rt(e,t){if(c.virtualScroll){let n=H.value.findIndex(t=>t.key===e);n!==-1&&Ne(n,t)}}function Z(e){k[e]?.focus({preventScroll:!0})}function Q(e){if(e!==void 0){E=e,J(e);let t=A[e];if(t!==void 0)t.focus();else if(c.virtualScroll){let t=H.value.findIndex(t=>t.key===e);t!==-1&&(Ne(t),a(()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{A[e]?.focus()})})}))}}}function it(e){return e.find(be)}function at(e,t){let n=V(e);if(n===void 0)return!1;let r=Pe.value,i=r.indexOf(e);if(t===36)return Q(r[0]),!0;if(t===35)return Q(r.at(-1)),!0;if(t===38)return Q(r[i-1]),!0;if(t===40)return Q(r[i+1]),!0;if(t===39)return!n.isParent&&!n.lazy||(n.expanded?Q(it(N.value.map.get(e).childKeys)):Y(e,!0)),!0;if(t===37){if(n.expanded)Y(e,!1);else{let t=N.value.map.get(e).parentKey;Q(t===null?void 0:t)}return!0}return!1}function ot(e,t,n,r){let i=V(t);i!==void 0&&i.disabled!==!0&&(E=t,J(t),r!==!0&&i.selectable&&Z(t),j.value&&i.selectable?c.noSelectionUnset?t!==c.selected&&_(`update:selected`,t===void 0?null:t):_(`update:selected`,t===c.selected?null:t):$(e,t,n,r),typeof e.handler==`function`&&e.handler(e))}function $(e,t,n,r){n!==void 0&&m(n);let i=V(t);i!==void 0&&i.disabled!==!0&&(E=t,J(t),r!==!0&&i.selectable&&Z(t),Y(t,!i.expanded,e,i))}function st(e,t){let n=V(e);if(n!==void 0){if(n.indeterminate===!0&&(t=n.indeterminateNextState),n.strictTicking)X([e],t);else if(n.leafTicking){let n=[],{map:r}=N.value,i=e=>{let a=V(e);a.isParent?(t!==!0&&a.noTick!==!0&&a.tickable&&n.push(e),a.leafTicking&&r.get(e).childKeys.forEach(i)):a.noTick!==!0&&a.tickable&&(!a.leafFilteredTicking||a.matchesFilter)&&n.push(e)};i(e),X(n,t)}}}return c.defaultExpandAll&&We(),c.virtualScroll&&G(),s(de,{renderNode:et}),Object.assign(v,{getNodeByKey:Ie,getParentNode:Le,getTickedNodes:ze,getIndeterminateNodes:Be,getExpandedNodes:Ve,isExpanded:He,collapseAll:Ue,expandAll:We,setExpanded:Y,isTicked:Ke,isIndeterminate:qe,getTickState:Je,setTicked:X,scrollTo:rt}),()=>{if(c.virtualScroll)return nt();J(Fe());let e=Xe(c.nodes);return n(`div`,{class:he.value,role:`tree`},e.length===0?c.filter?c.noResultsLabel||y.lang.tree.noResults:c.noNodesLabel||y.lang.tree.noNodes:e)}}});function C(e){let t=[];for(let n of e){let e=n.path.split(`/`).filter(e=>e.length>0);if(e.length===0)continue;let r=t,i=``;for(let t=0;t<e.length-1;t++){let n=e[t];i=i?`${i}/${n}`:n;let a=r.find(e=>e.isFolder&&e.label===n);a||(a={label:n,nodeKey:`dir:${i}`,isFolder:!0,children:[]},r.push(a)),r=a.children}r.push({label:e[e.length-1],nodeKey:`file:${n.path}`,file:n})}function n(e){e.sort((e,t)=>{let n=e.isFolder===!0;return n===(t.isFolder===!0)?e.label.localeCompare(t.label):n?-1:1});for(let t of e)t.children&&n(t.children)}return n(t),t}function w(e){let t=0;for(let n of e)n.file&&t++,n.children&&(t+=w(n.children));return t}function T(e,t=1/0){let n=[],r=(e,i)=>{if(!(i>t))for(let t of e)t.isFolder&&(n.push(t.nodeKey),t.children&&r(t.children,i+1))};return r(e,1),n}export{S as i,T as n,w as r,C as t};
@@ -1 +1 @@
1
- import{v as e}from"./reactivity.esm-bundler-DEJj9cFv.js";import{J as t,O as n,P as r,b as i,j as a}from"./runtime-core.esm-bundler-CDnVUfeZ.js";import{J as o,Y as s,tt as c,y as l}from"./QBtn-CZaBclNw.js";import{n as u}from"./pinia-BKqmoVru.js";import{At as d,Mt as f,Nt as p,kt as m}from"./index-CIP08MpU.js";var h=c({name:`QResizeObserver`,props:{debounce:{type:[String,Number],default:100}},emits:[`resize`],setup(e,{emit:t}){let o=null,c,l={width:-1,height:-1};function u(t){t===!0||e.debounce===0||e.debounce===`0`?d():o===null&&(o=setTimeout(d,e.debounce))}function d(){if(o!==null&&(clearTimeout(o),o=null),c){let{offsetWidth:e,offsetHeight:n}=c;(e!==l.width||n!==l.height)&&(l={width:e,height:n},t(`resize`,l))}}let{proxy:f}=i();f.trigger=u;let p,m=!1,h=e=>{m||(c=f.$el.parentNode,c?(p=new ResizeObserver(u),p.observe(c),d()):e||n(()=>{h(!0)}))};return r(()=>{h()}),a(()=>{m=!0,o!==null&&clearTimeout(o),p&&=(p.disconnect(),null)}),s}}),{passive:g}=o,_=[`both`,`horizontal`,`vertical`],v=c({name:`QScrollObserver`,props:{axis:{type:String,validator:e=>_.includes(e),default:`vertical`},debounce:[String,Number],scrollTarget:p},emits:[`scroll`],setup(e,{emit:n}){let o={position:{top:0,left:0},direction:`down`,directionChanged:!1,delta:{top:0,left:0},inflectionPoint:{top:0,left:0}},c=null,u,p;t(()=>e.scrollTarget,()=>{v(),_()});function h(){c?.();let t=Math.max(0,f(u)),r=m(u),i={top:t-o.position.top,left:r-o.position.left};if(e.axis===`vertical`&&i.top===0||e.axis===`horizontal`&&i.left===0)return;let a=Math.abs(i.top)>=Math.abs(i.left)?i.top<0?`up`:`down`:i.left<0?`left`:`right`;o.position={top:t,left:r},o.directionChanged=o.direction!==a,o.delta=i,o.directionChanged&&(o.direction=a,o.inflectionPoint=o.position),n(`scroll`,{...o})}function _(){u=d(p,e.scrollTarget),u.addEventListener(`scroll`,y,g),y(!0)}function v(){u!==void 0&&(u.removeEventListener(`scroll`,y,g),u=void 0)}function y(t){if(t===!0||e.debounce===0||e.debounce===`0`)h();else if(c===null){let[t,n]=e.debounce?[setTimeout(h,e.debounce),clearTimeout]:[requestAnimationFrame(h),cancelAnimationFrame];c=()=>{n(t),c=null}}}let{proxy:b}=i(),x=l();return t(()=>x.lang.rtl,h),r(()=>{p=b.$el.parentNode,_()}),a(()=>{c?.(),v()}),Object.assign(b,{trigger:y,getPosition:()=>o}),s}});function y(){let e=null;return{begin(){return e?.abort(),e=new AbortController,e.signal},isCurrent(t){return e!==null&&e.signal===t&&!t.aborted},abort(){e?.abort(),e=null}}}function b(e){return(e instanceof DOMException||typeof e==`object`&&!!e)&&e.name===`AbortError`}var x=u(`documents`,()=>{let t=e({}),n=e(!1),r=e(!1),i=e(null),a=e(0),o=y();function s(e){return t.value[e]??[]}async function c(e){n.value=!0;try{let n=await fetch(`/api/workspaces/${e}/documents`);if(!n.ok)throw Error(`HTTP ${n.status}`);let r=await n.json();t.value[e]=r.documents}catch(n){console.error(`[documents-store] fetchDocuments failed:`,n),t.value[e]=[]}finally{n.value=!1}}async function l(e,t){let n=o.begin();r.value=!0;try{let r=await fetch(`/api/workspaces/${e}/document?path=${encodeURIComponent(t.path)}`,{signal:n});if(!r.ok)throw Error(`HTTP ${r.status}`);let a=await r.json();if(!o.isCurrent(n))return;i.value={path:a.path,name:t.name,content:a.content}}catch(e){if(b(e))return;throw console.error(`[documents-store] openDocument failed:`,e),e}finally{o.isCurrent(n)&&(r.value=!1)}}async function u(e,n){let r=()=>(t.value[e]??[]).find(e=>e.path===n)??null,i=r();return i||=(await c(e),r()),i?(await l(e,i),a.value++,!0):!1}function d(){i.value=null}function f(e){delete t.value[e],i.value=null,o.abort()}return{documentsByWorkspace:t,loadingList:n,loadingContent:r,selected:i,requestOpen:a,documentsFor:s,fetchDocuments:c,openDocument:l,openDocumentByPath:u,closeDocument:d,clearForWorkspace:f}});export{h as a,v as i,y as n,b as r,x as t};
1
+ import{v as e}from"./reactivity.esm-bundler-DEJj9cFv.js";import{J as t,O as n,P as r,b as i,j as a}from"./runtime-core.esm-bundler-CDnVUfeZ.js";import{J as o,Y as s,tt as c,y as l}from"./QBtn-CZaBclNw.js";import{n as u}from"./pinia-BKqmoVru.js";import{At as d,Mt as f,Nt as p,kt as m}from"./index-DcwcFDrZ.js";var h=c({name:`QResizeObserver`,props:{debounce:{type:[String,Number],default:100}},emits:[`resize`],setup(e,{emit:t}){let o=null,c,l={width:-1,height:-1};function u(t){t===!0||e.debounce===0||e.debounce===`0`?d():o===null&&(o=setTimeout(d,e.debounce))}function d(){if(o!==null&&(clearTimeout(o),o=null),c){let{offsetWidth:e,offsetHeight:n}=c;(e!==l.width||n!==l.height)&&(l={width:e,height:n},t(`resize`,l))}}let{proxy:f}=i();f.trigger=u;let p,m=!1,h=e=>{m||(c=f.$el.parentNode,c?(p=new ResizeObserver(u),p.observe(c),d()):e||n(()=>{h(!0)}))};return r(()=>{h()}),a(()=>{m=!0,o!==null&&clearTimeout(o),p&&=(p.disconnect(),null)}),s}}),{passive:g}=o,_=[`both`,`horizontal`,`vertical`],v=c({name:`QScrollObserver`,props:{axis:{type:String,validator:e=>_.includes(e),default:`vertical`},debounce:[String,Number],scrollTarget:p},emits:[`scroll`],setup(e,{emit:n}){let o={position:{top:0,left:0},direction:`down`,directionChanged:!1,delta:{top:0,left:0},inflectionPoint:{top:0,left:0}},c=null,u,p;t(()=>e.scrollTarget,()=>{v(),_()});function h(){c?.();let t=Math.max(0,f(u)),r=m(u),i={top:t-o.position.top,left:r-o.position.left};if(e.axis===`vertical`&&i.top===0||e.axis===`horizontal`&&i.left===0)return;let a=Math.abs(i.top)>=Math.abs(i.left)?i.top<0?`up`:`down`:i.left<0?`left`:`right`;o.position={top:t,left:r},o.directionChanged=o.direction!==a,o.delta=i,o.directionChanged&&(o.direction=a,o.inflectionPoint=o.position),n(`scroll`,{...o})}function _(){u=d(p,e.scrollTarget),u.addEventListener(`scroll`,y,g),y(!0)}function v(){u!==void 0&&(u.removeEventListener(`scroll`,y,g),u=void 0)}function y(t){if(t===!0||e.debounce===0||e.debounce===`0`)h();else if(c===null){let[t,n]=e.debounce?[setTimeout(h,e.debounce),clearTimeout]:[requestAnimationFrame(h),cancelAnimationFrame];c=()=>{n(t),c=null}}}let{proxy:b}=i(),x=l();return t(()=>x.lang.rtl,h),r(()=>{p=b.$el.parentNode,_()}),a(()=>{c?.(),v()}),Object.assign(b,{trigger:y,getPosition:()=>o}),s}});function y(){let e=null;return{begin(){return e?.abort(),e=new AbortController,e.signal},isCurrent(t){return e!==null&&e.signal===t&&!t.aborted},abort(){e?.abort(),e=null}}}function b(e){return(e instanceof DOMException||typeof e==`object`&&!!e)&&e.name===`AbortError`}var x=u(`documents`,()=>{let t=e({}),n=e(!1),r=e(!1),i=e(null),a=e(0),o=y();function s(e){return t.value[e]??[]}async function c(e){n.value=!0;try{let n=await fetch(`/api/workspaces/${e}/documents`);if(!n.ok)throw Error(`HTTP ${n.status}`);let r=await n.json();t.value[e]=r.documents}catch(n){console.error(`[documents-store] fetchDocuments failed:`,n),t.value[e]=[]}finally{n.value=!1}}async function l(e,t){let n=o.begin();r.value=!0;try{let r=await fetch(`/api/workspaces/${e}/document?path=${encodeURIComponent(t.path)}`,{signal:n});if(!r.ok)throw Error(`HTTP ${r.status}`);let a=await r.json();if(!o.isCurrent(n))return;i.value={path:a.path,name:t.name,content:a.content}}catch(e){if(b(e))return;throw console.error(`[documents-store] openDocument failed:`,e),e}finally{o.isCurrent(n)&&(r.value=!1)}}async function u(e,n){let r=()=>(t.value[e]??[]).find(e=>e.path===n)??null,i=r();return i||=(await c(e),r()),i?(await l(e,i),a.value++,!0):!1}function d(){i.value=null}function f(e){delete t.value[e],i.value=null,o.abort()}return{documentsByWorkspace:t,loadingList:n,loadingContent:r,selected:i,requestOpen:a,documentsFor:s,fetchDocuments:c,openDocument:l,openDocumentByPath:u,closeDocument:d,clearForWorkspace:f}});export{h as a,v as i,y as n,b as r,x as t};
@@ -1,4 +1,4 @@
1
- import{$a as e,$f as t,$i as n,$l as r,$m as i,$n as a,$o as o,$p as s,$t as c,Am as l,An as u,Ap as d,Ar as f,At as ee,B as te,Ba as p,Bc as m,Bd as h,Bi as g,Bl as _,Bp as ne,Bs as v,Bu as y,Cf as re,Ch as ie,Ci as ae,Cn as oe,Cp as se,Cr as ce,Cs as le,Cu as ue,D as de,Dc as fe,Dp as pe,Ec as me,Ef as he,Eh as ge,Ei as _e,El as ve,Em as ye,En as be,Ep as xe,Es as Se,Eu as Ce,Fc as b,Fd as we,Ff as Te,Fh as Ee,Fl as De,Fm as x,Fs as Oe,Fu as S,G as ke,Gd as Ae,Gf as je,Gh as Me,Gm as Ne,Gn as Pe,Gr as Fe,Gu as Ie,H as Le,Hd as Re,Hl as ze,Hm as C,Hn as Be,Hs as Ve,Hu as He,I as Ue,Ia as We,Ic as w,If as Ge,Ih as Ke,Il as qe,Im as T,Is as Je,Iu as Ye,J as Xe,Ja as Ze,Jd as Qe,Jf as $e,Jh as et,Jl as tt,Jm as nt,Jn as rt,Jr as it,K as at,Kd as ot,Kf as st,Kh as ct,Kl as lt,Kn as ut,Kp as dt,Kr as ft,Kt as pt,Ku as mt,La as ht,Lc as gt,Ld as _t,Lf as vt,Lh as yt,Li as bt,Lm as xt,Ln as St,Ls as Ct,Lt as wt,Lu as Tt,Mc as Et,Mi as Dt,Mn as Ot,Mo as kt,Mp as At,Mr as jt,Ms as Mt,Mu as E,N as Nt,Na as Pt,Nc as D,Nh as Ft,Nm as It,Nn as Lt,Np as Rt,Nr as zt,Ns as Bt,Oc as Vt,Oi as Ht,Ol as Ut,Op as Wt,Os as Gt,Ot as Kt,Pa as qt,Pc as Jt,Pd as Yt,Pm as Xt,Pn as Zt,Pp as Qt,Ps as $t,Pt as en,Qa as tn,Qc as nn,Qf as rn,Qh as an,Qi as on,Ql as sn,Qm as cn,Qr as ln,Qt as un,Qu as dn,Ra as fn,Rc as pn,Rd as O,Rf as mn,Rh as hn,Ri as gn,Rl as k,Rm as _n,Rn as vn,Rt as yn,Ru as bn,Sf as xn,Si as Sn,Sl as Cn,Sm as wn,Sn as Tn,So as En,Sp as Dn,Sr as On,Ss as kn,Su as An,Tc as jn,Th as Mn,Ti as Nn,Tl as Pn,Tn as Fn,Tp as In,Tt as Ln,Uc as Rn,Uf as zn,Ul as Bn,Um as A,Un as Vn,Va as Hn,Vf as Un,Vl as Wn,Vm as Gn,Vn as Kn,Vs as qn,Vu as Jn,W as Yn,Wa as Xn,Wc as Zn,Wd as Qn,Wf as $n,Wl as er,Wm as tr,Wt as nr,Wu as rr,Xa as ir,Xf as ar,Xi as or,Xm as j,Xo as sr,Xp as cr,Xr as lr,Xu as ur,Y as dr,Ya as fr,Yf as pr,Yh as mr,Yi as hr,Yl as gr,Ym as _r,Yr as vr,Za as yr,Zd as br,Zf as xr,Zh as Sr,Zl as Cr,Zm as wr,Zo as Tr,Zr as Er,_c as Dr,_d as M,_h as Or,_m as kr,_n as Ar,_o as jr,_p as Mr,_r as Nr,_t as Pr,_u as Fr,ac as Ir,af as Lr,al as Rr,am as zr,an as Br,ap as Vr,ar as Hr,bc as Ur,bd as Wr,bp as Gr,bu as Kr,cf as qr,ch as Jr,ci as Yr,cl as Xr,cm as Zr,cn as Qr,cp as $r,ct as ei,cu as ti,dd as ni,df as ri,dh as ii,di as ai,dl as oi,dn as si,dp as ci,dr as li,ds as ui,dt as di,ea as fi,ed as pi,eg as mi,eh as hi,ei as gi,em as N,en as _i,eo as vi,ep as yi,er as bi,eu as P,f as xi,fd as F,ff as Si,fh as I,fi as Ci,fm as wi,fn as Ti,fp as Ei,fr as Di,ft as Oi,fu as ki,g as Ai,gc as ji,gd as Mi,gh as Ni,gm as Pi,gn as Fi,gp as Ii,gs as Li,gt as Ri,hh as zi,hm as Bi,ho as Vi,hp as Hi,hr as Ui,hs as Wi,ht as Gi,hu as L,ia as Ki,if as qi,il as Ji,im as Yi,ip as Xi,ir as Zi,is as Qi,it as $i,iu as ea,jc as ta,ji as na,jl as ra,jm as ia,jp as aa,jr as oa,jt as sa,ju as R,kc as ca,ki as la,kl as ua,kp as da,kr as fa,kt as pa,ld as ma,lf as ha,lh as ga,lm as z,ln as _a,lp as va,lr as ya,lt as ba,lu as B,m as xa,md as Sa,mh as Ca,mm as wa,mn as Ta,mp as Ea,mr as Da,ms as Oa,mt as ka,mu as Aa,na as ja,nf as Ma,nn as Na,np as Pa,nr as Fa,nt as Ia,nu as La,of as Ra,oi as za,om as Ba,op as Va,or as Ha,ot as Ua,ou as V,pc as Wa,pf as Ga,pn as Ka,po as qa,pp as Ja,pr as Ya,pt as Xa,pu as Za,q as Qa,qc as $a,qd as eo,qf as to,ql as no,qm as ro,qt as io,qu as ao,rf as oo,rh as so,ri as co,rl as lo,rp as uo,rr as fo,ru as po,sd as mo,sf as ho,sl as go,sm as _o,sp as vo,sr as H,ss as yo,su as bo,t as xo,ta as So,td as Co,th as wo,ti as To,tm as Eo,tn as Do,to as Oo,tp as ko,tt as Ao,tu as jo,u as Mo,uc as No,uf as Po,uh as Fo,ul as Io,um as Lo,un as Ro,up as zo,ur as Bo,us as Vo,ut as Ho,uu as Uo,v as Wo,vc as Go,vl as Ko,vm as qo,vn as Jo,vp as Yo,vr as Xo,vs as Zo,vu as U,wc as Qo,wf as $o,wh as es,wi as ts,wl as ns,wm as rs,wn as is,wp as as,wr as os,ws as ss,wt as cs,xf as ls,xm as us,xn as ds,xp as fs,xs as ps,xu as ms,yd as hs,yi as gs,ym as _s,yn as vs,yp as ys,yt as bs,yu as xs,za as Ss,zc as Cs,zd as ws,zf as Ts,zl as W,zm as Es,zn as Ds,zp as Os,zs as G,zt as ks,zu as As}from"./format-CHjfjuhr.js";import{n as js}from"./SettingsPage-BPgTHmKj.js";function Ms(e,t,n){return new Ns(e,t,n)}var Ns=class extends Ct{constructor(e,t,n){super(n.worker,n.keepIdleModels||!1,e,t),this._foreignModuleHost=n.host||null,this._foreignProxy=this._getProxy().then(e=>new Proxy({},{get(t,n,r){if(n!==`then`){if(typeof n!=`string`)throw Error(`Not supported`);return(...t)=>e.$fmr(n,t)}}}))}fhr(e,t){if(!this._foreignModuleHost||typeof this._foreignModuleHost[e]!=`function`)return Promise.reject(Error(`Missing method `+e+` or missing main thread foreign host.`));try{return Promise.resolve(this._foreignModuleHost[e].apply(this._foreignModuleHost,t))}catch(e){return Promise.reject(e)}}getProxy(){return this._foreignProxy}withSyncedResources(e){return this.workerWithSyncedResources(e).then(e=>this.getProxy())}};function Ps(e){return Array.isArray(e)}function Fs(e){return!Ps(e)}function Is(e){return typeof e==`string`}function Ls(e){return!Is(e)}function Rs(e){return!e}function zs(e,t){return e.ignoreCase&&t?t.toLowerCase():t}function Bs(e){return e.replace(/[&<>'"_]/g,`-`)}function Vs(e,t){console.log(`${e.languageId}: ${t}`)}function K(e,t){return Error(`${e.languageId}: ${t}`)}function Hs(e,t,n,r,i){let a=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g,o=null;return t.replace(a,function(t,a,s,c,l,u,d,f,ee){return Rs(s)?Rs(c)?!Rs(l)&&l<r.length?zs(e,r[l]):!Rs(d)&&e&&typeof e[d]==`string`?e[d]:(o===null&&(o=i.split(`.`),o.unshift(i)),!Rs(u)&&u<o.length?zs(e,o[u]):``):zs(e,n):`$`})}function Us(e,t,n){let r=/\$[sS](\d\d?)/g,i=null;return t.replace(r,function(t,r){return i===null&&(i=n.split(`.`),i.unshift(n)),!Rs(r)&&r<i.length?$o(zs(e,i[r])):``})}function Ws(e,t){let n=t;for(;n&&n.length>0;){let t=e.tokenizer[n];if(t)return t;let r=n.lastIndexOf(`.`);n=r<0?null:n.substr(0,r)}return null}function Gs(e,t){let n=t;for(;n&&n.length>0;){if(e.stateNames[n])return!0;let t=n.lastIndexOf(`.`);n=t<0?null:n.substr(0,t)}return!1}var Ks,qs,Js=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Ys=function(e,t){return function(n,r){t(n,r,e)}},Xs,Zs=5,Qs=class{static create(e,t){return this._INSTANCE.create(e,t)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,t){if(e!==null&&e.depth>=this._maxCacheDepth)return new $s(e,t);let n=$s.getStackElementId(e);n.length>0&&(n+=`|`),n+=t;let r=this._entries[n];return r||(r=new $s(e,t),this._entries[n]=r,r)}};Ks=Qs,Ks._INSTANCE=new Ks(Zs);var $s=class e{constructor(e,t){this.parent=e,this.state=t,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(e){let t=``;for(;e!==null;)t.length>0&&(t+=`|`),t+=e.state,e=e.parent;return t}static _equals(e,t){for(;e!==null&&t!==null;){if(e===t)return!0;if(e.state!==t.state)return!1;e=e.parent,t=t.parent}return e===null&&t===null}equals(t){return e._equals(this,t)}push(e){return Qs.create(this,e)}pop(){return this.parent}popall(){let e=this;for(;e.parent;)e=e.parent;return e}switchTo(e){return Qs.create(this.parent,e)}},ec=class e{constructor(e,t){this.languageId=e,this.state=t}equals(e){return this.languageId===e.languageId&&this.state.equals(e.state)}clone(){return this.state.clone()===this.state?this:new e(this.languageId,this.state)}},tc=class{static create(e,t){return this._INSTANCE.create(e,t)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,t){if(t!==null||e!==null&&e.depth>=this._maxCacheDepth)return new nc(e,t);let n=$s.getStackElementId(e),r=this._entries[n];return r||(r=new nc(e,null),this._entries[n]=r,r)}};qs=tc,qs._INSTANCE=new qs(Zs);var nc=class e{constructor(e,t){this.stack=e,this.embeddedLanguageData=t}clone(){return(this.embeddedLanguageData?this.embeddedLanguageData.clone():null)===this.embeddedLanguageData?this:tc.create(this.stack,this.embeddedLanguageData)}equals(t){return!(t instanceof e)||!this.stack.equals(t.stack)?!1:this.embeddedLanguageData===null&&t.embeddedLanguageData===null?!0:this.embeddedLanguageData===null||t.embeddedLanguageData===null?!1:this.embeddedLanguageData.equals(t.embeddedLanguageData)}},rc=class{constructor(){this._tokens=[],this._languageId=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterLanguage(e){this._languageId=e}emit(e,t){(this._lastTokenType!==t||this._lastTokenLanguage!==this._languageId)&&(this._lastTokenType=t,this._lastTokenLanguage=this._languageId,this._tokens.push(new s(e,t,this._languageId)))}nestedLanguageTokenize(e,t,n,r){let i=n.languageId,a=n.state,o=N.get(i);if(!o)return this.enterLanguage(i),this.emit(r,``),a;let c=o.tokenize(e,t,a);if(r!==0)for(let e of c.tokens)this._tokens.push(new s(e.offset+r,e.type,e.language));else this._tokens=this._tokens.concat(c.tokens);return this._lastTokenType=null,this._lastTokenLanguage=null,this._languageId=null,c.endState}finalize(e){return new Eo(this._tokens,e)}},ic=class e{constructor(e,t){this._languageService=e,this._theme=t,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterLanguage(e){this._currentLanguageId=this._languageService.languageIdCodec.encodeLanguageId(e)}emit(e,t){let n=this._theme.match(this._currentLanguageId,t)|1024;this._lastTokenMetadata!==n&&(this._lastTokenMetadata=n,this._tokens.push(e),this._tokens.push(n))}static _merge(e,t,n){let r=e===null?0:e.length,i=t.length,a=n===null?0:n.length;if(r===0&&i===0&&a===0)return new Uint32Array;if(r===0&&i===0)return n;if(i===0&&a===0)return e;let o=new Uint32Array(r+i+a);e!==null&&o.set(e);for(let e=0;e<i;e++)o[r+e]=t[e];return n!==null&&o.set(n,r+i),o}nestedLanguageTokenize(t,n,r,i){let a=r.languageId,o=r.state,s=N.get(a);if(!s)return this.enterLanguage(a),this.emit(i,``),o;let c=s.tokenizeEncoded(t,n,o);if(i!==0)for(let e=0,t=c.tokens.length;e<t;e+=2)c.tokens[e]+=i;return this._prependTokens=e._merge(this._prependTokens,this._tokens,c.tokens),this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0,c.endState}finalize(t){return new Os(e._merge(this._prependTokens,this._tokens,null),[],t)}},ac=Xs=class extends C{constructor(e,t,n,r,i){super(),this._configurationService=i,this._languageService=e,this._standaloneThemeService=t,this._languageId=n,this._lexer=r,this._embeddedLanguages=Object.create(null),this.embeddedLoaded=Promise.resolve(void 0);let a=!1;this._register(N.onDidChange(e=>{if(a)return;let t=!1;for(let n=0,r=e.changedLanguages.length;n<r;n++){let r=e.changedLanguages[n];if(this._embeddedLanguages[r]){t=!0;break}}t&&(a=!0,N.handleChange([this._languageId]),a=!1)})),this._maxTokenizationLineLength=this._configurationService.getValue(`editor.maxTokenizationLineLength`,{overrideIdentifier:this._languageId}),this._register(this._configurationService.onDidChangeConfiguration(e=>{e.affectsConfiguration(`editor.maxTokenizationLineLength`)&&(this._maxTokenizationLineLength=this._configurationService.getValue(`editor.maxTokenizationLineLength`,{overrideIdentifier:this._languageId}))}))}getLoadStatus(){let e=[];for(let t in this._embeddedLanguages){let n=N.get(t);if(n){if(n instanceof Xs){let t=n.getLoadStatus();t.loaded===!1&&e.push(t.promise)}continue}N.isResolved(t)||e.push(N.getOrCreate(t))}return e.length===0?{loaded:!0}:{loaded:!1,promise:Promise.all(e).then(e=>void 0)}}getInitialState(){let e=Qs.create(null,this._lexer.start);return tc.create(e,null)}tokenize(e,t,n){if(e.length>=this._maxTokenizationLineLength)return $t(this._languageId,n);let r=new rc,i=this._tokenize(e,t,n,r);return r.finalize(i)}tokenizeEncoded(e,t,n){if(e.length>=this._maxTokenizationLineLength)return Oe(this._languageService.languageIdCodec.encodeLanguageId(this._languageId),n);let r=new ic(this._languageService,this._standaloneThemeService.getColorTheme().tokenTheme),i=this._tokenize(e,t,n,r);return r.finalize(i)}_tokenize(e,t,n,r){return n.embeddedLanguageData?this._nestedTokenize(e,t,n,0,r):this._myTokenize(e,t,n,0,r)}_findLeavingNestedLanguageOffset(e,t){let n=this._lexer.tokenizer[t.stack.state];if(!n&&(n=Ws(this._lexer,t.stack.state),!n))throw K(this._lexer,`tokenizer state is not defined: `+t.stack.state);let r=-1,i=!1;for(let a of n){if(!Ls(a.action)||!(a.action.nextEmbedded===`@pop`||a.action.hasEmbeddedEndInCases))continue;i=!0;let n=a.resolveRegex(t.stack.state),o=n.source;if(o.substr(0,4)===`^(?:`&&o.substr(o.length-1,1)===`)`){let e=(n.ignoreCase?`i`:``)+(n.unicode?`u`:``);n=new RegExp(o.substr(4,o.length-5),e)}let s=e.search(n);s===-1||s!==0&&a.matchOnlyAtLineStart||(r===-1||s<r)&&(r=s)}if(!i)throw K(this._lexer,`no rule containing nextEmbedded: "@pop" in tokenizer embedded state: `+t.stack.state);return r}_nestedTokenize(e,t,n,r,i){let a=this._findLeavingNestedLanguageOffset(e,n);if(a===-1){let a=i.nestedLanguageTokenize(e,t,n.embeddedLanguageData,r);return tc.create(n.stack,new ec(n.embeddedLanguageData.languageId,a))}let o=e.substring(0,a);o.length>0&&i.nestedLanguageTokenize(o,!1,n.embeddedLanguageData,r);let s=e.substring(a);return this._myTokenize(s,t,n,r+a,i)}_safeRuleName(e){return e?e.name:`(unknown)`}_myTokenize(e,t,n,r,i){i.enterLanguage(this._languageId);let a=e.length,o=t&&this._lexer.includeLF?e+`
1
+ import{$a as e,$f as t,$i as n,$l as r,$m as i,$n as a,$o as o,$p as s,$t as c,Am as l,An as u,Ap as d,Ar as f,At as ee,B as te,Ba as p,Bc as m,Bd as h,Bi as g,Bl as _,Bp as ne,Bs as v,Bu as y,Cf as re,Ch as ie,Ci as ae,Cn as oe,Cp as se,Cr as ce,Cs as le,Cu as ue,D as de,Dc as fe,Dp as pe,Ec as me,Ef as he,Eh as ge,Ei as _e,El as ve,Em as ye,En as be,Ep as xe,Es as Se,Eu as Ce,Fc as b,Fd as we,Ff as Te,Fh as Ee,Fl as De,Fm as x,Fs as Oe,Fu as S,G as ke,Gd as Ae,Gf as je,Gh as Me,Gm as Ne,Gn as Pe,Gr as Fe,Gu as Ie,H as Le,Hd as Re,Hl as ze,Hm as C,Hn as Be,Hs as Ve,Hu as He,I as Ue,Ia as We,Ic as w,If as Ge,Ih as Ke,Il as qe,Im as T,Is as Je,Iu as Ye,J as Xe,Ja as Ze,Jd as Qe,Jf as $e,Jh as et,Jl as tt,Jm as nt,Jn as rt,Jr as it,K as at,Kd as ot,Kf as st,Kh as ct,Kl as lt,Kn as ut,Kp as dt,Kr as ft,Kt as pt,Ku as mt,La as ht,Lc as gt,Ld as _t,Lf as vt,Lh as yt,Li as bt,Lm as xt,Ln as St,Ls as Ct,Lt as wt,Lu as Tt,Mc as Et,Mi as Dt,Mn as Ot,Mo as kt,Mp as At,Mr as jt,Ms as Mt,Mu as E,N as Nt,Na as Pt,Nc as D,Nh as Ft,Nm as It,Nn as Lt,Np as Rt,Nr as zt,Ns as Bt,Oc as Vt,Oi as Ht,Ol as Ut,Op as Wt,Os as Gt,Ot as Kt,Pa as qt,Pc as Jt,Pd as Yt,Pm as Xt,Pn as Zt,Pp as Qt,Ps as $t,Pt as en,Qa as tn,Qc as nn,Qf as rn,Qh as an,Qi as on,Ql as sn,Qm as cn,Qr as ln,Qt as un,Qu as dn,Ra as fn,Rc as pn,Rd as O,Rf as mn,Rh as hn,Ri as gn,Rl as k,Rm as _n,Rn as vn,Rt as yn,Ru as bn,Sf as xn,Si as Sn,Sl as Cn,Sm as wn,Sn as Tn,So as En,Sp as Dn,Sr as On,Ss as kn,Su as An,Tc as jn,Th as Mn,Ti as Nn,Tl as Pn,Tn as Fn,Tp as In,Tt as Ln,Uc as Rn,Uf as zn,Ul as Bn,Um as A,Un as Vn,Va as Hn,Vf as Un,Vl as Wn,Vm as Gn,Vn as Kn,Vs as qn,Vu as Jn,W as Yn,Wa as Xn,Wc as Zn,Wd as Qn,Wf as $n,Wl as er,Wm as tr,Wt as nr,Wu as rr,Xa as ir,Xf as ar,Xi as or,Xm as j,Xo as sr,Xp as cr,Xr as lr,Xu as ur,Y as dr,Ya as fr,Yf as pr,Yh as mr,Yi as hr,Yl as gr,Ym as _r,Yr as vr,Za as yr,Zd as br,Zf as xr,Zh as Sr,Zl as Cr,Zm as wr,Zo as Tr,Zr as Er,_c as Dr,_d as M,_h as Or,_m as kr,_n as Ar,_o as jr,_p as Mr,_r as Nr,_t as Pr,_u as Fr,ac as Ir,af as Lr,al as Rr,am as zr,an as Br,ap as Vr,ar as Hr,bc as Ur,bd as Wr,bp as Gr,bu as Kr,cf as qr,ch as Jr,ci as Yr,cl as Xr,cm as Zr,cn as Qr,cp as $r,ct as ei,cu as ti,dd as ni,df as ri,dh as ii,di as ai,dl as oi,dn as si,dp as ci,dr as li,ds as ui,dt as di,ea as fi,ed as pi,eg as mi,eh as hi,ei as gi,em as N,en as _i,eo as vi,ep as yi,er as bi,eu as P,f as xi,fd as F,ff as Si,fh as I,fi as Ci,fm as wi,fn as Ti,fp as Ei,fr as Di,ft as Oi,fu as ki,g as Ai,gc as ji,gd as Mi,gh as Ni,gm as Pi,gn as Fi,gp as Ii,gs as Li,gt as Ri,hh as zi,hm as Bi,ho as Vi,hp as Hi,hr as Ui,hs as Wi,ht as Gi,hu as L,ia as Ki,if as qi,il as Ji,im as Yi,ip as Xi,ir as Zi,is as Qi,it as $i,iu as ea,jc as ta,ji as na,jl as ra,jm as ia,jp as aa,jr as oa,jt as sa,ju as R,kc as ca,ki as la,kl as ua,kp as da,kr as fa,kt as pa,ld as ma,lf as ha,lh as ga,lm as z,ln as _a,lp as va,lr as ya,lt as ba,lu as B,m as xa,md as Sa,mh as Ca,mm as wa,mn as Ta,mp as Ea,mr as Da,ms as Oa,mt as ka,mu as Aa,na as ja,nf as Ma,nn as Na,np as Pa,nr as Fa,nt as Ia,nu as La,of as Ra,oi as za,om as Ba,op as Va,or as Ha,ot as Ua,ou as V,pc as Wa,pf as Ga,pn as Ka,po as qa,pp as Ja,pr as Ya,pt as Xa,pu as Za,q as Qa,qc as $a,qd as eo,qf as to,ql as no,qm as ro,qt as io,qu as ao,rf as oo,rh as so,ri as co,rl as lo,rp as uo,rr as fo,ru as po,sd as mo,sf as ho,sl as go,sm as _o,sp as vo,sr as H,ss as yo,su as bo,t as xo,ta as So,td as Co,th as wo,ti as To,tm as Eo,tn as Do,to as Oo,tp as ko,tt as Ao,tu as jo,u as Mo,uc as No,uf as Po,uh as Fo,ul as Io,um as Lo,un as Ro,up as zo,ur as Bo,us as Vo,ut as Ho,uu as Uo,v as Wo,vc as Go,vl as Ko,vm as qo,vn as Jo,vp as Yo,vr as Xo,vs as Zo,vu as U,wc as Qo,wf as $o,wh as es,wi as ts,wl as ns,wm as rs,wn as is,wp as as,wr as os,ws as ss,wt as cs,xf as ls,xm as us,xn as ds,xp as fs,xs as ps,xu as ms,yd as hs,yi as gs,ym as _s,yn as vs,yp as ys,yt as bs,yu as xs,za as Ss,zc as Cs,zd as ws,zf as Ts,zl as W,zm as Es,zn as Ds,zp as Os,zs as G,zt as ks,zu as As}from"./format-DidwgbbX.js";import{n as js}from"./SettingsPage-BoHXWvKn.js";function Ms(e,t,n){return new Ns(e,t,n)}var Ns=class extends Ct{constructor(e,t,n){super(n.worker,n.keepIdleModels||!1,e,t),this._foreignModuleHost=n.host||null,this._foreignProxy=this._getProxy().then(e=>new Proxy({},{get(t,n,r){if(n!==`then`){if(typeof n!=`string`)throw Error(`Not supported`);return(...t)=>e.$fmr(n,t)}}}))}fhr(e,t){if(!this._foreignModuleHost||typeof this._foreignModuleHost[e]!=`function`)return Promise.reject(Error(`Missing method `+e+` or missing main thread foreign host.`));try{return Promise.resolve(this._foreignModuleHost[e].apply(this._foreignModuleHost,t))}catch(e){return Promise.reject(e)}}getProxy(){return this._foreignProxy}withSyncedResources(e){return this.workerWithSyncedResources(e).then(e=>this.getProxy())}};function Ps(e){return Array.isArray(e)}function Fs(e){return!Ps(e)}function Is(e){return typeof e==`string`}function Ls(e){return!Is(e)}function Rs(e){return!e}function zs(e,t){return e.ignoreCase&&t?t.toLowerCase():t}function Bs(e){return e.replace(/[&<>'"_]/g,`-`)}function Vs(e,t){console.log(`${e.languageId}: ${t}`)}function K(e,t){return Error(`${e.languageId}: ${t}`)}function Hs(e,t,n,r,i){let a=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g,o=null;return t.replace(a,function(t,a,s,c,l,u,d,f,ee){return Rs(s)?Rs(c)?!Rs(l)&&l<r.length?zs(e,r[l]):!Rs(d)&&e&&typeof e[d]==`string`?e[d]:(o===null&&(o=i.split(`.`),o.unshift(i)),!Rs(u)&&u<o.length?zs(e,o[u]):``):zs(e,n):`$`})}function Us(e,t,n){let r=/\$[sS](\d\d?)/g,i=null;return t.replace(r,function(t,r){return i===null&&(i=n.split(`.`),i.unshift(n)),!Rs(r)&&r<i.length?$o(zs(e,i[r])):``})}function Ws(e,t){let n=t;for(;n&&n.length>0;){let t=e.tokenizer[n];if(t)return t;let r=n.lastIndexOf(`.`);n=r<0?null:n.substr(0,r)}return null}function Gs(e,t){let n=t;for(;n&&n.length>0;){if(e.stateNames[n])return!0;let t=n.lastIndexOf(`.`);n=t<0?null:n.substr(0,t)}return!1}var Ks,qs,Js=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Ys=function(e,t){return function(n,r){t(n,r,e)}},Xs,Zs=5,Qs=class{static create(e,t){return this._INSTANCE.create(e,t)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,t){if(e!==null&&e.depth>=this._maxCacheDepth)return new $s(e,t);let n=$s.getStackElementId(e);n.length>0&&(n+=`|`),n+=t;let r=this._entries[n];return r||(r=new $s(e,t),this._entries[n]=r,r)}};Ks=Qs,Ks._INSTANCE=new Ks(Zs);var $s=class e{constructor(e,t){this.parent=e,this.state=t,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(e){let t=``;for(;e!==null;)t.length>0&&(t+=`|`),t+=e.state,e=e.parent;return t}static _equals(e,t){for(;e!==null&&t!==null;){if(e===t)return!0;if(e.state!==t.state)return!1;e=e.parent,t=t.parent}return e===null&&t===null}equals(t){return e._equals(this,t)}push(e){return Qs.create(this,e)}pop(){return this.parent}popall(){let e=this;for(;e.parent;)e=e.parent;return e}switchTo(e){return Qs.create(this.parent,e)}},ec=class e{constructor(e,t){this.languageId=e,this.state=t}equals(e){return this.languageId===e.languageId&&this.state.equals(e.state)}clone(){return this.state.clone()===this.state?this:new e(this.languageId,this.state)}},tc=class{static create(e,t){return this._INSTANCE.create(e,t)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,t){if(t!==null||e!==null&&e.depth>=this._maxCacheDepth)return new nc(e,t);let n=$s.getStackElementId(e),r=this._entries[n];return r||(r=new nc(e,null),this._entries[n]=r,r)}};qs=tc,qs._INSTANCE=new qs(Zs);var nc=class e{constructor(e,t){this.stack=e,this.embeddedLanguageData=t}clone(){return(this.embeddedLanguageData?this.embeddedLanguageData.clone():null)===this.embeddedLanguageData?this:tc.create(this.stack,this.embeddedLanguageData)}equals(t){return!(t instanceof e)||!this.stack.equals(t.stack)?!1:this.embeddedLanguageData===null&&t.embeddedLanguageData===null?!0:this.embeddedLanguageData===null||t.embeddedLanguageData===null?!1:this.embeddedLanguageData.equals(t.embeddedLanguageData)}},rc=class{constructor(){this._tokens=[],this._languageId=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterLanguage(e){this._languageId=e}emit(e,t){(this._lastTokenType!==t||this._lastTokenLanguage!==this._languageId)&&(this._lastTokenType=t,this._lastTokenLanguage=this._languageId,this._tokens.push(new s(e,t,this._languageId)))}nestedLanguageTokenize(e,t,n,r){let i=n.languageId,a=n.state,o=N.get(i);if(!o)return this.enterLanguage(i),this.emit(r,``),a;let c=o.tokenize(e,t,a);if(r!==0)for(let e of c.tokens)this._tokens.push(new s(e.offset+r,e.type,e.language));else this._tokens=this._tokens.concat(c.tokens);return this._lastTokenType=null,this._lastTokenLanguage=null,this._languageId=null,c.endState}finalize(e){return new Eo(this._tokens,e)}},ic=class e{constructor(e,t){this._languageService=e,this._theme=t,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterLanguage(e){this._currentLanguageId=this._languageService.languageIdCodec.encodeLanguageId(e)}emit(e,t){let n=this._theme.match(this._currentLanguageId,t)|1024;this._lastTokenMetadata!==n&&(this._lastTokenMetadata=n,this._tokens.push(e),this._tokens.push(n))}static _merge(e,t,n){let r=e===null?0:e.length,i=t.length,a=n===null?0:n.length;if(r===0&&i===0&&a===0)return new Uint32Array;if(r===0&&i===0)return n;if(i===0&&a===0)return e;let o=new Uint32Array(r+i+a);e!==null&&o.set(e);for(let e=0;e<i;e++)o[r+e]=t[e];return n!==null&&o.set(n,r+i),o}nestedLanguageTokenize(t,n,r,i){let a=r.languageId,o=r.state,s=N.get(a);if(!s)return this.enterLanguage(a),this.emit(i,``),o;let c=s.tokenizeEncoded(t,n,o);if(i!==0)for(let e=0,t=c.tokens.length;e<t;e+=2)c.tokens[e]+=i;return this._prependTokens=e._merge(this._prependTokens,this._tokens,c.tokens),this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0,c.endState}finalize(t){return new Os(e._merge(this._prependTokens,this._tokens,null),[],t)}},ac=Xs=class extends C{constructor(e,t,n,r,i){super(),this._configurationService=i,this._languageService=e,this._standaloneThemeService=t,this._languageId=n,this._lexer=r,this._embeddedLanguages=Object.create(null),this.embeddedLoaded=Promise.resolve(void 0);let a=!1;this._register(N.onDidChange(e=>{if(a)return;let t=!1;for(let n=0,r=e.changedLanguages.length;n<r;n++){let r=e.changedLanguages[n];if(this._embeddedLanguages[r]){t=!0;break}}t&&(a=!0,N.handleChange([this._languageId]),a=!1)})),this._maxTokenizationLineLength=this._configurationService.getValue(`editor.maxTokenizationLineLength`,{overrideIdentifier:this._languageId}),this._register(this._configurationService.onDidChangeConfiguration(e=>{e.affectsConfiguration(`editor.maxTokenizationLineLength`)&&(this._maxTokenizationLineLength=this._configurationService.getValue(`editor.maxTokenizationLineLength`,{overrideIdentifier:this._languageId}))}))}getLoadStatus(){let e=[];for(let t in this._embeddedLanguages){let n=N.get(t);if(n){if(n instanceof Xs){let t=n.getLoadStatus();t.loaded===!1&&e.push(t.promise)}continue}N.isResolved(t)||e.push(N.getOrCreate(t))}return e.length===0?{loaded:!0}:{loaded:!1,promise:Promise.all(e).then(e=>void 0)}}getInitialState(){let e=Qs.create(null,this._lexer.start);return tc.create(e,null)}tokenize(e,t,n){if(e.length>=this._maxTokenizationLineLength)return $t(this._languageId,n);let r=new rc,i=this._tokenize(e,t,n,r);return r.finalize(i)}tokenizeEncoded(e,t,n){if(e.length>=this._maxTokenizationLineLength)return Oe(this._languageService.languageIdCodec.encodeLanguageId(this._languageId),n);let r=new ic(this._languageService,this._standaloneThemeService.getColorTheme().tokenTheme),i=this._tokenize(e,t,n,r);return r.finalize(i)}_tokenize(e,t,n,r){return n.embeddedLanguageData?this._nestedTokenize(e,t,n,0,r):this._myTokenize(e,t,n,0,r)}_findLeavingNestedLanguageOffset(e,t){let n=this._lexer.tokenizer[t.stack.state];if(!n&&(n=Ws(this._lexer,t.stack.state),!n))throw K(this._lexer,`tokenizer state is not defined: `+t.stack.state);let r=-1,i=!1;for(let a of n){if(!Ls(a.action)||!(a.action.nextEmbedded===`@pop`||a.action.hasEmbeddedEndInCases))continue;i=!0;let n=a.resolveRegex(t.stack.state),o=n.source;if(o.substr(0,4)===`^(?:`&&o.substr(o.length-1,1)===`)`){let e=(n.ignoreCase?`i`:``)+(n.unicode?`u`:``);n=new RegExp(o.substr(4,o.length-5),e)}let s=e.search(n);s===-1||s!==0&&a.matchOnlyAtLineStart||(r===-1||s<r)&&(r=s)}if(!i)throw K(this._lexer,`no rule containing nextEmbedded: "@pop" in tokenizer embedded state: `+t.stack.state);return r}_nestedTokenize(e,t,n,r,i){let a=this._findLeavingNestedLanguageOffset(e,n);if(a===-1){let a=i.nestedLanguageTokenize(e,t,n.embeddedLanguageData,r);return tc.create(n.stack,new ec(n.embeddedLanguageData.languageId,a))}let o=e.substring(0,a);o.length>0&&i.nestedLanguageTokenize(o,!1,n.embeddedLanguageData,r);let s=e.substring(a);return this._myTokenize(s,t,n,r+a,i)}_safeRuleName(e){return e?e.name:`(unknown)`}_myTokenize(e,t,n,r,i){i.enterLanguage(this._languageId);let a=e.length,o=t&&this._lexer.includeLF?e+`
2
2
  `:e,s=o.length,c=n.embeddedLanguageData,l=n.stack,u=0,d=null,f=!0;for(;f||u<s;){let n=u,ee=l.depth,te=d?d.groups.length:0,p=l.state,m=null,h=null,g=null,_=null,ne=null;if(d){m=d.matches;let e=d.groups.shift();h=e.matched,g=e.action,_=d.rule,d.groups.length===0&&(d=null)}else{if(!f&&u>=s)break;f=!1;let e=this._lexer.tokenizer[p];if(!e&&(e=Ws(this._lexer,p),!e))throw K(this._lexer,`tokenizer state is not defined: `+p);let t=o.substr(u);for(let n of e)if((u===0||!n.matchOnlyAtLineStart)&&(m=t.match(n.resolveRegex(p)),m)){h=m[0],g=n.action;break}}if(m||(m=[``],h=``),g||=(u<s&&(m=[o.charAt(u)],h=m[0]),this._lexer.defaultToken),h===null)break;for(u+=h.length;Fs(g)&&Ls(g)&&g.test;)g=g.test(h,m,p,u===s);let v=null;if(typeof g==`string`||Array.isArray(g))v=g;else if(g.group)v=g.group;else if(g.token!==null&&g.token!==void 0){if(v=g.tokenSubst?Hs(this._lexer,g.token,h,m,p):g.token,g.nextEmbedded){if(g.nextEmbedded===`@pop`){if(!c)throw K(this._lexer,`cannot pop embedded language if not inside one`);c=null}else if(c)throw K(this._lexer,`cannot enter embedded language from within an embedded language`);else ne=Hs(this._lexer,g.nextEmbedded,h,m,p)}if(g.goBack&&(u=Math.max(0,u-g.goBack)),g.switchTo&&typeof g.switchTo==`string`){let e=Hs(this._lexer,g.switchTo,h,m,p);if(e[0]===`@`&&(e=e.substr(1)),Ws(this._lexer,e))l=l.switchTo(e);else throw K(this._lexer,`trying to switch to a state '`+e+`' that is undefined in rule: `+this._safeRuleName(_))}else if(g.transform&&typeof g.transform==`function`)throw K(this._lexer,`action.transform not supported`);else if(g.next){if(g.next===`@push`){if(l.depth>=this._lexer.maxStack)throw K(this._lexer,`maximum tokenizer stack size reached: [`+l.state+`,`+l.parent.state+`,...]`);l=l.push(p)}else if(g.next===`@pop`){if(l.depth<=1)throw K(this._lexer,`trying to pop an empty stack in rule: `+this._safeRuleName(_));l=l.pop()}else if(g.next===`@popall`)l=l.popall();else{let e=Hs(this._lexer,g.next,h,m,p);if(e[0]===`@`&&(e=e.substr(1)),Ws(this._lexer,e))l=l.push(e);else throw K(this._lexer,`trying to set a next state '`+e+`' that is undefined in rule: `+this._safeRuleName(_))}}g.log&&typeof g.log==`string`&&Vs(this._lexer,this._lexer.languageId+`: `+Hs(this._lexer,g.log,h,m,p))}if(v===null)throw K(this._lexer,`lexer rule has no well-defined action in rule: `+this._safeRuleName(_));let y=n=>{let a=this._languageService.getLanguageIdByLanguageName(n)||this._languageService.getLanguageIdByMimeType(n)||n,o=this._getNestedEmbeddedLanguageData(a);if(u<s){let n=e.substr(u);return this._nestedTokenize(n,t,tc.create(l,o),r+u,i)}return tc.create(l,o)};if(Array.isArray(v)){if(d&&d.groups.length>0)throw K(this._lexer,`groups cannot be nested: `+this._safeRuleName(_));if(m.length!==v.length+1)throw K(this._lexer,`matched number of groups does not match the number of actions in rule: `+this._safeRuleName(_));let e=0;for(let t=1;t<m.length;t++)e+=m[t].length;if(e!==h.length)throw K(this._lexer,`with groups, all characters should be matched in consecutive groups in rule: `+this._safeRuleName(_));d={rule:_,matches:m,groups:[]};for(let e=0;e<v.length;e++)d.groups[e]={action:v[e],matched:m[e+1]};u-=h.length;continue}{if(v===`@rematch`&&(u-=h.length,h=``,m=null,v=``,ne!==null))return y(ne);if(h.length===0){if(s===0||ee!==l.depth||p!==l.state||(d?d.groups.length:0)!==te)continue;throw K(this._lexer,`no progress in tokenizer in rule: `+this._safeRuleName(_))}let e=null;if(Is(v)&&v.indexOf(`@brackets`)===0){let t=v.substr(9),n=oc(this._lexer,h);if(!n)throw K(this._lexer,`@brackets token returned but no bracket defined as: `+h);e=Bs(n.token+t)}else e=Bs(v===``?``:v+this._lexer.tokenPostfix);n<a&&i.emit(n+r,e)}if(ne!==null)return y(ne)}return tc.create(l,c)}_getNestedEmbeddedLanguageData(e){if(!this._languageService.isRegisteredLanguageId(e))return new ec(e,Bt);e!==this._languageId&&(this._languageService.requestBasicLanguageFeatures(e),N.getOrCreate(e),this._embeddedLanguages[e]=!0);let t=N.get(e);return t?new ec(e,t.getInitialState()):new ec(e,Bt)}};ac=Xs=Js([Ys(4,w)],ac);function oc(e,t){if(!t)return null;t=zs(e,t);let n=e.brackets;for(let e of n)if(e.open===t)return{token:e.token,bracketType:1};else if(e.close===t)return{token:e.token,bracketType:-1};return null}var sc=Mt(`standaloneColorizer`,{createHTML:e=>e}),cc=class{static colorizeElement(e,t,n,r){r||={};let i=r.theme||`vs`,a=r.mimeType||n.getAttribute(`lang`)||n.getAttribute(`data-lang`);if(!a)return console.error(`Mode not detected`),Promise.resolve();let o=t.getLanguageIdByMimeType(a)||a;e.setTheme(i);let s=n.firstChild?n.firstChild.nodeValue:``;return n.className+=` `+i,this.colorize(t,s||``,o,r).then(e=>{n.innerHTML=sc?.createHTML(e)??e},e=>console.error(e))}static async colorize(e,t,n,r){let i=e.languageIdCodec,a=4;r&&typeof r.tabSize==`number`&&(a=r.tabSize),Ts(t)&&(t=t.substr(1));let o=mn(t);if(!e.isRegisteredLanguageId(n))return uc(o,a,i);let s=await N.getOrCreate(n);return s?lc(o,a,s,i):uc(o,a,i)}static colorizeLine(e,t,n,r,i=4){let a=le.isBasicASCII(e,t),o=le.containsRTL(e,a,n);return Se(new ss(!1,!0,e,!1,a,o,0,r,[],i,0,0,0,0,-1,`none`,!1,!1,null,null,0)).html}static colorizeModelLine(e,t,n=4){let r=e.getLineContent(t);e.tokenization.forceTokenization(t);let i=e.tokenization.getLineTokens(t).inflate();return this.colorizeLine(r,e.mightContainNonBasicASCII(),e.mightContainRTL(),i,n)}};function lc(e,t,n,r){return new Promise((i,a)=>{let o=()=>{let s=dc(e,t,n,r);if(n instanceof ac){let e=n.getLoadStatus();if(e.loaded===!1){e.promise.then(o,a);return}}i(s)};o()})}function uc(e,t,n){let r=[],i=new Uint32Array(2);i[0]=0,i[1]=33587200;for(let a=0,o=e.length;a<o;a++){let o=e[a];i[0]=o.length;let s=new Gt(i,o,n),c=le.isBasicASCII(o,!0),l=le.containsRTL(o,c,!0),u=Se(new ss(!1,!0,o,!1,c,l,0,s,[],t,0,0,0,0,-1,`none`,!1,!1,null,null,0));r=r.concat(u.html),r.push(`<br/>`)}return r.join(``)}function dc(e,t,n,r){let i=[],a=n.getInitialState();for(let o=0,s=e.length;o<s;o++){let s=e[o],c=n.tokenizeEncoded(s,!0,a);Gt.convertToEndOffset(c.tokens,s.length);let l=new Gt(c.tokens,s,r),u=le.isBasicASCII(s,!0),d=le.containsRTL(s,u,!0),f=Se(new ss(!1,!0,s,!1,u,d,0,l.inflate(),[],t,0,0,0,0,-1,`none`,!1,!1,null,null,0));i=i.concat(f.html),i.push(`<br/>`),a=c.endState}return i.join(``)}var fc=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},pc=function(e,t){return function(n,r){t(n,r,e)}},mc=V,hc=class extends fn{get _targetWindow(){return R(this._target.targetElements[0])}get _targetDocumentElement(){return R(this._target.targetElements[0]).document.documentElement}get isDisposed(){return this._isDisposed}get isMouseIn(){return this._lockMouseTracker.isMouseIn}get domNode(){return this._hover.containerDomNode}get onDispose(){return this._onDispose.event}get onRequestLayout(){return this._onRequestLayout.event}get anchor(){return this._hoverPosition===2?0:1}get x(){return this._x}get y(){return this._y}get isLocked(){return this._isLocked}set isLocked(e){this._isLocked!==e&&(this._isLocked=e,this._hoverContainer.classList.toggle(`locked`,this._isLocked))}addMouseTrackingElement(e){return this._lockMouseTracker.addElement(e)}constructor(e,t,n,r,i){if(super(),this._keybindingService=t,this._configurationService=n,this._markdownRenderer=r,this._accessibilityService=i,this._messageListeners=new A,this._isDisposed=!1,this._forcePosition=!1,this._x=0,this._y=0,this._isLocked=!1,this._enableFocusTraps=!1,this._addedFocusTrap=!1,this._maxHeightRatioRelativeToWindow=.5,this._onDispose=this._register(new x),this._onRequestLayout=this._register(new x),this._linkHandler=e.linkHandler,this._target=`targetElements`in e.target?e.target:new _c(e.target),e.style)switch(e.style){case 1:e.appearance??={},e.appearance.compact??=!0,e.appearance.showPointer??=!0;break;case 2:e.appearance??={},e.appearance.compact??=!0}this._hoverPointer=e.appearance?.showPointer?mc(`div.workbench-hover-pointer`):void 0,this._hover=this._register(new ft(!e.appearance?.skipFadeInAnimation)),this._hover.containerDomNode.classList.add(`workbench-hover`),e.appearance?.compact&&this._hover.containerDomNode.classList.add(`workbench-hover`,`compact`),this._hoverPointer&&this._hover.containerDomNode.classList.add(`with-pointer`),e.additionalClasses&&this._hover.containerDomNode.classList.add(...e.additionalClasses),e.position?.forcePosition&&(this._forcePosition=!0),e.trapFocus&&(this._enableFocusTraps=!0);let a=e.appearance?.maxHeightRatio;a!==void 0&&a>0&&a<=1&&(this._maxHeightRatioRelativeToWindow=a),this._hoverPosition=e.position?.hoverPosition===void 0?3:es(e.position.hoverPosition)?e.position.hoverPosition:2,this.onmousedown(this._hover.containerDomNode,e=>e.stopPropagation()),this.onkeydown(this._hover.containerDomNode,e=>{e.equals(9)&&this.dispose()}),this._register(L(this._targetWindow,`blur`,()=>this.dispose()));let o=mc(`div.hover-row.markdown-hover`),s=mc(`div.hover-contents`);if(typeof e.content==`string`)s.textContent=e.content,s.style.whiteSpace=`pre-wrap`;else if(y(e.content)){s.appendChild(e.content),s.classList.add(`html-hover-contents`);let t=new ResizeObserver(()=>{this.layout(),this._onRequestLayout.fire()});t.observe(s),this._register(j(()=>t.disconnect()))}else{let t=e.content,{element:n}=this._register(this._markdownRenderer.render(t,{actionHandler:this._linkHandler,asyncRenderCallback:()=>{s.classList.add(`code-hover-contents`),this.layout(),this._onRequestLayout.fire()}}));s.appendChild(n)}if(o.appendChild(s),this._hover.contentsDomNode.appendChild(o),e.actions&&e.actions.length>0){let t=mc(`div.hover-row.status-bar`),n=mc(`div.actions`);e.actions.forEach(e=>{let t=this._keybindingService.lookupKeybinding(e.commandId),r=t?t.getLabel():null;this._register(Fe.render(n,{label:e.label,commandId:e.commandId,run:t=>{e.run(t),this.dispose()},iconClass:e.iconClass},r))}),t.appendChild(n),this._hover.containerDomNode.appendChild(t)}this._hoverContainer=mc(`div.workbench-hover-container`),this._hoverPointer&&this._hoverContainer.appendChild(this._hoverPointer),this._hoverContainer.appendChild(this._hover.containerDomNode);let c;if(c=e.actions&&e.actions.length>0?!1:e.persistence?.hideOnHover===void 0?typeof e.content==`string`||fa(e.content)&&!e.content.value.includes(`](`)&&!e.content.value.includes(`</a>`):e.persistence.hideOnHover,e.appearance?.showHoverHint){let e=mc(`div.hover-row.status-bar`),t=mc(`div.info`);t.textContent=I(1761,`Hold {0} key to mouse over`,so?`Option`:`Alt`),e.appendChild(t),this._hover.containerDomNode.appendChild(e)}let l=[...this._target.targetElements];c||l.push(this._hoverContainer);let u=this._mouseTracker=this._register(new gc(l));if(this._register(u.onMouseOut(()=>{this._isLocked||this.dispose()})),c){let e=[...this._target.targetElements,this._hoverContainer];this._lockMouseTracker=this._register(new gc(e)),this._register(this._lockMouseTracker.onMouseOut(()=>{this._isLocked||this.dispose()}))}else this._lockMouseTracker=u}addFocusTrap(){if(!this._enableFocusTraps||this._addedFocusTrap)return;this._addedFocusTrap=!0;let e=this._hover.containerDomNode,t=this.findLastFocusableChild(this._hover.containerDomNode);if(t){let n=mt(this._hoverContainer,mc(`div`)),r=U(this._hoverContainer,mc(`div`));n.tabIndex=0,r.tabIndex=0,this._register(L(r,`focus`,t=>{e.focus(),t.preventDefault()})),this._register(L(n,`focus`,e=>{t.focus(),e.preventDefault()}))}}findLastFocusableChild(e){if(e.hasChildNodes())for(let t=0;t<e.childNodes.length;t++){let n=e.childNodes.item(e.childNodes.length-t-1);if(n.nodeType===n.ELEMENT_NODE){let e=n;if(typeof e.tabIndex==`number`&&e.tabIndex>=0)return e}let r=this.findLastFocusableChild(n);if(r)return r}}render(e){e.appendChild(this._hoverContainer);let t=this._hoverContainer.contains(this._hoverContainer.ownerDocument.activeElement)&&it(this._configurationService.getValue(`accessibility.verbosity.hover`)===!0&&this._accessibilityService.isScreenReaderOptimized(),this._keybindingService.lookupKeybinding(`editor.action.accessibleView`)?.getAriaLabel());t&&kn(t),this.layout(),this.addFocusTrap()}layout(){this._mouseTracker?.suppressPendingMouseOut(),this._lockMouseTracker!==this._mouseTracker&&this._lockMouseTracker?.suppressPendingMouseOut(),this._hover.containerDomNode.classList.remove(`right-aligned`),this._hover.contentsDomNode.style.maxHeight=``;let e=e=>{let t=Ce(e),n=e.getBoundingClientRect();return{top:n.top*t,bottom:n.bottom*t,right:n.right*t,left:n.left*t}},{top:t,right:n,bottom:r,left:i}=this._target.targetElements.map(t=>e(t))[0],a=n-i,o=r-t,s={top:t,right:n,bottom:r,left:i,width:a,height:o,center:{x:i+a/2,y:t+o/2}};if(this.adjustHorizontalHoverPosition(s),this.adjustVerticalHoverPosition(s),this.adjustHoverMaxHeight(s),this._hoverContainer.style.padding=``,this._hoverContainer.style.margin=``,this._hoverPointer){switch(this._hoverPosition){case 1:s.left+=3,s.right+=3,this._hoverContainer.style.paddingLeft=`3px`,this._hoverContainer.style.marginLeft=`-3px`;break;case 0:s.left-=3,s.right-=3,this._hoverContainer.style.paddingRight=`3px`,this._hoverContainer.style.marginRight=`-3px`;break;case 2:s.top+=3,s.bottom+=3,this._hoverContainer.style.paddingTop=`3px`,this._hoverContainer.style.marginTop=`-3px`;break;case 3:s.top-=3,s.bottom-=3,this._hoverContainer.style.paddingBottom=`3px`,this._hoverContainer.style.marginBottom=`-3px`}s.center.x=s.left+a/2,s.center.y=s.top+o/2}this.computeXCordinate(s),this.computeYCordinate(s),this._hoverPointer&&(this._hoverPointer.classList.remove(`top`),this._hoverPointer.classList.remove(`left`),this._hoverPointer.classList.remove(`right`),this._hoverPointer.classList.remove(`bottom`),this.setHoverPointerPosition(s)),this._hover.onContentsChanged()}computeXCordinate(e){let t=this._hover.containerDomNode.clientWidth+2;this._target.x===void 0?this._hoverPosition===1?this._x=e.right:this._hoverPosition===0?this._x=e.left-t:(this._x=this._hoverPointer?e.center.x-this._hover.containerDomNode.clientWidth/2:e.left,this._x+t>=this._targetDocumentElement.clientWidth&&(this._hover.containerDomNode.classList.add(`right-aligned`),this._x=Math.max(this._targetDocumentElement.clientWidth-t-2,this._targetDocumentElement.clientLeft))):this._x=this._target.x,this._x<this._targetDocumentElement.clientLeft&&(this._x=e.left+2)}computeYCordinate(e){this._y=this._target.y===void 0?this._hoverPosition===3?e.top:this._hoverPosition===2?e.bottom-2:this._hoverPointer?e.center.y+this._hover.containerDomNode.clientHeight/2:e.bottom:this._target.y,this._y>this._targetWindow.innerHeight&&(this._y=e.bottom)}adjustHorizontalHoverPosition(e){if(this._target.x!==void 0)return;let t=this._hoverPointer?3:0;if(this._forcePosition){let n=t+2;this._hoverPosition===1?this._hover.containerDomNode.style.maxWidth=`${this._targetDocumentElement.clientWidth-e.right-n}px`:this._hoverPosition===0&&(this._hover.containerDomNode.style.maxWidth=`${e.left-n}px`);return}this._hoverPosition===1?this._targetDocumentElement.clientWidth-e.right<this._hover.containerDomNode.clientWidth+t&&(this._hoverPosition=e.left>=this._hover.containerDomNode.clientWidth+t?0:2):this._hoverPosition===0&&(e.left<this._hover.containerDomNode.clientWidth+t&&(this._hoverPosition=this._targetDocumentElement.clientWidth-e.right>=this._hover.containerDomNode.clientWidth+t?1:2),e.left-this._hover.containerDomNode.clientWidth-t<=this._targetDocumentElement.clientLeft&&(this._hoverPosition=1))}adjustVerticalHoverPosition(e){if(this._target.y!==void 0||this._forcePosition)return;let t=this._hoverPointer?3:0;this._hoverPosition===3?e.top-this._hover.containerDomNode.clientHeight-t<0&&(this._hoverPosition=2):this._hoverPosition===2&&e.bottom+this._hover.containerDomNode.offsetHeight+t>this._targetWindow.innerHeight&&(this._hoverPosition=3)}adjustHoverMaxHeight(e){let t=this._targetWindow.innerHeight*this._maxHeightRatioRelativeToWindow;if(this._forcePosition){let n=(this._hoverPointer?3:0)+2;this._hoverPosition===3?t=Math.min(t,e.top-n):this._hoverPosition===2&&(t=Math.min(t,this._targetWindow.innerHeight-e.bottom-n))}if(this._hover.containerDomNode.style.maxHeight=`${t}px`,this._hover.contentsDomNode.clientHeight<this._hover.contentsDomNode.scrollHeight){let e=`${this._hover.scrollbar.options.verticalScrollbarSize}px`;this._hover.contentsDomNode.style.paddingRight!==e&&(this._hover.contentsDomNode.style.paddingRight=e)}}setHoverPointerPosition(e){if(this._hoverPointer)switch(this._hoverPosition){case 0:case 1:{this._hoverPointer.classList.add(this._hoverPosition===0?`right`:`left`);let t=this._hover.containerDomNode.clientHeight;t>e.height?this._hoverPointer.style.top=`${e.center.y-(this._y-t)-3}px`:this._hoverPointer.style.top=`${Math.round(t/2)-3}px`;break}case 3:case 2:{this._hoverPointer.classList.add(this._hoverPosition===3?`bottom`:`top`);let t=this._hover.containerDomNode.clientWidth,n=Math.round(t/2)-3,r=this._x+n;(r<e.left||r>e.right)&&(n=e.center.x-this._x-3),this._hoverPointer.style.left=`${n}px`;break}}}focus(){this._hover.containerDomNode.focus()}dispose(){this._isDisposed||(this._onDispose.fire(),this._target.dispose?.(),this._hoverContainer.remove(),this._messageListeners.dispose(),super.dispose()),this._isDisposed=!0}};hc=fc([pc(1,na),pc(2,w),pc(3,Ui),pc(4,Wi)],hc);var gc=class extends fn{get onMouseOut(){return this._onMouseOut.event}get isMouseIn(){return this._isMouseIn}constructor(e,t=200){super(),this._elements=e,this._eventDebounceDelay=t,this._isMouseIn=!0,this._suppressNextMouseOut=!1,this._mouseTimer=this._register(new Ne),this._onMouseOut=this._register(new x);for(let e of this._elements)this.onmouseover(e,()=>this._onTargetMouseOver()),this.onmouseleave(e,()=>this._onTargetMouseLeave())}_onTargetMouseOver(){this._isMouseIn=!0,this._suppressNextMouseOut=!1,this._mouseTimer.clear()}_onTargetMouseLeave(){this._isMouseIn=!1,this._mouseTimer.value=new Qe(()=>this._fireIfMouseOutside(),this._eventDebounceDelay)}_fireIfMouseOutside(){!this._isMouseIn&&!this._suppressNextMouseOut&&this._onMouseOut.fire()}suppressPendingMouseOut(){this._isMouseIn||(this._suppressNextMouseOut=!0)}addElement(e){if(this._elements.includes(e))return C.None;this._elements.push(e);let t=new A;return t.add(L(e,B.MOUSE_OVER,()=>this._onTargetMouseOver())),t.add(L(e,B.MOUSE_LEAVE,()=>this._onTargetMouseLeave())),t.add(j(()=>{let t=this._elements.indexOf(e);t>=0&&this._elements.splice(t,1)})),t}},_c=class{constructor(e){this._element=e,this.targetElements=[this._element]}dispose(){}};function vc(e){let t=e;return typeof t==`object`&&`markdown`in t&&`markdownNotSupportedFallback`in t}var yc=class{constructor(e,t,n){this.hoverDelegate=e,this.target=t,this.fadeInAnimation=n}async update(e,t,n){if(this._cancellationTokenSource&&=(this._cancellationTokenSource.dispose(!0),void 0),this.isDisposed)return;let r;if(ge(e)||y(e)||e===void 0)r=e;else{this._cancellationTokenSource=new _s;let i=this._cancellationTokenSource.token,a;if(a=vc(e)?ie(e.markdown)?e.markdown(i).then(t=>t??e.markdownNotSupportedFallback):e.markdown??e.markdownNotSupportedFallback:e.element(i),a instanceof Promise?(this._hoverWidget||this.show(I(1762,`Loading...`),t,n),r=await a):r=a,this.isDisposed||i.isCancellationRequested)return}this.show(r,t,n)}show(e,t,n){let r=this._hoverWidget;if(this.hasContent(e)){let i={content:e,target:this.target,actions:n?.actions,linkHandler:n?.linkHandler,trapFocus:n?.trapFocus,appearance:{showPointer:this.hoverDelegate.placement===`element`,skipFadeInAnimation:!this.fadeInAnimation||!!r,showHoverHint:n?.appearance?.showHoverHint},position:{hoverPosition:2}};this._hoverWidget=this.hoverDelegate.showHover(i,t)}r?.dispose()}hasContent(e){return e?!fa(e)||!!e.value:!1}get isDisposed(){return this._hoverWidget?.isDisposed}dispose(){this._hoverWidget?.dispose(),this._cancellationTokenSource?.dispose(!0),this._cancellationTokenSource=void 0}},bc=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},xc=function(e,t){return function(n,r){t(n,r,e)}},Sc=3,Cc=class extends C{get _currentHover(){return this._hoverStack.at(-1)?.hover}get _currentHoverOptions(){return this._hoverStack.at(-1)?.options}_getContainingHoverIndex(e){let t=y(e)?[e]:e.targetElements;for(let e=this._hoverStack.length-1;e>=0;e--)for(let n of t)if(S(n,this._hoverStack[e].hover.domNode))return e;return-1}constructor(e,t,n,r,i,a){super(),this._instantiationService=e,this._configurationService=t,this._keybindingService=r,this._layoutService=i,this._accessibilityService=a,this._hoverStack=[],this._currentDelayedHoverWasShown=!1,this._delayedHovers=new Map,this._managedHovers=new Map,this._register(n.onDidShowContextMenu(()=>this.hideHover())),this._register(De.registerCommandAndKeybindingRule({id:`workbench.action.showHover`,weight:0,primary:Bi(2089,2087),handler:()=>{this._showAndFocusHoverForActiveElement()}}))}showInstantHover(e,t,n,r){let i=this._createHover(e,n);if(i)return this._showHover(i,e,t),i.hover}showDelayedHover(e,t){if(e.id===void 0&&(e.id=Tc(e.content)),!this._currentDelayedHover||this._currentDelayedHoverWasShown){if(this._currentHover?.isLocked&&this._getContainingHoverIndex(e.target)<0)return;if(wc(this._currentHoverOptions)===wc(e))return this._currentHover;if(this._currentHover&&!this._currentHover.isDisposed&&this._currentDelayedHoverGroupId!==void 0&&this._currentDelayedHoverGroupId===t?.groupId)return this.showInstantHover({...e,appearance:{...e.appearance,skipFadeInAnimation:!0}})}else if(this._currentDelayedHover&&wc(this._currentHoverOptions)===wc(e))return this._currentDelayedHover;let n=this._createHover(e,void 0);if(!n){this._currentDelayedHover=void 0,this._currentDelayedHoverWasShown=!1,this._currentDelayedHoverGroupId=void 0;return}this._currentDelayedHover=n.hover,this._currentDelayedHoverWasShown=!1,this._currentDelayedHoverGroupId=t?.groupId;let r=t?.reducedDelay?this._configurationService.getValue(`workbench.hover.reducedDelay`):this._configurationService.getValue(`workbench.hover.delay`);return Ma(r).then(()=>{n.hover&&!n.hover.isDisposed&&(this._currentDelayedHoverWasShown=!0,this._showHover(n,e))}),n.hover}setupDelayedHover(e,t,n){return this._setupDelayedHover(e,n=>{let r={...typeof t==`function`?t():t,target:e};return r.style===2&&n&&(r.target=jc(e,n)),r},n)}setupDelayedHoverAtMouse(e,t,n){return this._setupDelayedHover(e,n=>({...typeof t==`function`?t():t,target:n?jc(e,n):e}),n)}_setupDelayedHover(e,t,n){let r=new A;return r.add(L(e,B.MOUSE_OVER,e=>{this.showDelayedHover(t(e),{groupId:n?.groupId,reducedDelay:n?.reducedDelay})})),n?.setupKeyboardEvents&&r.add(L(e,B.KEY_DOWN,e=>{let n=new qi(e);(n.equals(10)||n.equals(3))&&this.showInstantHover(t(),!0)})),this._delayedHovers.set(e,{show:e=>{this.showInstantHover(t(),e)}}),r.add(j(()=>this._delayedHovers.delete(e))),r}_createHover(e,t){if(this._currentDelayedHover?.dispose(),this._currentDelayedHover=void 0,e.content===``)return;if(e.id===void 0&&(e.id=Tc(e.content)),this._getContainingHoverIndex(e.target)>=0){if(this._hoverStack.length>=Sc)return}else if(this._currentHover?.isLocked||wc(this._currentHoverOptions)===wc(e))return;this._lastHoverOptions=e;let n=e.trapFocus||this._accessibilityService.isScreenReaderOptimized(),r=ms(),i;t||n&&r&&(r.classList.contains(`monaco-hover`)||(i=r));let a=new A,o=this._instantiationService.createInstance(hc,e);if(e.persistence?.sticky&&(o.isLocked=!0),e.position?.hoverPosition&&!es(e.position.hoverPosition)&&(e.target={targetElements:y(e.target)?[e.target]:e.target.targetElements,x:e.position.hoverPosition.x+10}),o.onDispose(()=>{let e=this._hoverStack.findIndex(e=>e.hover===o);if(e>=0){let t=this._hoverStack[e];for(Ye(o.domNode)&&t.lastFocusedElementBeforeOpen&&t.lastFocusedElementBeforeOpen.focus();this._hoverStack.length>e+1;){let e=this._hoverStack.pop();e.contextView.dispose(),e.hover.dispose()}this._hoverStack.splice(e,1),t.contextView.dispose()}a.dispose()},void 0,a),!e.container){let t=y(e.target)?e.target:e.target.targetElements[0];e.container=this._layoutService.getContainer(R(t))}if(a.add(L(R(e.container).document,B.MOUSE_DOWN,e=>{S(e.target,o.domNode)||this._hideHoverAndDescendants(o)})),!e.persistence?.sticky){if(`targetElements`in e.target)for(let t of e.target.targetElements)a.add(L(t,B.CLICK,()=>this._hideHoverAndDescendants(o)));else a.add(L(e.target,B.CLICK,()=>this._hideHoverAndDescendants(o)));let t=ms();if(t){let n=R(t).document;a.add(L(t,B.KEY_DOWN,t=>this._keyDown(t,o,!!e.persistence?.hideOnKeyDown))),a.add(L(n,B.KEY_DOWN,t=>this._keyDown(t,o,!!e.persistence?.hideOnKeyDown))),a.add(L(t,B.KEY_UP,e=>this._keyUp(e,o))),a.add(L(n,B.KEY_UP,e=>this._keyUp(e,o)))}}if(`IntersectionObserver`in zn){let t=new IntersectionObserver(e=>this._intersectionChange(e,o),{threshold:0}),n=`targetElements`in e.target?e.target.targetElements[0]:e.target;t.observe(n),a.add(j(()=>t.disconnect()))}return{hover:o,lastFocusedElementBeforeOpen:i,store:a}}_showHover(e,t,n){let{hover:r,lastFocusedElementBeforeOpen:i,store:a}=e,o=this._getContainingHoverIndex(t.target),s=o>=0;if(!s)this._hideAllHovers();else{for(let e=this._hoverStack.length-1;e>o;e--)this._hoverStack[e].hover.dispose();this._hoverStack.length=o+1}if(s)for(let e=0;e<=o;e++)a.add(this._hoverStack[e].hover.addMouseTrackingElement(r.domNode));let c=t.container??this._layoutService.getContainer(R(y(t.target)?t.target:t.target.targetElements[0])),l=new li(c,1),u={hover:r,options:t,contextView:l,lastFocusedElementBeforeOpen:i};this._hoverStack.push(u);let d=new Oc(r,n,this._hoverStack.length);if(l.show(d),a.add(r.onRequestLayout(()=>l.layout())),n||t.persistence?.sticky){let e=R(c);a.add(L(e,B.RESIZE,()=>l.layout()))}if(t.onDidHide){let e=t.onDidHide;a.add(j(()=>e()))}t.onDidShow?.()}_hideHoverAndDescendants(e){let t=this._hoverStack.findIndex(t=>t.hover===e);if(!(t<0)){for(let e=this._hoverStack.length-1;e>=t;e--)this._hoverStack[e].hover.dispose();this._hoverStack.length=t}}_hideAllHovers(){for(let e=this._hoverStack.length-1;e>=0;e--)this._hoverStack[e].hover.dispose();this._hoverStack.length=0}hideHover(e){this._hoverStack.length!==0&&(e||!this._currentHover?.isLocked)&&this.doHideHover()}doHideHover(){let e=this._hoverStack.length;this._hoverStack[e-1]?.hover.dispose(),this._hoverStack.length=e-1}_intersectionChange(e,t){e[e.length-1].isIntersecting||t.dispose()}showAndFocusLastHover(){this._lastHoverOptions&&this.showInstantHover(this._lastHoverOptions,!0,!0)}_showAndFocusHoverForActiveElement(){let e=ms();for(;e;){let t=this._delayedHovers.get(e)??this._managedHovers.get(e);if(t){t.show(!0);return}e=e.parentElement}}_keyDown(e,t,n){if(e.key===`Alt`){for(let e of this._hoverStack)e.hover.isLocked=!0;return}let r=new qi(e);if(!(this._keybindingService.resolveKeyboardEvent(r).getSingleModifierDispatchChords().some(e=>!!e)||this._keybindingService.softDispatch(r,r.target).kind!==0)&&n&&(!this._currentHoverOptions?.trapFocus||e.key!==`Tab`)){let e=this._hoverStack.find(e=>e.hover===t);this._hideHoverAndDescendants(t),e?.lastFocusedElementBeforeOpen?.focus()}}_keyUp(e,t){if(e.key===`Alt`){for(let e of this._hoverStack)e.options.persistence?.sticky||(e.hover.isLocked=!1);if(!this._hoverStack.some(e=>e.hover.isMouseIn)){let e=this._hoverStack[this._hoverStack.length-1];this._hideAllHovers(),e?.lastFocusedElementBeforeOpen?.focus()}}}setupManagedHover(e,t,n,r){if(e.showNativeHover)return Dc(t,n);t.setAttribute(`custom-hover`,`true`),t.title!==``&&(console.warn(`HTML element already has a title attribute, which will conflict with the custom hover. Please remove the title attribute.`),t.title=``);let i,a,o=(t,n)=>{let r=a!==void 0;t&&(a?.dispose(),a=void 0),n&&(i?.dispose(),i=void 0),r&&(e.onDidHideHover?.(),a=void 0)},s=(i,o,s,c)=>new Qe(async()=>{(!a||a.isDisposed)&&(a=new yc(e,s||t,i>0),await a.update(typeof n==`function`?n():n,o,{...r,trapFocus:c}))},i),c=new A,l=!1;c.add(L(t,B.MOUSE_DOWN,()=>{l=!0,o(!0,!0)},!0)),c.add(L(t,B.MOUSE_UP,()=>{l=!1},!0)),c.add(L(t,B.MOUSE_LEAVE,e=>{l=!1,o(!1,e.fromElement===t)},!0)),c.add(L(t,B.MOUSE_OVER,r=>{if(i)return;let a=new A,c={targetElements:[t],dispose:()=>{}};(e.placement===void 0||e.placement===`mouse`)&&a.add(L(t,B.MOUSE_MOVE,e=>{c.x=e.x+10,kc(e,t)||o(!0,!0)},!0)),i=a,kc(r,t)&&a.add(s(typeof e.delay==`function`?e.delay(n):e.delay,!1,c))},!0)),Tt(t)||c.add(L(t,B.FOCUS,r=>{if(l||i||(a?.isDisposed&&(a=void 0),y(r.relatedTarget)&&r.relatedTarget.closest(`.monaco-hover`)||!r.relatedTarget)||!kc(r,t))return;let c={targetElements:[t],dispose:()=>{}},u=new A;u.add(L(t,B.BLUR,()=>o(!0,!0),!0)),u.add(s(typeof e.delay==`function`?e.delay(n):e.delay,!1,c)),i=u},!0));let u={show:e=>{o(!1,!0),s(0,e,void 0,e)},hide:()=>{o(!0,!0)},update:async(e,t)=>{n=e,await a?.update(n,void 0,t)},dispose:()=>{this._managedHovers.delete(t),c.dispose(),o(!0,!0)}};return this._managedHovers.set(t,u),u}showManagedHover(e){let t=this._managedHovers.get(e);t&&t.show(!0)}dispose(){this._managedHovers.forEach(e=>e.dispose()),super.dispose()}};Cc=bc([xc(0,P),xc(1,w),xc(2,vr),xc(3,na),xc(4,Bo),xc(5,Wi)],Cc);function wc(e){if(e!==void 0)return e?.id??e}function Tc(e){if(!y(e))return typeof e==`string`?e.toString():e.value}function Ec(e){let t=typeof e==`function`?e():e;if(ge(t))return zt(t);if(vc(t))return t.markdownNotSupportedFallback}function Dc(e,t){function n(t){t?e.setAttribute(`title`,t):e.removeAttribute(`title`)}return n(Ec(t)),{update:e=>n(Ec(e)),show:()=>{},hide:()=>{},dispose:()=>n(void 0)}}var Oc=class{get anchorPosition(){return this._hover.anchor}constructor(e,t=!1,n=1){this._hover=e,this._focus=t,this.layer=n}render(e){return this._hover.render(e),this._focus&&this._hover.focus(),this._hover}getAnchor(){return{x:this._hover.x,y:this._hover.y}}layout(){this._hover.layout()}};function kc(e,t){return y(e.target)&&Ac(e.target,t)===t}function Ac(e,t){for(t??=R(e).document.body;!e.hasAttribute(`custom-hover`)&&e!==t;)e=e.parentElement;return e}function jc(e,t){return{targetElements:[e],x:t.x+10}}D(Er,Cc,1),So((e,t)=>{let n=e.getColor(kt);n&&(t.addRule(`.monaco-hover.workbench-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${n.transparent(.5)}; }`),t.addRule(`.monaco-hover.workbench-hover hr { border-top: 1px solid ${n.transparent(.5)}; }`))});var Mc=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Nc=function(e,t){return function(n,r){t(n,r,e)}};function Pc(e){return e.scheme===O.file?e.fsPath:e.path}var Fc=0,Ic=class{constructor(e,t,n,r,i,a,o){this.id=++Fc,this.type=0,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabel=t,this.strResource=n,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=r,this.groupOrder=i,this.sourceId=a,this.sourceOrder=o,this.isValid=!0}setValid(e){this.isValid=e}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?` VALID`:`INVALID`}] ${this.actual.constructor.name} - ${this.actual}`}},Lc=class{constructor(e,t){this.resourceLabel=e,this.reason=t}},Rc=class{constructor(){this.elements=new Map}createMessage(){let e=[],t=[];for(let[,n]of this.elements)(n.reason===0?e:t).push(n.resourceLabel);let n=[];return e.length>0&&n.push(I(2099,`The following files have been closed and modified on disk: {0}.`,e.join(`, `))),t.length>0&&n.push(I(2100,`The following files have been modified in an incompatible way: {0}.`,t.join(`, `))),n.join(`
3
3
  `)}get size(){return this.elements.size}has(e){return this.elements.has(e)}set(e,t){this.elements.set(e,t)}delete(e){return this.elements.delete(e)}},zc=class{constructor(e,t,n,r,i,a,o){this.id=++Fc,this.type=1,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabels=t,this.strResources=n,this.groupId=r,this.groupOrder=i,this.sourceId=a,this.sourceOrder=o,this.removedResources=null,this.invalidatedResources=null}canSplit(){return typeof this.actual.split==`function`}removeResource(e,t,n){this.removedResources||=new Rc,this.removedResources.has(t)||this.removedResources.set(t,new Lc(e,n))}setValid(e,t,n){n?this.invalidatedResources&&(this.invalidatedResources.delete(t),this.invalidatedResources.size===0&&(this.invalidatedResources=null)):(this.invalidatedResources||=new Rc,this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new Lc(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?`INVALID`:` VALID`}] ${this.actual.constructor.name} - ${this.actual}`}},Bc=class{constructor(e,t){this.resourceLabel=e,this.strResource=t,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(let e of this._past)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);for(let e of this._future)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){let e=[];e.push(`* ${this.strResource}:`);for(let t=0;t<this._past.length;t++)e.push(` * [UNDO] ${this._past[t]}`);for(let t=this._future.length-1;t>=0;t--)e.push(` * [REDO] ${this._future[t]}`);return e.join(`
4
4
  `)}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,t){e.type===1?e.setValid(this.resourceLabel,this.strResource,t):e.setValid(t)}setElementsValidFlag(e,t){for(let n of this._past)t(n.actual)&&this._setElementValidFlag(n,e);for(let n of this._future)t(n.actual)&&this._setElementValidFlag(n,e)}pushElement(e){for(let e of this._future)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(e),this.versionId++}createSnapshot(e){let t=[];for(let e=0,n=this._past.length;e<n;e++)t.push(this._past[e].id);for(let e=this._future.length-1;e>=0;e--)t.push(this._future[e].id);return new ae(e,t)}restoreSnapshot(e){let t=e.elements.length,n=!0,r=0,i=-1;for(let a=0,o=this._past.length;a<o;a++,r++){let o=this._past[a];n&&(r>=t||o.id!==e.elements[r])&&(n=!1,i=a),!n&&o.type===1&&o.removeResource(this.resourceLabel,this.strResource,0)}let a=-1;for(let i=this._future.length-1;i>=0;i--,r++){let o=this._future[i];n&&(r>=t||o.id!==e.elements[r])&&(n=!1,a=i),!n&&o.type===1&&o.removeResource(this.resourceLabel,this.strResource,0)}i!==-1&&(this._past=this._past.slice(0,i)),a!==-1&&(this._future=this._future.slice(a+1)),this.versionId++}getElements(){let e=[],t=[];for(let t of this._past)e.push(t.actual);for(let e of this._future)t.push(e.actual);return{past:e,future:t}}getClosestPastElement(){return this._past.length===0?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return this._future.length===0?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(e,t){for(let n=this._past.length-1;n>=0;n--)if(this._past[n]===e){t.has(this.strResource)?this._past[n]=t.get(this.strResource):this._past.splice(n,1);break}this.versionId++}splitFutureWorkspaceElement(e,t){for(let n=this._future.length-1;n>=0;n--)if(this._future[n]===e){t.has(this.strResource)?this._future[n]=t.get(this.strResource):this._future.splice(n,1);break}this.versionId++}moveBackward(e){this._past.pop(),this._future.push(e),this.versionId++}moveForward(e){this._future.pop(),this._past.push(e),this.versionId++}},Vc=class{constructor(e){this.editStacks=e,this._versionIds=[];for(let e=0,t=this.editStacks.length;e<t;e++)this._versionIds[e]=this.editStacks[e].versionId}isValid(){for(let e=0,t=this.editStacks.length;e<t;e++)if(this._versionIds[e]!==this.editStacks[e].versionId)return!1;return!0}},Hc=new Bc(``,``);Hc.locked=!0;var Uc=class{constructor(e,t){this._dialogService=e,this._notificationService=t,this._editStacks=new Map,this._uriComparisonKeyComputers=[]}getUriComparisonKey(e){for(let t of this._uriComparisonKeyComputers)if(t[0]===e.scheme)return t[1].getComparisonKey(e);return e.toString()}_print(e){console.log(`------------------------------------`),console.log(`AFTER ${e}: `);let t=[];for(let e of this._editStacks)t.push(e[1].toString());console.log(t.join(`
@@ -1,4 +1,4 @@
1
- import{v as e}from"./reactivity.esm-bundler-DEJj9cFv.js";import{C as t,J as n,b as r,i,l as a}from"./runtime-core.esm-bundler-CDnVUfeZ.js";import{J as o,Q as s,S as c,X as l,Y as u,at as d,ct as f,et as p,h as m,nt as h,q as g,y as _}from"./QBtn-CZaBclNw.js";import{C as ee}from"./use-id-BIuaWKkB.js";import{k as v}from"./index-CIP08MpU.js";import{a as y,o as b}from"./QSelect-BrSemS3o.js";import{u as x}from"./permissionModes-CVFHS2ec.js";import{p as S}from"./use-tours-DhLhglwr.js";x(`superpowers`);function C(e,t){let n=["1. Call `kobo__list_tasks` FIRST to inspect any pre-existing tasks (they may have been seeded from Notion, a template, or the CreatePage form).","2. If tasks already exist: DO NOT delete or recreate them from scratch. Read each one, judge whether it is atomic and implementable in one session with clear completion criteria. Improve them in place:\n - Use `kobo__update_task` to rename unclear titles, add completion criteria, or flip `is_acceptance_criterion` when needed.\n - Use `kobo__create_task` to SPLIT a task that is too large into smaller atomic pieces (keep the original only if it still makes sense, otherwise update it to one of the split pieces and create the rest).\n - Use `kobo__create_task` to ADD missing acceptance criteria or missing implementation steps the plan requires.","3. If no tasks exist:\n - If a plan file exists in `docs/superpowers/plans/` or similar, read it and derive the task list from it.\n - If no plan exists, ask the user what the workspace goal is and propose tasks accordingly.\n - Create the tasks via `kobo__create_task`. For each task, decide `is_acceptance_criterion` appropriately."],r=4;if(e.framework){let t=e.skill?`Use the \`${e.skill}\` skill for this task. `:``,i=e.prompt?`Additional guidance: ${e.prompt}`:``;n.push(`${r}. **E2E review**: walk the task list and identify which tasks produce user-visible behavior (UI flows, form submissions, page renders, etc.). For each one that warrants regression coverage, INSERT a follow-up sub-task with title prefixed \`[E2E] \` describing the test to write. Place it in \`sort_order\` directly after the parent task. Skip tasks that don't produce user-visible behavior (refactors, infra, internal services) and briefly justify your choices in chat. The project uses \`${e.framework}\`. ${t}${i}`.trim()),r++}return t.prompt&&(n.push(`${r}. **Finalization task**: create ONE task with title prefixed \`[FINAL] <descriptive title>\`. Place it at the END of the task list (sort_order = max + 1, AFTER any [E2E] tasks). The agent will execute this task using the project's finalization prompt — do NOT inline the prompt content into the task title or description.`),r++),n.push(`${r}. Call \`kobo__mark_auto_loop_ready\`. This will automatically start the auto-loop, which will pick up the tasks one by one in fresh sessions.`),n.join(`
1
+ import{v as e}from"./reactivity.esm-bundler-DEJj9cFv.js";import{C as t,J as n,b as r,i,l as a}from"./runtime-core.esm-bundler-CDnVUfeZ.js";import{J as o,Q as s,S as c,X as l,Y as u,at as d,ct as f,et as p,h as m,nt as h,q as g,y as _}from"./QBtn-CZaBclNw.js";import{C as ee}from"./use-id-BIuaWKkB.js";import{k as v}from"./index-DcwcFDrZ.js";import{a as y,o as b}from"./QSelect-Bodml89k.js";import{u as x}from"./permissionModes-DMzFEQhr.js";import{p as S}from"./use-tours-C8x2V1w5.js";x(`superpowers`);function C(e,t){let n=["1. Call `kobo__list_tasks` FIRST to inspect any pre-existing tasks (they may have been seeded from Notion, a template, or the CreatePage form).","2. If tasks already exist: DO NOT delete or recreate them from scratch. Read each one, judge whether it is atomic and implementable in one session with clear completion criteria. Improve them in place:\n - Use `kobo__update_task` to rename unclear titles, add completion criteria, or flip `is_acceptance_criterion` when needed.\n - Use `kobo__create_task` to SPLIT a task that is too large into smaller atomic pieces (keep the original only if it still makes sense, otherwise update it to one of the split pieces and create the rest).\n - Use `kobo__create_task` to ADD missing acceptance criteria or missing implementation steps the plan requires.","3. If no tasks exist:\n - If a plan file exists in `docs/superpowers/plans/` or similar, read it and derive the task list from it.\n - If no plan exists, ask the user what the workspace goal is and propose tasks accordingly.\n - Create the tasks via `kobo__create_task`. For each task, decide `is_acceptance_criterion` appropriately."],r=4;if(e.framework){let t=e.skill?`Use the \`${e.skill}\` skill for this task. `:``,i=e.prompt?`Additional guidance: ${e.prompt}`:``;n.push(`${r}. **E2E review**: walk the task list and identify which tasks produce user-visible behavior (UI flows, form submissions, page renders, etc.). For each one that warrants regression coverage, INSERT a follow-up sub-task with title prefixed \`[E2E] \` describing the test to write. Place it in \`sort_order\` directly after the parent task. Skip tasks that don't produce user-visible behavior (refactors, infra, internal services) and briefly justify your choices in chat. The project uses \`${e.framework}\`. ${t}${i}`.trim()),r++}return t.prompt&&(n.push(`${r}. **Finalization task**: create ONE task with title prefixed \`[FINAL] <descriptive title>\`. Place it at the END of the task list (sort_order = max + 1, AFTER any [E2E] tasks). The agent will execute this task using the project's finalization prompt — do NOT inline the prompt content into the task title or description.`),r++),n.push(`${r}. Call \`kobo__mark_auto_loop_ready\`. This will automatically start the auto-loop, which will pick up the tasks one by one in fresh sessions.`),n.join(`
2
2
  `)}var w=C({framework:``,skill:``,prompt:``},{prompt:``}),T="Hard rules:\n- Do NOT touch any source file. No Edit, no Write, no Bash that changes the repo.\n- Do NOT run `kill`, `pkill`, `killall`, `pgrep -k`, or any process-killing command — you may tear down the Kōbō server itself or sibling dev servers.\n- Do NOT start implementation even if a plan is ready — auto-loop will drive that afterwards, one task per iteration.\n- If the user asks for changes, re-apply via MCP and re-check. Do NOT mark ready until they approve.",E=`Review your progress on the tasks and acceptance criteria. Use the kobo-tasks MCP server: call list_tasks() to check the current status, then update any tasks you have completed using mark_task_done(). Report what is done and what remains.
3
3
 
4
4
  Then suggest concrete next actions. Format them exactly like this so I can click on them:
@@ -1 +1 @@
1
- import{j as e,ut as t}from"./reactivity.esm-bundler-DEJj9cFv.js";import{L as n,Y as r,_ as i,d as a,f as o,g as s,l as c,y as l}from"./runtime-core.esm-bundler-CDnVUfeZ.js";import{y as u}from"./QBtn-CZaBclNw.js";import{f as d,p as f,xt as p}from"./index-CIP08MpU.js";import{t as m}from"./QTooltip-CLCFHW2D.js";import{t as h}from"./QChip-owciRuZu.js";var g=l({__name:`AutoLoopChip`,props:{workspace:{default:null}},setup(l){let u=l,{t:d}=p(),g=f(),_=c(()=>u.workspace??g.selectedWorkspace),v=c(()=>_.value?.id??null),y=c(()=>v.value?g.autoLoopStates[v.value]??null:null),b=c(()=>!!y.value?.auto_loop),x=c(()=>!!y.value?.auto_loop_ready),S=c(()=>v.value!==null&&g.selectedWorkspaceId===v.value),C=c(()=>S.value?g.tasks.filter(e=>e.status===`done`).length:y.value?.tasks_done??0),w=c(()=>S.value?g.tasks.length:y.value?.tasks_total??0);return(c,l)=>b.value&&!x.value?(n(),a(h,{key:0,dense:``,square:``,size:`sm`,color:`primary`,"text-color":`white`,icon:`hourglass_top`,class:`q-ml-sm`},{default:r(()=>[s(t(e(d)(`autoLoop.preparing`))+` `,1),i(m,null,{default:r(()=>[s(t(e(d)(`autoLoop.preparingTooltip`)),1)]),_:1})]),_:1})):b.value?(n(),a(h,{key:1,dense:``,square:``,size:`sm`,color:`amber-9`,"text-color":`white`,icon:`autorenew`,class:`q-ml-sm`},{default:r(()=>[s(t(e(d)(`autoLoop.progress`,{done:C.value,total:w.value})),1)]),_:1})):o(``,!0)}});function _(e,t){if(e===``)return 0;let n=e.toLowerCase(),r=t.toLowerCase(),i=0,a=0,o=-2;for(let e of n){let t=-1;for(let n=a;n<r.length;n++)if(r[n]===e){t=n;break}if(t===-1)return null;i+=t===o+1?5:1;let n=t>0?r[t-1]:``;(t===0||n===`/`||n===`-`||n===`_`||n===`.`)&&(i+=2),o=t,a=t+1}return i-t.length*.01}function v(e,t,n,r=_){if(n<=0)return[];let i=[];for(let a of t){let t=r(e,a);if(t===null||i.length===n&&t<=i[n-1].score)continue;let o=i.length;for(;o>0&&i[o-1].score<t;)o--;i.splice(o,0,{item:a,score:t}),i.length>n&&i.pop()}return i.map(e=>e.item)}var y=new Set([`not-found`,`not-purged`,`workspace-busy`,`worktree-not-owned`,`project-unavailable`,`path-conflict`,`branch-in-use`,`recovery-source-unavailable`,`git-failed`]),b=`https://github.com/loicngr/kobo/blob/develop/CONFIGURATION.md#restoring-a-purged-workspace`;function x(){let e=f(),t=u(),{t:n}=p();async function r(r){if(!e.restoringWorktreeIds.includes(r))try{await e.restoreWorktree(r),t.notify({type:`positive`,message:n(`workspacePage.worktreeRestoreSuccess`),position:`top`})}catch(e){let r=e instanceof d&&e.code&&y.has(e.code)?e.code:`git-failed`;t.notify({type:`negative`,message:n(`workspacePage.restoreError.${r}`),position:`top`,actions:[{label:n(`common.details`),handler:()=>window.open(b,`_blank`,`noopener,noreferrer`)}]})}}return{restoreWorktree:r}}var S={"claude-code":!0,codex:!0};function C(e){return e?S[e]??!0:!0}var w={"claude-code":!0,codex:!0};function T(e){return e?w[e]??!0:!0}var E={"claude-code":!0,codex:!0};function D(e){return e?E[e]??!1:!1}export{_ as a,x as i,T as n,v as o,C as r,g as s,D as t};
1
+ import{j as e,ut as t}from"./reactivity.esm-bundler-DEJj9cFv.js";import{L as n,Y as r,_ as i,d as a,f as o,g as s,l as c,y as l}from"./runtime-core.esm-bundler-CDnVUfeZ.js";import{y as u}from"./QBtn-CZaBclNw.js";import{f as d,p as f,xt as p}from"./index-DcwcFDrZ.js";import{t as m}from"./QTooltip-K-9OdDfq.js";import{t as h}from"./QChip-owciRuZu.js";var g=l({__name:`AutoLoopChip`,props:{workspace:{default:null}},setup(l){let u=l,{t:d}=p(),g=f(),_=c(()=>u.workspace??g.selectedWorkspace),v=c(()=>_.value?.id??null),y=c(()=>v.value?g.autoLoopStates[v.value]??null:null),b=c(()=>!!y.value?.auto_loop),x=c(()=>!!y.value?.auto_loop_ready),S=c(()=>v.value!==null&&g.selectedWorkspaceId===v.value),C=c(()=>S.value?g.tasks.filter(e=>e.status===`done`).length:y.value?.tasks_done??0),w=c(()=>S.value?g.tasks.length:y.value?.tasks_total??0);return(c,l)=>b.value&&!x.value?(n(),a(h,{key:0,dense:``,square:``,size:`sm`,color:`primary`,"text-color":`white`,icon:`hourglass_top`,class:`q-ml-sm`},{default:r(()=>[s(t(e(d)(`autoLoop.preparing`))+` `,1),i(m,null,{default:r(()=>[s(t(e(d)(`autoLoop.preparingTooltip`)),1)]),_:1})]),_:1})):b.value?(n(),a(h,{key:1,dense:``,square:``,size:`sm`,color:`amber-9`,"text-color":`white`,icon:`autorenew`,class:`q-ml-sm`},{default:r(()=>[s(t(e(d)(`autoLoop.progress`,{done:C.value,total:w.value})),1)]),_:1})):o(``,!0)}});function _(e,t){if(e===``)return 0;let n=e.toLowerCase(),r=t.toLowerCase(),i=0,a=0,o=-2;for(let e of n){let t=-1;for(let n=a;n<r.length;n++)if(r[n]===e){t=n;break}if(t===-1)return null;i+=t===o+1?5:1;let n=t>0?r[t-1]:``;(t===0||n===`/`||n===`-`||n===`_`||n===`.`)&&(i+=2),o=t,a=t+1}return i-t.length*.01}function v(e,t,n,r=_){if(n<=0)return[];let i=[];for(let a of t){let t=r(e,a);if(t===null||i.length===n&&t<=i[n-1].score)continue;let o=i.length;for(;o>0&&i[o-1].score<t;)o--;i.splice(o,0,{item:a,score:t}),i.length>n&&i.pop()}return i.map(e=>e.item)}var y=new Set([`not-found`,`not-purged`,`workspace-busy`,`worktree-not-owned`,`project-unavailable`,`path-conflict`,`branch-in-use`,`recovery-source-unavailable`,`git-failed`]),b=`https://github.com/loicngr/kobo/blob/develop/CONFIGURATION.md#restoring-a-purged-workspace`;function x(){let e=f(),t=u(),{t:n}=p();async function r(r){if(!e.restoringWorktreeIds.includes(r))try{await e.restoreWorktree(r),t.notify({type:`positive`,message:n(`workspacePage.worktreeRestoreSuccess`),position:`top`})}catch(e){let r=e instanceof d&&e.code&&y.has(e.code)?e.code:`git-failed`;t.notify({type:`negative`,message:n(`workspacePage.restoreError.${r}`),position:`top`,actions:[{label:n(`common.details`),handler:()=>window.open(b,`_blank`,`noopener,noreferrer`)}]})}}return{restoreWorktree:r}}var S={"claude-code":!0,codex:!0};function C(e){return e?S[e]??!0:!0}var w={"claude-code":!0,codex:!0};function T(e){return e?w[e]??!0:!0}var E={"claude-code":!0,codex:!0};function D(e){return e?E[e]??!1:!1}export{_ as a,x as i,T as n,v as o,C as r,g as s,D as t};
@@ -1 +1 @@
1
- import{S as e,j as t,ot as n,ut as r,v as i}from"./reactivity.esm-bundler-DEJj9cFv.js";import{C as a,J as o,L as s,R as c,T as l,X as u,_ as d,f,i as p,l as m,p as h,r as g,u as _,y as v,z as y}from"./runtime-core.esm-bundler-CDnVUfeZ.js";import{P as b,S as x,b as S,c as C,et as w,l as T,pt as E,tt as D,y as O,z as k}from"./QBtn-CZaBclNw.js";import{a as A,i as j}from"./pinia-BKqmoVru.js";import{ot as ee,xt as M}from"./index-CIP08MpU.js";import{f as N}from"./permissionModes-CVFHS2ec.js";import{a as P}from"./use-tours-DhLhglwr.js";import{a as F,i as I,n as L,o as R,r as z,s as B}from"./efforts-LrtJPx-j.js";function V(e){e.keyCode===32&&w(e)}var H=D({name:`StepHeader`,props:{stepper:{},step:{},goToPanel:Function},setup(t,{attrs:n}){let r=O(),i=e(null),o=m(()=>t.stepper.modelValue===t.step.name),s=m(()=>{let e=t.step.disable;return e===!0||e===``}),c=m(()=>{let e=t.step.error;return e===!0||e===``}),l=m(()=>{let e=t.step.done;return!s.value&&(e===!0||e===``)}),d=m(()=>{let e=t.step.headerNav;return t.stepper.headerNav===!0&&(e===!0||e===``||e===void 0)}),f=m(()=>!s.value&&d.value),p=m(()=>t.step.prefix&&(!o.value||t.stepper.activeIcon===`none`)&&(!c.value||t.stepper.errorIcon===`none`)&&(!l.value||t.stepper.doneIcon===`none`)),h=m(()=>{let e=t.step.icon||t.stepper.inactiveIcon;if(o.value){let n=t.step.activeIcon||t.stepper.activeIcon;return n===`none`?e:n||r.iconSet.stepper.active}if(c.value){let n=t.step.errorIcon||t.stepper.errorIcon;return n===`none`?e:n||r.iconSet.stepper.error}if(!s.value&&l.value){let n=t.step.doneIcon||t.stepper.doneIcon;return n===`none`?e:n||r.iconSet.stepper.done}return e}),g=m(()=>{let e=c.value?t.step.errorColor||t.stepper.errorColor:void 0;if(o.value){let n=t.step.activeColor||t.stepper.activeColor||t.step.color;return n===void 0?e:n}return e===void 0?!s.value&&l.value?t.step.doneColor||t.stepper.doneColor||t.step.color||t.stepper.inactiveColor:t.step.color||t.stepper.inactiveColor:e}),_=m(()=>`q-stepper__tab col-grow flex items-center no-wrap relative-position`+(g.value===void 0?``:` text-${g.value}`)+(c.value?` q-stepper__tab--error q-stepper__tab--error-with-`+(p.value?`prefix`:`icon`):``)+(o.value?` q-stepper__tab--active`:``)+(l.value?` q-stepper__tab--done`:``)+(f.value?` q-stepper__tab--navigation q-focusable q-hoverable`:``)+(s.value?` q-stepper__tab--disabled`:``)),v=m(()=>t.stepper.headerNav&&f.value);function y(){i.value?.focus({preventScroll:!0}),o.value||t.goToPanel(t.step.name)}function b(e){[13,32].includes(e.keyCode)&&(o.value||t.goToPanel(t.step.name),w(e))}return()=>{let e={class:_.value,"aria-current":o.value?`step`:void 0};d.value&&(e.role=`button`,s.value?(e.tabindex=-1,e[`aria-disabled`]=`true`):(e.onClick=y,e.onKeydown=V,e.onKeyup=b,e.tabindex=n.tabindex||0));let r=[a(`div`,{class:`q-focus-helper`,tabindex:-1,ref:i}),a(`div`,{class:`q-stepper__dot row flex-center q-stepper__line relative-position`},[a(`span`,{class:`row flex-center`},[p.value?t.step.prefix:a(T,{name:h.value})])])];if(t.step.title!==void 0&&t.step.title!==null){let e=[a(`div`,{class:`q-stepper__title`},t.step.title)];t.step.caption!==void 0&&t.step.caption!==null&&e.push(a(`div`,{class:`q-stepper__caption`},t.step.caption)),r.push(a(`div`,{class:`q-stepper__label q-stepper__line relative-position`},e))}return u(a(`div`,e,r),[[C,v.value]])}}});function U(e){return a(`div`,{class:`q-stepper__step-content`},[a(`div`,{class:`q-stepper__step-inner`},x(e.default))])}var W={setup(e,{slots:t}){return()=>U(t)}},G=D({name:`QStep`,props:{...z,icon:String,color:String,title:{type:String,required:!0},caption:String,prefix:[String,Number],doneIcon:String,doneColor:String,activeIcon:String,activeColor:String,errorIcon:String,errorColor:String,headerNav:{type:Boolean,default:!0},done:Boolean,error:Boolean,onScroll:[Function,Array]},setup(t,{slots:n,emit:r}){let i=O(),o=l(k,b);if(o===b)return console.error(`QStep needs to be a child of QStepper`),b;let{getCache:s}=R(),c=e(null),u=m(()=>o.value.modelValue===t.name),d=m(()=>!i.platform.is.ios&&i.platform.is.chrome||!u.value||!o.value.vertical?{}:{onScroll(e){let{target:n}=e;n.scrollTop>0&&(n.scrollTop=0),t.onScroll!==void 0&&r(`scroll`,e)}}),f=m(()=>typeof t.name==`string`||typeof t.name==`number`?t.name:String(t.name));function h(){let e=o.value.vertical;return e&&o.value.keepAlive?a(p,o.value.keepAliveProps.value,u.value?[a(o.value.needsUniqueKeepAliveWrapper.value?s(f.value,()=>({...W,name:f.value})):W,{key:f.value},n.default)]:void 0):!e||u.value?U(n):void 0}return()=>a(`div`,{ref:c,class:`q-stepper__step`,role:`group`,"aria-label":t.title,...d.value},o.value.vertical?[a(H,{stepper:o.value,step:t,goToPanel:o.value.goToPanel}),o.value.animated?a(N,h):h()]:[h()])}}),K=/(-\w)/g;function q(e){let t={};for(let n in e){let r=n.replace(K,e=>e[1].toUpperCase());t[r]=e[n]}return t}var te=D({name:`QStepper`,props:{...A,...F,flat:Boolean,bordered:Boolean,alternativeLabels:Boolean,headerNav:Boolean,contracted:Boolean,headerClass:String,inactiveColor:String,inactiveIcon:String,doneIcon:String,doneColor:String,activeIcon:String,activeColor:String,errorIcon:String,errorColor:String},emits:I,setup(e,{slots:t}){let n=O(),r=j(e,n),{updatePanelsList:i,isValidPanelName:o,updatePanelIndex:s,getPanelContent:l,getPanels:d,panelDirectives:f,goToPanel:p,keepAliveProps:h,needsUniqueKeepAliveWrapper:g}=L();c(k,m(()=>({goToPanel:p,keepAliveProps:h,needsUniqueKeepAliveWrapper:g,...e})));let _=m(()=>`q-stepper q-stepper--${e.vertical?`vertical`:`horizontal`}`+(e.flat?` q-stepper--flat`:``)+(e.bordered?` q-stepper--bordered`:``)+(r()?` q-stepper--dark q-dark`:``)),v=m(()=>`q-stepper__header row items-stretch justify-between q-stepper__header--${e.alternativeLabels?`alternative`:`standard`}-labels`+(e.bordered||!e.flat?` q-stepper__header--border`:``)+(e.contracted?` q-stepper__header--contracted`:``)+(e.headerClass===void 0?``:` ${e.headerClass}`));function y(){let n=x(t.message,[]);if(e.vertical){o(e.modelValue)&&s();let r=a(`div`,{class:`q-stepper__content`},x(t.default));return n===void 0?[r]:n.concat(r)}return[a(`div`,{class:v.value},d().map(t=>{let n=q(t.props);return a(H,{key:n.name,stepper:e,step:n,goToPanel:p})})),n,u(a(`div`,{class:`q-stepper__content q-panel-parent`},l()),f.value)]}return()=>(i(t),a(`div`,{class:_.value},S(t.navigation,y())))}}),J={class:`slash-suggestions rounded-borders`},Y={class:`slash-section-header`},X=[`onMousedown`],Z={class:`slash-name text-caption`},Q={class:`slash-section-header`},ne=[`onMousedown`],re={class:`slash-name text-caption`},ie={key:0,class:`slash-description text-caption text-kobo-3 q-ml-xs`},ae={class:`slash-section-header`},oe=[`onMousedown`],$={class:`slash-name text-caption`},se={key:0,class:`slash-description text-caption text-kobo-3 q-ml-xs`},ce=P(v({__name:`SlashSuggestionsPopup`,props:{groupedDropdown:{},flatDropdown:{},selectedIndex:{}},emits:[`select`],setup(e,{emit:i}){let{t:a}=M(),o=i;function c(e){let t=B[`/${e}`];if(!t)return``;let n=t.descriptionKey,r=a(n);return r===n?``:r}return(i,l)=>(s(),h(`div`,J,[e.groupedDropdown.skills.length>0?(s(),h(g,{key:0},[_(`div`,Y,r(t(a)(`chatInput.dropdownSkills`)),1),(s(!0),h(g,null,y(e.groupedDropdown.skills,t=>(s(),h(`div`,{key:`skill-${t.name}`,class:n([`slash-item row items-center q-px-sm q-py-xs cursor-pointer`,{"slash-item--active":e.flatDropdown.indexOf(t)===e.selectedIndex}]),onMousedown:E(e=>o(`select`,t),[`prevent`])},[d(T,{name:`bolt`,size:`12px`,color:`primary`,class:`q-mr-xs`}),_(`span`,Z,r(t.name),1)],42,X))),128))],64)):f(``,!0),e.groupedDropdown.kobo.length>0?(s(),h(g,{key:1},[_(`div`,Q,r(t(a)(`chatInput.dropdownKobo`)),1),(s(!0),h(g,null,y(e.groupedDropdown.kobo,t=>(s(),h(`div`,{key:`kobo-${t.name}`,class:n([`slash-item row items-center q-px-sm q-py-xs cursor-pointer`,{"slash-item--active":e.flatDropdown.indexOf(t)===e.selectedIndex}]),onMousedown:E(e=>o(`select`,t),[`prevent`])},[d(T,{name:`terminal`,size:`12px`,color:`teal-4`,class:`q-mr-xs`}),_(`span`,re,`/`+r(t.name),1),c(t.name)?(s(),h(`span`,ie,`— `+r(c(t.name)),1)):f(``,!0)],42,ne))),128))],64)):f(``,!0),e.groupedDropdown.templates.length>0?(s(),h(g,{key:2},[_(`div`,ae,r(t(a)(`chatInput.dropdownTemplates`)),1),(s(!0),h(g,null,y(e.groupedDropdown.templates,t=>(s(),h(`div`,{key:`tpl-${t.name}`,class:n([`slash-item row items-center q-px-sm q-py-xs cursor-pointer`,{"slash-item--active":e.flatDropdown.indexOf(t)===e.selectedIndex}]),onMousedown:E(e=>o(`select`,t),[`prevent`])},[d(T,{name:`description`,size:`12px`,color:`amber-4`,class:`q-mr-xs`}),_(`span`,$,`/`+r(t.name),1),t.description?(s(),h(`span`,se,`— `+r(t.description),1)):f(``,!0)],42,oe))),128))],64)):f(``,!0)]))}}),[[`__scopeId`,`data-v-931c9d69`]]);function le(e,t,n={}){let r=ee(),a=i([]),s=i(!1),c=i(``),l=i(0),u=0;async function d(){let e=Date.now();if(!(e-u<5e3&&a.value.length>0)){u=e;try{let e=await fetch(`/api/skills`);e.ok&&(a.value=await e.json())}catch{}}}function f(){let n=t();if(!n)return null;let r=n.selectionStart??e.value.length,i=e.value.slice(0,r).match(/\/([\w:.-]*)$/);return i?i[1]:null}async function p(){let e=f();e===null?s.value=!1:(await d(),c.value=e,s.value=!0,l.value=0)}function h(){s.value=!1}function g(n){let r=t();if(!r){e.value=n;return}let i=r.selectionStart??e.value.length,a=e.value.slice(0,i),o=e.value.slice(i),s=a.match(/\/[\w:.-]*$/);if(!s){e.value=n;return}let c=s.index??i;e.value=e.value.slice(0,c)+n+o}let _=m(()=>{let e=c.value.toLowerCase(),t=t=>e===``||t.toLowerCase().includes(e);return{skills:a.value.filter(e=>t(e)).map(e=>({type:`skill`,name:e})),kobo:n.excludeKoboCommands?[]:Object.keys(B).map(e=>e.replace(/^\//,``)).filter(e=>t(e)).map(e=>({type:`kobo`,name:e})),templates:r.templates.filter(e=>t(e.slug)).map(e=>({type:`template`,name:e.slug,description:e.description}))}}),v=m(()=>[..._.value.skills,..._.value.kobo,..._.value.templates]);return o(()=>v.value.length,e=>{if(e===0){l.value=0;return}l.value>=e&&(l.value=e-1)}),{skills:a,showSkills:s,skillFilter:c,selectedSkillIndex:l,groupedDropdown:_,flatDropdown:v,fetchSkills:d,detectSlashFragment:p,replaceFragmentWith:g,closeDropdown:h}}function ue(e,t){return e.replace(/\{(\w+)\}/g,(e,n)=>{let r=t[n];return r==null?e:String(r)})}function de(e){let t={};return e.workspace&&(t.workspace_name=e.workspace.name,t.working_branch=e.workspace.workingBranch,t.source_branch=e.workspace.sourceBranch,t.project_path=e.workspace.projectPath,t.worktree_path=e.workspace.worktreePath??`${e.workspace.projectPath}/.worktrees/${e.workspace.workingBranch}`),e.gitStats&&(t.commit_count=e.gitStats.commitCount,t.unpushed_count=e.gitStats.unpushedCount,t.files_changed=e.gitStats.filesChanged,t.insertions=e.gitStats.insertions,t.deletions=e.gitStats.deletions,e.gitStats.prNumber!=null&&(t.pr_number=e.gitStats.prNumber),e.gitStats.prUrl&&(t.pr_url=e.gitStats.prUrl),e.gitStats.prState&&(t.pr_state=e.gitStats.prState)),e.sessionName&&(t.session_name=e.sessionName),t}export{te as a,ce as i,ue as n,G as o,le as r,de as t};
1
+ import{S as e,j as t,ot as n,ut as r,v as i}from"./reactivity.esm-bundler-DEJj9cFv.js";import{C as a,J as o,L as s,R as c,T as l,X as u,_ as d,f,i as p,l as m,p as h,r as g,u as _,y as v,z as y}from"./runtime-core.esm-bundler-CDnVUfeZ.js";import{P as b,S as x,b as S,c as C,et as w,l as T,pt as E,tt as D,y as O,z as k}from"./QBtn-CZaBclNw.js";import{a as A,i as j}from"./pinia-BKqmoVru.js";import{ot as ee,xt as M}from"./index-DcwcFDrZ.js";import{f as N}from"./permissionModes-DMzFEQhr.js";import{a as P}from"./use-tours-C8x2V1w5.js";import{a as F,i as I,n as L,o as R,r as z,s as B}from"./efforts-IB1vPjJQ.js";function V(e){e.keyCode===32&&w(e)}var H=D({name:`StepHeader`,props:{stepper:{},step:{},goToPanel:Function},setup(t,{attrs:n}){let r=O(),i=e(null),o=m(()=>t.stepper.modelValue===t.step.name),s=m(()=>{let e=t.step.disable;return e===!0||e===``}),c=m(()=>{let e=t.step.error;return e===!0||e===``}),l=m(()=>{let e=t.step.done;return!s.value&&(e===!0||e===``)}),d=m(()=>{let e=t.step.headerNav;return t.stepper.headerNav===!0&&(e===!0||e===``||e===void 0)}),f=m(()=>!s.value&&d.value),p=m(()=>t.step.prefix&&(!o.value||t.stepper.activeIcon===`none`)&&(!c.value||t.stepper.errorIcon===`none`)&&(!l.value||t.stepper.doneIcon===`none`)),h=m(()=>{let e=t.step.icon||t.stepper.inactiveIcon;if(o.value){let n=t.step.activeIcon||t.stepper.activeIcon;return n===`none`?e:n||r.iconSet.stepper.active}if(c.value){let n=t.step.errorIcon||t.stepper.errorIcon;return n===`none`?e:n||r.iconSet.stepper.error}if(!s.value&&l.value){let n=t.step.doneIcon||t.stepper.doneIcon;return n===`none`?e:n||r.iconSet.stepper.done}return e}),g=m(()=>{let e=c.value?t.step.errorColor||t.stepper.errorColor:void 0;if(o.value){let n=t.step.activeColor||t.stepper.activeColor||t.step.color;return n===void 0?e:n}return e===void 0?!s.value&&l.value?t.step.doneColor||t.stepper.doneColor||t.step.color||t.stepper.inactiveColor:t.step.color||t.stepper.inactiveColor:e}),_=m(()=>`q-stepper__tab col-grow flex items-center no-wrap relative-position`+(g.value===void 0?``:` text-${g.value}`)+(c.value?` q-stepper__tab--error q-stepper__tab--error-with-`+(p.value?`prefix`:`icon`):``)+(o.value?` q-stepper__tab--active`:``)+(l.value?` q-stepper__tab--done`:``)+(f.value?` q-stepper__tab--navigation q-focusable q-hoverable`:``)+(s.value?` q-stepper__tab--disabled`:``)),v=m(()=>t.stepper.headerNav&&f.value);function y(){i.value?.focus({preventScroll:!0}),o.value||t.goToPanel(t.step.name)}function b(e){[13,32].includes(e.keyCode)&&(o.value||t.goToPanel(t.step.name),w(e))}return()=>{let e={class:_.value,"aria-current":o.value?`step`:void 0};d.value&&(e.role=`button`,s.value?(e.tabindex=-1,e[`aria-disabled`]=`true`):(e.onClick=y,e.onKeydown=V,e.onKeyup=b,e.tabindex=n.tabindex||0));let r=[a(`div`,{class:`q-focus-helper`,tabindex:-1,ref:i}),a(`div`,{class:`q-stepper__dot row flex-center q-stepper__line relative-position`},[a(`span`,{class:`row flex-center`},[p.value?t.step.prefix:a(T,{name:h.value})])])];if(t.step.title!==void 0&&t.step.title!==null){let e=[a(`div`,{class:`q-stepper__title`},t.step.title)];t.step.caption!==void 0&&t.step.caption!==null&&e.push(a(`div`,{class:`q-stepper__caption`},t.step.caption)),r.push(a(`div`,{class:`q-stepper__label q-stepper__line relative-position`},e))}return u(a(`div`,e,r),[[C,v.value]])}}});function U(e){return a(`div`,{class:`q-stepper__step-content`},[a(`div`,{class:`q-stepper__step-inner`},x(e.default))])}var W={setup(e,{slots:t}){return()=>U(t)}},G=D({name:`QStep`,props:{...z,icon:String,color:String,title:{type:String,required:!0},caption:String,prefix:[String,Number],doneIcon:String,doneColor:String,activeIcon:String,activeColor:String,errorIcon:String,errorColor:String,headerNav:{type:Boolean,default:!0},done:Boolean,error:Boolean,onScroll:[Function,Array]},setup(t,{slots:n,emit:r}){let i=O(),o=l(k,b);if(o===b)return console.error(`QStep needs to be a child of QStepper`),b;let{getCache:s}=R(),c=e(null),u=m(()=>o.value.modelValue===t.name),d=m(()=>!i.platform.is.ios&&i.platform.is.chrome||!u.value||!o.value.vertical?{}:{onScroll(e){let{target:n}=e;n.scrollTop>0&&(n.scrollTop=0),t.onScroll!==void 0&&r(`scroll`,e)}}),f=m(()=>typeof t.name==`string`||typeof t.name==`number`?t.name:String(t.name));function h(){let e=o.value.vertical;return e&&o.value.keepAlive?a(p,o.value.keepAliveProps.value,u.value?[a(o.value.needsUniqueKeepAliveWrapper.value?s(f.value,()=>({...W,name:f.value})):W,{key:f.value},n.default)]:void 0):!e||u.value?U(n):void 0}return()=>a(`div`,{ref:c,class:`q-stepper__step`,role:`group`,"aria-label":t.title,...d.value},o.value.vertical?[a(H,{stepper:o.value,step:t,goToPanel:o.value.goToPanel}),o.value.animated?a(N,h):h()]:[h()])}}),K=/(-\w)/g;function q(e){let t={};for(let n in e){let r=n.replace(K,e=>e[1].toUpperCase());t[r]=e[n]}return t}var te=D({name:`QStepper`,props:{...A,...F,flat:Boolean,bordered:Boolean,alternativeLabels:Boolean,headerNav:Boolean,contracted:Boolean,headerClass:String,inactiveColor:String,inactiveIcon:String,doneIcon:String,doneColor:String,activeIcon:String,activeColor:String,errorIcon:String,errorColor:String},emits:I,setup(e,{slots:t}){let n=O(),r=j(e,n),{updatePanelsList:i,isValidPanelName:o,updatePanelIndex:s,getPanelContent:l,getPanels:d,panelDirectives:f,goToPanel:p,keepAliveProps:h,needsUniqueKeepAliveWrapper:g}=L();c(k,m(()=>({goToPanel:p,keepAliveProps:h,needsUniqueKeepAliveWrapper:g,...e})));let _=m(()=>`q-stepper q-stepper--${e.vertical?`vertical`:`horizontal`}`+(e.flat?` q-stepper--flat`:``)+(e.bordered?` q-stepper--bordered`:``)+(r()?` q-stepper--dark q-dark`:``)),v=m(()=>`q-stepper__header row items-stretch justify-between q-stepper__header--${e.alternativeLabels?`alternative`:`standard`}-labels`+(e.bordered||!e.flat?` q-stepper__header--border`:``)+(e.contracted?` q-stepper__header--contracted`:``)+(e.headerClass===void 0?``:` ${e.headerClass}`));function y(){let n=x(t.message,[]);if(e.vertical){o(e.modelValue)&&s();let r=a(`div`,{class:`q-stepper__content`},x(t.default));return n===void 0?[r]:n.concat(r)}return[a(`div`,{class:v.value},d().map(t=>{let n=q(t.props);return a(H,{key:n.name,stepper:e,step:n,goToPanel:p})})),n,u(a(`div`,{class:`q-stepper__content q-panel-parent`},l()),f.value)]}return()=>(i(t),a(`div`,{class:_.value},S(t.navigation,y())))}}),J={class:`slash-suggestions rounded-borders`},Y={class:`slash-section-header`},X=[`onMousedown`],Z={class:`slash-name text-caption`},Q={class:`slash-section-header`},ne=[`onMousedown`],re={class:`slash-name text-caption`},ie={key:0,class:`slash-description text-caption text-kobo-3 q-ml-xs`},ae={class:`slash-section-header`},oe=[`onMousedown`],$={class:`slash-name text-caption`},se={key:0,class:`slash-description text-caption text-kobo-3 q-ml-xs`},ce=P(v({__name:`SlashSuggestionsPopup`,props:{groupedDropdown:{},flatDropdown:{},selectedIndex:{}},emits:[`select`],setup(e,{emit:i}){let{t:a}=M(),o=i;function c(e){let t=B[`/${e}`];if(!t)return``;let n=t.descriptionKey,r=a(n);return r===n?``:r}return(i,l)=>(s(),h(`div`,J,[e.groupedDropdown.skills.length>0?(s(),h(g,{key:0},[_(`div`,Y,r(t(a)(`chatInput.dropdownSkills`)),1),(s(!0),h(g,null,y(e.groupedDropdown.skills,t=>(s(),h(`div`,{key:`skill-${t.name}`,class:n([`slash-item row items-center q-px-sm q-py-xs cursor-pointer`,{"slash-item--active":e.flatDropdown.indexOf(t)===e.selectedIndex}]),onMousedown:E(e=>o(`select`,t),[`prevent`])},[d(T,{name:`bolt`,size:`12px`,color:`primary`,class:`q-mr-xs`}),_(`span`,Z,r(t.name),1)],42,X))),128))],64)):f(``,!0),e.groupedDropdown.kobo.length>0?(s(),h(g,{key:1},[_(`div`,Q,r(t(a)(`chatInput.dropdownKobo`)),1),(s(!0),h(g,null,y(e.groupedDropdown.kobo,t=>(s(),h(`div`,{key:`kobo-${t.name}`,class:n([`slash-item row items-center q-px-sm q-py-xs cursor-pointer`,{"slash-item--active":e.flatDropdown.indexOf(t)===e.selectedIndex}]),onMousedown:E(e=>o(`select`,t),[`prevent`])},[d(T,{name:`terminal`,size:`12px`,color:`teal-4`,class:`q-mr-xs`}),_(`span`,re,`/`+r(t.name),1),c(t.name)?(s(),h(`span`,ie,`— `+r(c(t.name)),1)):f(``,!0)],42,ne))),128))],64)):f(``,!0),e.groupedDropdown.templates.length>0?(s(),h(g,{key:2},[_(`div`,ae,r(t(a)(`chatInput.dropdownTemplates`)),1),(s(!0),h(g,null,y(e.groupedDropdown.templates,t=>(s(),h(`div`,{key:`tpl-${t.name}`,class:n([`slash-item row items-center q-px-sm q-py-xs cursor-pointer`,{"slash-item--active":e.flatDropdown.indexOf(t)===e.selectedIndex}]),onMousedown:E(e=>o(`select`,t),[`prevent`])},[d(T,{name:`description`,size:`12px`,color:`amber-4`,class:`q-mr-xs`}),_(`span`,$,`/`+r(t.name),1),t.description?(s(),h(`span`,se,`— `+r(t.description),1)):f(``,!0)],42,oe))),128))],64)):f(``,!0)]))}}),[[`__scopeId`,`data-v-931c9d69`]]);function le(e,t,n={}){let r=ee(),a=i([]),s=i(!1),c=i(``),l=i(0),u=0;async function d(){let e=Date.now();if(!(e-u<5e3&&a.value.length>0)){u=e;try{let e=await fetch(`/api/skills`);e.ok&&(a.value=await e.json())}catch{}}}function f(){let n=t();if(!n)return null;let r=n.selectionStart??e.value.length,i=e.value.slice(0,r).match(/\/([\w:.-]*)$/);return i?i[1]:null}async function p(){let e=f();e===null?s.value=!1:(await d(),c.value=e,s.value=!0,l.value=0)}function h(){s.value=!1}function g(n){let r=t();if(!r){e.value=n;return}let i=r.selectionStart??e.value.length,a=e.value.slice(0,i),o=e.value.slice(i),s=a.match(/\/[\w:.-]*$/);if(!s){e.value=n;return}let c=s.index??i;e.value=e.value.slice(0,c)+n+o}let _=m(()=>{let e=c.value.toLowerCase(),t=t=>e===``||t.toLowerCase().includes(e);return{skills:a.value.filter(e=>t(e)).map(e=>({type:`skill`,name:e})),kobo:n.excludeKoboCommands?[]:Object.keys(B).map(e=>e.replace(/^\//,``)).filter(e=>t(e)).map(e=>({type:`kobo`,name:e})),templates:r.templates.filter(e=>t(e.slug)).map(e=>({type:`template`,name:e.slug,description:e.description}))}}),v=m(()=>[..._.value.skills,..._.value.kobo,..._.value.templates]);return o(()=>v.value.length,e=>{if(e===0){l.value=0;return}l.value>=e&&(l.value=e-1)}),{skills:a,showSkills:s,skillFilter:c,selectedSkillIndex:l,groupedDropdown:_,flatDropdown:v,fetchSkills:d,detectSlashFragment:p,replaceFragmentWith:g,closeDropdown:h}}function ue(e,t){return e.replace(/\{(\w+)\}/g,(e,n)=>{let r=t[n];return r==null?e:String(r)})}function de(e){let t={};return e.workspace&&(t.workspace_name=e.workspace.name,t.working_branch=e.workspace.workingBranch,t.source_branch=e.workspace.sourceBranch,t.project_path=e.workspace.projectPath,t.worktree_path=e.workspace.worktreePath??`${e.workspace.projectPath}/.worktrees/${e.workspace.workingBranch}`),e.gitStats&&(t.commit_count=e.gitStats.commitCount,t.unpushed_count=e.gitStats.unpushedCount,t.files_changed=e.gitStats.filesChanged,t.insertions=e.gitStats.insertions,t.deletions=e.gitStats.deletions,e.gitStats.prNumber!=null&&(t.pr_number=e.gitStats.prNumber),e.gitStats.prUrl&&(t.pr_url=e.gitStats.prUrl),e.gitStats.prState&&(t.pr_state=e.gitStats.prState)),e.sessionName&&(t.session_name=e.sessionName),t}export{te as a,ce as i,ue as n,G as o,le as r,de as t};
@@ -1,4 +1,4 @@
1
- import{St as e,rt as t}from"./index-CIP08MpU.js";var n;function r(e){if(e.length===0)throw Error(`Invalid tail call`);return[e.slice(0,e.length-1),e[e.length-1]]}function i(e,t,n=(e,t)=>e===t){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!n(e[r],t[r]))return!1;return!0}function a(e,t){let n=e.length-1;t<n&&(e[t]=e[n]),e.pop()}function o(e,t,n){return s(e.length,r=>n(e[r],t))}function s(e,t){let n=0,r=e-1;for(;n<=r;){let e=(n+r)/2|0,i=t(e);if(i<0)n=e+1;else if(i>0)r=e-1;else return e}return-(n+1)}function c(e,t,n){if(e|=0,e>=t.length)throw TypeError(`invalid index`);let r=t[Math.floor(t.length*Math.random())],i=[],a=[],o=[];for(let e of t){let t=n(e,r);t<0?i.push(e):t>0?a.push(e):o.push(e)}return e<i.length?c(e,i,n):e<i.length+o.length?o[0]:c(e-(i.length+o.length),a,n)}function l(e,t){let n=[],r;for(let i of e.slice(0).sort(t))!r||t(r[0],i)!==0?(r=[i],n.push(r)):r.push(i);return n}function*u(e,t){let n,r;for(let i of e)r!==void 0&&t(r,i)?n.push(i):(n&&(yield n),n=[i]),r=i;n&&(yield n)}function d(e,t){for(let n=0;n<=e.length;n++)t(n===0?void 0:e[n-1],n===e.length?void 0:e[n])}function f(e,t){for(let n=0;n<e.length;n++)t(n===0?void 0:e[n-1],e[n],n+1===e.length?void 0:e[n+1])}function p(e){return e.filter(e=>!!e)}function m(e){let t=0;for(let n=0;n<e.length;n++)e[n]&&(e[t]=e[n],t+=1);e.length=t}function h(e){return!Array.isArray(e)||e.length===0}function g(e){return Array.isArray(e)&&e.length>0}function _(e,t=e=>e){let n=new Set;return e.filter(e=>{let r=t(e);return!n.has(r)&&(n.add(r),!0)})}function v(e,t){let n=typeof t==`number`?e:0;typeof t==`number`?n=e:(n=0,t=e);let r=[];if(n<=t)for(let e=n;e<t;e++)r.push(e);else for(let e=n;e>t;e--)r.push(e);return r}function y(e,t,n){let r=e.slice(0,t),i=e.slice(t);return r.concat(n,i)}function b(e,t){let n=e.indexOf(t);n>-1&&(e.splice(n,1),e.unshift(t))}function x(e,t){let n=e.indexOf(t);n>-1&&(e.splice(n,1),e.push(t))}function S(e,t){for(let n of t)e.push(n)}function C(e,t){let n=[];for(let r of e){let e=t(r);e!==void 0&&n.push(e)}return n}function w(e){return Array.isArray(e)?e:[e]}function ee(e,t,n){let r=ne(e,t),i=e.length,a=n.length;e.length=i+a;for(let t=i-1;t>=r;t--)e[t+a]=e[t];for(let t=0;t<a;t++)e[t+r]=n[t]}function te(e,t,n,r){let i=ne(e,t),a=e.splice(i,n);return a===void 0&&(a=[]),ee(e,i,r),a}function ne(e,t){return t<0?Math.max(t+e.length,0):Math.min(t,e.length)}var re;(function(e){function t(e){return e<0}e.isLessThan=t;function n(e){return e<=0}e.isLessThanOrEqual=n;function r(e){return e>0}e.isGreaterThan=r;function i(e){return e===0}e.isNeitherLessOrGreaterThan=i,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(re||={});function ie(e,t){return(n,r)=>t(e(n),e(r))}function ae(...e){return(t,n)=>{for(let r of e){let e=r(t,n);if(!re.isNeitherLessOrGreaterThan(e))return e}return re.neitherLessOrGreaterThan}}var oe=(e,t)=>e-t,se=(e,t)=>oe(+!!e,+!!t);function ce(e){return(t,n)=>-e(t,n)}function le(e){return(t,n)=>t===void 0?n===void 0?re.neitherLessOrGreaterThan:re.lessThan:n===void 0?re.greaterThan:e(t,n)}var ue=class{constructor(e){this.firstIdx=0,this.items=e,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let t=this.firstIdx;for(;t<this.items.length&&e(this.items[t]);)t++;let n=t===this.firstIdx?null:this.items.slice(this.firstIdx,t);return this.firstIdx=t,n}peek(){if(this.length!==0)return this.items[this.firstIdx]}dequeue(){let e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){let t=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,t}},de=class e{constructor(e){this.iterate=e}toArray(){let e=[];return this.iterate(t=>(e.push(t),!0)),e}filter(t){return new e(e=>this.iterate(n=>!t(n)||e(n)))}map(t){return new e(e=>this.iterate(n=>e(t(n))))}findLast(e){let t;return this.iterate(n=>(e(n)&&(t=n),!0)),t}findLastMaxBy(e){let t,n=!0;return this.iterate(r=>((n||re.isGreaterThan(e(r,t)))&&(n=!1,t=r),!0)),t}};n=de,n.empty=new n(e=>{});var fe=class e{constructor(e){this._indexMap=e}static createSortPermutation(t,n){let r=Array.from(t.keys()).sort((e,r)=>n(t[e],t[r]));return new e(r)}apply(e){return e.map((t,n)=>e[this._indexMap[n]])}inverse(){let t=this._indexMap.slice();for(let e=0;e<this._indexMap.length;e++)t[this._indexMap[e]]=e;return new e(t)}};function pe(e){return e.reduce((e,t)=>e+t,0)}var me=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?Ee.isErrorNoTelemetry(e)?new Ee(e.message+`
1
+ import{St as e,rt as t}from"./index-DcwcFDrZ.js";var n;function r(e){if(e.length===0)throw Error(`Invalid tail call`);return[e.slice(0,e.length-1),e[e.length-1]]}function i(e,t,n=(e,t)=>e===t){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!n(e[r],t[r]))return!1;return!0}function a(e,t){let n=e.length-1;t<n&&(e[t]=e[n]),e.pop()}function o(e,t,n){return s(e.length,r=>n(e[r],t))}function s(e,t){let n=0,r=e-1;for(;n<=r;){let e=(n+r)/2|0,i=t(e);if(i<0)n=e+1;else if(i>0)r=e-1;else return e}return-(n+1)}function c(e,t,n){if(e|=0,e>=t.length)throw TypeError(`invalid index`);let r=t[Math.floor(t.length*Math.random())],i=[],a=[],o=[];for(let e of t){let t=n(e,r);t<0?i.push(e):t>0?a.push(e):o.push(e)}return e<i.length?c(e,i,n):e<i.length+o.length?o[0]:c(e-(i.length+o.length),a,n)}function l(e,t){let n=[],r;for(let i of e.slice(0).sort(t))!r||t(r[0],i)!==0?(r=[i],n.push(r)):r.push(i);return n}function*u(e,t){let n,r;for(let i of e)r!==void 0&&t(r,i)?n.push(i):(n&&(yield n),n=[i]),r=i;n&&(yield n)}function d(e,t){for(let n=0;n<=e.length;n++)t(n===0?void 0:e[n-1],n===e.length?void 0:e[n])}function f(e,t){for(let n=0;n<e.length;n++)t(n===0?void 0:e[n-1],e[n],n+1===e.length?void 0:e[n+1])}function p(e){return e.filter(e=>!!e)}function m(e){let t=0;for(let n=0;n<e.length;n++)e[n]&&(e[t]=e[n],t+=1);e.length=t}function h(e){return!Array.isArray(e)||e.length===0}function g(e){return Array.isArray(e)&&e.length>0}function _(e,t=e=>e){let n=new Set;return e.filter(e=>{let r=t(e);return!n.has(r)&&(n.add(r),!0)})}function v(e,t){let n=typeof t==`number`?e:0;typeof t==`number`?n=e:(n=0,t=e);let r=[];if(n<=t)for(let e=n;e<t;e++)r.push(e);else for(let e=n;e>t;e--)r.push(e);return r}function y(e,t,n){let r=e.slice(0,t),i=e.slice(t);return r.concat(n,i)}function b(e,t){let n=e.indexOf(t);n>-1&&(e.splice(n,1),e.unshift(t))}function x(e,t){let n=e.indexOf(t);n>-1&&(e.splice(n,1),e.push(t))}function S(e,t){for(let n of t)e.push(n)}function C(e,t){let n=[];for(let r of e){let e=t(r);e!==void 0&&n.push(e)}return n}function w(e){return Array.isArray(e)?e:[e]}function ee(e,t,n){let r=ne(e,t),i=e.length,a=n.length;e.length=i+a;for(let t=i-1;t>=r;t--)e[t+a]=e[t];for(let t=0;t<a;t++)e[t+r]=n[t]}function te(e,t,n,r){let i=ne(e,t),a=e.splice(i,n);return a===void 0&&(a=[]),ee(e,i,r),a}function ne(e,t){return t<0?Math.max(t+e.length,0):Math.min(t,e.length)}var re;(function(e){function t(e){return e<0}e.isLessThan=t;function n(e){return e<=0}e.isLessThanOrEqual=n;function r(e){return e>0}e.isGreaterThan=r;function i(e){return e===0}e.isNeitherLessOrGreaterThan=i,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(re||={});function ie(e,t){return(n,r)=>t(e(n),e(r))}function ae(...e){return(t,n)=>{for(let r of e){let e=r(t,n);if(!re.isNeitherLessOrGreaterThan(e))return e}return re.neitherLessOrGreaterThan}}var oe=(e,t)=>e-t,se=(e,t)=>oe(+!!e,+!!t);function ce(e){return(t,n)=>-e(t,n)}function le(e){return(t,n)=>t===void 0?n===void 0?re.neitherLessOrGreaterThan:re.lessThan:n===void 0?re.greaterThan:e(t,n)}var ue=class{constructor(e){this.firstIdx=0,this.items=e,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let t=this.firstIdx;for(;t<this.items.length&&e(this.items[t]);)t++;let n=t===this.firstIdx?null:this.items.slice(this.firstIdx,t);return this.firstIdx=t,n}peek(){if(this.length!==0)return this.items[this.firstIdx]}dequeue(){let e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){let t=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,t}},de=class e{constructor(e){this.iterate=e}toArray(){let e=[];return this.iterate(t=>(e.push(t),!0)),e}filter(t){return new e(e=>this.iterate(n=>!t(n)||e(n)))}map(t){return new e(e=>this.iterate(n=>e(t(n))))}findLast(e){let t;return this.iterate(n=>(e(n)&&(t=n),!0)),t}findLastMaxBy(e){let t,n=!0;return this.iterate(r=>((n||re.isGreaterThan(e(r,t)))&&(n=!1,t=r),!0)),t}};n=de,n.empty=new n(e=>{});var fe=class e{constructor(e){this._indexMap=e}static createSortPermutation(t,n){let r=Array.from(t.keys()).sort((e,r)=>n(t[e],t[r]));return new e(r)}apply(e){return e.map((t,n)=>e[this._indexMap[n]])}inverse(){let t=this._indexMap.slice();for(let e=0;e<this._indexMap.length;e++)t[this._indexMap[e]]=e;return new e(t)}};function pe(e){return e.reduce((e,t)=>e+t,0)}var me=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?Ee.isErrorNoTelemetry(e)?new Ee(e.message+`
2
2
 
3
3
  `+e.stack):Error(e.message+`
4
4
 
@@ -1 +1 @@
1
- import{xt as e}from"./index-CIP08MpU.js";function t(){let{t}=e();function n(e){let n=typeof e==`string`?new Date(e).getTime():e.getTime(),r=Date.now()-n,i=Math.floor(r/6e4);if(i<1)return t(`common.justNow`);if(i<60)return t(`common.minutesAgo`,{count:i});let a=Math.floor(i/60);if(a<24)return t(`common.hoursAgo`,{count:a});let o=Math.floor(a/24);return t(`common.daysAgo`,{count:o})}return{timeAgo:n}}export{t};
1
+ import{xt as e}from"./index-DcwcFDrZ.js";function t(){let{t}=e();function n(e){let n=typeof e==`string`?new Date(e).getTime():e.getTime(),r=Date.now()-n,i=Math.floor(r/6e4);if(i<1)return t(`common.justNow`);if(i<60)return t(`common.minutesAgo`,{count:i});let a=Math.floor(i/60);if(a<24)return t(`common.hoursAgo`,{count:a});let o=Math.floor(a/24);return t(`common.daysAgo`,{count:o})}return{timeAgo:n}}export{t};
@@ -1,3 +1,3 @@
1
- import{n as e}from"./editor.api-DZ9WO_J7.js";var t=[`assign`,`flush`,`ftl`,`return`,`global`,`import`,`include`,`break`,`continue`,`local`,`nested`,`nt`,`setting`,`stop`,`t`,`lt`,`rt`,`fallback`],n=[`attempt`,`autoesc`,`autoEsc`,`compress`,`comment`,`escape`,`noescape`,`function`,`if`,`list`,`items`,`sep`,`macro`,`noparse`,`noParse`,`noautoesc`,`noAutoEsc`,`outputformat`,`switch`,`visit`,`recurse`],r={close:`>`,id:`angle`,open:`<`},i={close:`\\]`,id:`bracket`,open:`\\[`},a={close:`[>\\]]`,id:`auto`,open:`[<\\[]`},o={close:`\\}`,id:`dollar`,open1:`\\$`,open2:`\\{`},s={close:`\\]`,id:`bracket`,open1:`\\[`,open2:`=`};function c(r){return{brackets:[[`<`,`>`],[`[`,`]`],[`(`,`)`],[`{`,`}`]],comments:{blockComment:[`${r.open}--`,`--${r.close}`]},autoCloseBefore:`
1
+ import{n as e}from"./editor.api-Cd1D35oj.js";var t=[`assign`,`flush`,`ftl`,`return`,`global`,`import`,`include`,`break`,`continue`,`local`,`nested`,`nt`,`setting`,`stop`,`t`,`lt`,`rt`,`fallback`],n=[`attempt`,`autoesc`,`autoEsc`,`compress`,`comment`,`escape`,`noescape`,`function`,`if`,`list`,`items`,`sep`,`macro`,`noparse`,`noParse`,`noautoesc`,`noAutoEsc`,`outputformat`,`switch`,`visit`,`recurse`],r={close:`>`,id:`angle`,open:`<`},i={close:`\\]`,id:`bracket`,open:`\\[`},a={close:`[>\\]]`,id:`auto`,open:`[<\\[]`},o={close:`\\}`,id:`dollar`,open1:`\\$`,open2:`\\{`},s={close:`\\]`,id:`bracket`,open1:`\\[`,open2:`=`};function c(r){return{brackets:[[`<`,`>`],[`[`,`]`],[`(`,`)`],[`{`,`}`]],comments:{blockComment:[`${r.open}--`,`--${r.close}`]},autoCloseBefore:`
2
2
  \r }]),.:;=`,autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`,notIn:[`string`]},{open:`'`,close:`'`,notIn:[`string`]}],surroundingPairs:[{open:`"`,close:`"`},{open:`'`,close:`'`},{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`<`,close:`>`}],folding:{markers:{start:RegExp(`${r.open}#(?:${n.join(`|`)})([^/${r.close}]*(?!/)${r.close})[^${r.open}]*$`),end:RegExp(`${r.open}/#(?:${n.join(`|`)})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:RegExp(`${r.open}#(?!(?:${t.join(`|`)}))([a-zA-Z_]+)([^/${r.close}]*(?!/)${r.close})[^${r.open}]*$`),afterText:RegExp(`^${r.open}/#([a-zA-Z_]+)[\\r\\n\\t ]*${r.close}$`),action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:RegExp(`${r.open}#(?!(?:${t.join(`|`)}))([a-zA-Z_]+)([^/${r.close}]*(?!/)${r.close})[^${r.open}]*$`),action:{indentAction:e.IndentAction.Indent}}]}}function l(){return{brackets:[[`<`,`>`],[`[`,`]`],[`(`,`)`],[`{`,`}`]],autoCloseBefore:`
3
3
  \r }]),.:;=`,autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`,notIn:[`string`]},{open:`'`,close:`'`,notIn:[`string`]}],surroundingPairs:[{open:`"`,close:`"`},{open:`'`,close:`'`},{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`<`,close:`>`}],folding:{markers:{start:RegExp(`[<\\[]#(?:${n.join(`|`)})([^/>\\]]*(?!/)[>\\]])[^<\\[]*$`),end:RegExp(`[<\\[]/#(?:${n.join(`|`)})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:RegExp(`[<\\[]#(?!(?:${t.join(`|`)}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),afterText:RegExp(`^[<\\[]/#([a-zA-Z_]+)[\\r\\n\\t ]*[>\\]]$`),action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:RegExp(`[<\\[]#(?!(?:${t.join(`|`)}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),action:{indentAction:e.IndentAction.Indent}}]}}function u(e,t){let n=`_${e.id}_${t.id}`,r=e=>e.replace(/__id__/g,n),i=e=>{let t=e.source.replace(/__id__/g,n);return new RegExp(t,e.flags)};return{unicode:!0,includeLF:!1,start:r(`default__id__`),ignoreCase:!1,defaultToken:`invalid`,tokenPostfix:`.freemarker2`,brackets:[{open:`{`,close:`}`,token:`delimiter.curly`},{open:`[`,close:`]`,token:`delimiter.square`},{open:`(`,close:`)`,token:`delimiter.parenthesis`},{open:`<`,close:`>`,token:`delimiter.angle`}],[r(`open__id__`)]:new RegExp(e.open),[r(`close__id__`)]:new RegExp(e.close),[r(`iOpen1__id__`)]:new RegExp(t.open1),[r(`iOpen2__id__`)]:new RegExp(t.open2),[r(`iClose__id__`)]:new RegExp(t.close),[r(`startTag__id__`)]:i(/(@open__id__)(#)/),[r(`endTag__id__`)]:i(/(@open__id__)(\/#)/),[r(`startOrEndTag__id__`)]:i(/(@open__id__)(\/?#)/),[r(`closeTag1__id__`)]:i(/((?:@blank)*)(@close__id__)/),[r(`closeTag2__id__`)]:i(/((?:@blank)*\/?)(@close__id__)/),blank:/[ \t\n\r]/,keywords:[`false`,`true`,`in`,`as`,`using`],directiveStartCloseTag1:/attempt|recover|sep|auto[eE]sc|no(?:autoe|AutoE)sc|compress|default|no[eE]scape|comment|no[pP]arse/,directiveStartCloseTag2:/else|break|continue|return|stop|flush|t|lt|rt|nt|nested|recurse|fallback|ftl/,directiveStartBlank:/if|else[iI]f|list|for[eE]ach|switch|case|assign|global|local|include|import|function|macro|transform|visit|stop|return|call|setting|output[fF]ormat|nested|recurse|escape|ftl|items/,directiveEndCloseTag1:/if|list|items|sep|recover|attempt|for[eE]ach|local|global|assign|function|macro|output[fF]ormat|auto[eE]sc|no(?:autoe|AutoE)sc|compress|transform|switch|escape|no[eE]scape/,escapedChar:/\\(?:[ntrfbgla\\'"\{=]|(?:x[0-9A-Fa-f]{1,4}))/,asciiDigit:/[0-9]/,integer:/[0-9]+/,nonEscapedIdStartChar:/[\$@-Z_a-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u1FFF\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183-\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3006\u3031-\u3035\u303B-\u303C\u3040-\u318F\u31A0-\u31BA\u31F0-\u31FF\u3300-\u337F\u3400-\u4DB5\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5-\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,escapedIdChar:/\\[\-\.:#]/,idStartChar:/(?:@nonEscapedIdStartChar)|(?:@escapedIdChar)/,id:/(?:@idStartChar)(?:(?:@idStartChar)|(?:@asciiDigit))*/,specialHashKeys:/\*\*|\*|false|true|in|as|using/,namedSymbols:/&lt;=|&gt;=|\\lte|\\lt|&lt;|\\gte|\\gt|&gt;|&amp;&amp;|\\and|-&gt;|->|==|!=|\+=|-=|\*=|\/=|%=|\+\+|--|<=|&&|\|\||:|\.\.\.|\.\.\*|\.\.<|\.\.!|\?\?|=|<|\+|-|\*|\/|%|\||\.\.|\?|!|&|\.|,|;/,arrows:[`->`,`-&gt;`],delimiters:[`;`,`:`,`,`,`.`],stringOperators:[`lte`,`lt`,`gte`,`gt`],noParseTags:[`noparse`,`noParse`,`comment`],tokenizer:{[r(`default__id__`)]:[{include:r(`@directive_token__id__`)},{include:r(`@interpolation_and_text_token__id__`)}],[r(`fmExpression__id__.directive`)]:[{include:r(`@blank_and_expression_comment_token__id__`)},{include:r(`@directive_end_token__id__`)},{include:r(`@expression_token__id__`)}],[r(`fmExpression__id__.interpolation`)]:[{include:r(`@blank_and_expression_comment_token__id__`)},{include:r(`@expression_token__id__`)},{include:r(`@greater_operators_token__id__`)}],[r(`inParen__id__.plain`)]:[{include:r(`@blank_and_expression_comment_token__id__`)},{include:r(`@directive_end_token__id__`)},{include:r(`@expression_token__id__`)}],[r(`inParen__id__.gt`)]:[{include:r(`@blank_and_expression_comment_token__id__`)},{include:r(`@expression_token__id__`)},{include:r(`@greater_operators_token__id__`)}],[r(`noSpaceExpression__id__`)]:[{include:r(`@no_space_expression_end_token__id__`)},{include:r(`@directive_end_token__id__`)},{include:r(`@expression_token__id__`)}],[r(`unifiedCall__id__`)]:[{include:r(`@unified_call_token__id__`)}],[r(`singleString__id__`)]:[{include:r(`@string_single_token__id__`)}],[r(`doubleString__id__`)]:[{include:r(`@string_double_token__id__`)}],[r(`rawSingleString__id__`)]:[{include:r(`@string_single_raw_token__id__`)}],[r(`rawDoubleString__id__`)]:[{include:r(`@string_double_raw_token__id__`)}],[r(`expressionComment__id__`)]:[{include:r(`@expression_comment_token__id__`)}],[r(`noParse__id__`)]:[{include:r(`@no_parse_token__id__`)}],[r(`terseComment__id__`)]:[{include:r(`@terse_comment_token__id__`)}],[r(`directive_token__id__`)]:[[i(/(?:@startTag__id__)(@directiveStartCloseTag1)(?:@closeTag1__id__)/),e.id===`auto`?{cases:{"$1==<":{token:`@rematch`,switchTo:`@default_angle_${t.id}`},"$1==[":{token:`@rematch`,switchTo:`@default_bracket_${t.id}`}}}:[{token:`@brackets.directive`},{token:`delimiter.directive`},{cases:{"@noParseTags":{token:`tag`,next:r(`@noParse__id__.$3`)},"@default":{token:`tag`}}},{token:`delimiter.directive`},{token:`@brackets.directive`}]],[i(/(?:@startTag__id__)(@directiveStartCloseTag2)(?:@closeTag2__id__)/),e.id===`auto`?{cases:{"$1==<":{token:`@rematch`,switchTo:`@default_angle_${t.id}`},"$1==[":{token:`@rematch`,switchTo:`@default_bracket_${t.id}`}}}:[{token:`@brackets.directive`},{token:`delimiter.directive`},{token:`tag`},{token:`delimiter.directive`},{token:`@brackets.directive`}]],[i(/(?:@startTag__id__)(@directiveStartBlank)(@blank)/),e.id===`auto`?{cases:{"$1==<":{token:`@rematch`,switchTo:`@default_angle_${t.id}`},"$1==[":{token:`@rematch`,switchTo:`@default_bracket_${t.id}`}}}:[{token:`@brackets.directive`},{token:`delimiter.directive`},{token:`tag`},{token:``,next:r(`@fmExpression__id__.directive`)}]],[i(/(?:@endTag__id__)(@directiveEndCloseTag1)(?:@closeTag1__id__)/),e.id===`auto`?{cases:{"$1==<":{token:`@rematch`,switchTo:`@default_angle_${t.id}`},"$1==[":{token:`@rematch`,switchTo:`@default_bracket_${t.id}`}}}:[{token:`@brackets.directive`},{token:`delimiter.directive`},{token:`tag`},{token:`delimiter.directive`},{token:`@brackets.directive`}]],[i(/(@open__id__)(@)/),e.id===`auto`?{cases:{"$1==<":{token:`@rematch`,switchTo:`@default_angle_${t.id}`},"$1==[":{token:`@rematch`,switchTo:`@default_bracket_${t.id}`}}}:[{token:`@brackets.directive`},{token:`delimiter.directive`,next:r(`@unifiedCall__id__`)}]],[i(/(@open__id__)(\/@)((?:(?:@id)(?:\.(?:@id))*)?)(?:@closeTag1__id__)/),[{token:`@brackets.directive`},{token:`delimiter.directive`},{token:`tag`},{token:`delimiter.directive`},{token:`@brackets.directive`}]],[i(/(@open__id__)#--/),e.id===`auto`?{cases:{"$1==<":{token:`@rematch`,switchTo:`@default_angle_${t.id}`},"$1==[":{token:`@rematch`,switchTo:`@default_bracket_${t.id}`}}}:{token:`comment`,next:r(`@terseComment__id__`)}],[i(/(?:@startOrEndTag__id__)([a-zA-Z_]+)/),e.id===`auto`?{cases:{"$1==<":{token:`@rematch`,switchTo:`@default_angle_${t.id}`},"$1==[":{token:`@rematch`,switchTo:`@default_bracket_${t.id}`}}}:[{token:`@brackets.directive`},{token:`delimiter.directive`},{token:`tag.invalid`,next:r(`@fmExpression__id__.directive`)}]]],[r(`interpolation_and_text_token__id__`)]:[[i(/(@iOpen1__id__)(@iOpen2__id__)/),[{token:t.id===`bracket`?`@brackets.interpolation`:`delimiter.interpolation`},{token:t.id===`bracket`?`delimiter.interpolation`:`@brackets.interpolation`,next:r(`@fmExpression__id__.interpolation`)}]],[/[\$#<\[\{]|(?:@blank)+|[^\$<#\[\{\n\r\t ]+/,{token:`source`}]],[r(`string_single_token__id__`)]:[[/[^'\\]/,{token:`string`}],[/@escapedChar/,{token:`string.escape`}],[/'/,{token:`string`,next:`@pop`}]],[r(`string_double_token__id__`)]:[[/[^"\\]/,{token:`string`}],[/@escapedChar/,{token:`string.escape`}],[/"/,{token:`string`,next:`@pop`}]],[r(`string_single_raw_token__id__`)]:[[/[^']+/,{token:`string.raw`}],[/'/,{token:`string.raw`,next:`@pop`}]],[r(`string_double_raw_token__id__`)]:[[/[^"]+/,{token:`string.raw`}],[/"/,{token:`string.raw`,next:`@pop`}]],[r(`expression_token__id__`)]:[[/(r?)(['"])/,{cases:{"r'":[{token:`keyword`},{token:`string.raw`,next:r(`@rawSingleString__id__`)}],'r"':[{token:`keyword`},{token:`string.raw`,next:r(`@rawDoubleString__id__`)}],"'":[{token:`source`},{token:`string`,next:r(`@singleString__id__`)}],'"':[{token:`source`},{token:`string`,next:r(`@doubleString__id__`)}]}}],[/(?:@integer)(?:\.(?:@integer))?/,{cases:{"(?:@integer)":{token:`number`},"@default":{token:`number.float`}}}],[/(\.)(@blank*)(@specialHashKeys)/,[{token:`delimiter`},{token:``},{token:`identifier`}]],[/(?:@namedSymbols)/,{cases:{"@arrows":{token:`meta.arrow`},"@delimiters":{token:`delimiter`},"@default":{token:`operators`}}}],[/@id/,{cases:{"@keywords":{token:`keyword.$0`},"@stringOperators":{token:`operators`},"@default":{token:`identifier`}}}],[/[\[\]\(\)\{\}]/,{cases:{"\\[":{cases:{"$S2==gt":{token:`@brackets`,next:r(`@inParen__id__.gt`)},"@default":{token:`@brackets`,next:r(`@inParen__id__.plain`)}}},"\\]":{cases:{...t.id===`bracket`?{"$S2==interpolation":{token:`@brackets.interpolation`,next:`@popall`}}:{},...e.id===`bracket`?{"$S2==directive":{token:`@brackets.directive`,next:`@popall`}}:{},[r(`$S1==inParen__id__`)]:{token:`@brackets`,next:`@pop`},"@default":{token:`@brackets`}}},"\\(":{token:`@brackets`,next:r(`@inParen__id__.gt`)},"\\)":{cases:{[r(`$S1==inParen__id__`)]:{token:`@brackets`,next:`@pop`},"@default":{token:`@brackets`}}},"\\{":{cases:{"$S2==gt":{token:`@brackets`,next:r(`@inParen__id__.gt`)},"@default":{token:`@brackets`,next:r(`@inParen__id__.plain`)}}},"\\}":{cases:{...t.id===`bracket`?{}:{"$S2==interpolation":{token:`@brackets.interpolation`,next:`@popall`}},[r(`$S1==inParen__id__`)]:{token:`@brackets`,next:`@pop`},"@default":{token:`@brackets`}}}}}],[/\$\{/,{token:`delimiter.invalid`}]],[r(`blank_and_expression_comment_token__id__`)]:[[/(?:@blank)+/,{token:``}],[/[<\[][#!]--/,{token:`comment`,next:r(`@expressionComment__id__`)}]],[r(`directive_end_token__id__`)]:[[/>/,e.id===`bracket`?{token:`operators`}:{token:`@brackets.directive`,next:`@popall`}],[i(/(\/)(@close__id__)/),[{token:`delimiter.directive`},{token:`@brackets.directive`,next:`@popall`}]]],[r(`greater_operators_token__id__`)]:[[/>/,{token:`operators`}],[/>=/,{token:`operators`}]],[r(`no_space_expression_end_token__id__`)]:[[/(?:@blank)+/,{token:``,switchTo:r(`@fmExpression__id__.directive`)}]],[r(`unified_call_token__id__`)]:[[/(@id)((?:@blank)+)/,[{token:`tag`},{token:``,next:r(`@fmExpression__id__.directive`)}]],[i(/(@id)(\/?)(@close__id__)/),[{token:`tag`},{token:`delimiter.directive`},{token:`@brackets.directive`,next:`@popall`}]],[/./,{token:`@rematch`,next:r(`@noSpaceExpression__id__`)}]],[r(`no_parse_token__id__`)]:[[i(/(@open__id__)(\/#?)([a-zA-Z]+)((?:@blank)*)(@close__id__)/),{cases:{"$S2==$3":[{token:`@brackets.directive`},{token:`delimiter.directive`},{token:`tag`},{token:``},{token:`@brackets.directive`,next:`@popall`}],"$S2==comment":[{token:`comment`},{token:`comment`},{token:`comment`},{token:`comment`},{token:`comment`}],"@default":[{token:`source`},{token:`source`},{token:`source`},{token:`source`},{token:`source`}]}}],[/[^<\[\-]+|[<\[\-]/,{cases:{"$S2==comment":{token:`comment`},"@default":{token:`source`}}}]],[r(`expression_comment_token__id__`)]:[[/--[>\]]/,{token:`comment`,next:`@pop`}],[/[^\->\]]+|[>\]\-]/,{token:`comment`}]],[r(`terse_comment_token__id__`)]:[[i(/--(?:@close__id__)/),{token:`comment`,next:`@popall`}],[/[^<\[\-]+|[<\[\-]/,{token:`comment`}]]}}}function d(e){let t=u(r,e),n=u(i,e),o=u(a,e);return{...t,...n,...o,unicode:!0,includeLF:!1,start:`default_auto_${e.id}`,ignoreCase:!1,defaultToken:`invalid`,tokenPostfix:`.freemarker2`,brackets:[{open:`{`,close:`}`,token:`delimiter.curly`},{open:`[`,close:`]`,token:`delimiter.square`},{open:`(`,close:`)`,token:`delimiter.parenthesis`},{open:`<`,close:`>`,token:`delimiter.angle`}],tokenizer:{...t.tokenizer,...n.tokenizer,...o.tokenizer}}}var f={conf:c(r),language:u(r,o)},p={conf:c(i),language:u(i,o)},m={conf:c(r),language:u(r,s)},h={conf:c(i),language:u(i,s)},g={conf:l(),language:d(o)},_={conf:l(),language:d(s)};export{m as TagAngleInterpolationBracket,f as TagAngleInterpolationDollar,_ as TagAutoInterpolationBracket,g as TagAutoInterpolationDollar,h as TagBracketInterpolationBracket,p as TagBracketInterpolationDollar};
@@ -1 +1 @@
1
- import{n as e}from"./editor.api-DZ9WO_J7.js";var t=[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`keygen`,`link`,`menuitem`,`meta`,`param`,`source`,`track`,`wbr`],n={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[`{{!--`,`--}}`]},brackets:[[`<!--`,`-->`],[`<`,`>`],[`{{`,`}}`],[`{`,`}`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],surroundingPairs:[{open:`<`,close:`>`},{open:`"`,close:`"`},{open:`'`,close:`'`}],onEnterRules:[{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),action:{indentAction:e.IndentAction.Indent}}]},r={defaultToken:``,tokenPostfix:``,tokenizer:{root:[[/\{\{!--/,`comment.block.start.handlebars`,`@commentBlock`],[/\{\{!/,`comment.start.handlebars`,`@comment`],[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.root`}],[/<!DOCTYPE/,`metatag.html`,`@doctype`],[/<!--/,`comment.html`,`@commentHtml`],[/(<)(\w+)(\/>)/,[`delimiter.html`,`tag.html`,`delimiter.html`]],[/(<)(script)/,[`delimiter.html`,{token:`tag.html`,next:`@script`}]],[/(<)(style)/,[`delimiter.html`,{token:`tag.html`,next:`@style`}]],[/(<)([:\w]+)/,[`delimiter.html`,{token:`tag.html`,next:`@otherTag`}]],[/(<\/)(\w+)/,[`delimiter.html`,{token:`tag.html`,next:`@otherTag`}]],[/</,`delimiter.html`],[/\{/,`delimiter.html`],[/[^<{]+/]],doctype:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.comment`}],[/[^>]+/,`metatag.content.html`],[/>/,`metatag.html`,`@pop`]],comment:[[/\}\}/,`comment.end.handlebars`,`@pop`],[/./,`comment.content.handlebars`]],commentBlock:[[/--\}\}/,`comment.block.end.handlebars`,`@pop`],[/./,`comment.content.handlebars`]],commentHtml:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.comment`}],[/-->/,`comment.html`,`@pop`],[/[^-]+/,`comment.content.html`],[/./,`comment.content.html`]],otherTag:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.otherTag`}],[/\/?>/,`delimiter.html`,`@pop`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/]],script:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.script`}],[/type/,`attribute.name`,`@scriptAfterType`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded.text/javascript`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,[`delimiter.html`,`tag.html`,{token:`delimiter.html`,next:`@pop`}]]],scriptAfterType:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.scriptAfterType`}],[/=/,`delimiter`,`@scriptAfterTypeEquals`],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded.text/javascript`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptAfterTypeEquals:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.scriptAfterTypeEquals`}],[/"([^"]*)"/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.$1`}],[/'([^']*)'/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.$1`}],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded.text/javascript`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptWithCustomType:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.scriptWithCustomType.$S2`}],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded.$S2`,nextEmbedded:`$S2`}],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptEmbedded:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInEmbeddedState.scriptEmbedded.$S2`,nextEmbedded:`@pop`}],[/<\/script/,{token:`@rematch`,next:`@pop`,nextEmbedded:`@pop`}]],style:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.style`}],[/type/,`attribute.name`,`@styleAfterType`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/>/,{token:`delimiter.html`,next:`@styleEmbedded.text/css`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,[`delimiter.html`,`tag.html`,{token:`delimiter.html`,next:`@pop`}]]],styleAfterType:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.styleAfterType`}],[/=/,`delimiter`,`@styleAfterTypeEquals`],[/>/,{token:`delimiter.html`,next:`@styleEmbedded.text/css`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleAfterTypeEquals:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.styleAfterTypeEquals`}],[/"([^"]*)"/,{token:`attribute.value`,switchTo:`@styleWithCustomType.$1`}],[/'([^']*)'/,{token:`attribute.value`,switchTo:`@styleWithCustomType.$1`}],[/>/,{token:`delimiter.html`,next:`@styleEmbedded.text/css`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleWithCustomType:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.styleWithCustomType.$S2`}],[/>/,{token:`delimiter.html`,next:`@styleEmbedded.$S2`,nextEmbedded:`$S2`}],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleEmbedded:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInEmbeddedState.styleEmbedded.$S2`,nextEmbedded:`@pop`}],[/<\/style/,{token:`@rematch`,next:`@pop`,nextEmbedded:`@pop`}]],handlebarsInSimpleState:[[/\{\{\{?/,`delimiter.handlebars`],[/\}\}\}?/,{token:`delimiter.handlebars`,switchTo:`@$S2.$S3`}],{include:`handlebarsRoot`}],handlebarsInEmbeddedState:[[/\{\{\{?/,`delimiter.handlebars`],[/\}\}\}?/,{token:`delimiter.handlebars`,switchTo:`@$S2.$S3`,nextEmbedded:`$S3`}],{include:`handlebarsRoot`}],handlebarsRoot:[[/"[^"]*"/,`string.handlebars`],[/[#/][^\s}]+/,`keyword.helper.handlebars`],[/else\b/,`keyword.helper.handlebars`],[/[\s]+/],[/[^}]/,`variable.parameter.handlebars`]]}};export{n as conf,r as language};
1
+ import{n as e}from"./editor.api-Cd1D35oj.js";var t=[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`keygen`,`link`,`menuitem`,`meta`,`param`,`source`,`track`,`wbr`],n={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[`{{!--`,`--}}`]},brackets:[[`<!--`,`-->`],[`<`,`>`],[`{{`,`}}`],[`{`,`}`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],surroundingPairs:[{open:`<`,close:`>`},{open:`"`,close:`"`},{open:`'`,close:`'`}],onEnterRules:[{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),action:{indentAction:e.IndentAction.Indent}}]},r={defaultToken:``,tokenPostfix:``,tokenizer:{root:[[/\{\{!--/,`comment.block.start.handlebars`,`@commentBlock`],[/\{\{!/,`comment.start.handlebars`,`@comment`],[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.root`}],[/<!DOCTYPE/,`metatag.html`,`@doctype`],[/<!--/,`comment.html`,`@commentHtml`],[/(<)(\w+)(\/>)/,[`delimiter.html`,`tag.html`,`delimiter.html`]],[/(<)(script)/,[`delimiter.html`,{token:`tag.html`,next:`@script`}]],[/(<)(style)/,[`delimiter.html`,{token:`tag.html`,next:`@style`}]],[/(<)([:\w]+)/,[`delimiter.html`,{token:`tag.html`,next:`@otherTag`}]],[/(<\/)(\w+)/,[`delimiter.html`,{token:`tag.html`,next:`@otherTag`}]],[/</,`delimiter.html`],[/\{/,`delimiter.html`],[/[^<{]+/]],doctype:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.comment`}],[/[^>]+/,`metatag.content.html`],[/>/,`metatag.html`,`@pop`]],comment:[[/\}\}/,`comment.end.handlebars`,`@pop`],[/./,`comment.content.handlebars`]],commentBlock:[[/--\}\}/,`comment.block.end.handlebars`,`@pop`],[/./,`comment.content.handlebars`]],commentHtml:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.comment`}],[/-->/,`comment.html`,`@pop`],[/[^-]+/,`comment.content.html`],[/./,`comment.content.html`]],otherTag:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.otherTag`}],[/\/?>/,`delimiter.html`,`@pop`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/]],script:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.script`}],[/type/,`attribute.name`,`@scriptAfterType`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded.text/javascript`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,[`delimiter.html`,`tag.html`,{token:`delimiter.html`,next:`@pop`}]]],scriptAfterType:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.scriptAfterType`}],[/=/,`delimiter`,`@scriptAfterTypeEquals`],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded.text/javascript`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptAfterTypeEquals:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.scriptAfterTypeEquals`}],[/"([^"]*)"/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.$1`}],[/'([^']*)'/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.$1`}],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded.text/javascript`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptWithCustomType:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.scriptWithCustomType.$S2`}],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded.$S2`,nextEmbedded:`$S2`}],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptEmbedded:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInEmbeddedState.scriptEmbedded.$S2`,nextEmbedded:`@pop`}],[/<\/script/,{token:`@rematch`,next:`@pop`,nextEmbedded:`@pop`}]],style:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.style`}],[/type/,`attribute.name`,`@styleAfterType`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/>/,{token:`delimiter.html`,next:`@styleEmbedded.text/css`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,[`delimiter.html`,`tag.html`,{token:`delimiter.html`,next:`@pop`}]]],styleAfterType:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.styleAfterType`}],[/=/,`delimiter`,`@styleAfterTypeEquals`],[/>/,{token:`delimiter.html`,next:`@styleEmbedded.text/css`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleAfterTypeEquals:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.styleAfterTypeEquals`}],[/"([^"]*)"/,{token:`attribute.value`,switchTo:`@styleWithCustomType.$1`}],[/'([^']*)'/,{token:`attribute.value`,switchTo:`@styleWithCustomType.$1`}],[/>/,{token:`delimiter.html`,next:`@styleEmbedded.text/css`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleWithCustomType:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.styleWithCustomType.$S2`}],[/>/,{token:`delimiter.html`,next:`@styleEmbedded.$S2`,nextEmbedded:`$S2`}],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleEmbedded:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInEmbeddedState.styleEmbedded.$S2`,nextEmbedded:`@pop`}],[/<\/style/,{token:`@rematch`,next:`@pop`,nextEmbedded:`@pop`}]],handlebarsInSimpleState:[[/\{\{\{?/,`delimiter.handlebars`],[/\}\}\}?/,{token:`delimiter.handlebars`,switchTo:`@$S2.$S3`}],{include:`handlebarsRoot`}],handlebarsInEmbeddedState:[[/\{\{\{?/,`delimiter.handlebars`],[/\}\}\}?/,{token:`delimiter.handlebars`,switchTo:`@$S2.$S3`,nextEmbedded:`$S3`}],{include:`handlebarsRoot`}],handlebarsRoot:[[/"[^"]*"/,`string.handlebars`],[/[#/][^\s}]+/,`keyword.helper.handlebars`],[/else\b/,`keyword.helper.handlebars`],[/[\s]+/],[/[^}]/,`variable.parameter.handlebars`]]}};export{n as conf,r as language};
@@ -1 +1 @@
1
- import{n as e}from"./editor.api-DZ9WO_J7.js";var t=[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`keygen`,`link`,`menuitem`,`meta`,`param`,`source`,`track`,`wbr`],n={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[`<!--`,`-->`]},brackets:[[`<!--`,`-->`],[`<`,`>`],[`{`,`}`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],surroundingPairs:[{open:`"`,close:`"`},{open:`'`,close:`'`},{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`<`,close:`>`}],onEnterRules:[{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),action:{indentAction:e.IndentAction.Indent}}],folding:{markers:{start:RegExp(`^\\s*<!--\\s*#region\\b.*-->`),end:RegExp(`^\\s*<!--\\s*#endregion\\b.*-->`)}}},r={defaultToken:``,tokenPostfix:`.html`,ignoreCase:!0,tokenizer:{root:[[/<!DOCTYPE/,`metatag`,`@doctype`],[/<!--/,`comment`,`@comment`],[/(<)((?:[\w\-]+:)?[\w\-]+)(\s*)(\/>)/,[`delimiter`,`tag`,``,`delimiter`]],[/(<)(script)/,[`delimiter`,{token:`tag`,next:`@script`}]],[/(<)(style)/,[`delimiter`,{token:`tag`,next:`@style`}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,[`delimiter`,{token:`tag`,next:`@otherTag`}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,[`delimiter`,{token:`tag`,next:`@otherTag`}]],[/</,`delimiter`],[/[^<]+/]],doctype:[[/[^>]+/,`metatag.content`],[/>/,`metatag`,`@pop`]],comment:[[/-->/,`comment`,`@pop`],[/[^-]+/,`comment.content`],[/./,`comment.content`]],otherTag:[[/\/?>/,`delimiter`,`@pop`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/]],script:[[/type/,`attribute.name`,`@scriptAfterType`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/>/,{token:`delimiter`,next:`@scriptEmbedded`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,[`delimiter`,`tag`,{token:`delimiter`,next:`@pop`}]]],scriptAfterType:[[/=/,`delimiter`,`@scriptAfterTypeEquals`],[/>/,{token:`delimiter`,next:`@scriptEmbedded`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptAfterTypeEquals:[[/"module"/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.text/javascript`}],[/'module'/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.text/javascript`}],[/"([^"]*)"/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.$1`}],[/'([^']*)'/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.$1`}],[/>/,{token:`delimiter`,next:`@scriptEmbedded`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptWithCustomType:[[/>/,{token:`delimiter`,next:`@scriptEmbedded.$S2`,nextEmbedded:`$S2`}],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptEmbedded:[[/<\/script/,{token:`@rematch`,next:`@pop`,nextEmbedded:`@pop`}],[/[^<]+/,``]],style:[[/type/,`attribute.name`,`@styleAfterType`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/>/,{token:`delimiter`,next:`@styleEmbedded`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,[`delimiter`,`tag`,{token:`delimiter`,next:`@pop`}]]],styleAfterType:[[/=/,`delimiter`,`@styleAfterTypeEquals`],[/>/,{token:`delimiter`,next:`@styleEmbedded`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:`attribute.value`,switchTo:`@styleWithCustomType.$1`}],[/'([^']*)'/,{token:`attribute.value`,switchTo:`@styleWithCustomType.$1`}],[/>/,{token:`delimiter`,next:`@styleEmbedded`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleWithCustomType:[[/>/,{token:`delimiter`,next:`@styleEmbedded.$S2`,nextEmbedded:`$S2`}],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleEmbedded:[[/<\/style/,{token:`@rematch`,next:`@pop`,nextEmbedded:`@pop`}],[/[^<]+/,``]]}};export{n as conf,r as language};
1
+ import{n as e}from"./editor.api-Cd1D35oj.js";var t=[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`keygen`,`link`,`menuitem`,`meta`,`param`,`source`,`track`,`wbr`],n={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[`<!--`,`-->`]},brackets:[[`<!--`,`-->`],[`<`,`>`],[`{`,`}`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],surroundingPairs:[{open:`"`,close:`"`},{open:`'`,close:`'`},{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`<`,close:`>`}],onEnterRules:[{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),action:{indentAction:e.IndentAction.Indent}}],folding:{markers:{start:RegExp(`^\\s*<!--\\s*#region\\b.*-->`),end:RegExp(`^\\s*<!--\\s*#endregion\\b.*-->`)}}},r={defaultToken:``,tokenPostfix:`.html`,ignoreCase:!0,tokenizer:{root:[[/<!DOCTYPE/,`metatag`,`@doctype`],[/<!--/,`comment`,`@comment`],[/(<)((?:[\w\-]+:)?[\w\-]+)(\s*)(\/>)/,[`delimiter`,`tag`,``,`delimiter`]],[/(<)(script)/,[`delimiter`,{token:`tag`,next:`@script`}]],[/(<)(style)/,[`delimiter`,{token:`tag`,next:`@style`}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,[`delimiter`,{token:`tag`,next:`@otherTag`}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,[`delimiter`,{token:`tag`,next:`@otherTag`}]],[/</,`delimiter`],[/[^<]+/]],doctype:[[/[^>]+/,`metatag.content`],[/>/,`metatag`,`@pop`]],comment:[[/-->/,`comment`,`@pop`],[/[^-]+/,`comment.content`],[/./,`comment.content`]],otherTag:[[/\/?>/,`delimiter`,`@pop`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/]],script:[[/type/,`attribute.name`,`@scriptAfterType`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/>/,{token:`delimiter`,next:`@scriptEmbedded`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,[`delimiter`,`tag`,{token:`delimiter`,next:`@pop`}]]],scriptAfterType:[[/=/,`delimiter`,`@scriptAfterTypeEquals`],[/>/,{token:`delimiter`,next:`@scriptEmbedded`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptAfterTypeEquals:[[/"module"/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.text/javascript`}],[/'module'/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.text/javascript`}],[/"([^"]*)"/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.$1`}],[/'([^']*)'/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.$1`}],[/>/,{token:`delimiter`,next:`@scriptEmbedded`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptWithCustomType:[[/>/,{token:`delimiter`,next:`@scriptEmbedded.$S2`,nextEmbedded:`$S2`}],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptEmbedded:[[/<\/script/,{token:`@rematch`,next:`@pop`,nextEmbedded:`@pop`}],[/[^<]+/,``]],style:[[/type/,`attribute.name`,`@styleAfterType`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/>/,{token:`delimiter`,next:`@styleEmbedded`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,[`delimiter`,`tag`,{token:`delimiter`,next:`@pop`}]]],styleAfterType:[[/=/,`delimiter`,`@styleAfterTypeEquals`],[/>/,{token:`delimiter`,next:`@styleEmbedded`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:`attribute.value`,switchTo:`@styleWithCustomType.$1`}],[/'([^']*)'/,{token:`attribute.value`,switchTo:`@styleWithCustomType.$1`}],[/>/,{token:`delimiter`,next:`@styleEmbedded`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleWithCustomType:[[/>/,{token:`delimiter`,next:`@styleEmbedded.$S2`,nextEmbedded:`$S2`}],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleEmbedded:[[/<\/style/,{token:`@rematch`,next:`@pop`,nextEmbedded:`@pop`}],[/[^<]+/,``]]}};export{n as conf,r as language};
@@ -0,0 +1 @@
1
+ import{$ as e,et as t,nt as n,tt as r,u as i}from"./index-DcwcFDrZ.js";var a=i(async({app:i})=>{if(i.use(t),r!==`en`)try{await n(r)}catch(e){console.error(`[i18n] could not load the saved locale, staying in English:`,e)}e(r)});export{a as default};