@inkeep/open-knowledge 0.35.1-beta.3 → 0.35.1-beta.4

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 (86) 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 +45 -45
  4. package/dist/constants-CLcFGsaK.mjs +2 -0
  5. package/dist/{gh-detect-dM8nUKzs.mjs → gh-detect-Cb1UCQYG.mjs} +2 -2
  6. package/dist/git-handle-D5aVjSAb.mjs +1 -0
  7. package/dist/{git-handle-CPWu4DPI.mjs → git-handle-H0t8pegP.mjs} +2 -2
  8. package/dist/index.mjs +1 -1
  9. package/dist/{init-Db3TNZLi.mjs → init-BRPdzN9L.mjs} +4 -4
  10. package/dist/init-BZsLem5C.mjs +1 -0
  11. package/dist/{launch-json-removal-BqyYr1va.mjs → launch-json-removal-BmdvufOV.mjs} +2 -2
  12. package/dist/loader-C-FnqHSV.mjs +1 -0
  13. package/dist/{loader-BOU-bdGA.mjs → loader-I7r-0Ldo.mjs} +3 -3
  14. package/dist/{open-browser-DLXd14zy.mjs → open-browser-Dhw8dLve.mjs} +2 -2
  15. package/dist/{preview-Dz3toyFv.mjs → preview-CAYQZDe6.mjs} +2 -2
  16. package/dist/preview-CRNhRnSv.mjs +1 -0
  17. package/dist/public/assets/{ActivityModeContent-L80chDl-.js → ActivityModeContent-BUW9aMAj.js} +1 -1
  18. package/dist/public/assets/{AgentDiffPane-CSdBEzqA.js → AgentDiffPane-BLaH8w6u.js} +1 -1
  19. package/dist/public/assets/{CodeMirrorPropInput-D6D3gfNM.js → CodeMirrorPropInput-Bi4r7DgZ.js} +1 -1
  20. package/dist/public/assets/{DocumentContext-Ce4HR8nK.js → DocumentContext-QVTcu-bw.js} +1 -1
  21. package/dist/public/assets/{EnableSyncConfirmDialog-CV5OiHk7.js → EnableSyncConfirmDialog-BC_Qjvcq.js} +1 -1
  22. package/dist/public/assets/{GraphPanel-D_rq0XuS.js → GraphPanel-CbZW4P-I.js} +1 -1
  23. package/dist/public/assets/{ManagedArtifactProperties-ynFKQf1Q.js → ManagedArtifactProperties-BfKDk54d.js} +1 -1
  24. package/dist/public/assets/{McpConsentDialogBody-BFRVYHz7.js → McpConsentDialogBody-DrpJgjKO.js} +1 -1
  25. package/dist/public/assets/{MermaidDocEditor-BGiSUUbj.js → MermaidDocEditor-BwDnJXMM.js} +1 -1
  26. package/dist/public/assets/{PropertyPanel-DhBkdYqc.js → PropertyPanel-NG0dp1I-.js} +1 -1
  27. package/dist/public/assets/{ReportBugDialogBody-CWCF0pw4.js → ReportBugDialogBody-D_PqxqIJ.js} +1 -1
  28. package/dist/public/assets/{SettingsDialogBody-CaLBHWpg.js → SettingsDialogBody-CCOprUbG.js} +2 -2
  29. package/dist/public/assets/{ShareBranchSwitchDialog-9tbc2u5A.js → ShareBranchSwitchDialog-S4DEIUH2.js} +1 -1
  30. package/dist/public/assets/{ShareReceiveDialog-CJgftM_A.js → ShareReceiveDialog-D63YZ5Qt.js} +1 -1
  31. package/dist/public/assets/{ShareReceiveMissDialog-b7anPHTN.js → ShareReceiveMissDialog-C5bCaC_x.js} +1 -1
  32. package/dist/public/assets/{SkillEditorActions-B_pH0qYI.js → SkillEditorActions-4KVF20fT.js} +1 -1
  33. package/dist/public/assets/{SourceEditor-DoY82NXm.js → SourceEditor-BMRoTchw.js} +1 -1
  34. package/dist/public/assets/{TerminalPanel-jZ9q3gEi.js → TerminalPanel-DO32mQGi.js} +1 -1
  35. package/dist/public/assets/{TimelineDiffPane-BUFdCk8y.js → TimelineDiffPane-0hFKuYI4.js} +1 -1
  36. package/dist/public/assets/{agent-presence-Dt6i5Xp4.js → agent-presence-ByHbes6i.js} +1 -1
  37. package/dist/public/assets/{auth-state-cache-BOeh_24V.js → auth-state-cache-CyWc-rUz.js} +3 -3
  38. package/dist/public/assets/{config-provider-BJbRFZ7B.js → config-provider-CM0Qk_B1.js} +1 -1
  39. package/dist/public/assets/{dist-DhHfGa7x.js → dist-DXjqUQWc.js} +1 -1
  40. package/dist/public/assets/{dist-f84rU-Id.js → dist-H67bKoaU.js} +1 -1
  41. package/dist/public/assets/{doc-hash-Dd7vySOU.js → doc-hash-DZK-3zeD.js} +1 -1
  42. package/dist/public/assets/{documents-events-ej99THjS.js → documents-events-BVZ2_FvF.js} +1 -1
  43. package/dist/public/assets/{file-tree-adapter-aKU4SoTx.js → file-tree-adapter-4Otvq2cx.js} +1 -1
  44. package/dist/public/assets/index-BVnXUpPo.js +1995 -0
  45. package/dist/public/assets/{lint-config-client-COsQ7goQ.js → lint-config-client-CvyXWmXs.js} +1 -1
  46. package/dist/public/assets/{navigation-targets-DFeLNxf6.js → navigation-targets-Bdvnj5el.js} +1 -1
  47. package/dist/public/assets/open-managed-artifact-tab-D3Xycq5B.js +5 -0
  48. package/dist/public/assets/{pending-receive-nav-store-CqE2aa0o.js → pending-receive-nav-store-BhoEZnG6.js} +1 -1
  49. package/dist/public/assets/{prop-types-BgHwxhcm.js → prop-types-CCG66Y4I.js} +1 -1
  50. package/dist/public/assets/{receive-store-BJnZZbHk.js → receive-store-vKfJeA9b.js} +1 -1
  51. package/dist/public/assets/{selection-context-CsdqHEyB.js → selection-context-Camht0am.js} +1 -1
  52. package/dist/public/assets/{skill-actions-D9l9dI2V.js → skill-actions-cL6YQHiU.js} +1 -1
  53. package/dist/public/assets/{skills-api-CKFwNhSE.js → skills-api-BrvevboZ.js} +1 -1
  54. package/dist/public/assets/{src-3GGG9hYD.js → src-BydwHjwu.js} +1 -1
  55. package/dist/public/assets/{target-navigation-intent-l-T8YJRJ.js → target-navigation-intent-B2IV_p5Y.js} +1 -1
  56. package/dist/public/assets/{typing-burst-detector-DZ2Ekvzk.js → typing-burst-detector-D3atST3k.js} +1 -1
  57. package/dist/public/assets/{use-activity-panel-Bb6tO5wf.js → use-activity-panel-DBvA0hQ2.js} +1 -1
  58. package/dist/public/assets/{use-apply-config-color-theme-eLHOzigT.js → use-apply-config-color-theme-D_qio6w-.js} +1 -1
  59. package/dist/public/assets/{use-timeline-entry-diff-DNnmtdSJ.js → use-timeline-entry-diff-BhNsU170.js} +1 -1
  60. package/dist/public/assets/{workspace-paths-C4HhShIO.js → workspace-paths-iLOFM5BT.js} +1 -1
  61. package/dist/public/index.html +26 -26
  62. package/dist/{repair-launch-json-B0IMAMfR.mjs → repair-launch-json-CuB19poA.mjs} +2 -2
  63. package/dist/{repair-mcp-configs-CzoYCyZH.mjs → repair-mcp-configs-D7vd7gGq.mjs} +2 -2
  64. package/dist/{repair-skills-CjpripUK.mjs → repair-skills-4Dcd6NTt.mjs} +2 -2
  65. package/dist/repair-skills-BcvPN23G.mjs +1 -0
  66. package/dist/server-lock-CPMjg3EK.mjs +1 -0
  67. package/dist/{server-lock-Cn2-KrjV.mjs → server-lock-DZQRJfHi.mjs} +2 -2
  68. package/dist/src-BKuFxm9H.mjs +3310 -0
  69. package/dist/{src-BgrRg-nl.mjs → src-CLZCA0wF.mjs} +19 -19
  70. package/dist/{src-D3RAM6vg.mjs → src-DUBbCkx-.mjs} +1 -1
  71. package/dist/{src-CzsCpBh5.mjs → src-bm9hZUKf.mjs} +5 -5
  72. package/dist/{start-D9f_sm8m.mjs → start-BrcFfijH.mjs} +2 -2
  73. package/dist/start-DXe14NGf.mjs +1 -0
  74. package/dist/{write-project-skill-CLggzjLg.mjs → write-project-skill-nQkZOZuL.mjs} +2 -2
  75. package/package.json +5 -5
  76. package/dist/constants-BwXw3nmC.mjs +0 -2
  77. package/dist/git-handle-BAtE8N7I.mjs +0 -1
  78. package/dist/init-De8ZBQcZ.mjs +0 -1
  79. package/dist/loader-BMvfVL6f.mjs +0 -1
  80. package/dist/preview-C3eenxER.mjs +0 -1
  81. package/dist/public/assets/index-D6Mo6Nm2.js +0 -1995
  82. package/dist/public/assets/open-managed-artifact-tab-DZP8ChES.js +0 -5
  83. package/dist/repair-skills-B95d0UWj.mjs +0 -1
  84. package/dist/server-lock-kLJ8OVOq.mjs +0 -1
  85. package/dist/src-D87GkAFF.mjs +0 -3309
  86. package/dist/start-jzaCzf2B.mjs +0 -1
@@ -1 +1 @@
1
- import{i as e}from"./chunk-DseTPa7n.js";import{n as t,r as n,t as r}from"./compiler-runtime-DrcePeIl.js";import{n as i,r as a}from"./dist-CSDjUb5q.js";import{n as o,t as s}from"./createLucideIcon-Wgamzz8_.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-492Ff7fG.js";import{_a as g}from"./dist-DhHfGa7x.js";import{t as _}from"./eye-Cq1_8-Tk.js";import{n as v}from"./dist-CAIcun02.js";import{o as y}from"./documents-events-ej99THjS.js";import"./config-provider-BJbRFZ7B.js";import{n as b}from"./config-context-BaIZpYSb.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{i as e}from"./chunk-DseTPa7n.js";import{n as t,r as n,t as r}from"./compiler-runtime-DrcePeIl.js";import{n as i,r as a}from"./dist-CSDjUb5q.js";import{n as o,t as s}from"./createLucideIcon-Wgamzz8_.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-492Ff7fG.js";import{_a as g}from"./dist-DXjqUQWc.js";import{t as _}from"./eye-Cq1_8-Tk.js";import{n as v}from"./dist-CAIcun02.js";import{o as y}from"./documents-events-BVZ2_FvF.js";import"./config-provider-CM0Qk_B1.js";import{n as b}from"./config-context-BaIZpYSb.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{i as e}from"./chunk-DseTPa7n.js";import{n,r,t as i}from"./compiler-runtime-DrcePeIl.js";import{n as a,r as o}from"./dist-CSDjUb5q.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-BGYdvxEm.js";import{n as h}from"./dist-DGbq0bSp.js";import{n as g,t as _,u as v}from"./createLucideIcon-Wgamzz8_.js";import{i as y,n as b,t as x}from"./tooltip-CuKuwVbZ.js";import{n as S,t as C}from"./toggle-group-B30vKHKs.js";import{U as w,Y as T,ct as E,dr as D,ht as ee,st as O}from"./dist-DhHfGa7x.js";import{t as te}from"./arrow-up-right-BnJZWj8r.js";import{a as ne,i as re,o as ie,t as ae}from"./prop-types-BgHwxhcm.js";import{t as oe}from"./triangle-alert-BaZPlVka.js";import{t as k}from"./dist-o9cVHl8Q.js";import{o as se}from"./documents-events-ej99THjS.js";import{s as ce}from"./doc-hash-Dd7vySOU.js";import{n as le}from"./external-link-BUoZ56id.js";import{t as ue}from"./target-navigation-intent-l-T8YJRJ.js";import{t as de}from"./ordinal-DqdsPg4w.js";import{n as fe,t as pe}from"./min-B7KH7bOg.js";import{C as me,S as he,_ as ge,b as _e,g as A,n as j,r as ve,t as ye,v as be,w as xe,x as Se,y as Ce}from"./src-CvdYkko8.js";import{t as we}from"./colors-BtGPfaz7.js";import{t as Te}from"./isObject-Bj-0X2GB.js";import{n as Ee,t as M}from"./now-DuonpS3w.js";var De=_(`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`}]]),Oe=_(`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 N(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 ke=e=>()=>e;function Ae(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}})}Ae.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function je(e){return!e.ctrlKey&&!e.button}function Me(){return this.parentNode}function Ne(e,n){return n??{x:e.x,y:e.y}}function Pe(){return navigator.maxTouchPoints||`ontouchstart`in this}function Fe(){var e=je,n=Me,r=Ne,i=Pe,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&&(me(r.view).on(`mousemove.drag`,h,_e).on(`mouseup.drag`,g,_e),A(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){me(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 Ae(`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 Ae(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:ke(!!n),p):e},p.container=function(e){return arguments.length?(n=typeof e==`function`?e:ke(e),p):n},p.subject=function(e){return arguments.length?(r=typeof e==`function`?e:ke(e),p):r},p.touchable=function(e){return arguments.length?(i=typeof e==`function`?e:ke(!!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 Ie(e){let n=+this._x.call(null,e),r=+this._y.call(null,e);return Le(this.cover(n,r),n,r,e)}function Le(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 Re(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)Le(this,s[r],c[r],e[r]);return this}function ze(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 Be(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function Ve(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 P(e,n,r,i,a){this.node=e,this.x0=n,this.y0=r,this.x1=i,this.y1=a}function F(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 P(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 P(m[3],_,v,l,u),new P(m[2],s,v,_,u),new P(m[1],_,c,l,v),new P(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 He(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 Ue(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function We(){return this._root}function I(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function Ge(e){var n=[],r,i=this._root,a,o,s,c,l;for(i&&n.push(new P(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 P(a,u,d,c,l)),(a=i[2])&&n.push(new P(a,o,d,u,l)),(a=i[1])&&n.push(new P(a,u,s,c,d)),(a=i[0])&&n.push(new P(a,o,s,u,d))}return this}function Ke(e){var n=[],r=[],i;for(this._root&&n.push(new P(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 P(o,s,c,d,f)),(o=a[1])&&n.push(new P(o,d,c,l,f)),(o=a[2])&&n.push(new P(o,s,f,d,u)),(o=a[3])&&n.push(new P(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 qe(e){return e[0]}function Je(e){return arguments.length?(this._x=e,this):this._x}function Ye(e){return e[1]}function Xe(e){return arguments.length?(this._y=e,this):this._y}function L(e,n,r){var i=new Ze(n??qe,r??Ye,NaN,NaN,NaN,NaN);return e==null?i:i.addAll(e)}function Ze(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 Qe(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var R=L.prototype=Ze.prototype;R.copy=function(){var e=new Ze(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=Qe(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]=Qe(i));return e},R.add=Ie,R.addAll=Re,R.cover=ze,R.data=Be,R.extent=Ve,R.find=F,R.remove=He,R.removeAll=Ue,R.root=We,R.size=I,R.visit=Ge,R.visitAfter=Ke,R.x=Je,R.y=Xe;var $e=we(`a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928`),z=r(),B=e(n(),1),et=i(),tt=`Expected a function`,nt=Math.max,rt=Math.min;function it(e,n,r){var i,a,o,s,c,l,u=0,d=!1,f=!1,p=!0;if(typeof e!=`function`)throw TypeError(tt);n=Ee(n)||0,Te(r)&&(d=!!r.leading,f=`maxWait`in r,o=f?nt(Ee(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?rt(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=M();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(M())}function S(){var e=M(),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 at=`Expected a function`;function ot(e,n,r){var i=!0,a=!0;if(typeof e!=`function`)throw TypeError(at);return Te(r)&&(i=`leading`in r?!!r.leading:i,a=`trailing`in r?!!r.trailing:a),it(e,n,{leading:i,maxWait:n,trailing:a})}var V=[`#60a5fa`,`#a78bfa`,`#34d399`,`#f472b6`,`#fb923c`,`#22d3ee`,`#c084fc`,`#4ade80`,`#f87171`,`#eab308`,`#ec4899`,`#06b67f`,`#8b5cf6`,`#f43f5e`,`#0ea5e9`,`#a855f7`],st=[`#1e40af`,`#6b21a8`,`#166534`,`#9f1239`,`#9a3412`,`#164e63`,`#581c87`,`#166534`,`#991b1b`,`#854d0e`,`#831843`,`#0f766e`,`#312e81`,`#9f1239`,`#0c4a6e`,`#6b21a8`];function H(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?V:st;return r[H(e)%r.length]}var U={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 lt(e){return U[e]}function ut(e){let n=(0,et.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=lt(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,z.jsx)(a,{id:`kmKqZg`}),n[5]=d):d=n[5],l=(0,z.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,z.jsx)(`div`,{className:v(`font-medium`,e.titleClassName,c?`text-slate-300`:`text-slate-700`),children:d}),i.map(n=>(0,z.jsxs)(`div`,{className:v(`flex items-center`,e.rowClassName),children:[(0,z.jsx)(`span`,{className:v(`inline-block shrink-0 rounded-full`,e.swatchClassName),style:{backgroundColor:ct(n,c)}}),(0,z.jsx)(`span`,{className:v(`truncate`,e.labelClassName),children:n})]},n)),s>0&&(0,z.jsx)(`div`,{className:v(`text-muted-foreground`,e.overflowClassName),children:(0,z.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 dt(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 ft(e,n,r){return n=Ct(n),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function pt(e,n){return gt(e)||dt(e,n)||vt(e,n)||xt()}function mt(e){return ht(e)||_t(e)||vt(e)||bt()}function ht(e){if(Array.isArray(e))return yt(e)}function gt(e){if(Array.isArray(e))return e}function _t(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function vt(e,n){if(e){if(typeof e==`string`)return yt(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 yt(e,n)}}function yt(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 bt(){throw TypeError(`Invalid attempt to spread non-iterable instance.
1
+ import{i as e}from"./chunk-DseTPa7n.js";import{n,r,t as i}from"./compiler-runtime-DrcePeIl.js";import{n as a,r as o}from"./dist-CSDjUb5q.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-BGYdvxEm.js";import{n as h}from"./dist-DGbq0bSp.js";import{n as g,t as _,u as v}from"./createLucideIcon-Wgamzz8_.js";import{i as y,n as b,t as x}from"./tooltip-CuKuwVbZ.js";import{n as S,t as C}from"./toggle-group-B30vKHKs.js";import{U as w,Y as T,ct as E,dr as D,ht as ee,st as O}from"./dist-DXjqUQWc.js";import{t as te}from"./arrow-up-right-BnJZWj8r.js";import{a as ne,i as re,o as ie,t as ae}from"./prop-types-CCG66Y4I.js";import{t as oe}from"./triangle-alert-BaZPlVka.js";import{t as k}from"./dist-o9cVHl8Q.js";import{o as se}from"./documents-events-BVZ2_FvF.js";import{s as ce}from"./doc-hash-DZK-3zeD.js";import{n as le}from"./external-link-BUoZ56id.js";import{t as ue}from"./target-navigation-intent-B2IV_p5Y.js";import{t as de}from"./ordinal-DqdsPg4w.js";import{n as fe,t as pe}from"./min-B7KH7bOg.js";import{C as me,S as he,_ as ge,b as _e,g as A,n as j,r as ve,t as ye,v as be,w as xe,x as Se,y as Ce}from"./src-CvdYkko8.js";import{t as we}from"./colors-BtGPfaz7.js";import{t as Te}from"./isObject-Bj-0X2GB.js";import{n as Ee,t as M}from"./now-DuonpS3w.js";var De=_(`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`}]]),Oe=_(`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 N(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 ke=e=>()=>e;function Ae(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}})}Ae.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function je(e){return!e.ctrlKey&&!e.button}function Me(){return this.parentNode}function Ne(e,n){return n??{x:e.x,y:e.y}}function Pe(){return navigator.maxTouchPoints||`ontouchstart`in this}function Fe(){var e=je,n=Me,r=Ne,i=Pe,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&&(me(r.view).on(`mousemove.drag`,h,_e).on(`mouseup.drag`,g,_e),A(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){me(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 Ae(`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 Ae(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:ke(!!n),p):e},p.container=function(e){return arguments.length?(n=typeof e==`function`?e:ke(e),p):n},p.subject=function(e){return arguments.length?(r=typeof e==`function`?e:ke(e),p):r},p.touchable=function(e){return arguments.length?(i=typeof e==`function`?e:ke(!!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 Ie(e){let n=+this._x.call(null,e),r=+this._y.call(null,e);return Le(this.cover(n,r),n,r,e)}function Le(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 Re(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)Le(this,s[r],c[r],e[r]);return this}function ze(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 Be(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function Ve(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 P(e,n,r,i,a){this.node=e,this.x0=n,this.y0=r,this.x1=i,this.y1=a}function F(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 P(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 P(m[3],_,v,l,u),new P(m[2],s,v,_,u),new P(m[1],_,c,l,v),new P(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 He(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 Ue(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function We(){return this._root}function I(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function Ge(e){var n=[],r,i=this._root,a,o,s,c,l;for(i&&n.push(new P(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 P(a,u,d,c,l)),(a=i[2])&&n.push(new P(a,o,d,u,l)),(a=i[1])&&n.push(new P(a,u,s,c,d)),(a=i[0])&&n.push(new P(a,o,s,u,d))}return this}function Ke(e){var n=[],r=[],i;for(this._root&&n.push(new P(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 P(o,s,c,d,f)),(o=a[1])&&n.push(new P(o,d,c,l,f)),(o=a[2])&&n.push(new P(o,s,f,d,u)),(o=a[3])&&n.push(new P(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 qe(e){return e[0]}function Je(e){return arguments.length?(this._x=e,this):this._x}function Ye(e){return e[1]}function Xe(e){return arguments.length?(this._y=e,this):this._y}function L(e,n,r){var i=new Ze(n??qe,r??Ye,NaN,NaN,NaN,NaN);return e==null?i:i.addAll(e)}function Ze(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 Qe(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var R=L.prototype=Ze.prototype;R.copy=function(){var e=new Ze(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=Qe(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]=Qe(i));return e},R.add=Ie,R.addAll=Re,R.cover=ze,R.data=Be,R.extent=Ve,R.find=F,R.remove=He,R.removeAll=Ue,R.root=We,R.size=I,R.visit=Ge,R.visitAfter=Ke,R.x=Je,R.y=Xe;var $e=we(`a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928`),z=r(),B=e(n(),1),et=i(),tt=`Expected a function`,nt=Math.max,rt=Math.min;function it(e,n,r){var i,a,o,s,c,l,u=0,d=!1,f=!1,p=!0;if(typeof e!=`function`)throw TypeError(tt);n=Ee(n)||0,Te(r)&&(d=!!r.leading,f=`maxWait`in r,o=f?nt(Ee(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?rt(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=M();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(M())}function S(){var e=M(),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 at=`Expected a function`;function ot(e,n,r){var i=!0,a=!0;if(typeof e!=`function`)throw TypeError(at);return Te(r)&&(i=`leading`in r?!!r.leading:i,a=`trailing`in r?!!r.trailing:a),it(e,n,{leading:i,maxWait:n,trailing:a})}var V=[`#60a5fa`,`#a78bfa`,`#34d399`,`#f472b6`,`#fb923c`,`#22d3ee`,`#c084fc`,`#4ade80`,`#f87171`,`#eab308`,`#ec4899`,`#06b67f`,`#8b5cf6`,`#f43f5e`,`#0ea5e9`,`#a855f7`],st=[`#1e40af`,`#6b21a8`,`#166534`,`#9f1239`,`#9a3412`,`#164e63`,`#581c87`,`#166534`,`#991b1b`,`#854d0e`,`#831843`,`#0f766e`,`#312e81`,`#9f1239`,`#0c4a6e`,`#6b21a8`];function H(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?V:st;return r[H(e)%r.length]}var U={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 lt(e){return U[e]}function ut(e){let n=(0,et.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=lt(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,z.jsx)(a,{id:`kmKqZg`}),n[5]=d):d=n[5],l=(0,z.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,z.jsx)(`div`,{className:v(`font-medium`,e.titleClassName,c?`text-slate-300`:`text-slate-700`),children:d}),i.map(n=>(0,z.jsxs)(`div`,{className:v(`flex items-center`,e.rowClassName),children:[(0,z.jsx)(`span`,{className:v(`inline-block shrink-0 rounded-full`,e.swatchClassName),style:{backgroundColor:ct(n,c)}}),(0,z.jsx)(`span`,{className:v(`truncate`,e.labelClassName),children:n})]},n)),s>0&&(0,z.jsx)(`div`,{className:v(`text-muted-foreground`,e.overflowClassName),children:(0,z.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 dt(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 ft(e,n,r){return n=Ct(n),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function pt(e,n){return gt(e)||dt(e,n)||vt(e,n)||xt()}function mt(e){return ht(e)||_t(e)||vt(e)||bt()}function ht(e){if(Array.isArray(e))return yt(e)}function gt(e){if(Array.isArray(e))return e}function _t(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function vt(e,n){if(e){if(typeof e==`string`)return yt(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 yt(e,n)}}function yt(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 bt(){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 xt(){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 St(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 Ct(e){var n=St(e,`string`);return typeof n==`symbol`?n:String(n)}var wt=function(e,n){var r=new Set(n);return Object.assign.apply(Object,[{}].concat(mt(Object.entries(e).filter(function(e){var n=pt(e,1)[0];return!r.has(n)}).map(function(e){var n=pt(e,2),r=n[0],i=n[1];return ft({},r,i)}))))};function Tt(e,{wrapperElementType:n=`div`,nodeMapper:r=e=>e,methodNames:i=[],initPropNames:a=[]}={}){return(0,B.forwardRef)((o,s)=>{let c=(0,B.useRef)(),l=(0,B.useMemo)(()=>e(Object.fromEntries(a.filter(e=>o.hasOwnProperty(e)).map(e=>[e,o[e]]))),[]);Et(()=>{l(r(c.current))},B.useLayoutEffect),Et(()=>l._destructor instanceof Function?l._destructor:void 0);let u=(0,B.useCallback)((e,...n)=>l[e]instanceof Function?l[e](...n):void 0,[l]),d=(0,B.useRef)({});return Object.keys(wt(o,[...i,...a])).filter(e=>d.current[e]!==o[e]).forEach(e=>u(e,o[e])),d.current=o,(0,B.useImperativeHandle)(s,()=>Object.fromEntries(i.map(e=>[e,(...n)=>u(e,...n)])),[u]),B.createElement(n,{ref:c})})}function Et(e,n=B.useEffect){let r=(0,B.useRef)(),i=(0,B.useRef)(!1),a=(0,B.useRef)(!1),[o,s]=(0,B.useState)(0);i.current&&(a.current=!0),n(()=>(i.current||=(r.current=e(),!0),s(e=>e+1),()=>{a.current&&=(r.current&&r.current(),r.current=void 0,i.current=!1,!1)}),[])}var Dt=Object.freeze({Linear:Object.freeze({None:function(e){return e},In:function(e){return e},Out:function(e){return e},InOut:function(e){return e}}),Quadratic:Object.freeze({In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}}),Cubic:Object.freeze({In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}}),Quartic:Object.freeze({In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}}),Quintic:Object.freeze({In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}}),Sinusoidal:Object.freeze({In:function(e){return 1-Math.sin((1-e)*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return .5*(1-Math.sin(Math.PI*(.5-e)))}}),Exponential:Object.freeze({In:function(e){return e===0?0:1024**(e-1)},Out:function(e){return e===1?1:1-2**(-10*e)},InOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*1024**(e-1):.5*(-(2**(-10*(e-1)))+2)}}),Circular:Object.freeze({In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}}),Elastic:Object.freeze({In:function(e){return e===0?0:e===1?1:-(2**(10*(e-1)))*Math.sin((e-1.1)*5*Math.PI)},Out:function(e){return e===0?0:e===1?1:2**(-10*e)*Math.sin((e-.1)*5*Math.PI)+1},InOut:function(e){return e===0?0:e===1?1:(e*=2,e<1?-.5*2**(10*(e-1))*Math.sin((e-1.1)*5*Math.PI):.5*2**(-10*(e-1))*Math.sin((e-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(e){var n=1.70158;return e===1?1:e*e*((n+1)*e-n)},Out:function(e){var n=1.70158;return e===0?0:--e*e*((n+1)*e+n)+1},InOut:function(e){var n=1.70158*1.525;return(e*=2)<1?.5*(e*e*((n+1)*e-n)):.5*((e-=2)*e*((n+1)*e+n)+2)}}),Bounce:Object.freeze({In:function(e){return 1-Dt.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?Dt.Bounce.In(e*2)*.5:Dt.Bounce.Out(e*2-1)*.5+.5}}),generatePow:function(e){return e===void 0&&(e=4),e=e<2**-52?2**-52:e,e=e>1e4?1e4:e,{In:function(n){return n**+e},Out:function(n){return 1-(1-n)**e},InOut:function(n){return n<.5?(n*2)**e/2:(1-(2-n*2)**e)/2+.5}}}}),Ot=function(){return performance.now()},kt=function(){function e(){var e=[...arguments];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,e)}return e.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map(function(n){return e._tweens[n]})},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(){for(var e,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];for(var i=0,a=n;i<a.length;i++){var o=a[i];(e=o._group)==null||e.remove(o),o._group=this,this._tweens[o.getId()]=o,this._tweensAddedDuringUpdate[o.getId()]=o}},e.prototype.remove=function(){for(var e=[...arguments],n=0,r=e;n<r.length;n++){var i=r[n];i._group=void 0,delete this._tweens[i.getId()],delete this._tweensAddedDuringUpdate[i.getId()]}},e.prototype.allStopped=function(){return this.getAll().every(function(e){return!e.isPlaying()})},e.prototype.update=function(e,n){e===void 0&&(e=Ot()),n===void 0&&(n=!0);var r=Object.keys(this._tweens);if(r.length!==0)for(;r.length>0;){this._tweensAddedDuringUpdate={};for(var i=0;i<r.length;i++){var a=this._tweens[r[i]],o=!n;a&&a.update(e,o)===!1&&!n&&this.remove(a)}r=Object.keys(this._tweensAddedDuringUpdate)}},e}(),At={Linear:function(e,n){var r=e.length-1,i=r*n,a=Math.floor(i),o=At.Utils.Linear;return n<0?o(e[0],e[1],i):n>1?o(e[r],e[r-1],r-i):o(e[a],e[a+1>r?r:a+1],i-a)},Bezier:function(e,n){for(var r=0,i=e.length-1,a=Math.pow,o=At.Utils.Bernstein,s=0;s<=i;s++)r+=a(1-n,i-s)*a(n,s)*e[s]*o(i,s);return r},CatmullRom:function(e,n){var r=e.length-1,i=r*n,a=Math.floor(i),o=At.Utils.CatmullRom;return e[0]===e[r]?(n<0&&(a=Math.floor(i=r*(1+n))),o(e[(a-1+r)%r],e[a],e[(a+1)%r],e[(a+2)%r],i-a)):n<0?e[0]-(o(e[0],e[0],e[1],e[1],-i)-e[0]):n>1?e[r]-(o(e[r],e[r],e[r-1],e[r-1],i-r)-e[r]):o(e[a?a-1:0],e[a],e[r<a+1?r:a+1],e[r<a+2?r:a+2],i-a)},Utils:{Linear:function(e,n,r){return(n-e)*r+e},Bernstein:function(e,n){var r=At.Utils.Factorial;return r(e)/r(n)/r(e-n)},Factorial:(function(){var e=[1];return function(n){var r=1;if(e[n])return e[n];for(var i=n;i>1;i--)r*=i;return e[n]=r,r}})(),CatmullRom:function(e,n,r,i,a){var o=(r-e)*.5,s=(i-n)*.5,c=a*a,l=a*c;return(2*n-2*r+o+s)*l+(-3*n+3*r-2*o-s)*c+o*a+n}}},jt=function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e}(),Mt=new kt,Nt=function(){function e(e,n){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=Dt.Linear.None,this._interpolationFunction=At.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=jt.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=e,typeof n==`object`?(this._group=n,n.add(this)):n===!0&&(this._group=Mt,Mt.add(this))}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.getDuration=function(){return this._duration},e.prototype.to=function(e,n){if(n===void 0&&(n=1e3),this._isPlaying)throw Error(`Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.`);return this._valuesEnd=e,this._propertiesAreSetUp=!1,this._duration=n<0?0:n,this},e.prototype.duration=function(e){return e===void 0&&(e=1e3),this._duration=e<0?0:e,this},e.prototype.dynamic=function(e){return e===void 0&&(e=!1),this._isDynamic=e,this},e.prototype.start=function(e,n){if(e===void 0&&(e=Ot()),n===void 0&&(n=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed)for(var r in this._reversed=!1,this._valuesStartRepeat)this._swapEndStartRepeatValues(r),this._valuesStart[r]=this._valuesStartRepeat[r];if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=e,this._startTime+=this._delayTime,!this._propertiesAreSetUp||n){if(this._propertiesAreSetUp=!0,!this._isDynamic){var i={};for(var a in this._valuesEnd)i[a]=this._valuesEnd[a];this._valuesEnd=i}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,n)}return this},e.prototype.startFromCurrentValues=function(e){return this.start(e,!0)},e.prototype._setupProperties=function(e,n,r,i,a){for(var o in r){var s=e[o],c=Array.isArray(s),l=c?`array`:typeof s,u=!c&&Array.isArray(r[o]);if(!(l===`undefined`||l===`function`)){if(u){var d=r[o];if(d.length===0)continue;for(var f=[s],p=0,m=d.length;p<m;p+=1){var h=this._handleRelativeValue(s,d[p]);if(isNaN(h)){u=!1,console.warn(`Found invalid interpolation list. Skipping.`);break}f.push(h)}u&&(r[o]=f)}if((l===`object`||c)&&s&&!u){n[o]=c?[]:{};var g=s;for(var _ in g)n[o][_]=g[_];i[o]=c?[]:{};var d=r[o];if(!this._isDynamic){var v={};for(var _ in d)v[_]=d[_];r[o]=d=v}this._setupProperties(g,n[o],d,i[o],a)}else (n[o]===void 0||a)&&(n[o]=s),c||(n[o]*=1),u?i[o]=r[o].slice().reverse():i[o]=n[o]||0}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},e.prototype.pause=function(e){return e===void 0&&(e=Ot()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=e,this)},e.prototype.resume=function(e){return e===void 0&&(e=Ot()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this)},e.prototype.stopChainedTweens=function(){for(var e=0,n=this._chainedTweens.length;e<n;e++)this._chainedTweens[e].stop();return this},e.prototype.group=function(e){return e?(e.add(this),this):(console.warn(`tween.group() without args has been removed, use group.add(tween) instead.`),this)},e.prototype.remove=function(){var e;return(e=this._group)==null||e.remove(this),this},e.prototype.delay=function(e){return e===void 0&&(e=0),this._delayTime=e,this},e.prototype.repeat=function(e){return e===void 0&&(e=0),this._initialRepeat=e,this._repeat=e,this},e.prototype.repeatDelay=function(e){return this._repeatDelayTime=e,this},e.prototype.yoyo=function(e){return e===void 0&&(e=!1),this._yoyo=e,this},e.prototype.easing=function(e){return e===void 0&&(e=Dt.Linear.None),this._easingFunction=e,this},e.prototype.interpolation=function(e){return e===void 0&&(e=At.Linear),this._interpolationFunction=e,this},e.prototype.chain=function(){return this._chainedTweens=[...arguments],this},e.prototype.onStart=function(e){return this._onStartCallback=e,this},e.prototype.onEveryStart=function(e){return this._onEveryStartCallback=e,this},e.prototype.onUpdate=function(e){return this._onUpdateCallback=e,this},e.prototype.onRepeat=function(e){return this._onRepeatCallback=e,this},e.prototype.onComplete=function(e){return this._onCompleteCallback=e,this},e.prototype.onStop=function(e){return this._onStopCallback=e,this},e.prototype.update=function(n,r){var i=this;if(n===void 0&&(n=Ot()),r===void 0&&(r=e.autoStartOnUpdate),this._isPaused)return!0;var a;if(!this._goToEnd&&!this._isPlaying)if(r)this.start(n,!0);else return!1;if(this._goToEnd=!1,n<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var o=n-this._startTime,s=this._duration+(this._repeatDelayTime??this._delayTime),c=this._duration+this._repeat*s,l=function(){if(i._duration===0||o>c)return 1;var e=o-Math.trunc(o/s)*s,n=Math.min(e/i._duration,1);return n===0&&o===i._duration?1:n}(),u=this._easingFunction(l);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,u),this._onUpdateCallback&&this._onUpdateCallback(this._object,l),this._duration===0||o>=this._duration)if(this._repeat>0){var d=Math.min(Math.trunc((o-this._duration)/s)+1,this._repeat);for(a in isFinite(this._repeat)&&(this._repeat-=d),this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[a]==`string`&&(this._valuesStartRepeat[a]=this._valuesStartRepeat[a]+parseFloat(this._valuesEnd[a])),this._yoyo&&this._swapEndStartRepeatValues(a),this._valuesStart[a]=this._valuesStartRepeat[a];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=s*d,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var f=0,p=this._chainedTweens.length;f<p;f++)this._chainedTweens[f].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(e,n,r,i){for(var a in r)if(n[a]!==void 0){var o=n[a]||0,s=r[a];!Array.isArray(e[a])&&Array.isArray(s)?e[a]=this._interpolationFunction(s,i):typeof s==`object`&&s?this._updateProperties(e[a],o,s,i):(s=this._handleRelativeValue(o,s),typeof s==`number`&&(e[a]=o+(s-o)*i))}},e.prototype._handleRelativeValue=function(e,n){return typeof n==`string`?n.charAt(0)===`+`||n.charAt(0)===`-`?e+parseFloat(n):parseFloat(n):n},e.prototype._swapEndStartRepeatValues=function(e){var n=this._valuesStartRepeat[e],r=this._valuesEnd[e];typeof r==`string`?this._valuesStartRepeat[e]=this._valuesStartRepeat[e]+parseFloat(r):this._valuesStartRepeat[e]=this._valuesEnd[e],this._valuesEnd[e]=n},e.autoStartOnUpdate=!1,e}();jt.nextId;var Pt=Mt;Pt.getAll.bind(Pt),Pt.removeAll.bind(Pt),Pt.add.bind(Pt),Pt.remove.bind(Pt),Pt.update.bind(Pt);function Ft(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 It(e){if(Array.isArray(e))return e}function Lt(e,n){if(!(e instanceof n))throw TypeError(`Cannot call a class as a function`)}function Rt(e,n,r){return Object.defineProperty(e,`prototype`,{writable:!1}),e}function zt(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 Bt(){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 Vt(e,n){return It(e)||zt(e,n)||Ht(e,n)||Bt()}function Ht(e,n){if(e){if(typeof e==`string`)return Ft(e,n);var r={}.toString.call(e).slice(8,-1);return r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`?Array.from(e):r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ft(e,n):void 0}}var Ut=Rt(function e(n,r){var i=r.default,a=i===void 0?null:i,o=r.triggerUpdate,s=o===void 0?!0:o,c=r.onChange,l=c===void 0?function(e,n){}:c;Lt(this,e),this.name=n,this.defaultVal=a,this.triggerUpdate=s,this.onChange=l});function Wt(e){var n=e.stateInit,r=n===void 0?function(){return{}}:n,i=e.props,a=i===void 0?{}:i,o=e.methods,s=o===void 0?{}:o,c=e.aliases,l=c===void 0?{}:c,u=e.init,d=u===void 0?function(){}:u,f=e.update,p=f===void 0?function(){}:f,m=Object.keys(a).map(function(e){return new Ut(e,a[e])});return function e(){var n=[...arguments],i=!!(this instanceof e&&this.constructor),a=i?n.shift():void 0,o=n[0],c=o===void 0?{}:o,u=Object.assign({},r instanceof Function?r(c):r,{initialised:!1}),f={};function h(e){return g(e,c),_(),h}var g=function(e,n){d.call(h,e,u,n),u.initialised=!0},_=it(function(){u.initialised&&(p.call(h,u,f),f={})},1);return m.forEach(function(e){h[e.name]=n(e);function n(e){var n=e.name,r=e.triggerUpdate,i=r===void 0?!1:r,a=e.onChange,o=a===void 0?function(e,n){}:a,s=e.defaultVal,c=s===void 0?null:s;return function(e){var r=u[n];if(!arguments.length)return r;var a=e===void 0?c:e;return u[n]=a,o.call(h,a,u,r),!f.hasOwnProperty(n)&&(f[n]=r),i&&_(),h}}}),Object.keys(s).forEach(function(e){h[e]=function(){var n,r=[...arguments];return(n=s[e]).call.apply(n,[h,u].concat(r))}}),Object.entries(l).forEach(function(e){var n=Vt(e,2),r=n[0];return h[r]=h[n[1]]}),h.resetProps=function(){return m.forEach(function(e){h[e.name](e.defaultVal)}),h},h.resetProps(),u._rerender=_,i&&a&&h(a),h}}var W=(function(e){return typeof e==`function`?e:typeof e==`string`?function(n){return n[e]}:function(n){return e}});function Gt(e){"@babel/helpers - typeof";return Gt=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Gt(e)}var Kt=/^\s+/,qt=/\s+$/;function G(e,n){if(e||=``,n||={},e instanceof G)return e;if(!(this instanceof G))return new G(e,n);var r=Jt(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=n.format||r.format,this._gradientType=n.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}G.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),n=e.r/255,r=e.g/255,i=e.b/255,a=n<=.03928?n/12.92:((n+.055)/1.055)**2.4,o=r<=.03928?r/12.92:((r+.055)/1.055)**2.4,s=i<=.03928?i/12.92:((i+.055)/1.055)**2.4;return .2126*a+.7152*o+.0722*s},setAlpha:function(e){return this._a=yn(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=Qt(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=Qt(this._r,this._g,this._b),n=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.v*100);return this._a==1?`hsv(`+n+`, `+r+`%, `+i+`%)`:`hsva(`+n+`, `+r+`%, `+i+`%, `+this._roundA+`)`},toHsl:function(){var e=Xt(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=Xt(this._r,this._g,this._b),n=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.l*100);return this._a==1?`hsl(`+n+`, `+r+`%, `+i+`%)`:`hsla(`+n+`, `+r+`%, `+i+`%, `+this._roundA+`)`},toHex:function(e){return en(this._r,this._g,this._b,e)},toHexString:function(e){return`#`+this.toHex(e)},toHex8:function(e){return tn(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return`#`+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?`rgb(`+Math.round(this._r)+`, `+Math.round(this._g)+`, `+Math.round(this._b)+`)`:`rgba(`+Math.round(this._r)+`, `+Math.round(this._g)+`, `+Math.round(this._b)+`, `+this._roundA+`)`},toPercentageRgb:function(){return{r:Math.round(K(this._r,255)*100)+`%`,g:Math.round(K(this._g,255)*100)+`%`,b:Math.round(K(this._b,255)*100)+`%`,a:this._a}},toPercentageRgbString:function(){return this._a==1?`rgb(`+Math.round(K(this._r,255)*100)+`%, `+Math.round(K(this._g,255)*100)+`%, `+Math.round(K(this._b,255)*100)+`%)`:`rgba(`+Math.round(K(this._r,255)*100)+`%, `+Math.round(K(this._g,255)*100)+`%, `+Math.round(K(this._b,255)*100)+`%, `+this._roundA+`)`},toName:function(){return this._a===0?`transparent`:this._a<1?!1:_n[en(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var n=`#`+nn(this._r,this._g,this._b,this._a),r=n,i=this._gradientType?`GradientType = 1, `:``;if(e){var a=G(e);r=`#`+nn(a._r,a._g,a._b,a._a)}return`progid:DXImageTransform.Microsoft.gradient(`+i+`startColorstr=`+n+`,endColorstr=`+r+`)`},toString:function(e){var n=!!e;e||=this._format;var r=!1,i=this._a<1&&this._a>=0;return!n&&i&&(e===`hex`||e===`hex6`||e===`hex3`||e===`hex4`||e===`hex8`||e===`name`)?e===`name`&&this._a===0?this.toName():this.toRgbString():(e===`rgb`&&(r=this.toRgbString()),e===`prgb`&&(r=this.toPercentageRgbString()),(e===`hex`||e===`hex6`)&&(r=this.toHexString()),e===`hex3`&&(r=this.toHexString(!0)),e===`hex4`&&(r=this.toHex8String(!0)),e===`hex8`&&(r=this.toHex8String()),e===`name`&&(r=this.toName()),e===`hsl`&&(r=this.toHslString()),e===`hsv`&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return G(this.toString())},_applyModification:function(e,n){var r=e.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(sn,arguments)},brighten:function(){return this._applyModification(cn,arguments)},darken:function(){return this._applyModification(ln,arguments)},desaturate:function(){return this._applyModification(rn,arguments)},saturate:function(){return this._applyModification(an,arguments)},greyscale:function(){return this._applyModification(on,arguments)},spin:function(){return this._applyModification(un,arguments)},_applyCombination:function(e,n){return e.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(mn,arguments)},complement:function(){return this._applyCombination(dn,arguments)},monochromatic:function(){return this._applyCombination(hn,arguments)},splitcomplement:function(){return this._applyCombination(pn,arguments)},triad:function(){return this._applyCombination(fn,[3])},tetrad:function(){return this._applyCombination(fn,[4])}},G.fromRatio=function(e,n){if(Gt(e)==`object`){var r={};for(var i in e)e.hasOwnProperty(i)&&(i===`a`?r[i]=e[i]:r[i]=Tn(e[i]));e=r}return G(e,n)};function Jt(e){var n={r:0,g:0,b:0},r=1,i=null,a=null,o=null,s=!1,c=!1;return typeof e==`string`&&(e=An(e)),Gt(e)==`object`&&(kn(e.r)&&kn(e.g)&&kn(e.b)?(n=Yt(e.r,e.g,e.b),s=!0,c=String(e.r).substr(-1)===`%`?`prgb`:`rgb`):kn(e.h)&&kn(e.s)&&kn(e.v)?(i=Tn(e.s),a=Tn(e.v),n=$t(e.h,i,a),s=!0,c=`hsv`):kn(e.h)&&kn(e.s)&&kn(e.l)&&(i=Tn(e.s),o=Tn(e.l),n=Zt(e.h,i,o),s=!0,c=`hsl`),e.hasOwnProperty(`a`)&&(r=e.a)),r=yn(r),{ok:s,format:e.format||c,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:r}}function Yt(e,n,r){return{r:K(e,255)*255,g:K(n,255)*255,b:K(r,255)*255}}function Xt(e,n,r){e=K(e,255),n=K(n,255),r=K(r,255);var i=Math.max(e,n,r),a=Math.min(e,n,r),o,s,c=(i+a)/2;if(i==a)o=s=0;else{var l=i-a;switch(s=c>.5?l/(2-i-a):l/(i+a),i){case e:o=(n-r)/l+(n<r?6:0);break;case n:o=(r-e)/l+2;break;case r:o=(e-n)/l+4;break}o/=6}return{h:o,s,l:c}}function Zt(e,n,r){var i,a,o;e=K(e,360),n=K(n,100),r=K(r,100);function s(e,n,r){return r<0&&(r+=1),r>1&&--r,r<1/6?e+(n-e)*6*r:r<1/2?n:r<2/3?e+(n-e)*(2/3-r)*6:e}if(n===0)i=a=o=r;else{var c=r<.5?r*(1+n):r+n-r*n,l=2*r-c;i=s(l,c,e+1/3),a=s(l,c,e),o=s(l,c,e-1/3)}return{r:i*255,g:a*255,b:o*255}}function Qt(e,n,r){e=K(e,255),n=K(n,255),r=K(r,255);var i=Math.max(e,n,r),a=Math.min(e,n,r),o,s,c=i,l=i-a;if(s=i===0?0:l/i,i==a)o=0;else{switch(i){case e:o=(n-r)/l+(n<r?6:0);break;case n:o=(r-e)/l+2;break;case r:o=(e-n)/l+4;break}o/=6}return{h:o,s,v:c}}function $t(e,n,r){e=K(e,360)*6,n=K(n,100),r=K(r,100);var i=Math.floor(e),a=e-i,o=r*(1-n),s=r*(1-a*n),c=r*(1-(1-a)*n),l=i%6,u=[r,s,o,o,c,r][l],d=[c,r,r,s,o,o][l],f=[o,o,c,r,r,s][l];return{r:u*255,g:d*255,b:f*255}}function en(e,n,r,i){var a=[wn(Math.round(e).toString(16)),wn(Math.round(n).toString(16)),wn(Math.round(r).toString(16))];return i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join(``)}function tn(e,n,r,i,a){var o=[wn(Math.round(e).toString(16)),wn(Math.round(n).toString(16)),wn(Math.round(r).toString(16)),wn(En(i))];return a&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join(``)}function nn(e,n,r,i){return[wn(En(i)),wn(Math.round(e).toString(16)),wn(Math.round(n).toString(16)),wn(Math.round(r).toString(16))].join(``)}G.equals=function(e,n){return!e||!n?!1:G(e).toRgbString()==G(n).toRgbString()},G.random=function(){return G.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function rn(e,n){n=n===0?0:n||10;var r=G(e).toHsl();return r.s-=n/100,r.s=bn(r.s),G(r)}function an(e,n){n=n===0?0:n||10;var r=G(e).toHsl();return r.s+=n/100,r.s=bn(r.s),G(r)}function on(e){return G(e).desaturate(100)}function sn(e,n){n=n===0?0:n||10;var r=G(e).toHsl();return r.l+=n/100,r.l=bn(r.l),G(r)}function cn(e,n){n=n===0?0:n||10;var r=G(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(n/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(n/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(n/100)))),G(r)}function ln(e,n){n=n===0?0:n||10;var r=G(e).toHsl();return r.l-=n/100,r.l=bn(r.l),G(r)}function un(e,n){var r=G(e).toHsl(),i=(r.h+n)%360;return r.h=i<0?360+i:i,G(r)}function dn(e){var n=G(e).toHsl();return n.h=(n.h+180)%360,G(n)}function fn(e,n){if(isNaN(n)||n<=0)throw Error(`Argument to polyad must be a positive number`);for(var r=G(e).toHsl(),i=[G(e)],a=360/n,o=1;o<n;o++)i.push(G({h:(r.h+o*a)%360,s:r.s,l:r.l}));return i}function pn(e){var n=G(e).toHsl(),r=n.h;return[G(e),G({h:(r+72)%360,s:n.s,l:n.l}),G({h:(r+216)%360,s:n.s,l:n.l})]}function mn(e,n,r){n||=6,r||=30;var i=G(e).toHsl(),a=360/r,o=[G(e)];for(i.h=(i.h-(a*n>>1)+720)%360;--n;)i.h=(i.h+a)%360,o.push(G(i));return o}function hn(e,n){n||=6;for(var r=G(e).toHsv(),i=r.h,a=r.s,o=r.v,s=[],c=1/n;n--;)s.push(G({h:i,s:a,v:o})),o=(o+c)%1;return s}G.mix=function(e,n,r){r=r===0?0:r||50;var i=G(e).toRgb(),a=G(n).toRgb(),o=r/100;return G({r:(a.r-i.r)*o+i.r,g:(a.g-i.g)*o+i.g,b:(a.b-i.b)*o+i.b,a:(a.a-i.a)*o+i.a})},G.readability=function(e,n){var r=G(e),i=G(n);return(Math.max(r.getLuminance(),i.getLuminance())+.05)/(Math.min(r.getLuminance(),i.getLuminance())+.05)},G.isReadable=function(e,n,r){var i=G.readability(e,n),a,o=!1;switch(a=jn(r),a.level+a.size){case`AAsmall`:case`AAAlarge`:o=i>=4.5;break;case`AAlarge`:o=i>=3;break;case`AAAsmall`:o=i>=7;break}return o},G.mostReadable=function(e,n,r){var i=null,a=0,o,s,c,l;r||={},s=r.includeFallbackColors,c=r.level,l=r.size;for(var u=0;u<n.length;u++)o=G.readability(e,n[u]),o>a&&(a=o,i=G(n[u]));return G.isReadable(e,i,{level:c,size:l})||!s?i:(r.includeFallbackColors=!1,G.mostReadable(e,[`#fff`,`#000`],r))};var gn=G.names={aliceblue:`f0f8ff`,antiquewhite:`faebd7`,aqua:`0ff`,aquamarine:`7fffd4`,azure:`f0ffff`,beige:`f5f5dc`,bisque:`ffe4c4`,black:`000`,blanchedalmond:`ffebcd`,blue:`00f`,blueviolet:`8a2be2`,brown:`a52a2a`,burlywood:`deb887`,burntsienna:`ea7e5d`,cadetblue:`5f9ea0`,chartreuse:`7fff00`,chocolate:`d2691e`,coral:`ff7f50`,cornflowerblue:`6495ed`,cornsilk:`fff8dc`,crimson:`dc143c`,cyan:`0ff`,darkblue:`00008b`,darkcyan:`008b8b`,darkgoldenrod:`b8860b`,darkgray:`a9a9a9`,darkgreen:`006400`,darkgrey:`a9a9a9`,darkkhaki:`bdb76b`,darkmagenta:`8b008b`,darkolivegreen:`556b2f`,darkorange:`ff8c00`,darkorchid:`9932cc`,darkred:`8b0000`,darksalmon:`e9967a`,darkseagreen:`8fbc8f`,darkslateblue:`483d8b`,darkslategray:`2f4f4f`,darkslategrey:`2f4f4f`,darkturquoise:`00ced1`,darkviolet:`9400d3`,deeppink:`ff1493`,deepskyblue:`00bfff`,dimgray:`696969`,dimgrey:`696969`,dodgerblue:`1e90ff`,firebrick:`b22222`,floralwhite:`fffaf0`,forestgreen:`228b22`,fuchsia:`f0f`,gainsboro:`dcdcdc`,ghostwhite:`f8f8ff`,gold:`ffd700`,goldenrod:`daa520`,gray:`808080`,green:`008000`,greenyellow:`adff2f`,grey:`808080`,honeydew:`f0fff0`,hotpink:`ff69b4`,indianred:`cd5c5c`,indigo:`4b0082`,ivory:`fffff0`,khaki:`f0e68c`,lavender:`e6e6fa`,lavenderblush:`fff0f5`,lawngreen:`7cfc00`,lemonchiffon:`fffacd`,lightblue:`add8e6`,lightcoral:`f08080`,lightcyan:`e0ffff`,lightgoldenrodyellow:`fafad2`,lightgray:`d3d3d3`,lightgreen:`90ee90`,lightgrey:`d3d3d3`,lightpink:`ffb6c1`,lightsalmon:`ffa07a`,lightseagreen:`20b2aa`,lightskyblue:`87cefa`,lightslategray:`789`,lightslategrey:`789`,lightsteelblue:`b0c4de`,lightyellow:`ffffe0`,lime:`0f0`,limegreen:`32cd32`,linen:`faf0e6`,magenta:`f0f`,maroon:`800000`,mediumaquamarine:`66cdaa`,mediumblue:`0000cd`,mediumorchid:`ba55d3`,mediumpurple:`9370db`,mediumseagreen:`3cb371`,mediumslateblue:`7b68ee`,mediumspringgreen:`00fa9a`,mediumturquoise:`48d1cc`,mediumvioletred:`c71585`,midnightblue:`191970`,mintcream:`f5fffa`,mistyrose:`ffe4e1`,moccasin:`ffe4b5`,navajowhite:`ffdead`,navy:`000080`,oldlace:`fdf5e6`,olive:`808000`,olivedrab:`6b8e23`,orange:`ffa500`,orangered:`ff4500`,orchid:`da70d6`,palegoldenrod:`eee8aa`,palegreen:`98fb98`,paleturquoise:`afeeee`,palevioletred:`db7093`,papayawhip:`ffefd5`,peachpuff:`ffdab9`,peru:`cd853f`,pink:`ffc0cb`,plum:`dda0dd`,powderblue:`b0e0e6`,purple:`800080`,rebeccapurple:`663399`,red:`f00`,rosybrown:`bc8f8f`,royalblue:`4169e1`,saddlebrown:`8b4513`,salmon:`fa8072`,sandybrown:`f4a460`,seagreen:`2e8b57`,seashell:`fff5ee`,sienna:`a0522d`,silver:`c0c0c0`,skyblue:`87ceeb`,slateblue:`6a5acd`,slategray:`708090`,slategrey:`708090`,snow:`fffafa`,springgreen:`00ff7f`,steelblue:`4682b4`,tan:`d2b48c`,teal:`008080`,thistle:`d8bfd8`,tomato:`ff6347`,turquoise:`40e0d0`,violet:`ee82ee`,wheat:`f5deb3`,white:`fff`,whitesmoke:`f5f5f5`,yellow:`ff0`,yellowgreen:`9acd32`},_n=G.hexNames=vn(gn);function vn(e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[e[r]]=r);return n}function yn(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function K(e,n){Sn(e)&&(e=`100%`);var r=Cn(e);return e=Math.min(n,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*n,10)/100),Math.abs(e-n)<1e-6?1:e%n/parseFloat(n)}function bn(e){return Math.min(1,Math.max(0,e))}function xn(e){return parseInt(e,16)}function Sn(e){return typeof e==`string`&&e.indexOf(`.`)!=-1&&parseFloat(e)===1}function Cn(e){return typeof e==`string`&&e.indexOf(`%`)!=-1}function wn(e){return e.length==1?`0`+e:``+e}function Tn(e){return e<=1&&(e=e*100+`%`),e}function En(e){return Math.round(parseFloat(e)*255).toString(16)}function Dn(e){return xn(e)/255}var On=function(){var e=`(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)`,n=`[\\s|\\(]+(`+e+`)[,|\\s]+(`+e+`)[,|\\s]+(`+e+`)\\s*\\)?`,r=`[\\s|\\(]+(`+e+`)[,|\\s]+(`+e+`)[,|\\s]+(`+e+`)[,|\\s]+(`+e+`)\\s*\\)?`;return{CSS_UNIT:new RegExp(e),rgb:RegExp(`rgb`+n),rgba:RegExp(`rgba`+r),hsl:RegExp(`hsl`+n),hsla:RegExp(`hsla`+r),hsv:RegExp(`hsv`+n),hsva:RegExp(`hsva`+r),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function kn(e){return!!On.CSS_UNIT.exec(e)}function An(e){e=e.replace(Kt,``).replace(qt,``).toLowerCase();var n=!1;if(gn[e])e=gn[e],n=!0;else if(e==`transparent`)return{r:0,g:0,b:0,a:0,format:`name`};var r;return(r=On.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=On.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=On.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=On.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=On.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=On.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=On.hex8.exec(e))?{r:xn(r[1]),g:xn(r[2]),b:xn(r[3]),a:Dn(r[4]),format:n?`name`:`hex8`}:(r=On.hex6.exec(e))?{r:xn(r[1]),g:xn(r[2]),b:xn(r[3]),format:n?`name`:`hex`}:(r=On.hex4.exec(e))?{r:xn(r[1]+``+r[1]),g:xn(r[2]+``+r[2]),b:xn(r[3]+``+r[3]),a:Dn(r[4]+``+r[4]),format:n?`name`:`hex8`}:(r=On.hex3.exec(e))?{r:xn(r[1]+``+r[1]),g:xn(r[2]+``+r[2]),b:xn(r[3]+``+r[3]),format:n?`name`:`hex`}:!1}function jn(e){var n,r;return e||={level:`AA`,size:`small`},n=(e.level||`AA`).toUpperCase(),r=(e.size||`small`).toLowerCase(),n!==`AA`&&n!==`AAA`&&(n=`AA`),r!==`small`&&r!==`large`&&(r=`small`),{level:n,size:r}}function Mn(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 Nn(e){if(Array.isArray(e))return Mn(e)}function Pn(e,n,r){if(typeof e==`function`?e===n:e.has(n))return arguments.length<3?n:r;throw TypeError(`Private element is not present on this object`)}function Fn(e,n){if(n.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function In(e,n){if(!(e instanceof n))throw TypeError(`Cannot call a class as a function`)}function Ln(e,n){return e.get(Pn(e,n))}function Rn(e,n,r){Fn(e,n),n.set(e,r)}function zn(e,n,r){return e.set(Pn(e,n),r),r}function Bn(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,`value`in i&&(i.writable=!0),Object.defineProperty(e,Kn(i.key),i)}}function Vn(e,n,r){return n&&Bn(e.prototype,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function Hn(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Un(){throw TypeError(`Invalid attempt to spread non-iterable instance.
@@ -1 +1 @@
1
- import{i as e}from"./chunk-DseTPa7n.js";import{n as t,r as n,t as r}from"./compiler-runtime-DrcePeIl.js";import{ct as i,n as a,ot as o}from"./DocumentContext-Ce4HR8nK.js";import{n as s,r as c}from"./dist-CSDjUb5q.js";import{n as l,t as u,u as d}from"./createLucideIcon-Wgamzz8_.js";import{c as f,s as p}from"./skills-api-CKFwNhSE.js";import{Dr as m,Ft as h,Jt as g,Mr as _,Tt as v,Vr as y}from"./dist-DhHfGa7x.js";import{h as b,r as x,t as S}from"./PropertyPanel-DhBkdYqc.js";import{c as C,i as w,s as T}from"./workspace-paths-C4HhShIO.js";import{i as E,t as D}from"./open-managed-artifact-tab-DZP8ChES.js";import{n as O}from"./dist-CAIcun02.js";import{t as ee}from"./input-b4FSCbA5.js";import{t as te}from"./textarea-D45cTFgp.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(),re=[`name`];function M(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,M;t[6]!==r||t[7]!==te||t[8]!==a||t[9]!==O?(M=function(){a&&(te||O===``||O===r||a(O))},t[6]=r,t[7]=te,t[8]=a,t[9]=O,t[10]=M):M=t[10];let P=M,F=te||!!o,I;t[11]!==m||t[12]!==i||t[13]!==g||t[14]!==_?(I=i?(0,j.jsx)(ie,{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]=I):I=t[15];let L;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,j.jsx)(b,{className:`size-3.5`}),t[16]=L):L=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=F?`${h}-error`:void 0,H;t[21]!==P||t[22]!==y||t[23]!==h||t[24]!==F||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:P,onKeyDown:N,"aria-invalid":F,"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]=P,t[22]=y,t[23]=h,t[24]=F,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]!==F?(U=F?(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]=F,t[32]=U):U=t[32];let W;t[33]!==h||t[34]!==H||t[35]!==U||t[36]!==R?(W=(0,j.jsxs)(ie,{icon:L,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]!==I?(G=(0,j.jsxs)(`div`,{className:`editor-content-aligned gap-0.5 pt-4`,children:[I,W]}),t[38]=W,t[39]=I,t[40]=G):G=t[40];let K;t[41]===n?K=t[42]:(K=(0,j.jsx)(S,{provider:n,reservedKeys:re}),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 N(e){e.key===`Enter`&&e.currentTarget.blur()}function ie(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 P(e,t){let n=e.current().map[t];return typeof n==`string`?n:``}function F(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=P(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(P(n,t));let r=n.subscribe(()=>{c.current||s(P(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!==P(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 I(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=F(n,`title`),g=F(n,`description`),[_,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]===_?(C=t[4],w=t[5]):(w=_.trim(),C=w!==``&&!h.test(w),t[3]=_,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,re;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(re=(0,j.jsx)(s,{id:`l_UFPv`}),t[11]=re):re=t[11];let M;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,j.jsx)(ne,{className:`size-3.5`}),t[12]=M):M=t[12];let N;t[13]===l?N=t[14]:(N=l({id:`ugoTXs`}),t[13]=l,t[14]=N);let ie=i||`/`,P;t[15]!==p||t[16]!==ie?(P=(0,j.jsx)(ee,{id:p,value:ie,readOnly:!0,className:`h-8 border-input bg-transparent px-2 font-mono text-muted-foreground shadow-none`}),t[15]=p,t[16]=ie,t[17]=P):P=t[17];let I;t[18]!==p||t[19]!==N||t[20]!==P?(I=(0,j.jsx)(R,{icon:M,label:N,htmlFor:p,children:P}),t[18]=p,t[19]=N,t[20]=P,t[21]=I):I=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]!==_||t[28]!==u||t[29]!==O?(H=(0,j.jsx)(ee,{id:u,"data-testid":`template-name-input`,value:_,onChange:V,onBlur:D,onKeyDown:L,"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]=_,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]===g?Z=t[59]:(Z=e=>g.setValue(e.target.value),t[58]=g,t[59]=Z);let Q;t[60]!==g.onBlur||t[61]!==g.onFocus||t[62]!==g.value||t[63]!==f||t[64]!==Z?(Q=(0,j.jsx)(te,{id:f,"data-testid":`template-description-input`,value:g.value,onChange:Z,onFocus:g.onFocus,onBlur:g.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]=g.onBlur,t[61]=g.onFocus,t[62]=g.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]!==I||t[72]!==W||t[73]!==Y||t[74]!==$?(ce=(0,j.jsxs)(x,{title:re,className:`pt-4 pb-2`,children:[I,W,Y,$]}),t[71]=I,t[72]=W,t[73]=Y,t[74]=$,t[75]=ce):ce=t[75],ce}function L(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=m(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,h]=(0,A.useState)(!1),g;t[0]!==o||t[1]!==r||t[2]!==a||t[3]!==l||t[4]!==i?(g=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,y(i,e))},t[0]=o,t[1]=r,t[2]=a,t[3]=l,t[4]=i,t[5]=g):g=t[5];let _=g,v;t[6]!==o||t[7]!==r||t[8]!==m||t[9]!==a||t[10]!==l||t[11]!==i||t[12]!==s?(v=async function(e){if(e===i||m)return;h(!0);let t=await f({name:a,fromScope:i,toScope:e});if(h(!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,y(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]=v):v=t[13];let b=v,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]!==_||t[18]!==a||t[19]!==n||t[20]!==u||t[21]!==x||t[22]!==S?(C=(0,j.jsx)(M,{provider:n,name:a,onRename:_,nameError:u,nameEditable:x,scopeControl:S}),t[17]=_,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,m]=(0,A.useState)(!1),h;t[0]!==a||t[1]!==r||t[2]!==i||t[3]!==s?(h=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,_(e))},t[0]=a,t[1]=r,t[2]=i,t[3]=s,t[4]=h):h=t[4];let g=h,v;t[5]!==a||t[6]!==r||t[7]!==d||t[8]!==i||t[9]!==s||t[10]!==o?(v=async function(e){if(e===`project`||d)return;m(!0);let t=await f({name:i,fromScope:`project`,toScope:e});if(m(!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,y(e,i))},t[5]=a,t[6]=r,t[7]=d,t[8]=i,t[9]=s,t[10]=o,t[11]=v):v=t[11];let b=v,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]!==g||t[15]!==i||t[16]!==n||t[17]!==l||t[18]!==x||t[19]!==S?(C=(0,j.jsx)(M,{provider:n,name:i,onRename:g,nameError:l,nameEditable:x,scopeControl:S}),t[14]=g,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)(I,{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{i as e}from"./chunk-DseTPa7n.js";import{n as t,r as n,t as r}from"./compiler-runtime-DrcePeIl.js";import{ct as i,n as a,ot as o}from"./DocumentContext-QVTcu-bw.js";import{n as s,r as c}from"./dist-CSDjUb5q.js";import{n as l,t as u,u as d}from"./createLucideIcon-Wgamzz8_.js";import{c as f,s as p}from"./skills-api-BrvevboZ.js";import{Dr as m,Ft as h,Jt as g,Mr as _,Tt as v,Vr as y}from"./dist-DXjqUQWc.js";import{h as b,r as x,t as S}from"./PropertyPanel-NG0dp1I-.js";import{c as C,i as w,s as T}from"./workspace-paths-iLOFM5BT.js";import{a as E,t as D}from"./open-managed-artifact-tab-D3Xycq5B.js";import{n as O}from"./dist-CAIcun02.js";import{t as ee}from"./input-b4FSCbA5.js";import{t as te}from"./textarea-D45cTFgp.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(),re=[`name`];function M(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,M;t[6]!==r||t[7]!==te||t[8]!==a||t[9]!==O?(M=function(){a&&(te||O===``||O===r||a(O))},t[6]=r,t[7]=te,t[8]=a,t[9]=O,t[10]=M):M=t[10];let P=M,F=te||!!o,I;t[11]!==m||t[12]!==i||t[13]!==g||t[14]!==_?(I=i?(0,j.jsx)(ie,{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]=I):I=t[15];let L;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,j.jsx)(b,{className:`size-3.5`}),t[16]=L):L=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=F?`${h}-error`:void 0,H;t[21]!==P||t[22]!==y||t[23]!==h||t[24]!==F||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:P,onKeyDown:N,"aria-invalid":F,"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]=P,t[22]=y,t[23]=h,t[24]=F,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]!==F?(U=F?(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]=F,t[32]=U):U=t[32];let W;t[33]!==h||t[34]!==H||t[35]!==U||t[36]!==R?(W=(0,j.jsxs)(ie,{icon:L,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]!==I?(G=(0,j.jsxs)(`div`,{className:`editor-content-aligned gap-0.5 pt-4`,children:[I,W]}),t[38]=W,t[39]=I,t[40]=G):G=t[40];let K;t[41]===n?K=t[42]:(K=(0,j.jsx)(S,{provider:n,reservedKeys:re}),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 N(e){e.key===`Enter`&&e.currentTarget.blur()}function ie(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 P(e,t){let n=e.current().map[t];return typeof n==`string`?n:``}function F(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=P(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(P(n,t));let r=n.subscribe(()=>{c.current||s(P(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!==P(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 I(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=F(n,`title`),g=F(n,`description`),[_,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]===_?(C=t[4],w=t[5]):(w=_.trim(),C=w!==``&&!h.test(w),t[3]=_,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,re;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(re=(0,j.jsx)(s,{id:`l_UFPv`}),t[11]=re):re=t[11];let M;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,j.jsx)(ne,{className:`size-3.5`}),t[12]=M):M=t[12];let N;t[13]===l?N=t[14]:(N=l({id:`ugoTXs`}),t[13]=l,t[14]=N);let ie=i||`/`,P;t[15]!==p||t[16]!==ie?(P=(0,j.jsx)(ee,{id:p,value:ie,readOnly:!0,className:`h-8 border-input bg-transparent px-2 font-mono text-muted-foreground shadow-none`}),t[15]=p,t[16]=ie,t[17]=P):P=t[17];let I;t[18]!==p||t[19]!==N||t[20]!==P?(I=(0,j.jsx)(R,{icon:M,label:N,htmlFor:p,children:P}),t[18]=p,t[19]=N,t[20]=P,t[21]=I):I=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]!==_||t[28]!==u||t[29]!==O?(H=(0,j.jsx)(ee,{id:u,"data-testid":`template-name-input`,value:_,onChange:V,onBlur:D,onKeyDown:L,"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]=_,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]===g?Z=t[59]:(Z=e=>g.setValue(e.target.value),t[58]=g,t[59]=Z);let Q;t[60]!==g.onBlur||t[61]!==g.onFocus||t[62]!==g.value||t[63]!==f||t[64]!==Z?(Q=(0,j.jsx)(te,{id:f,"data-testid":`template-description-input`,value:g.value,onChange:Z,onFocus:g.onFocus,onBlur:g.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]=g.onBlur,t[61]=g.onFocus,t[62]=g.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]!==I||t[72]!==W||t[73]!==Y||t[74]!==$?(ce=(0,j.jsxs)(x,{title:re,className:`pt-4 pb-2`,children:[I,W,Y,$]}),t[71]=I,t[72]=W,t[73]=Y,t[74]=$,t[75]=ce):ce=t[75],ce}function L(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=m(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,h]=(0,A.useState)(!1),g;t[0]!==o||t[1]!==r||t[2]!==a||t[3]!==l||t[4]!==i?(g=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,y(i,e))},t[0]=o,t[1]=r,t[2]=a,t[3]=l,t[4]=i,t[5]=g):g=t[5];let _=g,v;t[6]!==o||t[7]!==r||t[8]!==m||t[9]!==a||t[10]!==l||t[11]!==i||t[12]!==s?(v=async function(e){if(e===i||m)return;h(!0);let t=await f({name:a,fromScope:i,toScope:e});if(h(!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,y(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]=v):v=t[13];let b=v,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]!==_||t[18]!==a||t[19]!==n||t[20]!==u||t[21]!==x||t[22]!==S?(C=(0,j.jsx)(M,{provider:n,name:a,onRename:_,nameError:u,nameEditable:x,scopeControl:S}),t[17]=_,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,m]=(0,A.useState)(!1),h;t[0]!==a||t[1]!==r||t[2]!==i||t[3]!==s?(h=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,_(e))},t[0]=a,t[1]=r,t[2]=i,t[3]=s,t[4]=h):h=t[4];let g=h,v;t[5]!==a||t[6]!==r||t[7]!==d||t[8]!==i||t[9]!==s||t[10]!==o?(v=async function(e){if(e===`project`||d)return;m(!0);let t=await f({name:i,fromScope:`project`,toScope:e});if(m(!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,y(e,i))},t[5]=a,t[6]=r,t[7]=d,t[8]=i,t[9]=s,t[10]=o,t[11]=v):v=t[11];let b=v,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]!==g||t[15]!==i||t[16]!==n||t[17]!==l||t[18]!==x||t[19]!==S?(C=(0,j.jsx)(M,{provider:n,name:i,onRename:g,nameError:l,nameEditable:x,scopeControl:S}),t[14]=g,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)(I,{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{i as e}from"./chunk-DseTPa7n.js";import{n as t,r as n,t as r}from"./compiler-runtime-DrcePeIl.js";import{n as i,r as a}from"./dist-CSDjUb5q.js";import{n as o,u as s}from"./createLucideIcon-Wgamzz8_.js";import{i as c,n as l,r as u,t as ee}from"./tooltip-CuKuwVbZ.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-492Ff7fG.js";import{t as d}from"./checkbox-Ds7GA0j4.js";import{t as f}from"./label-CveCqKNR.js";import{F as ce}from"./dist-DhHfGa7x.js";import{t as le}from"./arrow-up-right-BnJZWj8r.js";import{t as ue}from"./info-CVuSDi5Y.js";import{n as p}from"./dist-CAIcun02.js";import{t as de}from"./external-link-BUoZ56id.js";import{n as m}from"./mcp-consent-store-DL93ger0.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{i as e}from"./chunk-DseTPa7n.js";import{n as t,r as n,t as r}from"./compiler-runtime-DrcePeIl.js";import{n as i,r as a}from"./dist-CSDjUb5q.js";import{n as o,u as s}from"./createLucideIcon-Wgamzz8_.js";import{i as c,n as l,r as u,t as ee}from"./tooltip-CuKuwVbZ.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-492Ff7fG.js";import{t as d}from"./checkbox-Ds7GA0j4.js";import{t as f}from"./label-CveCqKNR.js";import{F as ce}from"./dist-DXjqUQWc.js";import{t as le}from"./arrow-up-right-BnJZWj8r.js";import{t as ue}from"./info-CVuSDi5Y.js";import{n as p}from"./dist-CAIcun02.js";import{t as de}from"./external-link-BUoZ56id.js";import{n as m}from"./mcp-consent-store-DL93ger0.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{i as e}from"./chunk-DseTPa7n.js";import{n as t,r as n,t as r}from"./compiler-runtime-DrcePeIl.js";import{r as i}from"./dist-CSDjUb5q.js";import{n as a}from"./dist-DGbq0bSp.js";import{A as o,L as s,T as c,n as l,w as u}from"./CodeMirrorPropInput-D6D3gfNM.js";import{p as d}from"./config-provider-BJbRFZ7B.js";import{N as f,Ot as p,X as m}from"./dist-BQhSFgYM.js";import{t as h}from"./dist-f84rU-Id.js";import{t as g}from"./src-3GGG9hYD.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:p.create({doc:n.toString(),extensions:[h,g(n,r.awareness,{undoManager:i}),o(),f(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,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{i as e}from"./chunk-DseTPa7n.js";import{n as t,r as n,t as r}from"./compiler-runtime-DrcePeIl.js";import{r as i}from"./dist-CSDjUb5q.js";import{n as a}from"./dist-DGbq0bSp.js";import{A as o,L as s,T as c,n as l,w as u}from"./CodeMirrorPropInput-Bi4r7DgZ.js";import{p as d}from"./config-provider-CM0Qk_B1.js";import{N as f,Ot as p,X as m}from"./dist-BQhSFgYM.js";import{t as h}from"./dist-H67bKoaU.js";import{t as g}from"./src-BydwHjwu.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:p.create({doc:n.toString(),extensions:[h,g(n,r.awareness,{undoManager:i}),o(),f(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,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};