wizards 0.1.10 → 0.1.11

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 (23) hide show
  1. package/apps/web/dist/assets/{ChangelogDialog-UOklVDXF.js → ChangelogDialog-DURK75KD.js} +1 -1
  2. package/apps/web/dist/assets/{ChatPanel-BORDbEJt.js → ChatPanel-DZhZJZCP.js} +1 -1
  3. package/apps/web/dist/assets/EditorPage-PGCEQdiC.js +2 -0
  4. package/apps/web/dist/assets/{FlowPreview-DIIeD1wY.js → FlowPreview-CqJUNW13.js} +1 -1
  5. package/apps/web/dist/assets/{HomePage-BaVY5u1C.js → HomePage-CRkDMNM2.js} +1 -1
  6. package/apps/web/dist/assets/{ImportWizard-CD-tOsz2.js → ImportWizard-DX1YtFPv.js} +1 -1
  7. package/apps/web/dist/assets/{LocalRuntime-B33qoSb2.js → LocalRuntime-DKqEzptp.js} +1 -1
  8. package/apps/web/dist/assets/{NewWizardPage-B0jx_Ptd.js → NewWizardPage-BPJrYi2m.js} +2 -2
  9. package/apps/web/dist/assets/{PublicRunner-Bj_gFWxk.js → PublicRunner-B3T244Ry.js} +1 -1
  10. package/apps/web/dist/assets/{RunnerView-__E0Cpbc.js → RunnerView-DgYaOHIH.js} +1 -1
  11. package/apps/web/dist/assets/{SettingsPage-DzhhUY31.js → SettingsPage-LBVqEwXs.js} +1 -1
  12. package/apps/web/dist/assets/{SetupPage-BSe-mh8G.js → SetupPage-DAyJs-hK.js} +1 -1
  13. package/apps/web/dist/assets/{SharePage-Duany-Lu.js → SharePage-oKGavxJt.js} +1 -1
  14. package/apps/web/dist/assets/changelog-BJkYErYt.js +1 -0
  15. package/apps/web/dist/assets/{esm-Bk5dFCAD.js → esm-ZHEGGS6s.js} +2 -2
  16. package/apps/web/dist/assets/{index-BYV0HYlP.js → index-BRy5sz4a.js} +2 -2
  17. package/apps/web/dist/assets/{meta-DmwCkikb.js → meta-2YMHa2hT.js} +1 -1
  18. package/apps/web/dist/assets/{outputs-BJ6FXJP6.js → outputs-CHe6KRLc.js} +1 -1
  19. package/apps/web/dist/index.html +1 -1
  20. package/apps/web/dist/install.sh +2 -3
  21. package/package.json +1 -1
  22. package/apps/web/dist/assets/EditorPage-BM5yfvZ6.js +0 -2
  23. package/apps/web/dist/assets/changelog-14GVP0cv.js +0 -1
@@ -1 +1 @@
1
- import{t as e}from"./createLucideIcon-DBu2Ovxj.js";import{n as t,t as n}from"./wand-sparkles-Bf97fs8T.js";import{n as r}from"./mic-CeqQ89Dj.js";import{t as i}from"./video-Dk1fuTDl.js";import{v as a}from"./ui-tO4ZXbfh.js";import{m as o}from"./index-BYV0HYlP.js";var s={name:`bot`,size:24,node:[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]};s.node;var c=e(s),l={name:`flag`,size:24,node:[[`path`,{d:`M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528`,key:`1jaruq`}]]};l.node;var u=e(l),d={name:`image`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]};d.node;var f=e(d),p={name:`layout-dashboard`,size:24,node:[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]};p.node;var m=e(p),h={name:`list-checks`,size:24,node:[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]};h.node;var g=e(h);function _(e){switch(e.type){case`page`:return g;case`agent`:return c;case`generate`:return e.asset===`image`?f:e.asset===`video`?i:e.asset===`dashboard`?m:r;case`widget`:return o;case`review`:return t;case`result`:return u}return n}var v={page:`bg-cobalt-tint text-cobalt`,agent:`bg-ember-tint text-ember-strong`,generate:`bg-amber-tint text-ink-2`,widget:`bg-ember-veil text-ember-strong`,review:`bg-moss-tint text-moss`,result:`bg-paper-2 text-ink-2`};function y(e){return a(`type.${e.type}`)}var b=[`web_search`,`web_fetch`,`browser`,`sandbox`,`image`,`http`];function x(e){return b.includes(e)?a(`tool.${e}`):e}function S(e){switch(e.type){case`page`:return e.fields.map(e=>e.label).join(` · `);case`agent`:{let t=e.tools.map(x),n=e.mcp?.length?[`MCP: ${e.mcp.join(`, `)}`]:[];return[...t,...n].join(` · `)||e.instructions.slice(0,90)}case`generate`:{let t=[e.asset];return e.options?.aspectRatio&&t.push(e.options.aspectRatio),e.options?.duration&&t.push(`${e.options.duration}s`),e.options?.resolution&&t.push(e.options.resolution),e.options?.template&&t.push(e.options.template),t.join(` · `)}case`widget`:return[e.entry,Object.keys(e.data).join(`, `)].filter(Boolean).join(` · `);case`review`:return[e.edit?a(`editor.reviewEditable`):null,e.regenerate?a(`editor.reviewRedo`):null].filter(Boolean).join(` · `);case`result`:return e.deliverables.map(e=>`${e.label??e.from} (${e.formats.join(`, `)})`).join(` · `)}return``}export{y as a,u as c,x as i,c as l,_ as n,g as o,S as r,f as s,v as t};
1
+ import{t as e}from"./createLucideIcon-DBu2Ovxj.js";import{n as t,t as n}from"./wand-sparkles-Bf97fs8T.js";import{n as r}from"./mic-CeqQ89Dj.js";import{t as i}from"./video-Dk1fuTDl.js";import{v as a}from"./ui-tO4ZXbfh.js";import{m as o}from"./index-BRy5sz4a.js";var s={name:`bot`,size:24,node:[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]};s.node;var c=e(s),l={name:`flag`,size:24,node:[[`path`,{d:`M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528`,key:`1jaruq`}]]};l.node;var u=e(l),d={name:`image`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]};d.node;var f=e(d),p={name:`layout-dashboard`,size:24,node:[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]};p.node;var m=e(p),h={name:`list-checks`,size:24,node:[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]};h.node;var g=e(h);function _(e){switch(e.type){case`page`:return g;case`agent`:return c;case`generate`:return e.asset===`image`?f:e.asset===`video`?i:e.asset===`dashboard`?m:r;case`widget`:return o;case`review`:return t;case`result`:return u}return n}var v={page:`bg-cobalt-tint text-cobalt`,agent:`bg-ember-tint text-ember-strong`,generate:`bg-amber-tint text-ink-2`,widget:`bg-ember-veil text-ember-strong`,review:`bg-moss-tint text-moss`,result:`bg-paper-2 text-ink-2`};function y(e){return a(`type.${e.type}`)}var b=[`web_search`,`web_fetch`,`browser`,`sandbox`,`image`,`http`];function x(e){return b.includes(e)?a(`tool.${e}`):e}function S(e){switch(e.type){case`page`:return e.fields.map(e=>e.label).join(` · `);case`agent`:{let t=e.tools.map(x),n=e.mcp?.length?[`MCP: ${e.mcp.join(`, `)}`]:[];return[...t,...n].join(` · `)||e.instructions.slice(0,90)}case`generate`:{let t=[e.asset];return e.options?.aspectRatio&&t.push(e.options.aspectRatio),e.options?.duration&&t.push(`${e.options.duration}s`),e.options?.resolution&&t.push(e.options.resolution),e.options?.template&&t.push(e.options.template),t.join(` · `)}case`widget`:return[e.entry,Object.keys(e.data).join(`, `)].filter(Boolean).join(` · `);case`review`:return[e.edit?a(`editor.reviewEditable`):null,e.regenerate?a(`editor.reviewRedo`):null].filter(Boolean).join(` · `);case`result`:return e.deliverables.map(e=>`${e.label??e.from} (${e.formats.join(`, `)})`).join(` · `)}return``}export{y as a,u as c,x as i,c as l,_ as n,g as o,S as r,f as s,v as t};
@@ -1,4 +1,4 @@
1
- import{i as e,n as t,t as n}from"./jsx-runtime-Dk72oS4N.js";import{a as r,c as i,s as a}from"./api-DbPn6Dge.js";import{t as o}from"./createLucideIcon-DBu2Ovxj.js";import{t as s}from"./check-Bjx41xbB.js";import{n as c}from"./plus-HA210wXA.js";import{n as l}from"./mic-CeqQ89Dj.js";import{d as u,h as d,m as f,v as p}from"./ui-tO4ZXbfh.js";import{p as m}from"./index-BYV0HYlP.js";var ee={name:`arrow-up`,size:24,node:[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]};ee.node;var te=o(ee),h={name:`film`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M7 3v18`,key:`bbkbws`}],[`path`,{d:`M3 7.5h4`,key:`zfgn84`}],[`path`,{d:`M3 12h18`,key:`1i2n21`}],[`path`,{d:`M3 16.5h4`,key:`1230mu`}],[`path`,{d:`M17 3v18`,key:`in4fa5`}],[`path`,{d:`M17 7.5h4`,key:`myr1c1`}],[`path`,{d:`M17 16.5h4`,key:`go4c1d`}]]};h.node;var ne=o(h),re={name:`link-2`,size:24,node:[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]};re.node;var ie=o(re),ae={name:`mail`,size:24,node:[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]};ae.node;var oe=o(ae),se={name:`maximize-2`,size:24,node:[[`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`}]]};se.node;var ce=o(se),g={name:`paperclip`,size:24,node:[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]};g.node;var le=o(g),ue={name:`pencil`,size:24,node:[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]};ue.node;var de=o(ue),fe={name:`share`,size:24,node:[[`path`,{d:`M12 2v13`,key:`1km8f5`}],[`path`,{d:`m16 6-4-4-4 4`,key:`13yo43`}],[`path`,{d:`M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8`,key:`1b2hhj`}]]};fe.node;var pe=o(fe),_={name:`sparkles`,size:24,node:[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]],aliases:[`stars`]};_.node;var me=o(_),he={name:`square`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]};he.node;var ge=o(he),_e={name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]};_e.node;var ve=o(_e),v=e(t(),1),ye=typeof window<`u`&&window.matchMedia?.(`(pointer: coarse)`).matches===!0,be=typeof navigator<`u`&&!!navigator.mediaDevices?.getUserMedia;function y(){(0,v.useEffect)(()=>{let e=window.visualViewport;if(!e)return;let t=document.documentElement,n=()=>{let n=e.scale>1.01?0:window.innerHeight-e.height-e.offsetTop,r=n>80;t.style.setProperty(`--kb`,r?`${Math.round(n)}px`:`0px`),t.classList.toggle(`keyboard-open`,r)};return n(),e.addEventListener(`resize`,n),e.addEventListener(`scroll`,n),()=>{e.removeEventListener(`resize`,n),e.removeEventListener(`scroll`,n),t.style.removeProperty(`--kb`),t.classList.remove(`keyboard-open`)}},[])}function xe(e){let[t,n]=(0,v.useState)(!1);return(0,v.useEffect)(()=>{if(!e||!(`wakeLock`in navigator))return;let t=null,r=!1,i=async()=>{if(!(r||t||document.visibilityState!==`visible`))try{let e=await navigator.wakeLock.request(`screen`);if(r){e.release().catch(()=>void 0);return}t=e,n(!0),e.addEventListener(`release`,()=>{t===e&&(t=null,n(!1))})}catch{}};return i(),document.addEventListener(`visibilitychange`,i),()=>{r=!0,document.removeEventListener(`visibilitychange`,i),t?.release().catch(()=>void 0),t=null,n(!1)}},[e]),t}var Se=`wz.notify`,Ce=new Set,we=null;function Te(){try{return localStorage.getItem(Se)===`1`}catch{return!1}}function Ee(e){try{e?localStorage.setItem(Se,`1`):localStorage.removeItem(Se)}catch{}for(let e of Ce)e()}var De=typeof window<`u`&&`Notification`in window;function Oe(){return Te()?De&&Notification.permission===`granted`?`on`:`quiet`:`off`}function ke(){return(0,v.useSyncExternalStore)(e=>(Ce.add(e),()=>Ce.delete(e)),Oe,()=>`off`)}function b(){return De&&Notification.permission===`denied`}async function Ae(){Ee(!0);try{we??=new AudioContext,we.resume()}catch{we=null}if(De&&Notification.permission==="default")try{await Notification.requestPermission()}catch{}De&&Notification.permission===`granted`&&await navigator.serviceWorker?.register(`${r}/sw.js`).catch(()=>void 0);for(let e of Ce)e();return Oe()}function x(){Ee(!1)}function je(){let e=we;if(e?.state!==`running`)return;let t=e.currentTime;for(let[n,r]of[660,880].entries()){let i=e.createOscillator(),a=e.createGain();i.frequency.value=r,a.gain.setValueAtTime(0,t+n*.16),a.gain.linearRampToValueAtTime(.18,t+n*.16+.02),a.gain.exponentialRampToValueAtTime(.001,t+n*.16+.32),i.connect(a).connect(e.destination),i.start(t+n*.16),i.stop(t+n*.16+.34)}}async function S(e){if(!Te())return;if(document.visibilityState===`visible`){je(),navigator.vibrate?.([120,60,120]);return}if(!De||Notification.permission!==`granted`)return;let t={body:e.body,tag:e.tag,icon:a(`icons/icon-192.png`),badge:a(`icons/icon-192.png`),data:{url:location.href}};try{let n=await navigator.serviceWorker?.getRegistration();if(n?.active){await n.showNotification(e.title,t);return}}catch{}try{new Notification(e.title,t)}catch{}}function Me(){if(typeof navigator>`u`||!navigator.canShare)return!1;try{return navigator.canShare({files:[new File([`x`],`x.pdf`,{type:`application/pdf`})]})}catch{return!1}}function Ne(e,t){this.v=e,this.k=t}function C(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Pe(e){if(Array.isArray(e))return e}function Fe(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Ie(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{i as e,n as t,t as n}from"./jsx-runtime-Dk72oS4N.js";import{a as r,c as i,s as a}from"./api-DbPn6Dge.js";import{t as o}from"./createLucideIcon-DBu2Ovxj.js";import{t as s}from"./check-Bjx41xbB.js";import{n as c}from"./plus-HA210wXA.js";import{n as l}from"./mic-CeqQ89Dj.js";import{d as u,h as d,m as f,v as p}from"./ui-tO4ZXbfh.js";import{p as m}from"./index-BRy5sz4a.js";var ee={name:`arrow-up`,size:24,node:[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]};ee.node;var te=o(ee),h={name:`film`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M7 3v18`,key:`bbkbws`}],[`path`,{d:`M3 7.5h4`,key:`zfgn84`}],[`path`,{d:`M3 12h18`,key:`1i2n21`}],[`path`,{d:`M3 16.5h4`,key:`1230mu`}],[`path`,{d:`M17 3v18`,key:`in4fa5`}],[`path`,{d:`M17 7.5h4`,key:`myr1c1`}],[`path`,{d:`M17 16.5h4`,key:`go4c1d`}]]};h.node;var ne=o(h),re={name:`link-2`,size:24,node:[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]};re.node;var ie=o(re),ae={name:`mail`,size:24,node:[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]};ae.node;var oe=o(ae),se={name:`maximize-2`,size:24,node:[[`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`}]]};se.node;var ce=o(se),g={name:`paperclip`,size:24,node:[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]};g.node;var le=o(g),ue={name:`pencil`,size:24,node:[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]};ue.node;var de=o(ue),fe={name:`share`,size:24,node:[[`path`,{d:`M12 2v13`,key:`1km8f5`}],[`path`,{d:`m16 6-4-4-4 4`,key:`13yo43`}],[`path`,{d:`M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8`,key:`1b2hhj`}]]};fe.node;var pe=o(fe),_={name:`sparkles`,size:24,node:[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]],aliases:[`stars`]};_.node;var me=o(_),he={name:`square`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]};he.node;var ge=o(he),_e={name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]};_e.node;var ve=o(_e),v=e(t(),1),ye=typeof window<`u`&&window.matchMedia?.(`(pointer: coarse)`).matches===!0,be=typeof navigator<`u`&&!!navigator.mediaDevices?.getUserMedia;function y(){(0,v.useEffect)(()=>{let e=window.visualViewport;if(!e)return;let t=document.documentElement,n=()=>{let n=e.scale>1.01?0:window.innerHeight-e.height-e.offsetTop,r=n>80;t.style.setProperty(`--kb`,r?`${Math.round(n)}px`:`0px`),t.classList.toggle(`keyboard-open`,r)};return n(),e.addEventListener(`resize`,n),e.addEventListener(`scroll`,n),()=>{e.removeEventListener(`resize`,n),e.removeEventListener(`scroll`,n),t.style.removeProperty(`--kb`),t.classList.remove(`keyboard-open`)}},[])}function xe(e){let[t,n]=(0,v.useState)(!1);return(0,v.useEffect)(()=>{if(!e||!(`wakeLock`in navigator))return;let t=null,r=!1,i=async()=>{if(!(r||t||document.visibilityState!==`visible`))try{let e=await navigator.wakeLock.request(`screen`);if(r){e.release().catch(()=>void 0);return}t=e,n(!0),e.addEventListener(`release`,()=>{t===e&&(t=null,n(!1))})}catch{}};return i(),document.addEventListener(`visibilitychange`,i),()=>{r=!0,document.removeEventListener(`visibilitychange`,i),t?.release().catch(()=>void 0),t=null,n(!1)}},[e]),t}var Se=`wz.notify`,Ce=new Set,we=null;function Te(){try{return localStorage.getItem(Se)===`1`}catch{return!1}}function Ee(e){try{e?localStorage.setItem(Se,`1`):localStorage.removeItem(Se)}catch{}for(let e of Ce)e()}var De=typeof window<`u`&&`Notification`in window;function Oe(){return Te()?De&&Notification.permission===`granted`?`on`:`quiet`:`off`}function ke(){return(0,v.useSyncExternalStore)(e=>(Ce.add(e),()=>Ce.delete(e)),Oe,()=>`off`)}function b(){return De&&Notification.permission===`denied`}async function Ae(){Ee(!0);try{we??=new AudioContext,we.resume()}catch{we=null}if(De&&Notification.permission==="default")try{await Notification.requestPermission()}catch{}De&&Notification.permission===`granted`&&await navigator.serviceWorker?.register(`${r}/sw.js`).catch(()=>void 0);for(let e of Ce)e();return Oe()}function x(){Ee(!1)}function je(){let e=we;if(e?.state!==`running`)return;let t=e.currentTime;for(let[n,r]of[660,880].entries()){let i=e.createOscillator(),a=e.createGain();i.frequency.value=r,a.gain.setValueAtTime(0,t+n*.16),a.gain.linearRampToValueAtTime(.18,t+n*.16+.02),a.gain.exponentialRampToValueAtTime(.001,t+n*.16+.32),i.connect(a).connect(e.destination),i.start(t+n*.16),i.stop(t+n*.16+.34)}}async function S(e){if(!Te())return;if(document.visibilityState===`visible`){je(),navigator.vibrate?.([120,60,120]);return}if(!De||Notification.permission!==`granted`)return;let t={body:e.body,tag:e.tag,icon:a(`icons/icon-192.png`),badge:a(`icons/icon-192.png`),data:{url:location.href}};try{let n=await navigator.serviceWorker?.getRegistration();if(n?.active){await n.showNotification(e.title,t);return}}catch{}try{new Notification(e.title,t)}catch{}}function Me(){if(typeof navigator>`u`||!navigator.canShare)return!1;try{return navigator.canShare({files:[new File([`x`],`x.pdf`,{type:`application/pdf`})]})}catch{return!1}}function Ne(e,t){this.v=e,this.k=t}function C(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Pe(e){if(Array.isArray(e))return e}function Fe(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Ie(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Le(e,t){return Pe(e)||Fe(e,t)||w(e,t)||Ie()}function w(e,t){if(e){if(typeof e==`string`)return C(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(e,t):void 0}}function T(e){var t,n;function r(t,n){try{var a=e[t](n),o=a.value,s=o instanceof Ne;Promise.resolve(s?o.v:o).then(function(n){if(s){var c=t===`return`&&o.k?t:`next`;if(!o.k||n.done)return r(c,n);n=e[c](n).value}i(!!a.done,n)},function(e){r(`throw`,e)})}catch(e){i(2,e)}}function i(e,i){e===2?t.reject(i):t.resolve({value:i,done:e}),(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(a,o){var s={key:e,arg:i,resolve:a,reject:o,next:null};n?n=n.next=s:(t=n=s,r(e,i))})},typeof e.return!=`function`&&(this.return=void 0)}T.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},T.prototype.next=function(e){return this._invoke(`next`,e)},T.prototype.throw=function(e){return this._invoke(`throw`,e)},T.prototype.return=function(e){return this._invoke(`return`,e)};var Re=Object.entries,E=Object.setPrototypeOf,ze=Object.isFrozen,Be=Object.getPrototypeOf,Ve=Object.getOwnPropertyDescriptor,D=Object.freeze,O=Object.seal,He=Object.create,Ue=typeof Reflect<`u`&&Reflect,k=Ue.apply,We=Ue.construct;D||=function(e){return e},O||=function(e){return e},k||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},We||=function(e){return new e(...[...arguments].slice(1))};var Ge=P(Array.prototype.forEach);Array.prototype.indexOf;var Ke=P(Array.prototype.lastIndexOf),qe=P(Array.prototype.pop),Je=P(Array.prototype.push);Array.prototype.slice;var Ye=P(Array.prototype.splice),Xe=Array.isArray,Ze=P(String.prototype.toLowerCase),Qe=P(String.prototype.toString),$e=P(String.prototype.match),et=P(String.prototype.replace),tt=P(String.prototype.indexOf),nt=P(String.prototype.trim),rt=P(Number.prototype.toString),it=P(Boolean.prototype.toString),at=typeof BigInt>`u`?null:P(BigInt.prototype.toString),ot=typeof Symbol>`u`?null:P(Symbol.prototype.toString),A=P(Object.prototype.hasOwnProperty),j=P(Object.prototype.toString),M=P(RegExp.prototype.test),N=st(TypeError);function P(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return k(e,t,n)}}function st(e){return function(){return We(e,[...arguments])}}function F(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ze;if(E&&E(e,null),!Xe(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(ze(t)||(t[r]=e),i=e)}e[i]=!0}return e}function ct(e){for(let t=0;t<e.length;t++)A(e,t)||(e[t]=null);return e}function I(e){let t=He(null);for(let r of Re(e)){var n=Le(r,2);let i=n[0],a=n[1];A(e,i)&&(t[i]=Xe(a)?ct(a):a&&typeof a==`object`&&a.constructor===Object?I(a):a)}return t}function lt(e){switch(typeof e){case`string`:return e;case`number`:return rt(e);case`boolean`:return it(e);case`bigint`:return at?at(e):`0`;case`symbol`:return ot?ot(e):`Symbol()`;case`undefined`:return j(e);case`function`:case`object`:{if(e===null)return j(e);let t=e,n=L(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:j(e)}return j(e)}default:return j(e)}}function L(e,t){for(;e!==null;){let n=Ve(e,t);if(n){if(n.get)return P(n.get);if(typeof n.value==`function`)return P(n.value)}e=Be(e)}function n(){return null}return n}function ut(e){try{return M(e,``),!0}catch{return!1}}var dt=D(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),ft=D(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),pt=D([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),mt=D([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),ht=D(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),gt=D([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),_t=D([`#text`]),vt=D(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),yt=D(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),bt=D(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),xt=D([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),St=O(/{{[\w\W]*|^[\w\W]*}}/g),Ct=O(/<%[\w\W]*|^[\w\W]*%>/g),wt=O(/\${[\w\W]*/g),Tt=O(/^data-[\-\w.\u00B7-\uFFFF]+$/),Et=O(/^aria-[\-\w]+$/),Dt=O(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ot=O(/^(?:\w+script|data):/i),kt=O(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),At=O(/^html$/i),jt=O(/^[a-z][.\w]*(-[.\w]+)+$/i),Mt=O(/<[/\w!]/g),Nt=O(/<[/\w]/g),Pt=O(/<\/no(script|embed|frames)/i),Ft=O(/\/>/i),R={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},It=[`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`],Lt=D(F({},It)),Rt=function(){let e={};return Ge(It,t=>{e[t]=O(RegExp(`</`+t+`(?=[\\t\\n\\f\\r />])`,`i`))}),D(e)}(),zt=function(){return typeof window>`u`?null:window},Bt=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},Vt=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Ht=function(e,t,n,r){return A(e,t)&&Xe(e[t])?F(r.base?I(r.base):{},e[t],r.transform):n},Ut=function(e,t,n){let r=A(e,t)?e[t]:void 0;return r&&typeof r==`object`?I(r):n()};function Wt(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:zt(),t=e=>Wt(e);if(t.version=`3.4.16`,t.removed=[],!e||!e.document||e.document.nodeType!==R.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=L(d,`cloneNode`),p=L(d,`remove`),m=L(d,`removeAttributeNode`),ee=L(d,`nextSibling`),te=L(d,`childNodes`),h=L(d,`parentNode`),ne=L(d,`shadowRoot`),re=L(d,`attributes`),ie=o&&o.prototype?L(o.prototype,`nodeType`):null,ae=o&&o.prototype?L(o.prototype,`nodeName`):null,oe=o&&o.prototype?L(o.prototype,`ownerDocument`):null,se=function(e){return ie?ie(e):e.nodeType},ce=function(e){return ae?ae(e):e.nodeName};if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let g,le=``,ue,de=!1,fe=0,pe=function(){if(fe>0)throw N(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},_=function(e){pe(),fe++;try{return g.createHTML(e)}finally{fe--}},me=function(e){pe(),fe++;try{return g.createScriptURL(e)}finally{fe--}},he=function(){return de||=(ue=Bt(u,i),!0),ue},ge=n,_e=ge.implementation,ve=ge.createNodeIterator,v=ge.createDocumentFragment,ye=ge.getElementsByTagName,be=r.importNode,y=Vt();t.isSupported=typeof Re==`function`&&typeof h==`function`&&_e&&_e.createHTMLDocument!==void 0;let xe=St,Se=Ct,Ce=wt,we=Tt,Te=Et,Ee=Ot,De=kt,Oe=jt,ke=Dt,b=null,Ae=F({},[...dt,...ft,...pt,...ht,..._t]),x=null,je=F({},[...vt,...yt,...bt,...xt]),S=Object.seal(He(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Me=null,Ne=null,C=Object.seal(He(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Pe=!0,Fe=!0,Ie=!1,Le=!0,w=!1,T=!0,E=!1,ze=!1,Be=null,Ve=null,Ue=!1,k=!1,We=!1,rt=!1,it=!0,at=!1,ot=`user-content-`,j=!0,P=!1,st={},ct=null,It=F({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),Gt=null,Kt=F({},[`audio`,`video`,`img`,`source`,`image`,`track`]),z=null,qt=F({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),B=`http://www.w3.org/1998/Math/MathML`,V=`http://www.w3.org/2000/svg`,H=`http://www.w3.org/1999/xhtml`,Jt=H,U=!1,Yt=null,Xt=F({},[B,V,H],Qe),Zt=D([`mi`,`mo`,`mn`,`ms`,`mtext`]),Qt=F({},Zt),$t=D([`annotation-xml`]),en=F({},$t),tn=F({},[`title`,`style`,`font`,`a`,`script`]),nn=null,rn=[`application/xhtml+xml`,`text/html`],W=null,an=null,on=n.createElement(`form`),sn=function(e){return e instanceof RegExp||e instanceof Function},cn=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(an&&an===e)return;(!e||typeof e!=`object`)&&(e={}),e=I(e),nn=rn.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,W=nn===`application/xhtml+xml`?Qe:Ze,b=Ht(e,`ALLOWED_TAGS`,Ae,{transform:W}),x=Ht(e,`ALLOWED_ATTR`,je,{transform:W}),Yt=Ht(e,`ALLOWED_NAMESPACES`,Xt,{transform:Qe}),z=Ht(e,`ADD_URI_SAFE_ATTR`,qt,{transform:W,base:qt}),Gt=Ht(e,`ADD_DATA_URI_TAGS`,Kt,{transform:W,base:Kt}),ct=Ht(e,`FORBID_CONTENTS`,It,{transform:W}),Me=Ht(e,`FORBID_TAGS`,I({}),{transform:W}),Ne=Ht(e,`FORBID_ATTR`,I({}),{transform:W}),st=A(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?I(e.USE_PROFILES):e.USE_PROFILES:!1,Pe=e.ALLOW_ARIA_ATTR!==!1,Fe=e.ALLOW_DATA_ATTR!==!1,Ie=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Le=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,w=e.SAFE_FOR_TEMPLATES||!1,T=e.SAFE_FOR_XML!==!1,E=e.WHOLE_DOCUMENT||!1,k=e.RETURN_DOM||!1,We=e.RETURN_DOM_FRAGMENT||!1,rt=e.RETURN_TRUSTED_TYPE||!1,Ue=e.FORCE_BODY||!1,it=e.SANITIZE_DOM!==!1,at=e.SANITIZE_NAMED_PROPS||!1,j=e.KEEP_CONTENT!==!1,P=e.IN_PLACE||!1,ke=ut(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:Dt,Jt=typeof e.NAMESPACE==`string`?e.NAMESPACE:H,Qt=Ut(e,`MATHML_TEXT_INTEGRATION_POINTS`,()=>F({},Zt)),en=Ut(e,`HTML_INTEGRATION_POINTS`,()=>F({},$t));let t=Ut(e,`CUSTOM_ELEMENT_HANDLING`,()=>He(null));if(S=He(null),A(t,`tagNameCheck`)&&sn(t.tagNameCheck)&&(S.tagNameCheck=t.tagNameCheck),A(t,`attributeNameCheck`)&&sn(t.attributeNameCheck)&&(S.attributeNameCheck=t.attributeNameCheck),A(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(S.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),O(S),w&&(Fe=!1),We&&(k=!0),st&&(b=F({},_t),x=He(null),st.html===!0&&(F(b,dt),F(x,vt)),st.svg===!0&&(F(b,ft),F(x,yt),F(x,xt)),st.svgFilters===!0&&(F(b,pt),F(x,yt),F(x,xt)),st.mathMl===!0&&(F(b,ht),F(x,bt),F(x,xt))),C.tagCheck=null,C.attributeCheck=null,A(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?C.tagCheck=e.ADD_TAGS:Xe(e.ADD_TAGS)&&(b===Ae&&(b=I(b)),F(b,e.ADD_TAGS,W))),A(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?C.attributeCheck=e.ADD_ATTR:Xe(e.ADD_ATTR)&&(x===je&&(x=I(x)),F(x,e.ADD_ATTR,W))),A(e,`ADD_FORBID_CONTENTS`)&&Xe(e.ADD_FORBID_CONTENTS)&&(ct===It&&(ct=I(ct)),F(ct,e.ADD_FORBID_CONTENTS,W)),j&&(b[`#text`]=!0),E&&F(b,[`html`,`head`,`body`]),b.table&&(F(b,[`tbody`]),delete Me.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw N(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw N(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=g;g=e.TRUSTED_TYPES_POLICY;try{le=_(``)}catch(e){throw g=t,e}}else e.TRUSTED_TYPES_POLICY===null?(g=void 0,le=``):(g===void 0&&(g=he()),g&&typeof le==`string`&&(le=_(``)));D&&D(e),an=e},ln=F({},[...ft,...pt,...mt]),un=F({},[...ht,...gt]),dn=function(e,t,n){return t.namespaceURI===H?e===`svg`:t.namespaceURI===B?e===`svg`&&(n===`annotation-xml`||Qt[n]):!!ln[e]},fn=function(e,t,n){return t.namespaceURI===H?e===`math`:t.namespaceURI===V?e===`math`&&en[n]:!!un[e]},pn=function(e,t,n){return t.namespaceURI===V&&!en[n]||t.namespaceURI===B&&!Qt[n]?!1:!un[e]&&(tn[e]||!ln[e])},mn=function(e){let t=h(e);(!t||!t.tagName)&&(t={namespaceURI:Jt,tagName:`template`});let n=Ze(e.tagName),r=Ze(t.tagName);return Yt[e.namespaceURI]?e.namespaceURI===V?dn(n,t,r):e.namespaceURI===B?fn(n,t,r):e.namespaceURI===H?pn(n,t,r):!!(nn===`application/xhtml+xml`&&Yt[e.namespaceURI]):!1},G=function(e){Je(t.removed,{element:e});try{h(e).removeChild(e)}catch{if(p(e),!h(e))throw N(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},hn=function(e,t,n){try{m(e,t)}catch{try{e.removeAttribute(n)}catch{}}},gn=function(e){yn(e);let t=te(e);if(t){let e=[];Ge(t,t=>{Je(e,t)}),Ge(e,e=>{try{p(e)}catch{}})}let n=re(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;typeof i==`string`&&hn(e,r,i)}},_n=function(e,n,r){if(!r)try{r=n.getAttributeNode(e)}catch{r=null}Je(t.removed,{attribute:r||null,from:n});try{r?m(n,r):n.removeAttribute(e)}catch{try{n.removeAttribute(e)}catch{}}if(e===`is`){if(k||We)try{G(n)}catch{}else try{n.setAttribute(e,``)}catch{}}},vn=function(e){let t=re(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;typeof i!=`string`||x[W(i)]||hn(e,r,i)}},yn=function(e){let t=[e];for(;t.length>0;){let e=t.pop();se(e)===R.element&&vn(e);let n=te(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},bn=function(e,t){return T?e===`patchsrc`||e===`for`&&t!==`label`&&t!==`output`:!1},xn=function(e){if(!T)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=se(e);if(n===R.processingInstruction||n===R.comment&&M(Nt,e.data)){try{p(e)}catch{}continue}if(n===R.element){let t=e,n=W(ce(e));try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&bn(`for`,n)&&t.removeAttribute(`for`)}catch{}}let r=te(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},K=function(e){let t=null,r=null;if(Ue)e=`<remove></remove>`+e;else{let t=$e(e,/^[\r\n\t ]+/);r=t&&t[0]}nn===`application/xhtml+xml`&&Jt===H&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=g?_(e):e;if(Jt===H)try{t=new l().parseFromString(i,nn)}catch{}if(!t||!t.documentElement){t=_e.createDocument(Jt,`template`,null);try{t.documentElement.innerHTML=U?le:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Jt===H?ye.call(t,E?`html`:`body`)[0]:E?t.documentElement:a},Sn=function(e){let t=oe?oe(e):e.ownerDocument;return ve.call(t||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},q=function(e){return e=et(e,xe,` `),e=et(e,Se,` `),e=et(e,Ce,` `),e},Cn=function(e){e.normalize();let t=oe?oe(e):e.ownerDocument,n=ve.call(t||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=q(r.data),r=n.nextNode();let i=e.querySelectorAll?.call(e,`template`);i&&Ge(i,e=>{Tn(e.content)&&Cn(e.content)})},wn=function(e){let t=ae?ae(e):null;return typeof t!=`string`||W(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==re(e)||typeof e.removeAttribute!=`function`||typeof e.removeAttributeNode!=`function`||typeof e.getAttributeNode!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==ie(e)||e.childNodes!==te(e)},Tn=function(e){if(!ie||typeof e!=`object`||!e)return!1;try{return ie(e)===R.documentFragment}catch{return!1}},En=function(e){if(!ie||typeof e!=`object`||!e)return!1;try{return typeof ie(e)==`number`}catch{return!1}};function J(e,n,r){e.length!==0&&Ge(e,e=>{e.call(t,n,r,an)})}let Dn=function(e,t){return!!(T&&e.hasChildNodes()&&!En(e.firstElementChild)&&M(Mt,e.textContent)&&M(Mt,e.innerHTML)||T&&e.namespaceURI===H&&Lt[t]&&(En(e.firstElementChild)||typeof e.textContent==`string`&&M(Rt[t],e.textContent))||e.nodeType===R.processingInstruction||T&&e.nodeType===R.comment&&M(Nt,e.data))},On=function(e,t){return e instanceof RegExp?M(e,t):e instanceof Function&&!!e(t,...[...arguments].slice(2))},kn=function(e,t,n){if(!Me[t]&&Fn(t)&&On(S.tagNameCheck,t))return!1;if(j&&!ct[t]){let t=h(e),r=te(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?f(r[a],!0):r[a];t.insertBefore(i,ee(e))}}}return G(e),!0},An=function(e,t,n,r){return e.length===0?t:t===n||t===r?I(t):t},jn=function(e,t){return e===t||h(e)!==null?!1:(P&&yn(e),!0)},Mn=function(e,n){if(J(y.beforeSanitizeElements,e,null),jn(e,n))return!0;if(wn(e))return G(e),!0;let r=W(ce(e));if(b=An(y.uponSanitizeElement,b,Ae,Be),J(y.uponSanitizeElement,e,{tagName:r,allowedTags:b}),jn(e,n))return!0;if(Dn(e,r))return G(e),!0;if(Me[r]||!(C.tagCheck instanceof Function&&C.tagCheck(r))&&!b[r]){let t=kn(e,r,n);return t===!1&&(J(y.afterSanitizeElements,e,null),jn(e,n))?!0:t}if(se(e)===R.element&&!mn(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&M(Pt,e.innerHTML))return G(e),!0;if(w&&e.nodeType===R.text){let n=q(e.textContent);e.textContent!==n&&(Je(t.removed,{element:e.cloneNode()}),e.textContent=n)}return J(y.afterSanitizeElements,e,null),jn(e,n)},Nn=function(e,t,r){if(Ne[t]||bn(t,e)||it&&(t===`id`||t===`name`)&&(r in n||r in on))return!1;let i=x[t]||C.attributeCheck instanceof Function&&C.attributeCheck(t,e);return Fe&&M(we,t)||Pe&&M(Te,t)?!0:i?z[t]||M(ke,et(r,De,``))||(t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&tt(r,`data:`)===0&&Gt[e]||Ie&&!M(Ee,et(r,De,``))?!0:!r:Fn(e)&&On(S.tagNameCheck,e)&&On(S.attributeNameCheck,t,e)||t===`is`&&S.allowCustomizedBuiltInElements&&On(S.tagNameCheck,r)},Pn=F({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),Fn=function(e){return!Pn[Ze(e)]&&M(Oe,e)},In=function(e,t,n,r){if(g&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return _(r);case`TrustedScriptURL`:return me(r)}return r},Ln=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),!wn(e)||(G(e),!1)}catch{return _n(t,e),!1}},Rn=function(e,n){if(J(y.beforeSanitizeAttributes,e,null),jn(e,n))return;let r=e.attributes;if(!r||wn(e))return;x=An(y.uponSanitizeAttribute,x,je,Ve);let i={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:x,forceKeepAttr:void 0},a=r.length,o=W(e.nodeName);for(;a--;){let n=r[a],s=n.name,c=n.namespaceURI,l=n.value,u=W(s),d=l,f=s===`value`?d:nt(d),p=!1;if(i.attrName=u,i.attrValue=f,i.keepAttr=!0,i.forceKeepAttr=void 0,J(y.uponSanitizeAttribute,e,i),f=i.attrValue,at&&(u===`id`||u===`name`)&&tt(f,ot)!==0&&(_n(s,e,n),f=ot+f,p=!0),T&&M(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,f)){_n(s,e,n);continue}if(u===`attributename`&&$e(f,`href`)){_n(s,e,n);continue}if(!i.forceKeepAttr){if(!i.keepAttr){_n(s,e,n);continue}if(!Le&&M(Ft,f)){_n(s,e,n);continue}if(w&&(f=q(f)),!Nn(o,u,f)){_n(s,e,n);continue}f=In(o,u,c,f),f!==d&&Ln(e,s,c,f)&&p&&qe(t.removed)}}J(y.afterSanitizeAttributes,e,null),jn(e,n)},zn=function(e){let t=null,n=Sn(e);for(J(y.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(J(y.uponSanitizeShadowNode,t,null),Mn(t,e),Rn(t,e),Tn(t.content)&&zn(t.content),se(t)===R.element){let e=ne(t);Tn(e)&&(Bn(e),zn(e))}J(y.afterSanitizeShadowDOM,e,null)},Bn=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){zn(e.shadow);continue}let n=e.node,r=se(n)===R.element,i=te(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=ae?ae(n):null;if(typeof e==`string`&&W(e)===`template`){let e=n.content;Tn(e)&&t.push({node:e,shadow:null})}}if(r){let e=ne(n);Tn(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(U=!e,U&&(e=`<!-->`),typeof e!=`string`&&!En(e)&&(e=lt(e),typeof e!=`string`))throw N(`dirty is not a string, aborting`);if(!t.isSupported)return e;ze?(b=Be,x=Ve):cn(n),(y.uponSanitizeElement.length>0||y.uponSanitizeAttribute.length>0)&&(b=I(b)),y.uponSanitizeAttribute.length>0&&(x=I(x)),t.removed=[];let c=P&&typeof e!=`string`&&En(e);if(c){xn(e);let t=ce(e);if(typeof t==`string`){let n=W(t);if(!b[n]||Me[n])throw gn(e),N(`root node is forbidden and cannot be sanitized in-place`)}if(wn(e))throw gn(e),N(`root node is clobbered and cannot be sanitized in-place`);try{Bn(e)}catch(t){throw gn(e),t}}else if(En(e))i=K(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===R.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),Bn(i);else{if(!k&&!w&&!E&&e.indexOf(`<`)===-1)return g&&rt?_(e):e;if(i=K(e),!i)return k?null:rt?le:``}i&&Ue&&G(i.firstChild);let l=c?e:i;try{let e=Sn(l);for(;o=e.nextNode();)Mn(o,l),Rn(o,l),Tn(o.content)&&zn(o.content)}catch(n){throw c&&(gn(e),Ge(t.removed,e=>{e.element&&yn(e.element)})),n}if(c){let n=!1;if(Ge(t.removed,t=>{t.element&&(t.element===e&&(n=!0),yn(t.element))}),n)throw N(`a node selected for removal could not be safely returned; refusing to sanitize in place`);return w&&Cn(e),e}if(k){if(w&&Cn(i),We)for(s=v.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(x.shadowroot||x.shadowrootmode)&&(s=be.call(r,s,!0)),s}let u=E?i.outerHTML:i.innerHTML;return E&&b[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&M(At,i.ownerDocument.doctype.name)&&(u=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
3
3
  `+u),w&&(u=q(u)),g&&rt?_(u):u},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};cn(e),ze=!0,Be=b,Ve=x},t.clearConfig=function(){an=null,ze=!1,Be=null,Ve=null,g=ue,le=``},t.isValidAttribute=function(e,t,n){an||cn({});let r=W(e),i=W(t);return Nn(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&A(y,e)&&Je(y[e],t)},t.removeHook=function(e,t){if(A(y,e)){if(t!==void 0){let n=Ke(y[e],t);return n===-1?void 0:Ye(y[e],n,1)[0]}return qe(y[e])}},t.removeHooks=function(e){A(y,e)&&(y[e]=[])},t.removeAllHooks=function(){y=Vt()},t}var Gt=Wt();function Kt(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var z=Kt();function qt(e){z=e}var B={exec:()=>null};function V(e){let t=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),i=t[r];return i||(i=e(r),t[r]=i),i}}function H(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(U.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var Jt=((e=``)=>{try{return!!RegExp(`(?<=1)(?<!1)`+e)}catch{return!1}})(),U={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:V(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:V(e=>RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:V(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:V(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:V(e=>RegExp(`^ {0,${e}}(?:</?(?:${ln})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`,`i`)),blockquoteBeginRegex:V(e=>RegExp(`^ {0,${e}}>`))},Yt=/^(?:[ \t]*(?:\n|$))+/,Xt=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Zt=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Qt=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,$t=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,en=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,tn=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,nn=H(tn).replace(/bull/g,en).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),rn=H(tn).replace(/bull/g,en).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),W=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,an=/^[^\n]+/,on=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,sn=H(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,on).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),cn=H(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,en).getRegex(),ln=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,un=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,dn=H(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,un).replace(`tag`,ln).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),fn=e=>H(W).replace(`hr`,Qt).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,e).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,ln).getRegex(),pn=fn(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),mn=fn(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),G={blockquote:H(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,mn).getRegex(),code:Xt,def:sn,fences:Zt,heading:$t,hr:Qt,html:dn,lheading:nn,list:cn,newline:Yt,paragraph:pn,table:B,text:an},hn=H(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,Qt).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,ln).getRegex(),gn={...G,lheading:rn,table:hn,paragraph:H(W).replace(`hr`,Qt).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,hn).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,ln).getRegex()},_n={...G,html:H(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,un).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:B,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:H(W).replace(`hr`,Qt).replace(`heading`,` *#{1,6} *[^
4
4
  ]`).replace(`lheading`,nn).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},vn=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,yn=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,bn=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,xn=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,K=/[\p{P}\p{S}]/u,Sn=/[\s\p{P}\p{S}]/u,q=/[^\s\p{P}\p{S}]/u,Cn=H(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,Sn).getRegex(),wn=/[\p{Pi}\p{Ps}"']/u,Tn=/(?!~)[\p{P}\p{S}]/u,En=/(?!~)[\s\p{P}\p{S}]/u,J=/(?:[^\s\p{P}\p{S}]|~)/u,Dn=H(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,Jt?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),On=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,kn=H(On,`u`).replace(/punct/g,K).getRegex(),An=H(On,`u`).replace(/punct/g,Tn).getRegex(),jn=H(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,`u`).replace(/openQuote/g,wn).replace(/punct/g,K).getRegex(),Mn=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,Nn=H(Mn,`gu`).replace(/notPunctSpace/g,q).replace(/punctSpace/g,Sn).replace(/punct/g,K).getRegex(),Pn=H(Mn,`gu`).replace(/notPunctSpace/g,J).replace(/punctSpace/g,En).replace(/punct/g,Tn).getRegex(),Fn=H(`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,q).replace(/punctSpace/g,Sn).replace(/punct/g,K).getRegex(),In=H(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,q).replace(/punctSpace/g,Sn).replace(/punct/g,K).getRegex(),Ln=H(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,q).replace(/punctSpace/g,Sn).replace(/punct/g,K).getRegex(),Rn=H(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,K).getRegex(),zn=H(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,q).replace(/punctSpace/g,Sn).replace(/punct/g,K).getRegex(),Bn=H(/\\(punct)/,`gu`).replace(/punct/g,K).getRegex(),Vn=H(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Hn=H(un).replace(`(?:-->|$)`,`-->`).getRegex(),Un=H(`^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,Hn).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Wn=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,Gn=H(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace(`brackets`,Wn).getRegex(),Kn=H(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace(`label`,Gn).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),qn=H(/^!?\[(label)\]\[(ref)\]/).replace(`label`,Gn).replace(`ref`,on).getRegex(),Jn=H(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,on).getRegex(),Yn=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,Xn=H(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace(`brackets`,Wn).getRegex(),Zn=H(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,H(/^!?\[(label)\]\[(ref)\]/).replace(`label`,Xn).replace(`ref`,Yn).getRegex()).replace(`nolink`,H(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,Yn).getRegex()).getRegex(),Qn=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,$n=H(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),er={_backpedal:B,anyPunctuation:Bn,autolink:Vn,blockSkip:Dn,br:bn,code:yn,del:B,delLDelim:B,delRDelim:B,emStrongLDelim:kn,emStrongRDelimAst:Nn,emStrongRDelimUnd:In,escape:vn,link:Kn,nolink:Jn,punctuation:Cn,reflink:qn,reflinkSearch:Zn,tag:Un,text:xn,url:B},tr={...er,emStrongLDelim:jn,emStrongRDelimAst:Fn,emStrongRDelimUnd:Ln,link:H(/^!?\[(label)\]\((.*?)\)/).replace(`label`,Gn).getRegex(),reflink:H(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,Gn).getRegex()},nr={...er,emStrongRDelimAst:Pn,emStrongLDelim:An,delLDelim:Rn,delRDelim:zn,url:H(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`emailProtocol`,$n).replace(`protocol`,Qn).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:H(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace(`protocol`,Qn).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},rr={...nr,br:H(bn).replace(`{2,}`,`*`).getRegex(),text:H(nr.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},ir={normal:G,gfm:gn,pedantic:_n},ar={normal:er,gfm:nr,breaks:rr,pedantic:tr},or={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`},sr=e=>or[e];function Y(e,t){if(t){if(U.escapeTest.test(e))return e.replace(U.escapeReplace,sr)}else if(U.escapeTestNoEncode.test(e))return e.replace(U.escapeReplaceNoEncode,sr);return e}function cr(e){return e.replace(U.numericCharacterReference,(e,t,n)=>{let r=t===void 0?Number.parseInt(n,16):Number.parseInt(t,10);return r===0||r>1114111||r>=55296&&r<=57343?`�`:String.fromCodePoint(r)})}function lr(e){try{e=encodeURI(e).replace(U.percentDecode,`%`)}catch{return null}return e}function ur(e,t){let n=e.replace(U.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(U.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t){if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``)}for(;r<n.length;r++)n[r]=n[r].trim().replace(U.slashPipe,`|`);return n}function dr(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function fr(e){let t=e.split(`
@@ -31,7 +31,7 @@
31
31
  dispatchEvent(new Event("wizard-install"));
32
32
  });
33
33
  </script>
34
- <script type="module" crossorigin src="/studio/assets/index-BYV0HYlP.js"></script>
34
+ <script type="module" crossorigin src="/studio/assets/index-BRy5sz4a.js"></script>
35
35
  <link rel="modulepreload" crossorigin href="/studio/assets/jsx-runtime-Dk72oS4N.js">
36
36
  <link rel="modulepreload" crossorigin href="/studio/assets/preload-helper-CNEI7N0N.js">
37
37
  <link rel="modulepreload" crossorigin href="/studio/assets/createLucideIcon-DBu2Ovxj.js">
@@ -440,9 +440,8 @@ latest_version() {
440
440
  sed -n 's#.*/tag/v##p'
441
441
  }
442
442
 
443
- # What gets installed, decided before anything is downloaded. The package is not on npm yet: it
444
- # is the tarball of the GitHub release, which npm installs like one from its registry; what it
445
- # depends on comes from the registry.
443
+ # What gets installed, decided before anything is downloaded: the tarball of the GitHub release,
444
+ # which npm installs like one from its registry; what it depends on comes from the registry.
446
445
  package() {
447
446
  STEP="Looking for the newest release"
448
447
  SPEC="${ENGENTY_WIZARDS_PACKAGE:-}"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wizards",
3
- "version": "0.1.10",
3
+ "version": "0.1.11",
4
4
  "description": "Make a wish. Get your wizard. It guides you step by step. Let AI do the work. Runs on your machine, on the AI subscription you already have.",
5
5
  "license": "FSL-1.1-MIT",
6
6
  "homepage": "https://engenty.ai",
@@ -1,2 +0,0 @@
1
- import{i as e,n as t,t as n}from"./jsx-runtime-Dk72oS4N.js";import{A as r,D as i,O as a,a as o,c as s,d as c,k as l,n as u,t as d,tt as f}from"./api-DbPn6Dge.js";import{t as p}from"./createLucideIcon-DBu2Ovxj.js";import{n as m,r as h,t as g}from"./RunnerView-__E0Cpbc.js";import{t as _}from"./arrow-left-UpjOBfQp.js";import{S as v,m as y,n as b}from"./outputs-BJ6FXJP6.js";import{a as x,i as ee,n as S,r as te,s as ne,t as re}from"./meta-DmwCkikb.js";import{t as ie}from"./check-Bjx41xbB.js";import{r as ae,t as oe}from"./wand-sparkles-Bf97fs8T.js";import{i as se,n as ce,t as le}from"./ChatPanel-BORDbEJt.js";import{n as ue,t as C}from"./plus-HA210wXA.js";import{t as de}from"./external-link-CRg6DVdO.js";import{n as w}from"./mic-CeqQ89Dj.js";import{c as fe,i as pe,l as me,n as T,o as he,p as ge,r as E,s as D,t as O}from"./definition-cy7uvY5L.js";import{t as k}from"./upload-DsgLfQ3U.js";import{a as _e,c as A,d as ve,g as ye,h as j,i as be,l as M,m as N,o as P,p as F,r as I,s as L,t as R,u as z,v as B}from"./ui-tO4ZXbfh.js";import{d as xe,g as V,l as Se,n as Ce,p as we,t as Te,u as Ee}from"./index-BYV0HYlP.js";import{a as De,c as Oe,i as ke,o as Ae,r as je,s as Me}from"./esm-Bk5dFCAD.js";import{r as Ne}from"./LocalRuntime-B33qoSb2.js";var Pe={name:`chevron-left`,size:24,node:[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]};Pe.node;var Fe=p(Pe),Ie={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};Ie.node;var Le=p(Ie),Re={name:`circle-alert`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]],aliases:[`alert-circle`]};Re.node;var ze=p(Re),Be={name:`cloud-upload`,size:24,node:[[`path`,{d:`M12 13v8`,key:`1l5pq0`}],[`path`,{d:`M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242`,key:`1pljnt`}],[`path`,{d:`m8 17 4-4 4 4`,key:`1quai1`}]],aliases:[`upload-cloud`]};Be.node;var Ve=p(Be),He={name:`file-braces`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1`,key:`1oajmo`}],[`path`,{d:`M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1`,key:`mpwhp6`}]],aliases:[`file-json`]};He.node;var Ue=p(He),We={name:`file-code-corner`,size:24,node:[[`path`,{d:`M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35`,key:`1wthlu`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m5 16-3 3 3 3`,key:`331omg`}],[`path`,{d:`m9 22 3-3-3-3`,key:`lsp7cz`}]],aliases:[`file-code-2`]};We.node;var Ge=p(We),Ke={name:`git-merge`,size:24,node:[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M6 21V9a9 9 0 0 0 9 9`,key:`7kw0sc`}]]};Ke.node;var qe=p(Ke),Je={name:`minus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]};Je.node;var Ye=p(Je),Xe={name:`play`,size:24,node:[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]};Xe.node;var Ze=p(Xe),Qe={name:`scan`,size:24,node:[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`,key:`aa7l1z`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`,key:`4qcy5o`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`,key:`6vwrx8`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`,key:`ioqczr`}]]};Qe.node;var $e=p(Qe),H=e(t(),1),U=n();function et(e){return e.mime.startsWith(`image/`)?ne:e.mime.includes(`json`)?Ue:e.mime===`text/html`||e.mime.includes(`javascript`)||e.mime===`text/css`?Ge:w}function tt(e){return e<1024?`${e} B`:e<1048576?`${Math.round(e/1024)} KB`:`${(e/1048576).toFixed(1)} MB`}function nt({wizardId:e,files:t}){let n=f(),r=(0,H.useRef)(null),[i,a]=(0,H.useState)(!1),[o,s]=(0,H.useState)(!1),[c,l]=(0,H.useState)(null),d=`/api/studio/wizards/${e}/files`,p=()=>n.invalidateQueries({queryKey:[`wizard`,e]}),m=async e=>{if(e?.length){a(!0),l(null);try{for(let t of Array.from(e)){let e=await fetch(`${d}/${encodeURIComponent(t.name).replace(/%2F/g,`/`)}`,{method:`PUT`,credentials:`include`,headers:{"content-type":t.type||`application/octet-stream`},body:t});if(!e.ok){let t=await e.json().catch(()=>({}));throw Error(t.error??e.statusText)}}}catch(e){l(e.message)}finally{a(!1),await p()}}},h=async e=>{window.confirm(B(`files.confirmDelete`,{path:e}))&&(await u.del(`${d}/${e}`),await p())},g=t.reduce((e,t)=>e+t.size,0);return(0,U.jsxs)(`div`,{className:j(`flex min-h-full flex-col px-5 py-5`,o&&`bg-ember-veil`),onDragOver:e=>{e.preventDefault(),s(!0)},onDragLeave:()=>s(!1),onDrop:e=>{e.preventDefault(),s(!1),m(e.dataTransfer.files)},children:[(0,U.jsx)(`p`,{className:`text-[13px] text-ink-3 leading-relaxed`,children:B(`files.explain`)}),(0,U.jsxs)(`div`,{className:`mt-4 flex items-center gap-2`,children:[(0,U.jsxs)(`button`,{type:`button`,onClick:()=>r.current?.click(),className:`inline-flex h-9 items-center gap-1.5 rounded-full bg-paper-2 px-3.5 font-medium text-[13px] text-ink-2 hover:bg-paper-3 hover:text-ink`,children:[i?(0,U.jsx)(ve,{className:`size-3.5`}):(0,U.jsx)(k,{className:`size-3.5`}),B(`files.upload`)]}),(0,U.jsx)(`span`,{className:`ml-auto text-[12px] text-ink-4`,children:B(`files.count`,{n:t.length,size:tt(g)})}),(0,U.jsx)(`input`,{ref:r,type:`file`,multiple:!0,hidden:!0,onChange:e=>void m(e.target.files)})]}),c?(0,U.jsx)(`div`,{className:`mt-3 rounded-lg bg-rose-tint px-3 py-2 text-[13px] text-rose`,children:c}):null,(0,U.jsx)(`ul`,{className:`mt-4 flex flex-col`,children:t.map(e=>{let t=et(e);return(0,U.jsxs)(`li`,{className:`group flex items-center gap-3 rounded-lg px-2 py-1.5 hover:bg-paper-2`,children:[(0,U.jsx)(t,{className:`size-4 shrink-0 text-ink-3`}),(0,U.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-[12px]`,children:e.path}),(0,U.jsx)(`span`,{className:`text-[12px] text-ink-4 tabular-nums`,children:tt(e.size)}),(0,U.jsx)(`a`,{href:`${d}/${e.path}`,className:`inline-flex size-8 items-center justify-center rounded-full text-ink-3 opacity-0 hover:text-ink group-hover:opacity-100`,"aria-label":B(`files.download`),children:(0,U.jsx)(we,{className:`size-4`})}),(0,U.jsx)(P,{label:B(`files.delete`),className:`opacity-0 hover:text-rose group-hover:opacity-100`,onClick:()=>void h(e.path),children:(0,U.jsx)(y,{className:`size-4`})})]},e.path)})}),t.length===0?(0,U.jsx)(`div`,{className:`mt-6 rounded-xl border border-border border-dashed px-4 py-8 text-center text-[13px] text-ink-4`,children:B(`files.empty`)}):null]})}var rt=Object.defineProperty,it=(e,t,n)=>t in e?rt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,at=(e,t)=>{for(var n in t)rt(e,n,{get:t[n],enumerable:!0})},ot=(e,t,n)=>it(e,typeof t==`symbol`?t:t+``,n),st={};at(st,{Graph:()=>G,alg:()=>yt});var ct=Object.defineProperty,lt=(e,t)=>{for(var n in t)ct(e,n,{get:t[n],enumerable:!0})},ut=class{constructor(e){this._isDirected=!0,this._isMultigraph=!1,this._isCompound=!1,this._nodes={},this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={},this._nodeCount=0,this._edgeCount=0,this._defaultNodeLabelFn=()=>{},this._defaultEdgeLabelFn=()=>{},e&&(this._isDirected=`directed`in e?e.directed:!0,this._isMultigraph=`multigraph`in e&&e.multigraph,this._isCompound=`compound`in e&&e.compound),this._isCompound&&(this._parent={},this._children={},this._children[`\0`]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return this._defaultNodeLabelFn=typeof e==`function`?e:()=>e,this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){return this.nodes().filter(e=>Object.keys(this._in[e]).length===0)}sinks(){return this.nodes().filter(e=>Object.keys(this._out[e]).length===0)}setNodes(e,t){return e.forEach(e=>{t===void 0?this.setNode(e):this.setNode(e,t)}),this}setNode(e,t){return e in this._nodes?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=`\0`,this._children[e]={},this._children[`\0`][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return e in this._nodes}removeNode(e){if(e in this._nodes){let t=e=>this.removeEdge(this._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],this.children(e).forEach(e=>{this.setParent(e)}),delete this._children[e]),Object.keys(this._in[e]).forEach(t),delete this._in[e],delete this._preds[e],Object.keys(this._out[e]).forEach(t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw Error(`Cannot set parent in a non-compound graph`);if(t===void 0)t=`\0`;else{t+=``;for(let n=t;n!==void 0;n=this.parent(n))if(n===e)throw Error(`Setting `+t+` as parent of `+e+` would create a cycle`);this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}parent(e){if(this._isCompound){let t=this._parent[e];if(t!==`\0`)return t}}children(e=`\0`){if(this._isCompound){let t=this._children[e];if(t)return Object.keys(t)}else{if(e===`\0`)return this.nodes();if(this.hasNode(e))return[]}return[]}predecessors(e){let t=this._preds[e];if(t)return Object.keys(t)}successors(e){let t=this._sucs[e];if(t)return Object.keys(t)}neighbors(e){let t=this.predecessors(e);if(t){let n=new Set(t),r=this.successors(e);if(r)for(let e of r)n.add(e);return Array.from(n.values())}}isLeaf(e){let t;return t=this.isDirected()?this.successors(e):this.neighbors(e),(t?.length??0)===0}filterNodes(e){let t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph()),Object.entries(this._nodes).forEach(([n,r])=>{e(n)&&t.setNode(n,r)}),Object.values(this._edgeObjs).forEach(e=>{t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,this.edge(e))});let n={},r=e=>{let i=this.parent(e);return!i||t.hasNode(i)?(n[e]=i,i):i in n?n[i]:r(i)};return this._isCompound&&t.nodes().forEach(e=>t.setParent(e,r(e))),t}setDefaultEdgeLabel(e){return this._defaultEdgeLabelFn=typeof e==`function`?e:()=>e,this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(e,t){return e.reduce((e,n)=>(t===void 0?this.setEdge(e,n):this.setEdge(e,n,t),n)),this}setEdge(e,t,n,r){let i,a,o,s,c=!1;typeof e==`object`&&e&&`v`in e?(i=e.v,a=e.w,o=e.name,arguments.length===2&&(s=t,c=!0)):(i=e,a=t,o=r,arguments.length>2&&(s=n,c=!0)),i=``+i,a=``+a,o!==void 0&&(o=``+o);let l=W(this._isDirected,i,a,o);if(l in this._edgeLabels)return c&&(this._edgeLabels[l]=s),this;if(o!==void 0&&!this._isMultigraph)throw Error(`Cannot set a named edge when isMultigraph = false`);this.setNode(i),this.setNode(a),this._edgeLabels[l]=c?s:this._defaultEdgeLabelFn(i,a,o);let u=pt(this._isDirected,i,a,o);return i=u.v,a=u.w,Object.freeze(u),this._edgeObjs[l]=u,dt(this._preds[a],i),dt(this._sucs[i],a),this._in[a][l]=u,this._out[i][l]=u,this._edgeCount++,this}edge(e,t,n){let r=arguments.length===1?mt(this._isDirected,e):W(this._isDirected,e,t,n);return this._edgeLabels[r]}edgeAsObj(e,t,n){let r=arguments.length===1?this.edge(e):this.edge(e,t,n);return typeof r!=`object`||!r?{label:r}:r}hasEdge(e,t,n){return(arguments.length===1?mt(this._isDirected,e):W(this._isDirected,e,t,n))in this._edgeLabels}removeEdge(e,t,n){let r=arguments.length===1?mt(this._isDirected,e):W(this._isDirected,e,t,n),i=this._edgeObjs[r];if(i){let e=i.v,t=i.w;delete this._edgeLabels[r],delete this._edgeObjs[r],ft(this._preds[t],e),ft(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--}return this}inEdges(e,t){return this.isDirected()?this.filterEdges(this._in[e],e,t):this.nodeEdges(e,t)}outEdges(e,t){return this.isDirected()?this.filterEdges(this._out[e],e,t):this.nodeEdges(e,t)}nodeEdges(e,t){if(e in this._nodes)return this.filterEdges({...this._in[e],...this._out[e]},e,t)}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}filterEdges(e,t,n){if(!e)return;let r=Object.values(e);return n?r.filter(e=>e.v===t&&e.w===n||e.v===n&&e.w===t):r}};function dt(e,t){e[t]?e[t]++:e[t]=1}function ft(e,t){e[t]!==void 0&&!--e[t]&&delete e[t]}function W(e,t,n,r){let i=``+t,a=``+n;if(!e&&i>a){let e=i;i=a,a=e}return i+``+a+``+(r===void 0?`\0`:r)}function pt(e,t,n,r){let i=``+t,a=``+n;if(!e&&i>a){let e=i;i=a,a=e}let o={v:i,w:a};return r&&(o.name=r),o}function mt(e,t){return W(e,t.v,t.w,t.name)}lt({},{read:()=>vt,write:()=>ht});function ht(e){let t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:gt(e),edges:_t(e)},n=e.graph();return n!==void 0&&(t.value=structuredClone(n)),t}function gt(e){return e.nodes().map(t=>{let n=e.node(t),r=e.parent(t),i={v:t};return n!==void 0&&(i.value=n),r!==void 0&&(i.parent=r),i})}function _t(e){return e.edges().map(t=>{let n=e.edge(t),r={v:t.v,w:t.w};return t.name!==void 0&&(r.name=t.name),n!==void 0&&(r.value=n),r})}function vt(e){let t=new ut(e.options);return e.value!==void 0&&t.setGraph(e.value),e.nodes.forEach(e=>{t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)}),e.edges.forEach(e=>{t.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),t}var yt={};lt(yt,{CycleException:()=>Pt,bellmanFord:()=>xt,components:()=>Ct,dijkstra:()=>Et,dijkstraAll:()=>Ot,findCycles:()=>At,floydWarshall:()=>Mt,isAcyclic:()=>It,postorder:()=>Bt,preorder:()=>Vt,prim:()=>Ht,shortestPaths:()=>Ut,tarjan:()=>kt,topsort:()=>Ft});var bt=()=>1;function xt(e,t,n,r){return St(e,String(t),n||bt,r||function(t){return e.outEdges(t)??[]})}function St(e,t,n,r){let i={},a,o=0,s=e.nodes(),c=function(e){let t=i[e.v],r=i[e.w];if(!t||!r)return;let o=n(e);t.distance+o<r.distance&&(i[e.w]={distance:t.distance+o,predecessor:e.v},a=!0)},l=function(){s.forEach(function(e){r(e).forEach(function(t){let n=t.v===e?t.v:t.w,r=n===t.v?t.w:t.v;c({v:n,w:r})})})};s.forEach(function(e){i[e]={distance:e===t?0:1/0,predecessor:``}});let u=s.length;for(let e=1;e<u&&(a=!1,o++,l(),a);e++);if(o===u-1&&(a=!1,l(),a))throw Error(`The graph contains a negative weight cycle`);return i}function Ct(e){let t={},n=[],r;function i(n){var a,o;n in t||(t[n]=!0,r.push(n),(a=e.successors(n))==null||a.forEach(i),(o=e.predecessors(n))==null||o.forEach(i))}return e.nodes().forEach(function(e){r=[],i(e),r.length&&n.push(r)}),n}var wt=class{constructor(){this._arr=[],this._keyIndices={}}size(){return this._arr.length}keys(){return this._arr.map(e=>e.key)}has(e){return e in this._keyIndices}priority(e){let t=this._keyIndices[e];if(t!==void 0)return this._arr[t].priority}min(){if(this.size()===0)throw Error(`Queue underflow`);return this._arr[0].key}add(e,t){let n=this._keyIndices,r=String(e);if(!(r in n)){let e=this._arr,i=e.length;return n[r]=i,e.push({key:r,priority:t}),this._decrease(i),!0}return!1}removeMin(){if(this.size()===0)throw Error(`Queue underflow`);this._swap(0,this._arr.length-1);let e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key}decrease(e,t){let n=this._keyIndices[e];if(n===void 0)throw Error(`Key not found: ${e}`);let r=this._arr[n].priority;if(t>r)throw Error(`New priority is greater than current priority. Key: ${e} Old: ${r} New: ${t}`);this._arr[n].priority=t,this._decrease(n)}_heapify(e){let t=this._arr,n=2*e,r=n+1,i=e;n<t.length&&(i=t[n].priority<t[i].priority?n:i,r<t.length&&(i=t[r].priority<t[i].priority?r:i),i!==e&&(this._swap(e,i),this._heapify(i)))}_decrease(e){let t=this._arr,n=t[e].priority,r;for(;e!==0&&(r=e>>1,!(t[r].priority<n));)this._swap(e,r),e=r}_swap(e,t){let n=this._arr,r=this._keyIndices,i=n[e],a=n[t];n[e]=a,n[t]=i,r[a.key]=e,r[i.key]=t}},Tt=()=>1;function Et(e,t,n,r){return Dt(e,String(t),n||Tt,r||function(t){return e.outEdges(t)??[]})}function Dt(e,t,n,r){let i={},a=new wt,o,s,c=function(e){let t=e.v===o?e.w:e.v,r=i[t];if(!r)return;let c=n(e),l=s.distance+c;if(c<0)throw Error(`dijkstra does not allow negative edge weights. Bad edge: `+e+` Weight: `+c);l<r.distance&&(r.distance=l,r.predecessor=o,a.decrease(t,l))};for(e.nodes().forEach(function(e){let n=e===t?0:1/0;i[e]={distance:n,predecessor:``},a.add(e,n)});a.size()>0;){o=a.removeMin();let e=i[o];if(!e||e.distance===1/0)break;s=e,r(o).forEach(c)}return i}function Ot(e,t,n){return e.nodes().reduce(function(r,i){return r[i]=Et(e,i,t,n),r},{})}function kt(e){let t=0,n=[],r={},i=[];function a(o){var s;let c=r[o]={onStack:!0,lowlink:t,index:t++};if(n.push(o),(s=e.successors(o))==null||s.forEach(function(e){if(e in r){let t=r[e];t!=null&&t.onStack&&(c.lowlink=Math.min(c.lowlink,t.index))}else{a(e);let t=r[e];t&&(c.lowlink=Math.min(c.lowlink,t.lowlink))}}),c.lowlink===c.index){let e=[],t;do{t=n.pop();let i=r[t];i&&(i.onStack=!1),e.push(t)}while(o!==t);i.push(e)}}return e.nodes().forEach(function(e){e in r||a(e)}),i}function At(e){return kt(e).filter(function(t){let n=t[0];return n?t.length>1||t.length===1&&(e.outEdges(n,n)??[]).length>0:!1})}var jt=()=>1;function Mt(e,t,n){return Nt(e,t||jt,n||function(t){return e.outEdges(t)??[]})}function Nt(e,t,n){let r={},i=e.nodes();return i.forEach(function(e){let a={};r[e]=a,a[e]={distance:0,predecessor:``},i.forEach(function(t){e!==t&&(a[t]={distance:1/0,predecessor:``})}),n(e).forEach(function(n){let r=n.v===e?n.w:n.v,i=t(n);a[r]={distance:i,predecessor:e}})}),i.forEach(function(e){let t=r[e];t&&i.forEach(function(n){let a=r[n];a&&i.forEach(function(n){let r=a[e],i=t[n],o=a[n];if(r&&i&&o){let e=r.distance+i.distance;e<o.distance&&(o.distance=e,o.predecessor=i.predecessor)}})})}),r}var Pt=class extends Error{constructor(e){super(e),this.name=`CycleException`}};function Ft(e){let t={},n={},r=[];function i(a){var o;if(a in n)throw new Pt;a in t||(n[a]=!0,t[a]=!0,(o=e.predecessors(a))==null||o.forEach(i),delete n[a],r.push(a))}if(e.sinks().forEach(i),Object.keys(t).length!==e.nodeCount())throw new Pt;return r}function It(e){try{Ft(e)}catch(e){if(e instanceof Pt)return!1;throw e}return!0}function Lt(e,t,n,r,i){Array.isArray(t)||(t=[t]);let a=(t=>(e.isDirected()?e.successors(t):e.neighbors(t))??[]),o={};return t.forEach(function(t){if(!e.hasNode(t))throw Error(`Graph does not have node: `+t);i=Rt(e,t,n===`post`,o,a,r,i)}),i}function Rt(e,t,n,r,i,a,o){return t in r||(r[t]=!0,n||(o=a(o,t)),i(t).forEach(function(t){o=Rt(e,t,n,r,i,a,o)}),n&&(o=a(o,t))),o}function zt(e,t,n){return Lt(e,t,n,function(e,t){return e.push(t),e},[])}function Bt(e,t){return zt(e,t,`post`)}function Vt(e,t){return zt(e,t,`pre`)}function Ht(e,t){var n;let r=new ut,i={},a=new wt,o;function s(e){let n=e.v===o?e.w:e.v,r=a.priority(n);if(r!==void 0){let s=t(e);s<r&&(i[n]=o,a.decrease(n,s))}}if(e.nodeCount()===0)return r;e.nodes().forEach(function(e){a.add(e,1/0),r.setNode(e)});let c=e.nodes()[0];c!==void 0&&a.decrease(c,0);let l=!1;for(;a.size()>0;){if(o=a.removeMin(),o in i)r.setEdge(o,i[o]);else{if(l)throw Error(`Input graph is not connected: `+e);l=!0}(n=e.nodeEdges(o))==null||n.forEach(s)}return r}function Ut(e,t,n,r){return Wt(e,t,n,r??(t=>e.outEdges(t)??[]))}function Wt(e,t,n,r){if(n===void 0)return Et(e,t,n,r);let i=!1,a=e.nodes();for(let o=0;o<a.length;o++){let s=a[o];if(s===void 0)continue;let c=r(s);for(let e=0;e<c.length;e++){let t=c[e];if(!t)continue;let r=t.v===s?t.v:t.w;n({v:r,w:r===t.v?t.w:t.v})<0&&(i=!0)}if(i)return xt(e,t,n,r)}return Et(e,t,n,r)}var G=ut;function K(e,t,n,r){let i=r;for(;e.hasNode(i);)i=an(r);return n.dummy=t,e.setNode(i,n),i}function Gt(e){let t=new G().setGraph(e.graph());return e.nodes().forEach(n=>t.setNode(n,e.node(n))),e.edges().forEach(n=>{let r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),t}function Kt(e){let t=new G({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach(n=>{e.children(n).length||t.setNode(n,e.node(n))}),e.edges().forEach(n=>{t.setEdge(n,e.edge(n))}),t}function qt(e,t){let n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2;if(!i&&!a)throw Error(`Not possible to find intersection inside of the rectangle`);let c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=s*i/a,l=s):(i<0&&(o=-o),c=o,l=o*a/i),{x:n+c,y:r+l}}function q(e){let t=Y($t(e)+1).map(()=>[]);return e.nodes().forEach(n=>{let r=e.node(n),i=r.rank;i!==void 0&&(t[i]||(t[i]=[]),t[i][r.order]=n)}),t}function Jt(e){let t=e.nodes().map(t=>{let n=e.node(t).rank;return n===void 0?Number.MAX_VALUE:n}),n=J(Math.min,t);e.nodes().forEach(t=>{let r=e.node(t);Object.hasOwn(r,`rank`)&&(r.rank-=n)})}function Yt(e){let t=e.nodes().map(t=>e.node(t).rank).filter(e=>e!==void 0),n=J(Math.min,t),r=[];e.nodes().forEach(t=>{let i=e.node(t).rank-n;r[i]||(r[i]=[]),r[i].push(t)});let i=0,a=e.graph().nodeRankFactor;Array.from(r).forEach((t,n)=>{t===void 0&&n%a!==0?--i:t!==void 0&&i&&t.forEach(t=>e.node(t).rank+=i)})}function Xt(e,t,n,r){let i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),K(e,`border`,i,t)}function Zt(e,t=Qt){let n=[];for(let r=0;r<e.length;r+=t){let i=e.slice(r,r+t);n.push(i)}return n}var Qt=65535;function J(e,t){return t.length>Qt?e(...Zt(t).map(t=>e(...t))):e(...t)}function $t(e){let t=e.nodes().map(t=>{let n=e.node(t).rank;return n===void 0?Number.MIN_VALUE:n});return J(Math.max,t)}function en(e,t){let n={lhs:[],rhs:[]};return e.forEach(e=>{t(e)?n.lhs.push(e):n.rhs.push(e)}),n}function tn(e,t){let n=Date.now();try{return t()}finally{console.log(e+` time: `+(Date.now()-n)+`ms`)}}function nn(e,t){return t()}var rn=0;function an(e){return e+(``+ ++rn)}function Y(e,t,n=1){t??(t=e,e=0);let r=e=>e<t;n<0&&(r=e=>t<e);let i=[];for(let t=e;r(t);t+=n)i.push(t);return i}function on(e,t){let n={};for(let r of t)e[r]!==void 0&&(n[r]=e[r]);return n}function sn(e,t){let n;return n=typeof t==`string`?e=>e[t]:t,Object.entries(e).reduce((e,[t,r])=>(e[t]=n(r,t),e),{})}function cn(e,t){return e.reduce((e,n,r)=>(e[n]=t[r],e),{})}var ln=`\0`;function un(e,t,n){if(!(e&&t&&n&&t.dummy===`edge`&&n.dummy===`edge`&&t.edgeObj&&n.edgeObj&&e[t.edgeObj.v]&&e[n.edgeObj.v]&&e[t.edgeObj.w]&&e[n.edgeObj.w]))return 0;let r=!0;t.edgeObj.w===n.edgeObj.w&&(r=!1);let i=r?e[t.edgeObj.v]?.rank??NaN:e[t.edgeObj.w]?.rank??NaN,a=Object.entries(e).find(e=>e[1].edgeObj?.v===t.edgeObj.v&&e[1].edgeObj?.w===t.edgeObj.w&&e[1].rank===i),o=Object.entries(e).find(e=>e[1].edgeObj?.v===n.edgeObj.v&&e[1].edgeObj?.w===n.edgeObj.w&&e[1].rank===i);if(!a||!o)return 0;let s=a[1].order??NaN,c=o[1].order??NaN;return isNaN(s-c)?0:s-c}var dn=`3.1.1`,fn=class{constructor(){ot(this,`_sentinel`);let e={};e._next=e._prev=e,this._sentinel=e}dequeue(){let e=this._sentinel,t=e._prev;if(t!==e)return pn(t),t}enqueue(e){let t=this._sentinel;e._prev&&e._next&&pn(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){let e=[],t=this._sentinel,n=t._prev;for(;n!==t;)e.push(JSON.stringify(n,mn)),n=n._prev;return`[`+e.join(`, `)+`]`}};function pn(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function mn(e,t){if(e!==`_next`&&e!==`_prev`)return t}var hn=fn,gn=()=>1;function _n(e,t){if(e.nodeCount()<=1)return[];let n=bn(e,t||gn);return vn(n.graph,n.buckets,n.zeroIdx).flatMap(t=>e.outEdges(t.v,t.w)||[])}function vn(e,t,n){let r=[],i=t[t.length-1],a=t[0],o;for(;e.nodeCount();){for(;o=a.dequeue();)yn(e,t,n,o);for(;o=i.dequeue();)yn(e,t,n,o);if(e.nodeCount()){for(let i=t.length-2;i>0;--i)if(o=t[i]?.dequeue(),o){r=r.concat(yn(e,t,n,o,!0)||[]);break}}}return r}function yn(e,t,n,r,i){let a=[],o=i?a:void 0;return(e.inEdges(r.v)||[]).forEach(r=>{let o=e.edge(r),s=e.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=o,xn(t,n,s)}),(e.outEdges(r.v)||[]).forEach(r=>{let i=e.edge(r),a=r.w,o=e.node(a);o.in-=i,xn(t,n,o)}),e.removeNode(r.v),o}function bn(e,t){let n=new G,r=0,i=0;e.nodes().forEach(e=>{n.setNode(e,{v:e,in:0,out:0})}),e.edges().forEach(e=>{let a=n.edge(e.v,e.w)||0,o=t(e),s=a+o;n.setEdge(e.v,e.w,s);let c=n.node(e.v),l=n.node(e.w);i=Math.max(i,c.out+=o),r=Math.max(r,l.in+=o)});let a=Sn(i+r+3).map(()=>new hn),o=r+1;return n.nodes().forEach(e=>{xn(a,o,n.node(e))}),{graph:n,buckets:a,zeroIdx:o}}function xn(e,t,n){var r,i,a;n.out?n.in?(a=e[n.out-n.in+t])==null||a.enqueue(n):(i=e[e.length-1])==null||i.enqueue(n):(r=e[0])==null||r.enqueue(n)}function Sn(e){let t=[];for(let n=0;n<e;n++)t.push(n);return t}function Cn(e,t){(e.graph().acyclicer===`greedy`?_n(e,n(e)):wn(e,t??null)).forEach(t=>{let n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,an(`rev`))});function n(e){return t=>e.edge(t).weight}}function wn(e,t){let n=[],r={},i={};function a(t){Object.hasOwn(i,t)||(i[t]=!0,r[t]=!0,e.outEdges(t).forEach(e=>{Object.hasOwn(r,e.w)?n.push(e):a(e.w)}),delete r[t])}function o(a){var s;Object.hasOwn(i,a)||(i[a]=!0,r[a]=!0,(s=e.outEdges(a))==null||s.forEach(i=>{Object.hasOwn(r,i.w)||t.node(a)?.rank>t.node(i.w)?.rank&&En(e,i.w,i)?n.push(i):o(i.w)}),delete r[a])}let s=a;return t&&typeof t.node==`function`&&(s=o),e.sources().forEach(s),e.nodes().forEach(s),n}function Tn(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.reversed){e.removeEdge(t);let r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}function En(e,t,n){let r=new Set;function i(t){if(e.sources().includes(t))return!0;r.add(t);for(let a of e.inEdges(t)??[])if((a.v!==n.v||a.w!==n.w)&&!r.has(a.v)&&i(a.v))return!0;return!1}return i(t)}function Dn(e){e.graph().dummyChains=[],e.edges().forEach(t=>On(e,t))}function On(e,t){let n=t.v,r=e.node(n).rank,i=t.w,a=e.node(i).rank,o=t.name,s=e.edge(t),c=s.labelRank;if(a===r+1)return;e.removeEdge(t);let l,u,d=0;for(++r;r<a;++d,++r)s.points=[],u={width:0,height:0,edgeLabel:s,edgeObj:t,rank:r},l=K(e,`edge`,u,`_d`),r===c&&(u.width=s.width,u.height=s.height,u.dummy=`edge-label`,u.labelpos=s.labelpos),e.setEdge(n,l,{weight:s.weight},o),d===0&&e.graph().dummyChains.push(l),n=l;e.setEdge(n,i,{weight:s.weight},o)}function kn(e){e.graph().dummyChains.forEach(t=>{let n=e.node(t),r=n.edgeLabel,i;for(e.setEdge(n.edgeObj,r);n.dummy;)i=e.successors(t)[0],e.removeNode(t),r.points.push({x:n.x,y:n.y}),n.dummy===`edge-label`&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),t=i,n=e.node(t)})}function An(e){let t={};function n(r){let i=e.node(r);if(Object.hasOwn(t,r))return i.rank;t[r]=!0;let a=e.outEdges(r),o=a?a.map(t=>t==null?1/0:n(t.w)-e.edge(t).minlen):[],s=J(Math.min,o);return s===1/0&&(s=0),i.rank=s}e.sources().forEach(n)}function X(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var jn=Mn;function Mn(e){let t=new G({directed:!1}),n=e.nodes();if(n.length===0)throw Error(`Graph must have at least one node`);let r=n[0],i=e.nodeCount();t.setNode(r,{});let a,o;for(;Nn(t,e)<i&&(a=Pn(t,e),a);)o=t.hasNode(a.v)?X(e,a):-X(e,a),Fn(t,e,o);return t}function Nn(e,t){function n(r){let i=t.nodeEdges(r);i&&i.forEach(i=>{let a=i.v,o=r===a?i.w:a;!e.hasNode(o)&&!X(t,i)&&(e.setNode(o,{}),e.setEdge(r,o,{}),n(o))})}return e.nodes().forEach(n),e.nodeCount()}function Pn(e,t){return t.edges().reduce((n,r)=>{let i=1/0;return e.hasNode(r.v)!==e.hasNode(r.w)&&(i=X(t,r)),i<n[0]?[i,r]:n},[1/0,null])[1]}function Fn(e,t,n){e.nodes().forEach(e=>t.node(e).rank+=n)}var{preorder:In,postorder:Ln}=yt,Rn=Z;Z.initLowLimValues=Hn,Z.initCutValues=zn,Z.calcCutValue=Vn,Z.leaveEdge=Wn,Z.enterEdge=Gn,Z.exchangeEdges=Kn;function Z(e){e=Gt(e),An(e);let t=jn(e);Hn(t),zn(t,e);let n,r;for(;n=Wn(t);)r=Gn(t,e,n),Kn(t,e,n,r)}function zn(e,t){let n=Ln(e,e.nodes());n=n.slice(0,n.length-1),n.forEach(n=>Bn(e,t,n))}function Bn(e,t,n){let r=e.node(n).parent,i=e.edge(n,r);i.cutvalue=Vn(e,t,n)}function Vn(e,t,n){let r=e.node(n).parent,i=!0,a=t.edge(n,r),o=0;a||=(i=!1,t.edge(r,n)),o=a.weight;let s=t.nodeEdges(n);return s&&s.forEach(a=>{let s=a.v===n,c=s?a.w:a.v;if(c!==r){let r=s===i,l=t.edge(a).weight;if(o+=r?l:-l,Jn(e,n,c)){let t=e.edge(n,c).cutvalue;o+=r?-t:t}}}),o}function Hn(e,t){arguments.length<2&&(t=e.nodes()[0]),Un(e,{},1,t)}function Un(e,t,n,r,i){let a=n,o=e.node(r);t[r]=!0;let s=e.neighbors(r);return s&&s.forEach(i=>{Object.hasOwn(t,i)||(n=Un(e,t,n,i,r))}),o.low=a,o.lim=n++,i?o.parent=i:delete o.parent,n}function Wn(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function Gn(e,t,n){let r=n.v,i=n.w;t.hasEdge(r,i)||(r=n.w,i=n.v);let a=e.node(r),o=e.node(i),s=a,c=!1;return a.lim>o.lim&&(s=o,c=!0),t.edges().filter(t=>c===Yn(e,e.node(t.v),s)&&c!==Yn(e,e.node(t.w),s)).reduce((e,n)=>X(t,n)<X(t,e)?n:e)}function Kn(e,t,n,r){let i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(r.v,r.w,{}),Hn(e),zn(e,t),qn(e,t)}function qn(e,t){let n=e.nodes().find(t=>!e.node(t).parent);if(!n)return;let r=In(e,[n]);r=r.slice(1),r.forEach(n=>{let r=e.node(n).parent,i=t.edge(n,r),a=!1;i||(i=t.edge(r,n),a=!0),t.node(n).rank=t.node(r).rank+(a?i.minlen:-i.minlen)})}function Jn(e,t,n){return e.hasEdge(t,n)}function Yn(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}var Xn=Zn;function Zn(e){let t=e.graph().ranker;if(typeof t==`function`)return t(e);switch(t){case`network-simplex`:er(e);break;case`tight-tree`:$n(e);break;case`longest-path`:Qn(e);break;case`none`:break;default:er(e)}}var Qn=An;function $n(e){An(e),jn(e)}function er(e){Rn(e)}var tr=nr;function nr(e){let t=ir(e),n=e.graph();Array.isArray(n.dummyChains)&&n.dummyChains.forEach(n=>{let r=e.node(n),i=r.edgeObj,a=rr(e,t,i.v,i.w),o=a.path,s=a.lca,c=0,l=o[c],u=!0;for(;n!==i.w;){if(r=e.node(n),u){for(;(l=o[c])!==s&&e.node(l).maxRank<r.rank;)c++;l===s&&(u=!1)}if(!u){for(;c<o.length-1&&e.node(o[c+1]).minRank<=r.rank;)c++;l=o[c]}l!==void 0&&e.setParent(n,l),n=e.successors(n)[0]}})}function rr(e,t,n,r){let i=[],a=[],o=Math.min(t[n].low,t[r].low),s=Math.max(t[n].lim,t[r].lim),c;c=n;do c=e.parent(c),i.push(c);while(c&&(t[c].low>o||s>t[c].lim));let l=c,u=r;for(;(u=e.parent(u))!==l;)a.push(u);return{path:i.concat(a.reverse()),lca:l}}function ir(e){let t={},n=0;function r(i){let a=n;e.children(i).forEach(r),t[i]={low:a,lim:n++}}return e.children(ln).forEach(r),t}function ar(e){let t=K(e,`root`,{},`_root`),n=sr(e),r=Object.values(n),i=J(Math.max,r)-1,a=2*i+1;e.graph().nestingRoot=t,e.edges().forEach(t=>e.edge(t).minlen*=a);let o=cr(e)+1;e.children(ln).forEach(r=>{or(e,t,a,o,i,n,r)}),e.graph().nodeRankFactor=a}function or(e,t,n,r,i,a,o){let s=e.children(o);if(!s.length){o!==t&&e.setEdge(t,o,{weight:0,minlen:n});return}let c=Xt(e,`_bt`),l=Xt(e,`_bb`),u=e.node(o);e.setParent(c,o),u.borderTop=c,e.setParent(l,o),u.borderBottom=l,s.forEach(s=>{or(e,t,n,r,i,a,s);let u=e.node(s),d=u.borderTop?u.borderTop:s,f=u.borderBottom?u.borderBottom:s,p=u.borderTop?r:2*r,m=d===f?i-(a[o]??0)+1:1;e.setEdge(c,d,{weight:p,minlen:m,nestingEdge:!0}),e.setEdge(f,l,{weight:p,minlen:m,nestingEdge:!0})}),e.parent(o)||e.setEdge(t,c,{weight:0,minlen:i+(a[o]??0)})}function sr(e){let t={};function n(r,i){let a=e.children(r);a&&a.length&&a.forEach(e=>n(e,i+1)),t[r]=i}return e.children(ln).forEach(e=>n(e,1)),t}function cr(e){return e.edges().reduce((t,n)=>t+e.edge(n).weight,0)}function lr(e){let t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(t=>{e.edge(t).nestingEdge&&e.removeEdge(t)})}var ur=dr;function dr(e){function t(n){let r=e.children(n),i=e.node(n);if(r.length&&r.forEach(t),i&&Object.hasOwn(i,`minRank`)){i.borderLeft=[],i.borderRight=[];for(let t=i.minRank,r=i.maxRank+1;t<r;++t)fr(e,`borderLeft`,`_bl`,n,i,t),fr(e,`borderRight`,`_br`,n,i,t)}}e.children(ln).forEach(t)}function fr(e,t,n,r,i,a){let o={width:0,height:0,rank:a,borderType:t},s=i[t][a-1],c=K(e,`border`,o,n);i[t][a]=c,e.setParent(c,r),s&&e.setEdge(s,c,{weight:1})}function pr(e){let t=e.graph().rankdir?.toLowerCase();(t===`lr`||t===`rl`)&&hr(e)}function mr(e){let t=e.graph().rankdir?.toLowerCase();(t===`bt`||t===`rl`)&&_r(e),(t===`lr`||t===`rl`)&&(yr(e),hr(e))}function hr(e){e.nodes().forEach(t=>gr(e.node(t))),e.edges().forEach(t=>gr(e.edge(t)))}function gr(e){let t=e.width;e.width=e.height,e.height=t}function _r(e){e.nodes().forEach(t=>vr(e.node(t))),e.edges().forEach(t=>{var n;let r=e.edge(t);(n=r.points)==null||n.forEach(vr),Object.hasOwn(r,`y`)&&vr(r)})}function vr(e){e.y=-e.y}function yr(e){e.nodes().forEach(t=>br(e.node(t))),e.edges().forEach(t=>{var n;let r=e.edge(t);(n=r.points)==null||n.forEach(br),Object.hasOwn(r,`x`)&&br(r)})}function br(e){let t=e.x;e.x=e.y,e.y=t}function xr(e,t=null){let n={},r=e.nodes().filter(t=>!e.children(t).length),i=r.map(t=>e.node(t).rank),a=Y(J(Math.max,i)+1).map(()=>[]);function o(t){if(n[t])return;n[t]=!0;let r=e.node(t);a[r.rank].push(t);let i=e.successors(t);i&&[...i].sort((e,t)=>s(e,t)).forEach(o)}r.sort((t,n)=>e.node(t).rank-e.node(n).rank).forEach(o);function s(n,r){return un(t,e.node(n),e.node(r))}return a}function Sr(e,t){let n=0;for(let r=1;r<t.length;++r)n+=Cr(e,t[r-1],t[r]);return n}function Cr(e,t,n){let r=cn(n,n.map((e,t)=>t)),i=t.flatMap(t=>{let n=e.outEdges(t);return n?n.map(t=>({pos:r[t.w],weight:e.edge(t).weight})).sort((e,t)=>e.pos-t.pos):[]}),a=1;for(;a<n.length;)a<<=1;let o=2*a-1;--a;let s=Array(o).fill(0),c=0;return i.forEach(e=>{let t=e.pos+a;s[t]+=e.weight;let n=0;for(;t>0;)t%2&&(n+=s[t+1]),t=t-1>>1,s[t]+=e.weight;c+=e.weight*n}),c}function wr(e,t=[]){return t.map(t=>{let n=e.inEdges(t);if(!n||!n.length)return{v:t};{let r=n.reduce((t,n)=>{let r=e.edge(n),i=e.node(n.v);return{sum:t.sum+r.weight*i.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:r.sum/r.weight,weight:r.weight}}})}function Tr(e,t){let n={};return e.forEach((e,t)=>{let r={indegree:0,in:[],out:[],vs:[e.v],i:t};e.barycenter!==void 0&&(r.barycenter=e.barycenter,r.weight=e.weight),n[e.v]=r}),t.edges().forEach(e=>{let t=n[e.v],r=n[e.w];t!==void 0&&r!==void 0&&(r.indegree++,t.out.push(r))}),Er(Object.values(n).filter(e=>!e.indegree))}function Er(e){let t=[];function n(e){return t=>{t.merged||(t.barycenter===void 0||e.barycenter===void 0||t.barycenter>=e.barycenter)&&Dr(e,t)}}function r(t){return n=>{n.in.push(t),--n.indegree===0&&e.push(n)}}for(;e.length;){let i=e.pop();t.push(i),i.in.reverse().forEach(n(i)),i.out.forEach(r(i))}return t.filter(e=>!e.merged).map(e=>on(e,[`vs`,`i`,`barycenter`,`weight`]))}function Dr(e,t){let n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}function Or(e,t,n,r,i){let a={},o=null,s=null,c=i;typeof t==`boolean`?(c=t,a={}):t&&(a=t,o=n??null,s=r??null);let l=en(e,e=>Object.hasOwn(e,`barycenter`)),u=l.lhs,d=l.rhs.sort((e,t)=>t.i-e.i),f=[],p=0,m=0,h=0;u.sort(Ar(s,o,!!c));for(let[e,t]of Object.entries(a)){let n=u.findIndex(t=>t.vs[0]===e);u.splice(n+1,0,t)}h=kr(f,d,h),u.forEach(e=>{h+=e.vs.length,f.push(e.vs),p+=e.barycenter*e.weight,m+=e.weight,h=kr(f,d,h)});let g={vs:f.flat(1)};return m&&(g.barycenter=p/m,g.weight=m),g}function kr(e,t,n){let r;for(;t.length&&(r=t[t.length-1]).i<=n;)t.pop(),e.push(r.vs),n++;return n}function Ar(e,t,n){return(r,i)=>{if(r.barycenter<i.barycenter)return-1;if(r.barycenter>i.barycenter)return 1;if(e&&(typeof r.vs[0]==`string`||typeof i.vs[0]==`string`)){let n=un(t,e.node(r.vs[0]),e.node(i.vs[0]));if(n!==0)return n}return n?i.i-r.i:r.i-i.i}}function jr(e,t,n,r,i){var a,o;let s=null,c=i;typeof r==`boolean`?(c=r,s=null):r!==void 0&&(s=r);let l=e.children(t),u=e.node(t),d=u?u.borderLeft:void 0,f=u?u.borderRight:void 0,p={};d&&(l=l.filter(e=>e!==d&&e!==f));let m=wr(e,l);m.forEach(t=>{if(e.children(t.v).length){let{result:r}=jr(e,t.v,n,s,c);p[t.v]=r,Object.hasOwn(r,`barycenter`)&&Nr(t,r)}});let h=Tr(m,n);Mr(h,p);let g={},_=!1;for(let t=0;t<h.length;t++)for(let n=t+1;n<h.length;n++)if(h[t]&&h[n]&&(a=h[t])!=null&&a.barycenter&&(o=h[n])!=null&&o.barycenter&&h[t]?.barycenter===h[n].barycenter){let r=h[t]?.vs[0]??``,i=h[n]?.vs[0]??``,a=e.node(r),o=e.node(i);if(a.dummy===`edge`&&o.dummy===`edge`&&a.edgeObj?.v===o.edgeObj?.v&&a.edgeObj?.w===o.edgeObj?.w){if(a.edgeLabel.reversed){g[i]=h[t],h.splice(t,1),t--;break}g[r]=h[n],h.splice(n,1),n--}else _=!0}let v=Or(h,g,s,e,c);if(d&&f){v.vs=[d,v.vs,f].flat(1);let t=e.predecessors(d);if(t&&t.length){let n=e.node(t[0]),r=e.predecessors(f),i=e.node(r[0]);Object.hasOwn(v,`barycenter`)||(v.barycenter=0,v.weight=0),v.barycenter=(v.barycenter*v.weight+n.order+i.order)/(v.weight+2),v.weight+=2}}return Object.defineProperty(v,"result",{value:v,enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(v,"usedBias",{value:_,enumerable:!1,configurable:!0,writable:!0}),v}function Mr(e,t){e.forEach(e=>{e.vs=e.vs.flatMap(e=>t[e]?t[e].vs:e)})}function Nr(e,t){e.barycenter===void 0?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}function Pr(e,t,n,r){r||=e.nodes();let i=Fr(e),a=new G({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(t=>e.node(t));return r.forEach(r=>{let o=e.node(r),s=e.parent(r);if(o.rank===t||o.minRank<=t&&t<=o.maxRank){a.setNode(r),a.setParent(r,s||i);let c=e[n](r);c&&c.forEach(t=>{let n=t.v===r?t.w:t.v,i=a.edge(n,r),o=i===void 0?0:i.weight;a.setEdge(n,r,{weight:e.edge(t).weight+o})}),Object.hasOwn(o,`minRank`)&&a.setNode(r,{borderLeft:o.borderLeft[t],borderRight:o.borderRight[t]})}}),a}function Fr(e){let t;for(;e.hasNode(t=an(`_root`)););return t}function Ir(e,t,n){let r={},i;n.forEach(n=>{let a=e.parent(n),o,s;for(;a;){if(o=e.parent(a),o?(s=r[o],r[o]=a):(s=i,i=a),s&&s!==a){t.setEdge(s,a);return}a=o}})}function Lr(e,t={},n=null){if(typeof t.customOrder==`function`){t.customOrder(e,Lr);return}let r=$t(e),i=Rr(e,Y(1,r+1),`inEdges`),a=Rr(e,Y(r-1,-1,-1),`outEdges`),o=xr(e,n);if(Br(e,o),t.disableOptimalOrderHeuristic)return;let s=1/0,c,l=t.constraints||[];for(let t=0,r=0;r<4;++t,++r){zr(t%2?i:a,t%4>=2,l,n),o=q(e);let u=Sr(e,o);u<s?(r=0,c=Object.assign({},o),s=u):u===s&&(c=structuredClone(o))}Br(e,c)}function Rr(e,t,n){let r=new Map,i=(e,t)=>{r.has(e)||r.set(e,[]),r.get(e).push(t)};for(let t of e.nodes()){let n=e.node(t);if(typeof n.rank==`number`&&i(n.rank,t),typeof n.minRank==`number`&&typeof n.maxRank==`number`)for(let e=n.minRank;e<=n.maxRank;e++)e!==n.rank&&i(e,t)}return t.map(function(t){return Pr(e,t,n,r.get(t)||[])})}function zr(e,t,n,r){let i=!0,a=new G;e.forEach(function(e){n.forEach(e=>a.setEdge(e.left,e.right));let o=e.graph().root,{result:s,usedBias:c}=jr(e,o,a,r,i);t&&c&&(i=!i),s.vs.forEach((t,n)=>e.node(t).order=n),Ir(e,a,s.vs)})}function Br(e,t){Object.values(t).forEach(t=>t.forEach((t,n)=>e.node(t).order=n))}function Vr(e,t){let n={};function r(t,r){let i=0,a=0,o=t.length,s=r[r.length-1];return r.forEach((t,c)=>{let l=Ur(e,t),u=l?e.node(l).order:o;(l||t===s)&&(r.slice(a,c+1).forEach(t=>{let r=e.predecessors(t);r&&r.forEach(r=>{let a=e.node(r),o=a.order;(o<i||u<o)&&!(a.dummy&&e.node(t).dummy)&&Wr(n,r,t)})}),a=c+1,i=u)}),r}return t.length&&t.reduce(r),n}function Hr(e,t){let n={};function r(t,r,i,a,o){Y(r,i).forEach(r=>{let i=t[r];if(i!==void 0&&e.node(i).dummy){let t=e.predecessors(i);t&&t.forEach(t=>{if(t===void 0)return;let r=e.node(t);r.dummy&&(r.order<a||r.order>o)&&Wr(n,t,i)})}})}function i(t,n){let i=-1,a=-1,o=0;return n.forEach((s,c)=>{if(e.node(s).dummy===`border`){let t=e.predecessors(s);if(t&&t.length){let s=t[0];if(s===void 0)return;a=e.node(s).order,r(n,o,c,i,a),o=c,i=a}}r(n,o,n.length,a,t.length)}),n}return t.length&&t.reduce(i),n}function Ur(e,t){if(e.node(t).dummy){let n=e.predecessors(t);if(n)return n.find(t=>e.node(t).dummy)}}function Wr(e,t,n){if(t>n){let e=t;t=n,n=e}let r=e[t];r||(e[t]=r={}),r[n]=!0}function Gr(e,t,n){if(t>n){let e=t;t=n,n=e}let r=e[t];return r!==void 0&&Object.hasOwn(r,n)}function Kr(e,t,n,r,i){let a={},o={},s={};return t.forEach(e=>{e.forEach((e,t)=>{a[e]=e,o[e]=e,s[e]=t})}),t.forEach(t=>{let c=-1,l=-1,u=!1,d=t,f=t.findIndex(t=>i?.includes(t)||ti(t,e,i));f>0&&(d=[t[f],...t.slice(0,f),...t.slice(f+1)],u=!0),d.forEach(t=>{let d=r(t);if(d&&d.length){i!=null&&i.includes(t)&&(d=d.filter(t=>ti(t,e,i)));let r=d.sort((e,t)=>{let n=s[e],r=s[t];return(n===void 0?0:n)-(r===void 0?0:r)}),f=(r.length-1)/2;for(let e=Math.floor(f),i=Math.ceil(f);e<=i;++e){let i=r[e];if(i===void 0)continue;let d=s[i];if(d!==void 0&&o[t]===t&&c<d&&s[i]!==l&&!Gr(n,t,i)){let e=a[i];e!==void 0&&(o[i]=t,o[t]=a[t]=e,c=d,u&&=(c=-1,l=s[i]??-1,!1))}}}})}),{root:a,align:o}}function qr(e,t,n,r,i=!1){let a={},o=Jr(e,t,n,i),s=i?`borderLeft`:`borderRight`;function c(e,t){let n=o.nodes().slice(),r={},i=n.pop();for(;i;){if(r[i])e(i);else{r[i]=!0,n.push(i);for(let e of t(i))n.push(e)}i=n.pop()}}function l(e){let t=o.inEdges(e);t?a[e]=t.reduce((e,t)=>{let n=a[t.v]??0,r=o.edge(t);return Math.max(e,n+(r===void 0?0:r))},0):a[e]=0}function u(t){let n=o.outEdges(t),r=1/0;n&&(r=n.reduce((e,t)=>{let n=a[t.w],r=o.edge(t);return Math.min(e,(n===void 0?0:n)-(r===void 0?0:r))},1/0));let i=e.node(t);r!==1/0&&i.borderType!==s&&(a[t]=Math.max(a[t]===void 0?0:a[t],r))}function d(e){return o.predecessors(e)||[]}function f(e){return o.successors(e)||[]}return c(l,d),c(u,f),Object.keys(r).forEach(e=>{let t=n[e];t!==void 0&&(a[e]=a[t]??0)}),a}function Jr(e,t,n,r){let i=new G,a=e.graph(),o=$r(a.nodesep,a.edgesep,r);return t.forEach(t=>{let r;t.forEach(t=>{let a=n[t];if(a!==void 0){if(i.setNode(a),r!==void 0){let s=n[r];if(s!==void 0){let n=i.edge(s,a);i.setEdge(s,a,Math.max(o(e,t,r),n||0))}}r=t}})}),i}function Yr(e,t){return Object.values(t).reduce((t,n)=>{let r=-1/0,i=1/0;Object.entries(n).forEach(([t,n])=>{let a=ei(e,t)/2;r=Math.max(n+a,r),i=Math.min(n-a,i)});let a=r-i;return a<t[0]&&(t=[a,n]),t},[1/0,null])[1]}function Xr(e,t){let n=Object.values(t),r=J(Math.min,n),i=J(Math.max,n);[`u`,`d`].forEach(n=>{[`l`,`r`].forEach(a=>{let o=n+a,s=e[o];if(!s||s===t)return;let c=Object.values(s),l=r-J(Math.min,c);a!==`l`&&(l=i-J(Math.max,c)),l&&(e[o]=sn(s,e=>e+l))})})}function Zr(e,t=void 0){let n=e.ul;return n?sn(n,(n,r)=>{if(t){let n=e[t.toLowerCase()];if(n&&n[r]!==void 0)return n[r]}let i=Object.values(e).map(e=>{let t=e[r];return t===void 0?0:t}).sort((e,t)=>e-t);return((i[1]??0)+(i[2]??0))/2}):{}}function Qr(e,t){let n=q(e),r=Object.assign(Vr(e,n),Hr(e,n)),i={},a;return[`u`,`d`].forEach(o=>{a=o===`u`?n:Object.values(n).reverse(),[`l`,`r`].forEach(n=>{n===`r`&&(a=a.map(e=>Object.values(e).reverse()));let s=Kr(e,a,r,t=>(o===`u`?e.predecessors(t):e.successors(t))||[],t),c=qr(e,a,s.root,s.align,n===`r`);n===`r`&&(c=sn(c,e=>-e)),i[o+n]=c})}),Xr(i,Yr(e,i)),Zr(i,e.graph().align)}function $r(e,t,n){return(r,i,a)=>{let o=r.node(i),s=r.node(a),c=0,l;if(c+=o.width/2,Object.hasOwn(o,`labelpos`))switch(o.labelpos.toLowerCase()){case`l`:l=-o.width/2;break;case`r`:l=o.width/2}if(l&&(c+=n?l:-l),l=void 0,c+=(o.dummy?t:e)/2,c+=(s.dummy?t:e)/2,c+=s.width/2,Object.hasOwn(s,`labelpos`))switch(s.labelpos.toLowerCase()){case`l`:l=s.width/2;break;case`r`:l=-s.width/2}return l&&(c+=n?l:-l),c}}function ei(e,t){return e.node(t).width}function ti(e,t,n){if(!n)return!1;let r=t.node(e)?.edgeObj;if(!r||t.node(e).edgeLabel.reversed)return!1;let i=n.indexOf(r?.v),a=n.indexOf(r?.w);return i!==-1&&a!==-1&&i===(a+1)%n.length||i===(a-1)%n.length}function ni(e,t){e=Kt(e),ri(e),Object.entries(Qr(e,t)).forEach(([t,n])=>e.node(t).x=n)}function ri(e){let t=q(e),n=e.graph(),r=n.ranksep,i=n.rankalign,a=0;t.forEach(t=>{let n=t.reduce((t,n)=>{let r=e.node(n).height??0;return t>r?t:r},0);t.forEach(t=>{let r=e.node(t);r.y=i===`top`?a+r.height/2:i===`bottom`?a+n-r.height/2:a+n/2}),a+=n+r})}var ii=new WeakMap;function ai(e,t={}){return si(e,nn,t),e}function oi(e,t,n){let r=t;for(;r!==void 0;){let t=e.parent(r);if(t===n)return r;r=t}}function si(e,t,n){let r=e.nodes().filter(t=>e.children(t).length),i={};r.forEach(r=>{let a=e.node(r);if(a&&a.rankdir){let o=new G({multigraph:!0,compound:!0});o.setGraph({rankdir:a.rankdir});let s=e.children(r);s.forEach(t=>{let n={...e.node(t)};o.setNode(t,n);let i=e.parent(t);i&&i!==r&&s.includes(i)&&o.setParent(t,i)});let c=new Set;e.edges().forEach(t=>{let n=oi(e,t.v,r),i=oi(e,t.w,r);if(n&&i&&n!==i){let r=`${n}\0${i}`;c.has(r)||(c.add(r),o.setEdge(n,i,{...e.edge(t)}))}}),si(o,t,n);let l=vi(o);ci(l,t,n,null),li(o,l);let u=1/0,d=1/0,f=-1/0,p=-1/0;o.nodes().forEach(e=>{if(e===r)return;let t=o.node(e);t&&typeof t.x==`number`&&typeof t.y==`number`&&typeof t.width==`number`&&typeof t.height==`number`&&(u=Math.min(u,t.x-t.width/2),f=Math.max(f,t.x+t.width/2),d=Math.min(d,t.y-t.height/2),p=Math.max(p,t.y+t.height/2))}),(!isFinite(u)||!isFinite(d)||!isFinite(f)||!isFinite(p))&&(u=d=0,f=p=0);let m=f-u,h=p-d;i[r]={minX:u,minY:d,maxX:f,maxY:p,width:m,height:h,offsetX:u,offsetY:d},a._dagreClusterSubgraph=o}});let a=[],o=t=>{let n=[],r=(e.children(t)||[]).filter(e=>e!==t);for(;r.length>0;){let t=r.shift();n.push(t),(e.children(t)||[]).filter(e=>e!==t).forEach(e=>r.push(e))}return n},s=new Map;r.forEach(t=>{let n=e.node(t);n&&n.rankdir&&i[t]&&s.set(t,(e.children(t)||[]).filter(e=>e!==t))});let c=new Set([...s.values()].flat()),l=new Map;s.forEach((e,t)=>{c.has(t)||l.set(t,o(t))});let u=new Set([...l.values()].flat()),d=e=>{for(let[t,n]of l)if(n.includes(e))return t;return e},f=[];e.edges().forEach(t=>{(u.has(t.v)||u.has(t.w))&&f.push({edge:t,label:e.edge(t)})});let p=new Map;u.forEach(t=>{let n=e.parent(t);p.set(t,typeof n==`string`?n:void 0)}),l.forEach((t,n)=>{let r=e.node(n),o=[];t.forEach(t=>{let n=e.node(t);n&&(o.push({id:t,node:n,parent:p.get(t)}),e.removeNode(t))});let s=f.filter(({edge:e})=>t.includes(e.v)||t.includes(e.w)),c=i[n];r&&(a.push({clusterId:n,subgraph:r._dagreClusterSubgraph,bounds:c,children:t,removedNodes:o,removedEdges:s}),r.width=c.width,r.height=c.height)});let m=new Set;f.forEach(({edge:t,label:n})=>{let r=d(t.v),i=d(t.w);if(r!==i&&e.hasNode(r)&&e.hasNode(i)){let t=`${r}\0${i}`;m.has(t)||(m.add(t),e.setEdge(r,i,{...n,width:0,height:0}))}});let h=vi(e),g=ci(h,t,n,ii.get(e)??null);ii.set(e,g),li(e,h),m.forEach(t=>{let n=t.indexOf(`\0`),r=t.slice(0,n),i=t.slice(n+1);e.hasEdge(r,i)&&e.removeEdge(r,i)}),a.forEach(({clusterId:t,subgraph:n,bounds:r,removedNodes:i,removedEdges:a})=>{let o=e.node(t),s=o?.x??0,c=o?.y??0,l=(r.minX+r.maxX)/2,u=(r.minY+r.maxY)/2;i.forEach(({id:t,node:n,parent:r})=>{e.setNode(t,n),r!==void 0&&e.setParent(t,r)}),a.forEach(({edge:t,label:n})=>{e.setEdge(t,n)}),n.nodes().forEach(r=>{if(r===t)return;let i=n.node(r),a=e.node(r);a&&i&&typeof i.x==`number`&&typeof i.y==`number`&&(a.x=s+(i.x-l),a.y=c+(i.y-u))}),delete o._dagreClusterSubgraph}),r.forEach(t=>{let n=e.node(t),r=i[t];if(n&&n.rankdir&&n._dagreClusterSubgraph&&r){let i=n._dagreClusterSubgraph,a=n.x??0,o=n.y??0,s=(r.minX+r.maxX)/2,c=(r.minY+r.maxY)/2;i.nodes().forEach(n=>{if(n===t)return;let r=i.node(n),l=e.node(n);if(l&&r&&typeof r.x==`number`&&typeof r.y==`number`){let e=r.x-s,t=r.y-c;l.x=a+e,l.y=o+t}}),delete n._dagreClusterSubgraph}})}function ci(e,t,n,r=null){var i,a;let o=n?.useDynamic!==!1,s=o&&(i=r?.graph)!=null?i:null,c=o&&(a=r?.rawNodes)!=null?a:null;t(` makeSpaceForEdgeLabels`,()=>yi(e)),t(` removeSelfEdges`,()=>Oi(e)),t(` acyclic`,()=>Cn(e,s)),t(` nestingGraph.run`,()=>ar(e)),t(` rank`,()=>Xn(Kt(e))),t(` injectEdgeLabelProxies`,()=>bi(e)),t(` removeEmptyRanks`,()=>Yt(e)),t(` nestingGraph.cleanup`,()=>lr(e)),t(` normalizeRanks`,()=>Jt(e)),t(` assignRankMinMax`,()=>xi(e)),t(` removeEdgeLabelProxies`,()=>Si(e)),t(` normalize.run`,()=>Dn(e)),t(` parentDummyChains`,()=>tr(e)),t(` addBorderSegments`,()=>ur(e)),t(` order`,()=>Lr(e,n,c)),t(` insertSelfEdges`,()=>ki(e)),t(` adjustCoordinateSystem`,()=>pr(e)),t(` position`,()=>ni(e,n.corePath)),t(` positionSelfEdges`,()=>Ai(e));let l=JSON.parse(JSON.stringify(e._nodes));return t(` removeBorderNodes`,()=>Di(e)),t(` normalize.undo`,()=>kn(e)),t(` fixupEdgeLabelCoords`,()=>Ti(e)),t(` undoCoordinateSystem`,()=>mr(e)),t(` translateGraph`,()=>Ci(e)),t(` assignNodeIntersects`,()=>wi(e)),t(` reversePoints`,()=>Ei(e)),t(` acyclic.undo`,()=>Tn(e)),{graph:e,rawNodes:l}}function li(e,t){e.nodes().forEach(n=>{let r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,r.order=i.order,r.rank=i.rank,t.children(n).length&&(r.width=i.width,r.height=i.height))}),e.edges().forEach(n=>{let r=e.edge(n),i=t.edge(n);r.points=i.points,Object.hasOwn(i,`x`)&&(r.x=i.x,r.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var ui=[`nodesep`,`edgesep`,`ranksep`,`marginx`,`marginy`],di={ranksep:50,edgesep:20,nodesep:50,rankdir:`TB`,rankalign:`center`},fi=[`acyclicer`,`ranker`,`rankdir`,`align`,`rankalign`],pi=[`width`,`height`,`rank`],mi={width:0,height:0},hi=[`minlen`,`weight`,`width`,`height`,`labeloffset`],gi={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:`r`},_i=[`labelpos`];function vi(e){let t=new G({multigraph:!0,compound:!0}),n=Mi(e.graph());return t.setGraph(Object.assign({},di,ji(n,ui),on(n,fi))),e.nodes().forEach(n=>{let r=ji(Mi(e.node(n)),pi);Object.keys(mi).forEach(e=>{r[e]===void 0&&(r[e]=mi[e])}),t.setNode(n,r);let i=e.parent(n);i!==void 0&&t.setParent(n,i)}),e.edges().forEach(n=>{let r=Mi(e.edge(n));t.setEdge(n,Object.assign({},gi,ji(r,hi),on(r,_i)))}),t}function yi(e){let t=e.graph();t.ranksep/=2,e.edges().forEach(n=>{let r=e.edge(n);r.minlen*=2,(r.labelpos??`r`).toLowerCase()!==`c`&&(t.rankdir===`TB`||t.rankdir===`BT`?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function bi(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.width&&n.height){let n=e.node(t.v);K(e,`edge-proxy`,{rank:(e.node(t.w).rank-n.rank)/2+n.rank,e:t},`_ep`)}})}function xi(e){let t=0;e.nodes().forEach(n=>{let r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=Math.max(t,r.maxRank))}),e.graph().maxRank=t}function Si(e){e.nodes().forEach(t=>{let n=e.node(t);if(n.dummy===`edge-proxy`){let r=n;e.edge(r.e).labelRank=n.rank,e.removeNode(t)}})}function Ci(e){let t=1/0,n=0,r=1/0,i=0,a=e.graph(),o=a.marginx||0,s=a.marginy||0;function c(e){let a=e.x,o=e.y,s=e.width,c=e.height;t=Math.min(t,a-s/2),n=Math.max(n,a+s/2),r=Math.min(r,o-c/2),i=Math.max(i,o+c/2)}e.nodes().forEach(t=>c(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);Object.hasOwn(n,`x`)&&c(n)}),t-=o,r-=s,e.nodes().forEach(n=>{let i=e.node(n);i.x-=t,i.y-=r}),e.edges().forEach(n=>{let i=e.edge(n);i.points.forEach(e=>{e.x-=t,e.y-=r}),Object.hasOwn(i,`x`)&&(i.x-=t),Object.hasOwn(i,`y`)&&(i.y-=r)}),a.width=n-t+o,a.height=i-r+s}function wi(e){e.edges().forEach(t=>{if(t.v===t.w)return;let n=e.edge(t),r=e.node(t.v),i=e.node(t.w),a,o;n.points?(a=n.points[0],o=n.points[n.points.length-1]):(n.points=[],a=i,o=r),n.points.unshift(qt(r,a)),n.points.push(qt(i,o))})}function Ti(e){e.edges().forEach(t=>{let n=e.edge(t);if(Object.hasOwn(n,`x`))switch((n.labelpos===`l`||n.labelpos===`r`)&&(n.width-=n.labeloffset),n.labelpos){case`l`:n.x-=n.width/2+n.labeloffset;break;case`r`:n.x+=n.width/2+n.labeloffset}})}function Ei(e){e.edges().forEach(t=>{let n=e.edge(t);n.reversed&&n.points.reverse()})}function Di(e){e.nodes().forEach(t=>{if(e.children(t).length){let n=e.node(t),r=e.node(n.borderTop),i=e.node(n.borderBottom),a=e.node(n.borderLeft[n.borderLeft.length-1]),o=e.node(n.borderRight[n.borderRight.length-1]);n.width=Math.abs(o.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}}),e.nodes().forEach(t=>{e.node(t).dummy===`border`&&e.removeNode(t)})}function Oi(e){e.edges().forEach(t=>{if(t.v===t.w){let n=e.node(t.v);n.selfEdges||=[],n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function ki(e){q(e).forEach(t=>{let n=0;t.forEach((t,r)=>{let i=e.node(t);typeof i.rank!=`number`&&(i.rank=0),i.order=r+n,(i.selfEdges||[]).forEach(t=>{K(e,`selfedge`,{width:t.label.width,height:t.label.height,rank:i.rank,order:r+ ++n,e:t.e,edgeLabel:t.label},`_se`),(!Array.isArray(t.label.points)||t.label.points.length!==7)&&(t.label.points=[{x:0,y:-10},{x:0,y:-10},{x:0,y:0},{x:0,y:10},{x:0,y:10},{x:0,y:0},{x:0,y:0}])}),delete i.selfEdges})})}function Ai(e){e.nodes().forEach(t=>{let n=e.node(t),r=e=>typeof e==`number`&&isFinite(e);if(n.dummy===`selfedge`){let i=n,a=e.node(i.e.v),o=r(a?.x)?a.x:0,s=r(a?.y)?a.y:0,c=r(a?.width)?a.width:0,l=r(a?.height)?a.height:0,u=r(n.x)?n.x:o,d=r(n.y)?n.y:s,f=c/2,p=l/2;i.edgeLabel.points=[{x:u+f,y:d-p},{x:u+f,y:d-p},{x:u,y:d},{x:u-f,y:d+p},{x:u-f,y:d+p},{x:u,y:d},{x:u,y:d}],i.edgeLabel.x=u,i.edgeLabel.y=d,e.setEdge(i.e,i.edgeLabel),e.removeNode(t)}else n&&Array.isArray(n.selfEdges)&&n.selfEdges.forEach(e=>{if(!Array.isArray(e.label.points)||e.label.points.length!==7){let t=r(n.x)?n.x:0,i=r(n.y)?n.y:0,a=r(n.width)?n.width:0,o=r(n.height)?n.height:0,s=a/2,c=o/2;e.label.points=[{x:t+s,y:i-c},{x:t+s,y:i-c},{x:t,y:i},{x:t-s,y:i+c},{x:t-s,y:i+c},{x:t,y:i},{x:t,y:i}]}})})}function ji(e,t){return sn(on(e,t),Number)}function Mi(e){let t={};return e&&Object.entries(e).forEach(([e,n])=>{typeof e==`string`&&(e=e.toLowerCase()),t[e]=n}),t}function Ni(e){let t=q(e),n=new G({compound:!0,multigraph:!0}).setGraph({});return e.nodes().forEach(t=>{n.setNode(t,{label:t}),n.setParent(t,`layer`+e.node(t).rank)}),e.edges().forEach(e=>n.setEdge(e.v,e.w,{},e.name)),t.forEach((e,t)=>{let r=`layer`+t;n.setNode(r,{rank:`same`}),e.reduce((e,t)=>(n.setEdge(e,t,{style:`invis`}),t))}),n}var Pi={graphlib:st,version:dn,layout:ai,debug:Ni,util:{time:tn,notime:nn}};function Fi(e,t){let n=t.steps.map(e=>e.type===`agent`?`${e.id}:${e.model??``}:${e.tools.join(`+`)}:${e.output.format}`:e.type===`generate`?`${e.id}:${e.asset}:${e.model??``}:${e.options?.duration??``}`:e.id).join(`|`);return r({queryKey:[`estimate`,e,n],queryFn:()=>u.get(`/api/studio/wizards/${e}/estimate`),staleTime:3e4,refetchOnMount:`always`})}var Ii=e=>e<10?e.toLocaleString(void 0,{maximumFractionDigits:1}):Math.round(e).toLocaleString();function Li({estimate:e,stepId:t}){let n=e?.available?e.steps[t]:void 0;return n?(0,U.jsxs)(`p`,{className:`text-[12px] text-ink-3 tabular-nums`,children:[B(`estimate.step`,{n:Ii(n.credits),high:Ii(n.high)}),` · `,n.measured?B(`estimate.measured`):B(`estimate.formula`)]}):null}function Ri({model:e,effort:t,onChange:n}){let r=B(`class.effortAuto`);return(0,U.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,U.jsx)(A,{children:B(`class.label`)}),(0,U.jsx)(z,{value:e??`high`,onChange:e=>n({model:e,effort:t}),options:he.map(e=>({value:e,label:B(`class.${e}`)}))}),(0,U.jsx)(`p`,{className:`text-[12px] text-ink-3`,children:B(`class.${e??`high`}.hint`)}),(0,U.jsx)(A,{children:B(`class.effort`)}),(0,U.jsx)(M,{value:t?B(`class.effort.${t}`):r,options:[r,...T.map(e=>B(`class.effort.${e}`))],onChange:t=>n({model:e,effort:T.find(e=>B(`class.effort.${e}`)===t)})})]})}var zi=280,Bi=92;function Vi({data:e}){let{step:t,selected:n,issue:r,active:i,pulse:a,cost:o}=e,s=S(t);return(0,U.jsxs)(`div`,{className:j(`relative w-[280px] cursor-pointer rounded-xl bg-card px-4 py-3 text-left shadow-soft ring-1 transition`,n?`shadow-elevated ring-2 ring-ember`:i?`ring-2 ring-moss`:a?`ring-2 ring-ember/60`:`ring-border-soft hover:shadow-elevated`),children:[i?(0,U.jsx)(`span`,{className:`-top-1 -right-1 absolute size-3 animate-breathe rounded-full bg-moss`}):a?(0,U.jsx)(`span`,{className:`-top-1 -right-1 absolute size-3 animate-breathe rounded-full bg-ember`}):null,(0,U.jsx)(je,{type:`target`,position:Oe.Top}),(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(`span`,{className:j(`inline-flex size-6 items-center justify-center rounded-md`,re[t.type]),children:(0,U.jsx)(s,{className:`size-3.5`})}),(0,U.jsx)(`span`,{className:`font-medium text-[11px] text-ink-3 uppercase tracking-[0.07em]`,children:x(t)}),r?(0,U.jsx)(ze,{className:`ml-auto size-4 text-rose`}):o===null?null:(0,U.jsxs)(`span`,{className:`ml-auto text-[11px] text-ink-3 tabular-nums`,children:[`≈`,` `,o<10?o.toLocaleString(void 0,{maximumFractionDigits:1}):Math.round(o),` `,`cr`]})]}),(0,U.jsx)(`div`,{className:`mt-1.5 truncate font-display font-semibold text-[15px] text-ink`,children:t.title}),(0,U.jsx)(`div`,{className:`truncate text-[12px] text-ink-3`,children:te(t)||`\xA0`}),(0,U.jsx)(je,{type:`source`,position:Oe.Bottom})]})}function Hi({data:e}){return(0,U.jsxs)(`div`,{className:j(`flex w-[280px] cursor-pointer items-center gap-3 rounded-full bg-paper-2 py-1.5 pr-5 pl-2 transition`,e.selected?`ring-2 ring-ember`:`hover:bg-paper-3`),children:[(0,U.jsx)(c,{kind:e.avatar,size:40,interactive:!1}),(0,U.jsx)(`span`,{className:`truncate font-display font-semibold text-[15px]`,children:e.title}),(0,U.jsx)(je,{type:`source`,position:Oe.Bottom})]})}var Ui={step:Vi,start:Hi},Wi={};function Gi(e){let t=Array.isArray(e.when.value)?e.when.value.join(` / `):String(e.when.value??``);switch(e.when.op){case`equals`:return`${e.when.field} = ${t}`;case`notEquals`:return`${e.when.field} ≠ ${t}`;case`in`:return`${e.when.field} ∈ ${t}`;case`notEmpty`:return B(`editor.whenFilled`,{field:e.when.field});case`empty`:return B(`editor.whenEmpty`,{field:e.when.field})}}function Ki(e,t,n,r,i,a){let o=new Pi.graphlib.Graph;o.setGraph({rankdir:`TB`,nodesep:48,ranksep:46,marginx:20,marginy:20}),o.setDefaultEdgeLabel(()=>({})),o.setNode(`__start`,{width:zi,height:52});for(let t of e.steps)o.setNode(t.id,{width:zi,height:Bi});let s=[],c={markerEnd:{type:Me.ArrowClosed,width:14,height:14,color:`var(--ink-4)`}};return e.steps[0]&&(o.setEdge(`__start`,e.steps[0].id),s.push({id:`e-start`,source:`__start`,target:e.steps[0].id,...c})),e.steps.forEach((t,n)=>{let r=e.steps[n+1];for(let[n,r]of(t.next??[]).entries())r.goto!==`end`&&e.steps.some(e=>e.id===r.goto)&&(o.setEdge(t.id,r.goto),s.push({id:`b-${t.id}-${n}`,source:t.id,target:r.goto,label:Gi(r),labelStyle:{fontSize:11,fill:`var(--ink-2)`},labelBgStyle:{fill:`var(--paper-2)`},labelBgPadding:[6,3],labelBgBorderRadius:8,style:{strokeDasharray:`5 4`},...c}));r&&t.type!==`result`&&(o.setEdge(t.id,r.id),s.push({id:`n-${t.id}`,source:t.id,target:r.id,...t.next?.length?{label:B(`editor.otherwise`),labelStyle:{fontSize:11,fill:`var(--ink-3)`},labelBgStyle:{fill:`var(--background)`}}:{},...c}))}),Pi.layout(o),{nodes:[{id:`__start`,type:`start`,position:{x:o.node(`__start`).x-zi/2,y:o.node(`__start`).y-26},data:{title:e.title,avatar:e.avatar,selected:t===`__wizard`},draggable:!1},...e.steps.map((e,s)=>{let c=o.node(e.id);return{id:e.id,type:`step`,position:{x:c.x-zi/2,y:c.y-Bi/2},data:{step:e,selected:t===e.id,issue:n.has(e.id),index:s,active:r===e.id,pulse:i.includes(e.id),cost:a[e.id]?.credits??null},draggable:!1}})],edges:s}}function qi(){let e=Ae(),t=`inline-flex size-8 items-center justify-center rounded-full text-ink-3 hover:bg-accent hover:text-ink`;return(0,U.jsxs)(`div`,{className:`absolute bottom-4 left-4 z-10 flex items-center gap-0.5 rounded-full bg-card p-1 shadow-soft ring-1 ring-border-soft`,children:[(0,U.jsx)(`button`,{type:`button`,className:t,onClick:()=>e.zoomOut(),"aria-label":`Zoom out`,children:(0,U.jsx)(Ye,{className:`size-4`})}),(0,U.jsx)(`button`,{type:`button`,className:t,onClick:()=>e.fitView({padding:.2,duration:300}),"aria-label":`Fit`,children:(0,U.jsx)($e,{className:`size-4`})}),(0,U.jsx)(`button`,{type:`button`,className:t,onClick:()=>e.zoomIn(),"aria-label":`Zoom in`,children:(0,U.jsx)(C,{className:`size-4`})})]})}var Ji=.8;function Yi({def:e,selected:t,onSelect:n,issueSteps:r,activeStep:i,pulse:a,wizardId:o}){let s=Fi(o,e),c=s.data?.available?s.data.steps:Wi,{nodes:l,edges:u}=(0,H.useMemo)(()=>Ki(e,t,r,i,a??[],c),[e,t,r,i,a,c]),d=Ae(),f=(0,H.useRef)(null),p=e.steps.map(e=>e.id).join(`|`);return(0,H.useEffect)(()=>{let e=requestAnimationFrame(()=>{let e=f.current;if(!e||!l.length)return;let t=l.map(e=>e.position.x),n=l.map(e=>e.position.y),r={x:Math.min(...t),y:Math.min(...n),width:Math.max(...t)+zi-Math.min(...t),height:Math.max(...n)+Bi-Math.min(...n)},i=Math.min(e.clientWidth/(r.width*1.2),e.clientHeight/(r.height*1.15),1),a=Math.max(i,Ji),o=(e.clientWidth-r.width*a)/2-r.x*a,s=i>=Ji?(e.clientHeight-r.height*a)/2-r.y*a:24-r.y*a;d.setViewport({x:o,y:s,zoom:a},{duration:400})});return()=>cancelAnimationFrame(e)},[p,d]),(0,U.jsx)(`div`,{ref:f,className:`h-full w-full`,children:(0,U.jsx)(De,{nodes:l,edges:u,nodeTypes:Ui,onNodeClick:(e,t)=>n(t.id===`__start`?`__wizard`:t.id),onPaneClick:()=>n(null),nodesConnectable:!1,nodesDraggable:!1,elementsSelectable:!1,panOnScroll:!0,zoomOnScroll:!1,zoomOnPinch:!0,minZoom:.3,maxZoom:1.4,proOptions:{hideAttribution:!0},children:(0,U.jsx)(qi,{})})})}function Xi(e){return(0,U.jsx)(ke,{children:(0,U.jsx)(Yi,{...e})})}var Zi={text:`Kurzer Text`,textarea:`Langer Text`,number:`Zahl`,select:`Auswahl`,multiselect:`Mehrfachauswahl`,date:`Datum`,email:`E-Mail`,url:`Link`,toggle:`Ja/Nein`,color:`Farbe`,image:`Bild-Upload`,file:`Datei-Upload`,items:`Positionen (Tabelle)`,connection:`Konto verbinden`,list:`Gespeicherte Liste`,location:`Standort`,audio:`Sprachnotiz`,signature:`Unterschrift`};function Qi(e,t){let n=t===`image`||t===`file`;return{...e,kind:t,multiple:n?e.multiple:void 0,camera:t===`file`?e.camera:void 0,video:t===`file`?e.video:void 0,scan:t===`text`?e.scan:void 0}}function Q({title:e,children:t}){return(0,U.jsxs)(`div`,{className:`border-border-soft border-t px-5 py-5 first:border-t-0`,children:[e?(0,U.jsx)(`h4`,{className:`mb-3 font-medium text-[12px] text-ink-3 uppercase tracking-[0.07em]`,children:e}):null,(0,U.jsx)(`div`,{className:`flex flex-col gap-4`,children:t})]})}function $i(e,t){let n=new Set([...e.steps.map(e=>e.id),...e.steps.flatMap(e=>e.type===`page`?e.fields.map(e=>e.id):[])]),r=1,i=t;for(;n.has(i);)r+=1,i=`${t}${r}`;return i}function ea({def:e,field:t,onChange:n,onRemove:r,onMove:i}){let[a,o]=(0,H.useState)(!1);return(0,U.jsxs)(`div`,{className:`rounded-lg bg-paper ring-1 ring-border-soft`,children:[(0,U.jsxs)(`button`,{type:`button`,onClick:()=>o(e=>!e),className:`flex w-full items-center gap-2 px-3 py-2.5 text-left`,children:[(0,U.jsxs)(`span`,{className:`min-w-0 flex-1 truncate text-[14px]`,children:[t.label,t.required?(0,U.jsx)(`span`,{className:`ml-1 text-ember`,children:`*`}):null]}),(0,U.jsx)(`span`,{className:`text-[12px] text-ink-4`,children:Zi[t.kind]}),(0,U.jsx)(ae,{className:j(`size-4 text-ink-4 transition`,a&&`rotate-180`)})]}),a?(0,U.jsxs)(`div`,{className:`flex flex-col gap-3 border-border-soft border-t px-3 py-3`,children:[(0,U.jsx)(L,{value:t.label,onChange:e=>n({...t,label:e.target.value})}),(0,U.jsx)(z,{value:t.kind,onChange:e=>n(Qi(t,e)),options:pe.filter(e=>e!==`items`||t.kind===`items`).map(e=>({value:e,label:Zi[e]}))}),t.kind===`select`||t.kind===`multiselect`?(0,U.jsx)(L,{placeholder:`Option A, Option B, Option C`,value:(t.options??[]).join(`, `),onChange:e=>n({...t,options:e.target.value.split(`,`).map(e=>e.trim()).filter(Boolean)})}):null,t.kind===`connection`?(0,U.jsx)(z,{value:t.connection??``,placeholder:`Welches Konto?`,onChange:e=>n({...t,connection:e}),options:(e.connections??[]).map(e=>({value:e.id,label:e.title??e.id}))}):null,t.kind===`list`?(0,U.jsx)(z,{value:t.list??``,placeholder:`Welche Liste?`,onChange:e=>n({...t,list:e}),options:(e.lists??[]).map(e=>({value:e.id,label:e.title}))}):null,t.kind===`image`||t.kind===`file`?(0,U.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,U.jsx)(`span`,{className:`text-[13px] text-ink-2`,children:`Mehrere Dateien`}),(0,U.jsx)(F,{checked:!!t.multiple,onChange:e=>n({...t,multiple:e||void 0,...e?{}:{min:void 0,max:void 0}})})]}):null,(t.kind===`image`||t.kind===`file`)&&t.multiple?(0,U.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,U.jsx)(`span`,{className:`text-[13px] text-ink-2`,children:`Wie viele?`}),(0,U.jsx)(`div`,{className:`flex items-center gap-1.5`,children:[`min`,`max`].map(e=>(0,U.jsx)(L,{type:`number`,min:1,max:30,"aria-label":e===`min`?`Mindestens`:`Höchstens`,placeholder:e===`min`?`min.`:`max.`,value:t[e]??``,onChange:r=>{let i=Math.round(Number(r.target.value));n({...t,[e]:r.target.value&&i>=1?Math.min(i,30):void 0})},className:`h-8 w-16 text-right`},e))})]}):null,t.kind===`file`?(0,U.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,U.jsx)(`span`,{className:`text-[13px] text-ink-2`,children:`Auch mit der Kamera aufnehmen`}),(0,U.jsx)(F,{checked:!!t.camera,onChange:e=>n({...t,camera:e||void 0})})]}):null,t.kind===`file`?(0,U.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,U.jsx)(`span`,{className:`text-[13px] text-ink-2`,children:`Kamera nimmt auch kurze Videos auf`}),(0,U.jsx)(F,{checked:!!t.video,onChange:e=>n({...t,video:e||void 0})})]}):null,t.kind===`text`?(0,U.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,U.jsx)(`span`,{className:`text-[13px] text-ink-2`,children:`QR- oder Barcode scannen`}),(0,U.jsx)(F,{checked:!!t.scan,onChange:e=>n({...t,scan:e||void 0})})]}):null,[`text`,`textarea`,`number`,`email`,`url`,`location`].includes(t.kind)?(0,U.jsx)(L,{placeholder:`Platzhalter`,value:t.placeholder??``,onChange:e=>n({...t,placeholder:e.target.value||void 0})}):null,(0,U.jsx)(L,{placeholder:`Hilfetext`,value:t.help??``,onChange:e=>n({...t,help:e.target.value||void 0})}),(0,U.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,U.jsx)(`span`,{className:`text-[13px] text-ink-2`,children:B(`run.required`)}),(0,U.jsx)(F,{checked:!!t.required,onChange:e=>n({...t,required:e})})]}),(0,U.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,U.jsx)(`span`,{className:`font-mono text-[11px] text-ink-4`,children:`{{${t.id}}}`}),(0,U.jsxs)(`div`,{className:`flex`,children:[(0,U.jsx)(P,{label:B(`editor.moveUp`),onClick:()=>i(-1),className:`size-8`,children:(0,U.jsx)(v,{className:`size-3.5`})}),(0,U.jsx)(P,{label:B(`editor.moveDown`),onClick:()=>i(1),className:`size-8`,children:(0,U.jsx)(h,{className:`size-3.5`})}),(0,U.jsx)(P,{label:`Entfernen`,onClick:r,className:`size-8 hover:text-rose`,children:(0,U.jsx)(y,{className:`size-3.5`})})]})]})]}):null]})}var ta=[{label:`16:9`,width:1280,height:720},{label:`1:1`,width:1080,height:1080},{label:`4:5`,width:1080,height:1350},{label:`9:16`,width:1080,height:1920}];function na(e,t){let n=[];for(let r of e.steps.slice(0,t))r.type===`page`?n.push(...r.fields.map(e=>e.id)):r.type===`agent`?n.push(`steps.${r.id}`,...(r.output.fields??[]).map(e=>`steps.${r.id}.${e.id}`)):(r.type===`generate`||r.type===`widget`)&&n.push(`steps.${r.id}`);return[...n,`brand.name`,`today`]}function ra({def:e,step:t,set:n,files:r,wizardId:i}){let a=r.filter(e=>e.mime===`text/html`),o=r.filter(e=>e.mime===`application/json`),c=t.size??ta[0],l=na(e,e.steps.indexOf(t)),u=Object.entries(t.data),d=e=>n({...t,data:Object.fromEntries(e)}),f=[r.find(e=>e.path===t.entry)?.hash.slice(0,8),r.find(e=>e.path===t.sample)?.hash.slice(0,8),c.width,c.height].join(`-`),p=r.some(e=>e.path===t.entry);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Q,{title:`Vorschau mit Beispieldaten`,children:p?(0,U.jsx)(b,{src:s(`/api/studio/wizards/${i}/widgets/${t.id}/preview?v=${f}`),page:c.width,height:c.height,fit:!0}):(0,U.jsx)(`p`,{className:`text-[13px] text-ink-3`,children:`Das Widget ist noch nicht gebaut. Bitte im Gespräch darum – oder lade eine HTML-Datei unter „Dateien“ hoch.`})}),(0,U.jsxs)(Q,{title:`Widget`,children:[(0,U.jsx)(A,{children:`HTML-Datei`}),(0,U.jsx)(z,{value:t.entry,onChange:e=>n({...t,entry:e}),options:(a.some(e=>e.path===t.entry)?a:[{path:t.entry},...a]).map(e=>({value:e.path,label:e.path}))}),(0,U.jsx)(A,{children:`Beispieldaten`}),(0,U.jsx)(z,{value:t.sample??``,onChange:e=>n({...t,sample:e||void 0}),options:[{value:``,label:`keine`},...o.map(e=>({value:e.path,label:e.path}))]}),(0,U.jsx)(A,{children:`Größe`}),(0,U.jsx)(M,{value:ta.find(e=>e.width===c.width&&e.height===c.height)?.label??``,options:ta.map(e=>e.label),onChange:e=>{let r=ta.find(t=>t.label===e);r&&n({...t,size:{width:r.width,height:r.height}})}})]}),(0,U.jsxs)(Q,{title:`Daten für das Widget`,children:[(0,U.jsx)(`datalist`,{id:`sources-${t.id}`,children:l.map(e=>(0,U.jsx)(`option`,{value:e},e))}),u.map(([e,n],r)=>(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(L,{value:e,className:`w-28 font-mono text-[12px]`,onChange:e=>d(u.map((t,n)=>n===r?[e.target.value,t[1]]:t))}),(0,U.jsx)(`span`,{className:`text-ink-4`,children:`←`}),(0,U.jsx)(L,{value:n,list:`sources-${t.id}`,className:`flex-1 font-mono text-[12px]`,onChange:e=>d(u.map((t,n)=>n===r?[t[0],e.target.value]:t))}),(0,U.jsx)(P,{label:B(`editor.deleteStep`),onClick:()=>d(u.filter((e,t)=>t!==r)),children:(0,U.jsx)(y,{className:`size-4`})})]},r)),(0,U.jsxs)(`button`,{type:`button`,onClick:()=>d([...u,[`wert${u.length+1}`,l[0]??`today`]]),className:`inline-flex h-8 items-center gap-1 self-start rounded-full px-2.5 text-[12px] text-ink-2 hover:bg-accent`,children:[(0,U.jsx)(C,{className:`size-3.5`}),` Wert`]})]})]})}function ia({def:e,step:t,set:n,mcpServers:r,files:i,wizardId:a}){let o=e.steps.indexOf(t),s=e.steps.slice(0,o).filter(e=>e.type===`agent`||e.type===`generate`||e.type===`widget`);switch(t.type){case`widget`:return(0,U.jsx)(ra,{def:e,step:t,set:n,files:i,wizardId:a});case`page`:return(0,U.jsxs)(Q,{title:`Fragen`,children:[(0,U.jsx)(`div`,{className:`flex flex-col gap-2`,children:t.fields.map((r,i)=>(0,U.jsx)(ea,{def:e,field:r,onChange:e=>n({...t,fields:t.fields.map((t,n)=>n===i?e:t)}),onRemove:()=>t.fields.length>1&&n({...t,fields:t.fields.filter((e,t)=>t!==i)}),onMove:e=>{let r=i+e;if(r<0||r>=t.fields.length)return;let a=[...t.fields];[a[i],a[r]]=[a[r],a[i]],n({...t,fields:a})}},r.id))}),(0,U.jsxs)(`button`,{type:`button`,onClick:()=>n({...t,fields:[...t.fields,{id:$i(e,`frage`),label:`Neue Frage`,kind:`text`}]}),className:`inline-flex h-9 items-center gap-1.5 self-start rounded-full px-3 text-[13px] text-ink-2 hover:bg-accent`,children:[(0,U.jsx)(C,{className:`size-4`}),` Frage hinzufügen`]})]});case`agent`:return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(Q,{title:`Auftrag`,children:[(0,U.jsx)(N,{value:t.instructions,minRows:6,maxRows:20,onChange:e=>n({...t,instructions:e.target.value}),className:`text-[14px]`}),(0,U.jsxs)(`p`,{className:`text-[12px] text-ink-4`,children:[`Antworten einsetzen mit `,(0,U.jsx)(`code`,{className:`font-mono`,children:`{{feld}}`}),`, frühere Ergebnisse mit `,(0,U.jsx)(`code`,{className:`font-mono`,children:`{{steps.id}}`}),`.`]})]}),(0,U.jsxs)(Q,{title:`Werkzeuge`,children:[(0,U.jsx)(M,{multi:!0,value:t.tools,options:[...D],onChange:e=>n({...t,tools:e})}),(0,U.jsx)(`div`,{className:`-mt-2 flex flex-wrap gap-x-3 text-[12px] text-ink-4`,children:D.map(e=>(0,U.jsxs)(`span`,{children:[e,` = `,ee(e)]},e))}),e.connections?.length?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(A,{hint:`Konten, die die Person im Durchlauf verbindet. Der Schritt liest darin, er schreibt nie.`,children:`Konten der Person`}),(0,U.jsx)(M,{multi:!0,value:t.connections??[],options:e.connections.map(e=>e.id),onChange:e=>n({...t,connections:e.length?e:void 0})})]}):null,r.length?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(A,{hint:`Nur freigegebene Systeme sind in diesem Schritt erreichbar.`,children:`Verbundene Systeme`}),(0,U.jsx)(M,{multi:!0,value:t.mcp??[],options:r.map(e=>e.id),onChange:e=>n({...t,mcp:e.length?e:void 0})})]}):null]}),(0,U.jsxs)(Q,{title:`Ergebnis`,children:[(0,U.jsx)(M,{value:t.output.format,options:[`text`,`markdown`,`json`],onChange:e=>n({...t,output:{...t.output,format:e}})}),(0,U.jsx)(Ri,{model:t.model,effort:t.effort,onChange:e=>n({...t,...e})}),(0,U.jsx)(L,{placeholder:`Text während der Arbeit, z. B. „Recherchiert …“`,value:t.working??``,onChange:e=>n({...t,working:e.target.value||void 0})})]})]});case`generate`:return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(Q,{title:`Was wird erzeugt?`,children:[(0,U.jsx)(M,{value:t.asset,options:[`image`,`video`,`voice`,`document`,`dashboard`],onChange:e=>n({...t,asset:e})}),(0,U.jsx)(N,{value:t.prompt,minRows:5,maxRows:18,onChange:e=>n({...t,prompt:e.target.value}),className:`text-[14px]`})]}),(0,U.jsxs)(Q,{title:`Optionen`,children:[t.asset===`document`||t.asset===`dashboard`?(0,U.jsx)(Ri,{model:t.model,effort:t.effort,onChange:e=>n({...t,...e})}):null,t.asset===`image`||t.asset===`video`?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(A,{children:`Format`}),(0,U.jsx)(M,{value:t.options?.aspectRatio??``,options:[...O],onChange:e=>n({...t,options:{...t.options,aspectRatio:e}})}),(0,U.jsx)(L,{placeholder:`Stil, z. B. „helle Fotografie, minimalistisch“`,value:t.options?.style??``,onChange:e=>n({...t,options:{...t.options,style:e.target.value||void 0}})})]}):null,t.asset===`video`?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(A,{children:`Länge (Sekunden)`}),(0,U.jsx)(M,{value:String(t.options?.duration??8),options:[`4`,`6`,`8`,`10`],onChange:e=>n({...t,options:{...t.options,duration:Number(e)}})}),(0,U.jsx)(A,{children:`Auflösung`}),(0,U.jsx)(M,{value:t.options?.resolution??`720p`,options:[...fe],onChange:e=>n({...t,options:{...t.options,resolution:e}})})]}):null,t.asset===`document`?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(A,{children:`Vorlage`}),(0,U.jsx)(z,{value:t.options?.template??`free`,onChange:e=>n({...t,options:{...t.options,template:e}}),options:[`free`,`invoice`,`offer`,`briefing`,`letter`,`report`].map(e=>({value:e,label:e}))})]}):null]})]});case`review`:return(0,U.jsxs)(Q,{title:`Was wird gezeigt?`,children:[(0,U.jsx)(M,{multi:!0,value:t.show,options:s.map(e=>e.id),onChange:e=>e.length&&n({...t,show:e})}),(0,U.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,U.jsx)(`span`,{className:`text-[13px] text-ink-2`,children:`Text direkt bearbeitbar`}),(0,U.jsx)(F,{checked:!!t.edit,onChange:e=>n({...t,edit:e})})]}),(0,U.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,U.jsx)(`span`,{className:`text-[13px] text-ink-2`,children:`Neue Variante anfordern`}),(0,U.jsx)(F,{checked:!!t.regenerate,onChange:e=>n({...t,regenerate:e})})]})]});case`result`:return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Q,{title:`Abschluss`,children:(0,U.jsx)(N,{minRows:2,placeholder:`Nachricht am Ende`,value:t.message??``,onChange:e=>n({...t,message:e.target.value||void 0})})}),(0,U.jsx)(Q,{title:`Downloads`,children:s.map(e=>{let r=t.deliverables.find(t=>t.from===e.id),i=me(e);return(0,U.jsxs)(`div`,{className:`rounded-lg bg-paper p-3 ring-1 ring-border-soft`,children:[(0,U.jsxs)(`div`,{className:`mb-2 flex items-center justify-between`,children:[(0,U.jsx)(`span`,{className:`truncate text-[14px]`,children:e.title}),(0,U.jsx)(F,{checked:!!r,onChange:r=>n({...t,deliverables:r?[...t.deliverables,{from:e.id,label:e.title,formats:[i[0]]}]:t.deliverables.filter(t=>t.from!==e.id)})})]}),r?(0,U.jsx)(M,{multi:!0,value:r.formats,options:i,onChange:r=>r.length&&n({...t,deliverables:t.deliverables.map(t=>t.from===e.id?{...t,formats:r}:t)})}):null]},e.id)})})]})}}function aa({def:e,update:t}){return(0,U.jsxs)(`div`,{children:[(0,U.jsxs)(Q,{children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(A,{children:`Titel`}),(0,U.jsx)(L,{value:e.title,onChange:n=>t({...e,title:n.target.value})})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(A,{children:`Beschreibung`}),(0,U.jsx)(N,{minRows:2,value:e.description,onChange:n=>t({...e,description:n.target.value})})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(A,{hint:`Steht über der ersten Seite.`,children:`Begrüßung`}),(0,U.jsx)(N,{minRows:2,value:e.intro??``,onChange:n=>t({...e,intro:n.target.value||void 0})})]})]}),(0,U.jsx)(Q,{title:`Avatar`,children:(0,U.jsx)(`div`,{className:`grid grid-cols-5 gap-2`,children:E.map(n=>(0,U.jsx)(`button`,{type:`button`,onClick:()=>t({...e,avatar:n}),className:j(`flex aspect-square items-center justify-center rounded-xl transition`,e.avatar===n?`bg-ember-tint ring-2 ring-ember`:`bg-paper hover:bg-paper-2`),"aria-label":n,children:(0,U.jsx)(c,{kind:n,size:44,interactive:!1})},n))})}),e.lists?.length||e.connections?.length?(0,U.jsxs)(Q,{title:`Merkt sich für jede Person`,children:[(0,U.jsx)(`p`,{className:`text-[13px] text-ink-3`,children:`Bleibt zwischen den Durchläufen erhalten – getrennt für jede Person, die den Wizard nutzt. Ändern kannst du das im Gespräch.`}),(e.connections??[]).map(e=>(0,U.jsxs)(`div`,{className:`rounded-lg bg-paper px-3 py-2.5 ring-1 ring-border-soft`,children:[(0,U.jsx)(`div`,{className:`text-[14px]`,children:e.title??e.id}),(0,U.jsxs)(`div`,{className:`text-[12px] text-ink-4`,children:[`Konto · `,e.kind]})]},e.id)),(e.lists??[]).map(e=>(0,U.jsxs)(`div`,{className:`rounded-lg bg-paper px-3 py-2.5 ring-1 ring-border-soft`,children:[(0,U.jsx)(`div`,{className:`text-[14px]`,children:e.title}),(0,U.jsxs)(`div`,{className:`text-[12px] text-ink-4`,children:[`Liste · `,e.columns.map(e=>e.name).join(`, `)]}),(0,U.jsx)(`div`,{className:`mt-1 font-mono text-[11px] text-ink-4`,children:`{{lists.${e.id}}}`})]},e.id))]}):null]})}var oa={page:e=>({id:e,type:`page`,title:`Neue Seite`,fields:[{id:`${e}Text`,label:`Neue Frage`,kind:`text`}]}),agent:e=>({id:e,type:`agent`,title:`KI-Schritt`,instructions:`Beschreibe die Aufgabe …`,tools:[],output:{format:`markdown`}}),generate:e=>({id:e,type:`generate`,title:`Bild erzeugen`,asset:`image`,prompt:`Beschreibe das Bild …`}),widget:e=>({id:e,type:`widget`,title:`Widget`,entry:`${e}/index.html`,data:{},sample:`${e}/sample.json`})},$=`__wizard`;function sa({def:e,selected:t,onSelect:n,issues:r}){let i=[$,...e.steps.map(e=>e.id)],a=t?i.indexOf(t):-1,o=(0,H.useRef)(null);(0,H.useEffect)(()=>{o.current?.scrollIntoView({block:`nearest`,inline:`center`,behavior:`smooth`})},[t]);let s=e=>{let t=a===-1?e===1?1:i.length-1:a+e;t>=0&&t<i.length&&n(i[t])},c=(0,H.useRef)(s);c.current=s,(0,H.useEffect)(()=>{let e=e=>{(e.key===`ArrowLeft`||e.key===`ArrowRight`)&&(e.defaultPrevented||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey||e.target?.closest(`input, textarea, select, [contenteditable=""], [contenteditable="true"], [role="separator"], [role="slider"], [role="dialog"], .react-flow`)||(e.preventDefault(),c.current(e.key===`ArrowLeft`?-1:1)))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]);let l=`inline-flex size-8 shrink-0 items-center justify-center rounded-full transition`;return(0,U.jsxs)(`div`,{className:`sticky top-0 z-10 flex items-center gap-1 border-border-soft border-b bg-card/95 px-2 py-2 backdrop-blur`,children:[(0,U.jsx)(P,{label:B(`editor.prevStep`),className:`size-8 shrink-0`,disabled:a===0,onClick:()=>s(-1),children:(0,U.jsx)(Fe,{className:`size-4`})}),(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center overflow-x-auto p-1 [scrollbar-width:none]`,children:[(0,U.jsx)(`button`,{ref:t===$?o:void 0,type:`button`,title:e.title,"aria-label":e.title,"aria-current":t===$?`step`:void 0,onClick:()=>n($),className:j(l,`bg-paper-2 text-ink-2`,t===$?`ring-2 ring-ember`:`hover:ring-2 hover:ring-border-soft`),children:(0,U.jsx)(oe,{className:`size-4`})}),e.steps.map((e,i)=>{let a=S(e),s=e.id===t,c=r.some(t=>t.stepId===e.id);return(0,U.jsxs)(`div`,{className:`flex shrink-0 items-center`,children:[(0,U.jsx)(`span`,{className:`h-px w-3 bg-border-soft`}),(0,U.jsxs)(`button`,{ref:s?o:void 0,type:`button`,title:`${i+1}. ${e.title}`,"aria-label":`${i+1}. ${e.title}`,"aria-current":s?`step`:void 0,onClick:()=>n(e.id),className:j(l,`relative`,re[e.type],s?`ring-2 ring-ember`:`opacity-70 hover:opacity-100`),children:[(0,U.jsx)(a,{className:`size-4`}),c?(0,U.jsx)(`span`,{className:`-top-0.5 -right-0.5 absolute size-2.5 rounded-full bg-rose ring-2 ring-card`}):null]})]},e.id)})]}),(0,U.jsx)(`span`,{className:`shrink-0 px-1 text-[12px] text-ink-4 tabular-nums`,children:a>0?`${a} / ${e.steps.length}`:``}),(0,U.jsx)(P,{label:B(`editor.nextStep`),className:`size-8 shrink-0`,disabled:a===i.length-1,onClick:()=>s(1),children:(0,U.jsx)(Le,{className:`size-4`})})]})}function ca({def:e,onSelect:t,issues:n}){return(0,U.jsx)(`div`,{className:`flex flex-col gap-1 p-3`,children:e.steps.map((e,r)=>{let i=S(e),a=n.some(t=>t.stepId===e.id);return(0,U.jsxs)(`button`,{type:`button`,onClick:()=>t(e.id),className:`flex items-center gap-3 rounded-lg px-3 py-2.5 text-left transition hover:bg-paper-2`,children:[(0,U.jsx)(`span`,{className:`w-4 text-right text-[12px] text-ink-4 tabular-nums`,children:r+1}),(0,U.jsx)(`span`,{className:j(`inline-flex size-7 shrink-0 items-center justify-center rounded-md`,re[e.type]),children:(0,U.jsx)(i,{className:`size-4`})}),(0,U.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,U.jsx)(`span`,{className:`block truncate text-[14px]`,children:e.title}),(0,U.jsx)(`span`,{className:`block text-[12px] text-ink-4`,children:x(e)})]}),a?(0,U.jsx)(`span`,{className:`size-2 shrink-0 rounded-full bg-rose`}):null]},e.id)})})}function la(e){let{def:t,selected:n,update:r,onSelect:i,issues:a}=e,o=t.steps.find(e=>e.id===n);return(0,U.jsxs)(`div`,{children:[(0,U.jsx)(sa,{def:t,selected:n,onSelect:i,issues:a}),n===$?(0,U.jsx)(aa,{def:t,update:r}):o?(0,U.jsx)(ua,{...e,step:o}):(0,U.jsx)(ca,{def:t,onSelect:i,issues:a})]})}function ua({def:e,step:t,update:n,onSelect:r,issues:i,mcpServers:a,files:o,wizardId:s}){let c=e.steps.indexOf(t),l=S(t),u=r=>n({...e,steps:e.steps.map(e=>e.id===t.id?r:e)}),d=r=>{let i=c+r;if(i<0||i>=e.steps.length-(t.type===`result`?0:1)||e.steps[i].type===`result`)return;let a=[...e.steps];[a[c],a[i]]=[a[i],a[c]],n({...e,steps:a})},f=i=>{let a=$i(e,i===`page`?`seite`:i===`agent`?`ki`:i===`widget`?`widget`:`erzeugen`),o=[...e.steps];o.splice(t.type===`result`?c:c+1,0,oa[i](a)),n({...e,steps:o}),r(a)},p=i.filter(e=>e.stepId===t.id),m=Fi(s,e);return(0,U.jsxs)(`div`,{children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-2 px-5 py-4`,children:[(0,U.jsx)(`span`,{className:j(`inline-flex size-7 items-center justify-center rounded-md`,re[t.type]),children:(0,U.jsx)(l,{className:`size-4`})}),(0,U.jsx)(`span`,{className:`font-medium text-[12px] text-ink-3 uppercase tracking-[0.07em]`,children:x(t)}),(0,U.jsx)(`span`,{className:`ml-auto font-mono text-[11px] text-ink-4`,children:t.id})]}),p.length?(0,U.jsx)(`div`,{className:`mx-5 mb-4 rounded-lg bg-rose-tint px-3 py-2 text-[13px] text-rose`,children:p.map((e,t)=>(0,U.jsx)(`div`,{children:e.message},t))}):null,(0,U.jsxs)(Q,{children:[(0,U.jsx)(L,{value:t.title,onChange:e=>u({...t,title:e.target.value}),className:`font-display font-semibold text-[16px]`}),t.type===`page`||t.type===`review`?(0,U.jsx)(N,{minRows:1,placeholder:`Erklärung unter dem Titel (optional)`,value:t.description??``,onChange:e=>u({...t,description:e.target.value||void 0})}):null,(0,U.jsx)(Li,{estimate:m.data,stepId:t.id})]}),(0,U.jsx)(ia,{def:e,step:t,set:u,mcpServers:a,files:o,wizardId:s}),(0,U.jsx)(Q,{children:(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1`,children:[t.type===`result`?null:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(P,{label:B(`editor.moveUp`),onClick:()=>d(-1),children:(0,U.jsx)(v,{className:`size-4`})}),(0,U.jsx)(P,{label:B(`editor.moveDown`),onClick:()=>d(1),children:(0,U.jsx)(h,{className:`size-4`})}),(0,U.jsx)(P,{label:B(`editor.deleteStep`),className:`hover:text-rose`,onClick:()=>{n({...e,steps:e.steps.filter(e=>e.id!==t.id)}),r(null)},children:(0,U.jsx)(y,{className:`size-4`})})]}),(0,U.jsx)(`span`,{className:`ml-auto text-[12px] text-ink-4`,children:`Danach einfügen:`}),[`page`,`agent`,`generate`,`widget`].map(e=>(0,U.jsxs)(`button`,{type:`button`,onClick:()=>f(e),className:`inline-flex h-8 items-center gap-1 rounded-full px-2.5 text-[12px] text-ink-2 hover:bg-accent`,children:[(0,U.jsx)(C,{className:`size-3.5`}),` `,B(`type.${e}`)]},e))]})})]})}var da={waiting_input:`wartet`,running:`läuft`,done:`fertig`,failed:`Fehler`,cancelled:`abgebrochen`};function fa({wizardId:e,onOpen:t}){let n=r({queryKey:[`runs`,e],queryFn:()=>u.get(`/api/studio/wizards/${e}/runs`),refetchInterval:1e4});if(n.data&&!n.data.length)return(0,U.jsx)(_e,{children:B(`editor.noRuns`)});let i=new Intl.DateTimeFormat(ye,{dateStyle:`short`,timeStyle:`short`});return(0,U.jsx)(`div`,{className:`flex flex-col p-2`,children:n.data?.map(e=>(0,U.jsxs)(`button`,{type:`button`,onClick:()=>t(e.id),className:`flex items-center gap-3 rounded-lg px-3 py-3 text-left hover:bg-accent`,children:[(0,U.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-2 text-[14px]`,children:[i.format(new Date(e.createdAt)),e.mode===`test`?(0,U.jsx)(I,{children:`Test`}):(0,U.jsxs)(I,{tone:`live`,children:[`Live v`,e.version]})]}),(0,U.jsxs)(`div`,{className:`truncate text-[12px] text-ink-3`,children:[da[e.status]??e.status,e.stepTitle&&e.status!==`done`?` · ${e.stepTitle}`:``]})]}),(0,U.jsxs)(`span`,{className:`text-[12px] text-ink-4 tabular-nums`,children:[e.credits,` cr`]})]},e.id))})}var pa=e=>e.replace(/&/g,`&amp;`).replace(/"/g,`&quot;`).replace(/</g,`&lt;`);function ma({url:e,title:t}){let[n,r]=(0,H.useState)(!1),[i,a]=(0,H.useState)(!1),[,o,s]=e.match(/^(.*)\/w\/([^/]+)$/)??[];if(!s)return null;let c=`<script async src="${o}/embed.js" data-wizard="${s}"${n?` data-mode="modal" data-label="${pa(t)}"`:``}><\/script>`,l=[B(`embed.inline`),B(`embed.modal`)];return(0,U.jsxs)(`div`,{className:`mt-6 flex flex-col gap-3 border-border-soft border-t pt-5`,children:[(0,U.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,U.jsx)(`span`,{className:`text-[14px]`,children:B(`embed.title`)}),(0,U.jsxs)(R,{variant:`secondary`,size:`sm`,onClick:()=>{navigator.clipboard.writeText(c),a(!0),setTimeout(()=>a(!1),1500)},children:[i?(0,U.jsx)(ie,{className:`size-3.5`}):(0,U.jsx)(ue,{className:`size-3.5`}),B(i?`share.copied`:`share.copy`)]})]}),(0,U.jsx)(`p`,{className:`text-[13px] text-ink-3`,children:B(n?`embed.modalHint`:`embed.inlineHint`)}),(0,U.jsx)(M,{value:l[+!!n],onChange:e=>r(e===l[1]),options:l}),(0,U.jsx)(`pre`,{className:`select-all whitespace-pre-wrap break-all rounded-lg bg-paper-2 px-3 py-2.5 font-mono text-[12px] text-ink-2 leading-relaxed`,children:c})]})}function ha({wizard:e}){let t=f(),n=r({queryKey:[`cloud`,e.id],queryFn:()=>u.get(`/api/studio/wizards/${e.id}/cloud`)}),i=V({mutationFn:()=>u.post(`/api/studio/wizards/${e.id}/cloud`),onSuccess:()=>t.invalidateQueries({queryKey:[`cloud`,e.id]})}),a=n.data?.copy?.shareUrl;return(0,U.jsxs)(`div`,{className:`mt-6 flex flex-col gap-3 border-border-soft border-t pt-5`,children:[(0,U.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,U.jsx)(`span`,{className:`text-[14px]`,children:B(`cloud.title`)}),(0,U.jsxs)(R,{variant:`secondary`,size:`sm`,busy:i.isPending,onClick:()=>i.mutate(),children:[(0,U.jsx)(Ve,{className:`size-3.5`}),B(a?`cloud.update`:`cloud.publish`)]})]}),(0,U.jsx)(`p`,{className:`text-[13px] text-ink-3`,children:B(`cloud.hint`)}),a?(0,U.jsxs)(`button`,{type:`button`,className:`inline-flex items-center gap-1.5 self-start font-mono text-[13px] text-ink-2 hover:text-ink`,onClick:()=>Ne(a),children:[(0,U.jsx)(de,{className:`size-3.5`}),` `,a]}):null,a?(0,U.jsx)(ma,{url:a,title:e.draft.title}):null,i.isError?(0,U.jsx)(`p`,{className:`text-[13px] text-rose`,children:i.error instanceof d?i.error.message:B(`cloud.failed`)}):null]})}function ga({wizard:e,open:t,onClose:n}){let r=f(),[i,a]=(0,H.useState)(!1),[s,c]=(0,H.useState)(String(e.dailyRunLimit)),l=()=>r.invalidateQueries({queryKey:[`wizard`,e.id]}),d=V({mutationFn:t=>u.patch(`/api/studio/wizards/${e.id}`,t),onSuccess:l}),p=V({mutationFn:()=>u.post(`/api/studio/wizards/${e.id}/rotate-link`),onSuccess:l}),m=`${window.location.origin}${o}/w/${e.shareToken}`,h=Se(),g=Fi(e.id,e.draft),_=g.data?.available&&g.data.reserve>0?Math.round(g.data.reserve*e.dailyRunLimit):null;return(0,U.jsxs)(be,{open:t,onClose:n,title:B(`share.title`),children:[e.published?null:(0,U.jsx)(`p`,{className:`mb-4 rounded-lg bg-amber-tint px-3 py-2 text-[14px]`,children:B(`share.publishFirst`)}),(0,U.jsxs)(`div`,{className:`flex gap-2`,children:[(0,U.jsx)(L,{readOnly:!0,value:m,onFocus:e=>e.target.select(),className:`font-mono text-[13px]`}),(0,U.jsxs)(R,{variant:`secondary`,onClick:()=>{navigator.clipboard.writeText(m),a(!0),setTimeout(()=>a(!1),1500)},children:[i?(0,U.jsx)(ie,{className:`size-4`}):(0,U.jsx)(ue,{className:`size-4`}),B(i?`share.copied`:`share.copy`)]})]}),(0,U.jsxs)(`a`,{href:m,target:`_blank`,rel:`noreferrer`,className:`mt-2 inline-flex items-center gap-1.5 text-[13px] text-ink-3 hover:text-ink`,children:[(0,U.jsx)(de,{className:`size-3.5`}),` `,B(`share.open`)]}),(0,U.jsx)(ma,{url:m,title:e.draft.title}),(0,U.jsxs)(`div`,{className:`mt-6 flex flex-col gap-5 border-border-soft border-t pt-5`,children:[(0,U.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,U.jsx)(`span`,{className:`text-[14px]`,children:B(`share.enabled`)}),(0,U.jsx)(F,{checked:e.shareEnabled,onChange:e=>d.mutate({shareEnabled:e})})]}),(0,U.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,U.jsx)(`span`,{className:`whitespace-nowrap text-[14px]`,children:B(`share.limit`)}),(0,U.jsx)(`div`,{className:`w-24`,children:(0,U.jsx)(L,{inputMode:`numeric`,className:`text-right`,value:s,onChange:e=>c(e.target.value.replace(/\D/g,``)),onBlur:()=>{let t=Number(s);t>=1&&t!==e.dailyRunLimit&&d.mutate({dailyRunLimit:t})}})})]}),_!==null&&g.data?(0,U.jsx)(`p`,{className:`text-[13px] text-ink-3 tabular-nums`,children:B(`estimate.share`,{run:Math.round(g.data.credits).toLocaleString(),day:_.toLocaleString()})}):null,(0,U.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,U.jsx)(`span`,{className:`text-[13px] text-ink-3`,children:B(`share.rotateHint`)}),(0,U.jsxs)(R,{variant:`ghost`,size:`sm`,busy:p.isPending,onClick:()=>p.mutate(),children:[(0,U.jsx)(ge,{className:`size-3.5`}),` `,B(`share.rotate`)]})]})]}),h.data?.mode===`local`&&h.data.account?(0,U.jsx)(ha,{wizard:e}):null]})}var _a=[`title`,`description`,`avatar`,`intro`,`lists`,`connections`],va=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function ya(e,t,n){let r={...n};for(let n of _a)va(t[n],e[n])||Object.assign(r,{[n]:t[n]});let i=new Map(e.steps.map(e=>[e.id,e])),a=new Set(t.steps.map(e=>e.id)),o=n.steps.filter(e=>{let t=i.get(e.id);return a.has(e.id)||!t||!va(t,e)});return t.steps.forEach((e,n)=>{let r=i.get(e.id);if(r&&va(r,e))return;let a=o.findIndex(t=>t.id===e.id);if(a!==-1){o[a]=e;return}let s=t.steps.slice(0,n).reverse().find(e=>o.some(t=>t.id===e.id));o.splice(s?o.findIndex(e=>e.id===s.id)+1:0,0,e)}),{...r,steps:o}}function ba(e){let t=f(),n=(0,H.useMemo)(()=>[`wizard`,e],[e]),r=`/api/studio/wizards/${e}`,i=(0,H.useRef)(null),a=(0,H.useRef)(Promise.resolve()),o=(0,H.useRef)(null),c=(0,H.useRef)(null),l=(0,H.useRef)(!1),[p,m]=(0,H.useState)(!1),[h,g]=(0,H.useState)(0),[_,v]=(0,H.useState)(null),y=(0,H.useCallback)(()=>!!(i.current||l.current||o.current),[]),b=(0,H.useCallback)(async()=>{let e=await u.get(r);t.setQueryData(n,t=>t&&y()?{...e,draft:t.draft,title:t.title,revision:t.revision,dirty:!0}:e)},[t,n,r,y]),x=(0,H.useCallback)(()=>{a.current=a.current.then(async()=>{let e=o.current,i=t.getQueryData(n);if(e&&i){o.current=null,l.current=!0,m(!0);try{let a=await u.put(`${r}/draft`,{definition:e,baseRevision:i.revision});c.current=o.current?e:null,t.setQueryData(n,e=>e&&{...e,revision:a.revision,issues:a.issues})}catch(i){if(!(i instanceof d&&i.status===409)){o.current??=e,console.error(`[draft] save failed`,i);return}let a=await u.get(r),s=ya(c.current??a.draft,o.current??e,a.draft);c.current=a.draft,o.current=s,t.setQueryData(n,{...a,draft:s,title:s.title,dirty:!0}),g(Date.now()),x()}finally{l.current=!1,m(!1)}}})},[t,n,r]),ee=(0,H.useCallback)(r=>{e&&(y()||(c.current=t.getQueryData(n)?.draft??null),o.current=r,t.setQueryData(n,e=>e&&{...e,draft:r,title:r.title,dirty:!0}),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{i.current=null,x()},600))},[t,n,e,y,x]);return(0,H.useEffect)(()=>{if(!e)return;let r=new EventSource(s(`/api/studio/wizards/${e}/stream`));return r.addEventListener(`change`,e=>{let r=JSON.parse(e.data),i=t.getQueryData(n);r.kind===`draft`&&i&&r.revision<=i.revision||(b(),r.kind===`draft`&&r.source===`mcp`&&v({client:r.client??`MCP`,steps:r.touched,at:Date.now()}))}),r.addEventListener(`hello`,e=>{let{revision:r}=JSON.parse(e.data),i=t.getQueryData(n);i&&r!==i.revision&&b()}),()=>r.close()},[t,n,e,b]),(0,H.useEffect)(()=>{if(!_)return;let e=setTimeout(()=>v(null),6e3);return()=>clearTimeout(e)},[_]),(0,H.useEffect)(()=>{if(!h)return;let e=setTimeout(()=>g(0),4e3);return()=>clearTimeout(e)},[h]),{save:ee,saving:p,remote:_,merged:h>0}}function xa({remote:e,merged:t}){return e?(0,U.jsxs)(I,{tone:`ember`,children:[(0,U.jsx)(xe,{className:`size-3`}),` `,B(`editor.changedVia`,{client:e.client})]}):t?(0,U.jsxs)(I,{children:[(0,U.jsx)(qe,{className:`size-3`}),` `,B(`editor.merged`)]}):null}var Sa={chat:`editor.chat`,step:`editor.step`,files:`editor.files`,runs:`editor.runs`},Ca=`wizards.editor.pane`,wa=420,Ta=340,Ea=()=>Math.max(Ta,window.innerWidth-480);function Da(){try{let e=Number(localStorage.getItem(Ca));return e?Math.min(Math.max(e,Ta),Ea()):wa}catch{return wa}}function Oa(){let[e,t]=(0,H.useState)(Da),n=(0,H.useCallback)(e=>{let n=Math.round(Math.min(Math.max(e,Ta),Ea()));t(n);try{localStorage.setItem(Ca,String(n))}catch{}},[]);return{width:e,onPointerDown:t=>{t.preventDefault();let r=t.clientX,i=e,a=e=>n(i+r-e.clientX),o=()=>{window.removeEventListener(`pointermove`,a),window.removeEventListener(`pointerup`,o),document.body.style.removeProperty(`cursor`),document.body.style.removeProperty(`user-select`)};document.body.style.cursor=`col-resize`,document.body.style.userSelect=`none`,window.addEventListener(`pointermove`,a),window.addEventListener(`pointerup`,o)},onKeyDown:t=>{let r=t.shiftKey?64:16;t.key===`ArrowLeft`?(t.preventDefault(),n(e+r)):t.key===`ArrowRight`&&(t.preventDefault(),n(e-r))},reset:()=>n(wa)}}function ka(){let{id:e}=a(),t=i(),n=f(),o=Se(),[c,d]=l(),p=r({queryKey:[`wizard`,e],queryFn:()=>u.get(`/api/studio/wizards/${e}`),refetchOnWindowFocus:!1}),[h,v]=(0,H.useState)(null),[y,b]=(0,H.useState)(`chat`),x=Oa(),[ee,S]=(0,H.useState)(!1),[te,ne]=(0,H.useState)(null),[re,ie]=(0,H.useState)(null),ae=(0,H.useCallback)(e=>ie(e&&e.status!==`done`?e.step?.id??null:null),[]),{save:oe,saving:ue,remote:C,merged:de}=ba(e),w=se(p.data,(t,r)=>{n.setQueryData([`wizard`,e],e=>e&&{...e,draft:t,revision:r,title:t.title,blank:!1})}),fe=(0,H.useRef)(!1);(0,H.useEffect)(()=>{let e=c.get(`prompt`);e&&p.data&&!fe.current&&(fe.current=!0,d({},{replace:!0}),w.send(e))},[c,p.data,w,d]);let pe=r({queryKey:[`wizard-models`,e,p.data?.revision],queryFn:()=>u.get(`/api/studio/wizards/${e}/models`),enabled:!!p.data}).data?.missing??[],me=pe.some(e=>e.blocking),T=V({mutationFn:()=>u.post(`/api/studio/wizards/${e}/test-runs`),onSuccess:({runId:e})=>ne(e)}),he=V({mutationFn:()=>u.post(`/api/studio/wizards/${e}/publish`),onSuccess:async()=>{await n.invalidateQueries({queryKey:[`wizard`,e]}),S(!0)}}),ge=(0,H.useMemo)(()=>new Set((p.data?.issues??[]).map(e=>e.stepId).filter(Boolean)),[p.data?.issues]);if(p.isLoading||!o.data)return(0,U.jsx)(`div`,{className:`flex min-h-dvh items-center justify-center text-ink-4`,children:(0,U.jsx)(ve,{})});if(!p.data)return(0,U.jsx)(`div`,{className:`p-10 text-center text-ink-3`,children:B(`run.notFound`)});let E=p.data,D=E.draft,O=w.phase!==`idle`&&E.blank,k=E.issues.length>0,_e=e=>{v(e),e&&b(`step`)};return(0,U.jsxs)(`div`,{className:`flex h-dvh flex-col`,children:[(0,U.jsxs)(`header`,{className:`flex h-16 shrink-0 items-center gap-2 px-3 sm:px-4`,children:[(0,U.jsx)(P,{label:`Zurück`,onClick:()=>t(`/`),children:(0,U.jsx)(_,{className:`size-5`})}),(0,U.jsx)(`button`,{type:`button`,onClick:()=>_e(`__wizard`),className:`min-w-0 truncate rounded-md px-2 py-1 text-left hover:bg-accent`,children:(0,U.jsx)(`span`,{className:`font-display font-semibold text-[17px] tracking-tight`,children:D.title})}),(0,U.jsx)(`span`,{className:`hidden sm:inline-flex`,children:E.published?E.dirty?(0,U.jsx)(I,{tone:`warn`,children:B(`editor.unpublishedChanges`)}):(0,U.jsx)(I,{tone:`live`,children:B(`editor.published`,{v:E.publishedVersion??0})}):(0,U.jsx)(I,{children:B(`editor.notPublished`)})}),ue?(0,U.jsx)(ve,{className:`size-4 text-ink-4`}):null,(0,U.jsx)(`span`,{className:`hidden md:inline-flex`,children:(0,U.jsx)(xa,{remote:C,merged:de})}),(0,U.jsxs)(`div`,{className:`ml-auto flex items-center gap-2`,children:[(0,U.jsx)(`a`,{href:s(`/api/studio/wizards/${E.id}/export`),download:!0,"aria-label":B(`editor.export`),title:B(`editor.export`),className:`hidden size-9 shrink-0 items-center justify-center rounded-full text-ink-3 transition hover:bg-accent hover:text-ink sm:inline-flex`,children:(0,U.jsx)(we,{className:`size-4`})}),(0,U.jsxs)(R,{variant:`secondary`,size:`sm`,disabled:k||O||me,busy:T.isPending,onClick:()=>T.mutate(),children:[(0,U.jsx)(Ze,{className:`size-3.5`}),` `,B(`editor.test`)]}),E.published&&!E.dirty?(0,U.jsxs)(R,{size:`sm`,onClick:()=>S(!0),children:[(0,U.jsx)(m,{className:`size-3.5`}),` `,B(`editor.share`)]}):(0,U.jsx)(R,{size:`sm`,disabled:k||O,busy:he.isPending,onClick:()=>he.mutate(),children:B(`editor.publish`)}),(0,U.jsx)(`span`,{className:`ml-2 hidden md:inline-flex`,children:(0,U.jsx)(Te,{me:o.data})}),(0,U.jsx)(`span`,{className:`hidden sm:inline-flex`,children:(0,U.jsx)(Ce,{me:o.data})})]})]}),(0,U.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col lg:flex-row`,children:[(0,U.jsxs)(`section`,{className:`relative min-h-[45vh] flex-1 overflow-hidden lg:min-h-0`,children:[k&&!O?(0,U.jsxs)(`div`,{className:`absolute top-3 right-3 left-3 z-10 mx-auto max-w-xl animate-rise rounded-xl bg-card p-4 shadow-elevated ring-1 ring-rose/30`,children:[(0,U.jsx)(`p`,{className:`text-[14px]`,children:B(`editor.issues`)}),(0,U.jsx)(`ul`,{className:`mt-2 list-disc pl-5 text-[13px] text-ink-2`,children:E.issues.slice(0,4).map((e,t)=>(0,U.jsx)(`li`,{children:e.message},t))}),(0,U.jsx)(R,{size:`sm`,variant:`quiet`,className:`mt-3`,disabled:w.phase!==`idle`,onClick:()=>{b(`chat`),w.send(`Bitte behebe diese Probleme im Wizard:\n${E.issues.map(e=>`- ${e.message}`).join(`
2
- `)}`)},children:B(`editor.fixWithChat`)})]}):null,!k&&!O&&pe.length?(0,U.jsxs)(`div`,{className:j(`absolute top-3 right-3 left-3 z-10 mx-auto max-w-xl animate-rise rounded-xl bg-card p-4 shadow-elevated ring-1`,me?`ring-rose/30`:`ring-amber/30`),children:[(0,U.jsx)(`p`,{className:`text-[14px]`,children:B(me?`editor.models.blocking`:`editor.models.optional`)}),(0,U.jsx)(`ul`,{className:`mt-2 list-disc pl-5 text-[13px] text-ink-2`,children:pe.map(e=>(0,U.jsxs)(`li`,{children:[(0,U.jsx)(`span`,{className:`text-ink`,children:B(`class.${e.cls}`)}),` (`,e.steps.map(e=>`„${e.title}“`).join(`, `),`): `,e.problem]},e.cls))}),(0,U.jsx)(R,{size:`sm`,variant:`quiet`,className:`mt-3`,onClick:()=>t(`/settings/models`),children:B(`editor.models.settings`)})]}):null,O?(0,U.jsx)(`div`,{className:`flex h-full items-center justify-center px-6 text-[14px] text-ink-3`,children:(0,U.jsx)(ce,{chat:w,spinner:`size-4 text-ember`})}):(0,U.jsx)(Xi,{def:D,selected:h,onSelect:_e,issueSteps:ge,activeStep:te?re:null,pulse:C?.steps,wizardId:E.id})]}),(0,U.jsxs)(`aside`,{className:`relative flex h-[55vh] min-h-0 w-full shrink-0 flex-col bg-card shadow-[0_0_0_1px_var(--border-soft)] lg:h-auto lg:w-(--pane) lg:rounded-tl-3xl`,style:{"--pane":`${x.width}px`},children:[(0,U.jsx)(`div`,{role:`separator`,"aria-orientation":`vertical`,"aria-label":B(`editor.resize`),"aria-valuenow":x.width,tabIndex:0,title:B(`editor.resize`),onPointerDown:x.onPointerDown,onKeyDown:x.onKeyDown,onDoubleClick:x.reset,className:`group -left-1.5 absolute inset-y-0 z-10 hidden w-5 cursor-col-resize outline-none lg:block`,children:(0,U.jsx)(`span`,{className:`-translate-y-1/2 absolute top-1/2 left-[9px] h-12 w-1.5 rounded-full bg-ink-4/40 transition group-hover:bg-ember/70 group-focus-visible:bg-ember group-active:h-16 group-active:bg-ember`})}),(0,U.jsx)(`nav`,{className:`flex shrink-0 gap-1 px-3 pt-3`,children:[`chat`,`step`,`files`,`runs`].map(e=>(0,U.jsx)(`button`,{type:`button`,onClick:()=>b(e),className:j(`h-9 rounded-full px-4 font-medium text-[13px] transition`,y===e?`bg-paper-2 text-ink`:`text-ink-3 hover:text-ink`),children:B(Sa[e])},e))}),(0,U.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:y===`chat`?(0,U.jsx)(le,{chat:w,avatar:D.avatar}):y===`step`?(0,U.jsx)(la,{def:D,selected:h,update:oe,onSelect:_e,issues:E.issues,mcpServers:E.mcpServers,files:E.files,wizardId:E.id}):y===`files`?(0,U.jsx)(nt,{wizardId:E.id,files:E.files}):(0,U.jsx)(fa,{wizardId:E.id,onOpen:ne})})]})]}),te?(0,U.jsx)(`div`,{className:`fixed inset-0 z-50 flex justify-end bg-[oklch(20%_0.01_60/0.22)] backdrop-blur-[1px]`,onClick:()=>ne(null),children:(0,U.jsxs)(`div`,{className:`flex h-full w-full max-w-[680px] animate-rise flex-col bg-background shadow-overlay`,onClick:e=>e.stopPropagation(),children:[(0,U.jsxs)(`div`,{className:`flex h-14 shrink-0 items-center justify-between px-4`,children:[(0,U.jsx)(I,{children:`Test`}),(0,U.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,U.jsx)(R,{variant:`ghost`,size:`sm`,busy:T.isPending,disabled:k,onClick:()=>T.mutate(),children:B(`editor.restart`)}),(0,U.jsx)(P,{label:B(`editor.close`),onClick:()=>ne(null),children:(0,U.jsx)(Ee,{className:`size-5`})})]})]}),(0,U.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:(0,U.jsx)(g,{runId:te,compact:!0,onRestart:()=>T.mutate(),onView:ae},te)})]})}):null,(0,U.jsx)(ga,{wizard:E,open:ee,onClose:()=>S(!1)})]})}export{ka as EditorPage};
@@ -1 +0,0 @@
1
- var e=JSON.parse(`[{"version":"v0.1.10","timestamp":1791206921,"commits":[{"id":"8f35bf0","message":"the README shows the studio with a branched flow and a wizard in use, from its first page to the result","group":"Docs","scope":null,"breaking":false},{"id":"7abf9df","message":"the editor's review notes, tool names and branch labels follow the language; they were German in the English studio","group":"Fixed","scope":null,"breaking":false}]},{"version":"v0.1.9","timestamp":1791203125,"commits":[{"id":"5182fec","message":"the installer is engenty.ai/install.sh (was wizards.sh), and the command and the npm package are wizards (were engenty-wizards); the installer renames an install made under the old names","group":"Changed","scope":null,"breaking":false},{"id":"c6500f9","message":"the proxy sends the runtime /w/ and /s/ with the slash","group":"Docs","scope":null,"breaking":false}]},{"version":"v0.1.8","timestamp":1791196160,"commits":[{"id":"a965d36","message":"the marketplace's pages are written by the site at engenty.ai, at /wizards/<slug> and /de/wizards/<slug>","group":"Docs","scope":null,"breaking":false}]},{"version":"v0.1.7","timestamp":1791194770,"commits":[{"id":"66e9109","message":"a banner in the studio says when a newer release is out; the update installs from there, the runtime restarts into the new version and the page reloads","group":"Added","scope":null,"breaking":false},{"id":"5e27bf6","message":"the studio chat counts the seconds of a turn and says what the architect is doing and thinking; pasted pictures show in the thread and the architect sees them","group":"Added","scope":null,"breaking":false}]},{"version":"v0.1.6","timestamp":1791167380,"commits":[{"id":"481807b","message":"video models render at 720p, or 480p when a step asks; a larger clip is scaled down, and the price follows the resolution","group":"Added","scope":null,"breaking":false},{"id":"bb20f2b","message":"the settings say Codex makes images on the sign-in too; only video and audio still need a key","group":"Fixed","scope":null,"breaking":false}]},{"version":"v0.1.5","timestamp":1791151312,"commits":[{"id":"f4b7e43","message":"plan for a setup by capability","group":"Docs","scope":null,"breaking":false},{"id":"8ddaab7","message":"a wizard says which models it lacks before it runs, and only refuses to start when every path needs one; templates can be filtered by capability, and those this install cannot run are greyed out","group":"Added","scope":null,"breaking":false},{"id":"2689c74","message":"Codex makes images on the ChatGPT plan, and runs each model class on its own model (Luna, Sol, Astra); image, video and voice stay empty without a gateway key instead of naming models nothing can reach","group":"Added","scope":null,"breaking":false}]},{"version":"v0.1.4","timestamp":1791144283,"commits":[{"id":"071e6ca","message":"the changelog's groups read NEW, FIXED, DOCS in every language, like the entries they stand before","group":"Fixed","scope":null,"breaking":false}]},{"version":"v0.1.3","timestamp":1791142528,"commits":[{"id":"32d1698","message":"the publish job fetches the package artifact by name; with one artifact left it no longer lands in its own folder","group":"Fixed","scope":"release","breaking":false}]},{"version":"v0.1.2","timestamp":1791140122,"commits":[{"id":"4bc37b9","message":"a marketplace entry opens in the local studio at localhost:24368 instead of the Mac app's engenty-wizards:// link","group":"Added","scope":null,"breaking":false},{"id":"e09e748","message":"the Mac app is no longer built or offered; the studio offers to install itself as a Chrome app in a banner, starting at login on a Mac is a LaunchAgent that runs the command, and the setup, README and docs point there","group":"Added","scope":null,"breaking":false},{"id":"ab10b49","message":"engenty wizards starts at login — the Mac app opens in the menu bar without its window (\\"Open at Login\\" in its menus), on Linux a systemd user service; the setup asks, \`engenty-wizards autostart on|off\` switches it, and the Mac app's server takes port 24368 too","group":"Added","scope":null,"breaking":false},{"id":"239e338","message":"the setup page installs a missing AI client in its own terminal, and both setups suggest the client whose app is on the Mac — its subscription is most likely already paid for","group":"Added","scope":null,"breaking":false},{"id":"b479df7","message":"an inline terminal's stream sends its last lines and its end before it closes; a page that opens it afterwards gets them all","group":"Fixed","scope":null,"breaking":false}]},{"version":"v0.1.1","timestamp":1791138130,"commits":[{"id":"21f70df","message":"the German tagline on the sign-in page follows the new one","group":"Docs","scope":null,"breaking":false},{"id":"765ae7c","message":"the studio says when a newer release is out and, on an install made by wizards.sh, updates it from the footer","group":"Added","scope":null,"breaking":false},{"id":"825da6c","message":"the tagline is \\"Make a wish. Get your wizard.\\" In the README, the npm package description and the banner of wizards.sh.","group":"Docs","scope":null,"breaking":false},{"id":"05e2e5c","message":"the local runtime listens on 24368, AGENT on a phone keypad; the Docker image stays on 8891","group":"Added","scope":null,"breaking":false},{"id":"71bb778","message":"Ctrl-C stops engenty-wizards again — the login shell that reads the person's variables runs in a session of its own and no longer keeps the terminal","group":"Fixed","scope":null,"breaking":false},{"id":"ee20646","message":"wizards.sh opens with the tall engenty — one eye; it wakes up, looks around, hops and blinks","group":"Added","scope":null,"breaking":false},{"id":"81d4f21","message":"the studio moves to /studio; the root of a host is free for a landing page","group":"Added","scope":null,"breaking":false},{"id":"f6058fd","message":"the marketplace is an app of its own; the runtime searches it live and keeps its starters and the starred entries for offline use","group":"Added","scope":null,"breaking":false},{"id":"e6fdeab","message":"engenty-wizards://new?starter=<id> opens a marketplace template in the desktop app","group":"Added","scope":null,"breaking":false}]},{"version":"v0.1.0","timestamp":1791100948,"commits":[{"id":"71cc075","message":"install with wizards.sh; the local install and how its pieces share it","group":"Docs","scope":null,"breaking":false},{"id":"6ae641d","message":"the desktop app is a window on the local install and brings no runtime along","group":"Added","scope":null,"breaking":false},{"id":"9c9dbb8","message":"an installer, wizards.sh, that every runtime serves","group":"Added","scope":null,"breaking":false},{"id":"34d0a1a","message":"an engenty-wizards command for a local install in ~/.engenty/wizards","group":"Added","scope":null,"breaking":false},{"id":"4ac6329","message":"the search skips filler words with umlauts too","group":"Fixed","scope":null,"breaking":false},{"id":"3bda9a6","message":"the gallery's footer stays without version, changelog and open-source links","group":"Fixed","scope":null,"breaking":false},{"id":"9e65725","message":"a changelog and open-source credits in the studio's footer; pnpm release cuts a release from the commits","group":"Added","scope":null,"breaking":false},{"id":"45d2906","message":"an entry's search terms are scored one by one, not as one long text","group":"Fixed","scope":null,"breaking":false},{"id":"648819c","message":"marketplace entries carry the words people ask for, so a search by words finds them","group":"Added","scope":null,"breaking":false},{"id":"0838373","message":"one project unless the limit says more; an account page; previews and layouts in the project settings","group":"Added","scope":null,"breaking":false},{"id":"8da2aaf","message":"a project holds base infos, logos, colours, assets, documents and facts for all its wizards","group":"Added","scope":null,"breaking":false},{"id":"8679ae2","message":"the gallery has the studio's footer line","group":"Fixed","scope":null,"breaking":false},{"id":"d5086f3","message":"the gallery's field is narrower","group":"Fixed","scope":null,"breaking":false},{"id":"4a82b26","message":"the gallery invites to start a wizard from a template","group":"Other","scope":null,"breaking":false},{"id":"07d2def","message":"a template's header is the dialog's own colour under a spotlight; in the light a tinted grey","group":"Fixed","scope":null,"breaking":false},{"id":"d10be9f","message":"a template opens with its flow as a diagram; the gallery's field is narrower, its chips centred","group":"Added","scope":null,"breaking":false},{"id":"fbee998","message":"the gallery says what it is, compact and from the left; its search is a two-line field to write into","group":"Added","scope":null,"breaking":false},{"id":"478f271","message":"the gallery opens with one question and the search field; quieter filter chips","group":"Added","scope":null,"breaking":false},{"id":"15d7f94","message":"the marketplace search asks the model for the signed-in tenant; a sentence without a model keeps only close finds","group":"Fixed","scope":null,"breaking":false},{"id":"c254357","message":"a marketplace of wizards to start from, with a gallery, admin, translation and search","group":"Added","scope":null,"breaking":false},{"id":"4d6e270","message":"AI media is marked in its file and labelled with the EU icons (AI Act, Art. 50)","group":"Added","scope":null,"breaking":false},{"id":"f86f070","message":"two writers of the same blob no longer share a temporary file","group":"Fixed","scope":null,"breaking":false},{"id":"c6a06cc","message":"plan for definition versions and importing older packages","group":"Docs","scope":null,"breaking":false},{"id":"a37e826","message":"wizard packages carry their own extension, .wizard","group":"Added","scope":null,"breaking":false},{"id":"e104574","message":"wizards export as a package (.wizard.zip) and import into a project","group":"Added","scope":null,"breaking":false},{"id":"b389539","message":"the editor pane's resize handle is a short, thick pill","group":"Added","scope":null,"breaking":false},{"id":"670c3ce","message":"chat composer takes files (+) and dictation","group":"Added","scope":null,"breaking":false},{"id":"766f6fd","message":"editor side pane resizable; Steps tab steps with ← / →, header and strip spacing fixed","group":"Added","scope":null,"breaking":false},{"id":"8205c88","message":"the arrow on a live wizard's card opens it in a new tab","group":"Added","scope":null,"breaking":false},{"id":"2696a50","message":"the AI clients page says it is an MCP server and sets a client up step by step","group":"Added","scope":null,"breaking":false},{"id":"6004a7d","message":"settings in sub-pages with a nav on the left (a dropdown on phones); MCP servers under Connectors","group":"Added","scope":null,"breaking":false},{"id":"49054fa","message":"settings button in the top bar; the user menu closes on Einstellungen","group":"Added","scope":null,"breaking":false},{"id":"65c9867","message":"at most 5 projects per tenant","group":"Added","scope":null,"breaking":false},{"id":"7ecca24","message":"the project switcher switches the wizard list","group":"Fixed","scope":null,"breaking":false},{"id":"c037604","message":"light / dark in the user menu, in place of the top bar's toggle","group":"Added","scope":null,"breaking":false},{"id":"ef464ab","message":"upload limits and sorting, pictures while a step works, faster photo steps, a feedback box on reviews","group":"Added","scope":null,"breaking":false},{"id":"1cbc02f","message":"starters for receipts, video ad, property film, window offer, menu plan and ten website helpers","group":"Added","scope":null,"breaking":false},{"id":"8069115","message":"photos reach an installed AI client, and a photo without text is described","group":"Fixed","scope":null,"breaking":false},{"id":"013f7df","message":"embed a wizard in a website, inline or behind a button that opens it in a window","group":"Added","scope":null,"breaking":false},{"id":"78c2a2a","message":"the editor at /edit/<id>, signed-out visitors of the start page go to SIGNED_OUT_URL","group":"Fixed","scope":null,"breaking":false},{"id":"deb4942","message":"wizards at /w/<token>, the app at the root of https://engenty.ai","group":"Added","scope":null,"breaking":false},{"id":"b811b4c","message":"serve the app under a path (https://engenty.ai/w)","group":"Added","scope":null,"breaking":false},{"id":"4821fb1","message":"the hosted addresses (engenty.ai) as defaults, no private repo names in the public sources","group":"Fixed","scope":null,"breaking":false},{"id":"ca2207e","message":"the drop engenty as app icon, tray icon and favicon","group":"Added","scope":null,"breaking":false},{"id":"90fcbce","message":"a README for people who install it, developer notes in docs/development.md","group":"Docs","scope":null,"breaking":false},{"id":"4b0c54a","message":"a built runtime links to its own port, the sandbox falls back to agentOS","group":"Fixed","scope":null,"breaking":false},{"id":"7071edf","message":"no links to the clients' pages, a placeholder dot in the footer","group":"Fixed","scope":"setup","breaking":false},{"id":"14171bf","message":"installed AI clients as the model of a local runtime, first-start setup as a wizard","group":"Added","scope":null,"breaking":false},{"id":"ca3f3a7","message":"align vertical head turn with pointer gaze","group":"Fixed","scope":"engenty","breaking":false},{"id":"e1f04ff","message":"add furry and jelly renderers with an interactive builder","group":"Added","scope":"engenty","breaking":false},{"id":"99207af","message":"whole credits in the top bar, a footer line with the account's places","group":"Added","scope":null,"breaking":false},{"id":"e498ab1","message":"decision steps — yes/no and choice output fields, branches on step outputs","group":"Added","scope":null,"breaking":false},{"id":"e83a433","message":"pnpm workspace with apps/ and packages/","group":"Changed","scope":null,"breaking":false},{"id":"281e3a3","message":"desktop app — Tauri shell with the runtime as a Node sidecar","group":"Added","scope":null,"breaking":false},{"id":"9296521","message":"a database per tenant, model classes, sign-in at the Manage-App, phone inputs","group":"Added","scope":null,"breaking":false},{"id":"63b1693","message":"engenty's built-in connectors — Gmail, Drive, Calendar, Contacts, Outlook, OneDrive, Slack, GitHub, HubSpot, S3","group":"Added","scope":null,"breaking":false},{"id":"cd431c9","message":"connectors from the integrations registry, asked-first changes in connected accounts","group":"Added","scope":null,"breaking":false},{"id":"8dbe30d","message":"harden browser and file downloads, step navigation in the inspector, store and mailbox docs","group":"Added","scope":null,"breaking":false},{"id":"54370e8","message":"light/dark mode with engenty-coloured dark pages, jelly and fur coats, quiet focus rings","group":"Added","scope":null,"breaking":false},{"id":"371b033","message":"lists and connections kept between runs, mail and browser tools, camera and ask panel","group":"Added","scope":null,"breaking":false},{"id":"07df228","message":"setup per AI client and a self-served plugin with /wizard","group":"Added","scope":null,"breaking":false},{"id":"de27ae8","message":"interactive widgets with a workspace per wizard, shareable results","group":"Added","scope":null,"breaking":false},{"id":"12854e1","message":"live studio — MCP and other edits show up without a reload","group":"Added","scope":null,"breaking":false},{"id":"7f72420","message":"OAuth sign-in for MCP clients, connected apps in settings","group":"Added","scope":null,"breaking":false},{"id":"3014699","message":"MCP endpoint for authoring wizards with personal API keys","group":"Added","scope":null,"breaking":false},{"id":"985e612","message":"engenty wizards — prompt-built AI wizards with shareable links","group":"Added","scope":null,"breaking":false}]}]`);export{e as default};