@inkeep/open-knowledge 0.33.0-beta.7 → 0.33.0-beta.9

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 (82) hide show
  1. package/dist/assets/skills/discovery/SKILL.md +1 -1
  2. package/dist/assets/skills/project/SKILL.md +1 -1
  3. package/dist/cli.mjs +7 -7
  4. package/dist/config-schema.json +3 -3
  5. package/dist/config.project-local.schema.json +3 -3
  6. package/dist/constants-DhO9HwoR.mjs +2 -0
  7. package/dist/{dist-petOQDm6.mjs → dist-ByRE-TiH.mjs} +6 -6
  8. package/dist/{dist-gqZDYmIG.mjs → dist-CCGDZSiV.mjs} +2 -2
  9. package/dist/{dist-DNDjbkqL.mjs → dist-CPJ9FkgX.mjs} +1 -1
  10. package/dist/{gh-detect-DT6DqKGM.mjs → gh-detect-DRASN_qx.mjs} +2 -2
  11. package/dist/git-handle-CetHWc5A-BpfHLi3S.mjs +1 -0
  12. package/dist/{git-handle-dKyep_oZ-B7s7m6CJ.mjs → git-handle-dKyep_oZ-eDHPK5PI.mjs} +2 -2
  13. package/dist/index.mjs +1 -1
  14. package/dist/{init-KCSJffNW.mjs → init-BGjbl-F7.mjs} +3 -3
  15. package/dist/init-sNMP_ZQL.mjs +1 -0
  16. package/dist/{launch-json-removal-ZIYJbZtQ.mjs → launch-json-removal-BkOXBtkU.mjs} +2 -2
  17. package/dist/{loader-BqECoP19.mjs → loader-C0JuN2jI.mjs} +2 -2
  18. package/dist/loader-ECrQWruE.mjs +1 -0
  19. package/dist/{open-browser-BMVg3r9e.mjs → open-browser-DNqvAiIh.mjs} +2 -2
  20. package/dist/preview-C1BQRhhO.mjs +1 -0
  21. package/dist/{preview-Bmngkbmx.mjs → preview-mEnD1Tq1.mjs} +2 -2
  22. package/dist/public/assets/{ActivityModeContent-Cxs8_d9h.js → ActivityModeContent-jsCTPiun.js} +1 -1
  23. package/dist/public/assets/{CodeMirrorPropInput-f5pC607I.js → CodeMirrorPropInput-cmSiPzan.js} +1 -1
  24. package/dist/public/assets/{DocumentContext-ogFq9Apo.js → DocumentContext-CNzSFsI-.js} +1 -1
  25. package/dist/public/assets/{EnableSyncConfirmDialog-CEMiBdy3.js → EnableSyncConfirmDialog-D_NbuJ59.js} +1 -1
  26. package/dist/public/assets/{GraphPanel-CT4Uax7w.js → GraphPanel-BrqHgLjs.js} +1 -1
  27. package/dist/public/assets/{ManagedArtifactProperties-BfEt7bIb.js → ManagedArtifactProperties-DqTT5fPT.js} +1 -1
  28. package/dist/public/assets/{McpConsentDialogBody-DoSFKWJ-.js → McpConsentDialogBody-BrfdQb16.js} +1 -1
  29. package/dist/public/assets/{MermaidDocEditor-CJFsgS7x.js → MermaidDocEditor-B_dNhePY.js} +1 -1
  30. package/dist/public/assets/{PropertyPanel-DpYcGGW2.js → PropertyPanel-Dkz1gPoU.js} +1 -1
  31. package/dist/public/assets/{ReportBugDialogBody-C0pCt3Po.js → ReportBugDialogBody-CCKV6nZY.js} +1 -1
  32. package/dist/public/assets/{SettingsDialogBody-04WyfuHT.js → SettingsDialogBody-BxTayjY8.js} +1 -1
  33. package/dist/public/assets/{ShareBranchSwitchDialog-DGcSbhKt.js → ShareBranchSwitchDialog-BhekOXUp.js} +1 -1
  34. package/dist/public/assets/{ShareReceiveDialog-Dp0wMb0C.js → ShareReceiveDialog-o5dNBk6Q.js} +1 -1
  35. package/dist/public/assets/{ShareReceiveMissDialog-BaOnOALv.js → ShareReceiveMissDialog-UODMw9si.js} +1 -1
  36. package/dist/public/assets/{SkillEditorActions-RqGqr20K.js → SkillEditorActions-euGEb-E6.js} +1 -1
  37. package/dist/public/assets/{SourceEditor-DeLqYSaV.js → SourceEditor-CORtf1FY.js} +1 -1
  38. package/dist/public/assets/{TerminalPanel-D93QQMrM.js → TerminalPanel-g64JYtbc.js} +1 -1
  39. package/dist/public/assets/{agent-presence-D2eASrH_.js → agent-presence-D3uA1hrz.js} +1 -1
  40. package/dist/public/assets/{auth-state-cache-CijiQXmK.js → auth-state-cache-DCv4Whjc.js} +1 -1
  41. package/dist/public/assets/{config-provider-BGFykK9q.js → config-provider-DVy-GqC5.js} +1 -1
  42. package/dist/public/assets/{dist-CurDB4OA.js → dist-DkRtDyLN.js} +1 -1
  43. package/dist/public/assets/{dist-TX_NQU76.js → dist-Dl_HewkW.js} +1 -1
  44. package/dist/public/assets/{doc-hash-CZiGDoto.js → doc-hash-BDRwCcvB.js} +1 -1
  45. package/dist/public/assets/{documents-events-BgIyZo2W.js → documents-events-CJpJUM_N.js} +1 -1
  46. package/dist/public/assets/{file-tree-adapter-Dubqn9yJ.js → file-tree-adapter-_1h6_EGw.js} +1 -1
  47. package/dist/public/assets/{index-CxZGz7om.js → index-FValh7LC.js} +8 -8
  48. package/dist/public/assets/{lint-config-client-VuF6BI2d.js → lint-config-client-CX_cssoL.js} +1 -1
  49. package/dist/public/assets/{navigation-targets-D_g_oD3p.js → navigation-targets-S-8o5DE_.js} +1 -1
  50. package/dist/public/assets/{open-managed-artifact-tab-jUT5uxaf.js → open-managed-artifact-tab-tiXawScj.js} +1 -1
  51. package/dist/public/assets/{pending-receive-nav-store-BqFe0QyH.js → pending-receive-nav-store-BUhyCKTL.js} +1 -1
  52. package/dist/public/assets/{prop-types-r4lrTXmC.js → prop-types-Cr0Uib4q.js} +1 -1
  53. package/dist/public/assets/{receive-store-DL3XQSe9.js → receive-store-DYDEnyEg.js} +1 -1
  54. package/dist/public/assets/{selection-context-DRS0xWzo.js → selection-context-BjmeTT0v.js} +1 -1
  55. package/dist/public/assets/{skill-actions-CqFXEGI_.js → skill-actions-32qU2dgG.js} +1 -1
  56. package/dist/public/assets/{skills-api-ChqmqNEn.js → skills-api-UJqRM51N.js} +1 -1
  57. package/dist/public/assets/{src-B_OV9KU-.js → src-CBkac3Ms.js} +1 -1
  58. package/dist/public/assets/{target-navigation-intent-CYYSTgIq.js → target-navigation-intent-BFsJN8Kr.js} +1 -1
  59. package/dist/public/assets/{typing-burst-detector-ByylQ2W5.js → typing-burst-detector-CekoPsaO.js} +1 -1
  60. package/dist/public/assets/{use-apply-config-color-theme-DJU29ygF.js → use-apply-config-color-theme-CUJwxTbn.js} +1 -1
  61. package/dist/public/assets/{workspace-paths-DGpjh0_R.js → workspace-paths-r1tSwfOd.js} +1 -1
  62. package/dist/public/index.html +26 -26
  63. package/dist/{repair-launch-json-D73FezU-.mjs → repair-launch-json-DX3G-SfV.mjs} +2 -2
  64. package/dist/{repair-mcp-configs-C2iq9bOP.mjs → repair-mcp-configs-CUHrcUTa.mjs} +2 -2
  65. package/dist/{repair-skills-BSRgI3Qd.mjs → repair-skills-BLdSucBd.mjs} +2 -2
  66. package/dist/repair-skills-BOkpuUWV.mjs +1 -0
  67. package/dist/schemas/v0/config.project-local.schema.json +3 -3
  68. package/dist/server-lock-GuuouVft-BJoBhhhn.mjs +1 -0
  69. package/dist/{server-lock-iLcBw_q0-CSsXlPB8.mjs → server-lock-iLcBw_q0-Bmk5FT76.mjs} +2 -2
  70. package/dist/{src-7LGO0Yau.mjs → src-Bzia_wR-.mjs} +2 -2
  71. package/dist/{start-CGL0pAPp.mjs → start-B3oqzXtV.mjs} +2 -2
  72. package/dist/start-DMf1yZZ6.mjs +1 -0
  73. package/dist/{write-project-skill-CQSo7jpP.mjs → write-project-skill-0vVDpckX.mjs} +2 -2
  74. package/package.json +1 -1
  75. package/dist/constants-B18JyjBC.mjs +0 -2
  76. package/dist/git-handle-CetHWc5A-BcCPg15N.mjs +0 -1
  77. package/dist/init-zkouBkiU.mjs +0 -1
  78. package/dist/loader-D9ILq_Qj.mjs +0 -1
  79. package/dist/preview-CXetnprU.mjs +0 -1
  80. package/dist/repair-skills-DMIeifIr.mjs +0 -1
  81. package/dist/server-lock-GuuouVft-mEG_NG6z.mjs +0 -1
  82. package/dist/start-B3G01qdc.mjs +0 -1
@@ -1 +1 @@
1
- import{s as e}from"./chunk-Bj-mKKzh.js";import{n as t,r as n,t as r}from"./compiler-runtime-B6sxACDP.js";import{n as i,r as a}from"./dist-UKzQrqGt.js";import{n as o,t as s}from"./createLucideIcon-DkO1lL_8.js";import{a as c,c as l,i as u,n as d,o as f,r as p,s as m,t as h}from"./dialog-DFGKErvF.js";import{sa as g}from"./dist-CurDB4OA.js";import{t as _}from"./eye-DS1O2Gq7.js";import{n as v}from"./dist-DyPw7rC6.js";import{o as y}from"./documents-events-BgIyZo2W.js";import"./config-provider-BGFykK9q.js";import{n as b}from"./config-context-DBmRI7_N.js";var x=s(`arrow-right-left`,[[`path`,{d:`m16 3 4 4-4 4`,key:`1x1c3m`}],[`path`,{d:`M20 7H4`,key:`zbl0bi`}],[`path`,{d:`m8 21-4-4 4-4`,key:`h9nckh`}],[`path`,{d:`M4 17h16`,key:`g4d7ey`}]]),S=s(`git-commit-vertical`,[[`path`,{d:`M12 3v6`,key:`1holv5`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`path`,{d:`M12 15v6`,key:`a9ows0`}]]),C=r(),w=e(t(),1);async function T(){try{let e=await fetch(`/api/sync/status`);return e.ok?{status:await e.json()}:{status:null,error:`server`}}catch{return{status:null,error:`network`}}}function E(){return D().status}function D(){let e=(0,C.c)(8),[t,n]=(0,w.useState)(null),[r,i]=(0,w.useState)(null),a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=function(){T().then(e=>{let{status:t,error:r}=e;i(r??null),t&&n(t)})},e[0]=a):a=e[0];let o=a,s,c;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>{o()},c=[],e[1]=s,e[2]=c):(s=e[1],c=e[2]),(0,w.useEffect)(s,c);let l,u;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(l=()=>y(e=>{e.includes(`sync-status`)&&o()}),u=[],e[3]=l,e[4]=u):(l=e[3],u=e[4]),(0,w.useEffect)(l,u);let d;return e[5]!==r||e[6]!==t?(d={status:t,fetchError:r},e[5]=r,e[6]=t,e[7]=d):d=e[7],d}var O=n();function k(){let e=(0,C.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,O.jsx)(l,{children:(0,O.jsx)(i,{id:`q_9EcE`})}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,O.jsxs)(O.Fragment,{children:[t,(0,O.jsx)(c,{children:(0,O.jsx)(i,{id:`n6hXUm`})})]}),e[1]=n):n=e[1],n}function A(){let e=(0,C.c)(10),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,O.jsxs)(`p`,{className:`flex items-center gap-1.5 text-xs font-semibold font-mono uppercase tracking-wider text-primary`,children:[(0,O.jsx)(`span`,{"aria-hidden":`true`,className:`mb-[3px] flex items-center justify-center`,children:`◇`}),(0,O.jsx)(i,{id:`6s7LXO`})]}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,O.jsx)(x,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-muted-foreground`}),e[1]=n):n=e[1];let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,O.jsx)(`p`,{className:`font-medium`,children:(0,O.jsx)(i,{id:`cdmk8A`})}),e[2]=r):r=e[2];let a;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,O.jsxs)(`div`,{className:`flex items-start gap-3`,children:[n,(0,O.jsxs)(`div`,{className:`space-y-0.5`,children:[r,(0,O.jsx)(`p`,{className:`text-muted-foreground`,children:(0,O.jsx)(i,{id:`YaeyFh`})})]})]}),e[3]=a):a=e[3];let o;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,O.jsx)(S,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-muted-foreground`}),e[4]=o):o=e[4];let s;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,O.jsx)(`p`,{className:`font-medium`,children:(0,O.jsx)(i,{id:`9i21pa`})}),e[5]=s):s=e[5];let c;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,O.jsxs)(`div`,{className:`flex items-start gap-3`,children:[o,(0,O.jsxs)(`div`,{className:`space-y-0.5`,children:[s,(0,O.jsx)(`p`,{className:`text-muted-foreground`,children:(0,O.jsx)(i,{id:`KIIamL`})})]})]}),e[6]=c):c=e[6];let l;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,O.jsx)(_,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-muted-foreground`}),e[7]=l):l=e[7];let u;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,O.jsx)(`p`,{className:`font-medium`,children:(0,O.jsx)(i,{id:`8cpeU3`})}),e[8]=u):u=e[8];let d;return e[9]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,O.jsxs)(`div`,{role:`note`,className:`text-sm space-y-5`,children:[t,(0,O.jsxs)(`div`,{className:`space-y-5`,children:[a,c,(0,O.jsxs)(`div`,{className:`flex items-start gap-3`,children:[l,(0,O.jsxs)(`div`,{className:`space-y-0.5`,children:[u,(0,O.jsx)(`p`,{className:`text-muted-foreground`,children:(0,O.jsx)(i,{id:`DELNQk`})})]})]})]})]}),e[9]=d):d=e[9],d}function j(){let e=(0,C.c)(2),{projectLocalBinding:t}=b();if(t===null)return null;let n;return e[0]===t?n=e[1]:(n=e=>{let n=t.patch({autoSync:{enabled:e}});return n.ok?{ok:!0}:{ok:!1,error:g(n.error)}},e[0]=t,e[1]=n),n}function M(){let e=(0,C.c)(2),{projectBinding:t}=b();if(t===null)return null;let n;return e[0]===t?n=e[1]:(n=e=>{let n=t.patch({autoSync:{default:e}});return n.ok?{ok:!0}:{ok:!1,error:g(n.error)}},e[0]=t,e[1]=n),n}function N(e,t){let n=(0,C.c)(12),{_:r}=a(),[i,o]=(0,w.useState)(!1),s;n[0]!==r||n[1]!==e?(s=function(t){if(e===null)return v.error(r({id:`fiMNLl`})),!1;let n=e(t);if(!n.ok){console.error(`[sync] toggle failed:`,n.error);let e=n.error;return v.error(r(t?{id:`04RA0-`,values:{detail:e}}:{id:`qjHMHf`,values:{detail:e}})),!1}return!0},n[0]=r,n[1]=e,n[2]=s):s=n[2];let c=s,l;n[3]===c?l=n[4]:(l=function(e){if(e){o(!0);return}c(!1)},n[3]=c,n[4]=l);let u=l,d;n[5]!==c||n[6]!==t?(d=function(){c(!0)&&(o(!1),t?.onEnabled?.())},n[5]=c,n[6]=t,n[7]=d):d=n[7];let f=d,p;return n[8]!==i||n[9]!==f||n[10]!==u?(p={confirmOpen:i,setConfirmOpen:o,onToggleRequest:u,onConfirm:f},n[8]=i,n[9]=f,n[10]=u,n[11]=p):p=n[11],p}async function P(e){let t=await fetch(`/api/sync/trigger`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({op:e})});if(!t.ok)throw Error(`sync trigger failed: ${t.status}`)}function F(e){let t=(0,C.c)(10),{open:n,onOpenChange:r,onConfirm:a}=e,s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,O.jsx)(m,{children:(0,O.jsx)(k,{})}),t[0]=s):s=t[0];let c;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,O.jsx)(d,{children:(0,O.jsx)(A,{})}),t[1]=c):c=t[1];let l;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,O.jsx)(p,{asChild:!0,children:(0,O.jsx)(o,{variant:`outline`,children:(0,O.jsx)(i,{id:`dEgA5A`})})}),t[2]=l):l=t[2];let g;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,O.jsx)(i,{id:`XU0OXn`}),t[3]=g):g=t[3];let _;t[4]===a?_=t[5]:(_=(0,O.jsxs)(u,{className:`sm:max-w-lg`,children:[s,c,(0,O.jsxs)(f,{children:[l,(0,O.jsx)(o,{onClick:a,children:g})]})]}),t[4]=a,t[5]=_);let v;return t[6]!==r||t[7]!==n||t[8]!==_?(v=(0,O.jsx)(h,{open:n,onOpenChange:r,children:_}),t[6]=r,t[7]=n,t[8]=_,t[9]=v):v=t[9],v}export{j as a,E as c,M as i,D as l,P as n,k as o,N as r,A as s,F as t};
1
+ import{s as e}from"./chunk-Bj-mKKzh.js";import{n as t,r as n,t as r}from"./compiler-runtime-B6sxACDP.js";import{n as i,r as a}from"./dist-UKzQrqGt.js";import{n as o,t as s}from"./createLucideIcon-DkO1lL_8.js";import{a as c,c as l,i as u,n as d,o as f,r as p,s as m,t as h}from"./dialog-DFGKErvF.js";import{sa as g}from"./dist-DkRtDyLN.js";import{t as _}from"./eye-DS1O2Gq7.js";import{n as v}from"./dist-DyPw7rC6.js";import{o as y}from"./documents-events-CJpJUM_N.js";import"./config-provider-DVy-GqC5.js";import{n as b}from"./config-context-DBmRI7_N.js";var x=s(`arrow-right-left`,[[`path`,{d:`m16 3 4 4-4 4`,key:`1x1c3m`}],[`path`,{d:`M20 7H4`,key:`zbl0bi`}],[`path`,{d:`m8 21-4-4 4-4`,key:`h9nckh`}],[`path`,{d:`M4 17h16`,key:`g4d7ey`}]]),S=s(`git-commit-vertical`,[[`path`,{d:`M12 3v6`,key:`1holv5`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`path`,{d:`M12 15v6`,key:`a9ows0`}]]),C=r(),w=e(t(),1);async function T(){try{let e=await fetch(`/api/sync/status`);return e.ok?{status:await e.json()}:{status:null,error:`server`}}catch{return{status:null,error:`network`}}}function E(){return D().status}function D(){let e=(0,C.c)(8),[t,n]=(0,w.useState)(null),[r,i]=(0,w.useState)(null),a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=function(){T().then(e=>{let{status:t,error:r}=e;i(r??null),t&&n(t)})},e[0]=a):a=e[0];let o=a,s,c;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>{o()},c=[],e[1]=s,e[2]=c):(s=e[1],c=e[2]),(0,w.useEffect)(s,c);let l,u;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(l=()=>y(e=>{e.includes(`sync-status`)&&o()}),u=[],e[3]=l,e[4]=u):(l=e[3],u=e[4]),(0,w.useEffect)(l,u);let d;return e[5]!==r||e[6]!==t?(d={status:t,fetchError:r},e[5]=r,e[6]=t,e[7]=d):d=e[7],d}var O=n();function k(){let e=(0,C.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,O.jsx)(l,{children:(0,O.jsx)(i,{id:`q_9EcE`})}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,O.jsxs)(O.Fragment,{children:[t,(0,O.jsx)(c,{children:(0,O.jsx)(i,{id:`n6hXUm`})})]}),e[1]=n):n=e[1],n}function A(){let e=(0,C.c)(10),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,O.jsxs)(`p`,{className:`flex items-center gap-1.5 text-xs font-semibold font-mono uppercase tracking-wider text-primary`,children:[(0,O.jsx)(`span`,{"aria-hidden":`true`,className:`mb-[3px] flex items-center justify-center`,children:`◇`}),(0,O.jsx)(i,{id:`6s7LXO`})]}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,O.jsx)(x,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-muted-foreground`}),e[1]=n):n=e[1];let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,O.jsx)(`p`,{className:`font-medium`,children:(0,O.jsx)(i,{id:`cdmk8A`})}),e[2]=r):r=e[2];let a;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,O.jsxs)(`div`,{className:`flex items-start gap-3`,children:[n,(0,O.jsxs)(`div`,{className:`space-y-0.5`,children:[r,(0,O.jsx)(`p`,{className:`text-muted-foreground`,children:(0,O.jsx)(i,{id:`YaeyFh`})})]})]}),e[3]=a):a=e[3];let o;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,O.jsx)(S,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-muted-foreground`}),e[4]=o):o=e[4];let s;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,O.jsx)(`p`,{className:`font-medium`,children:(0,O.jsx)(i,{id:`9i21pa`})}),e[5]=s):s=e[5];let c;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,O.jsxs)(`div`,{className:`flex items-start gap-3`,children:[o,(0,O.jsxs)(`div`,{className:`space-y-0.5`,children:[s,(0,O.jsx)(`p`,{className:`text-muted-foreground`,children:(0,O.jsx)(i,{id:`KIIamL`})})]})]}),e[6]=c):c=e[6];let l;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,O.jsx)(_,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-muted-foreground`}),e[7]=l):l=e[7];let u;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,O.jsx)(`p`,{className:`font-medium`,children:(0,O.jsx)(i,{id:`8cpeU3`})}),e[8]=u):u=e[8];let d;return e[9]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,O.jsxs)(`div`,{role:`note`,className:`text-sm space-y-5`,children:[t,(0,O.jsxs)(`div`,{className:`space-y-5`,children:[a,c,(0,O.jsxs)(`div`,{className:`flex items-start gap-3`,children:[l,(0,O.jsxs)(`div`,{className:`space-y-0.5`,children:[u,(0,O.jsx)(`p`,{className:`text-muted-foreground`,children:(0,O.jsx)(i,{id:`DELNQk`})})]})]})]})]}),e[9]=d):d=e[9],d}function j(){let e=(0,C.c)(2),{projectLocalBinding:t}=b();if(t===null)return null;let n;return e[0]===t?n=e[1]:(n=e=>{let n=t.patch({autoSync:{enabled:e}});return n.ok?{ok:!0}:{ok:!1,error:g(n.error)}},e[0]=t,e[1]=n),n}function M(){let e=(0,C.c)(2),{projectBinding:t}=b();if(t===null)return null;let n;return e[0]===t?n=e[1]:(n=e=>{let n=t.patch({autoSync:{default:e}});return n.ok?{ok:!0}:{ok:!1,error:g(n.error)}},e[0]=t,e[1]=n),n}function N(e,t){let n=(0,C.c)(12),{_:r}=a(),[i,o]=(0,w.useState)(!1),s;n[0]!==r||n[1]!==e?(s=function(t){if(e===null)return v.error(r({id:`fiMNLl`})),!1;let n=e(t);if(!n.ok){console.error(`[sync] toggle failed:`,n.error);let e=n.error;return v.error(r(t?{id:`04RA0-`,values:{detail:e}}:{id:`qjHMHf`,values:{detail:e}})),!1}return!0},n[0]=r,n[1]=e,n[2]=s):s=n[2];let c=s,l;n[3]===c?l=n[4]:(l=function(e){if(e){o(!0);return}c(!1)},n[3]=c,n[4]=l);let u=l,d;n[5]!==c||n[6]!==t?(d=function(){c(!0)&&(o(!1),t?.onEnabled?.())},n[5]=c,n[6]=t,n[7]=d):d=n[7];let f=d,p;return n[8]!==i||n[9]!==f||n[10]!==u?(p={confirmOpen:i,setConfirmOpen:o,onToggleRequest:u,onConfirm:f},n[8]=i,n[9]=f,n[10]=u,n[11]=p):p=n[11],p}async function P(e){let t=await fetch(`/api/sync/trigger`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({op:e})});if(!t.ok)throw Error(`sync trigger failed: ${t.status}`)}function F(e){let t=(0,C.c)(10),{open:n,onOpenChange:r,onConfirm:a}=e,s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,O.jsx)(m,{children:(0,O.jsx)(k,{})}),t[0]=s):s=t[0];let c;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,O.jsx)(d,{children:(0,O.jsx)(A,{})}),t[1]=c):c=t[1];let l;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,O.jsx)(p,{asChild:!0,children:(0,O.jsx)(o,{variant:`outline`,children:(0,O.jsx)(i,{id:`dEgA5A`})})}),t[2]=l):l=t[2];let g;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,O.jsx)(i,{id:`XU0OXn`}),t[3]=g):g=t[3];let _;t[4]===a?_=t[5]:(_=(0,O.jsxs)(u,{className:`sm:max-w-lg`,children:[s,c,(0,O.jsxs)(f,{children:[l,(0,O.jsx)(o,{onClick:a,children:g})]})]}),t[4]=a,t[5]=_);let v;return t[6]!==r||t[7]!==n||t[8]!==_?(v=(0,O.jsx)(h,{open:n,onOpenChange:r,children:_}),t[6]=r,t[7]=n,t[8]=_,t[9]=v):v=t[9],v}export{j as a,E as c,M as i,D as l,P as n,k as o,N as r,A as s,F as t};
@@ -1,4 +1,4 @@
1
- import{s as e}from"./chunk-Bj-mKKzh.js";import{n,r,t as i}from"./compiler-runtime-B6sxACDP.js";import{n as a,r as o}from"./dist-UKzQrqGt.js";import{a as s,c,i as l,n as u,o as d,r as f,s as p,t as m}from"./panel-BTJzrl0A.js";import{n as h}from"./dist-DA2I9IQS.js";import{n as g,t as _,u as v}from"./createLucideIcon-DkO1lL_8.js";import{i as y,n as b,t as x}from"./tooltip-C0qAzcHx.js";import{n as S,t as C}from"./toggle-group-Bl0XnVQW.js";import{H as w,J as T,ar as E,at as D,ft as ee,it as O}from"./dist-CurDB4OA.js";import{t as te}from"./arrow-up-right-hiEaTtOQ.js";import{a as ne,i as re,o as ie,t as ae}from"./prop-types-r4lrTXmC.js";import{t as oe}from"./triangle-alert-BRg1-EjD.js";import{t as k}from"./dist-D6ZXVw3E.js";import{o as se}from"./documents-events-BgIyZo2W.js";import{s as ce}from"./doc-hash-CZiGDoto.js";import{n as le}from"./external-link-BfiFPJEx.js";import{t as ue}from"./target-navigation-intent-CYYSTgIq.js";import{n as de}from"./isObjectLike-Dr_zHfrf.js";import{t as fe}from"./ordinal-DAW48Uby.js";import{n as pe,t as me}from"./min-CbV9N5TI.js";import{C as A,S as he,_ as ge,b as j,g as _e,n as M,r as ve,t as ye,v as be,w as xe,x as Se,y as Ce}from"./src-CSQC3Qr9.js";import{t as we}from"./colors-Cgzz_QdT.js";import{n as Te,t as N}from"./now-DCGRBsdR.js";var Ee=_(`maximize-2`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),De=_(`minimize-2`,[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]);function P(e,n){let r=0;if(n===void 0)for(let n of e)(n=+n)&&(r+=n);else{let i=-1;for(let a of e)(a=+n(a,++i,e))&&(r+=a)}return r}var Oe=e=>()=>e;function ke(e,{sourceEvent:n,subject:r,target:i,identifier:a,active:o,x:s,y:c,dx:l,dy:u,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:a,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:c,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}ke.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Ae(e){return!e.ctrlKey&&!e.button}function je(){return this.parentNode}function Me(e,n){return n??{x:e.x,y:e.y}}function Ne(){return navigator.maxTouchPoints||`ontouchstart`in this}function Pe(){var e=Ae,n=je,r=Me,i=Ne,a={},o=xe(`start`,`drag`,`end`),s=0,c,l,u,d,f=0;function p(e){e.on(`mousedown.drag`,m).filter(i).on(`touchstart.drag`,_).on(`touchmove.drag`,v,Ce).on(`touchend.drag touchcancel.drag`,y).style(`touch-action`,`none`).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}function m(r,i){if(!(d||!e.call(this,r,i))){var a=b(this,n.call(this,r,i),r,i,`mouse`);a&&(A(r.view).on(`mousemove.drag`,h,j).on(`mouseup.drag`,g,j),_e(r.view),Se(r),u=!1,c=r.clientX,l=r.clientY,a(`start`,r))}}function h(e){if(be(e),!u){var n=e.clientX-c,r=e.clientY-l;u=n*n+r*r>f}a.mouse(`drag`,e)}function g(e){A(e.view).on(`mousemove.drag mouseup.drag`,null),ge(e.view,u),be(e),a.mouse(`end`,e)}function _(r,i){if(e.call(this,r,i)){var a=r.changedTouches,o=n.call(this,r,i),s=a.length,c,l;for(c=0;c<s;++c)(l=b(this,o,r,i,a[c].identifier,a[c]))&&(Se(r),l(`start`,r,a[c]))}}function v(e){var n=e.changedTouches,r=n.length,i,o;for(i=0;i<r;++i)(o=a[n[i].identifier])&&(be(e),o(`drag`,e,n[i]))}function y(e){var n=e.changedTouches,r=n.length,i,o;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),i=0;i<r;++i)(o=a[n[i].identifier])&&(Se(e),o(`end`,e,n[i]))}function b(e,n,i,c,l,u){var d=o.copy(),f=he(u||i,n),m,h,g;if((g=r.call(e,new ke(`beforestart`,{sourceEvent:i,target:p,identifier:l,active:s,x:f[0],y:f[1],dx:0,dy:0,dispatch:d}),c))!=null)return m=g.x-f[0]||0,h=g.y-f[1]||0,function r(i,o,u){var _=f,v;switch(i){case`start`:a[l]=r,v=s++;break;case`end`:delete a[l],--s;case`drag`:f=he(u||o,n),v=s;break}d.call(i,e,new ke(i,{sourceEvent:o,subject:g,target:p,identifier:l,active:v,x:f[0]+m,y:f[1]+h,dx:f[0]-_[0],dy:f[1]-_[1],dispatch:d}),c)}}return p.filter=function(n){return arguments.length?(e=typeof n==`function`?n:Oe(!!n),p):e},p.container=function(e){return arguments.length?(n=typeof e==`function`?e:Oe(e),p):n},p.subject=function(e){return arguments.length?(r=typeof e==`function`?e:Oe(e),p):r},p.touchable=function(e){return arguments.length?(i=typeof e==`function`?e:Oe(!!e),p):i},p.on=function(){var e=o.on.apply(o,arguments);return e===o?p:e},p.clickDistance=function(e){return arguments.length?(f=(e=+e)*e,p):Math.sqrt(f)},p}function F(e){let n=+this._x.call(null,e),r=+this._y.call(null,e);return Fe(this.cover(n,r),n,r,e)}function Fe(e,n,r,i){if(isNaN(n)||isNaN(r))return e;var a,o=e._root,s={data:i},c=e._x0,l=e._y0,u=e._x1,d=e._y1,f,p,m,h,g,_,v,y;if(!o)return e._root=s,e;for(;o.length;)if((g=n>=(f=(c+u)/2))?c=f:u=f,(_=r>=(p=(l+d)/2))?l=p:d=p,a=o,!(o=o[v=_<<1|g]))return a[v]=s,e;if(m=+e._x.call(null,o.data),h=+e._y.call(null,o.data),n===m&&r===h)return s.next=o,a?a[v]=s:e._root=s,e;do a=a?a[v]=[,,,,]:e._root=[,,,,],(g=n>=(f=(c+u)/2))?c=f:u=f,(_=r>=(p=(l+d)/2))?l=p:d=p;while((v=_<<1|g)==(y=(h>=p)<<1|m>=f));return a[y]=o,a[v]=s,e}function Ie(e){var n,r,i=e.length,a,o,s=Array(i),c=Array(i),l=1/0,u=1/0,d=-1/0,f=-1/0;for(r=0;r<i;++r)isNaN(a=+this._x.call(null,n=e[r]))||isNaN(o=+this._y.call(null,n))||(s[r]=a,c[r]=o,a<l&&(l=a),a>d&&(d=a),o<u&&(u=o),o>f&&(f=o));if(l>d||u>f)return this;for(this.cover(l,u).cover(d,f),r=0;r<i;++r)Fe(this,s[r],c[r],e[r]);return this}function Le(e,n){if(isNaN(e=+e)||isNaN(n=+n))return this;var r=this._x0,i=this._y0,a=this._x1,o=this._y1;if(isNaN(r))a=(r=Math.floor(e))+1,o=(i=Math.floor(n))+1;else{for(var s=a-r||1,c=this._root,l,u;r>e||e>=a||i>n||n>=o;)switch(u=(n<i)<<1|e<r,l=[,,,,],l[u]=c,c=l,s*=2,u){case 0:a=r+s,o=i+s;break;case 1:r=a-s,o=i+s;break;case 2:a=r+s,i=o-s;break;case 3:r=a-s,i=o-s;break}this._root&&this._root.length&&(this._root=c)}return this._x0=r,this._y0=i,this._x1=a,this._y1=o,this}function Re(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function ze(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function I(e,n,r,i,a){this.node=e,this.x0=n,this.y0=r,this.x1=i,this.y1=a}function L(e,n,r){var i,a=this._x0,o=this._y0,s,c,l,u,d=this._x1,f=this._y1,p=[],m=this._root,h,g;for(m&&p.push(new I(m,a,o,d,f)),r==null?r=1/0:(a=e-r,o=n-r,d=e+r,f=n+r,r*=r);h=p.pop();)if(!(!(m=h.node)||(s=h.x0)>d||(c=h.y0)>f||(l=h.x1)<a||(u=h.y1)<o))if(m.length){var _=(s+l)/2,v=(c+u)/2;p.push(new I(m[3],_,v,l,u),new I(m[2],s,v,_,u),new I(m[1],_,c,l,v),new I(m[0],s,c,_,v)),(g=(n>=v)<<1|e>=_)&&(h=p[p.length-1],p[p.length-1]=p[p.length-1-g],p[p.length-1-g]=h)}else{var y=e-+this._x.call(null,m.data),b=n-+this._y.call(null,m.data),x=y*y+b*b;if(x<r){var S=Math.sqrt(r=x);a=e-S,o=n-S,d=e+S,f=n+S,i=m.data}}return i}function Be(e){if(isNaN(d=+this._x.call(null,e))||isNaN(f=+this._y.call(null,e)))return this;var n,r=this._root,i,a,o,s=this._x0,c=this._y0,l=this._x1,u=this._y1,d,f,p,m,h,g,_,v;if(!r)return this;if(r.length)for(;;){if((h=d>=(p=(s+l)/2))?s=p:l=p,(g=f>=(m=(c+u)/2))?c=m:u=m,n=r,!(r=r[_=g<<1|h]))return this;if(!r.length)break;(n[_+1&3]||n[_+2&3]||n[_+3&3])&&(i=n,v=_)}for(;r.data!==e;)if(a=r,!(r=r.next))return this;return(o=r.next)&&delete r.next,a?(o?a.next=o:delete a.next,this):n?(o?n[_]=o:delete n[_],(r=n[0]||n[1]||n[2]||n[3])&&r===(n[3]||n[2]||n[1]||n[0])&&!r.length&&(i?i[v]=r:this._root=r),this):(this._root=o,this)}function Ve(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function He(){return this._root}function R(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function Ue(e){var n=[],r,i=this._root,a,o,s,c,l;for(i&&n.push(new I(i,this._x0,this._y0,this._x1,this._y1));r=n.pop();)if(!e(i=r.node,o=r.x0,s=r.y0,c=r.x1,l=r.y1)&&i.length){var u=(o+c)/2,d=(s+l)/2;(a=i[3])&&n.push(new I(a,u,d,c,l)),(a=i[2])&&n.push(new I(a,o,d,u,l)),(a=i[1])&&n.push(new I(a,u,s,c,d)),(a=i[0])&&n.push(new I(a,o,s,u,d))}return this}function We(e){var n=[],r=[],i;for(this._root&&n.push(new I(this._root,this._x0,this._y0,this._x1,this._y1));i=n.pop();){var a=i.node;if(a.length){var o,s=i.x0,c=i.y0,l=i.x1,u=i.y1,d=(s+l)/2,f=(c+u)/2;(o=a[0])&&n.push(new I(o,s,c,d,f)),(o=a[1])&&n.push(new I(o,d,c,l,f)),(o=a[2])&&n.push(new I(o,s,f,d,u)),(o=a[3])&&n.push(new I(o,d,f,l,u))}r.push(i)}for(;i=r.pop();)e(i.node,i.x0,i.y0,i.x1,i.y1);return this}function Ge(e){return e[0]}function Ke(e){return arguments.length?(this._x=e,this):this._x}function qe(e){return e[1]}function Je(e){return arguments.length?(this._y=e,this):this._y}function z(e,n,r){var i=new Ye(n??Ge,r??qe,NaN,NaN,NaN,NaN);return e==null?i:i.addAll(e)}function Ye(e,n,r,i,a,o){this._x=e,this._y=n,this._x0=r,this._y0=i,this._x1=a,this._y1=o,this._root=void 0}function Xe(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var B=z.prototype=Ye.prototype;B.copy=function(){var e=new Ye(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root,r,i;if(!n)return e;if(!n.length)return e._root=Xe(n),e;for(r=[{source:n,target:e._root=[,,,,]}];n=r.pop();)for(var a=0;a<4;++a)(i=n.source[a])&&(i.length?r.push({source:i,target:n.target[a]=[,,,,]}):n.target[a]=Xe(i));return e},B.add=F,B.addAll=Ie,B.cover=Le,B.data=Re,B.extent=ze,B.find=L,B.remove=Be,B.removeAll=Ve,B.root=He,B.size=R,B.visit=Ue,B.visitAfter=We,B.x=Ke,B.y=Je;var Ze=we(`a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928`),V=r(),H=e(n(),1),Qe=i(),$e=`Expected a function`,et=Math.max,tt=Math.min;function nt(e,n,r){var i,a,o,s,c,l,u=0,d=!1,f=!1,p=!0;if(typeof e!=`function`)throw TypeError($e);n=Te(n)||0,de(r)&&(d=!!r.leading,f=`maxWait`in r,o=f?et(Te(r.maxWait)||0,n):o,p=`trailing`in r?!!r.trailing:p);function m(n){var r=i,o=a;return i=a=void 0,u=n,s=e.apply(o,r),s}function h(e){return u=e,c=setTimeout(v,n),d?m(e):s}function g(e){var r=e-l,i=e-u,a=n-r;return f?tt(a,o-i):a}function _(e){var r=e-l,i=e-u;return l===void 0||r>=n||r<0||f&&i>=o}function v(){var e=N();if(_(e))return y(e);c=setTimeout(v,g(e))}function y(e){return c=void 0,p&&i?m(e):(i=a=void 0,s)}function b(){c!==void 0&&clearTimeout(c),u=0,i=l=a=c=void 0}function x(){return c===void 0?s:y(N())}function S(){var e=N(),r=_(e);if(i=arguments,a=this,l=e,r){if(c===void 0)return h(l);if(f)return clearTimeout(c),c=setTimeout(v,n),m(l)}return c===void 0&&(c=setTimeout(v,n)),s}return S.cancel=b,S.flush=x,S}var rt=`Expected a function`;function it(e,n,r){var i=!0,a=!0;if(typeof e!=`function`)throw TypeError(rt);return de(r)&&(i=`leading`in r?!!r.leading:i,a=`trailing`in r?!!r.trailing:a),nt(e,n,{leading:i,maxWait:n,trailing:a})}var at=[`#60a5fa`,`#a78bfa`,`#34d399`,`#f472b6`,`#fb923c`,`#22d3ee`,`#c084fc`,`#4ade80`,`#f87171`,`#eab308`,`#ec4899`,`#06b67f`,`#8b5cf6`,`#f43f5e`,`#0ea5e9`,`#a855f7`],ot=[`#1e40af`,`#6b21a8`,`#166534`,`#9f1239`,`#9a3412`,`#164e63`,`#581c87`,`#166534`,`#991b1b`,`#854d0e`,`#831843`,`#0f766e`,`#312e81`,`#9f1239`,`#0c4a6e`,`#6b21a8`];function st(e){let n=2;for(let r=0;r<e.length;r++)n=Math.imul(n^e.charCodeAt(r),1540483477),n^=n>>>13,n=Math.imul(n,1540483477),n^=n>>>15;return n>>>0}function ct(e,n){let r=n?at:ot;return r[st(e)%r.length]}var lt={fullscreen:{maxEntries:10,containerClassName:`bottom-3 left-3 gap-1 rounded-lg px-3 py-2 text-xs`,titleClassName:`mb-1.5`,rowClassName:`gap-2`,swatchClassName:`size-2.5`,labelClassName:`max-w-[140px]`,overflowClassName:`pl-[18px]`},docked:{maxEntries:6,containerClassName:`bottom-2 left-2 gap-0.5 rounded-md px-2 py-1.5 text-[11px]`,titleClassName:`mb-1`,rowClassName:`gap-1.5`,swatchClassName:`size-2`,labelClassName:`max-w-[112px]`,overflowClassName:`pl-[14px]`}};function ut(e){return lt[e]}function dt(e){let n=(0,Qe.c)(6),{clusters:r,variant:i}=e,o=i===void 0?`fullscreen`:i,{resolvedTheme:s}=h(),c=s===`dark`,l,u;if(n[0]!==r||n[1]!==c||n[2]!==o){u=Symbol.for(`react.early_return_sentinel`);bb0:{let e=ut(o);if(r.length===0){u=null;break bb0}let i=r.slice(0,e.maxEntries),s=r.length-i.length,d;n[5]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,V.jsx)(a,{id:`kmKqZg`}),n[5]=d):d=n[5],l=(0,V.jsxs)(`div`,{className:v(`pointer-events-none absolute z-10 flex flex-col backdrop-blur-sm`,e.containerClassName,c?`bg-black/70 text-gray-200`:`bg-white/80 text-gray-800 ring-1 ring-black/5`),children:[(0,V.jsx)(`div`,{className:v(`font-medium`,e.titleClassName,c?`text-slate-300`:`text-slate-700`),children:d}),i.map(n=>(0,V.jsxs)(`div`,{className:v(`flex items-center`,e.rowClassName),children:[(0,V.jsx)(`span`,{className:v(`inline-block shrink-0 rounded-full`,e.swatchClassName),style:{backgroundColor:ct(n,c)}}),(0,V.jsx)(`span`,{className:v(`truncate`,e.labelClassName),children:n})]},n)),s>0&&(0,V.jsx)(`div`,{className:v(`text-muted-foreground`,e.overflowClassName),children:(0,V.jsx)(a,{id:`lrhetp`,values:{overflow:s}})})]})}n[0]=r,n[1]=c,n[2]=o,n[3]=l,n[4]=u}else l=n[3],u=n[4];return u===Symbol.for(`react.early_return_sentinel`)?l:u}function ft(e,n){var r=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(r!=null){var i,a,o,s,c=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,n===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=o.call(r)).done)&&(c.push(i.value),c.length!==n);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return c}}function pt(e,n,r){return n=wt(n),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function mt(e,n){return _t(e)||ft(e,n)||yt(e,n)||St()}function ht(e){return gt(e)||vt(e)||yt(e)||xt()}function gt(e){if(Array.isArray(e))return bt(e)}function _t(e){if(Array.isArray(e))return e}function vt(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function yt(e,n){if(e){if(typeof e==`string`)return bt(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);if(r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`)return Array.from(e);if(r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bt(e,n)}}function bt(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function xt(){throw TypeError(`Invalid attempt to spread non-iterable instance.
1
+ import{s as e}from"./chunk-Bj-mKKzh.js";import{n,r,t as i}from"./compiler-runtime-B6sxACDP.js";import{n as a,r as o}from"./dist-UKzQrqGt.js";import{a as s,c,i as l,n as u,o as d,r as f,s as p,t as m}from"./panel-BTJzrl0A.js";import{n as h}from"./dist-DA2I9IQS.js";import{n as g,t as _,u as v}from"./createLucideIcon-DkO1lL_8.js";import{i as y,n as b,t as x}from"./tooltip-C0qAzcHx.js";import{n as S,t as C}from"./toggle-group-Bl0XnVQW.js";import{H as w,J as T,ar as E,at as D,ft as ee,it as O}from"./dist-DkRtDyLN.js";import{t as te}from"./arrow-up-right-hiEaTtOQ.js";import{a as ne,i as re,o as ie,t as ae}from"./prop-types-Cr0Uib4q.js";import{t as oe}from"./triangle-alert-BRg1-EjD.js";import{t as k}from"./dist-D6ZXVw3E.js";import{o as se}from"./documents-events-CJpJUM_N.js";import{s as ce}from"./doc-hash-BDRwCcvB.js";import{n as le}from"./external-link-BfiFPJEx.js";import{t as ue}from"./target-navigation-intent-BFsJN8Kr.js";import{n as de}from"./isObjectLike-Dr_zHfrf.js";import{t as fe}from"./ordinal-DAW48Uby.js";import{n as pe,t as me}from"./min-CbV9N5TI.js";import{C as A,S as he,_ as ge,b as j,g as _e,n as M,r as ve,t as ye,v as be,w as xe,x as Se,y as Ce}from"./src-CSQC3Qr9.js";import{t as we}from"./colors-Cgzz_QdT.js";import{n as Te,t as N}from"./now-DCGRBsdR.js";var Ee=_(`maximize-2`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),De=_(`minimize-2`,[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]);function P(e,n){let r=0;if(n===void 0)for(let n of e)(n=+n)&&(r+=n);else{let i=-1;for(let a of e)(a=+n(a,++i,e))&&(r+=a)}return r}var Oe=e=>()=>e;function ke(e,{sourceEvent:n,subject:r,target:i,identifier:a,active:o,x:s,y:c,dx:l,dy:u,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:a,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:c,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}ke.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Ae(e){return!e.ctrlKey&&!e.button}function je(){return this.parentNode}function Me(e,n){return n??{x:e.x,y:e.y}}function Ne(){return navigator.maxTouchPoints||`ontouchstart`in this}function Pe(){var e=Ae,n=je,r=Me,i=Ne,a={},o=xe(`start`,`drag`,`end`),s=0,c,l,u,d,f=0;function p(e){e.on(`mousedown.drag`,m).filter(i).on(`touchstart.drag`,_).on(`touchmove.drag`,v,Ce).on(`touchend.drag touchcancel.drag`,y).style(`touch-action`,`none`).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}function m(r,i){if(!(d||!e.call(this,r,i))){var a=b(this,n.call(this,r,i),r,i,`mouse`);a&&(A(r.view).on(`mousemove.drag`,h,j).on(`mouseup.drag`,g,j),_e(r.view),Se(r),u=!1,c=r.clientX,l=r.clientY,a(`start`,r))}}function h(e){if(be(e),!u){var n=e.clientX-c,r=e.clientY-l;u=n*n+r*r>f}a.mouse(`drag`,e)}function g(e){A(e.view).on(`mousemove.drag mouseup.drag`,null),ge(e.view,u),be(e),a.mouse(`end`,e)}function _(r,i){if(e.call(this,r,i)){var a=r.changedTouches,o=n.call(this,r,i),s=a.length,c,l;for(c=0;c<s;++c)(l=b(this,o,r,i,a[c].identifier,a[c]))&&(Se(r),l(`start`,r,a[c]))}}function v(e){var n=e.changedTouches,r=n.length,i,o;for(i=0;i<r;++i)(o=a[n[i].identifier])&&(be(e),o(`drag`,e,n[i]))}function y(e){var n=e.changedTouches,r=n.length,i,o;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),i=0;i<r;++i)(o=a[n[i].identifier])&&(Se(e),o(`end`,e,n[i]))}function b(e,n,i,c,l,u){var d=o.copy(),f=he(u||i,n),m,h,g;if((g=r.call(e,new ke(`beforestart`,{sourceEvent:i,target:p,identifier:l,active:s,x:f[0],y:f[1],dx:0,dy:0,dispatch:d}),c))!=null)return m=g.x-f[0]||0,h=g.y-f[1]||0,function r(i,o,u){var _=f,v;switch(i){case`start`:a[l]=r,v=s++;break;case`end`:delete a[l],--s;case`drag`:f=he(u||o,n),v=s;break}d.call(i,e,new ke(i,{sourceEvent:o,subject:g,target:p,identifier:l,active:v,x:f[0]+m,y:f[1]+h,dx:f[0]-_[0],dy:f[1]-_[1],dispatch:d}),c)}}return p.filter=function(n){return arguments.length?(e=typeof n==`function`?n:Oe(!!n),p):e},p.container=function(e){return arguments.length?(n=typeof e==`function`?e:Oe(e),p):n},p.subject=function(e){return arguments.length?(r=typeof e==`function`?e:Oe(e),p):r},p.touchable=function(e){return arguments.length?(i=typeof e==`function`?e:Oe(!!e),p):i},p.on=function(){var e=o.on.apply(o,arguments);return e===o?p:e},p.clickDistance=function(e){return arguments.length?(f=(e=+e)*e,p):Math.sqrt(f)},p}function F(e){let n=+this._x.call(null,e),r=+this._y.call(null,e);return Fe(this.cover(n,r),n,r,e)}function Fe(e,n,r,i){if(isNaN(n)||isNaN(r))return e;var a,o=e._root,s={data:i},c=e._x0,l=e._y0,u=e._x1,d=e._y1,f,p,m,h,g,_,v,y;if(!o)return e._root=s,e;for(;o.length;)if((g=n>=(f=(c+u)/2))?c=f:u=f,(_=r>=(p=(l+d)/2))?l=p:d=p,a=o,!(o=o[v=_<<1|g]))return a[v]=s,e;if(m=+e._x.call(null,o.data),h=+e._y.call(null,o.data),n===m&&r===h)return s.next=o,a?a[v]=s:e._root=s,e;do a=a?a[v]=[,,,,]:e._root=[,,,,],(g=n>=(f=(c+u)/2))?c=f:u=f,(_=r>=(p=(l+d)/2))?l=p:d=p;while((v=_<<1|g)==(y=(h>=p)<<1|m>=f));return a[y]=o,a[v]=s,e}function Ie(e){var n,r,i=e.length,a,o,s=Array(i),c=Array(i),l=1/0,u=1/0,d=-1/0,f=-1/0;for(r=0;r<i;++r)isNaN(a=+this._x.call(null,n=e[r]))||isNaN(o=+this._y.call(null,n))||(s[r]=a,c[r]=o,a<l&&(l=a),a>d&&(d=a),o<u&&(u=o),o>f&&(f=o));if(l>d||u>f)return this;for(this.cover(l,u).cover(d,f),r=0;r<i;++r)Fe(this,s[r],c[r],e[r]);return this}function Le(e,n){if(isNaN(e=+e)||isNaN(n=+n))return this;var r=this._x0,i=this._y0,a=this._x1,o=this._y1;if(isNaN(r))a=(r=Math.floor(e))+1,o=(i=Math.floor(n))+1;else{for(var s=a-r||1,c=this._root,l,u;r>e||e>=a||i>n||n>=o;)switch(u=(n<i)<<1|e<r,l=[,,,,],l[u]=c,c=l,s*=2,u){case 0:a=r+s,o=i+s;break;case 1:r=a-s,o=i+s;break;case 2:a=r+s,i=o-s;break;case 3:r=a-s,i=o-s;break}this._root&&this._root.length&&(this._root=c)}return this._x0=r,this._y0=i,this._x1=a,this._y1=o,this}function Re(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function ze(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function I(e,n,r,i,a){this.node=e,this.x0=n,this.y0=r,this.x1=i,this.y1=a}function L(e,n,r){var i,a=this._x0,o=this._y0,s,c,l,u,d=this._x1,f=this._y1,p=[],m=this._root,h,g;for(m&&p.push(new I(m,a,o,d,f)),r==null?r=1/0:(a=e-r,o=n-r,d=e+r,f=n+r,r*=r);h=p.pop();)if(!(!(m=h.node)||(s=h.x0)>d||(c=h.y0)>f||(l=h.x1)<a||(u=h.y1)<o))if(m.length){var _=(s+l)/2,v=(c+u)/2;p.push(new I(m[3],_,v,l,u),new I(m[2],s,v,_,u),new I(m[1],_,c,l,v),new I(m[0],s,c,_,v)),(g=(n>=v)<<1|e>=_)&&(h=p[p.length-1],p[p.length-1]=p[p.length-1-g],p[p.length-1-g]=h)}else{var y=e-+this._x.call(null,m.data),b=n-+this._y.call(null,m.data),x=y*y+b*b;if(x<r){var S=Math.sqrt(r=x);a=e-S,o=n-S,d=e+S,f=n+S,i=m.data}}return i}function Be(e){if(isNaN(d=+this._x.call(null,e))||isNaN(f=+this._y.call(null,e)))return this;var n,r=this._root,i,a,o,s=this._x0,c=this._y0,l=this._x1,u=this._y1,d,f,p,m,h,g,_,v;if(!r)return this;if(r.length)for(;;){if((h=d>=(p=(s+l)/2))?s=p:l=p,(g=f>=(m=(c+u)/2))?c=m:u=m,n=r,!(r=r[_=g<<1|h]))return this;if(!r.length)break;(n[_+1&3]||n[_+2&3]||n[_+3&3])&&(i=n,v=_)}for(;r.data!==e;)if(a=r,!(r=r.next))return this;return(o=r.next)&&delete r.next,a?(o?a.next=o:delete a.next,this):n?(o?n[_]=o:delete n[_],(r=n[0]||n[1]||n[2]||n[3])&&r===(n[3]||n[2]||n[1]||n[0])&&!r.length&&(i?i[v]=r:this._root=r),this):(this._root=o,this)}function Ve(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function He(){return this._root}function R(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function Ue(e){var n=[],r,i=this._root,a,o,s,c,l;for(i&&n.push(new I(i,this._x0,this._y0,this._x1,this._y1));r=n.pop();)if(!e(i=r.node,o=r.x0,s=r.y0,c=r.x1,l=r.y1)&&i.length){var u=(o+c)/2,d=(s+l)/2;(a=i[3])&&n.push(new I(a,u,d,c,l)),(a=i[2])&&n.push(new I(a,o,d,u,l)),(a=i[1])&&n.push(new I(a,u,s,c,d)),(a=i[0])&&n.push(new I(a,o,s,u,d))}return this}function We(e){var n=[],r=[],i;for(this._root&&n.push(new I(this._root,this._x0,this._y0,this._x1,this._y1));i=n.pop();){var a=i.node;if(a.length){var o,s=i.x0,c=i.y0,l=i.x1,u=i.y1,d=(s+l)/2,f=(c+u)/2;(o=a[0])&&n.push(new I(o,s,c,d,f)),(o=a[1])&&n.push(new I(o,d,c,l,f)),(o=a[2])&&n.push(new I(o,s,f,d,u)),(o=a[3])&&n.push(new I(o,d,f,l,u))}r.push(i)}for(;i=r.pop();)e(i.node,i.x0,i.y0,i.x1,i.y1);return this}function Ge(e){return e[0]}function Ke(e){return arguments.length?(this._x=e,this):this._x}function qe(e){return e[1]}function Je(e){return arguments.length?(this._y=e,this):this._y}function z(e,n,r){var i=new Ye(n??Ge,r??qe,NaN,NaN,NaN,NaN);return e==null?i:i.addAll(e)}function Ye(e,n,r,i,a,o){this._x=e,this._y=n,this._x0=r,this._y0=i,this._x1=a,this._y1=o,this._root=void 0}function Xe(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var B=z.prototype=Ye.prototype;B.copy=function(){var e=new Ye(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root,r,i;if(!n)return e;if(!n.length)return e._root=Xe(n),e;for(r=[{source:n,target:e._root=[,,,,]}];n=r.pop();)for(var a=0;a<4;++a)(i=n.source[a])&&(i.length?r.push({source:i,target:n.target[a]=[,,,,]}):n.target[a]=Xe(i));return e},B.add=F,B.addAll=Ie,B.cover=Le,B.data=Re,B.extent=ze,B.find=L,B.remove=Be,B.removeAll=Ve,B.root=He,B.size=R,B.visit=Ue,B.visitAfter=We,B.x=Ke,B.y=Je;var Ze=we(`a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928`),V=r(),H=e(n(),1),Qe=i(),$e=`Expected a function`,et=Math.max,tt=Math.min;function nt(e,n,r){var i,a,o,s,c,l,u=0,d=!1,f=!1,p=!0;if(typeof e!=`function`)throw TypeError($e);n=Te(n)||0,de(r)&&(d=!!r.leading,f=`maxWait`in r,o=f?et(Te(r.maxWait)||0,n):o,p=`trailing`in r?!!r.trailing:p);function m(n){var r=i,o=a;return i=a=void 0,u=n,s=e.apply(o,r),s}function h(e){return u=e,c=setTimeout(v,n),d?m(e):s}function g(e){var r=e-l,i=e-u,a=n-r;return f?tt(a,o-i):a}function _(e){var r=e-l,i=e-u;return l===void 0||r>=n||r<0||f&&i>=o}function v(){var e=N();if(_(e))return y(e);c=setTimeout(v,g(e))}function y(e){return c=void 0,p&&i?m(e):(i=a=void 0,s)}function b(){c!==void 0&&clearTimeout(c),u=0,i=l=a=c=void 0}function x(){return c===void 0?s:y(N())}function S(){var e=N(),r=_(e);if(i=arguments,a=this,l=e,r){if(c===void 0)return h(l);if(f)return clearTimeout(c),c=setTimeout(v,n),m(l)}return c===void 0&&(c=setTimeout(v,n)),s}return S.cancel=b,S.flush=x,S}var rt=`Expected a function`;function it(e,n,r){var i=!0,a=!0;if(typeof e!=`function`)throw TypeError(rt);return de(r)&&(i=`leading`in r?!!r.leading:i,a=`trailing`in r?!!r.trailing:a),nt(e,n,{leading:i,maxWait:n,trailing:a})}var at=[`#60a5fa`,`#a78bfa`,`#34d399`,`#f472b6`,`#fb923c`,`#22d3ee`,`#c084fc`,`#4ade80`,`#f87171`,`#eab308`,`#ec4899`,`#06b67f`,`#8b5cf6`,`#f43f5e`,`#0ea5e9`,`#a855f7`],ot=[`#1e40af`,`#6b21a8`,`#166534`,`#9f1239`,`#9a3412`,`#164e63`,`#581c87`,`#166534`,`#991b1b`,`#854d0e`,`#831843`,`#0f766e`,`#312e81`,`#9f1239`,`#0c4a6e`,`#6b21a8`];function st(e){let n=2;for(let r=0;r<e.length;r++)n=Math.imul(n^e.charCodeAt(r),1540483477),n^=n>>>13,n=Math.imul(n,1540483477),n^=n>>>15;return n>>>0}function ct(e,n){let r=n?at:ot;return r[st(e)%r.length]}var lt={fullscreen:{maxEntries:10,containerClassName:`bottom-3 left-3 gap-1 rounded-lg px-3 py-2 text-xs`,titleClassName:`mb-1.5`,rowClassName:`gap-2`,swatchClassName:`size-2.5`,labelClassName:`max-w-[140px]`,overflowClassName:`pl-[18px]`},docked:{maxEntries:6,containerClassName:`bottom-2 left-2 gap-0.5 rounded-md px-2 py-1.5 text-[11px]`,titleClassName:`mb-1`,rowClassName:`gap-1.5`,swatchClassName:`size-2`,labelClassName:`max-w-[112px]`,overflowClassName:`pl-[14px]`}};function ut(e){return lt[e]}function dt(e){let n=(0,Qe.c)(6),{clusters:r,variant:i}=e,o=i===void 0?`fullscreen`:i,{resolvedTheme:s}=h(),c=s===`dark`,l,u;if(n[0]!==r||n[1]!==c||n[2]!==o){u=Symbol.for(`react.early_return_sentinel`);bb0:{let e=ut(o);if(r.length===0){u=null;break bb0}let i=r.slice(0,e.maxEntries),s=r.length-i.length,d;n[5]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,V.jsx)(a,{id:`kmKqZg`}),n[5]=d):d=n[5],l=(0,V.jsxs)(`div`,{className:v(`pointer-events-none absolute z-10 flex flex-col backdrop-blur-sm`,e.containerClassName,c?`bg-black/70 text-gray-200`:`bg-white/80 text-gray-800 ring-1 ring-black/5`),children:[(0,V.jsx)(`div`,{className:v(`font-medium`,e.titleClassName,c?`text-slate-300`:`text-slate-700`),children:d}),i.map(n=>(0,V.jsxs)(`div`,{className:v(`flex items-center`,e.rowClassName),children:[(0,V.jsx)(`span`,{className:v(`inline-block shrink-0 rounded-full`,e.swatchClassName),style:{backgroundColor:ct(n,c)}}),(0,V.jsx)(`span`,{className:v(`truncate`,e.labelClassName),children:n})]},n)),s>0&&(0,V.jsx)(`div`,{className:v(`text-muted-foreground`,e.overflowClassName),children:(0,V.jsx)(a,{id:`lrhetp`,values:{overflow:s}})})]})}n[0]=r,n[1]=c,n[2]=o,n[3]=l,n[4]=u}else l=n[3],u=n[4];return u===Symbol.for(`react.early_return_sentinel`)?l:u}function ft(e,n){var r=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(r!=null){var i,a,o,s,c=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,n===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=o.call(r)).done)&&(c.push(i.value),c.length!==n);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return c}}function pt(e,n,r){return n=wt(n),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function mt(e,n){return _t(e)||ft(e,n)||yt(e,n)||St()}function ht(e){return gt(e)||vt(e)||yt(e)||xt()}function gt(e){if(Array.isArray(e))return bt(e)}function _t(e){if(Array.isArray(e))return e}function vt(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function yt(e,n){if(e){if(typeof e==`string`)return bt(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);if(r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`)return Array.from(e);if(r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bt(e,n)}}function bt(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function xt(){throw TypeError(`Invalid attempt to spread non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function St(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
3
3
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ct(e,n){if(typeof e!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n||`default`);if(typeof i!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(e)}function wt(e){var n=Ct(e,`string`);return typeof n==`symbol`?n:String(n)}var Tt=function(e,n){var r=new Set(n);return Object.assign.apply(Object,[{}].concat(ht(Object.entries(e).filter(function(e){var n=mt(e,1)[0];return!r.has(n)}).map(function(e){var n=mt(e,2),r=n[0],i=n[1];return pt({},r,i)}))))};function Et(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function Dt(e){if(Array.isArray(e))return e}function Ot(e){if(Array.isArray(e))return Et(e)}function kt(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function At(e,n){var r=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(r!=null){var i,a,o,s,c=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,n!==0)for(;!(l=(i=o.call(r)).done)&&(c.push(i.value),c.length!==n);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return c}}function jt(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
4
4
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mt(){throw TypeError(`Invalid attempt to spread non-iterable instance.
@@ -1 +1 @@
1
- import{s as e}from"./chunk-Bj-mKKzh.js";import{n as t,r as n,t as r}from"./compiler-runtime-B6sxACDP.js";import{ct as i,n as a,ot as o}from"./DocumentContext-ogFq9Apo.js";import{n as s,r as c}from"./dist-UKzQrqGt.js";import{n as l,t as u,u as d}from"./createLucideIcon-DkO1lL_8.js";import{c as f,s as p}from"./skills-api-ChqmqNEn.js";import{Er as m,Fr as h,Gt as g,Mt as _,St as v,xr as y}from"./dist-CurDB4OA.js";import{h as b,r as x,t as S}from"./PropertyPanel-DpYcGGW2.js";import{c as C,i as w,s as T}from"./workspace-paths-DGpjh0_R.js";import{i as E,t as D}from"./open-managed-artifact-tab-jUT5uxaf.js";import{n as O}from"./dist-DyPw7rC6.js";import{t as ee}from"./input-C1P6Hf22.js";import{t as te}from"./textarea-BdasFVsT.js";var ne=u(`folder-git-2`,[[`path`,{d:`M18 19a5 5 0 0 1-5-5v8`,key:`sz5oeg`}],[`path`,{d:`M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5`,key:`1w6njk`}],[`circle`,{cx:`13`,cy:`12`,r:`2`,key:`1j92g6`}],[`circle`,{cx:`20`,cy:`19`,r:`2`,key:`1obnsp`}]]),k=r(),A=e(t(),1),j=n(),M=[`name`];function N(e){let t=(0,k.c)(46),{provider:n,name:r,scopeControl:i,onRename:a,nameError:o,onNameDraftChange:u,nameEditable:f}=e,p=f===void 0?!0:f,{_:m}=c(),h=(0,A.useId)(),g=(0,A.useId)(),_=C(),[y,x]=(0,A.useState)(r),T,E;t[0]===r?(T=t[1],E=t[2]):(T=()=>x(r),E=[r],t[0]=r,t[1]=T,t[2]=E),(0,A.useEffect)(T,E);let D,O;t[3]===y?(D=t[4],O=t[5]):(O=y.trim(),D=O!==``&&!v.test(O),t[3]=y,t[4]=D,t[5]=O);let te=D,N;t[6]!==r||t[7]!==te||t[8]!==a||t[9]!==O?(N=function(){a&&(te||O===``||O===r||a(O))},t[6]=r,t[7]=te,t[8]=a,t[9]=O,t[10]=N):N=t[10];let F=N,I=te||!!o,L;t[11]!==m||t[12]!==i||t[13]!==g||t[14]!==_?(L=i?(0,j.jsx)(re,{icon:(0,j.jsx)(ne,{className:`size-3.5`}),label:m({id:`oCHfGC`}),htmlFor:g,children:(0,j.jsxs)(`fieldset`,{id:g,className:`m-0 inline-flex items-center gap-1 rounded-full border-0 bg-muted/60 p-0.5`,children:[(0,j.jsx)(`legend`,{className:`sr-only`,children:m({id:`KszKI_`})}),w.map(e=>{let t=i.scope===e;return(0,j.jsx)(l,{type:`button`,"aria-pressed":t,variant:`ghost`,size:`sm`,onClick:()=>{t||i.onScopeChange(e)},className:d(`h-6 rounded-full px-3 text-xs font-medium`,t?e===`global`?`bg-violet-700 text-white hover:bg-violet-700 hover:text-white`:`bg-sky-700 text-white hover:bg-sky-700 hover:text-white`:`text-muted-foreground hover:bg-transparent hover:text-foreground`),children:_[e]},e)})]})}):null,t[11]=m,t[12]=i,t[13]=g,t[14]=_,t[15]=L):L=t[15];let ie;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(ie=(0,j.jsx)(b,{className:`size-3.5`}),t[16]=ie):ie=t[16];let R;t[17]===m?R=t[18]:(R=m({id:`XmJfZT`}),t[17]=m,t[18]=R);let z=!p,B;t[19]===u?B=t[20]:(B=e=>{let t=e.target.value;x(t),u?.(t)},t[19]=u,t[20]=B);let V=I?`${h}-error`:void 0,H;t[21]!==F||t[22]!==y||t[23]!==h||t[24]!==I||t[25]!==B||t[26]!==V||t[27]!==z?(H=(0,j.jsx)(ee,{id:h,"data-testid":`skill-name-input`,value:y,readOnly:z,onChange:B,onBlur:F,onKeyDown:P,"aria-invalid":I,"aria-describedby":V,className:`h-7 rounded-sm border-transparent bg-transparent px-2 font-mono text-sm shadow-none focus-visible:border-transparent focus-visible:bg-muted focus-visible:ring-0 dark:bg-transparent`}),t[21]=F,t[22]=y,t[23]=h,t[24]=I,t[25]=B,t[26]=V,t[27]=z,t[28]=H):H=t[28];let U;t[29]!==o||t[30]!==h||t[31]!==I?(U=I?(0,j.jsx)(`p`,{id:`${h}-error`,className:`px-1 pt-0.5 text-[11px] text-destructive`,children:o||(0,j.jsx)(s,{id:`A50vr3`,components:{0:(0,j.jsx)(`code`,{className:`font-mono`})}})}):(0,j.jsx)(`p`,{className:`px-1 pt-0.5 text-[11px] text-muted-foreground`,children:(0,j.jsx)(s,{id:`1hvhf0`})}),t[29]=o,t[30]=h,t[31]=I,t[32]=U):U=t[32];let W;t[33]!==h||t[34]!==H||t[35]!==U||t[36]!==R?(W=(0,j.jsxs)(re,{icon:ie,label:R,htmlFor:h,children:[H,U]}),t[33]=h,t[34]=H,t[35]=U,t[36]=R,t[37]=W):W=t[37];let G;t[38]!==W||t[39]!==L?(G=(0,j.jsxs)(`div`,{className:`editor-content-aligned gap-0.5 pt-4`,children:[L,W]}),t[38]=W,t[39]=L,t[40]=G):G=t[40];let K;t[41]===n?K=t[42]:(K=(0,j.jsx)(S,{provider:n,reservedKeys:M}),t[41]=n,t[42]=K);let q;return t[43]!==G||t[44]!==K?(q=(0,j.jsxs)(`div`,{className:`flex flex-col`,children:[G,K]}),t[43]=G,t[44]=K,t[45]=q):q=t[45],q}function P(e){e.key===`Enter`&&e.currentTarget.blur()}function re(e){let t=(0,k.c)(14),{icon:n,label:r,htmlFor:i,children:a}=e,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,j.jsx)(`span`,{"aria-hidden":!0,className:`h-7 w-4 shrink-0`}),t[0]=o):o=t[0];let s;t[1]===n?s=t[2]:(s=(0,j.jsx)(`span`,{className:`flex size-7 shrink-0 items-center justify-center text-muted-foreground`,children:n}),t[1]=n,t[2]=s);let c;t[3]!==i||t[4]!==r?(c=(0,j.jsx)(`label`,{htmlFor:i,className:`flex h-7 w-32 shrink-0 items-center truncate px-2 text-sm text-muted-foreground`,children:r}),t[3]=i,t[4]=r,t[5]=c):c=t[5];let l;t[6]!==s||t[7]!==c?(l=(0,j.jsxs)(`div`,{className:`flex items-center gap-1`,children:[s,c]}),t[6]=s,t[7]=c,t[8]=l):l=t[8];let u;t[9]===a?u=t[10]:(u=(0,j.jsx)(`div`,{className:`min-w-0 flex-1`,children:a}),t[9]=a,t[10]=u);let d;return t[11]!==l||t[12]!==u?(d=(0,j.jsxs)(`div`,{className:`flex items-start gap-1 py-0.5`,children:[o,l,u]}),t[11]=l,t[12]=u,t[13]=d):d=t[13],d}function F(e,t){let n=e.current().map[t];return typeof n==`string`?n:``}function I(e,t){let n=(0,k.c)(15),[r,i]=(0,A.useState)(null),a;n[0]!==t||n[1]!==e?(a=()=>{let n=g(e),r=F(n,t);return n.dispose(),r},n[0]=t,n[1]=e,n[2]=a):a=n[2];let[o,s]=(0,A.useState)(a),c=(0,A.useRef)(!1),l,u;n[3]!==t||n[4]!==e?(l=()=>{let n=g(e);i(n),s(F(n,t));let r=n.subscribe(()=>{c.current||s(F(n,t))});return()=>{r(),n.dispose(),i(e=>e===n?null:e)}},u=[e,t],n[3]=t,n[4]=e,n[5]=l,n[6]=u):(l=n[5],u=n[6]),(0,A.useEffect)(l,u);let d;n[7]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>{c.current=!0},n[7]=d):d=n[7];let f;n[8]!==r||n[9]!==t||n[10]!==o?(f=()=>{c.current=!1,r&&o!==F(r,t)&&r.patch({[t]:o})},n[8]=r,n[9]=t,n[10]=o,n[11]=f):f=n[11];let p;return n[12]!==f||n[13]!==o?(p={value:o,setValue:s,onFocus:d,onBlur:f},n[12]=f,n[13]=o,n[14]=p):p=n[14],p}function L(e){let t=(0,k.c)(76),{provider:n,name:r,folder:i,onRename:a,nameError:o}=e,{_:l}=c(),u=(0,A.useId)(),d=(0,A.useId)(),f=(0,A.useId)(),p=(0,A.useId)(),m=I(n,`title`),h=I(n,`description`),[g,v]=(0,A.useState)(r),y,S;t[0]===r?(y=t[1],S=t[2]):(y=()=>v(r),S=[r],t[0]=r,t[1]=y,t[2]=S),(0,A.useEffect)(y,S);let C,w;t[3]===g?(C=t[4],w=t[5]):(w=g.trim(),C=w!==``&&!_.test(w),t[3]=g,t[4]=C,t[5]=w);let T=C,E;t[6]!==r||t[7]!==T||t[8]!==a||t[9]!==w?(E=function(){a&&(T||w===``||w===r||a(w))},t[6]=r,t[7]=T,t[8]=a,t[9]=w,t[10]=E):E=t[10];let D=E,O=T||!!o,M;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,j.jsx)(s,{id:`l_UFPv`}),t[11]=M):M=t[11];let N;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,j.jsx)(ne,{className:`size-3.5`}),t[12]=N):N=t[12];let P;t[13]===l?P=t[14]:(P=l({id:`ugoTXs`}),t[13]=l,t[14]=P);let re=i||`/`,F;t[15]!==p||t[16]!==re?(F=(0,j.jsx)(ee,{id:p,value:re,readOnly:!0,className:`h-8 border-input bg-transparent px-2 font-mono text-muted-foreground shadow-none`}),t[15]=p,t[16]=re,t[17]=F):F=t[17];let L;t[18]!==p||t[19]!==P||t[20]!==F?(L=(0,j.jsx)(R,{icon:N,label:P,htmlFor:p,children:F}),t[18]=p,t[19]=P,t[20]=F,t[21]=L):L=t[21];let z;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,j.jsx)(b,{className:`size-3.5`}),t[22]=z):z=t[22];let B;t[23]===l?B=t[24]:(B=l({id:`XmJfZT`}),t[23]=l,t[24]=B);let V;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(V=e=>v(e.target.value),t[25]=V):V=t[25];let H;t[26]!==D||t[27]!==g||t[28]!==u||t[29]!==O?(H=(0,j.jsx)(ee,{id:u,"data-testid":`template-name-input`,value:g,onChange:V,onBlur:D,onKeyDown:ie,"aria-invalid":O,className:`h-8 border-input bg-transparent px-2 font-mono shadow-none focus-visible:bg-muted/30`}),t[26]=D,t[27]=g,t[28]=u,t[29]=O,t[30]=H):H=t[30];let U;t[31]!==o||t[32]!==O?(U=O?(0,j.jsx)(`p`,{className:`px-1 pt-0.5 text-[11px] text-destructive`,children:o||(0,j.jsx)(s,{id:`lI0Td2`,components:{0:(0,j.jsx)(`code`,{className:`font-mono`}),1:(0,j.jsx)(`code`,{className:`font-mono`})}})}):(0,j.jsx)(`p`,{className:`px-1 pt-0.5 text-[11px] text-muted-foreground`,children:(0,j.jsx)(s,{id:`QfFBdJ`})}),t[31]=o,t[32]=O,t[33]=U):U=t[33];let W;t[34]!==u||t[35]!==B||t[36]!==H||t[37]!==U?(W=(0,j.jsxs)(R,{icon:z,label:B,htmlFor:u,children:[H,U]}),t[34]=u,t[35]=B,t[36]=H,t[37]=U,t[38]=W):W=t[38];let G;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,j.jsx)(b,{className:`size-3.5`}),t[39]=G):G=t[39];let K;t[40]===l?K=t[41]:(K=l({id:`q7F5am`}),t[40]=l,t[41]=K);let q;t[42]===m?q=t[43]:(q=e=>m.setValue(e.target.value),t[42]=m,t[43]=q);let J;t[44]!==q||t[45]!==m.onBlur||t[46]!==m.onFocus||t[47]!==m.value||t[48]!==d?(J=(0,j.jsx)(ee,{id:d,"data-testid":`template-title-input`,value:m.value,onChange:q,onFocus:m.onFocus,onBlur:m.onBlur,className:`h-8 border-input bg-transparent px-2 shadow-none focus-visible:bg-muted/30`}),t[44]=q,t[45]=m.onBlur,t[46]=m.onFocus,t[47]=m.value,t[48]=d,t[49]=J):J=t[49];let ae;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(0,j.jsx)(`p`,{className:`px-1 pt-0.5 text-[11px] text-muted-foreground`,children:(0,j.jsx)(s,{id:`5e1Dri`})}),t[50]=ae):ae=t[50];let Y;t[51]!==K||t[52]!==J||t[53]!==d?(Y=(0,j.jsxs)(R,{icon:G,label:K,htmlFor:d,children:[J,ae]}),t[51]=K,t[52]=J,t[53]=d,t[54]=Y):Y=t[54];let oe;t[55]===Symbol.for(`react.memo_cache_sentinel`)?(oe=(0,j.jsx)(b,{className:`size-3.5`}),t[55]=oe):oe=t[55];let X;t[56]===l?X=t[57]:(X=l({id:`eTsJYJ`}),t[56]=l,t[57]=X);let Z;t[58]===h?Z=t[59]:(Z=e=>h.setValue(e.target.value),t[58]=h,t[59]=Z);let Q;t[60]!==h.onBlur||t[61]!==h.onFocus||t[62]!==h.value||t[63]!==f||t[64]!==Z?(Q=(0,j.jsx)(te,{id:f,"data-testid":`template-description-input`,value:h.value,onChange:Z,onFocus:h.onFocus,onBlur:h.onBlur,className:`min-h-16 resize-none border-input bg-transparent px-2 py-1.5 shadow-none focus-visible:bg-muted/30`}),t[60]=h.onBlur,t[61]=h.onFocus,t[62]=h.value,t[63]=f,t[64]=Z,t[65]=Q):Q=t[65];let se;t[66]===Symbol.for(`react.memo_cache_sentinel`)?(se=(0,j.jsx)(`p`,{className:`px-1 pt-0.5 text-[11px] text-muted-foreground`,children:(0,j.jsx)(s,{id:`sFhaTJ`})}),t[66]=se):se=t[66];let $;t[67]!==f||t[68]!==X||t[69]!==Q?($=(0,j.jsxs)(R,{icon:oe,label:X,htmlFor:f,children:[Q,se]}),t[67]=f,t[68]=X,t[69]=Q,t[70]=$):$=t[70];let ce;return t[71]!==L||t[72]!==W||t[73]!==Y||t[74]!==$?(ce=(0,j.jsxs)(x,{title:M,className:`pt-4 pb-2`,children:[L,W,Y,$]}),t[71]=L,t[72]=W,t[73]=Y,t[74]=$,t[75]=ce):ce=t[75],ce}function ie(e){e.key===`Enter`&&e.currentTarget.blur()}function R(e){let t=(0,k.c)(13),{icon:n,label:r,htmlFor:i,children:a}=e,o;t[0]===n?o=t[1]:(o=(0,j.jsx)(`span`,{className:`text-muted-foreground`,children:n}),t[0]=n,t[1]=o);let s;t[2]===r?s=t[3]:(s=(0,j.jsx)(`span`,{className:`truncate text-muted-foreground`,children:r}),t[2]=r,t[3]=s);let c;t[4]!==i||t[5]!==o||t[6]!==s?(c=(0,j.jsxs)(`label`,{htmlFor:i,className:`flex w-32 shrink-0 items-center gap-1 pt-1.5`,children:[o,s]}),t[4]=i,t[5]=o,t[6]=s,t[7]=c):c=t[7];let l;t[8]===a?l=t[9]:(l=(0,j.jsx)(`div`,{className:`min-w-0 flex-1`,children:a}),t[8]=a,t[9]=l);let u;return t[10]!==c||t[11]!==l?(u=(0,j.jsxs)(`div`,{className:`flex items-start gap-1 py-0.5`,children:[c,l]}),t[10]=c,t[11]=l,t[12]=u):u=t[12],u}function z(e){let t=(0,k.c)(18),{docName:n,provider:r}=e,i;t[0]===n?i=t[1]:(i=y(n),t[0]=n,t[1]=i);let a=i;if(a?.kind===`skill`){let e;return t[2]!==n||t[3]!==a.name||t[4]!==a.scope||t[5]!==r?(e=(0,j.jsx)(V,{provider:r,docName:n,scope:a.scope,name:a.name}),t[2]=n,t[3]=a.name,t[4]=a.scope,t[5]=r,t[6]=e):e=t[6],e}if(a?.kind===`template`){let e;return t[7]!==n||t[8]!==a.folder||t[9]!==a.name||t[10]!==r?(e=(0,j.jsx)(U,{provider:r,docName:n,folder:a.folder,name:a.name}),t[7]=n,t[8]=a.folder,t[9]=a.name,t[10]=r,t[11]=e):e=t[11],e}let s;t[12]===n?s=t[13]:(s=o(n),t[12]=n,t[13]=s);let c=s;if(c){let e;return t[14]!==n||t[15]!==c||t[16]!==r?(e=(0,j.jsx)(H,{provider:r,docName:n,name:c}),t[14]=n,t[15]=c,t[16]=r,t[17]=e):e=t[17],e}return null}function B(){let e=(0,k.c)(2),{closeDocument:t}=a(),n;return e[0]===t?n=e[1]:(n=(e,n)=>{e!==n&&(D(n),t(e))},e[0]=t,e[1]=n),n}function V(e){let t=(0,k.c)(24),{provider:n,docName:r,scope:i,name:a}=e,{_:o}=c(),s=T(),l=B(),[u,d]=(0,A.useState)(null),[m,g]=(0,A.useState)(!1),_;t[0]!==o||t[1]!==r||t[2]!==a||t[3]!==l||t[4]!==i?(_=async function(e){d(null);let t=await p({scope:i,fromName:a,toName:e});if(!t.ok){d(t.error),O.error(o({id:`sHrqDx`,values:{0:t.error}}));return}O.success(o({id:`_hPpdX`})),l(r,h(i,e))},t[0]=o,t[1]=r,t[2]=a,t[3]=l,t[4]=i,t[5]=_):_=t[5];let v=_,y;t[6]!==o||t[7]!==r||t[8]!==m||t[9]!==a||t[10]!==l||t[11]!==i||t[12]!==s?(y=async function(e){if(e===i||m)return;g(!0);let t=await f({name:a,fromScope:i,toScope:e});if(g(!1),!t.ok){O.error(o({id:`07eGJB`,values:{0:t.error}}));return}let n=t.skippedBinaryFiles?.length??0;n>0?O.warning(o({id:`DhK_hZ`,values:{0:s[e],name:a,skipped:n}})):O.success(o({id:`UQMMvx`,values:{0:s[e],name:a}})),l(r,h(e,a))},t[6]=o,t[7]=r,t[8]=m,t[9]=a,t[10]=l,t[11]=i,t[12]=s,t[13]=y):y=t[13];let b=y,x=!m,S;t[14]!==b||t[15]!==i?(S={scope:i,onScopeChange:b},t[14]=b,t[15]=i,t[16]=S):S=t[16];let C;return t[17]!==v||t[18]!==a||t[19]!==n||t[20]!==u||t[21]!==x||t[22]!==S?(C=(0,j.jsx)(N,{provider:n,name:a,onRename:v,nameError:u,nameEditable:x,scopeControl:S}),t[17]=v,t[18]=a,t[19]=n,t[20]=u,t[21]=x,t[22]=S,t[23]=C):C=t[23],C}function H(e){let t=(0,k.c)(21),{provider:n,docName:r,name:i}=e,{_:a}=c(),o=T(),s=B(),[l,u]=(0,A.useState)(null),[d,g]=(0,A.useState)(!1),_;t[0]!==a||t[1]!==r||t[2]!==i||t[3]!==s?(_=async function(e){u(null);let t=await p({scope:`project`,fromName:i,toName:e});if(!t.ok){u(t.error),O.error(a({id:`sHrqDx`,values:{0:t.error}}));return}O.success(a({id:`_hPpdX`})),s(r,m(e))},t[0]=a,t[1]=r,t[2]=i,t[3]=s,t[4]=_):_=t[4];let v=_,y;t[5]!==a||t[6]!==r||t[7]!==d||t[8]!==i||t[9]!==s||t[10]!==o?(y=async function(e){if(e===`project`||d)return;g(!0);let t=await f({name:i,fromScope:`project`,toScope:e});if(g(!1),!t.ok){O.error(a({id:`07eGJB`,values:{0:t.error}}));return}let n=t.skippedBinaryFiles?.length??0;n>0?O.warning(a({id:`DhK_hZ`,values:{0:o[e],name:i,skipped:n}})):O.success(a({id:`UQMMvx`,values:{0:o[e],name:i}})),s(r,h(e,i))},t[5]=a,t[6]=r,t[7]=d,t[8]=i,t[9]=s,t[10]=o,t[11]=y):y=t[11];let b=y,x=!d,S;t[12]===b?S=t[13]:(S={scope:`project`,onScopeChange:b},t[12]=b,t[13]=S);let C;return t[14]!==v||t[15]!==i||t[16]!==n||t[17]!==l||t[18]!==x||t[19]!==S?(C=(0,j.jsx)(N,{provider:n,name:i,onRename:v,nameError:l,nameEditable:x,scopeControl:S}),t[14]=v,t[15]=i,t[16]=n,t[17]=l,t[18]=x,t[19]=S,t[20]=C):C=t[20],C}function U(e){let t=(0,k.c)(12),{provider:n,docName:r,folder:a,name:o}=e,{_:s}=c(),l=B(),[u,d]=(0,A.useState)(null),f;t[0]!==s||t[1]!==r||t[2]!==a||t[3]!==o||t[4]!==l?(f=async function(e){d(null);let t=await E({fromFolder:a,fromName:o,toFolder:a,toName:e});if(!t.ok){d(t.error),O.error(s({id:`gk_-qj`,values:{0:t.error}}));return}O.success(s({id:`YKLP_-`})),l(r,i(a,e))},t[0]=s,t[1]=r,t[2]=a,t[3]=o,t[4]=l,t[5]=f):f=t[5];let p=f,m;return t[6]!==a||t[7]!==p||t[8]!==o||t[9]!==n||t[10]!==u?(m=(0,j.jsx)(L,{provider:n,name:o,folder:a,onRename:p,nameError:u}),t[6]=a,t[7]=p,t[8]=o,t[9]=n,t[10]=u,t[11]=m):m=t[11],m}export{z as ManagedArtifactProperties};
1
+ import{s as e}from"./chunk-Bj-mKKzh.js";import{n as t,r as n,t as r}from"./compiler-runtime-B6sxACDP.js";import{ct as i,n as a,ot as o}from"./DocumentContext-CNzSFsI-.js";import{n as s,r as c}from"./dist-UKzQrqGt.js";import{n as l,t as u,u as d}from"./createLucideIcon-DkO1lL_8.js";import{c as f,s as p}from"./skills-api-UJqRM51N.js";import{Er as m,Fr as h,Gt as g,Mt as _,St as v,xr as y}from"./dist-DkRtDyLN.js";import{h as b,r as x,t as S}from"./PropertyPanel-Dkz1gPoU.js";import{c as C,i as w,s as T}from"./workspace-paths-r1tSwfOd.js";import{i as E,t as D}from"./open-managed-artifact-tab-tiXawScj.js";import{n as O}from"./dist-DyPw7rC6.js";import{t as ee}from"./input-C1P6Hf22.js";import{t as te}from"./textarea-BdasFVsT.js";var ne=u(`folder-git-2`,[[`path`,{d:`M18 19a5 5 0 0 1-5-5v8`,key:`sz5oeg`}],[`path`,{d:`M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5`,key:`1w6njk`}],[`circle`,{cx:`13`,cy:`12`,r:`2`,key:`1j92g6`}],[`circle`,{cx:`20`,cy:`19`,r:`2`,key:`1obnsp`}]]),k=r(),A=e(t(),1),j=n(),M=[`name`];function N(e){let t=(0,k.c)(46),{provider:n,name:r,scopeControl:i,onRename:a,nameError:o,onNameDraftChange:u,nameEditable:f}=e,p=f===void 0?!0:f,{_:m}=c(),h=(0,A.useId)(),g=(0,A.useId)(),_=C(),[y,x]=(0,A.useState)(r),T,E;t[0]===r?(T=t[1],E=t[2]):(T=()=>x(r),E=[r],t[0]=r,t[1]=T,t[2]=E),(0,A.useEffect)(T,E);let D,O;t[3]===y?(D=t[4],O=t[5]):(O=y.trim(),D=O!==``&&!v.test(O),t[3]=y,t[4]=D,t[5]=O);let te=D,N;t[6]!==r||t[7]!==te||t[8]!==a||t[9]!==O?(N=function(){a&&(te||O===``||O===r||a(O))},t[6]=r,t[7]=te,t[8]=a,t[9]=O,t[10]=N):N=t[10];let F=N,I=te||!!o,L;t[11]!==m||t[12]!==i||t[13]!==g||t[14]!==_?(L=i?(0,j.jsx)(re,{icon:(0,j.jsx)(ne,{className:`size-3.5`}),label:m({id:`oCHfGC`}),htmlFor:g,children:(0,j.jsxs)(`fieldset`,{id:g,className:`m-0 inline-flex items-center gap-1 rounded-full border-0 bg-muted/60 p-0.5`,children:[(0,j.jsx)(`legend`,{className:`sr-only`,children:m({id:`KszKI_`})}),w.map(e=>{let t=i.scope===e;return(0,j.jsx)(l,{type:`button`,"aria-pressed":t,variant:`ghost`,size:`sm`,onClick:()=>{t||i.onScopeChange(e)},className:d(`h-6 rounded-full px-3 text-xs font-medium`,t?e===`global`?`bg-violet-700 text-white hover:bg-violet-700 hover:text-white`:`bg-sky-700 text-white hover:bg-sky-700 hover:text-white`:`text-muted-foreground hover:bg-transparent hover:text-foreground`),children:_[e]},e)})]})}):null,t[11]=m,t[12]=i,t[13]=g,t[14]=_,t[15]=L):L=t[15];let ie;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(ie=(0,j.jsx)(b,{className:`size-3.5`}),t[16]=ie):ie=t[16];let R;t[17]===m?R=t[18]:(R=m({id:`XmJfZT`}),t[17]=m,t[18]=R);let z=!p,B;t[19]===u?B=t[20]:(B=e=>{let t=e.target.value;x(t),u?.(t)},t[19]=u,t[20]=B);let V=I?`${h}-error`:void 0,H;t[21]!==F||t[22]!==y||t[23]!==h||t[24]!==I||t[25]!==B||t[26]!==V||t[27]!==z?(H=(0,j.jsx)(ee,{id:h,"data-testid":`skill-name-input`,value:y,readOnly:z,onChange:B,onBlur:F,onKeyDown:P,"aria-invalid":I,"aria-describedby":V,className:`h-7 rounded-sm border-transparent bg-transparent px-2 font-mono text-sm shadow-none focus-visible:border-transparent focus-visible:bg-muted focus-visible:ring-0 dark:bg-transparent`}),t[21]=F,t[22]=y,t[23]=h,t[24]=I,t[25]=B,t[26]=V,t[27]=z,t[28]=H):H=t[28];let U;t[29]!==o||t[30]!==h||t[31]!==I?(U=I?(0,j.jsx)(`p`,{id:`${h}-error`,className:`px-1 pt-0.5 text-[11px] text-destructive`,children:o||(0,j.jsx)(s,{id:`A50vr3`,components:{0:(0,j.jsx)(`code`,{className:`font-mono`})}})}):(0,j.jsx)(`p`,{className:`px-1 pt-0.5 text-[11px] text-muted-foreground`,children:(0,j.jsx)(s,{id:`1hvhf0`})}),t[29]=o,t[30]=h,t[31]=I,t[32]=U):U=t[32];let W;t[33]!==h||t[34]!==H||t[35]!==U||t[36]!==R?(W=(0,j.jsxs)(re,{icon:ie,label:R,htmlFor:h,children:[H,U]}),t[33]=h,t[34]=H,t[35]=U,t[36]=R,t[37]=W):W=t[37];let G;t[38]!==W||t[39]!==L?(G=(0,j.jsxs)(`div`,{className:`editor-content-aligned gap-0.5 pt-4`,children:[L,W]}),t[38]=W,t[39]=L,t[40]=G):G=t[40];let K;t[41]===n?K=t[42]:(K=(0,j.jsx)(S,{provider:n,reservedKeys:M}),t[41]=n,t[42]=K);let q;return t[43]!==G||t[44]!==K?(q=(0,j.jsxs)(`div`,{className:`flex flex-col`,children:[G,K]}),t[43]=G,t[44]=K,t[45]=q):q=t[45],q}function P(e){e.key===`Enter`&&e.currentTarget.blur()}function re(e){let t=(0,k.c)(14),{icon:n,label:r,htmlFor:i,children:a}=e,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,j.jsx)(`span`,{"aria-hidden":!0,className:`h-7 w-4 shrink-0`}),t[0]=o):o=t[0];let s;t[1]===n?s=t[2]:(s=(0,j.jsx)(`span`,{className:`flex size-7 shrink-0 items-center justify-center text-muted-foreground`,children:n}),t[1]=n,t[2]=s);let c;t[3]!==i||t[4]!==r?(c=(0,j.jsx)(`label`,{htmlFor:i,className:`flex h-7 w-32 shrink-0 items-center truncate px-2 text-sm text-muted-foreground`,children:r}),t[3]=i,t[4]=r,t[5]=c):c=t[5];let l;t[6]!==s||t[7]!==c?(l=(0,j.jsxs)(`div`,{className:`flex items-center gap-1`,children:[s,c]}),t[6]=s,t[7]=c,t[8]=l):l=t[8];let u;t[9]===a?u=t[10]:(u=(0,j.jsx)(`div`,{className:`min-w-0 flex-1`,children:a}),t[9]=a,t[10]=u);let d;return t[11]!==l||t[12]!==u?(d=(0,j.jsxs)(`div`,{className:`flex items-start gap-1 py-0.5`,children:[o,l,u]}),t[11]=l,t[12]=u,t[13]=d):d=t[13],d}function F(e,t){let n=e.current().map[t];return typeof n==`string`?n:``}function I(e,t){let n=(0,k.c)(15),[r,i]=(0,A.useState)(null),a;n[0]!==t||n[1]!==e?(a=()=>{let n=g(e),r=F(n,t);return n.dispose(),r},n[0]=t,n[1]=e,n[2]=a):a=n[2];let[o,s]=(0,A.useState)(a),c=(0,A.useRef)(!1),l,u;n[3]!==t||n[4]!==e?(l=()=>{let n=g(e);i(n),s(F(n,t));let r=n.subscribe(()=>{c.current||s(F(n,t))});return()=>{r(),n.dispose(),i(e=>e===n?null:e)}},u=[e,t],n[3]=t,n[4]=e,n[5]=l,n[6]=u):(l=n[5],u=n[6]),(0,A.useEffect)(l,u);let d;n[7]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>{c.current=!0},n[7]=d):d=n[7];let f;n[8]!==r||n[9]!==t||n[10]!==o?(f=()=>{c.current=!1,r&&o!==F(r,t)&&r.patch({[t]:o})},n[8]=r,n[9]=t,n[10]=o,n[11]=f):f=n[11];let p;return n[12]!==f||n[13]!==o?(p={value:o,setValue:s,onFocus:d,onBlur:f},n[12]=f,n[13]=o,n[14]=p):p=n[14],p}function L(e){let t=(0,k.c)(76),{provider:n,name:r,folder:i,onRename:a,nameError:o}=e,{_:l}=c(),u=(0,A.useId)(),d=(0,A.useId)(),f=(0,A.useId)(),p=(0,A.useId)(),m=I(n,`title`),h=I(n,`description`),[g,v]=(0,A.useState)(r),y,S;t[0]===r?(y=t[1],S=t[2]):(y=()=>v(r),S=[r],t[0]=r,t[1]=y,t[2]=S),(0,A.useEffect)(y,S);let C,w;t[3]===g?(C=t[4],w=t[5]):(w=g.trim(),C=w!==``&&!_.test(w),t[3]=g,t[4]=C,t[5]=w);let T=C,E;t[6]!==r||t[7]!==T||t[8]!==a||t[9]!==w?(E=function(){a&&(T||w===``||w===r||a(w))},t[6]=r,t[7]=T,t[8]=a,t[9]=w,t[10]=E):E=t[10];let D=E,O=T||!!o,M;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,j.jsx)(s,{id:`l_UFPv`}),t[11]=M):M=t[11];let N;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,j.jsx)(ne,{className:`size-3.5`}),t[12]=N):N=t[12];let P;t[13]===l?P=t[14]:(P=l({id:`ugoTXs`}),t[13]=l,t[14]=P);let re=i||`/`,F;t[15]!==p||t[16]!==re?(F=(0,j.jsx)(ee,{id:p,value:re,readOnly:!0,className:`h-8 border-input bg-transparent px-2 font-mono text-muted-foreground shadow-none`}),t[15]=p,t[16]=re,t[17]=F):F=t[17];let L;t[18]!==p||t[19]!==P||t[20]!==F?(L=(0,j.jsx)(R,{icon:N,label:P,htmlFor:p,children:F}),t[18]=p,t[19]=P,t[20]=F,t[21]=L):L=t[21];let z;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,j.jsx)(b,{className:`size-3.5`}),t[22]=z):z=t[22];let B;t[23]===l?B=t[24]:(B=l({id:`XmJfZT`}),t[23]=l,t[24]=B);let V;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(V=e=>v(e.target.value),t[25]=V):V=t[25];let H;t[26]!==D||t[27]!==g||t[28]!==u||t[29]!==O?(H=(0,j.jsx)(ee,{id:u,"data-testid":`template-name-input`,value:g,onChange:V,onBlur:D,onKeyDown:ie,"aria-invalid":O,className:`h-8 border-input bg-transparent px-2 font-mono shadow-none focus-visible:bg-muted/30`}),t[26]=D,t[27]=g,t[28]=u,t[29]=O,t[30]=H):H=t[30];let U;t[31]!==o||t[32]!==O?(U=O?(0,j.jsx)(`p`,{className:`px-1 pt-0.5 text-[11px] text-destructive`,children:o||(0,j.jsx)(s,{id:`lI0Td2`,components:{0:(0,j.jsx)(`code`,{className:`font-mono`}),1:(0,j.jsx)(`code`,{className:`font-mono`})}})}):(0,j.jsx)(`p`,{className:`px-1 pt-0.5 text-[11px] text-muted-foreground`,children:(0,j.jsx)(s,{id:`QfFBdJ`})}),t[31]=o,t[32]=O,t[33]=U):U=t[33];let W;t[34]!==u||t[35]!==B||t[36]!==H||t[37]!==U?(W=(0,j.jsxs)(R,{icon:z,label:B,htmlFor:u,children:[H,U]}),t[34]=u,t[35]=B,t[36]=H,t[37]=U,t[38]=W):W=t[38];let G;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,j.jsx)(b,{className:`size-3.5`}),t[39]=G):G=t[39];let K;t[40]===l?K=t[41]:(K=l({id:`q7F5am`}),t[40]=l,t[41]=K);let q;t[42]===m?q=t[43]:(q=e=>m.setValue(e.target.value),t[42]=m,t[43]=q);let J;t[44]!==q||t[45]!==m.onBlur||t[46]!==m.onFocus||t[47]!==m.value||t[48]!==d?(J=(0,j.jsx)(ee,{id:d,"data-testid":`template-title-input`,value:m.value,onChange:q,onFocus:m.onFocus,onBlur:m.onBlur,className:`h-8 border-input bg-transparent px-2 shadow-none focus-visible:bg-muted/30`}),t[44]=q,t[45]=m.onBlur,t[46]=m.onFocus,t[47]=m.value,t[48]=d,t[49]=J):J=t[49];let ae;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(0,j.jsx)(`p`,{className:`px-1 pt-0.5 text-[11px] text-muted-foreground`,children:(0,j.jsx)(s,{id:`5e1Dri`})}),t[50]=ae):ae=t[50];let Y;t[51]!==K||t[52]!==J||t[53]!==d?(Y=(0,j.jsxs)(R,{icon:G,label:K,htmlFor:d,children:[J,ae]}),t[51]=K,t[52]=J,t[53]=d,t[54]=Y):Y=t[54];let oe;t[55]===Symbol.for(`react.memo_cache_sentinel`)?(oe=(0,j.jsx)(b,{className:`size-3.5`}),t[55]=oe):oe=t[55];let X;t[56]===l?X=t[57]:(X=l({id:`eTsJYJ`}),t[56]=l,t[57]=X);let Z;t[58]===h?Z=t[59]:(Z=e=>h.setValue(e.target.value),t[58]=h,t[59]=Z);let Q;t[60]!==h.onBlur||t[61]!==h.onFocus||t[62]!==h.value||t[63]!==f||t[64]!==Z?(Q=(0,j.jsx)(te,{id:f,"data-testid":`template-description-input`,value:h.value,onChange:Z,onFocus:h.onFocus,onBlur:h.onBlur,className:`min-h-16 resize-none border-input bg-transparent px-2 py-1.5 shadow-none focus-visible:bg-muted/30`}),t[60]=h.onBlur,t[61]=h.onFocus,t[62]=h.value,t[63]=f,t[64]=Z,t[65]=Q):Q=t[65];let se;t[66]===Symbol.for(`react.memo_cache_sentinel`)?(se=(0,j.jsx)(`p`,{className:`px-1 pt-0.5 text-[11px] text-muted-foreground`,children:(0,j.jsx)(s,{id:`sFhaTJ`})}),t[66]=se):se=t[66];let $;t[67]!==f||t[68]!==X||t[69]!==Q?($=(0,j.jsxs)(R,{icon:oe,label:X,htmlFor:f,children:[Q,se]}),t[67]=f,t[68]=X,t[69]=Q,t[70]=$):$=t[70];let ce;return t[71]!==L||t[72]!==W||t[73]!==Y||t[74]!==$?(ce=(0,j.jsxs)(x,{title:M,className:`pt-4 pb-2`,children:[L,W,Y,$]}),t[71]=L,t[72]=W,t[73]=Y,t[74]=$,t[75]=ce):ce=t[75],ce}function ie(e){e.key===`Enter`&&e.currentTarget.blur()}function R(e){let t=(0,k.c)(13),{icon:n,label:r,htmlFor:i,children:a}=e,o;t[0]===n?o=t[1]:(o=(0,j.jsx)(`span`,{className:`text-muted-foreground`,children:n}),t[0]=n,t[1]=o);let s;t[2]===r?s=t[3]:(s=(0,j.jsx)(`span`,{className:`truncate text-muted-foreground`,children:r}),t[2]=r,t[3]=s);let c;t[4]!==i||t[5]!==o||t[6]!==s?(c=(0,j.jsxs)(`label`,{htmlFor:i,className:`flex w-32 shrink-0 items-center gap-1 pt-1.5`,children:[o,s]}),t[4]=i,t[5]=o,t[6]=s,t[7]=c):c=t[7];let l;t[8]===a?l=t[9]:(l=(0,j.jsx)(`div`,{className:`min-w-0 flex-1`,children:a}),t[8]=a,t[9]=l);let u;return t[10]!==c||t[11]!==l?(u=(0,j.jsxs)(`div`,{className:`flex items-start gap-1 py-0.5`,children:[c,l]}),t[10]=c,t[11]=l,t[12]=u):u=t[12],u}function z(e){let t=(0,k.c)(18),{docName:n,provider:r}=e,i;t[0]===n?i=t[1]:(i=y(n),t[0]=n,t[1]=i);let a=i;if(a?.kind===`skill`){let e;return t[2]!==n||t[3]!==a.name||t[4]!==a.scope||t[5]!==r?(e=(0,j.jsx)(V,{provider:r,docName:n,scope:a.scope,name:a.name}),t[2]=n,t[3]=a.name,t[4]=a.scope,t[5]=r,t[6]=e):e=t[6],e}if(a?.kind===`template`){let e;return t[7]!==n||t[8]!==a.folder||t[9]!==a.name||t[10]!==r?(e=(0,j.jsx)(U,{provider:r,docName:n,folder:a.folder,name:a.name}),t[7]=n,t[8]=a.folder,t[9]=a.name,t[10]=r,t[11]=e):e=t[11],e}let s;t[12]===n?s=t[13]:(s=o(n),t[12]=n,t[13]=s);let c=s;if(c){let e;return t[14]!==n||t[15]!==c||t[16]!==r?(e=(0,j.jsx)(H,{provider:r,docName:n,name:c}),t[14]=n,t[15]=c,t[16]=r,t[17]=e):e=t[17],e}return null}function B(){let e=(0,k.c)(2),{closeDocument:t}=a(),n;return e[0]===t?n=e[1]:(n=(e,n)=>{e!==n&&(D(n),t(e))},e[0]=t,e[1]=n),n}function V(e){let t=(0,k.c)(24),{provider:n,docName:r,scope:i,name:a}=e,{_:o}=c(),s=T(),l=B(),[u,d]=(0,A.useState)(null),[m,g]=(0,A.useState)(!1),_;t[0]!==o||t[1]!==r||t[2]!==a||t[3]!==l||t[4]!==i?(_=async function(e){d(null);let t=await p({scope:i,fromName:a,toName:e});if(!t.ok){d(t.error),O.error(o({id:`sHrqDx`,values:{0:t.error}}));return}O.success(o({id:`_hPpdX`})),l(r,h(i,e))},t[0]=o,t[1]=r,t[2]=a,t[3]=l,t[4]=i,t[5]=_):_=t[5];let v=_,y;t[6]!==o||t[7]!==r||t[8]!==m||t[9]!==a||t[10]!==l||t[11]!==i||t[12]!==s?(y=async function(e){if(e===i||m)return;g(!0);let t=await f({name:a,fromScope:i,toScope:e});if(g(!1),!t.ok){O.error(o({id:`07eGJB`,values:{0:t.error}}));return}let n=t.skippedBinaryFiles?.length??0;n>0?O.warning(o({id:`DhK_hZ`,values:{0:s[e],name:a,skipped:n}})):O.success(o({id:`UQMMvx`,values:{0:s[e],name:a}})),l(r,h(e,a))},t[6]=o,t[7]=r,t[8]=m,t[9]=a,t[10]=l,t[11]=i,t[12]=s,t[13]=y):y=t[13];let b=y,x=!m,S;t[14]!==b||t[15]!==i?(S={scope:i,onScopeChange:b},t[14]=b,t[15]=i,t[16]=S):S=t[16];let C;return t[17]!==v||t[18]!==a||t[19]!==n||t[20]!==u||t[21]!==x||t[22]!==S?(C=(0,j.jsx)(N,{provider:n,name:a,onRename:v,nameError:u,nameEditable:x,scopeControl:S}),t[17]=v,t[18]=a,t[19]=n,t[20]=u,t[21]=x,t[22]=S,t[23]=C):C=t[23],C}function H(e){let t=(0,k.c)(21),{provider:n,docName:r,name:i}=e,{_:a}=c(),o=T(),s=B(),[l,u]=(0,A.useState)(null),[d,g]=(0,A.useState)(!1),_;t[0]!==a||t[1]!==r||t[2]!==i||t[3]!==s?(_=async function(e){u(null);let t=await p({scope:`project`,fromName:i,toName:e});if(!t.ok){u(t.error),O.error(a({id:`sHrqDx`,values:{0:t.error}}));return}O.success(a({id:`_hPpdX`})),s(r,m(e))},t[0]=a,t[1]=r,t[2]=i,t[3]=s,t[4]=_):_=t[4];let v=_,y;t[5]!==a||t[6]!==r||t[7]!==d||t[8]!==i||t[9]!==s||t[10]!==o?(y=async function(e){if(e===`project`||d)return;g(!0);let t=await f({name:i,fromScope:`project`,toScope:e});if(g(!1),!t.ok){O.error(a({id:`07eGJB`,values:{0:t.error}}));return}let n=t.skippedBinaryFiles?.length??0;n>0?O.warning(a({id:`DhK_hZ`,values:{0:o[e],name:i,skipped:n}})):O.success(a({id:`UQMMvx`,values:{0:o[e],name:i}})),s(r,h(e,i))},t[5]=a,t[6]=r,t[7]=d,t[8]=i,t[9]=s,t[10]=o,t[11]=y):y=t[11];let b=y,x=!d,S;t[12]===b?S=t[13]:(S={scope:`project`,onScopeChange:b},t[12]=b,t[13]=S);let C;return t[14]!==v||t[15]!==i||t[16]!==n||t[17]!==l||t[18]!==x||t[19]!==S?(C=(0,j.jsx)(N,{provider:n,name:i,onRename:v,nameError:l,nameEditable:x,scopeControl:S}),t[14]=v,t[15]=i,t[16]=n,t[17]=l,t[18]=x,t[19]=S,t[20]=C):C=t[20],C}function U(e){let t=(0,k.c)(12),{provider:n,docName:r,folder:a,name:o}=e,{_:s}=c(),l=B(),[u,d]=(0,A.useState)(null),f;t[0]!==s||t[1]!==r||t[2]!==a||t[3]!==o||t[4]!==l?(f=async function(e){d(null);let t=await E({fromFolder:a,fromName:o,toFolder:a,toName:e});if(!t.ok){d(t.error),O.error(s({id:`gk_-qj`,values:{0:t.error}}));return}O.success(s({id:`YKLP_-`})),l(r,i(a,e))},t[0]=s,t[1]=r,t[2]=a,t[3]=o,t[4]=l,t[5]=f):f=t[5];let p=f,m;return t[6]!==a||t[7]!==p||t[8]!==o||t[9]!==n||t[10]!==u?(m=(0,j.jsx)(L,{provider:n,name:o,folder:a,onRename:p,nameError:u}),t[6]=a,t[7]=p,t[8]=o,t[9]=n,t[10]=u,t[11]=m):m=t[11],m}export{z as ManagedArtifactProperties};
@@ -1 +1 @@
1
- import{s as e}from"./chunk-Bj-mKKzh.js";import{n as t,r as n,t as r}from"./compiler-runtime-B6sxACDP.js";import{n as i,r as a}from"./dist-UKzQrqGt.js";import{n as o,u as s}from"./createLucideIcon-DkO1lL_8.js";import{i as c,n as l,r as u,t as ee}from"./tooltip-C0qAzcHx.js";import{a as te,c as ne,i as re,n as ie,o as ae,s as oe,t as se}from"./dialog-DFGKErvF.js";import{t as d}from"./checkbox-DbIYExtz.js";import{t as f}from"./label-rnTtsCxb.js";import{P as ce}from"./dist-CurDB4OA.js";import{t as le}from"./arrow-up-right-hiEaTtOQ.js";import{t as ue}from"./info-CVOto5Gb.js";import{n as p}from"./dist-DyPw7rC6.js";import{t as de}from"./external-link-BfiFPJEx.js";import{n as m}from"./mcp-consent-store-O7e02Mi1.js";var fe=r(),h=e(t(),1),g=n();function pe(e){return e.shellDetected&&!e.alreadyInstalled}function me(e){let t=new Set;for(let n of e)n.detected&&t.add(n.id);return t}function he(e,t){let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n}function ge(e,t){let n=[];for(let r of t)e.has(r.id)&&n.push(r.id);return n}function _e(e){return new Set(e.map(e=>e.id))}function ve(e,t){let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n}function ye(e,t){return t.filter(t=>e.has(t.id)).map(e=>e.id)}var _={error:e=>p.error(e)};function v(e){let t=(0,fe.c)(9),n;t[0]===e?n=t[1]:(n=e===void 0?{}:e,t[0]=e,t[1]=n);let{store:r,toast:i,payload:a}=n,o=r===void 0?m:r,s=i===void 0?_:i,c;t[2]!==a||t[3]!==o?(c=a??o.getSnapshot(),t[2]=a,t[3]=o,t[4]=c):c=t[4];let l=c;if(!l)return null;let u;return t[5]!==l||t[6]!==o||t[7]!==s?(u=(0,g.jsx)(y,{payload:l,store:o,toast:s}),t[5]=l,t[6]=o,t[7]=s,t[8]=u):u=t[8],u}function y(e){let t=(0,fe.c)(84),{payload:n,store:r,toast:p}=e,{_:m}=a(),_=n.detectedEditors,v=n.pathInstall,y=n.globalSkills,b=y.length>0,x;t[0]===v?x=t[1]:(x=pe(v),t[0]=v,t[1]=x);let S=x,C;t[2]===_?C=t[3]:(C=()=>me(_),t[2]=_,t[3]=C);let[w,Se]=(0,h.useState)(C),[T,Ce]=(0,h.useState)(!0),E;t[4]===y?E=t[5]:(E=()=>_e(y),t[4]=y,t[5]=E);let[D,we]=(0,h.useState)(E),[O,k]=(0,h.useState)(!1),A=(0,h.useId)(),j;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(j=function(e){Se(t=>he(t,e))},t[6]=j):j=t[6];let Te=j,M;t[7]!==_||t[8]!==y||t[9]!==S||t[10]!==T||t[11]!==w||t[12]!==D||t[13]!==b||t[14]!==r||t[15]!==p?(M=async function(){k(!0);let e=await r.confirm({editorIds:ge(w,_),pathInstall:S?T:void 0,skills:b?ye(D,y):void 0});e.ok||(p.error(e.error),k(!1))},t[7]=_,t[8]=y,t[9]=S,t[10]=T,t[11]=w,t[12]=D,t[13]=b,t[14]=r,t[15]=p,t[16]=M):M=t[16];let Ee=M,N;t[17]!==r||t[18]!==p?(N=async function(){k(!0);let e=await r.skip();e.ok||(p.error(e.error),k(!1))},t[17]=r,t[18]=p,t[19]=N):N=t[19];let P=N,F;t[20]!==O||t[21]!==P?(F=function(e){!e&&!O&&P()},t[20]=O,t[21]=P,t[22]=F):F=t[22];let De=F,I;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,g.jsx)(ne,{children:(0,g.jsx)(i,{id:`tsyExA`})}),t[23]=I):I=t[23];let L;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,g.jsxs)(oe,{children:[I,(0,g.jsx)(te,{children:(0,g.jsx)(i,{id:`GF51cw`})})]}),t[24]=L):L=t[24];let R;t[25]!==m||t[26]!==O||t[27]!==A||t[28]!==S||t[29]!==T||t[30]!==v.rcFilesToTouch||t[31]!==v.shellDetected?(R=v.shellDetected&&(0,g.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,g.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:(0,g.jsx)(i,{id:`ALhMYW`})}),(0,g.jsx)(`div`,{className:`overflow-hidden rounded-md border border-border bg-card/50`,children:(0,g.jsxs)(f,{htmlFor:`${A}-path`,className:S?`flex cursor-pointer flex-col items-start gap-1 px-3 py-2.5 font-normal hover:bg-accent`:`flex flex-col items-start gap-1 px-3 py-2.5 font-normal`,children:[(0,g.jsxs)(`span`,{className:`flex items-center gap-2.5`,children:[(0,g.jsx)(d,{id:`${A}-path`,checked:S?T:!0,disabled:O||!S,onCheckedChange:()=>Ce(xe),"data-testid":`mcp-consent-path-checkbox`}),(0,g.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-center gap-1.5 text-sm font-medium text-foreground`,children:[(0,g.jsx)(i,{id:`Fsx78O`,components:{0:(0,g.jsx)(`code`,{className:`inline-code`})}}),S&&(0,g.jsx)(u,{children:(0,g.jsxs)(ee,{children:[(0,g.jsx)(c,{onClick:be,className:`text-muted-foreground hover:text-foreground`,"aria-label":m({id:`LiAw2k`}),"data-testid":`mcp-consent-path-info`,children:(0,g.jsx)(ue,{className:`size-3.5`,"aria-hidden":!0})}),(0,g.jsx)(l,{className:`max-w-xs`,children:(0,g.jsx)(`p`,{className:`leading-relaxed wrap-break-word`,"data-testid":`mcp-consent-path-status`,children:m({id:`04XyCH`,values:{0:v.rcFilesToTouch.join(`, `)}})})})]})})]})]}),!S&&(0,g.jsx)(`span`,{className:`ps-6.5 text-xs text-muted-foreground`,"data-testid":`mcp-consent-path-status`,children:m({id:`RnrnTe`})}),S&&!T&&(0,g.jsx)(`span`,{className:`ps-6.5 text-xs text-amber-600 dark:text-amber-400`,"data-testid":`mcp-consent-path-warning`,children:(0,g.jsx)(i,{id:`7PXYaF`,components:{0:(0,g.jsx)(`code`,{className:`inline-code`})}})})]})})]}),t[25]=m,t[26]=O,t[27]=A,t[28]=S,t[29]=T,t[30]=v.rcFilesToTouch,t[31]=v.shellDetected,t[32]=R):R=t[32];let z;t[33]===v.shellDetected?z=t[34]:(z=v.shellDetected&&(0,g.jsx)(`div`,{className:`text-xs font-medium text-muted-foreground`,children:(0,g.jsx)(i,{id:`psfGPX`})}),t[33]=v.shellDetected,t[34]=z);let B;if(t[35]!==m||t[36]!==O||t[37]!==_||t[38]!==A||t[39]!==w){let e;t[41]!==m||t[42]!==O||t[43]!==A||t[44]!==w?(e=e=>{let t=w.has(e.id),n=`${A}-${e.id}`,r=`https://openknowledge.ai/docs/integrations/${ce[e.id]}`;return(0,g.jsxs)(`li`,{className:`flex flex-wrap items-stretch hover:bg-accent`,children:[(0,g.jsxs)(f,{htmlFor:n,className:s(`flex flex-1 cursor-pointer items-center gap-2.5 px-3 py-2.5 font-normal`,e.willReplace?`pb-0.5`:``),children:[(0,g.jsx)(d,{id:n,checked:t,disabled:O,onCheckedChange:()=>Te(e.id),"data-testid":`mcp-consent-checkbox-${e.id}`}),(0,g.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:e.label})]}),e.willReplace?(0,g.jsx)(`span`,{className:`ms-6.5 basis-full px-3 pb-2.5 text-xs text-amber-600 dark:text-amber-400`,"data-testid":`mcp-consent-status-${e.id}`,children:(0,g.jsx)(i,{id:`TEEPPF`})}):e.detected?null:(0,g.jsxs)(`a`,{href:r,target:`_blank`,rel:`noopener noreferrer`,onClick:e=>de(e,r),onAuxClick:e=>de(e,r),"aria-label":m({id:`D-Oh1s`,values:{0:e.label}}),className:`flex items-center gap-0.5 px-3 py-2.5 text-xs text-muted-foreground underline-offset-2 hover:text-foreground hover:underline`,"data-testid":`mcp-consent-status-${e.id}`,children:[(0,g.jsx)(i,{id:`P_bX4O`}),(0,g.jsx)(le,{className:`size-3`,"aria-hidden":!0})]})]},e.id)},t[41]=m,t[42]=O,t[43]=A,t[44]=w,t[45]=e):e=t[45],B=_.map(e),t[35]=m,t[36]=O,t[37]=_,t[38]=A,t[39]=w,t[40]=B}else B=t[40];let V;t[46]===B?V=t[47]:(V=(0,g.jsx)(`ul`,{className:`rounded-md border border-border bg-card/50 divide-y divide-border overflow-hidden`,children:B}),t[46]=B,t[47]=V);let H;t[48]!==z||t[49]!==V?(H=(0,g.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[z,V]}),t[48]=z,t[49]=V,t[50]=H):H=t[50];let U;t[51]!==O||t[52]!==y||t[53]!==A||t[54]!==D||t[55]!==b?(U=b&&(0,g.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,g.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:(0,g.jsx)(i,{id:`28B21t`})}),(0,g.jsx)(`ul`,{className:`rounded-md border border-border bg-card/50 divide-y divide-border overflow-hidden`,children:y.map(e=>{let t=D.has(e.id),n=`${A}-skill-${e.id}`;return(0,g.jsx)(`li`,{children:(0,g.jsxs)(f,{htmlFor:n,className:`flex cursor-pointer items-start gap-2.5 px-3 py-2.5 font-normal hover:bg-accent`,children:[(0,g.jsx)(d,{id:n,checked:t,disabled:O,onCheckedChange:()=>we(t=>ve(t,e.id)),className:`mt-0.5`,"data-testid":`mcp-consent-skill-checkbox-${e.id}`}),(0,g.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,g.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:(0,g.jsx)(`code`,{children:e.name})}),(0,g.jsx)(`span`,{className:`text-xs text-muted-foreground`,"data-testid":`mcp-consent-skill-status-${e.id}`,children:e.id===`discovery`?(0,g.jsx)(i,{id:`0inVGS`}):(0,g.jsx)(i,{id:`FXk_zY`})}),e.alreadyInstalled&&!t&&(0,g.jsx)(`span`,{className:`text-xs text-amber-600 dark:text-amber-400`,"data-testid":`mcp-consent-skill-warning-${e.id}`,children:(0,g.jsx)(i,{id:`dXWMFn`})})]})]})},e.id)})})]}),t[51]=O,t[52]=y,t[53]=A,t[54]=D,t[55]=b,t[56]=U):U=t[56];let W;t[57]!==R||t[58]!==H||t[59]!==U?(W=(0,g.jsxs)(ie,{className:`flex flex-col gap-6 min-h-0`,children:[R,H,U]}),t[57]=R,t[58]=H,t[59]=U,t[60]=W):W=t[60];let G;t[61]===P?G=t[62]:(G=()=>void P(),t[61]=P,t[62]=G);let K;t[63]===Symbol.for(`react.memo_cache_sentinel`)?(K=(0,g.jsx)(i,{id:`6Uau97`}),t[63]=K):K=t[63];let q;t[64]!==O||t[65]!==G?(q=(0,g.jsx)(o,{variant:`outline`,className:`font-mono uppercase`,onClick:G,disabled:O,"data-testid":`mcp-consent-skip`,children:K}),t[64]=O,t[65]=G,t[66]=q):q=t[66];let J;t[67]===Ee?J=t[68]:(J=()=>void Ee(),t[67]=Ee,t[68]=J);let Oe=O||w.size===0&&!(S&&T)&&!b,Y;t[69]===O?Y=t[70]:(Y=O?(0,g.jsx)(i,{id:`b4itZn`}):(0,g.jsx)(i,{id:`iSLIjg`}),t[69]=O,t[70]=Y);let X;t[71]!==J||t[72]!==Oe||t[73]!==Y?(X=(0,g.jsx)(o,{onClick:J,disabled:Oe,"data-testid":`mcp-consent-add`,children:Y}),t[71]=J,t[72]=Oe,t[73]=Y,t[74]=X):X=t[74];let Z;t[75]!==q||t[76]!==X?(Z=(0,g.jsxs)(ae,{children:[q,X]}),t[75]=q,t[76]=X,t[77]=Z):Z=t[77];let Q;t[78]!==W||t[79]!==Z?(Q=(0,g.jsxs)(re,{className:`sm:max-w-md`,children:[L,W,Z]}),t[78]=W,t[79]=Z,t[80]=Q):Q=t[80];let $;return t[81]!==De||t[82]!==Q?($=(0,g.jsx)(se,{open:!0,onOpenChange:De,children:Q}),t[81]=De,t[82]=Q,t[83]=$):$=t[83],$}function be(e){e.preventDefault(),e.stopPropagation()}function xe(e){return!e}export{v as McpConsentDialogBody,v as default,me as computeInitialSelection,_e as computeInitialSkillSelection,pe as isPathRowActionable,ge as selectedIdsOrdered,ye as skillIdsOrdered,he as toggleSelectedId,ve as toggleSkillId};
1
+ import{s as e}from"./chunk-Bj-mKKzh.js";import{n as t,r as n,t as r}from"./compiler-runtime-B6sxACDP.js";import{n as i,r as a}from"./dist-UKzQrqGt.js";import{n as o,u as s}from"./createLucideIcon-DkO1lL_8.js";import{i as c,n as l,r as u,t as ee}from"./tooltip-C0qAzcHx.js";import{a as te,c as ne,i as re,n as ie,o as ae,s as oe,t as se}from"./dialog-DFGKErvF.js";import{t as d}from"./checkbox-DbIYExtz.js";import{t as f}from"./label-rnTtsCxb.js";import{P as ce}from"./dist-DkRtDyLN.js";import{t as le}from"./arrow-up-right-hiEaTtOQ.js";import{t as ue}from"./info-CVOto5Gb.js";import{n as p}from"./dist-DyPw7rC6.js";import{t as de}from"./external-link-BfiFPJEx.js";import{n as m}from"./mcp-consent-store-O7e02Mi1.js";var fe=r(),h=e(t(),1),g=n();function pe(e){return e.shellDetected&&!e.alreadyInstalled}function me(e){let t=new Set;for(let n of e)n.detected&&t.add(n.id);return t}function he(e,t){let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n}function ge(e,t){let n=[];for(let r of t)e.has(r.id)&&n.push(r.id);return n}function _e(e){return new Set(e.map(e=>e.id))}function ve(e,t){let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n}function ye(e,t){return t.filter(t=>e.has(t.id)).map(e=>e.id)}var _={error:e=>p.error(e)};function v(e){let t=(0,fe.c)(9),n;t[0]===e?n=t[1]:(n=e===void 0?{}:e,t[0]=e,t[1]=n);let{store:r,toast:i,payload:a}=n,o=r===void 0?m:r,s=i===void 0?_:i,c;t[2]!==a||t[3]!==o?(c=a??o.getSnapshot(),t[2]=a,t[3]=o,t[4]=c):c=t[4];let l=c;if(!l)return null;let u;return t[5]!==l||t[6]!==o||t[7]!==s?(u=(0,g.jsx)(y,{payload:l,store:o,toast:s}),t[5]=l,t[6]=o,t[7]=s,t[8]=u):u=t[8],u}function y(e){let t=(0,fe.c)(84),{payload:n,store:r,toast:p}=e,{_:m}=a(),_=n.detectedEditors,v=n.pathInstall,y=n.globalSkills,b=y.length>0,x;t[0]===v?x=t[1]:(x=pe(v),t[0]=v,t[1]=x);let S=x,C;t[2]===_?C=t[3]:(C=()=>me(_),t[2]=_,t[3]=C);let[w,Se]=(0,h.useState)(C),[T,Ce]=(0,h.useState)(!0),E;t[4]===y?E=t[5]:(E=()=>_e(y),t[4]=y,t[5]=E);let[D,we]=(0,h.useState)(E),[O,k]=(0,h.useState)(!1),A=(0,h.useId)(),j;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(j=function(e){Se(t=>he(t,e))},t[6]=j):j=t[6];let Te=j,M;t[7]!==_||t[8]!==y||t[9]!==S||t[10]!==T||t[11]!==w||t[12]!==D||t[13]!==b||t[14]!==r||t[15]!==p?(M=async function(){k(!0);let e=await r.confirm({editorIds:ge(w,_),pathInstall:S?T:void 0,skills:b?ye(D,y):void 0});e.ok||(p.error(e.error),k(!1))},t[7]=_,t[8]=y,t[9]=S,t[10]=T,t[11]=w,t[12]=D,t[13]=b,t[14]=r,t[15]=p,t[16]=M):M=t[16];let Ee=M,N;t[17]!==r||t[18]!==p?(N=async function(){k(!0);let e=await r.skip();e.ok||(p.error(e.error),k(!1))},t[17]=r,t[18]=p,t[19]=N):N=t[19];let P=N,F;t[20]!==O||t[21]!==P?(F=function(e){!e&&!O&&P()},t[20]=O,t[21]=P,t[22]=F):F=t[22];let De=F,I;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,g.jsx)(ne,{children:(0,g.jsx)(i,{id:`tsyExA`})}),t[23]=I):I=t[23];let L;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,g.jsxs)(oe,{children:[I,(0,g.jsx)(te,{children:(0,g.jsx)(i,{id:`GF51cw`})})]}),t[24]=L):L=t[24];let R;t[25]!==m||t[26]!==O||t[27]!==A||t[28]!==S||t[29]!==T||t[30]!==v.rcFilesToTouch||t[31]!==v.shellDetected?(R=v.shellDetected&&(0,g.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,g.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:(0,g.jsx)(i,{id:`ALhMYW`})}),(0,g.jsx)(`div`,{className:`overflow-hidden rounded-md border border-border bg-card/50`,children:(0,g.jsxs)(f,{htmlFor:`${A}-path`,className:S?`flex cursor-pointer flex-col items-start gap-1 px-3 py-2.5 font-normal hover:bg-accent`:`flex flex-col items-start gap-1 px-3 py-2.5 font-normal`,children:[(0,g.jsxs)(`span`,{className:`flex items-center gap-2.5`,children:[(0,g.jsx)(d,{id:`${A}-path`,checked:S?T:!0,disabled:O||!S,onCheckedChange:()=>Ce(xe),"data-testid":`mcp-consent-path-checkbox`}),(0,g.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-center gap-1.5 text-sm font-medium text-foreground`,children:[(0,g.jsx)(i,{id:`Fsx78O`,components:{0:(0,g.jsx)(`code`,{className:`inline-code`})}}),S&&(0,g.jsx)(u,{children:(0,g.jsxs)(ee,{children:[(0,g.jsx)(c,{onClick:be,className:`text-muted-foreground hover:text-foreground`,"aria-label":m({id:`LiAw2k`}),"data-testid":`mcp-consent-path-info`,children:(0,g.jsx)(ue,{className:`size-3.5`,"aria-hidden":!0})}),(0,g.jsx)(l,{className:`max-w-xs`,children:(0,g.jsx)(`p`,{className:`leading-relaxed wrap-break-word`,"data-testid":`mcp-consent-path-status`,children:m({id:`04XyCH`,values:{0:v.rcFilesToTouch.join(`, `)}})})})]})})]})]}),!S&&(0,g.jsx)(`span`,{className:`ps-6.5 text-xs text-muted-foreground`,"data-testid":`mcp-consent-path-status`,children:m({id:`RnrnTe`})}),S&&!T&&(0,g.jsx)(`span`,{className:`ps-6.5 text-xs text-amber-600 dark:text-amber-400`,"data-testid":`mcp-consent-path-warning`,children:(0,g.jsx)(i,{id:`7PXYaF`,components:{0:(0,g.jsx)(`code`,{className:`inline-code`})}})})]})})]}),t[25]=m,t[26]=O,t[27]=A,t[28]=S,t[29]=T,t[30]=v.rcFilesToTouch,t[31]=v.shellDetected,t[32]=R):R=t[32];let z;t[33]===v.shellDetected?z=t[34]:(z=v.shellDetected&&(0,g.jsx)(`div`,{className:`text-xs font-medium text-muted-foreground`,children:(0,g.jsx)(i,{id:`psfGPX`})}),t[33]=v.shellDetected,t[34]=z);let B;if(t[35]!==m||t[36]!==O||t[37]!==_||t[38]!==A||t[39]!==w){let e;t[41]!==m||t[42]!==O||t[43]!==A||t[44]!==w?(e=e=>{let t=w.has(e.id),n=`${A}-${e.id}`,r=`https://openknowledge.ai/docs/integrations/${ce[e.id]}`;return(0,g.jsxs)(`li`,{className:`flex flex-wrap items-stretch hover:bg-accent`,children:[(0,g.jsxs)(f,{htmlFor:n,className:s(`flex flex-1 cursor-pointer items-center gap-2.5 px-3 py-2.5 font-normal`,e.willReplace?`pb-0.5`:``),children:[(0,g.jsx)(d,{id:n,checked:t,disabled:O,onCheckedChange:()=>Te(e.id),"data-testid":`mcp-consent-checkbox-${e.id}`}),(0,g.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:e.label})]}),e.willReplace?(0,g.jsx)(`span`,{className:`ms-6.5 basis-full px-3 pb-2.5 text-xs text-amber-600 dark:text-amber-400`,"data-testid":`mcp-consent-status-${e.id}`,children:(0,g.jsx)(i,{id:`TEEPPF`})}):e.detected?null:(0,g.jsxs)(`a`,{href:r,target:`_blank`,rel:`noopener noreferrer`,onClick:e=>de(e,r),onAuxClick:e=>de(e,r),"aria-label":m({id:`D-Oh1s`,values:{0:e.label}}),className:`flex items-center gap-0.5 px-3 py-2.5 text-xs text-muted-foreground underline-offset-2 hover:text-foreground hover:underline`,"data-testid":`mcp-consent-status-${e.id}`,children:[(0,g.jsx)(i,{id:`P_bX4O`}),(0,g.jsx)(le,{className:`size-3`,"aria-hidden":!0})]})]},e.id)},t[41]=m,t[42]=O,t[43]=A,t[44]=w,t[45]=e):e=t[45],B=_.map(e),t[35]=m,t[36]=O,t[37]=_,t[38]=A,t[39]=w,t[40]=B}else B=t[40];let V;t[46]===B?V=t[47]:(V=(0,g.jsx)(`ul`,{className:`rounded-md border border-border bg-card/50 divide-y divide-border overflow-hidden`,children:B}),t[46]=B,t[47]=V);let H;t[48]!==z||t[49]!==V?(H=(0,g.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[z,V]}),t[48]=z,t[49]=V,t[50]=H):H=t[50];let U;t[51]!==O||t[52]!==y||t[53]!==A||t[54]!==D||t[55]!==b?(U=b&&(0,g.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,g.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:(0,g.jsx)(i,{id:`28B21t`})}),(0,g.jsx)(`ul`,{className:`rounded-md border border-border bg-card/50 divide-y divide-border overflow-hidden`,children:y.map(e=>{let t=D.has(e.id),n=`${A}-skill-${e.id}`;return(0,g.jsx)(`li`,{children:(0,g.jsxs)(f,{htmlFor:n,className:`flex cursor-pointer items-start gap-2.5 px-3 py-2.5 font-normal hover:bg-accent`,children:[(0,g.jsx)(d,{id:n,checked:t,disabled:O,onCheckedChange:()=>we(t=>ve(t,e.id)),className:`mt-0.5`,"data-testid":`mcp-consent-skill-checkbox-${e.id}`}),(0,g.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,g.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:(0,g.jsx)(`code`,{children:e.name})}),(0,g.jsx)(`span`,{className:`text-xs text-muted-foreground`,"data-testid":`mcp-consent-skill-status-${e.id}`,children:e.id===`discovery`?(0,g.jsx)(i,{id:`0inVGS`}):(0,g.jsx)(i,{id:`FXk_zY`})}),e.alreadyInstalled&&!t&&(0,g.jsx)(`span`,{className:`text-xs text-amber-600 dark:text-amber-400`,"data-testid":`mcp-consent-skill-warning-${e.id}`,children:(0,g.jsx)(i,{id:`dXWMFn`})})]})]})},e.id)})})]}),t[51]=O,t[52]=y,t[53]=A,t[54]=D,t[55]=b,t[56]=U):U=t[56];let W;t[57]!==R||t[58]!==H||t[59]!==U?(W=(0,g.jsxs)(ie,{className:`flex flex-col gap-6 min-h-0`,children:[R,H,U]}),t[57]=R,t[58]=H,t[59]=U,t[60]=W):W=t[60];let G;t[61]===P?G=t[62]:(G=()=>void P(),t[61]=P,t[62]=G);let K;t[63]===Symbol.for(`react.memo_cache_sentinel`)?(K=(0,g.jsx)(i,{id:`6Uau97`}),t[63]=K):K=t[63];let q;t[64]!==O||t[65]!==G?(q=(0,g.jsx)(o,{variant:`outline`,className:`font-mono uppercase`,onClick:G,disabled:O,"data-testid":`mcp-consent-skip`,children:K}),t[64]=O,t[65]=G,t[66]=q):q=t[66];let J;t[67]===Ee?J=t[68]:(J=()=>void Ee(),t[67]=Ee,t[68]=J);let Oe=O||w.size===0&&!(S&&T)&&!b,Y;t[69]===O?Y=t[70]:(Y=O?(0,g.jsx)(i,{id:`b4itZn`}):(0,g.jsx)(i,{id:`iSLIjg`}),t[69]=O,t[70]=Y);let X;t[71]!==J||t[72]!==Oe||t[73]!==Y?(X=(0,g.jsx)(o,{onClick:J,disabled:Oe,"data-testid":`mcp-consent-add`,children:Y}),t[71]=J,t[72]=Oe,t[73]=Y,t[74]=X):X=t[74];let Z;t[75]!==q||t[76]!==X?(Z=(0,g.jsxs)(ae,{children:[q,X]}),t[75]=q,t[76]=X,t[77]=Z):Z=t[77];let Q;t[78]!==W||t[79]!==Z?(Q=(0,g.jsxs)(re,{className:`sm:max-w-md`,children:[L,W,Z]}),t[78]=W,t[79]=Z,t[80]=Q):Q=t[80];let $;return t[81]!==De||t[82]!==Q?($=(0,g.jsx)(se,{open:!0,onOpenChange:De,children:Q}),t[81]=De,t[82]=Q,t[83]=$):$=t[83],$}function be(e){e.preventDefault(),e.stopPropagation()}function xe(e){return!e}export{v as McpConsentDialogBody,v as default,me as computeInitialSelection,_e as computeInitialSkillSelection,pe as isPathRowActionable,ge as selectedIdsOrdered,ye as skillIdsOrdered,he as toggleSelectedId,ve as toggleSkillId};
@@ -1 +1 @@
1
- import{s as e}from"./chunk-Bj-mKKzh.js";import{n as t,r as n,t as r}from"./compiler-runtime-B6sxACDP.js";import{r as i}from"./dist-UKzQrqGt.js";import{n as a}from"./dist-DA2I9IQS.js";import{A as o,L as s,T as c,n as l,w as u}from"./CodeMirrorPropInput-f5pC607I.js";import{p as d}from"./config-provider-BGFykK9q.js";import{Dt as f,N as p,X as m}from"./dist-CdtMC9tO.js";import{t as h}from"./dist-TX_NQU76.js";import{t as g}from"./src-B_OV9KU-.js";var _=r(),v=e(t(),1),y=n(),b=c({settings:{background:`var(--background)`,gutterBackground:`var(--muted)`}}),x=u({settings:{background:`var(--background)`,gutterBackground:`var(--muted)`}});function S(e,t,n){let r=e.toString();if(r===t)return;let i=0,a=Math.min(r.length,t.length);for(;i<a&&r[i]===t[i];)i+=1;let o=r.length,s=t.length;for(;o>i&&s>i&&r[o-1]===t[s-1];)--o,--s;let c=()=>{o>i&&e.delete(i,o-i),s>i&&e.insert(i,t.slice(i,s))},l=e.doc;l?l.transact(c,n):c()}function C(e){let t=(0,_.c)(7),{ytext:n,provider:r,undoManager:i}=e,s=(0,v.useRef)(null),{resolvedTheme:c}=a(),u,d;t[0]!==r||t[1]!==c||t[2]!==i||t[3]!==n?(u=()=>{let e=s.current;if(!e)return;let t=c===`dark`?b:x,a=new m({state:f.create({doc:n.toString(),extensions:[h,g(n,r.awareness,{undoManager:i}),o(),p(l),m.lineWrapping,m.theme({"&":{height:`100%`}}),t]}),parent:e});return()=>a.destroy()},d=[n,r,c,i],t[0]=r,t[1]=c,t[2]=i,t[3]=n,t[4]=u,t[5]=d):(u=t[4],d=t[5]),(0,v.useEffect)(u,d);let S;return t[6]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,y.jsx)(`div`,{ref:s,className:`h-full min-h-0 overflow-auto`}),t[6]=S):S=t[6],S}var w=Symbol(`mermaid-diagram-edit`);function T(e){let t=(0,_.c)(28),{provider:n,isSourceMode:r}=e,{_:a}=i(),o;t[0]===n.document?o=t[1]:(o=n.document.getText(`source`),t[0]=n.document,t[1]=o);let c=o,l;t[2]===c?l=t[3]:(l=()=>c.toString(),t[2]=c,t[3]=l);let[u,f]=(0,v.useState)(l),p,m;t[4]===c?(p=t[5],m=t[6]):(p=()=>{let e=()=>f(c.toString());return c.observe(e),e(),()=>c.unobserve(e)},m=[c],t[4]=c,t[5]=p,t[6]=m),(0,v.useEffect)(p,m);let h;t[7]===c?h=t[8]:(h=()=>new d(c,{trackedOrigins:new Set([w])}),t[7]=c,t[8]=h);let[g]=(0,v.useState)(h),b;t[9]===c?b=t[10]:(b={canEdit:!0,getChart:()=>c.toString(),commitChart:e=>S(c,e,w)},t[9]=c,t[10]=b);let x=b,T,E;t[11]!==r||t[12]!==g?(T=()=>{if(r)return;let e=e=>{if(!(e.metaKey||e.ctrlKey)||e.key.toLowerCase()!==`z`)return;let t=e.target;if(t instanceof HTMLElement){let e=t.tagName;if(e===`INPUT`||e===`TEXTAREA`||t.isContentEditable)return}e.preventDefault(),e.shiftKey?g.redo():g.undo()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},E=[r,g],t[11]=r,t[12]=g,t[13]=T,t[14]=E):(T=t[13],E=t[14]),(0,v.useEffect)(T,E);let D;t[15]===a?D=t[16]:(D=a({id:`8PifYj`}),t[15]=a,t[16]=D);let O=r?`source`:`diagram`,k;t[17]!==x||t[18]!==r||t[19]!==n||t[20]!==u||t[21]!==g||t[22]!==c?(k=(0,y.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden`,children:r?(0,y.jsx)(C,{ytext:c,provider:n,undoManager:g}):(0,y.jsx)(`div`,{className:`flex h-full min-h-0 flex-col p-3`,children:(0,y.jsx)(s,{chart:u,editBinding:x,className:`min-h-0 flex-1`})})}),t[17]=x,t[18]=r,t[19]=n,t[20]=u,t[21]=g,t[22]=c,t[23]=k):k=t[23];let A;return t[24]!==O||t[25]!==k||t[26]!==D?(A=(0,y.jsx)(`main`,{className:`flex h-full min-h-0 flex-col bg-background`,"aria-label":D,"data-mermaid-doc-editor":``,"data-mermaid-doc-editor-mode":O,children:k}),t[24]=O,t[25]=k,t[26]=D,t[27]=A):A=t[27],A}export{T as MermaidDocEditor};
1
+ import{s as e}from"./chunk-Bj-mKKzh.js";import{n as t,r as n,t as r}from"./compiler-runtime-B6sxACDP.js";import{r as i}from"./dist-UKzQrqGt.js";import{n as a}from"./dist-DA2I9IQS.js";import{A as o,L as s,T as c,n as l,w as u}from"./CodeMirrorPropInput-cmSiPzan.js";import{p as d}from"./config-provider-DVy-GqC5.js";import{Dt as f,N as p,X as m}from"./dist-CdtMC9tO.js";import{t as h}from"./dist-Dl_HewkW.js";import{t as g}from"./src-CBkac3Ms.js";var _=r(),v=e(t(),1),y=n(),b=c({settings:{background:`var(--background)`,gutterBackground:`var(--muted)`}}),x=u({settings:{background:`var(--background)`,gutterBackground:`var(--muted)`}});function S(e,t,n){let r=e.toString();if(r===t)return;let i=0,a=Math.min(r.length,t.length);for(;i<a&&r[i]===t[i];)i+=1;let o=r.length,s=t.length;for(;o>i&&s>i&&r[o-1]===t[s-1];)--o,--s;let c=()=>{o>i&&e.delete(i,o-i),s>i&&e.insert(i,t.slice(i,s))},l=e.doc;l?l.transact(c,n):c()}function C(e){let t=(0,_.c)(7),{ytext:n,provider:r,undoManager:i}=e,s=(0,v.useRef)(null),{resolvedTheme:c}=a(),u,d;t[0]!==r||t[1]!==c||t[2]!==i||t[3]!==n?(u=()=>{let e=s.current;if(!e)return;let t=c===`dark`?b:x,a=new m({state:f.create({doc:n.toString(),extensions:[h,g(n,r.awareness,{undoManager:i}),o(),p(l),m.lineWrapping,m.theme({"&":{height:`100%`}}),t]}),parent:e});return()=>a.destroy()},d=[n,r,c,i],t[0]=r,t[1]=c,t[2]=i,t[3]=n,t[4]=u,t[5]=d):(u=t[4],d=t[5]),(0,v.useEffect)(u,d);let S;return t[6]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,y.jsx)(`div`,{ref:s,className:`h-full min-h-0 overflow-auto`}),t[6]=S):S=t[6],S}var w=Symbol(`mermaid-diagram-edit`);function T(e){let t=(0,_.c)(28),{provider:n,isSourceMode:r}=e,{_:a}=i(),o;t[0]===n.document?o=t[1]:(o=n.document.getText(`source`),t[0]=n.document,t[1]=o);let c=o,l;t[2]===c?l=t[3]:(l=()=>c.toString(),t[2]=c,t[3]=l);let[u,f]=(0,v.useState)(l),p,m;t[4]===c?(p=t[5],m=t[6]):(p=()=>{let e=()=>f(c.toString());return c.observe(e),e(),()=>c.unobserve(e)},m=[c],t[4]=c,t[5]=p,t[6]=m),(0,v.useEffect)(p,m);let h;t[7]===c?h=t[8]:(h=()=>new d(c,{trackedOrigins:new Set([w])}),t[7]=c,t[8]=h);let[g]=(0,v.useState)(h),b;t[9]===c?b=t[10]:(b={canEdit:!0,getChart:()=>c.toString(),commitChart:e=>S(c,e,w)},t[9]=c,t[10]=b);let x=b,T,E;t[11]!==r||t[12]!==g?(T=()=>{if(r)return;let e=e=>{if(!(e.metaKey||e.ctrlKey)||e.key.toLowerCase()!==`z`)return;let t=e.target;if(t instanceof HTMLElement){let e=t.tagName;if(e===`INPUT`||e===`TEXTAREA`||t.isContentEditable)return}e.preventDefault(),e.shiftKey?g.redo():g.undo()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},E=[r,g],t[11]=r,t[12]=g,t[13]=T,t[14]=E):(T=t[13],E=t[14]),(0,v.useEffect)(T,E);let D;t[15]===a?D=t[16]:(D=a({id:`8PifYj`}),t[15]=a,t[16]=D);let O=r?`source`:`diagram`,k;t[17]!==x||t[18]!==r||t[19]!==n||t[20]!==u||t[21]!==g||t[22]!==c?(k=(0,y.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden`,children:r?(0,y.jsx)(C,{ytext:c,provider:n,undoManager:g}):(0,y.jsx)(`div`,{className:`flex h-full min-h-0 flex-col p-3`,children:(0,y.jsx)(s,{chart:u,editBinding:x,className:`min-h-0 flex-1`})})}),t[17]=x,t[18]=r,t[19]=n,t[20]=u,t[21]=g,t[22]=c,t[23]=k):k=t[23];let A;return t[24]!==O||t[25]!==k||t[26]!==D?(A=(0,y.jsx)(`main`,{className:`flex h-full min-h-0 flex-col bg-background`,"aria-label":D,"data-mermaid-doc-editor":``,"data-mermaid-doc-editor-mode":O,children:k}),t[24]=O,t[25]=k,t[26]=D,t[27]=A):A=t[27],A}export{T as MermaidDocEditor};