koboyo 0.3.0 → 0.5.0
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.
- package/README.md +26 -0
- package/assets/editor/assets/ContextMenuTrigger-CXUL1E23.js +1 -0
- package/assets/editor/assets/DialogDescription-Ddhk2rmF.js +1 -0
- package/assets/editor/assets/DialogRoot-DUeVfNhS.js +1 -0
- package/assets/editor/assets/DialogTitle-D5au2NAn.js +1 -0
- package/assets/editor/assets/FloatingPortalLite-HnWQWrLk.js +1 -0
- package/assets/editor/assets/{IconAlertTriangle-CxPhYpe-.js → IconAlertTriangle-B33xznYN.js} +1 -1
- package/assets/editor/assets/{IconArrowLeft-DFk3Krim.js → IconArrowLeft-B4Zcy-Fc.js} +1 -1
- package/assets/editor/assets/IconChevronLeft-D7e7QC0h.js +1 -0
- package/assets/editor/assets/IconChevronRight-csfMBSUs.js +1 -0
- package/assets/editor/assets/{IconCode-hd05zxU4.js → IconCode-CHIz1nCU.js} +1 -1
- package/assets/editor/assets/IconCornerDownRight-DDiBMO4O.js +1 -0
- package/assets/editor/assets/{IconEraser-DlZQe3-r.js → IconEraser-CYfXj27R.js} +1 -1
- package/assets/editor/assets/{IconFocusCentered-C5PcDeR0.js → IconFocusCentered-Cn8rbfRI.js} +1 -1
- package/assets/editor/assets/IconHelp-4FIVl1rh.js +2 -0
- package/assets/editor/assets/{IconLink-ze4g4Lrj.js → IconLink-VS5p9Ytk.js} +1 -1
- package/assets/editor/assets/IconLoader2-CzCTn-Sn.js +1 -0
- package/assets/editor/assets/IconMinus-BcaDLts8.js +1 -0
- package/assets/editor/assets/{IconMoodSmile-Bic_fw54.js → IconMoodSmile-CSZ5p_Hy.js} +1 -1
- package/assets/editor/assets/{IconPencil-C5Y-Y4dC.js → IconPencil-D_pQsAyv.js} +1 -1
- package/assets/editor/assets/{IconPhoto-CR36IK-b.js → IconPhoto-5zuCDtnR.js} +1 -1
- package/assets/editor/assets/{IconPlayerPlayFilled-D4OODBX7.js → IconPlayerPlayFilled-DVAWmYt7.js} +1 -1
- package/assets/editor/assets/{IconPlayerStopFilled-BUbX6ZO5.js → IconPlayerStopFilled-D4qdct2R.js} +1 -1
- package/assets/editor/assets/IconPlus-D4tAoi-A.js +1 -0
- package/assets/editor/assets/{IconPresentation-DCrY3PKL.js → IconPresentation-BMKzt7fv.js} +1 -1
- package/assets/editor/assets/IconReplace-CYUD1RLF.js +1 -0
- package/assets/editor/assets/{IconSearch-C1K0_Pq_.js → IconSearch-CCpMt02s.js} +1 -1
- package/assets/editor/assets/{IconSparkles-WDcg8BA9.js → IconSparkles-CnCp3BCQ.js} +1 -1
- package/assets/editor/assets/{IconTrash-DbN_RxB7.js → IconTrash-C8w6ThWx.js} +1 -1
- package/assets/editor/assets/{IconUsers-Bwnyj4mm.js → IconUsers-Dp85N225.js} +1 -1
- package/assets/editor/assets/IconX-KrRqxr2j.js +1 -0
- package/assets/editor/assets/MenuSubmenuTrigger-BFlIkXYg.js +1 -0
- package/assets/editor/assets/PopoverPopup-1zO38CRl.js +1 -0
- package/assets/editor/assets/asset-glyph-DjBHkQcP.js +1 -0
- package/assets/editor/assets/billing-BSXr-z2r.js +1 -0
- package/assets/editor/assets/build-pips-BRf3pMnt.js +1 -0
- package/assets/editor/assets/build-visibility-CAmmsnmF.js +1 -0
- package/assets/editor/assets/builders-DrWdKwLQ.js +1 -0
- package/assets/editor/assets/{chart-Z4HQx-0h.js → chart-CKIxcbcM.js} +4 -4
- package/assets/editor/assets/{chrome-layout-B8YmHznO.js → chrome-layout-D5dql-y4.js} +1 -1
- package/assets/editor/assets/code-panel-BFikzGNv.js +18 -0
- package/assets/editor/assets/color-swatches-CZKb4DxX.js +1 -0
- package/assets/editor/assets/command-palette-Uat68wmJ.js +1 -0
- package/assets/editor/assets/config-D8b1QyEk.js +1 -0
- package/assets/editor/assets/connector-labels-DqVssnYz.js +2 -0
- package/assets/editor/assets/copy-image-dialog-C0fXdR1a.js +1 -0
- package/assets/editor/assets/core-C1TxysMz.js +1 -0
- package/assets/editor/assets/createReactComponent-C51FAx3B.js +1 -0
- package/assets/editor/assets/diagram-fingerprint-B-HB8UbR.js +3 -0
- package/assets/editor/assets/dialog-DnXgEbpz.js +1 -0
- package/assets/editor/assets/{edit-BJ_kibk8.js → edit-B4DMFSZr.js} +1 -1
- package/assets/editor/assets/editor-DAJETlQW.js +1 -0
- package/assets/editor/assets/{elk-api-DnfklSaw.js → elk-api-C4wlHVIw.js} +1 -1
- package/assets/editor/assets/{elk-worker-loader-CC-I9MmI.js → elk-worker-loader-BCdkmVMX.js} +1 -1
- package/assets/editor/assets/embed-input-D77Udvni.js +1 -0
- package/assets/editor/assets/export-FQTXirjn.js +2 -0
- package/assets/editor/assets/export-dialog-KYLeNY3G.js +1 -0
- package/assets/editor/assets/export-u442sUQs.js +6 -0
- package/assets/editor/assets/flow-layer-B4Q8rktl.js +1 -0
- package/assets/editor/assets/flow-panel-DbnavW4w.js +1 -0
- package/assets/editor/assets/flow-stage-CSTrNMZF.js +1 -0
- package/assets/editor/assets/{flow-start-BKN48uke.js → flow-start-ByhFxEeV.js} +1 -1
- package/assets/editor/assets/{flows-GGbkNqs8.js → flows-CGl4r-xb.js} +2 -2
- package/assets/editor/assets/{frames-CRP8oPP8.js → frames-DRSLvE9E.js} +1 -1
- package/assets/editor/assets/generate-DHP90nDk.js +26 -0
- package/assets/editor/assets/icon-picker-DIkw2xYL.js +1 -0
- package/assets/editor/assets/image-library-BmoSPV9c.js +1 -0
- package/assets/editor/assets/{index-e23lIFZB.css → index-DBrN0u0i.css} +1 -1
- package/assets/editor/assets/index-DFwoT1_W.js +25 -0
- package/assets/editor/assets/jsx-runtime-DKdBMi_L.js +1 -0
- package/assets/editor/assets/layout-offthread-JPTCbsLL.js +18 -0
- package/assets/editor/assets/{layout.worker-BIE1_z0S.js → layout.worker-CekYkaxO.js} +2 -2
- package/assets/editor/assets/menu-4xb5HtA1.js +1 -0
- package/assets/editor/assets/mermaid-paste-2cCwweY0.js +1 -0
- package/assets/editor/assets/panel-controls-B0Ccd0XF.js +1 -0
- package/assets/editor/assets/{panel-shell-CG2aq4Ia.js → panel-shell-COqmheb-.js} +1 -1
- package/assets/editor/assets/plan-D4Jyzo5X.js +1 -0
- package/assets/editor/assets/presentation-DNmdm11D.js +1 -0
- package/assets/editor/assets/presenter-keys-DLNIsrm5.js +1 -0
- package/assets/editor/assets/{jsx-runtime-2Zwg-L3c.js → react-lCSYwAWP.js} +1 -1
- package/assets/editor/assets/reflow-C6bvnSVm.js +1 -0
- package/assets/editor/assets/registry-d5KleeyB.js +1 -0
- package/assets/editor/assets/renderer-environment-D3n3hbug.js +1 -0
- package/assets/editor/assets/rich-paste-route-Bx69sREx.js +1 -0
- package/assets/editor/assets/ride-overlay-C1TrM7Ki.js +1 -0
- package/assets/editor/assets/selection-overlay-primitives-CfOaP5_G.js +1 -0
- package/assets/editor/assets/shape-meta-YgfIm0bQ.js +1 -0
- package/assets/editor/assets/shape-render-DZscezZk.js +1 -0
- package/assets/editor/assets/shapes-D5w8NTQQ.js +11 -0
- package/assets/editor/assets/sign-in-dialog-tmQEB2bx.js +1 -0
- package/assets/editor/assets/slide-notes-dialog-43EMJFJV.js +1 -0
- package/assets/editor/assets/slides-DDNzjFz9.js +5 -0
- package/assets/editor/assets/slides-panel-DANnu_nw.js +26 -0
- package/assets/editor/assets/text-breaks-DhCXtQrJ.js +7 -0
- package/assets/editor/assets/{theme-palette-D1nbDFBC.js → theme-palette-DEq19D0h.js} +1 -1
- package/assets/editor/assets/tidy-browser-BdlwTfCT.js +1 -0
- package/assets/editor/assets/tidy-scope-REEad7oC.js +1 -0
- package/assets/editor/assets/toast-Czv_DJ-4.js +1 -0
- package/assets/editor/assets/{tool-catalog-CHq6TJ2q.js → tool-catalog-CIjdZm_C.js} +1 -1
- package/assets/editor/assets/tool-drawer-B-Ys7Rsn.js +1 -0
- package/assets/editor/assets/tooltip-CKCG8vcp.js +1 -0
- package/assets/editor/assets/tree-BWJsAqkV.js +1 -0
- package/assets/editor/assets/upgrade-dialog-DhSZnDpx.js +1 -0
- package/assets/editor/assets/use-drag-reorder-ye8-kpyR.js +1 -0
- package/assets/editor/assets/use-export-command-BR-A4kAa.js +2 -0
- package/assets/editor/assets/use-grid-keyboard-nav-B0jjlh8Q.js +0 -0
- package/assets/editor/assets/use-icon-node-uhKPP4Ki.js +1 -0
- package/assets/editor/assets/use-key-held-DaUTxGze.js +1 -0
- package/assets/editor/assets/use-recent-list-DuazDypH.js +1 -0
- package/assets/editor/assets/useAnchoredPopupScrollLock-i8D5Dm1d.js +1 -0
- package/assets/editor/assets/useBaseUiId-D2RfU0uY.js +1 -0
- package/assets/editor/assets/useButton-CLQYGhRJ.js +1 -0
- package/assets/editor/assets/useControlled-BE8zdmih.js +1 -0
- package/assets/editor/assets/usePositioner-AtbrPc7w.js +1 -0
- package/assets/editor/assets/useScrollLock-CQpr0n6U.js +1 -0
- package/assets/editor/assets/useTriggerFocusGuards-Mibi8yYw.js +1 -0
- package/assets/editor/assets/useValueChanged-SqLfIDi5.js +1 -0
- package/assets/editor/assets/web-card-BTru0lge.js +1 -0
- package/assets/editor/assets/web-card-font-BbZEq3En.js +1 -0
- package/assets/editor/assets/web-controls-BjBov-C2.js +1 -0
- package/assets/editor/assets/web-embed-dialog-sT-1yK5o.js +1 -0
- package/assets/editor/assets/web-embed-url-CHu4SU82.js +1 -0
- package/assets/editor/assets/web-embeds-I3saJ_yp.js +1 -0
- package/assets/editor/assets/web-html-dialog-B5Hb3RGw.js +1 -0
- package/assets/editor/assets/web-runtime-wPi8lWzO.js +1 -0
- package/assets/editor/assets/web-widget-limits-DeMquLIR.js +1 -0
- package/assets/editor/assets/web-widgets-DsFUBhiq.js +325 -0
- package/assets/editor/assets/widget-source-C3N9ZKTz.js +2 -0
- package/assets/editor/assets/widget-target-C9a207gT.js +1 -0
- package/assets/editor/index.html +79 -69
- package/dist/koboyo.js +600 -225
- package/package.json +5 -5
- package/skills/koboyo/SKILL.md +27 -2
- package/skills/koboyo/references/architecture.md +1 -1
- package/skills/koboyo/references/bpmn.md +1 -1
- package/skills/koboyo/references/chart.md +1 -1
- package/skills/koboyo/references/cycle.md +1 -1
- package/skills/koboyo/references/erd.md +1 -1
- package/skills/koboyo/references/flowchart.md +1 -1
- package/skills/koboyo/references/funnel.md +1 -1
- package/skills/koboyo/references/gantt.md +1 -1
- package/skills/koboyo/references/gitgraph.md +1 -1
- package/skills/koboyo/references/journey.md +1 -1
- package/skills/koboyo/references/matrix.md +1 -1
- package/skills/koboyo/references/mindmap.md +1 -1
- package/skills/koboyo/references/orgchart.md +1 -1
- package/skills/koboyo/references/pyramid.md +1 -1
- package/skills/koboyo/references/sankey.md +1 -1
- package/skills/koboyo/references/sequence.md +1 -1
- package/skills/koboyo/references/statemachine.md +1 -1
- package/skills/koboyo/references/timeline.md +1 -1
- package/skills/koboyo/references/venn.md +1 -1
- package/skills/koboyo/references/wireframe.md +1 -1
- package/assets/editor/assets/DialogDescription-ZtZCUsfy.js +0 -1
- package/assets/editor/assets/DialogRoot-mHGRFW9m.js +0 -1
- package/assets/editor/assets/DialogTitle-CFhr-gP9.js +0 -1
- package/assets/editor/assets/FloatingPortalLite-Bf0q6fmL.js +0 -1
- package/assets/editor/assets/IconChevronLeft-BR0iwdRI.js +0 -1
- package/assets/editor/assets/IconChevronRight-DBDnxPYT.js +0 -1
- package/assets/editor/assets/IconCornerDownRight-BerbioFY.js +0 -1
- package/assets/editor/assets/IconHelp-DKNacRqS.js +0 -2
- package/assets/editor/assets/IconLoader2-BQaF1LKo.js +0 -1
- package/assets/editor/assets/IconMinus-y4ejub-s.js +0 -1
- package/assets/editor/assets/IconPlus-BbmieIBT.js +0 -1
- package/assets/editor/assets/IconX-AlbPkO_g.js +0 -1
- package/assets/editor/assets/MenuSubmenuTrigger-CpN67g09.js +0 -1
- package/assets/editor/assets/PopoverPopup-BqGWd_uB.js +0 -1
- package/assets/editor/assets/asset-glyph-B3c--Mx2.js +0 -1
- package/assets/editor/assets/billing-C-BNGM3Z.js +0 -1
- package/assets/editor/assets/build-pips-q_Fq10ov.js +0 -1
- package/assets/editor/assets/build-visibility-E1mHeDCW.js +0 -1
- package/assets/editor/assets/builders-DbF28yId.js +0 -1
- package/assets/editor/assets/code-panel-BfsykjSz.js +0 -43
- package/assets/editor/assets/command-palette-BjFnQHnz.js +0 -1
- package/assets/editor/assets/config-a_lz-57R.js +0 -1
- package/assets/editor/assets/connector-labels-vVnYQJRz.js +0 -2
- package/assets/editor/assets/copy-image-dialog-CCY_6fM4.js +0 -1
- package/assets/editor/assets/core-CBnmD9hT.js +0 -1
- package/assets/editor/assets/createReactComponent-9UsI5fmM.js +0 -1
- package/assets/editor/assets/diagram-fingerprint-CsqZK4xZ.js +0 -3
- package/assets/editor/assets/dialog-B32krrce.js +0 -1
- package/assets/editor/assets/editor-B0tARd79.js +0 -1
- package/assets/editor/assets/export-ChP0k5F5.js +0 -2
- package/assets/editor/assets/export-DEFKKRRi.js +0 -6
- package/assets/editor/assets/export-dialog-DPg1uzX5.js +0 -1
- package/assets/editor/assets/flow-layer-B7mlx0G4.js +0 -1
- package/assets/editor/assets/flow-panel-DoK6VIJ4.js +0 -1
- package/assets/editor/assets/flow-stage-fiF5Nggn.js +0 -1
- package/assets/editor/assets/icon-picker-NboB5Fvv.js +0 -1
- package/assets/editor/assets/image-library-Bb6bV6eK.js +0 -1
- package/assets/editor/assets/index-mhi0Z6gG.js +0 -24
- package/assets/editor/assets/layout-offthread-BwetpTFH.js +0 -18
- package/assets/editor/assets/menu-BPrc8Ara.js +0 -1
- package/assets/editor/assets/panel-controls-DYZ7QFT5.js +0 -1
- package/assets/editor/assets/plan-jQm1jDpt.js +0 -1
- package/assets/editor/assets/presentation-BavfNtxp.js +0 -1
- package/assets/editor/assets/presenter-keys-DVQcBdy1.js +0 -1
- package/assets/editor/assets/reflow-Cv75wPSh.js +0 -1
- package/assets/editor/assets/registry-DCgwH8wI.js +0 -1
- package/assets/editor/assets/renderer-environment-DmWXvuT4.js +0 -1
- package/assets/editor/assets/ride-overlay-DhygYdx1.js +0 -1
- package/assets/editor/assets/selection-overlay-primitives-hWJ1xjF7.js +0 -1
- package/assets/editor/assets/shape-meta-BpwsiB82.js +0 -1
- package/assets/editor/assets/sign-in-dialog-DRooo5xw.js +0 -1
- package/assets/editor/assets/slide-notes-dialog-DLdTmd7_.js +0 -1
- package/assets/editor/assets/slides-D9bnXqtf.js +0 -15
- package/assets/editor/assets/slides-panel-hozTMSMk.js +0 -26
- package/assets/editor/assets/text-breaks-YU-ymaF9.js +0 -7
- package/assets/editor/assets/tidy-browser-BwodBnAH.js +0 -1
- package/assets/editor/assets/tidy-scope-BgBSUklT.js +0 -1
- package/assets/editor/assets/toast-Nu_fiCd9.js +0 -1
- package/assets/editor/assets/tool-drawer-DEEqsKSN.js +0 -1
- package/assets/editor/assets/tooltip-DgEojto1.js +0 -1
- package/assets/editor/assets/tree-BbSzMkPL.js +0 -1
- package/assets/editor/assets/upgrade-dialog-DpZeaLDB.js +0 -1
- package/assets/editor/assets/use-drag-reorder-CTTvTwza.js +0 -1
- package/assets/editor/assets/use-export-command-CPc7qug1.js +0 -2
- package/assets/editor/assets/use-grid-keyboard-nav-B88Qw-cQ.js +0 -0
- package/assets/editor/assets/use-icon-node-DJZFjABX.js +0 -1
- package/assets/editor/assets/use-key-held-38H1v73f.js +0 -1
- package/assets/editor/assets/use-recent-list-BEG0iBIm.js +0 -1
- package/assets/editor/assets/useAnchoredPopupScrollLock-BGKchwpi.js +0 -1
- package/assets/editor/assets/useBaseUiId-C0Zm5sUV.js +0 -1
- package/assets/editor/assets/useButton-D3eS7fh5.js +0 -1
- package/assets/editor/assets/useControlled-C5xhvPXX.js +0 -1
- package/assets/editor/assets/usePositioner-DA3aR0-T.js +0 -1
- package/assets/editor/assets/useScrollLock-B7mQdXyv.js +0 -1
- package/assets/editor/assets/useValueChanged-p8z-93L4.js +0 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{B as e,G as t,H as n,V as r,W as i,X as a,Z as o,et as s,nt as c,r as l,rt as u,s as d,tt as f}from"./style-BENGW2ZV.js";import{$ as p,C as m,Dn as h,En as g,T as _,an as v,bn as ee,dn as y,en as te,ft as ne,in as b,j as x,ln as re,mn as S,n as ie,ot as ae,rn as oe,t as se,vn as ce,w as le}from"./shapes-D5w8NTQQ.js";function ue(e){return f(e,!0)??0}function de(e){return f(e,!1)??0}function fe(e,n){return e.length===0?{x:0,y:0}:c(e,s(e)*t(n??.5)).point}function pe(e){return e.length===0?``:e.reduce((e,t,n)=>e+`${n===0?`M`:`L`} ${t.x} ${t.y} `,``)}function me(e){let t=[];for(let n of e){let e=t[t.length-1];(!e||Math.abs(e.x-n.x)>.01||Math.abs(e.y-n.y)>.01)&&t.push(n)}return t}var he=[`arrow`,`sweep`,`triangle`,`triangleOutline`],ge=[`circle`,`circleOutline`,`diamond`,`diamondOutline`,`bar`,`cross`],_e=[`crowOne`,`crowMany`,`crowOneOrMany`,`crowOnlyOne`,`crowZeroOrOne`,`crowZeroOrMany`];function ve(e){let t={x:Math.cos(e),y:Math.sin(e)};return{dir:t,normal:{x:-t.y,y:t.x}}}function ye(e){let[t,...n]=e;return`M ${t.x} ${t.y} `+n.map(e=>`L ${e.x} ${e.y} `).join(``)+`Z`}function be(e,t){return`M ${e.x-t} ${e.y} a ${t} ${t} 0 1 0 ${t*2} 0 a ${t} ${t} 0 1 0 ${-t*2} 0 Z`}function C(e,t,n,r){let{dir:i,normal:a}=ve(n),o=r,s=e=>({x:t.x-i.x*e,y:t.y-i.y*e}),c=(e,t)=>{let n=s(e),r={x:n.x+a.x*t,y:n.y+a.y*t},i={x:n.x-a.x*t,y:n.y-a.y*t};return`M ${r.x} ${r.y} L ${i.x} ${i.y}`},l=(e,n)=>{let r=s(e),i={x:t.x+a.x*n,y:t.y+a.y*n},o={x:t.x-a.x*n,y:t.y-a.y*n};return`M ${i.x} ${i.y} L ${r.x} ${r.y} L ${o.x} ${o.y}`},u=(e,t=`none`)=>({d:e,fill:t}),d=s(o);switch(e){case`arrow`:return[u(ce(t,n,o))];case`sweep`:return[u(ee(t,n,o))];case`triangle`:case`triangleOutline`:{let n=o*.42;return[u(ye([t,{x:d.x+a.x*n,y:d.y+a.y*n},{x:d.x-a.x*n,y:d.y-a.y*n}]),e===`triangle`?`solid`:`white`)]}case`diamond`:case`diamondOutline`:{let n=o*.34,r=s(o/2);return[u(ye([t,{x:r.x+a.x*n,y:r.y+a.y*n},d,{x:r.x-a.x*n,y:r.y-a.y*n}]),e===`diamond`?`solid`:`white`)]}case`circle`:case`circleOutline`:{let t=o*.4;return[u(be(s(t),t),e===`circle`?`solid`:`white`)]}case`bar`:return[u(c(0,o*.5))];case`cross`:{let e=o*.4,t=t=>{let n=i.x*t+a.x,r=i.y*t+a.y,o=Math.hypot(n,r)||1,c=n/o*e,l=r/o*e,u=s(e);return`M ${u.x-c} ${u.y-l} L ${u.x+c} ${u.y+l}`};return[u(t(1)),u(t(-1))]}case`crowOne`:return[u(c(o*.55,o*.45))];case`crowOnlyOne`:return[u(c(o*.45,o*.45)),u(c(o*.9,o*.45))];case`crowMany`:return[u(l(o,o*.5))];case`crowOneOrMany`:return[u(l(o,o*.5)),u(c(o*1.3,o*.45))];case`crowZeroOrOne`:{let e=o*.3;return[u(c(o*.4,o*.45)),u(be(s(o),e),`white`)]}case`crowZeroOrMany`:{let e=o*.3;return[u(l(o*.85,o*.5)),u(be(s(o*1.4),e),`white`)]}}}function xe(e){let t=[];if(e.endArrow){let n=y(e,`end`);t.push(...C(e.endHead??`arrow`,n.tip,n.angle,n.length))}if(e.startArrow){let n=y(e,`start`);t.push(...C(e.startHead??`arrow`,n.tip,n.angle,n.length))}return t}function Se(e){let t=e.points;if(t.length<2)return[];let n=g(e.strokeWidth),r=s(t),i=[];if(e.endArrow){let a=e.endHead??`arrow`;i.push(...C(a,t[t.length-1],ue(t),h(n,a,r,u(t,!0))))}if(e.startArrow){let a=e.startHead??`arrow`;i.push(...C(a,t[0],de(t),h(n,a,r,u(t,!1))))}return i}function Ce(e,t){return e===`solid`?t:e===`white`?`#ffffff`:`none`}function we(e,t,n){if(e&&e.length){let[r,i]=t,a=Math.PI/180*n,o=Math.cos(a),s=Math.sin(a);for(let t of e){let[e,n]=t;t[0]=(e-r)*o-(n-i)*s+r,t[1]=(e-r)*s+(n-i)*o+i}}}function Te(e,t){return e[0]===t[0]&&e[1]===t[1]}function Ee(e,t,n,r=1){let i=n,a=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]==`number`?[e]:e,s=[0,0];if(i)for(let e of o)we(e,s,i);let c=function(e,t,n){let r=[];for(let t of e){let e=[...t];Te(e[0],e[e.length-1])||e.push([e[0][0],e[0][1]]),e.length>2&&r.push(e)}let i=[];t=Math.max(t,.1);let a=[];for(let e of r)for(let t=0;t<e.length-1;t++){let n=e[t],r=e[t+1];if(n[1]!==r[1]){let e=Math.min(n[1],r[1]);a.push({ymin:e,ymax:Math.max(n[1],r[1]),x:e===n[1]?n[0]:r[0],islope:(r[0]-n[0])/(r[1]-n[1])})}}if(a.sort(((e,t)=>e.ymin<t.ymin?-1:e.ymin>t.ymin?1:e.x<t.x?-1:e.x>t.x?1:e.ymax===t.ymax?0:(e.ymax-t.ymax)/Math.abs(e.ymax-t.ymax))),!a.length)return i;let o=[],s=a[0].ymin,c=0;for(;o.length||a.length;){if(a.length){let e=-1;for(let t=0;t<a.length&&!(a[t].ymin>s);t++)e=t;a.splice(0,e+1).forEach((e=>{o.push({s,edge:e})}))}if(o=o.filter((e=>!(e.edge.ymax<=s))),o.sort(((e,t)=>e.edge.x===t.edge.x?0:(e.edge.x-t.edge.x)/Math.abs(e.edge.x-t.edge.x))),(n!==1||c%t==0)&&o.length>1)for(let e=0;e<o.length;e+=2){let t=e+1;if(t>=o.length)break;let n=o[e].edge,r=o[t].edge;i.push([[Math.round(n.x),s],[Math.round(r.x),s]])}s+=n,o.forEach((e=>{e.edge.x=e.edge.x+n*e.edge.islope})),c++}return i}(o,a,r);if(i){for(let e of o)we(e,s,-i);(function(e,t,n){let r=[];e.forEach((e=>r.push(...e))),we(r,t,n)})(c,s,-i)}return c}function w(e,t){let n=t.hachureAngle+90,r=t.hachureGap;r<0&&(r=4*t.strokeWidth),r=Math.round(Math.max(r,.1));let i=1;return t.roughness>=1&&(t.randomizer?.next()||Math.random())>.7&&(i=r),Ee(e,r,n,i||1)}var De=class{constructor(e){this.helper=e}fillPolygons(e,t){return this._fillPolygons(e,t)}_fillPolygons(e,t){let n=w(e,t);return{type:`fillSketch`,ops:this.renderLines(n,t)}}renderLines(e,t){let n=[];for(let r of e)n.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],t));return n}};function T(e){let t=e[0],n=e[1];return Math.sqrt((t[0]-n[0])**2+(t[1]-n[1])**2)}var Oe=class extends De{fillPolygons(e,t){let n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.max(n,.1);let r=w(e,Object.assign({},t,{hachureGap:n})),i=Math.PI/180*t.hachureAngle,a=[],o=.5*n*Math.cos(i),s=.5*n*Math.sin(i);for(let[e,t]of r)T([e,t])&&a.push([[e[0]-o,e[1]+s],[...t]],[[e[0]+o,e[1]-s],[...t]]);return{type:`fillSketch`,ops:this.renderLines(a,t)}}},ke=class extends De{fillPolygons(e,t){let n=this._fillPolygons(e,t),r=Object.assign({},t,{hachureAngle:t.hachureAngle+90}),i=this._fillPolygons(e,r);return n.ops=n.ops.concat(i.ops),n}},Ae=class{constructor(e){this.helper=e}fillPolygons(e,t){let n=w(e,t=Object.assign({},t,{hachureAngle:0}));return this.dotsOnLines(n,t)}dotsOnLines(e,t){let n=[],r=t.hachureGap;r<0&&(r=4*t.strokeWidth),r=Math.max(r,.1);let i=t.fillWeight;i<0&&(i=t.strokeWidth/2);let a=r/4;for(let o of e){let e=T(o),s=e/r,c=Math.ceil(s)-1,l=e-c*r,u=(o[0][0]+o[1][0])/2-r/4,d=Math.min(o[0][1],o[1][1]);for(let e=0;e<c;e++){let o=d+l+e*r,s=u-a+2*Math.random()*a,c=o-a+2*Math.random()*a,f=this.helper.ellipse(s,c,i,i,t);n.push(...f.ops)}}return{type:`fillSketch`,ops:n}}},je=class{constructor(e){this.helper=e}fillPolygons(e,t){let n=w(e,t);return{type:`fillSketch`,ops:this.dashedLine(n,t)}}dashedLine(e,t){let n=t.dashOffset<0?t.hachureGap<0?4*t.strokeWidth:t.hachureGap:t.dashOffset,r=t.dashGap<0?t.hachureGap<0?4*t.strokeWidth:t.hachureGap:t.dashGap,i=[];return e.forEach((e=>{let a=T(e),o=Math.floor(a/(n+r)),s=(a+r-o*(n+r))/2,c=e[0],l=e[1];c[0]>l[0]&&(c=e[1],l=e[0]);let u=Math.atan((l[1]-c[1])/(l[0]-c[0]));for(let e=0;e<o;e++){let a=e*(n+r),o=a+n,l=[c[0]+a*Math.cos(u)+s*Math.cos(u),c[1]+a*Math.sin(u)+s*Math.sin(u)],d=[c[0]+o*Math.cos(u)+s*Math.cos(u),c[1]+o*Math.sin(u)+s*Math.sin(u)];i.push(...this.helper.doubleLineOps(l[0],l[1],d[0],d[1],t))}})),i}},Me=class{constructor(e){this.helper=e}fillPolygons(e,t){let n=t.hachureGap<0?4*t.strokeWidth:t.hachureGap,r=t.zigzagOffset<0?n:t.zigzagOffset,i=w(e,t=Object.assign({},t,{hachureGap:n+r}));return{type:`fillSketch`,ops:this.zigzagLines(i,r,t)}}zigzagLines(e,t,n){let r=[];return e.forEach((e=>{let i=T(e),a=Math.round(i/(2*t)),o=e[0],s=e[1];o[0]>s[0]&&(o=e[1],s=e[0]);let c=Math.atan((s[1]-o[1])/(s[0]-o[0]));for(let e=0;e<a;e++){let i=2*e*t,a=2*(e+1)*t,s=Math.sqrt(2*t**2),l=[o[0]+i*Math.cos(c),o[1]+i*Math.sin(c)],u=[o[0]+a*Math.cos(c),o[1]+a*Math.sin(c)],d=[l[0]+s*Math.cos(c+Math.PI/4),l[1]+s*Math.sin(c+Math.PI/4)];r.push(...this.helper.doubleLineOps(l[0],l[1],d[0],d[1],n),...this.helper.doubleLineOps(d[0],d[1],u[0],u[1],n))}})),r}},E={},Ne=class{constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}},Pe=0,Fe=1,Ie=2,D={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function Le(e,t){return e.type===t}function Re(e){let t=[],n=function(e){let t=[];for(;e!==``;)if(e.match(/^([ \t\r\n,]+)/))e=e.substr(RegExp.$1.length);else if(e.match(/^([aAcChHlLmMqQsStTvVzZ])/))t[t.length]={type:Pe,text:RegExp.$1},e=e.substr(RegExp.$1.length);else{if(!e.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];t[t.length]={type:Fe,text:`${parseFloat(RegExp.$1)}`},e=e.substr(RegExp.$1.length)}return t[t.length]={type:Ie,text:``},t}(e),r=`BOD`,i=0,a=n[i];for(;!Le(a,Ie);){let o=0,s=[];if(r===`BOD`){if(a.text!==`M`&&a.text!==`m`)return Re(`M0,0`+e);i++,o=D[a.text],r=a.text}else Le(a,Fe)?o=D[r]:(i++,o=D[a.text],r=a.text);if(!(i+o<n.length))throw Error(`Path data ended short`);for(let e=i;e<i+o;e++){let t=n[e];if(!Le(t,Fe))throw Error(`Param not a number: `+r+`,`+t.text);s[s.length]=+t.text}if(typeof D[r]!=`number`)throw Error(`Bad segment: `+r);{let e={key:r,data:s};t.push(e),i+=o,a=n[i],r===`M`&&(r=`L`),r===`m`&&(r=`l`)}}return t}function ze(e){let t=0,n=0,r=0,i=0,a=[];for(let{key:o,data:s}of e)switch(o){case`M`:a.push({key:`M`,data:[...s]}),[t,n]=s,[r,i]=s;break;case`m`:t+=s[0],n+=s[1],a.push({key:`M`,data:[t,n]}),r=t,i=n;break;case`L`:a.push({key:`L`,data:[...s]}),[t,n]=s;break;case`l`:t+=s[0],n+=s[1],a.push({key:`L`,data:[t,n]});break;case`C`:a.push({key:`C`,data:[...s]}),t=s[4],n=s[5];break;case`c`:{let e=s.map(((e,r)=>r%2?e+n:e+t));a.push({key:`C`,data:e}),t=e[4],n=e[5];break}case`Q`:a.push({key:`Q`,data:[...s]}),t=s[2],n=s[3];break;case`q`:{let e=s.map(((e,r)=>r%2?e+n:e+t));a.push({key:`Q`,data:e}),t=e[2],n=e[3];break}case`A`:a.push({key:`A`,data:[...s]}),t=s[5],n=s[6];break;case`a`:t+=s[5],n+=s[6],a.push({key:`A`,data:[s[0],s[1],s[2],s[3],s[4],t,n]});break;case`H`:a.push({key:`H`,data:[...s]}),t=s[0];break;case`h`:t+=s[0],a.push({key:`H`,data:[t]});break;case`V`:a.push({key:`V`,data:[...s]}),n=s[0];break;case`v`:n+=s[0],a.push({key:`V`,data:[n]});break;case`S`:a.push({key:`S`,data:[...s]}),t=s[2],n=s[3];break;case`s`:{let e=s.map(((e,r)=>r%2?e+n:e+t));a.push({key:`S`,data:e}),t=e[2],n=e[3];break}case`T`:a.push({key:`T`,data:[...s]}),t=s[0],n=s[1];break;case`t`:t+=s[0],n+=s[1],a.push({key:`T`,data:[t,n]});break;case`Z`:case`z`:a.push({key:`Z`,data:[]}),t=r,n=i}return a}function Be(e){let t=[],n=``,r=0,i=0,a=0,o=0,s=0,c=0;for(let{key:l,data:u}of e){switch(l){case`M`:t.push({key:`M`,data:[...u]}),[r,i]=u,[a,o]=u;break;case`C`:t.push({key:`C`,data:[...u]}),r=u[4],i=u[5],s=u[2],c=u[3];break;case`L`:t.push({key:`L`,data:[...u]}),[r,i]=u;break;case`H`:r=u[0],t.push({key:`L`,data:[r,i]});break;case`V`:i=u[0],t.push({key:`L`,data:[r,i]});break;case`S`:{let e=0,a=0;n===`C`||n===`S`?(e=r+(r-s),a=i+(i-c)):(e=r,a=i),t.push({key:`C`,data:[e,a,...u]}),s=u[0],c=u[1],r=u[2],i=u[3];break}case`T`:{let[e,a]=u,o=0,l=0;n===`Q`||n===`T`?(o=r+(r-s),l=i+(i-c)):(o=r,l=i);let d=r+2*(o-r)/3,f=i+2*(l-i)/3,p=e+2*(o-e)/3,m=a+2*(l-a)/3;t.push({key:`C`,data:[d,f,p,m,e,a]}),s=o,c=l,r=e,i=a;break}case`Q`:{let[e,n,a,o]=u,l=r+2*(e-r)/3,d=i+2*(n-i)/3,f=a+2*(e-a)/3,p=o+2*(n-o)/3;t.push({key:`C`,data:[l,d,f,p,a,o]}),s=e,c=n,r=a,i=o;break}case`A`:{let e=Math.abs(u[0]),n=Math.abs(u[1]),a=u[2],o=u[3],s=u[4],c=u[5],l=u[6];e===0||n===0?(t.push({key:`C`,data:[r,i,c,l,c,l]}),r=c,i=l):(r!==c||i!==l)&&(Ve(r,i,c,l,e,n,a,o,s).forEach((function(e){t.push({key:`C`,data:e})})),r=c,i=l);break}case`Z`:t.push({key:`Z`,data:[]}),r=a,i=o}n=l}return t}function O(e,t,n){return[e*Math.cos(n)-t*Math.sin(n),e*Math.sin(n)+t*Math.cos(n)]}function Ve(e,t,n,r,i,a,o,s,c,l){let u=(d=o,Math.PI*d/180);var d;let f=[],p=0,m=0,h=0,g=0;if(l)[p,m,h,g]=l;else{[e,t]=O(e,t,-u),[n,r]=O(n,r,-u);let o=(e-n)/2,l=(t-r)/2,d=o*o/(i*i)+l*l/(a*a);d>1&&(d=Math.sqrt(d),i*=d,a*=d);let f=i*i,_=a*a,v=f*_-f*l*l-_*o*o,ee=f*l*l+_*o*o,y=(s===c?-1:1)*Math.sqrt(Math.abs(v/ee));h=y*i*l/a+(e+n)/2,g=y*-a*o/i+(t+r)/2,p=Math.asin(parseFloat(((t-g)/a).toFixed(9))),m=Math.asin(parseFloat(((r-g)/a).toFixed(9))),e<h&&(p=Math.PI-p),n<h&&(m=Math.PI-m),p<0&&(p=2*Math.PI+p),m<0&&(m=2*Math.PI+m),c&&p>m&&(p-=2*Math.PI),!c&&m>p&&(m-=2*Math.PI)}let _=m-p;if(Math.abs(_)>120*Math.PI/180){let e=m,t=n,s=r;m=c&&m>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,f=Ve(n=h+i*Math.cos(m),r=g+a*Math.sin(m),t,s,i,a,o,0,c,[m,e,h,g])}_=m-p;let v=Math.cos(p),ee=Math.sin(p),y=Math.cos(m),te=Math.sin(m),ne=Math.tan(_/4),b=4/3*i*ne,x=4/3*a*ne,re=[e,t],S=[e+b*ee,t-x*v],ie=[n+b*te,r-x*y],ae=[n,r];if(S[0]=2*re[0]-S[0],S[1]=2*re[1]-S[1],l)return[S,ie,ae].concat(f);{f=[S,ie,ae].concat(f);let e=[];for(let t=0;t<f.length;t+=3){let n=O(f[t][0],f[t][1],u),r=O(f[t+1][0],f[t+1][1],u),i=O(f[t+2][0],f[t+2][1],u);e.push([n[0],n[1],r[0],r[1],i[0],i[1]])}return e}}var He={randOffset:function(e,t){return M(e,t)},randOffsetWithRange:function(e,t,n){return j(e,t,n)},ellipse:function(e,t,n,r,i){return qe(e,t,i,Ke(n,r,i)).opset},doubleLineOps:function(e,t,n,r,i){return N(e,t,n,r,i,!0)}};function Ue(e,t,n,r,i){return{type:`path`,ops:N(e,t,n,r,i)}}function k(e,t,n){let r=(e||[]).length;if(r>2){let i=[];for(let t=0;t<r-1;t++)i.push(...N(e[t][0],e[t][1],e[t+1][0],e[t+1][1],n));return t&&i.push(...N(e[r-1][0],e[r-1][1],e[0][0],e[0][1],n)),{type:`path`,ops:i}}return r===2?Ue(e[0][0],e[0][1],e[1][0],e[1][1],n):{type:`path`,ops:[]}}function We(e,t,n,r,i){return function(e,t){return k(e,!0,t)}([[e,t],[e+n,t],[e+n,t+r],[e,t+r]],i)}function Ge(e,t){if(e.length){let n=typeof e[0][0]==`number`?[e]:e,r=P(n[0],1*(1+.2*t.roughness),t),i=t.disableMultiStroke?[]:P(n[0],1.5*(1+.22*t.roughness),Ze(t));for(let e=1;e<n.length;e++){let a=n[e];if(a.length){let e=P(a,1*(1+.2*t.roughness),t),n=t.disableMultiStroke?[]:P(a,1.5*(1+.22*t.roughness),Ze(t));for(let t of e)t.op!==`move`&&r.push(t);for(let e of n)e.op!==`move`&&i.push(e)}}return{type:`path`,ops:r.concat(i)}}return{type:`path`,ops:[]}}function Ke(e,t,n){let r=Math.sqrt(2*Math.PI*Math.sqrt(((e/2)**2+(t/2)**2)/2)),i=Math.ceil(Math.max(n.curveStepCount,n.curveStepCount/Math.sqrt(200)*r)),a=2*Math.PI/i,o=Math.abs(e/2),s=Math.abs(t/2),c=1-n.curveFitting;return o+=M(o*c,n),s+=M(s*c,n),{increment:a,rx:o,ry:s}}function qe(e,t,n,r){let[i,a]=et(r.increment,e,t,r.rx,r.ry,1,r.increment*j(.1,j(.4,1,n),n),n),o=F(i,null,n);if(!n.disableMultiStroke&&n.roughness!==0){let[i]=et(r.increment,e,t,r.rx,r.ry,1.5,0,n),a=F(i,null,n);o=o.concat(a)}return{estimatedPoints:a,opset:{type:`path`,ops:o}}}function Je(e,t,n,r,i,a,o,s,c){let l=e,u=t,d=Math.abs(n/2),f=Math.abs(r/2);d+=M(.01*d,c),f+=M(.01*f,c);let p=i,m=a;for(;p<0;)p+=2*Math.PI,m+=2*Math.PI;m-p>2*Math.PI&&(p=0,m=2*Math.PI);let h=2*Math.PI/c.curveStepCount,g=Math.min(h/2,(m-p)/2),_=tt(g,l,u,d,f,p,m,1,c);if(!c.disableMultiStroke){let e=tt(g,l,u,d,f,p,m,1.5,c);_.push(...e)}return o&&(s?_.push(...N(l,u,l+d*Math.cos(p),u+f*Math.sin(p),c),...N(l,u,l+d*Math.cos(m),u+f*Math.sin(m),c)):_.push({op:`lineTo`,data:[l,u]},{op:`lineTo`,data:[l+d*Math.cos(p),u+f*Math.sin(p)]})),{type:`path`,ops:_}}function Ye(e,t){let n=Be(ze(Re(e))),r=[],i=[0,0],a=[0,0];for(let{key:e,data:o}of n)switch(e){case`M`:a=[o[0],o[1]],i=[o[0],o[1]];break;case`L`:r.push(...N(a[0],a[1],o[0],o[1],t)),a=[o[0],o[1]];break;case`C`:{let[e,n,i,s,c,l]=o;r.push(...nt(e,n,i,s,c,l,a,t)),a=[c,l];break}case`Z`:r.push(...N(a[0],a[1],i[0],i[1],t)),a=[i[0],i[1]]}return{type:`path`,ops:r}}function Xe(e,t){let n=[];for(let r of e)if(r.length){let e=t.maxRandomnessOffset||0,i=r.length;if(i>2){n.push({op:`move`,data:[r[0][0]+M(e,t),r[0][1]+M(e,t)]});for(let a=1;a<i;a++)n.push({op:`lineTo`,data:[r[a][0]+M(e,t),r[a][1]+M(e,t)]})}}return{type:`fillPath`,ops:n}}function A(e,t){return function(e,t){let n=e.fillStyle||`hachure`;if(!E[n])switch(n){case`zigzag`:E[n]||(E[n]=new Oe(t));break;case`cross-hatch`:E[n]||(E[n]=new ke(t));break;case`dots`:E[n]||(E[n]=new Ae(t));break;case`dashed`:E[n]||(E[n]=new je(t));break;case`zigzag-line`:E[n]||(E[n]=new Me(t));break;default:n=`hachure`,E[n]||(E[n]=new De(t))}return E[n]}(t,He).fillPolygons(e,t)}function Ze(e){let t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Qe(e){return e.randomizer||=new Ne(e.seed||0),e.randomizer.next()}function j(e,t,n,r=1){return n.roughness*r*(Qe(n)*(t-e)+e)}function M(e,t,n=1){return j(-e,e,t,n)}function N(e,t,n,r,i,a=!1){let o=a?i.disableMultiStrokeFill:i.disableMultiStroke,s=$e(e,t,n,r,i,!0,!1);if(o)return s;let c=$e(e,t,n,r,i,!0,!0);return s.concat(c)}function $e(e,t,n,r,i,a,o){let s=(e-n)**2+(t-r)**2,c=Math.sqrt(s),l=1;l=c<200?1:c>500?.4:-.0016668*c+1.233334;let u=i.maxRandomnessOffset||0;u*u*100>s&&(u=c/10);let d=u/2,f=.2+.2*Qe(i),p=i.bowing*i.maxRandomnessOffset*(r-t)/200,m=i.bowing*i.maxRandomnessOffset*(e-n)/200;p=M(p,i,l),m=M(m,i,l);let h=[],g=()=>M(d,i,l),_=()=>M(u,i,l),v=i.preserveVertices;return a&&(o?h.push({op:`move`,data:[e+(v?0:g()),t+(v?0:g())]}):h.push({op:`move`,data:[e+(v?0:M(u,i,l)),t+(v?0:M(u,i,l))]})),o?h.push({op:`bcurveTo`,data:[p+e+(n-e)*f+g(),m+t+(r-t)*f+g(),p+e+2*(n-e)*f+g(),m+t+2*(r-t)*f+g(),n+(v?0:g()),r+(v?0:g())]}):h.push({op:`bcurveTo`,data:[p+e+(n-e)*f+_(),m+t+(r-t)*f+_(),p+e+2*(n-e)*f+_(),m+t+2*(r-t)*f+_(),n+(v?0:_()),r+(v?0:_())]}),h}function P(e,t,n){if(!e.length)return[];let r=[];r.push([e[0][0]+M(t,n),e[0][1]+M(t,n)]),r.push([e[0][0]+M(t,n),e[0][1]+M(t,n)]);for(let i=1;i<e.length;i++)r.push([e[i][0]+M(t,n),e[i][1]+M(t,n)]),i===e.length-1&&r.push([e[i][0]+M(t,n),e[i][1]+M(t,n)]);return F(r,null,n)}function F(e,t,n){let r=e.length,i=[];if(r>3){let a=[],o=1-n.curveTightness;i.push({op:`move`,data:[e[1][0],e[1][1]]});for(let t=1;t+2<r;t++){let n=e[t];a[0]=[n[0],n[1]],a[1]=[n[0]+(o*e[t+1][0]-o*e[t-1][0])/6,n[1]+(o*e[t+1][1]-o*e[t-1][1])/6],a[2]=[e[t+1][0]+(o*e[t][0]-o*e[t+2][0])/6,e[t+1][1]+(o*e[t][1]-o*e[t+2][1])/6],a[3]=[e[t+1][0],e[t+1][1]],i.push({op:`bcurveTo`,data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}if(t&&t.length===2){let e=n.maxRandomnessOffset;i.push({op:`lineTo`,data:[t[0]+M(e,n),t[1]+M(e,n)]})}}else r===3?(i.push({op:`move`,data:[e[1][0],e[1][1]]}),i.push({op:`bcurveTo`,data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):r===2&&i.push(...$e(e[0][0],e[0][1],e[1][0],e[1][1],n,!0,!0));return i}function et(e,t,n,r,i,a,o,s){let c=[],l=[];if(s.roughness===0){e/=4,l.push([t+r*Math.cos(-e),n+i*Math.sin(-e)]);for(let a=0;a<=2*Math.PI;a+=e){let e=[t+r*Math.cos(a),n+i*Math.sin(a)];c.push(e),l.push(e)}l.push([t+r*Math.cos(0),n+i*Math.sin(0)]),l.push([t+r*Math.cos(e),n+i*Math.sin(e)])}else{let u=M(.5,s)-Math.PI/2;l.push([M(a,s)+t+.9*r*Math.cos(u-e),M(a,s)+n+.9*i*Math.sin(u-e)]);let d=2*Math.PI+u-.01;for(let o=u;o<d;o+=e){let e=[M(a,s)+t+r*Math.cos(o),M(a,s)+n+i*Math.sin(o)];c.push(e),l.push(e)}l.push([M(a,s)+t+r*Math.cos(u+2*Math.PI+.5*o),M(a,s)+n+i*Math.sin(u+2*Math.PI+.5*o)]),l.push([M(a,s)+t+.98*r*Math.cos(u+o),M(a,s)+n+.98*i*Math.sin(u+o)]),l.push([M(a,s)+t+.9*r*Math.cos(u+.5*o),M(a,s)+n+.9*i*Math.sin(u+.5*o)])}return[l,c]}function tt(e,t,n,r,i,a,o,s,c){let l=a+M(.1,c),u=[];u.push([M(s,c)+t+.9*r*Math.cos(l-e),M(s,c)+n+.9*i*Math.sin(l-e)]);for(let a=l;a<=o;a+=e)u.push([M(s,c)+t+r*Math.cos(a),M(s,c)+n+i*Math.sin(a)]);return u.push([t+r*Math.cos(o),n+i*Math.sin(o)]),u.push([t+r*Math.cos(o),n+i*Math.sin(o)]),F(u,null,c)}function nt(e,t,n,r,i,a,o,s){let c=[],l=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3],u=[0,0],d=s.disableMultiStroke?1:2,f=s.preserveVertices;for(let p=0;p<d;p++)p===0?c.push({op:`move`,data:[o[0],o[1]]}):c.push({op:`move`,data:[o[0]+(f?0:M(l[0],s)),o[1]+(f?0:M(l[0],s))]}),u=f?[i,a]:[i+M(l[p],s),a+M(l[p],s)],c.push({op:`bcurveTo`,data:[e+M(l[p],s),t+M(l[p],s),n+M(l[p],s),r+M(l[p],s),u[0],u[1]]});return c}function I(e){return[...e]}function rt(e,t=0){let n=e.length;if(n<3)throw Error(`A curve must have at least three points.`);let r=[];if(n===3)r.push(I(e[0]),I(e[1]),I(e[2]),I(e[2]));else{let n=[];n.push(e[0],e[0]);for(let t=1;t<e.length;t++)n.push(e[t]),t===e.length-1&&n.push(e[t]);let i=[],a=1-t;r.push(I(n[0]));for(let e=1;e+2<n.length;e++){let t=n[e];i[0]=[t[0],t[1]],i[1]=[t[0]+(a*n[e+1][0]-a*n[e-1][0])/6,t[1]+(a*n[e+1][1]-a*n[e-1][1])/6],i[2]=[n[e+1][0]+(a*n[e][0]-a*n[e+2][0])/6,n[e+1][1]+(a*n[e][1]-a*n[e+2][1])/6],i[3]=[n[e+1][0],n[e+1][1]],r.push(i[1],i[2],i[3])}}return r}function L(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2}function it(e,t,n){let r=L(t,n);if(r===0)return L(e,t);let i=((e[0]-t[0])*(n[0]-t[0])+(e[1]-t[1])*(n[1]-t[1]))/r;return i=Math.max(0,Math.min(1,i)),L(e,R(t,n,i))}function R(e,t,n){return[e[0]+(t[0]-e[0])*n,e[1]+(t[1]-e[1])*n]}function at(e,t,n,r){let i=r||[];if(function(e,t){let n=e[t+0],r=e[t+1],i=e[t+2],a=e[t+3],o=3*r[0]-2*n[0]-a[0];o*=o;let s=3*r[1]-2*n[1]-a[1];s*=s;let c=3*i[0]-2*a[0]-n[0];c*=c;let l=3*i[1]-2*a[1]-n[1];return l*=l,o<c&&(o=c),s<l&&(s=l),o+s}(e,t)<n){let n=e[t+0];i.length?(a=i[i.length-1],o=n,Math.sqrt(L(a,o)))>1&&i.push(n):i.push(n),i.push(e[t+3])}else{let r=.5,a=e[t+0],o=e[t+1],s=e[t+2],c=e[t+3],l=R(a,o,r),u=R(o,s,r),d=R(s,c,r),f=R(l,u,r),p=R(u,d,r),m=R(f,p,r);at([a,l,f,m],0,n,i),at([m,p,d,c],0,n,i)}var a,o;return i}function ot(e,t){return z(e,0,e.length,t)}function z(e,t,n,r,i){let a=i||[],o=e[t],s=e[n-1],c=0,l=1;for(let r=t+1;r<n-1;++r){let t=it(e[r],o,s);t>c&&(c=t,l=r)}return Math.sqrt(c)>r?(z(e,t,l+1,r,a),z(e,l,n,r,a)):(a.length||a.push(o),a.push(s)),a}function st(e,t=.15,n){let r=[],i=(e.length-1)/3;for(let n=0;n<i;n++)at(e,3*n,t,r);return n&&n>0?z(r,0,r.length,n):r}var B=`none`,V=class{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:`#000`,strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:`hachure`,fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,t,n){return{shape:e,sets:t||[],options:n||this.defaultOptions}}line(e,t,n,r,i){let a=this._o(i);return this._d(`line`,[Ue(e,t,n,r,a)],a)}rectangle(e,t,n,r,i){let a=this._o(i),o=[],s=We(e,t,n,r,a);if(a.fill){let i=[[e,t],[e+n,t],[e+n,t+r],[e,t+r]];a.fillStyle===`solid`?o.push(Xe([i],a)):o.push(A([i],a))}return a.stroke!==B&&o.push(s),this._d(`rectangle`,o,a)}ellipse(e,t,n,r,i){let a=this._o(i),o=[],s=Ke(n,r,a),c=qe(e,t,a,s);if(a.fill)if(a.fillStyle===`solid`){let n=qe(e,t,a,s).opset;n.type=`fillPath`,o.push(n)}else o.push(A([c.estimatedPoints],a));return a.stroke!==B&&o.push(c.opset),this._d(`ellipse`,o,a)}circle(e,t,n,r){let i=this.ellipse(e,t,n,n,r);return i.shape=`circle`,i}linearPath(e,t){let n=this._o(t);return this._d(`linearPath`,[k(e,!1,n)],n)}arc(e,t,n,r,i,a,o=!1,s){let c=this._o(s),l=[],u=Je(e,t,n,r,i,a,o,!0,c);if(o&&c.fill)if(c.fillStyle===`solid`){let o=Object.assign({},c);o.disableMultiStroke=!0;let s=Je(e,t,n,r,i,a,!0,!1,o);s.type=`fillPath`,l.push(s)}else l.push(function(e,t,n,r,i,a,o){let s=e,c=t,l=Math.abs(n/2),u=Math.abs(r/2);l+=M(.01*l,o),u+=M(.01*u,o);let d=i,f=a;for(;d<0;)d+=2*Math.PI,f+=2*Math.PI;f-d>2*Math.PI&&(d=0,f=2*Math.PI);let p=(f-d)/o.curveStepCount,m=[];for(let e=d;e<=f;e+=p)m.push([s+l*Math.cos(e),c+u*Math.sin(e)]);return m.push([s+l*Math.cos(f),c+u*Math.sin(f)]),m.push([s,c]),A([m],o)}(e,t,n,r,i,a,c));return c.stroke!==B&&l.push(u),this._d(`arc`,l,c)}curve(e,t){let n=this._o(t),r=[],i=Ge(e,n);if(n.fill&&n.fill!==B)if(n.fillStyle===`solid`){let t=Ge(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:`fillPath`,ops:this._mergedShape(t.ops)})}else{let t=[],i=e;if(i.length){let e=typeof i[0][0]==`number`?[i]:i;for(let r of e)r.length<3?t.push(...r):r.length===3?t.push(...st(rt([r[0],r[0],r[1],r[2]]),10,(1+n.roughness)/2)):t.push(...st(rt(r),10,(1+n.roughness)/2))}t.length&&r.push(A([t],n))}return n.stroke!==B&&r.push(i),this._d(`curve`,r,n)}polygon(e,t){let n=this._o(t),r=[],i=k(e,!0,n);return n.fill&&(n.fillStyle===`solid`?r.push(Xe([e],n)):r.push(A([e],n))),n.stroke!==B&&r.push(i),this._d(`polygon`,r,n)}path(e,t){let n=this._o(t),r=[];if(!e)return this._d(`path`,r,n);e=(e||``).replace(/\n/g,` `).replace(/(-\s)/g,`-`).replace(`/(ss)/g`,` `);let i=n.fill&&n.fill!==`transparent`&&n.fill!==B,a=n.stroke!==B,o=!!(n.simplification&&n.simplification<1),s=function(e,t,n){let r=Be(ze(Re(e))),i=[],a=[],o=[0,0],s=[],c=()=>{s.length>=4&&a.push(...st(s,t)),s=[]},l=()=>{c(),a.length&&(i.push(a),a=[])};for(let{key:e,data:t}of r)switch(e){case`M`:l(),o=[t[0],t[1]],a.push(o);break;case`L`:c(),a.push([t[0],t[1]]);break;case`C`:if(!s.length){let e=a.length?a[a.length-1]:o;s.push([e[0],e[1]])}s.push([t[0],t[1]]),s.push([t[2],t[3]]),s.push([t[4],t[5]]);break;case`Z`:c(),a.push([o[0],o[1]])}if(l(),!n)return i;let u=[];for(let e of i){let t=ot(e,n);t.length&&u.push(t)}return u}(e,1,o?4-4*(n.simplification||1):(1+n.roughness)/2),c=Ye(e,n);if(i)if(n.fillStyle===`solid`)if(s.length===1){let t=Ye(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:`fillPath`,ops:this._mergedShape(t.ops)})}else r.push(Xe(s,n));else r.push(A(s,n));return a&&(o?s.forEach((e=>{r.push(k(e,!1,n))})):r.push(c)),this._d(`path`,r,n)}opsToPath(e,t){let n=``;for(let r of e.ops){let e=typeof t==`number`&&t>=0?r.data.map((e=>+e.toFixed(t))):r.data;switch(r.op){case`move`:n+=`M${e[0]} ${e[1]} `;break;case`bcurveTo`:n+=`C${e[0]} ${e[1]}, ${e[2]} ${e[3]}, ${e[4]} ${e[5]} `;break;case`lineTo`:n+=`L${e[0]} ${e[1]} `}}return n.trim()}toPaths(e){let t=e.sets||[],n=e.options||this.defaultOptions,r=[];for(let e of t){let t=null;switch(e.type){case`path`:t={d:this.opsToPath(e),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:B};break;case`fillPath`:t={d:this.opsToPath(e),stroke:B,strokeWidth:0,fill:n.fill||B};break;case`fillSketch`:t=this.fillSketch(e,n)}t&&r.push(t)}return r}fillSketch(e,t){let n=t.fillWeight;return n<0&&(n=t.strokeWidth/2),{d:this.opsToPath(e),stroke:t.fill||B,strokeWidth:n,fill:B}}_mergedShape(e){return e.filter(((e,t)=>t===0||e.op!==`move`))}},ct=class{constructor(e,t){this.canvas=e,this.ctx=this.canvas.getContext(`2d`),this.gen=new V(t)}draw(e){let t=e.sets||[],n=e.options||this.getDefaultOptions(),r=this.ctx,i=e.options.fixedDecimalPlaceDigits;for(let a of t)switch(a.type){case`path`:r.save(),r.strokeStyle=n.stroke===`none`?`transparent`:n.stroke,r.lineWidth=n.strokeWidth,n.strokeLineDash&&r.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(r.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(r,a,i),r.restore();break;case`fillPath`:{r.save(),r.fillStyle=n.fill||``;let t=e.shape===`curve`||e.shape===`polygon`||e.shape===`path`?`evenodd`:`nonzero`;this._drawToContext(r,a,i,t),r.restore();break}case`fillSketch`:this.fillSketch(r,a,n)}}fillSketch(e,t,n){let r=n.fillWeight;r<0&&(r=n.strokeWidth/2),e.save(),n.fillLineDash&&e.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(e.lineDashOffset=n.fillLineDashOffset),e.strokeStyle=n.fill||``,e.lineWidth=r,this._drawToContext(e,t,n.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,t,n,r=`nonzero`){e.beginPath();for(let r of t.ops){let t=typeof n==`number`&&n>=0?r.data.map((e=>+e.toFixed(n))):r.data;switch(r.op){case`move`:e.moveTo(t[0],t[1]);break;case`bcurveTo`:e.bezierCurveTo(t[0],t[1],t[2],t[3],t[4],t[5]);break;case`lineTo`:e.lineTo(t[0],t[1])}}t.type===`fillPath`?e.fill(r):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,t,n,r,i){let a=this.gen.line(e,t,n,r,i);return this.draw(a),a}rectangle(e,t,n,r,i){let a=this.gen.rectangle(e,t,n,r,i);return this.draw(a),a}ellipse(e,t,n,r,i){let a=this.gen.ellipse(e,t,n,r,i);return this.draw(a),a}circle(e,t,n,r){let i=this.gen.circle(e,t,n,r);return this.draw(i),i}linearPath(e,t){let n=this.gen.linearPath(e,t);return this.draw(n),n}polygon(e,t){let n=this.gen.polygon(e,t);return this.draw(n),n}arc(e,t,n,r,i,a,o=!1,s){let c=this.gen.arc(e,t,n,r,i,a,o,s);return this.draw(c),c}curve(e,t){let n=this.gen.curve(e,t);return this.draw(n),n}path(e,t){let n=this.gen.path(e,t);return this.draw(n),n}},lt=`http://www.w3.org/2000/svg`,ut=class{constructor(e,t){this.svg=e,this.gen=new V(t)}draw(e){let t=e.sets||[],n=e.options||this.getDefaultOptions(),r=this.svg.ownerDocument||window.document,i=r.createElementNS(lt,`g`),a=e.options.fixedDecimalPlaceDigits;for(let o of t){let t=null;switch(o.type){case`path`:t=r.createElementNS(lt,`path`),t.setAttribute(`d`,this.opsToPath(o,a)),t.setAttribute(`stroke`,n.stroke),t.setAttribute(`stroke-width`,n.strokeWidth+``),t.setAttribute(`fill`,`none`),n.strokeLineDash&&t.setAttribute(`stroke-dasharray`,n.strokeLineDash.join(` `).trim()),n.strokeLineDashOffset&&t.setAttribute(`stroke-dashoffset`,`${n.strokeLineDashOffset}`);break;case`fillPath`:t=r.createElementNS(lt,`path`),t.setAttribute(`d`,this.opsToPath(o,a)),t.setAttribute(`stroke`,`none`),t.setAttribute(`stroke-width`,`0`),t.setAttribute(`fill`,n.fill||``),e.shape!==`curve`&&e.shape!==`polygon`||t.setAttribute(`fill-rule`,`evenodd`);break;case`fillSketch`:t=this.fillSketch(r,o,n)}t&&i.appendChild(t)}return i}fillSketch(e,t,n){let r=n.fillWeight;r<0&&(r=n.strokeWidth/2);let i=e.createElementNS(lt,`path`);return i.setAttribute(`d`,this.opsToPath(t,n.fixedDecimalPlaceDigits)),i.setAttribute(`stroke`,n.fill||``),i.setAttribute(`stroke-width`,r+``),i.setAttribute(`fill`,`none`),n.fillLineDash&&i.setAttribute(`stroke-dasharray`,n.fillLineDash.join(` `).trim()),n.fillLineDashOffset&&i.setAttribute(`stroke-dashoffset`,`${n.fillLineDashOffset}`),i}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,t){return this.gen.opsToPath(e,t)}line(e,t,n,r,i){let a=this.gen.line(e,t,n,r,i);return this.draw(a)}rectangle(e,t,n,r,i){let a=this.gen.rectangle(e,t,n,r,i);return this.draw(a)}ellipse(e,t,n,r,i){let a=this.gen.ellipse(e,t,n,r,i);return this.draw(a)}circle(e,t,n,r){let i=this.gen.circle(e,t,n,r);return this.draw(i)}linearPath(e,t){let n=this.gen.linearPath(e,t);return this.draw(n)}polygon(e,t){let n=this.gen.polygon(e,t);return this.draw(n)}arc(e,t,n,r,i,a,o=!1,s){let c=this.gen.arc(e,t,n,r,i,a,o,s);return this.draw(c)}curve(e,t){let n=this.gen.curve(e,t);return this.draw(n)}path(e,t){let n=this.gen.path(e,t);return this.draw(n)}},dt={canvas:(e,t)=>new ct(e,t),svg:(e,t)=>new ut(e,t),generator:e=>new V(e),newSeed:()=>V.newSeed()}.generator(),H=1,ft=1,pt=.45,mt=.2,ht=250,gt=.5;function _t(e){return e<=ht?1:Math.max(gt,ht/e)}var vt=.3,yt=220,bt=.35;function U(e){let t=0;for(let n=0;n<e.length;n+=1)t=t*31+e.charCodeAt(n)|0;return Math.abs(t)%2**31}var xt=2e3,W=new Map;function St(e,t){W.size>=xt&&W.delete(W.keys().next().value),W.set(e,t)}function G(e,t,n,r=H,i=ft){let a=`${t}|${n}|${r}|${i}|${e}`,o=W.get(a);if(o)return o;let s=dt.path(e,{seed:t,roughness:r,bowing:i,disableMultiStroke:!0,preserveVertices:!0,strokeWidth:n}),c=dt.toPaths(s).map(e=>e.d);return St(a,c),c}function Ct(e){let t=x(e),n={x:0,y:0,width:t.width,height:t.height},r=te(e.kind,n,e.corner,{x:e.flipX,y:e.flipY}),a=i(Math.min(t.width,t.height)/yt,bt,1);return G(r,U(e.id),e.strokeWidth,H*a,vt*a)}function wt(e,t,n){let r=U(t.id)+n;if(n>0)return G(e,r,1.5,.5,vt);let a=x(t),o=i(Math.min(a.width,a.height)/yt,bt,1);return G(e,r,1.5,H*o,vt*o)}function Tt(e,t,n,r,i){let a=U(r.id)+i,o=`disc|${a}|${e.toFixed(1)}|${t.toFixed(1)}|${n.toFixed(1)}`,s=W.get(o);if(s)return s;let c=dt.circle(e,t,n*2,{seed:a,roughness:H,bowing:ft,fill:`#000000`,fillStyle:`solid`,stroke:`none`,disableMultiStroke:!0}),l=dt.toPaths(c).filter(e=>e.fill&&e.fill!==`none`).map(e=>e.d);return St(o,l),l}function Et(e,t,n,r){let a=x(t),o=i(Math.min(a.width,a.height)/yt,bt,1);return G(e,U(t.id)+n,r,H*o,vt*o)}function Dt(e){return e.bendStyle===`elbow`?s(re(e)):Math.hypot(e.x2-e.x,e.y2-e.y)+Math.abs(e.bend)}function Ot(e){let t=_t(Dt(e));return G(S(e),U(e.id),e.strokeWidth,pt*t,mt*t)}function kt(e){let t=_t(s(e.points));return G(pe(e.points),U(e.id),e.strokeWidth,pt*t,mt*t)}var At=`#8a8f98`,jt=2,K=1.5,Mt=`#4dabf7`;function q(e,t,n,r=jt,i){return Et(t,e.shape,e.nextSalt(),r).map(e=>({kind:`path`,d:e,stroke:n,width:r,testId:i}))}function Nt(e,t,n,r){return[{kind:`rect`,x:t.x,y:t.y,width:t.width,height:t.height,rx:n,fill:r},...q(e,b(t.x,t.y,t.width,t.height,n),e.ink)]}function J(e,t,n,r,i,a={}){return{kind:`text`,x:t,y:n,text:r,size:a.size??e.shape.fontSize,color:i,family:e.shape.fontFamily,anchor:a.anchor??`start`,baseline:a.baseline??`middle`,testId:a.testId}}function Pt(e,t,n){return e.text.measure(t,n??e.shape.fontSize,e.shape.fontFamily)}function Y(e){return!e.fill||e.fill===`transparent`?null:e.fill}var Ft=1.6,It=.85,Lt=.85;function Rt(e){return Math.min(7,e.height*.18)}function zt(e){return 12+Rt(e)*2+12}function Bt(e){return Math.min(26,e.height)}function Vt(e){return Bt(e)*1.9+10}function Ht(e){return Math.min(e.height,e.width/3)}function Ut(e){return Math.min(e.height*.28,13)}function Wt(e){return Ut(e)*2+24}function Gt(e,t){let n=[],r=``;for(let i of e.split(/\s+/)){let e=r.length===0?i:`${r} ${i}`;e.length>t&&r.length>0?(n.push(r),r=i):r=e}return r.length>0&&n.push(r),n}function Kt(e,t,n){let r=n*.52;return Gt(e,Math.max(4,Math.floor(t/r)))}function qt(e,t,n){return e.split(/\r?\n/).flatMap(e=>e?Kt(e,t,n):[``])}var Jt=`#e7f5ff`;function Yt(e,t){let n=Y(e.shape);if(!n)return[];let{bounds:r}=e;return[{kind:`rect`,x:r.x,y:r.y,width:r.width,height:r.height,rx:t,fill:n}]}function Xt(e,t){let{bounds:n,ink:r}=e,i=Yt(e,t);return i.push(...q(e,b(n.x,n.y,n.width,n.height,t),r)),i}function Zt(e){return e.split(` | `).map(e=>e.trim()).filter(e=>e.length>0)}function Qt(e,t){return t===0?0:Math.max(0,Math.min(t-1,Math.round(e.value??0)))}var $t=`+id: string
|
|
2
|
+
+name: string
|
|
3
|
+
---
|
|
4
|
+
+save()
|
|
5
|
+
+delete()`,en=1.9,tn=1.4,nn=/^-{2,}$/;function rn(e){return(e??``).split(/\r?\n/).map(e=>e.trim()).filter(e=>e.length>0)}function an(e){return rn(e.body).map(e=>({text:e,divider:nn.test(e)}))}function on(e){return an(e).filter(e=>!e.divider).map(e=>e.text)}function sn(e){let t=e.fontSize*.9;return{fontSize:t,lineH:t*tn}}function cn(e){let t=x(e),n=on(e).length===0?t.height:Math.min(t.height,e.fontSize*en),r=t.x+12,i=t.width-24,{fontSize:a}=sn(e),o=t.y+n+4,s=t.y+t.height-4;return{title:{field:`label`,x:t.x,y:t.y,width:t.width,height:n,fontSize:e.fontSize},body:{field:`body`,x:r,y:o,width:i,height:Math.max(a,s-o),fontSize:a}}}function ln(e,t,n){let r=n*.9,i=r*tn,a=n*en,o=Math.round(a+4+t.length*i+8),s=(e,t)=>e.length*t*.62,c=Math.max(s(e,n),0,...t.filter(e=>!nn.test(e)).map(e=>s(e,r)));return{width:Math.max(160,Math.round(c+24+16)),height:o}}function un(e){let t=cn(e),{lineH:n}=sn(e),r=x(e).y+e.height;return an(e).map((e,r)=>({text:e.text,cy:t.body.y+n*(r+.5),divider:e.divider})).filter(e=>e.cy<=r)}function dn(e){let t=x(e);return un(e).filter(e=>!e.divider).map(({cy:e})=>({cy:e,left:{x:t.x,y:e},right:{x:t.x+t.width,y:e}}))}function fn(t){let{bounds:n,shape:r,ink:i}=t,a=cn(r),o=n.y+a.title.height,s=on(r).length>0,c=Y(r),l=[];c&&l.push({kind:`path`,d:s?v(n.x,n.y,n.width,a.title.height,6):b(n.x,n.y,n.width,n.height,6),fill:c,testId:`entity-header`}),l.push(...q(t,b(n.x,n.y,n.width,n.height,6),i)),s&&l.push(...q(t,oe(n.x,o,n.x+n.width,o),i,K));let u=r.label.trim();u&&l.push(J(t,n.x+n.width/2,n.y+a.title.height/2,u,c?e(c):i,{anchor:`middle`,testId:`entity-title`}));for(let{text:e,cy:o,divider:s}of un(r)){if(s){l.push(...q(t,oe(n.x,o,n.x+n.width,o),i,K,`entity-divider`));continue}l.push(J(t,a.body.x,o,e,i,{size:a.body.fontSize,testId:`entity-row`}))}return l}function X(e){return Math.min(e.height,pn(e.fontSize))}function pn(e){return e*2.4}var mn=12;function hn(e){if(!e.activations||e.activations.length===0)return[];let t=X(e),n=e.height;return e.activations.map(r=>{let i=Math.min(Math.max(r.top,t),Math.max(t,n-12)),a=Math.max(12,Math.min(r.height,n-i));return{x:e.x+e.width/2-mn/2,y:e.y+i,width:mn,height:a}})}function gn(e,t){for(let n of hn(e))if(t>=n.y&&t<=n.y+n.height)return n;return null}function _n(e){let t=X(e);return{x:e.x+e.width/2,y:e.y+t,width:0,height:Math.max(2,e.height-t)}}function vn(e){let t=X(e),n=Math.max(0,e.height-t),r=Math.min(Math.max(n*.12,16),64);return{top:t+r,height:Math.max(12,n-r*2)}}function yn(e){let t=hn(e);if(t.length===0)return vn(e);let n=X(e),r=t.map(t=>({top:t.y-e.y,bottom:t.y-e.y+t.height})).sort((e,t)=>e.top-t.top),i=[],a=n;for(let e of r)e.top>a&&i.push({start:a,end:e.top}),a=Math.max(a,e.bottom);a<e.height&&i.push({start:a,end:e.height});let o=i.sort((e,t)=>t.end-t.start-(e.end-e.start))[0];if(!o)return{top:Math.max(n,e.height-12),height:12};let s=o.end-o.start,c=Math.min(Math.max(s*.15,10),48);return{top:o.start+c,height:Math.max(12,s-c*2)}}var bn=12,xn=7,Sn=1.5;function Cn(t){let n=Y(t);return n?e(n):null}function wn(e){let{bounds:t,shape:n,ink:r}=e,i=X(n),a=t.x+t.width/2,o=Y(n)??ne.paper,s=Nt(e,{x:t.x,y:t.y,width:t.width,height:i},6,o);n.label.trim()&&s.push(J(e,a,t.y+i/2,n.label.trim(),Cn(n)??r,{anchor:`middle`,testId:`lifeline-name`}));let c=t.y+t.height;for(let e=t.y+i;e<c;e+=bn)s.push({kind:`line`,x1:a,y1:e,x2:a,y2:Math.min(e+xn,c),stroke:r,width:Sn});for(let t of hn(n))s.push(...Nt(e,t,2,o));return s}var Tn=[`opt`,`alt`,`loop`,`par`,`break`,`critical`,`seq`],En=`#f3f0ff`,Dn=14,On=8,kn=1.75,An=.1;function jn(e,t){let n=e.trimStart().match(/^\S+(\s[\s\S]*)?$/);return t+(n&&n[1]?n[1]:``)}function Mn(e){return Math.min(x(e).height,e.fontSize*kn)}function Nn(e,t){let n=x(e),r=e.label.trim()||`opt`,i=Math.min(n.width,t.measure(r,e.fontSize,e.fontFamily)+24);return{x:n.x,y:n.y,width:i,height:Mn(e)}}function Pn(e){let t=Math.min(On,e.width/2,e.height/2);return{tl:Math.min(Dn,e.width-t,e.height-t),br:t}}function Fn(e){let{x:t,y:n,width:r,height:i}=e,{tl:a,br:o}=Pn(e);return[`M ${t+a} ${n}`,`L ${t+r} ${n}`,`L ${t+r} ${n+i-o}`,`Q ${t+r} ${n+i} ${t+r-o} ${n+i}`,`L ${t} ${n+i}`,`L ${t} ${n+a}`,`Q ${t} ${n} ${t+a} ${n}`,`Z`].join(` `)}function In(e){let{x:t,y:n,width:r,height:i}=e,{br:a}=Pn(e);return`M ${t+r} ${n} L ${t+r} ${n+i-a} Q ${t+r} ${n+i} ${t+r-a} ${n+i} L ${t} ${n+i}`}function Ln(t){let{bounds:n,shape:r,ink:i}=t,a=Y(r)??`#f3f0ff`,o=Nn(r,t.text),s=[{kind:`path`,d:Fn(o),fill:a,testId:`fragment-tab`}];s.push(...q(t,b(n.x,n.y,n.width,n.height,Dn),i)),s.push(...q(t,In(o),i,K,`fragment-tab`));let c=r.label.trim();return c&&s.push(J(t,o.x+12,o.y+o.height/2+r.fontSize*An,c,e(a),{anchor:`start`,testId:`fragment-label`})),s}var Rn={entity:fn,lifeline:wn,fragment:Ln},zn=8,Z=[],Q={get(e){for(let t=Z.length-1;t>=0;--t)if(Z[t].shapes===e)return Z[t].index},has(e){return Q.get(e)!==void 0},set(e,t){Z.push({shapes:e,index:t}),Z.length>zn&&Z.shift()}};function Bn(e){if(e.type===`arrow`){let t=[];return e.startBinding&&t.push(e.startBinding.shapeId),e.endBinding&&t.push(e.endBinding.shapeId),t}return e.type===`polygon`&&e.band?[e.band.from,e.band.to]:[]}function Vn(e){let t=new Map,n=new Map,r=new Map;for(let i=0;i<e.length;i+=1){let a=e[i];t.has(a.id)||t.set(a.id,i);let o=r.get(a.type);o?o.push(i):r.set(a.type,[i]);for(let e of Bn(a)){let t=n.get(e);t?t.push(a.id):n.set(e,[a.id])}}return{position:t,dependents:n,byType:r}}function Hn(e){let t=Q.get(e);if(t)return t;let n=Vn(e);return Q.set(e,n),n}function Un(e,t){if(e===t||Q.has(t))return;let n=Q.get(e);if(!(!n||e.length!==t.length)){for(let n=0;n<t.length;n+=1){let r=e[n],i=t[n];if(r!==i&&!Gn(r,i))return}Q.set(t,n)}}function Wn(e,t,n){if(e===t||Q.has(t))return;let r=Q.get(e);if(!(!r||e.length!==t.length)){for(let r of n){let n=e[r],i=t[r];if(n!==i&&!Gn(n,i))return}Q.set(t,r)}}function Gn(e,t){return e.id===t.id&&e.type===t.type&&Kn(e,t)}function Kn(e,t){let n=Bn(t);if(n.length===0)return!0;let r=Bn(e);return n.every(e=>r.includes(e))}function qn(e,t){let{position:n}=Hn(e),r=[];for(let e of t){let t=n.get(e);t!==void 0&&r.push(t)}return r.sort((e,t)=>e-t),r.map(t=>e[t])}function Jn(e,t){let n=Q.get(e);return n?(n.byType.get(t)??[]).map(t=>e[t]):e.filter(e=>e.type===t)}function Yn(e){return Jn(e,`figure`)}function Xn(e,t){let n=Q.get(e);if(n){let r=n.position.get(t);return r===void 0?void 0:e[r]}return e.find(e=>e.id===t)}var Zn=.05;function Qn(e){return Number.isNaN(e)?1:i(e,Zn,8)}function $n(e){return{zoom:1,x:Number.isFinite(e.width)?e.width/2:0,y:Number.isFinite(e.height)?e.height/2:0}}function er(e,t){return{x:(e.x-t.x)/t.zoom,y:(e.y-t.y)/t.zoom}}function tr(e,t){return{x:e.x*t.zoom+t.x,y:e.y*t.zoom+t.y}}function nr(e,t,n){let r=Qn(t),i=er(n,e),a=n.x-i.x*r,o=n.y-i.y*r;return!Number.isFinite(a)||!Number.isFinite(o)?{zoom:r,x:n.x,y:n.y}:{zoom:r,x:a,y:o}}function rr(e,t,n,r=80,i=24){if(!a(e))return null;let o=tr({x:e.x,y:e.y},t),s=tr({x:e.x+e.width,y:e.y+e.height},t);if(o.x>=i&&o.y>=i&&s.x<=n.width-i&&s.y<=n.height-i)return null;if(e.width*t.zoom<=n.width-r*2&&e.height*t.zoom<=n.height-r*2){let r=e.x+e.width/2,i=e.y+e.height/2;return{zoom:t.zoom,x:n.width/2-r*t.zoom,y:n.height/2-i*t.zoom}}return ir(e,n,r)}function ir(e,t,n=80){if(!a(e))return $n(t);let r=Math.max(1,t.width-n*2),i=Math.max(1,t.height-n*2),o=Qn(Math.min(r/e.width,i/e.height,1)),s=e.x+e.width/2,c=e.y+e.height/2,l={zoom:o,x:t.width/2-s*o,y:t.height/2-c*o};return!Number.isFinite(l.x)||!Number.isFinite(l.y)?$n(t):l}function ar(e,t,n,i){return n.id===e.id?!1:n.type===`figure`?cr(t,x(n,i)):o(r(x(n,i)),t)}function or(e,t,r){let i=x(t,r);return e.filter(e=>(_(e)||n(le(e),i))&&ar(t,i,e,r))}function sr(e,t,n){let i=e.map((e,t)=>({x:r(x(e,n)).x,order:t,shape:e})).sort((e,t)=>e.x-t.x),a=i.map(e=>e.x),o=e=>{let t=0,n=a.length;for(;t<n;){let r=t+n>>1;a[r]<e?t=r+1:n=r}return t},s=e=>{let t=0,n=a.length;for(;t<n;){let r=t+n>>1;a[r]<=e?t=r+1:n=r}return t};return{members(e){let r=x(e,n),a=o(r.x),c=s(r.x+r.width);t?.onCandidates?.(Math.max(0,c-a));let l=[];for(let t=a;t<c;t+=1){let a=i[t];ar(e,r,a.shape,n)&&l.push(a)}return l.sort((e,t)=>e.order-t.order),l.map(e=>e.shape)}}}function cr(e,t){return t.x>=e.x&&t.y>=e.y&&t.x+t.width<=e.x+e.width&&t.y+t.height<=e.y+e.height}function lr(e,t){let n=x(t);return e.some(e=>e.type===`figure`&&e.id!==t.id&&cr(x(e),n))}function $(e){let t=e.filter(e=>e.type===`figure`),n=t.map(e=>x(e)),r=new Set;for(let e=0;e<t.length;e+=1)for(let i=0;i<t.length;i+=1)if(e!==i&&cr(n[i],n[e])){r.add(t[e].id);break}return r}function ur(e,t,n){let r=new Set(t.map(e=>e.id)),i=[...t];if(r.size>=e.length)return i;let a=t.filter(e=>e.type===`figure`),o=a.length>2?sr(e,void 0,n):null;for(let t of a){let a=o?o.members(t):or(e,t,n);for(let e of a)r.has(e.id)||(r.add(e.id),i.push(e))}return i}var dr=64,fr=480,pr=270;function mr(e,t){return e.type===`figure`&&e.slideOrder!==void 0&&!e.groupId&&(e.kind??`simple`)===`simple`&&!t.has(e.id)}function hr(e){let t=Yn(e);return _r(t,$(t))}function gr(e){return e.filter(e=>!e.slideSkipped)}function _r(e,t){return e.filter(e=>mr(e,t)).sort((e,t)=>(e.slideOrder??0)-(t.slideOrder??0))}function vr(e,t){let n=(p(e.label)?ae(e.label):e.label).trim();return n.length>0?n:`Frame ${t+1}`}function yr(e,t){return vr(e,t).toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-|-$/g,``)||`slide-${t+1}`}function br(e,t,n){let r=[...e],[i]=r.splice(t,1);return r.splice(n,0,i),r.map((e,t)=>({...e,slideOrder:t}))}function xr(e,t,n=1){return e.map((e,r)=>({...e,slideOrder:r<t?r:r+n}))}function Sr(e,t,n=[]){let r=e[e.length-1],i=r&&r.width>=fr&&r.height>=pr,a=i?r.width:960,o=i?r.height:540,s=r?null:m(n),c,u;return r?(c=Math.max(...e.map(e=>e.x+e.width))+dr,u=r.y):s?(c=s.x+s.width+dr,u=s.y+s.height/2-o/2):(c=t.x-a/2,u=t.y-o/2),{id:ie(),type:`figure`,x:c,y:u,width:a,height:o,rotation:0,label:`Frame ${e.length+1}`,fontSize:24,fontFamily:d,color:l,fill:`#ffffff`,opacity:1,slideOrder:e.length}}function Cr(e,t,n){let r=t[n],i=or(e,r),a={x:Math.max(...t.map(e=>e.x+e.width))+dr-r.x,y:0},[o,...s]=se([r,...i],a);return{clones:[{...o,slideOrder:n+1},...s],renumbered:xr(t,n+1)}}function wr(e,t){return new Set([t.id,...or(e,t).map(e=>e.id)])}function Tr(e,t){let n=$(e);return e.filter(e=>Er(t,e,n))}function Er(e,t,n){if(t.id===e.id||t.type===`figure`&&!n.has(t.id))return!1;let r=x(e),i=le(t);return i.x<r.x+r.width&&i.x+i.width>r.x&&i.y<r.y+r.height&&i.y+i.height>r.y}function Dr(e,t,n){if(n.size===0||t.length===0)return null;let r=$(e),i=null;for(let a of e){if(!n.has(a.id))continue;let e=t.find(e=>e.id===a.id)??Or(t,a,r);if(e){if(i&&i.id!==e.id)return null;i=e}}return i}function Or(e,t,n){let r=null,i=1/0;for(let a of e){if(!Er(a,t,n))continue;let e=x(a),o=e.width*e.height;o<i&&(r=a,i=o)}return r}function kr(e,t){let n=Qn(Math.min(t.width/e.width,t.height/e.height));return{zoom:n,x:t.width/2-(e.x+e.width/2)*n,y:t.height/2-(e.y+e.height/2)*n}}function Ar(e,t,n){return jr(e,er({x:n.width/2,y:n.height/2},t))}function jr(e,t){let n=-1,r=1/0;return e.forEach((e,i)=>{let a=x(e),o=t.x>=a.x&&t.x<=a.x+a.width&&t.y>=a.y&&t.y<=a.y+a.height,s=a.width*a.height;o&&s<r&&(n=i,r=s)}),n}export{yn as $,Xn as A,he as At,Rn as B,er as C,Kt as Ct,Un as D,kt as Dt,Bn as E,wt as Et,tn as F,Ce as Ft,Mn as G,ln as H,En as I,me as It,gn as J,jn as K,An as L,fe as Lt,qn as M,C as Mt,Jn as N,xe as Nt,Wn as O,Ct as Ot,$t as P,Se as Pt,Cn as Q,Tn as R,pe as Rt,rr as S,Gt as St,nr as T,Tt,dn as U,cn as V,Nn as W,X,_n as Y,pn as Z,or as _,Pt as _t,kr as a,Lt as at,Qn as b,Vt as bt,br as c,Qt as ct,Dr as d,Xt as dt,It as et,vr as f,Rt as ft,ur as g,q as gt,sr as h,Ht as ht,hr as i,At as it,Hn as j,ge as jt,Yn as k,_e as kt,Tr as l,Ut as lt,Er as m,Zt as mt,Sr as n,Ft as nt,gr as o,Mt as ot,wr as p,zt as pt,hn as q,Cr as r,Jt as rt,xr as s,Y as st,Ar as t,K as tt,yr as u,Wt as ut,lr as v,J as vt,tr as w,Ot as wt,ir as x,qt as xt,$ as y,Bt as yt,Sn as z};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{t}from"./react-lCSYwAWP.js";import{t as n}from"./jsx-runtime-DKdBMi_L.js";import{t as r}from"./tooltip-CKCG8vcp.js";import{i}from"./useTriggerFocusGuards-Mibi8yYw.js";import{C as a,a as o,c as s,d as c,f as l,m as u,n as d,o as f,p,r as m,w as h}from"./menu-4xb5HtA1.js";import{i as g}from"./config-D8b1QyEk.js";import{a as ee,o as _}from"./editor-DAJETlQW.js";import{_ as v,g as y,t as b}from"./reflow-C6bvnSVm.js";import{W as x}from"./style-BENGW2ZV.js";import{J as S,R as C,W as w,j as T,vt as te}from"./shapes-D5w8NTQQ.js";import{A as ne,C as re,c as E,d as D,f as O,i as k,l as ie,n as ae,o as oe,p as se,r as ce,s as le,t as A,u as ue,x as de}from"./slides-DDNzjFz9.js";import{n as fe}from"./renderer-environment-D3n3hbug.js";import{_ as pe,m as me}from"./panel-controls-B0Ccd0XF.js";import{t as j}from"./createReactComponent-C51FAx3B.js";import{n as he,r as ge,t as _e}from"./IconTrash-C8w6ThWx.js";import{t as ve}from"./IconArrowLeft-B4Zcy-Fc.js";import{n as M,t as ye}from"./IconPlayerStopFilled-D4qdct2R.js";import{t as be}from"./IconChevronLeft-D7e7QC0h.js";import{t as N}from"./IconChevronRight-csfMBSUs.js";import{t as xe}from"./IconCode-CHIz1nCU.js";import{a as Se,c as Ce,d as we,f as Te,i as Ee,l as P,n as De,o as Oe,r as ke,s as Ae,t as je,u as Me}from"./ContextMenuTrigger-CXUL1E23.js";import{a as Ne,c as Pe,i as F,n as Fe,o as Ie,r as Le,s as Re,t as ze}from"./build-visibility-CAmmsnmF.js";import{t as Be}from"./IconPencil-D_pQsAyv.js";import{t as Ve}from"./IconPlus-D4tAoi-A.js";import{n as He,r as Ue,t as We}from"./use-drag-reorder-ye8-kpyR.js";import{t as Ge}from"./IconSparkles-CnCp3BCQ.js";import{t as Ke}from"./IconX-KrRqxr2j.js";import{t as qe}from"./IconPlayerPlayFilled-DVAWmYt7.js";import{a as Je,i as Ye,l as Xe,r as Ze,t as Qe}from"./PopoverPopup-1zO38CRl.js";import{t as $e}from"./use-export-command-BR-A4kAa.js";import{n as et}from"./surface-Dke4SWpE.js";import{_ as tt,a as nt,c as rt,d as it,f as at,h as ot,i as st,l as ct,m as lt,n as ut,o as dt,p as ft,r as pt,t as mt,u as ht,v as gt,y as _t}from"./plan-D4Jyzo5X.js";import{a as vt,c as yt,d as bt,f as xt,i as St,l as Ct,n as wt,o as Tt,r as Et,s as Dt,t as Ot,u as kt}from"./edit-B4DMFSZr.js";import{a as At,c as jt}from"./chrome-C2RCq3SI.js";import{i as Mt,n as Nt,r as Pt,t as Ft}from"./DialogRoot-DUeVfNhS.js";import{n as It,t as Lt}from"./DialogTitle-D5au2NAn.js";import{n as Rt,t as zt}from"./shape-meta-YgfIm0bQ.js";import{r as Bt}from"./chrome-layout-D5dql-y4.js";import{t as Vt}from"./panel-shell-COqmheb-.js";import{A as I,C as L,D as R,E as z,O as B,S as V,T as Ht,_ as Ut,a as H,b as Wt,c as Gt,d as Kt,f as U,g as qt,h as Jt,i as Yt,k as W,l as G,m as K,n as Xt,o as Zt,p as Qt,r as q,s as J,t as $t,u as en,v as tn,w as Y,x as nn,y as rn}from"./builders-DrWdKwLQ.js";import{n as an,t as on}from"./export-u442sUQs.js";var sn=j(`outline`,`grip-vertical`,`GripVertical`,[[`path`,{d:`M8 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-0`}],[`path`,{d:`M8 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-1`}],[`path`,{d:`M8 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-2`}],[`path`,{d:`M14 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-3`}],[`path`,{d:`M14 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-4`}],[`path`,{d:`M14 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-5`}]]),cn=j(`outline`,`player-skip-back`,`PlayerSkipBack`,[[`path`,{d:`M20 5v14l-12 -7l12 -7`,key:`svg-0`}],[`path`,{d:`M4 5l0 14`,key:`svg-1`}]]),ln=j(`filled`,`pointer-filled`,`PointerFilled`,[[`path`,{d:`M3.039 4.277l3.904 13.563c.185 .837 .92 1.516 1.831 1.642l.17 .016a2.2 2.2 0 0 0 1.982 -1.006l.045 -.078l1.4 -2.072l4.05 4.05a2.067 2.067 0 0 0 2.924 0l1.047 -1.047c.388 -.388 .606 -.913 .606 -1.461l-.008 -.182a2.067 2.067 0 0 0 -.598 -1.28l-4.047 -4.048l2.103 -1.412c.726 -.385 1.18 -1.278 1.053 -2.189a2.2 2.2 0 0 0 -1.701 -1.845l-13.524 -3.89a1 1 0 0 0 -1.236 1.24z`,key:`svg-0`}]]),X=e(t(),1);function un(e,t){if(!t)return zt(e[0]);let n=e.find(e=>Rt(e).trim().length>0);return n?zt(n):`Group of ${e.length}`}var Z={enter:`Entry`,emphasis:`Emphasis`,exit:`Exit`},Q=n();function dn(e){let{units:t,idleCount:n,variant:r=`filled`,hasBuild:i,onHover:a,onAdd:o,onSweep:s}=e,c=r===`primary`,l=()=>{c&&(d(!1),a(null))},[u,d]=(0,X.useState)(!1);return(0,Q.jsxs)(Je,{open:u,onOpenChange:e=>{d(e),e||a(null)},children:[(0,Q.jsx)(pe,{"data-testid":`animate-add-open`,className:c?`mt-1 flex h-8 w-full cursor-pointer items-center justify-center gap-1.5 rounded-lg bg-[var(--chrome-accent)] text-[12px] text-white transition-colors hover:bg-[var(--chrome-accent-hover)]`:`flex h-8 w-full cursor-pointer items-center justify-center gap-1.5 rounded-lg bg-[var(--chrome-rest)] text-[12px] text-[var(--chrome-fg-900)] transition-colors hover:bg-[var(--chrome-hover)]`,children:c?`Choose what animates`:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Ve,{size:13,stroke:1.75}),`Add animation`,n>0&&(0,Q.jsxs)(`span`,{"data-testid":`animate-add-count`,className:`text-[var(--chrome-fg-400)]`,children:[`· `,n,` not animated`]})]})}),(0,Q.jsx)(Ye,{children:(0,Q.jsx)(Ze,{side:`left`,align:`end`,sideOffset:8,collisionPadding:8,children:(0,Q.jsxs)(Qe,{"data-overlay":!0,"data-testid":`animate-add-list`,onPointerDown:e=>e.stopPropagation(),className:`flex max-h-[60vh] w-72 flex-col overflow-y-auto p-1.5 ${et.popup}`,children:[n>0&&(0,Q.jsxs)(`button`,{type:`button`,"data-testid":`animate-one-by-one`,onClick:()=>{s(),d(!1),a(null)},className:`mb-1 flex h-7 shrink-0 cursor-pointer items-center justify-between gap-2 rounded-lg px-2 text-[11px] font-medium text-[var(--chrome-fg-900)] transition-colors hover:bg-[var(--chrome-hover)]`,children:[(0,Q.jsx)(`span`,{children:i?`Add the remaining ${n}`:`Animate all ${n}, one by one`}),(0,Q.jsx)(Ae,{size:12,stroke:2})]}),t.map(e=>{let t=e.shapes[0],n=new Set(mt(t).map(e=>e.kind));return(0,Q.jsxs)(`div`,{"data-testid":`animate-add-row`,onPointerEnter:()=>a(t.id),onPointerLeave:()=>a(null),className:`flex h-8 shrink-0 items-center gap-2 rounded-lg px-2 text-[12px] text-[var(--chrome-fg-700)] hover:bg-[var(--chrome-hover)]`,children:[e.groupId&&(0,Q.jsx)(Se,{size:12,stroke:1.75,className:`shrink-0 text-[var(--chrome-fg-400)]`}),(0,Q.jsx)(`span`,{className:`flex-1 truncate`,children:un(e.shapes,e.groupId)}),ht(t).map(t=>{let r=t!==`emphasis`&&n.has(t);return(0,Q.jsx)(`button`,{type:`button`,"data-testid":`animate-add-${t}`,disabled:r,title:r?`Already has ${Z[t].toLowerCase()}`:`Add ${Z[t].toLowerCase()}`,onClick:()=>{o(e,t),l()},className:`h-5 shrink-0 cursor-pointer rounded px-1.5 text-[10px] font-medium transition-colors ${r?`cursor-default bg-[var(--chrome-active)] text-[var(--chrome-fg-400)]`:`text-[var(--chrome-fg-600)] ring-1 ring-[var(--chrome-ring)] hover:bg-[var(--chrome-hover)] hover:text-[var(--chrome-fg-900)]`}`,children:Z[t]},t)})]},gt(e))})]})})})]})}var fn={click:``,with:`Plays with the step above`,after:`Plays on its own, as soon as the step above finishes`};function pn(e){let{unit:t,click:n,playing:r,start:a,canJoin:o,pointed:s,unseen:c,selected:l,viewMode:u,handlers:d,onSplit:f,onMerge:p,onSetEffect:m,onSetDelay:h,onSetDirection:g,onSetKind:ee,onSetStart:_,onPreviewEffect:v,onRemove:y}=e,b=t.items[0],x=b.shape,S=b.animation,C=mt(x).filter((e,t)=>t!==b.index).map(e=>e.kind),w=f??p;return(0,Q.jsxs)(`div`,{className:`group flex h-8 touch-none items-center gap-1.5 rounded-lg pl-1 pr-1 text-[12px] transition-colors ${r?`bg-[var(--chrome-accent)] text-white`:l?`bg-[var(--chrome-active)]`:s?`bg-[var(--chrome-hover)]`:`hover:bg-[var(--chrome-hover)]`}`,...d,children:[(0,Q.jsx)(sn,{size:13,stroke:1.75,className:`shrink-0 cursor-grab text-[var(--chrome-fg-300)]`}),(0,Q.jsx)(`span`,{className:`flex w-4 shrink-0 items-center justify-center text-[11px] tabular-nums ${r?`text-white/70`:`text-[var(--chrome-fg-500)]`}`,title:a===`click`?void 0:fn[a],children:a===`click`?n:``}),w&&!u?(0,Q.jsx)(`button`,{type:`button`,"data-testid":f?`animate-group-split`:`animate-group-merge`,title:f?`Animate this group's shapes one by one`:`Play these back as one group`,onPointerDown:e=>e.stopPropagation(),onClick:w,className:`flex h-5 w-4 shrink-0 cursor-pointer items-center justify-center rounded ${r?`text-white/70`:`text-[var(--chrome-fg-400)]`} hover:text-[var(--chrome-fg-900)]`,children:f?(0,Q.jsx)(N,{size:12,stroke:2}):(0,Q.jsx)(i,{size:12,stroke:2})}):w&&(0,Q.jsx)(`span`,{className:`w-4 shrink-0`}),(0,Q.jsx)(`span`,{className:`flex-1 truncate ${r?``:`text-[var(--chrome-fg-900)]`}`,children:un(t.items.map(e=>e.shape),t.groupId)}),c&&(0,Q.jsx)(`span`,{"data-testid":`animate-row-unseen`,title:`This plays while the shape is off screen, so it will not be seen`,className:`shrink-0 ${r?`text-white/70`:`text-[var(--chrome-fg-400)]`}`,children:(0,Q.jsx)(we,{size:12,stroke:1.75})}),S.kind!==`enter`&&(0,Q.jsx)(`span`,{"data-testid":`animate-kind-${S.kind}`,className:`shrink-0 rounded px-1 text-[10px] uppercase tracking-wide ring-1 ${r?`text-white/70 ring-white/30`:`text-[var(--chrome-fg-500)] ring-[var(--chrome-ring)]`}`,children:S.kind}),(0,Q.jsx)(mn,{shape:x,kind:S.kind,kindsTaken:C,effect:S.effect,duration:S.duration,delay:S.delay,direction:S.direction,start:a,canJoin:o,disabled:u,onSetEffect:m,onSetDelay:h,onSetDirection:g,onSetKind:ee,onSetStart:_,onPreviewEffect:v}),!u&&(0,Q.jsx)(`button`,{"data-testid":`animate-remove`,title:`Remove from the build`,onPointerDown:e=>e.stopPropagation(),className:`flex h-5 w-5 shrink-0 cursor-pointer items-center justify-center rounded text-[var(--chrome-fg-400)] opacity-0 hover:bg-[var(--chrome-hover)] group-hover:opacity-100`,onClick:y,children:(0,Q.jsx)(Ke,{size:12,stroke:2})})]})}function mn(e){let{shape:t,kind:n,kindsTaken:r,effect:i,duration:a,delay:o,direction:s,start:c,canJoin:l,disabled:u,onSetEffect:d,onSetDelay:f,onSetDirection:p,onSetKind:m,onSetStart:h,onPreviewEffect:g}=e,[ee,_]=(0,X.useState)(!1),b=v.filter(e=>w(t,e)&&C(e,n)),x=ht(t),S=Ne(i);return(0,Q.jsxs)(Je,{open:ee,onOpenChange:_,children:[(0,Q.jsxs)(pe,{"data-testid":`animate-effect-chip`,disabled:u,onPointerDown:e=>e.stopPropagation(),className:`flex h-6 shrink-0 cursor-pointer items-center gap-0.5 rounded-md bg-[var(--chrome-rest)] pl-1.5 pr-1 text-[11px] text-[var(--chrome-fg-600)] ring-1 ring-[var(--chrome-ring)] transition-colors hover:bg-[var(--chrome-hover)] data-[popup-open]:bg-[var(--chrome-active)] disabled:cursor-default`,children:[S.label,(0,Q.jsx)(Xe,{})]}),(0,Q.jsx)(Ye,{children:(0,Q.jsx)(Ze,{side:`left`,align:`center`,sideOffset:8,collisionPadding:8,children:(0,Q.jsxs)(Qe,{"data-overlay":!0,onPointerDown:e=>e.stopPropagation(),className:`w-64 p-2.5 ${et.popup}`,children:[x.length>1&&(0,Q.jsx)(`div`,{className:`mb-2 flex items-center gap-1 border-b border-[var(--chrome-ring)] pb-2`,children:x.map(e=>{let t=e!==n&&e!==`emphasis`&&r.includes(e);return(0,Q.jsx)(`button`,{type:`button`,"data-testid":`animate-kind-set-${e}`,"aria-pressed":e===n,disabled:t,title:t?`This shape already has an ${Z[e]} row`:void 0,onClick:()=>m(e),className:`flex h-7 flex-1 cursor-pointer items-center justify-center rounded-lg text-[11px] font-medium transition-colors disabled:cursor-default disabled:opacity-40 ${jt(e===n)}`,children:Z[e]},e)})}),(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsx)(`div`,{className:`px-1 text-[11px] text-[var(--chrome-fg-500)]`,children:`Effect`}),(0,Q.jsx)(`div`,{className:`flex flex-col gap-0.5`,children:b.map(e=>(0,Q.jsxs)(`div`,{className:`flex h-7 items-center gap-1 rounded-lg pr-0.5 text-[11px] transition-colors ${jt(e===i)}`,children:[(0,Q.jsxs)(`button`,{type:`button`,"data-testid":`animate-effect-${e}`,"aria-pressed":e===i,onClick:()=>d(e,a),className:`flex h-full flex-1 cursor-pointer items-center justify-between gap-1 rounded-l-lg pl-2 font-medium`,children:[Le[e].label,(0,Q.jsxs)(`span`,{className:`text-[10px] tabular-nums text-[var(--chrome-fg-400)]`,children:[Math.round(F(e,e===i?a:void 0,t)),`ms`]})]}),(0,Q.jsx)(`button`,{type:`button`,"data-testid":`animate-effect-play-${e}`,"aria-label":`Preview ${Le[e].label} on the slide`,title:`Play this on the shape`,onClick:()=>g(e,e===i?a:void 0),className:`flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-md text-[var(--chrome-fg-500)] transition-colors hover:bg-[var(--chrome-hover)] hover:text-[var(--chrome-fg-900)]`,children:(0,Q.jsx)(qe,{size:10})})]},e))})]}),Re(S)&&(0,Q.jsxs)(`div`,{className:`mt-1 space-y-1 border-t border-[var(--chrome-ring)] pt-2`,children:[(0,Q.jsx)(`div`,{className:`px-1 text-[11px] text-[var(--chrome-fg-500)]`,children:`Direction`}),(0,Q.jsx)(`div`,{className:`flex items-center gap-1`,children:y.map(e=>{let t=(s??S.defaultDirection)===e;return(0,Q.jsx)(`button`,{type:`button`,"data-testid":`animate-direction-${e}`,"aria-pressed":t,"aria-label":gn[e],title:gn[e],onClick:()=>p(e),className:`flex h-7 flex-1 cursor-pointer items-center justify-center rounded-lg text-[11px] font-medium transition-colors ${jt(t)}`,children:(0,Q.jsx)(_n,{direction:e})},e)})})]}),(0,Q.jsxs)(`div`,{className:`mt-1 space-y-1 border-t border-[var(--chrome-ring)] pt-2`,children:[(0,Q.jsx)(`div`,{className:`px-1 text-[11px] text-[var(--chrome-fg-500)]`,children:`Start`}),(0,Q.jsx)(`div`,{className:`flex flex-col gap-0.5`,children:vn.map(e=>(0,Q.jsx)(`button`,{type:`button`,"data-testid":`animate-start-${e.mode}`,"aria-pressed":c===e.mode,disabled:e.mode===`with`&&!l,onClick:()=>h(e.mode),className:`flex h-7 items-center rounded-lg px-2 text-[11px] font-medium transition-colors disabled:cursor-default disabled:opacity-40 ${jt(c===e.mode)}`,children:e.label},e.mode))})]}),(0,Q.jsxs)(`div`,{className:`mt-1 flex gap-2 border-t border-[var(--chrome-ring)] pt-2`,children:[(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-1`,children:[(0,Q.jsx)(`div`,{className:`px-1 text-[11px] text-[var(--chrome-fg-500)]`,children:`Duration`}),(0,Q.jsx)(me,{label:`duration in milliseconds`,testId:`animate-duration`,value:Math.round(F(i,a,t)),min:80,max:4e3,step:40,fullWidth:!0,onChange:e=>d(i,e)})]}),c!==`click`&&(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-1`,children:[(0,Q.jsx)(`div`,{className:`px-1 text-[11px] text-[var(--chrome-fg-500)]`,children:`Delay`}),(0,Q.jsx)(me,{label:`delay in milliseconds`,testId:`animate-delay`,value:Math.round(Math.max(0,o??0)),min:0,max:1e4,step:100,fullWidth:!0,onChange:f})]})]})]})})})]})}var hn={up:he,down:ge,left:ve,right:M},gn={up:`Upward`,down:`Downward`,left:`Leftward`,right:`Rightward`};function _n(e){let{direction:t}=e,n=hn[t];return(0,Q.jsx)(n,{size:13,stroke:2})}var vn=[{mode:`click`,label:`On click`},{mode:`with`,label:`With previous`},{mode:`after`,label:`After previous`}],yn=`flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-md text-[var(--chrome-fg-600)] transition-colors hover:bg-[var(--chrome-hover)] disabled:cursor-default disabled:text-[var(--chrome-fg-300)] disabled:hover:bg-transparent`,bn=4,xn=380,Sn=200;function Cn(e){let{figure:t,index:n,total:r,onBack:i,onGoToSlide:a,onFocusSlide:o,viewMode:s}=e,{store:c,history:l}=ee(),u=_(e=>e.shapes),d=_(e=>e.selectedIds),f=_(e=>e.hoveredId),p=Fe(),m=(0,X.useMemo)(()=>at(u,t),[u,t]),h=(0,X.useMemo)(()=>tt(u,t),[u,t]),g=(0,X.useMemo)(()=>ut(m,h),[m,h]),v=(0,X.useMemo)(()=>lt(u,t,h),[u,t,h]),y=(0,X.useMemo)(()=>st(u,t,h),[u,t,h]),b=(0,X.useMemo)(()=>_t(m),[m]),x=(0,X.useMemo)(()=>y.filter(e=>e.shapes.some(e=>d.has(e.id))),[y,d]),S=(0,X.useMemo)(()=>{let e=new Map;g.forEach((t,n)=>{let r=t.groupId?void 0:t.items[0].shape.groupId;r&&!e.has(r)&&e.set(r,n)});let t=new Map;for(let[n,r]of e)g.filter(e=>e.items[0].shape.groupId===n).length>1&&t.set(r,n);return t},[g]),C=(0,X.useMemo)(()=>{let e=0;return g.map((t,n)=>(n>0&&!t.withPrevious&&(e+=1),e))},[g]),w=(0,X.useMemo)(()=>pt(m),[m]);function te(e,t){E(wt(m,[e],t===`enter`?ot(e.shapes[0]):void 0,t))}function re(){E(A?wt(m,v):Ot(u,t))}function E(e){e.length!==0&&(l.beginTransaction(),c.getState().replaceMany(e),l.endTransaction())}(0,X.useEffect)(()=>{o(t)},[t.id]);let[D,O]=(0,X.useState)(null);(0,X.useLayoutEffect)(()=>{if(D===null||D<0)return;let e=m[D];e&&p.play(e,T(t))},[D,m,t,p]),(0,X.useEffect)(()=>{if(D===null)return;let e=D>=0?m[D]:null,t=m[D+1]?.afterPrevious?0:xn,n=(e?Ie(e):0)+t,r=setTimeout(()=>{O(e=>e===null||e+1>=m.length?null:e+1)},n);return()=>clearTimeout(r)},[D,m]);let[k,ie]=(0,X.useState)(null);function ae(e,t,n){O(null),p.cancel(),ie({items:e.map(e=>({shape:e.shape,index:e.index,start:0,row:e.row,animation:{...e.animation,step:0,effect:nt(e.shape,t,e.animation.kind),duration:n,delay:void 0}})),armed:e[0]?.animation.kind===`exit`})}(0,X.useEffect)(()=>{if(!k||k.armed)return;let e=setTimeout(()=>ie(e=>e&&!e.armed?{...e,armed:!0}:e),Sn);return()=>clearTimeout(e)},[k]),(0,X.useLayoutEffect)(()=>{if(!k?.armed)return;let e=k.items.some(e=>e.animation.kind===`exit`);p.play({index:0,items:k.items,afterPrevious:!1},T(t)).then(()=>{e&&window.setTimeout(()=>p.cancel(),Sn)})},[k,t,p]),(0,X.useEffect)(()=>{O(null),ie(null)},[m]);function oe(){if(ie(null),D!==null){p.cancel(),O(null);return}m.length!==0&&(o(t),p.cancel(),O(-1))}let se=(0,X.useMemo)(()=>{let e=new Set;if(!f)return e;e.add(f);let t=ne(u,f);return t?.groupId&&h.has(t.groupId)&&e.add(t.groupId),e},[f,u,h]);function ce(e){return{onPointerEnter:()=>c.getState().setHoveredId(e),onPointerLeave:()=>c.getState().setHoveredId(null)}}(0,X.useEffect)(()=>()=>c.getState().setHoveredId(null),[c]);let le=We({count:g.length,gap:bn,disabled:s,onReorder:(e,t)=>E(Tt(g,e,t)),onPress:e=>{let t=g[e];t&&c.getState().setSelectedIds(new Set(t.items.map(e=>e.shape.id)))}}),A=g.length>0;return(0,Q.jsxs)(Q.Fragment,{children:[D!==null&&(0,Q.jsx)(ze,{pending:rt(m,D)}),k&&!k.armed&&(0,Q.jsx)(ze,{pending:new Set(k.items.map(e=>e.shape.id))}),(0,Q.jsxs)(`div`,{className:`flex flex-col gap-1.5 bg-[var(--chrome-rest)] px-3 pb-3 pt-2.5`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(Ae,{size:15,stroke:1.75,className:`shrink-0 text-[var(--chrome-fg-500)]`}),(0,Q.jsx)(`span`,{className:`flex-1 truncate text-[13px] font-medium text-[var(--chrome-fg-900)]`,children:`Animate`}),(0,Q.jsx)(`button`,{type:`button`,"data-testid":`animate-done`,title:`Back to the deck (Esc)`,onClick:i,className:`flex h-7 shrink-0 cursor-pointer items-center rounded-lg bg-[var(--chrome-accent)] px-3 text-[12px] text-white transition-colors hover:bg-[var(--chrome-accent-hover)]`,children:`Done`})]}),(0,Q.jsxs)(`div`,{className:`flex h-7 items-center justify-between rounded-lg bg-[var(--chrome-popup)] px-0.5 ring-1 ring-[var(--chrome-ring)]`,children:[(0,Q.jsx)(`button`,{className:yn,"data-testid":`animate-prev-slide`,"aria-label":`Previous slide`,disabled:n===0,onClick:()=>a(n-1),children:(0,Q.jsx)(be,{size:14,stroke:1.75})}),(0,Q.jsxs)(`span`,{className:`truncate text-[12px] tabular-nums text-[var(--chrome-fg-700)]`,children:[`Slide `,n+1,` of `,r]}),(0,Q.jsx)(`button`,{className:yn,"data-testid":`animate-next-slide`,"aria-label":`Next slide`,disabled:n>=r-1,onClick:()=>a(n+1),children:(0,Q.jsx)(N,{size:14,stroke:1.75})})]})]}),!s&&x.length>0&&(0,Q.jsxs)(`div`,{"data-testid":`animate-selection`,className:`mx-3 mb-2 flex h-8 shrink-0 items-center gap-2 rounded-[10px] bg-[var(--chrome-rest)] px-2.5`,children:[(0,Q.jsx)(ln,{size:12,className:`shrink-0 text-[var(--chrome-fg-400)]`}),(0,Q.jsx)(`span`,{className:`flex-1 truncate text-[11.5px] text-[var(--chrome-fg-900)]`,children:x.length===1?un(x[0].shapes,x[0].groupId):`${x.length} shapes`}),Tn(x).map(e=>(0,Q.jsx)(`button`,{type:`button`,"data-testid":`animate-selection-${e}`,title:`Add ${Z[e].toLowerCase()}`,onClick:()=>{for(let t of x)te(t,e)},className:`h-5 shrink-0 cursor-pointer rounded px-1.5 text-[10px] font-medium text-[var(--chrome-fg-600)] ring-1 ring-[var(--chrome-ring)] transition-colors hover:bg-[var(--chrome-hover)] hover:text-[var(--chrome-fg-900)]`,children:Z[e]},e))]}),(0,Q.jsxs)(`div`,{ref:le.listRef,"data-testid":`animate-list`,className:`flex flex-1 flex-col overflow-y-auto px-3 pb-3 pt-2`,children:[!A&&(0,Q.jsx)(`div`,{className:`px-1 pt-4`,children:y.length===0?(0,Q.jsx)(`div`,{className:`text-balance px-1 py-6 text-center text-[11px] leading-relaxed text-[var(--chrome-fg-400)]`,children:`Nothing on this slide to animate yet.`}):(0,Q.jsxs)(`div`,{"data-testid":`animate-empty`,"data-count":y.length,className:`flex flex-col items-center gap-2.5 rounded-xl p-4 text-center`,children:[(0,Q.jsx)(`span`,{className:`flex h-9 w-9 items-center justify-center rounded-full bg-[var(--chrome-hover)] text-[var(--chrome-fg-600)]`,children:(0,Q.jsx)(Ae,{size:17,stroke:1.75})}),(0,Q.jsx)(`span`,{className:`text-[12.5px] font-medium text-[var(--chrome-fg-900)]`,children:`Reveal this slide in steps`}),(0,Q.jsx)(`span`,{className:`text-balance text-[11px] leading-relaxed text-[var(--chrome-fg-500)]`,children:wn(y.length)}),!s&&(0,Q.jsx)(dn,{variant:`primary`,units:y,idleCount:v.length,hasBuild:A,onHover:e=>c.getState().setHoveredId(e),onAdd:te,onSweep:re})]})}),A&&(0,Q.jsx)(`div`,{className:`flex flex-col gap-1`,children:g.map((e,t)=>{let n=ft(e);return(0,Q.jsx)(`div`,{ref:le.setItemRef(t),"data-testid":`animate-row-${t}`,"data-start":n,className:`shrink-0 ${t>0&&n===`click`?`border-t border-[var(--chrome-ring)] pt-1`:t>0&&n===`after`?`border-t border-dashed border-[var(--chrome-ring)] pt-1`:``}`,style:le.rowStyle(t),children:(0,Q.jsx)(pn,{unit:e,click:w[C[t]],playing:D!==null&&C[t]===D,start:n,canJoin:t>0,pointed:se.has(dt(e)),unseen:b.has(ct(e.items[0])),selected:e.items.every(e=>d.has(e.shape.id)),viewMode:s,handlers:{...le.rowHandlers(t),...ce(e.items[0].shape.id)},onSplit:e.groupId?()=>E(xt(g,e.groupId)):null,onMerge:S.has(t)?()=>E(vt(g,S.get(t))):null,onSetEffect:(t,n)=>E(Ct(e.items,t,n)),onSetDelay:t=>E(Dt(e.items,t)),onSetKind:t=>E(kt(e.items,t)),onSetDirection:t=>E(yt(e.items,t)),onPreviewEffect:(t,n)=>ae(e.items,t,n),onSetStart:t=>E(bt(g,dt(e),t)),onRemove:()=>E(Et(g,dt(e)))})},dt(e))})}),!s&&A&&(0,Q.jsx)(`div`,{className:`pt-3`,children:(0,Q.jsx)(dn,{units:y,idleCount:v.length,hasBuild:A,onHover:e=>c.getState().setHoveredId(e),onSweep:re,onAdd:te})})]}),(0,Q.jsxs)(`div`,{className:`flex flex-col gap-2 border-t border-[var(--chrome-ring)] p-3`,children:[(0,Q.jsx)(`button`,{"data-testid":`animate-play`,disabled:!A,className:`flex h-9 w-full items-center justify-center gap-2 rounded-lg bg-[var(--chrome-accent)] text-[13px] text-white transition-colors hover:bg-[var(--chrome-accent-hover)] disabled:bg-[var(--chrome-hover)] disabled:text-[var(--chrome-fg-400)]`,onClick:oe,children:D===null?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(qe,{size:13}),`Play`]}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(ye,{size:13}),`Stop`]})}),!s&&A&&(0,Q.jsx)(`button`,{"data-testid":`animate-clear`,className:`mx-auto flex h-6 cursor-pointer items-center rounded px-2 text-[11px] text-[var(--chrome-fg-500)] transition-colors hover:text-[var(--chrome-fg-900)]`,onClick:()=>E(St(m)),children:`Clear animations`})]})]})}function wn(e){return e===1?`One thing shows with the slide. Give it a click of its own.`:`${e} things show at once right now. Give each one its own click.`}function Tn(e){let t=e.flatMap(e=>e.shapes);return ht(t[0]).filter(e=>e===`emphasis`||t.some(t=>!mt(t).some(t=>t.kind===e)))}var En=`flex h-9 items-center justify-center bg-[var(--chrome-accent)] text-[13px] text-white transition-colors hover:bg-[var(--chrome-accent-hover)] disabled:bg-[var(--chrome-hover)] disabled:text-[var(--chrome-fg-400)] data-[popup-open]:bg-[var(--chrome-accent-hover)]`;function Dn(e){let{disabled:t,onPresent:n}=e;return(0,Q.jsxs)(`div`,{className:`flex gap-px`,children:[(0,Q.jsxs)(`button`,{type:`button`,"data-testid":`slides-present`,disabled:t,onClick:()=>n(`current`),className:`${En} flex-1 gap-2 rounded-l-lg`,children:[(0,Q.jsx)(qe,{size:14}),`Start presentation`]}),(0,Q.jsxs)(s,{children:[(0,Q.jsx)(f,{disabled:t,render:(0,Q.jsx)(`button`,{type:`button`,"aria-label":`Presentation start options`,"data-testid":`slides-present-options`,className:`${En} w-9 rounded-r-lg`,children:(0,Q.jsx)(i,{size:14,stroke:2})})}),(0,Q.jsx)(l,{children:(0,Q.jsx)(c,{side:`top`,align:`end`,sideOffset:6,className:`z-50 outline-none`,children:(0,Q.jsxs)(m,{"data-overlay":!0,className:`min-w-[185px] p-1`,children:[(0,Q.jsxs)(d,{"data-testid":`slides-present-beginning`,onClick:()=>n(`beginning`),children:[(0,Q.jsx)(cn,{size:15,stroke:1.75,className:`text-[var(--chrome-fg-400)]`}),`From beginning`]}),(0,Q.jsxs)(d,{"data-testid":`slides-present-current`,onClick:()=>n(`current`),children:[(0,Q.jsx)(a,{size:15,stroke:1.75,className:`text-[var(--chrome-fg-400)]`}),`From current slide`]})]})})})]})]})}var On=`flex cursor-default select-none items-center gap-2 rounded-lg px-2 py-1.5 text-[13px] text-[var(--chrome-fg-700)] outline-none data-[highlighted]:bg-[var(--chrome-hover)]`,kn=`min-w-[185px] p-1 outline-none ${et.popup}`;function An(e){let{index:t,prefix:n,actions:r,skipped:i,Item:o,Separator:s}=e;function c(e,r,i,a,s=!1){return(0,Q.jsxs)(o,{className:s?`${On} text-red-600 data-[highlighted]:bg-red-50`:On,"data-testid":`${n}-${e}-${t}`,onClick:a,children:[(0,Q.jsx)(`span`,{className:s?`text-red-400`:`text-[var(--chrome-fg-400)]`,children:r}),(0,Q.jsx)(`span`,{children:i})]})}let l=(0,Q.jsx)(s,{className:`mx-1 my-1 h-px bg-[var(--chrome-divider)]`});return(0,Q.jsxs)(Q.Fragment,{children:[c(`present`,(0,Q.jsx)(a,{size:15,stroke:1.75}),`Present from here`,r.onPresent),l,r.onExportPng?c(`export-png`,(0,Q.jsx)(Oe,{size:15,stroke:1.75}),`Export slide as PNG`,r.onExportPng):null,r.onExportSvg?c(`export-svg`,(0,Q.jsx)(P,{size:15,stroke:1.75}),`Export slide as SVG`,r.onExportSvg):null,r.onEmbed?c(`embed`,(0,Q.jsx)(xe,{size:15,stroke:1.75}),`Embed slide…`,r.onEmbed):null,l,c(`duplicate`,(0,Q.jsx)(Te,{size:15,stroke:1.75}),`Duplicate slide`,r.onDuplicate),c(`rename`,(0,Q.jsx)(Be,{size:15,stroke:1.75}),`Rename slide`,r.onRename),c(`notes`,(0,Q.jsx)(Pe,{size:15,stroke:1.75}),`Speaker notes`,r.onEditNotes),i?c(`skip`,(0,Q.jsx)(Me,{size:15,stroke:1.75}),`Unskip slide`,r.onToggleSkip):c(`skip`,(0,Q.jsx)(we,{size:15,stroke:1.75}),`Skip slide`,r.onToggleSkip),c(`add-above`,(0,Q.jsx)(He,{size:15,stroke:1.75}),`Add slide above`,r.onAddAbove),c(`add-below`,(0,Q.jsx)(Ue,{size:15,stroke:1.75}),`Add slide below`,r.onAddBelow),l,c(`delete`,(0,Q.jsx)(_e,{size:15,stroke:1.75}),`Remove slide`,r.onDelete,!0)]})}function jn(e){let{index:t,actions:n,skipped:r,disabled:i}=e;return i?null:(0,Q.jsxs)(s,{children:[(0,Q.jsx)(f,{render:(0,Q.jsx)(`button`,{type:`button`,"aria-label":`Slide options`,"data-testid":`slide-menu-${t}`,className:`absolute right-1.5 top-1.5 flex h-6 w-6 items-center justify-center rounded-md bg-[var(--chrome-surface)] text-[var(--chrome-fg-600)] opacity-0 ring-1 ring-[var(--chrome-ring)] transition-opacity hover:bg-[var(--chrome-hover)] focus-visible:opacity-100 group-hover:opacity-100 data-[popup-open]:opacity-100`,onPointerDown:e=>e.stopPropagation(),children:(0,Q.jsx)(h,{size:13,stroke:1.75})})}),(0,Q.jsx)(l,{children:(0,Q.jsx)(c,{side:`left`,align:`start`,sideOffset:6,className:`z-50 outline-none`,children:(0,Q.jsx)(p,{"data-overlay":!0,className:kn,children:(0,Q.jsx)(An,{index:t,prefix:`slide-menu`,actions:n,skipped:r,Item:u,Separator:o})})})})]})}function Mn(e){let{index:t,actions:n,skipped:r,children:i,disabled:a}=e,s=_(e=>e.coarsePointer);return a||s?(0,Q.jsx)(Q.Fragment,{children:i}):(0,Q.jsxs)(De,{children:[(0,Q.jsx)(je,{render:(0,Q.jsx)(`div`,{style:{display:`contents`}}),children:i}),(0,Q.jsx)(l,{children:(0,Q.jsx)(c,{className:`z-50 outline-none`,children:(0,Q.jsx)(p,{"data-overlay":!0,"data-testid":`slide-ctx-${t}`,className:kn,children:(0,Q.jsx)(An,{index:t,prefix:`slide-ctx`,actions:n,skipped:r,Item:u,Separator:o})})})})]})}function Nn(e){let t=R(e),n=18*t.unit,r=[{x:433,fill:G.red},{x:471,fill:G.yellow},{x:509,fill:G.blue}].map(({x:e,fill:r})=>{let i=t.point(e,158);return z({x:i.x,y:i.y,width:n,height:n},r,{kind:`ellipse`,fillStyle:`bold`})}),i=(e,n,r,i)=>z(t.rect(e,n,r,r),i,{kind:`star`,fillStyle:`bold`});return[...r,i(812,100,24,G.yellow),i(128,416,16,G.pink),I(t.rect(120,204,720,90),`Presentation title`,t.font(56)),I(t.rect(180,306,600,40),`A short subtitle that sets the scene`,t.font(24),{color:q}),B([t.point(432,436),t.point(528,436)],{color:U,strokeWidth:4}),I(t.rect(280,452,400,30),`Your name · Occasion · Date`,t.font(16),{color:q})]}function Pn(e){let t=R(e);return[z(t.rect(110,145,230,230),G.yellow,{kind:`ellipse`,label:`01`,fontSize:t.font(80)}),I(t.rect(420,190,460,64),`Section title`,t.font(48),{align:`left`}),B([t.point(422,268),t.point(640,268)],{color:J,strokeWidth:4}),I(t.rect(420,292,460,36),`A one-line summary of this chapter`,t.font(20),{align:`left`,color:q})]}function Fn(e){let t=R(e);return[I(t.rect(330,148,300,26),`THE BIG IDEA`,t.font(15),{letterSpacing:.3,color:q}),I(t.rect(120,192,720,156),`Say the one thing that matters.`,t.font(64)),B([t.point(390,374),t.point(570,374)],{color:U,strokeWidth:5})]}function In(e){let t=R(e),n=(e,n,r,i)=>z(t.rect(e,n,r,r),i,{kind:`star`,fillStyle:`bold`});return[Jt(t),n(150,106,26,G.yellow),n(806,92,18,G.blue),n(730,414,20,G.yellow),n(208,408,14,G.pink),B([t.point(434,198),t.point(526,198)],{color:U,strokeWidth:4}),qt(t.rect(120,216,720,90),`A title that glows in the dark`,t.font(52)),qt(t.rect(240,322,480,40),`A quieter cover for serious rooms`,t.font(20),{color:Yt})]}function Ln(e){let t=R(e);return[z(t.rect(0,0,424,Kt.height),G.gray,{dash:`none`,label:`Drop an image
|
|
2
|
+
or paste a screenshot`,fontSize:t.font(18),labelColor:q}),I(t.rect(486,168,300,26),`A DECK ABOUT`,t.font(14),{align:`left`,letterSpacing:.3,color:q}),I(t.rect(486,202,408,140),`The thing you came to hear`,t.font(44),{align:`left`,valign:`top`,lineHeight:1.25}),B([t.point(488,360),t.point(600,360)],{color:U,strokeWidth:4}),I(t.rect(486,384,408,30),`Your name · Occasion · Date`,t.font(16),{align:`left`,color:q})]}function Rn(e){let t=R(e),n=G.green,r=(e,n)=>z(t.rect(e,26,15,15),n,{kind:`ellipse`,fillStyle:`bold`,dash:`none`});return[Jt(t),r(30,G.red),r(56,G.yellow),r(82,G.green),nn(t.point(80,130),`~/talks $ present --topic`,t.font(20),n,{fontFamily:Zt}),nn(t.point(80,176),`"Your big idea"`,t.font(50),Gt,{fontFamily:Zt}),z(t.rect(80,268,20,42),Gt,{dash:`none`}),nn(t.point(80,356),`loading slides… ████████░░ 80%`,t.font(17),n,{fontFamily:Zt,opacity:.8}),nn(t.point(80,458),`# your name · today`,t.font(15),Gt,{fontFamily:Zt,opacity:.5})]}function zn(e){let t=R(e);return[...L(t,`Slide title`),I(t.rect(72,156,816,312),S([`The first key point`,`A second point, with a little more detail to back it up`,`The third point that drives it home`]),t.font(24),{align:`left`,valign:`top`,lineHeight:2,color:H})]}function Bn(e){let t=R(e),n=[{fill:G.blue,text:`Where we are today`},{fill:G.green,text:`What we learned`},{fill:G.yellow,text:`The plan from here`},{fill:G.pink,text:`Questions and next steps`}].flatMap(({fill:e,text:n},r)=>{let i=160+r*78;return V([z(t.rect(72,i,48,48),e,{kind:`ellipse`,label:String(r+1),fontSize:t.font(20)}),I(t.rect(140,i,720,48),n,t.font(24),{align:`left`})])});return[...L(t,`Agenda`),...n]}function Vn(e){let t=R(e);return[...L(t,`Slide title`),B([t.point(480,160),t.point(480,468)],{strokeWidth:1.5,dash:`dashed`,opacity:.35}),I(t.rect(72,156,380,40),`First column`,t.font(24),{align:`left`}),B([t.point(74,204),t.point(150,204)],{color:`#1971c2`,strokeWidth:3}),I(t.rect(72,216,380,244),`Use this side for the first idea, option or before-state.`,t.font(20),{align:`left`,valign:`top`,color:H}),I(t.rect(508,156,380,40),`Second column`,t.font(24),{align:`left`}),B([t.point(510,204),t.point(586,204)],{color:`#2f9e44`,strokeWidth:3}),I(t.rect(508,216,380,244),`And this side for the second idea, option or after-state.`,t.font(20),{align:`left`,valign:`top`,color:H})]}function Hn(e){let t=R(e);return[I(t.rect(72,48,816,50),`Which way do we go?`,t.font(36)),...V([z(t.rect(72,132,384,344),G.green,{fillStyle:`outline`}),z(t.rect(404,152,32,32),G.green,{kind:`checkbox`,fillStyle:`bold`}),I(t.rect(96,156,336,40),`Option A`,t.font(28)),I(t.rect(108,212,312,240),S([`Cheaper to build`,`Ships this quarter`,`Less flexible later`]),t.font(20),{align:`left`,valign:`top`,lineHeight:2,color:H})]),...V([z(t.rect(504,132,384,344),G.gray,{fillStyle:`outline`}),I(t.rect(528,156,336,40),`Option B`,t.font(28)),I(t.rect(540,212,312,240),S([`More upfront work`,`Ships next quarter`,`Grows with us`]),t.font(20),{align:`left`,valign:`top`,lineHeight:2,color:H})]),z(t.rect(450,274,60,60),G.yellow,{kind:`ellipse`,fillStyle:`bold`,label:`vs`,fontSize:t.font(22)})]}function Un(e){let t=R(e);return[...L(t,`Before and after`),...V([z(t.rect(72,140,384,330),G.gray),I(t.rect(96,162,344,36),`Before`,t.font(26),{align:`left`}),I(t.rect(96,214,344,230),`✗ Manual deploys at midnight
|
|
3
|
+
✗ Surprise regressions
|
|
4
|
+
✗ Knowledge in one head`,t.font(19),{align:`left`,valign:`top`,lineHeight:2,color:H})]),...V([z(t.rect(504,140,384,330),G.green),I(t.rect(528,162,344,36),`After`,t.font(26),{align:`left`}),I(t.rect(528,214,344,230),`✓ Ship on every merge
|
|
5
|
+
✓ Tests catch it first
|
|
6
|
+
✓ Docs that stay current`,t.font(19),{align:`left`,valign:`top`,lineHeight:2,color:H})]),Wt(t.point(462,305),t.point(498,305),5)]}function Wn(e){let t=R(e),n=[{x:72,fill:G.blue,value:`42%`,caption:`more signups`},{x:360,fill:G.teal,value:`3×`,caption:`faster builds`},{x:648,fill:G.purple,value:`12k`,caption:`happy users`}].flatMap(({x:e,fill:n,value:r,caption:i})=>V([z(t.rect(e,150,240,260),n,{fillStyle:`outline`,label:r,fontSize:t.font(56)}),I(t.rect(e+20,330,200,56),i,t.font(18),{color:q})]));return[...L(t,`The quarter in numbers`),...n]}function Gn(e){let t=R(e),n=[{color:J,text:`The first thing to remember`},{color:`#1971c2`,text:`The second, said plainly`},{color:`#2f9e44`,text:`The third, end on an action`}].flatMap(({color:e,text:n},r)=>{let i=156+r*104,a=V([nn(t.point(84,i+14),String(r+1),t.font(44),e),I(t.rect(160,i,720,84),n,t.font(26),{align:`left`})]);return r>0&&a.push(B([t.point(84,i-10),t.point(876,i-10)],{strokeWidth:1.5,opacity:.15})),a});return[...L(t,`Three takeaways`),...n]}function Kn(e){let t=R(e);return[...L(t,`Do and don't`),...V([z(t.rect(72,150,400,310),G.green,{fillStyle:`outline`}),z(t.rect(96,170,36,36),G.green,{kind:`checkbox`,fillStyle:`bold`}),I(t.rect(148,170,300,36),`Do`,t.font(28),{align:`left`}),I(t.rect(96,222,352,220),`Keep slides to one idea
|
|
7
|
+
Use big readable text
|
|
8
|
+
Practice out loud`,t.font(20),{align:`left`,valign:`top`,lineHeight:2,color:H})]),...V([z(t.rect(488,150,400,310),G.red,{fillStyle:`outline`}),z(t.rect(512,170,36,36),G.red,{kind:`crossbox`,fillStyle:`bold`}),I(t.rect(564,170,300,36),`Don't`,t.font(28),{align:`left`}),I(t.rect(512,222,352,220),`Cram every detail in
|
|
9
|
+
Read off the slide
|
|
10
|
+
Run past the time box`,t.font(20),{align:`left`,valign:`top`,lineHeight:2,color:H})])]}function qn(e){let t=R(e),n=[{icon:`zap`,fill:G.yellow,name:`Fast`,desc:`Blank canvas to first stroke in a second`},{icon:`users`,fill:G.blue,name:`Together`,desc:`Share a link, draw with the whole room`},{icon:`share-2`,fill:G.green,name:`Portable`,desc:`PNG, SVG and PDF out of the box`},{icon:`undo-2`,fill:G.pink,name:`Forgiving`,desc:`Undo everything, nothing is precious`}].flatMap(({icon:e,fill:n,name:r,desc:i},a)=>{let o=162+a*78,s=52*t.unit,c=t.point(72,o),l=26*t.unit;return V([z({x:c.x,y:c.y,width:s,height:s},n,{kind:`ellipse`,dash:`none`}),Y({x:c.x+(s-l)/2,y:c.y+(s-l)/2},l,e,{color:Xt}),I(t.rect(148,o+2,210,48),r,t.font(22),{align:`left`}),I(t.rect(366,o+2,522,48),i,t.font(17),{align:`left`,color:H})])});return[...L(t,`What you get`),...n]}function Jn(e){let t=R(e),n=[{icon:`gauge`,title:`Instant`,body:`Boards open in under a second, however big`},{icon:`users`,title:`Multiplayer`,body:`Cursors, comments and a shared laser pointer`},{icon:`sparkles`,title:`AI drafts`,body:`Describe a diagram, get shapes you can edit`},{icon:`shapes`,title:`Every shape`,body:`Flowcharts, mockups, tables, charts, slides`},{icon:`lock`,title:`Private`,body:`Nothing leaves your workspace unless you share`},{icon:`file-down`,title:`Portable`,body:`PNG, SVG, PDF and a plain file you own`}].flatMap(({icon:e,title:n,body:r},i)=>{let a=72+i%3*280,o=168+Math.floor(i/3)*152,s=34*t.unit,c=t.point(a,o);return V([Y({x:c.x,y:c.y},s,e,{color:J}),I(t.rect(a+46,o-4,200,40),n,t.font(21),{align:`left`}),I(t.rect(a,o+48,252,76),r,t.font(15),{align:`left`,valign:`top`,lineHeight:1.6,color:H})])});return[...L(t,`Why teams switch`),...n]}function Yn(e){let t=R(e),n=(e,n,r,i)=>z(t.rect(e-126,n-126,252,252),r,{kind:`ellipse`,opacity:.6,color:i,strokeWidth:2}),r=[{cx:300,cy:262,fill:G.blue,ink:$t.blue,name:`What users beg for`},{cx:432,cy:262,fill:G.yellow,ink:$t.yellow,name:`What we're best at`},{cx:366,cy:376,fill:G.teal,ink:$t.teal,name:`What pays the bills`}],i=r.flatMap(({fill:e,name:n},r)=>V([z(t.rect(660,214+r*66,20,20),e,{kind:`ellipse`,fillStyle:`bold`}),I(t.rect(694,208+r*66,200,32),n,t.font(17),{align:`left`})]));return[...L(t,`Where the three meet`),...r.map(({cx:e,cy:t,fill:r,ink:i})=>n(e,t,r,i)),I(t.rect(288,292,156,40),`Do this`,t.font(20)),...i]}function Xn(e){let t=R(e),n=V([z(t.rect(72,140,392,300),G.blue,{fillStyle:`outline`}),I(t.rect(96,164,344,96),`38%`,t.font(72),{align:`left`}),I(t.rect(96,250,344,34),`faster to a first board`,t.font(18),{align:`left`,color:H}),Ut(t.rect(96,292,344,130),`area`,[[``,`Minutes`],[`Jan`,`9.4`],[`Feb`,`7.1`],[`Mar`,`6.2`],[`Apr`,`4.8`],[`May`,`3.6`]],t.font(11),{showLegend:!1})]),r=V([z(t.rect(480,140,196,142),G.green,{fillStyle:`outline`}),I(t.rect(496,164,164,62),`4.8`,t.font(48),{align:`left`}),I(t.rect(496,228,164,32),`average rating`,t.font(15),{align:`left`,color:H})]),i=V([z(t.rect(692,140,196,142),G.orange,{fillStyle:`outline`}),Y(t.point(710,162),30*t.unit,`trophy`,{color:J}),I(t.rect(708,204,164,32),`12 of 14 shipped`,t.font(17),{align:`left`}),I(t.rect(708,234,164,28),`two slipped to Q3`,t.font(14),{align:`left`,color:q})]),a=V([z(t.rect(480,298,408,142),G.gray,{fillStyle:`outline`}),I(t.rect(504,316,360,76),`“It replaced three tools and a weekly meeting.”`,t.font(20),{align:`left`,valign:`top`,lineHeight:1.5}),I(t.rect(504,396,360,28),`Kim, platform lead at Globex`,t.font(14),{align:`left`,color:q})]);return[...L(t,`The quarter at a glance`),...n,...r,...i,...a]}function Zn(e){let t=R(e),n=[{fill:G.green,tag:`Added`,text:`Dark mode, at last`},{fill:G.blue,tag:`Improved`,text:`Boards open twice as fast`},{fill:G.red,tag:`Fixed`,text:`That one bug, gone for good`}].flatMap(({fill:e,tag:n,text:r},i)=>{let a=168+i*88;return V([z(t.rect(72,a+4,140,48),e,{fillStyle:`outline`,label:n,fontSize:t.font(18)}),I(t.rect(236,a,652,56),r,t.font(22),{align:`left`})])});return[I(t.rect(72,48,460,56),`What's new`,t.font(36),{align:`left`}),B([t.point(74,118),t.point(250,118)],{color:U,strokeWidth:4}),I(t.rect(560,58,328,36),`v2.4.0 · this week`,t.font(15),{align:`right`,fontFamily:Zt,color:q}),...n,I(t.rect(72,442,816,40),`…plus twelve smaller fixes nobody will notice but us.`,t.font(24),{fontFamily:en,color:q})]}function Qn(e){let t=R(e),n=[G.blue,G.green,G.yellow,G.pink,G.teal,G.purple].flatMap((e,n)=>{let r=240+n%3*240,i=n<3?152:312;return V([z(t.rect(r-42,i,84,84),e,{kind:`ellipse`,label:String.fromCharCode(65+n),fontSize:t.font(28)}),I(t.rect(r-110,i+92,220,24),`Name Surname`,t.font(18)),I(t.rect(r-110,i+118,220,20),`What they do`,t.font(14),{color:q})])});return[...L(t,`Meet the team`),...n]}function $n(e){let t=R(e),n=[{x:72,fill:G.blue,quote:`“It changed how our team plans every single week.”`,who:`Sam, Acme`},{x:368,fill:G.orange,quote:`“The first tool everyone actually kept using.”`,who:`Ada, Initech`},{x:664,fill:G.pink,quote:`“We shipped the rework two weeks early.”`,who:`Kim, Globex`}].flatMap(({x:e,fill:n,quote:r,who:i})=>V([z(t.rect(e,150,256,268),n,{fillStyle:`outline`}),I(t.rect(e+20,172,216,150),r,t.font(18),{align:`left`,valign:`top`,lineHeight:1.5}),K(t.rect(e+18,330,104,22),`rating`,{value:5,fill:U}),I(t.rect(e+20,362,216,32),i,t.font(14),{align:`left`,color:q})]));return[...L(t,`What people say`),...n]}function er(e){let t=R(e),n=e.width/Kt.width,r=e.height/Kt.height,i=[[``,`Basic`,`Pro`,`Team`],[`Price`,`$0`,`$12`,`$29`],[`Projects`,`1`,`10`,`Unlimited`],[`Export`,`PNG`,`PNG, SVG, PDF`,`PNG, SVG, PDF`],[`Support`,`—`,`Email`,`Priority`]],a=i.map((e,t)=>e.map((e,n)=>t===0?{background:n===2?G.blue:`#e9ecef`}:n===2?{background:`#e7f5ff`}:{}));return[...L(t,`Compare the options`),tn(t.point(72,156),i,[252,188,188,188].map(e=>e*n),i.map(()=>54*r),t.font(16),{cellStyles:a})]}function tr(e){let t=R(e),n=[{x:176,fill:G.blue,when:`Q1`,what:`Discovery, 20 interviews`},{x:384,fill:G.green,when:`Q2`,what:`First beta, 10 teams`},{x:592,fill:G.yellow,when:`Q3`,what:`Public launch`},{x:792,fill:G.pink,when:`Q4`,what:`Scale up, self-serve`}].flatMap(({x:e,fill:n,when:r,what:i},a)=>{let o=a%2==0,s=26*t.unit,c=t.point(e,306),l=o?-1:1;return V([B([t.point(e,306+l*16),t.point(e,306+l*54)],{strokeWidth:1.5,opacity:.3}),z({x:c.x-s/2,y:c.y-s/2,width:s,height:s},n,{kind:`ellipse`,fillStyle:`bold`}),I(t.rect(e-92,o?184:364,184,34),r,t.font(22),{valign:o?`bottom`:`top`}),I(t.rect(e-92,o?218:398,184,56),i,t.font(15),{valign:o?`bottom`:`top`,lineHeight:1.5,color:H})])});return[...L(t,`Roadmap`),B([t.point(88,306),t.point(890,306)],{strokeWidth:3,endArrow:!0}),...n,z(t.rect(96,332,96,34),J,{kind:`oval`,fillStyle:`bold`,label:`today`,fontSize:t.font(14)}),B([t.point(144,284),t.point(144,332)],{color:J,strokeWidth:2})]}function nr(e){let t=R(e),n=[{x:72,title:`Now`},{x:350,title:`Next`},{x:628,title:`Later`}].flatMap(({x:e,title:n})=>V([z(t.rect(e,140,260,330),`transparent`,{dash:`dashed`,opacity:.6}),I(t.rect(e,152,260,30),n,t.font(22))])),r=116*t.unit,i=[{x:100,y:206,rot:-2,fill:G.yellow,text:`Ship the fix`},{x:168,y:332,rot:3,fill:G.blue,text:`Call the pilot users`},{x:396,y:224,rot:-4,fill:G.green,text:`Write the launch post`},{x:690,y:240,rot:5,fill:G.pink,text:`Explore pricing`}].map(({x:e,y:n,rot:i,fill:a,text:o})=>W(t.point(e,n),r,o,t.font(15),i,a));return[...L(t,`Now, next, later`),...n,...i]}function rr(e){let t=R(e),n=[{label:`Infrastructure`,fill:G.green,pct:.8},{label:`Mobile app`,fill:G.blue,pct:.6},{label:`Documentation`,fill:G.yellow,pct:.45},{label:`Onboarding`,fill:G.pink,pct:.2}].flatMap(({label:e,fill:n,pct:r},i)=>{let a=168+i*76;return V([I(t.rect(72,a,240,32),e,t.font(20),{align:`left`}),z(t.rect(330,a,470,32),G.gray,{dash:`none`}),z(t.rect(330,a,470*r,32),n,{fillStyle:`bold`,dash:`none`}),I(t.rect(814,a,76,32),`${Math.round(r*100)}%`,t.font(16),{align:`left`,fontFamily:Zt,color:H})])});return[...L(t,`Where things stand`),...n]}function ir(e){let t=R(e),n=[{x:72,y:140,fill:G.green,title:`Strengths`,hint:`What we do well`},{x:504,y:140,fill:G.red,title:`Weaknesses`,hint:`Where we struggle`},{x:72,y:314,fill:G.blue,title:`Opportunities`,hint:`What we could ride`},{x:504,y:314,fill:G.yellow,title:`Threats`,hint:`What could hurt us`}].flatMap(({x:e,y:n,fill:r,title:i,hint:a})=>V([z(t.rect(e,n,384,158),r),I(t.rect(e+20,n+12,344,28),i,t.font(20),{align:`left`}),I(t.rect(e+20,n+48,344,96),a,t.font(15),{align:`left`,valign:`top`,color:H})]));return[...L(t,`SWOT`),...n]}function ar(e){let t=R(e),n=[{fill:G.blue,label:`Collect`,note:`Anyone can file a request`},{fill:G.teal,label:`Sort`,note:`Weekly triage, no backlog`},{fill:G.green,label:`Decide`,note:`One owner says yes or no`},{fill:G.yellow,label:`Ship`,note:`Behind a flag, then wide`}].flatMap(({fill:e,label:n,note:r},i)=>{let a=72+i*188;return V([z(t.rect(a,218,234,104),e,{kind:`chevron`,label:n,fontSize:t.font(21)}),I(t.rect(a+44,340,174,76),r,t.font(15),{valign:`top`,lineHeight:1.5,color:q})])});return[...L(t,`How it works`),...n]}var $=.56;function or(e){let t=R(e),n=[{fill:G.blue,value:`12,400`,name:`Visited the site`,note:`any page, any source`},{fill:G.teal,value:`1,860`,name:`Started a trial`,note:`15% of visitors`},{fill:G.green,value:`410`,name:`Became customers`,note:`22% of trials`}],r=520,i=[],a=[];return n.forEach(({fill:e,value:n,name:o,note:s},c)=>{let l=148+c*96,u=l+96/2,d=r*$;i.push(...V([z(t.rect(340-r/2,l,r,96),e,{kind:`trapezoid`,rotation:180}),I(t.rect(340-d/2,u-24,d,48),n,t.font(30-c*4))]),...V([I(t.rect(646,u-30,250,30),o,t.font(20),{align:`left`}),I(t.rect(646,u+2,250,26),s,t.font(15),{align:`left`,color:q})])),c>0&&a.push(I(t.rect(40,u-30,134,30),c===1?`−10,540`:`−1,450`,t.font(17),{align:`right`,color:q}),Wt(t.point(340-r/2+18,u-6),t.point(150,u+12),1.8,{color:q})),r*=$}),[...L(t,`Where people drop off`),...i,...a,B([t.point(622,156),t.point(622,428)],{strokeWidth:1.5,dash:`dashed`,opacity:.3}),z(t.rect(258,460,164,38),G.gray,{kind:`oval`,fillStyle:`outline`,label:`3.3% end to end`,fontSize:t.font(16)})]}function sr(e){let t=R(e),n=[{fill:G.purple,label:`Why`,note:`Teams lose their mornings to status meetings`},{fill:G.blue,label:`How`,note:`One board replaces the four tools they juggle`},{fill:G.teal,label:`What`,note:`Ship the shared inbox and the weekly digest`}],r=180,i=[];n.forEach(({fill:e,label:n,note:a},o)=>{let s=176+o*96,c=s+96/2;i.push(...V([z(t.rect(330-r/2,s,r,96),e,{kind:`trapezoid`}),I(t.rect(330-r*$*.5,c-22,r*$,44),n,t.font(24))]),...V([z(t.rect(660,c-26,12,12),e,{kind:`ellipse`,fillStyle:`bold`}),I(t.rect(684,c-34,212,68),a,t.font(16),{align:`left`,valign:`top`,lineHeight:1.5,color:H})])),r/=$});let a=180*$;return[...L(t,`How the work ladders up`),z(t.rect(330-a/2,118,a,58),G.yellow,{kind:`triangle`}),...i]}function cr(e){let t=R(e),n={x:340,y:318},r=[{label:`Talk to users`,fill:G.blue},{label:`Pick one bet`,fill:G.teal},{label:`Ship it small`,fill:G.green},{label:`Measure it`,fill:G.yellow}],i=r.map(({label:e,fill:i},a)=>{let o=-Math.PI/2+a*2*Math.PI/r.length;return z(t.rect(n.x+Math.cos(o)*152-156/2,n.y+Math.sin(o)*152-58/2,156,58),i,{label:e,fontSize:t.font(18)})}),a=i.map((e,n)=>{let r=i[(n+1)%i.length];return Ht({x:e.x+e.width/2,y:e.y+e.height/2},{x:r.x+r.width/2,y:r.y+r.height/2},e,r,{bow:-34*t.unit,strokeWidth:2.4})}),o=46*t.unit;return[...L(t,`How we work`),...a,...i,Y({x:t.point(n.x,n.y).x-o/2,y:t.point(n.x,n.y).y-o/2},o,`refresh-cw`,{color:q}),I(t.rect(646,240,250,34),`Every two weeks`,t.font(21),{align:`left`}),I(t.rect(646,282,250,140),`One loop per sprint. Nothing ships that hasn't been through all four.`,t.font(16),{align:`left`,valign:`top`,lineHeight:1.5,color:H})]}function lr(e){let t=R(e),n=rn(t.rect(72,148,816,300),`lanes`,{lanes:[`Customer`,`Support`,`Engineering`]}),r=e=>148+e*100+50,i=(e,n,i,a)=>z(t.rect(e,r(n)-27,148,54),a,{label:i,fontSize:t.font(16)}),a=i(126,0,`Reports a bug`,G.blue),o=i(324,1,`Triages it`,G.teal),s=i(522,2,`Ships a fix`,G.green),c=i(720,0,`Confirms`,G.blue),l=(e,t)=>Ht({x:e.x+e.width,y:e.y+e.height/2},{x:t.x,y:t.y+t.height/2},e,t,{bendStyle:`elbow`,strokeWidth:2.4});return[...L(t,`Who picks it up`),n,a,o,s,c,l(a,o),l(o,s),l(s,c)]}function ur(e){let t=R(e),n=e=>250+e*106,r=Array.from({length:6},(e,r)=>[B([t.point(n(r),150),t.point(n(r),440)],{strokeWidth:1.5,opacity:.12}),I(t.rect(n(r),118,106,26),`W${r+1}`,t.font(14),{color:q})]).flat(),i=[{name:`Research`,from:0,span:2,fill:G.purple},{name:`Design`,from:1,span:2,fill:G.blue},{name:`Build`,from:2,span:3,fill:G.teal},{name:`Beta`,from:4,span:1.5,fill:G.green},{name:`Launch prep`,from:5,span:.7,fill:G.yellow}].flatMap(({name:e,from:r,span:i,fill:a},o)=>{let s=170+o*52;return V([I(t.rect(72,s,164,36),e,t.font(17),{align:`left`}),z(t.rect(n(r)+6,s+4,106*i-12,28),a,{kind:`oval`,fillStyle:`bold`,dash:`none`})])});return[...L(t,`Six weeks to launch`),...r,...i,B([t.point(n(2),138),t.point(n(2),448)],{color:J,strokeWidth:2,dash:`dashed`}),I(t.rect(n(2)-60,452,120,26),`today`,t.font(14),{color:J}),z(t.rect(852,378,36,36),G.red,{kind:`diamond`,fillStyle:`bold`}),I(t.rect(714,418,168,26),`Launch`,t.font(15),{align:`right`,color:H})]}function dr(e){let t=R(e),n=[{y:244,text:`KR1 — Signup to first board under 2 minutes`,progress:.7,pct:`70%`},{y:320,text:`KR2 — Week-one activation up 20%`,progress:.45,pct:`45%`},{y:396,text:`KR3 — 50 teams on the new flow`,progress:.2,pct:`20%`}].flatMap(({y:e,text:n,progress:r,pct:i})=>V([I(t.rect(72,e,540,44),n,t.font(19),{align:`left`}),z(t.rect(640,e+9,160,24),G.gray,{dash:`none`}),z(t.rect(640,e+9,160*r,24),G.green,{fillStyle:`bold`,dash:`none`}),I(t.rect(812,e+2,76,38),i,t.font(18),{align:`left`,color:H})]));return[...L(t,`This quarter's OKRs`),z(t.rect(72,144,816,62),G.blue,{label:`Objective — Make onboarding effortless`,fontSize:t.font(22)}),...n]}function fr(e){let t=R(e);return[...L(t,`The problem we solve`),...V([z(t.rect(72,150,384,320),G.red,{fillStyle:`outline`}),I(t.rect(96,174,336,40),`The problem`,t.font(26),{align:`left`}),I(t.rect(96,228,336,220),`Status lives in six tools
|
|
11
|
+
Standups eat the morning
|
|
12
|
+
Nobody trusts the roadmap`,t.font(19),{align:`left`,valign:`top`,lineHeight:2,color:H})]),...V([z(t.rect(504,150,384,320),G.green,{fillStyle:`outline`}),I(t.rect(528,174,336,40),`Our solution`,t.font(26),{align:`left`}),I(t.rect(528,228,336,220),`One board for plans and talk
|
|
13
|
+
Status that writes itself
|
|
14
|
+
A roadmap anyone can read`,t.font(19),{align:`left`,valign:`top`,lineHeight:2,color:H})]),Wt(t.point(462,310),t.point(498,310),5)]}function pr(e){let t=R(e),n=[{d:340,fill:G.blue},{d:230,fill:G.teal},{d:120,fill:G.green}].map(({d:e,fill:n})=>z(t.rect(330-e/2,480-e,e,e),n,{kind:`ellipse`})),r=[{y:190,fill:G.blue,value:`TAM — $4.2B`,caption:`everyone with the problem`},{y:268,fill:G.teal,value:`SAM — $600M`,caption:`who we can reach`},{y:346,fill:G.green,value:`SOM — $40M`,caption:`a realistic first bite`}].flatMap(({y:e,fill:n,value:r,caption:i})=>V([z(t.rect(560,e+4,22,22),n,{kind:`ellipse`,fillStyle:`bold`}),I(t.rect(596,e,292,30),r,t.font(22),{align:`left`}),I(t.rect(596,e+34,292,26),i,t.font(15),{align:`left`,color:q})]));return[...L(t,`How big is this?`),...n,...r]}function mr(e){let t=R(e),n=[{x:72,name:`Free`,price:`$0`,features:`3 boards
|
|
15
|
+
Core shapes
|
|
16
|
+
PNG export`,highlight:!1},{x:356,name:`Pro`,price:`$12`,features:`Unlimited boards
|
|
17
|
+
AI assistant
|
|
18
|
+
Every export`,highlight:!0},{x:640,name:`Team`,price:`$49`,features:`Shared spaces
|
|
19
|
+
Admin controls
|
|
20
|
+
Priority help`,highlight:!1}].flatMap(({x:e,name:n,price:r,features:i,highlight:a})=>{let o=[z(t.rect(e,156,248,314),a?G.blue:G.gray,{fillStyle:`outline`}),I(t.rect(e+24,180,200,34),n,t.font(22),{align:`left`}),I(t.rect(e+24,218,200,60),r,t.font(44),{align:`left`}),I(t.rect(e+26,240,200,60),`per person / month`,t.font(13),{align:`right`,valign:`bottom`,color:q}),I(t.rect(e+24,306,200,150),i,t.font(17),{align:`left`,valign:`top`,lineHeight:2,color:H})];return a&&o.push(Qt(t.rect(e+50,138,148,30),G.yellow,`MOST POPULAR`,t.font(12),{labelColor:Xt})),V(o)});return[...L(t,`Pick a plan`),...n]}function hr(e){let t=R(e);return[...L(t,`Where the line is going`),Ut(t.rect(72,150,536,300),`area`,[[``,`MRR`],[`Jan`,`41`],[`Feb`,`58`],[`Mar`,`76`],[`Apr`,`97`],[`May`,`128`],[`Jun`,`164`]],t.font(12),{showLegend:!1,numberFormat:`currency`,showValues:!0}),...[{value:`4.1×`,caption:`revenue in six months`},{value:`112%`,caption:`net revenue retention`},{value:`$0`,caption:`spent on paid acquisition`}].flatMap(({value:e,caption:n},r)=>{let i=168+r*100;return V([I(t.rect(648,i,240,56),e,t.font(40),{align:`left`}),I(t.rect(648,i+54,240,30),n,t.font(15),{align:`left`,color:q})])})]}function gr(e){let t=R(e);return[...L(t,`How we sit in the market`),Ut(t.rect(96,146,768,330),`quadrant`,[[``,`x`,`y`],[`Us`,`0.78`,`0.82`],[`Legacy suite`,`0.24`,`0.74`],[`Sticky-note app`,`0.8`,`0.26`],[`Docs and slides`,`0.34`,`0.22`]],t.font(13),{quadrantLabels:[`Where we play`,`Heavy and slow`,`Good enough`,`Fast but shallow`],xTitle:`Hard to start → Open and draw`,yTitle:`One meeting → The whole workflow`})]}function _r(e){let t=R(e),n=[{icon:`circle-check`,text:`Ship the collaboration layer`},{icon:`circle-check`,text:`Hire two engineers and a designer`},{icon:`circle-check`,text:`Reach $500k ARR before the next round`}].flatMap(({icon:e,text:n},r)=>{let i=300+r*52,a=22*t.unit,o=t.point(72,i+4);return V([Y({x:o.x,y:o.y},a,e,{color:`#2f9e44`}),I(t.rect(108,i,380,34),n,t.font(17),{align:`left`,color:H})])});return[...L(t,`The ask`),I(t.rect(72,158,420,96),`$2.5M`,t.font(76),{align:`left`}),I(t.rect(72,250,420,34),`seed round · 18 months of runway`,t.font(19),{align:`left`,color:q}),...n,Ut(t.rect(536,152,352,300),`donut`,[[``,`Share`],[`Engineering`,`55`],[`Go to market`,`30`],[`Everything else`,`15`]],t.font(12),{showValues:!0,numberFormat:`percent`})]}function vr(e){let t=R(e),n=[{x:136,y:146,fill:G.green,title:`Quick wins`,align:`left`},{x:491,y:146,fill:G.blue,title:`Big bets`,align:`right`},{x:136,y:299,fill:G.gray,title:`Fill-ins`,align:`left`},{x:491,y:299,fill:G.red,title:`Money pits`,align:`right`}].flatMap(({x:e,y:n,fill:r,title:i,align:a})=>[z({...t.rect(e,n,710/2,306/2)},r,{dash:`none`,opacity:.35}),I(t.rect(e+(a===`left`?16:-16),n+10,710/2-32,26),i,t.font(15),{align:a,color:H})]),r=96*t.unit,i=[{x:190,y:176,rot:-3,fill:G.green,text:`Ship this week`},{x:604,y:190,rot:4,fill:G.blue,text:`The big rewrite`},{x:236,y:322,rot:2,fill:G.yellow,text:`Nice to have`},{x:640,y:336,rot:-5,fill:G.red,text:`Kill it`}].map(({x:e,y:n,rot:i,fill:a,text:o})=>W(t.point(e,n),r,o,t.font(14),i,a));return[...L(t,`Where to spend the effort`),...n,B([t.point(120,299),t.point(868,299)],{strokeWidth:2,endArrow:!0,opacity:.5}),B([t.point(491,468),t.point(491,124)],{strokeWidth:2,endArrow:!0,opacity:.5}),...i,I(t.rect(692,466,160,26),`more effort`,t.font(14),{align:`right`,color:q}),I(t.rect(503,112,160,26),`more impact`,t.font(14),{align:`left`,color:q})]}function yr(e){let t=R(e),n=[{x:72,fill:G.green,icon:`circle-check`,title:`In scope`,body:`Shared inbox
|
|
21
|
+
Weekly digest
|
|
22
|
+
Slack alerts`},{x:350,fill:G.red,icon:`circle-slash`,title:`Not this time`,body:`Mobile app
|
|
23
|
+
Custom roles
|
|
24
|
+
SSO`},{x:628,fill:G.orange,icon:`triangle-alert`,title:`Watch out for`,body:`Search rewrite lands late
|
|
25
|
+
One backend engineer`}].flatMap(({x:e,fill:n,icon:r,title:i,body:a})=>V([z(t.rect(e,232,260,186),n,{fillStyle:`outline`}),z(t.rect(e+18,250,224,32),`transparent`,{dash:`none`,label:i,fontSize:t.font(19),align:`left`,titleIcon:{source:`lucide`,name:r,placement:`inside`}}),I(t.rect(e+18,292,224,112),a,t.font(15),{align:`left`,valign:`top`,lineHeight:1.9,color:H})])),r=[`Owner · Ada`,`Ships · 14 August`,`Check-in · Fridays, 10:00`].map((e,n)=>Qt(t.rect(72+n*250,448,232,38),G.gray,e,t.font(15),{fillStyle:`pastel`}));return[...L(t,`Project kickoff`),z(t.rect(72,140,816,68),G.blue,{label:`Cut the time a team spends chasing status to zero`,fontSize:t.font(23),titleIcon:{source:`lucide`,name:`target`,placement:`inside`}}),...n,...r]}function br(e){let t=R(e),n=e=>186+e*140,r=[{label:`Hears of us`,doing:`A teammate shares a board`,mood:`smile`,fill:G.green},{label:`Signs up`,doing:`Three fields, no card`,mood:`smile`,fill:G.green},{label:`First board`,doing:`Stares at a blank canvas`,mood:`meh`,fill:G.yellow},{label:`Invites the team`,doing:`Nobody joins for a week`,mood:`frown`,fill:G.red},{label:`Renews`,doing:`Finance asks what it's for`,mood:`meh`,fill:G.yellow}].flatMap(({label:e,doing:r,mood:i,fill:a},o)=>{let s=n(o),c=38*t.unit,l=t.point(s+132/2,318);return[Qt(t.rect(s,148,132,36),G.blue,e,t.font(14),{fillStyle:`outline`}),I(t.rect(s,206,132,76),r,t.font(14),{valign:`top`,lineHeight:1.5,color:H}),Y({x:l.x-c/2,y:l.y-c/2},c,i,{color:a===G.green?`#2f9e44`:a===G.red?`#e03131`:`#f08c00`})]}),i=[`Doing`,`Feeling`,`Fix it here`].map((e,n)=>I(t.rect(56,[212,306,384][n],110,30),e,t.font(15),{align:`right`,color:q})),a=104*t.unit;return[...L(t,`The trip they take`),B([t.point(176,292),t.point(888,292)],{strokeWidth:1.5,opacity:.15}),B([t.point(176,366),t.point(888,366)],{strokeWidth:1.5,opacity:.15}),...r,...i,W(t.point(n(2)+14,384),a,`Start from a template`,t.font(13),-3),W(t.point(n(3)+14,384),a,`Invite from the empty board`,t.font(13),4)]}function xr(e){let t=R(e);return[...L(t,`What the data says`),Ut(t.rect(72,150,530,310),`bar`,[[``,`This year`,`Last year`],[`Q1`,`12`,`8`],[`Q2`,`18`,`11`],[`Q3`,`24`,`16`],[`Q4`,`31`,`19`]],t.font(12),{showLegend:!0,showValues:!0}),I(t.rect(648,170,240,30),`The takeaway`,t.font(22),{align:`left`}),I(t.rect(648,212,240,200),`Say in one sentence what the chart proves, then stop.`,t.font(16),{align:`left`,valign:`top`,lineHeight:1.5,color:H})]}function Sr(e){let t=R(e),n=z(t.rect(96,220,180,90),G.blue,{label:`Client`,fontSize:t.font(20),titleIcon:{source:`lucide`,name:`monitor`,placement:`inside`}}),r=z(t.rect(390,220,180,90),G.teal,{label:`API`,fontSize:t.font(20),titleIcon:{source:`lucide`,name:`server`,placement:`inside`}}),i=z(t.rect(684,205,180,120),G.purple,{kind:`cylinder`,label:`Database`,fontSize:t.font(20)});return[...L(t,`How it fits together`),n,r,i,Ht(t.point(278,265),t.point(388,265),n,r,{label:`REST`,fontSize:t.font(14),strokeWidth:2.4}),Ht(t.point(572,265),t.point(682,265),r,i,{label:`SQL`,fontSize:t.font(14),strokeWidth:2.4}),I(t.rect(72,420,816,30),`Swap the boxes for your pieces. The arrows stay attached.`,t.font(16),{color:q})]}function Cr(e){let t=R(e);return[z(t.rect(-65,277,330,56),G.yellow,{fillStyle:`bold`,label:`THE ONE NUMBER`,fontSize:t.font(17),letterSpacing:.15,rotation:-90}),I(t.rect(180,150,600,200),`99.9%`,t.font(120)),I(t.rect(180,366,600,40),`what it measures, and why it matters`,t.font(20),{color:q}),B([t.point(420,352),t.point(540,352)],{color:J,strokeWidth:4})]}function wr(e){let t=R(e);return[z(t.rect(72,84,400,372),G.gray,{dash:`none`,label:`Drop an image
|
|
26
|
+
or sketch here`,fontSize:t.font(18),labelColor:q}),I(t.rect(528,132,360,80),`Show, then tell`,t.font(36),{align:`left`}),B([t.point(530,224),t.point(660,224)],{color:U,strokeWidth:4}),I(t.rect(528,248,360,180),`Pair one strong visual with a few words. Say what it shows and why it matters. Nothing more.`,t.font(20),{align:`left`,valign:`top`,lineHeight:1.5,color:H})]}function Tr(e){let t=R(e),n=58*t.unit,r=46*t.unit,i=t.point(136,412);return[Y(t.point(136,148),n,`quote`,{color:J,strokeWidth:2.4}),I(t.rect(132,232,700,156),`Add one line worth remembering, and give it the whole slide.`,t.font(38),{align:`left`,valign:`top`,lineHeight:1.4}),z({x:i.x,y:i.y,width:r,height:r},G.yellow,{kind:`ellipse`,label:`A`,fontSize:t.font(18)}),I(t.rect(196,410,400,28),`Ada Lovelace`,t.font(19),{align:`left`}),I(t.rect(196,436,400,26),`Head of platform, Initech`,t.font(15),{align:`left`,color:q})]}function Er(e){let t=R(e);return[rn(t.rect(112,64,224,424),`phone`),K(t.rect(128,92,192,22),`statusbar`,{label:`9:41`,fontSize:t.font(11)}),K(t.rect(128,122,192,30),`heading`,{label:`Boards`,fontSize:t.font(18)}),K(t.rect(128,160,192,34),`search`,{label:`Search boards…`,fontSize:t.font(12)}),K(t.rect(128,206,192,116),`list`,{label:`Sprint board | Roadmap wall | Retro — Tuesday`,fontSize:t.font(12)}),K(t.rect(128,336,192,42),`button`,{label:`New board`,fill:G.blue,fontSize:t.font(13)}),K(t.rect(128,424,192,44),`tabbar`,{label:`Home | Search | You`,fontSize:t.font(11)}),I(t.rect(420,150,470,80),`In your pocket`,t.font(36),{align:`left`}),B([t.point(422,240),t.point(552,240)],{color:U,strokeWidth:4}),I(t.rect(420,264,460,160),`One tap from idea to board. Works offline, syncs the moment you're back.`,t.font(20),{align:`left`,valign:`top`,lineHeight:1.5,color:H})]}function Dr(e){let t=R(e);return[...L(t,`Where the work lives`),rn(t.rect(72,148,520,312),`browser`),K(t.rect(84,196,96,252),`sidebar`,{label:`Boards | Team | Settings`,fontSize:t.font(11),fill:G.gray}),K(t.rect(192,194,200,30),`heading`,{label:`Roadmap wall`,fontSize:t.font(16)}),K(t.rect(428,196,152,28),`segmented`,{label:`Day | Week | Month`,fontSize:t.font(10),fill:G.blue}),...[{x:192,label:`Now`},{x:326,label:`Next`},{x:460,label:`Later`}].map(({x:e,label:n})=>K(t.rect(e,238,120,86),`card`,{label:n,fontSize:t.font(12)})),K(t.rect(192,340,388,100),`list`,{label:`Ship the fix | Call the pilot users | Write the launch post`,fontSize:t.font(12)}),I(t.rect(628,190,260,76),`One wall for the whole team`,t.font(25),{align:`left`,valign:`top`,lineHeight:1.3}),I(t.rect(628,288,260,160),`Everything the team is doing, on one wall anyone can open.`,t.font(17),{align:`left`,valign:`top`,lineHeight:1.5,color:H})]}function Or(e){let t=R(e),n=[{x:148,y:214,note:`The one action a new board needs`},{x:300,y:320,note:`Status, without asking anyone`},{x:452,y:396,note:`Everything else hides until it's wanted`}],r=36*t.unit;return[...L(t,`What to look at`),z(t.rect(72,150,520,300),`transparent`,{dash:`dashed`,label:`Drop a screenshot here`,fontSize:t.font(17),labelColor:q,opacity:.6}),...n.flatMap(({x:e,y:n,note:i},a)=>{let o=t.point(e,n),s=178+a*92;return[K({x:o.x,y:o.y,width:r,height:r},`stepbadge`,{label:String(a+1),fontSize:t.font(15),fill:G.yellow}),...V([K(t.rect(628,s,34,34),`stepbadge`,{label:String(a+1),fontSize:t.font(15),fill:G.yellow}),I(t.rect(674,s-4,214,84),i,t.font(16),{align:`left`,valign:`top`,lineHeight:1.5,color:H})])]})]}function kr(e){let t=R(e),n=(e,n,r)=>z(e,`transparent`,{dash:`dashed`,label:n,fontSize:t.font(r),labelColor:q,opacity:.6});return[...L(t,`The look we're after`),n(t.rect(72,148,462,312),`Drop the hero shot`,18),n(t.rect(552,148,336,148),`Reference`,15),n(t.rect(552,312,158,148),`Detail`,14),n(t.rect(730,312,158,148),`Colour`,14)]}function Ar(e){let t=R(e),n=124*t.unit,r=[{x:128,y:96,rot:-4,fill:G.blue,text:`What if…?`},{x:660,y:84,rot:3,fill:G.green,text:`Steal this idea`},{x:116,y:326,rot:5,fill:G.pink,text:`Open question`},{x:692,y:318,rot:-6,fill:G.teal,text:`Remember this`},{x:408,y:392,rot:2,fill:G.yellow,text:`Wild card`}].map(({x:e,y:r,rot:i,fill:a,text:o})=>W(t.point(e,r),n,o,t.font(15),i,a));return[z(t.rect(350,200,260,120),G.yellow,{kind:`ellipse`,fillStyle:`bold`,label:`The topic`,fontSize:t.font(26)}),...r]}function jr(e){let t=R(e),n=(e,n,r,i)=>z(t.rect(e,n,r,r),i,{kind:`star`,fillStyle:`bold`});return[n(186,122,44,G.yellow),n(744,104,32,G.pink),n(252,396,26,G.blue),I(t.rect(160,186,640,100),`Demo time`,t.font(72)),I(t.rect(280,300,400,48),`(everything will be fine)`,t.font(30),{fontFamily:en,color:H}),W(t.point(656,360),132*t.unit,`Plan B: screenshots`,t.font(16),5)]}function Mr(e){let t=R(e),n=26*t.unit,r=t.point(772,102);return[z({x:r.x,y:r.y,width:n,height:n},G.pink,{kind:`heart`,fillStyle:`bold`}),I(t.rect(160,190,640,100),`Thank you!`,t.font(64)),...[`hello@example.com`,`koboyo.com`,`@yourhandle`].map((e,n)=>Qt(t.rect(196+n*200,306,184,40),G.gray,e,t.font(15),{fillStyle:`pastel`})),W(t.point(688,366),180*.85*t.unit,`Questions?`,t.font(20),-6)]}function Nr(e){let t=R(e),n=84*t.unit,r=t.point(480,132);return[Y({x:r.x-n/2,y:r.y},n,`coffee`,{color:J}),I(t.rect(160,248,640,90),`Back in 10 minutes`,t.font(56)),I(t.rect(280,344,400,44),`stretch, refill, ignore Slack`,t.font(28),{fontFamily:en,color:H}),K(t.rect(330,424,300,18),`progress`,{value:.35,fill:G.blue})]}var Pr=[{id:`blank`,name:`Blank`,category:`title`,build:()=>[]},{id:`cover`,name:`Title slide`,category:`title`,build:Nn},{id:`image-cover`,name:`Image title`,category:`title`,build:Ln},{id:`dark-cover`,name:`Midnight title`,category:`title`,build:In},{id:`terminal`,name:`Terminal`,category:`title`,build:Rn},{id:`section`,name:`Section divider`,category:`title`,build:Pn},{id:`big-statement`,name:`Big statement`,category:`title`,build:Fn},{id:`bullets`,name:`Title and bullets`,category:`content`,build:zn},{id:`agenda`,name:`Agenda`,category:`content`,build:Bn},{id:`two-columns`,name:`Two columns`,category:`content`,build:Vn},{id:`comparison`,name:`Comparison`,category:`content`,build:Hn},{id:`before-after`,name:`Before and after`,category:`content`,build:Un},{id:`metrics`,name:`Key numbers`,category:`content`,build:Wn},{id:`takeaways`,name:`Three takeaways`,category:`content`,build:Gn},{id:`checklist`,name:`Do and don't`,category:`content`,build:Kn},{id:`feature-list`,name:`Feature rundown`,category:`content`,build:qn},{id:`icon-grid`,name:`Icon grid`,category:`content`,build:Jn},{id:`bento`,name:`At a glance`,category:`content`,build:Xn},{id:`venn`,name:`Overlap`,category:`content`,build:Yn},{id:`changelog`,name:`What's new`,category:`content`,build:Zn},{id:`feature-table`,name:`Feature matrix`,category:`content`,build:er},{id:`timeline`,name:`Timeline`,category:`plan`,build:tr},{id:`kanban`,name:`Now, next, later`,category:`plan`,build:nr},{id:`progress`,name:`Status report`,category:`plan`,build:rr},{id:`okrs`,name:`OKRs`,category:`plan`,build:dr},{id:`swot`,name:`SWOT`,category:`plan`,build:ir},{id:`process`,name:`Process`,category:`plan`,build:ar},{id:`funnel`,name:`Funnel`,category:`plan`,build:or},{id:`pyramid`,name:`Pyramid`,category:`plan`,build:sr},{id:`cycle`,name:`Loop`,category:`plan`,build:cr},{id:`swimlanes`,name:`Swimlanes`,category:`plan`,build:lr},{id:`gantt`,name:`Week-by-week plan`,category:`plan`,build:ur},{id:`problem-solution`,name:`Problem, solution`,category:`pitch`,build:fr},{id:`market-size`,name:`Market size`,category:`pitch`,build:pr},{id:`traction`,name:`Traction`,category:`pitch`,build:hr},{id:`competition`,name:`Competitive map`,category:`pitch`,build:gr},{id:`ask`,name:`The ask`,category:`pitch`,build:_r},{id:`pricing`,name:`Pricing tiers`,category:`pitch`,build:mr},{id:`team`,name:`Meet the team`,category:`pitch`,build:Qn},{id:`testimonials`,name:`What people say`,category:`pitch`,build:$n},{id:`matrix`,name:`Effort vs impact`,category:`workshop`,build:vr},{id:`kickoff`,name:`Project kickoff`,category:`workshop`,build:yr},{id:`journey`,name:`Journey map`,category:`workshop`,build:br},{id:`chart`,name:`Chart`,category:`visual`,build:xr},{id:`diagram`,name:`Diagram starter`,category:`visual`,build:Sr},{id:`big-metric`,name:`One number`,category:`visual`,build:Cr},{id:`image-text`,name:`Image and text`,category:`visual`,build:wr},{id:`image-grid`,name:`Moodboard`,category:`visual`,build:kr},{id:`annotated`,name:`Annotated screenshot`,category:`visual`,build:Or},{id:`phone`,name:`Phone mockup`,category:`visual`,build:Er},{id:`browser`,name:`Browser mockup`,category:`visual`,build:Dr},{id:`quote`,name:`Quote`,category:`visual`,build:Tr},{id:`brainstorm`,name:`Brainstorm`,category:`fun`,build:Ar},{id:`demo`,name:`Demo time`,category:`fun`,build:jr},{id:`intermission`,name:`Break`,category:`fun`,build:Nr},{id:`closing`,name:`Thank you`,category:`fun`,build:Mr}];async function Fr(e,t,n,r){let i=r.theme.palette();return on(await an(e,r,{bounds:t,padding:0,background:n(i),palette:i}))}var Ir=new Map;function Lr(e,t,n,r){let i=fe(),[a,o]=(0,X.useState)(()=>Ir.get(e)??null),s=(0,X.useRef)(t);s.current=t;let c=(0,X.useRef)(n);c.current=n;let l=(0,X.useRef)(r);return l.current=r,(0,X.useEffect)(()=>{let t=Ir.get(e);if(t){o(t);return}let n=!0,r={x:0,y:0,...c.current};return Fr(b(s.current()),r,e=>l.current?e.paperBg:e.bg,i).then(t=>{Ir.set(e,t),n&&o(t)}),()=>{n=!1}},[e,i]),a}function Rr(e){let{template:t,testId:n,cacheKey:r,aspect:i,canvas:a,onPaper:o,onPick:s}=e,c=Lr(r,()=>t.build({x:0,y:0,...a}),a,o);return(0,Q.jsxs)(`button`,{type:`button`,"data-testid":n,onClick:s,className:`group overflow-hidden rounded-lg text-left ring-1 ring-[var(--chrome-ring)] transition-shadow hover:ring-2 hover:ring-[var(--chrome-fg-500)]`,children:[(0,Q.jsx)(`div`,{className:`${i} w-full`,style:{background:o?`var(--paper-bg)`:`var(--canvas-bg)`},children:c&&(0,Q.jsx)(`img`,{src:c,alt:``,draggable:!1,className:`h-full w-full object-fill`})}),(0,Q.jsxs)(`div`,{className:`border-t border-[var(--chrome-ring)] px-2.5 py-1.5`,children:[(0,Q.jsx)(`div`,{className:`text-[12px] text-[var(--chrome-fg-800)]`,children:t.name}),t.blurb?(0,Q.jsx)(`div`,{className:`text-[11px] text-[var(--chrome-fg-500)]`,children:t.blurb}):null]})]})}function zr(e){let{open:t,onOpenChange:n,title:r,prefix:i,width:a,cardAspect:o,canvas:s,filters:c,templates:l,previewOnPaper:u,pinned:d,onPick:f}=e,p=(0,X.useRef)(null),[m,h]=(0,X.useState)(`all`),g=Ee(),ee=l.filter(e=>m===`all`||e.category===m||d?.(e));return(0,Q.jsx)(Ft,{open:t,onOpenChange:n,children:(0,Q.jsxs)(Nt,{children:[(0,Q.jsx)(Mt,{className:`fixed inset-0 bg-gray-900/15`}),(0,Q.jsxs)(Pt,{ref:p,initialFocus:p,"data-overlay":!0,"data-testid":`${i}-dialog`,className:`scrollbar-slim fixed left-1/2 top-1/2 max-h-[82vh] ${a} -translate-x-1/2 -translate-y-1/2 overflow-y-auto overflow-x-hidden rounded-2xl bg-[var(--chrome-popup)] shadow-[0_24px_70px_rgba(0,0,0,0.22)] outline-none ring-1 ring-[var(--chrome-ring)]`,children:[(0,Q.jsxs)(`div`,{className:`sticky top-0 z-10 border-b border-[var(--chrome-ring)] bg-[var(--chrome-surface)] backdrop-blur`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center justify-between px-5 pb-2.5 pt-3.5`,children:[(0,Q.jsx)(Lt,{className:`text-[15px] text-[var(--chrome-fg-900)]`,children:r}),(0,Q.jsx)(It,{"aria-label":`Close`,className:`-mr-1.5 flex h-7 w-7 items-center justify-center rounded-full text-[var(--chrome-fg-400)] outline-none transition-colors hover:bg-[var(--chrome-divider)] hover:text-[var(--chrome-fg-600)]`,children:(0,Q.jsx)(Ke,{size:16,stroke:1.75})})]}),(0,Q.jsx)(`div`,{className:`scrollbar-slim flex gap-1.5 overflow-x-auto px-5 pb-3`,children:c.map(({id:e,label:t})=>(0,Q.jsx)(`button`,{type:`button`,"data-testid":`${i}-filter-${e}`,onClick:()=>h(e),className:`shrink-0 whitespace-nowrap rounded-full px-3 py-1 text-[12px] transition-colors ${m===e?`bg-[var(--chrome-accent)] text-white`:`text-[var(--chrome-fg-600)] ring-1 ring-[var(--chrome-ring)] hover:bg-[var(--chrome-hover)]`}`,children:t},e))})]}),(0,Q.jsx)(`div`,{className:`grid grid-cols-2 gap-3 p-5 sm:grid-cols-3`,children:ee.map(e=>(0,Q.jsx)(Rr,{template:e,testId:`${i}-${e.id}`,cacheKey:`${i}:${e.id}:${g}`,aspect:o,canvas:s,onPaper:u??!1,onPick:()=>{n(!1),f(e)}},e.id))})]})]})})}var Br=[{id:`all`,label:`All`},{id:`title`,label:`Title`},{id:`content`,label:`Content`},{id:`plan`,label:`Plan`},{id:`pitch`,label:`Pitch`},{id:`workshop`,label:`Workshop`},{id:`visual`,label:`Visual`},{id:`fun`,label:`Fun`}];function Vr(e){let{open:t,onOpenChange:n,onPick:r}=e;return(0,Q.jsx)(zr,{open:t,onOpenChange:n,title:`Pick a slide template`,prefix:`slide-template`,width:`w-[min(680px,92vw)]`,cardAspect:`aspect-video`,canvas:Kt,filters:Br,templates:Pr,previewOnPaper:!0,pinned:e=>e.id===`blank`,onPick:e=>r(e)})}var Hr=90,Ur=210;function Wr(e){let t=e.width/Math.max(1,e.height);return Math.round(x(248/t,Hr,Ur))}var Gr=new Map;function Kr(e,t,n,r){return e.box.x===t.x&&e.box.y===t.y&&e.box.width===t.width&&e.box.height===t.height&&e.fill===t.fill&&e.theme===r&&e.contents.length===n.length&&e.contents.every((e,t)=>e===n[t])}function qr(e){for(let t of Gr.keys())e.has(t)||Gr.delete(t)}function Jr(e){let{figure:t,shapes:n}=e,r=fe(),i=(0,X.useMemo)(()=>ie(n,t),[n,t]),a=Ee(),[o,s]=(0,X.useState)(()=>Gr.get(t.id)?.url??null);return(0,X.useEffect)(()=>{let e=Gr.get(t.id);if(e&&Kr(e,t,i,a)){s(e.url);return}let n=!0,o=setTimeout(()=>{Fr(i,T(t),e=>t.fill&&t.fill!==`transparent`?te(t.fill,e):e.bg,r).then(e=>{n&&(Gr.set(t.id,{box:{x:t.x,y:t.y,width:t.width,height:t.height},fill:t.fill,theme:a,contents:i,url:e}),s(e))})},e?300:0);return()=>{n=!1,clearTimeout(o)}},[t,i,a,r]),(0,Q.jsx)(`div`,{className:`w-full overflow-hidden rounded-[7px] bg-[var(--canvas-bg)]`,style:{height:Wr(t)},children:o&&(0,Q.jsx)(`img`,{src:o,alt:``,draggable:!1,className:`h-full w-full object-fill`})})}var Yr=`flex items-center gap-1 rounded-md bg-[var(--chrome-surface)] px-1.5 py-0.5 text-[10px] tabular-nums text-[var(--chrome-fg-600)] ring-1 ring-[var(--chrome-ring)] backdrop-blur-sm`,Xr=72,Zr=12;function Qr(e){let{containerRef:t}=e;return _(e=>e.rightPanel===`slides`)?(0,Q.jsx)($r,{containerRef:t}):null}function $r(e){let{containerRef:t}=e,{ai:n,embed:i}=g(),a=ke(`slide`),o=ee(),{store:s,viewportAnimation:c,history:l}=o,u=$e(),{beginTransaction:d,endTransaction:f}=l,p=_(e=>e.shapes),m=_(e=>e.viewport),h=_(e=>e.slidePickerOpen),v=_(e=>e.animateSlideId),y=_(e=>e.selectedIds),b=_(e=>e.viewMode),{addMany:x,sendToBack:S,replaceMany:C,removeShapes:w,updateShape:te,setSelectedIds:ne,setSlidesOpen:fe,setSlidePickerOpen:pe,setNotesEditorId:me,setAnimateSlideId:j,setAiOpen:he,setPresentingIndex:ge,setViewport:_e,setExportDialog:ve}=s.getState(),M=(0,X.useMemo)(()=>k(p),[p]),ye=(0,X.useMemo)(()=>it(p),[p]),be=(0,X.useMemo)(()=>oe(M).length,[M]),[N,xe]=(0,X.useState)(null);(0,X.useEffect)(()=>{qr(new Set(M.map(e=>e.id)))},[M]);let Se=Bt()===`docked`,Te=(0,X.useCallback)(()=>{let e=t.current,n=e?.clientWidth??window.innerWidth,r=e?.clientHeight??window.innerHeight;return{width:Math.max(1,n-(Se?272:0)),height:r}},[t,Se]),Ee=(0,X.useMemo)(()=>A(M,m,Te()),[M,m,Te]);function P(e){c.animate(s.getState().viewport,de(T(e),Te(),Xr),_e)}(0,X.useEffect)(()=>{if(!v||y.size===0)return;let e=s.getState().shapes,t=D(e,k(e),y);!t||t.id===v||j(t.id)},[y,v,s,j]);function De(e,t){let{width:n,height:r}=Te(),i=re({x:n/2,y:r/2},m),a={...ae(M,i,p),slideOrder:e,slideLayout:t&&t.id!==`blank`?t.id:void 0},o=t?t.build(T(a)):[];d(),C(le(M,e)),x([a,...o]),S(new Set([a.id])),f(),ne(new Set([a.id])),P(a)}function Oe(e){let t=s.getState().shapes,{clones:n,renumbered:r}=ce(t,M,e);d(),C(r),x(n),S(new Set([n[0].id])),f(),ne(new Set([n[0].id])),P(n[0])}function je(e){let t=s.getState().shapes;w(se(t,M[e])),ne(new Set)}function Me(e,t){let n=s.getState().shapes,r=M[e],i=ie(n,r),a={bounds:T(r),padding:0,background:r.fill,measurement:o.measurement},c=ue(r,e);u(t===`png`?`downloadPng`:`downloadSvg`,i,{options:a,filename:c})}function Ne(e){be!==0&&ge(e??Math.max(0,Ee))}function Pe(){if(!N)return;let e=N.value.trim();e!==N.initial&&te(N.id,{label:e}),xe(null)}let F=We({count:M.length,gap:Zr,disabled:b,onPress:e=>P(M[e]),onReorder:(e,t)=>C(E(M,e,t)),canDrag:()=>!N}),Fe=v?M.findIndex(e=>e.id===v):-1,Ie=Fe>=0?M[Fe]:void 0;return(0,Q.jsxs)(Vt,{width:272,testId:`slides-panel`,ariaLabel:`Slides`,onDismiss:()=>fe(!1),children:[Ie?(0,Q.jsx)(Cn,{figure:Ie,index:Fe,total:M.length,viewMode:b,onBack:()=>j(null),onGoToSlide:e=>{let t=M[e];t&&(j(t.id),P(t))},onFocusSlide:P}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`div`,{className:`flex items-center justify-between py-2 pl-4 pr-2`,children:[(0,Q.jsxs)(`span`,{className:`text-[14px] text-[var(--chrome-fg-900)]`,"data-testid":`slides-count`,children:[`Slides (`,M.length,`)`]}),(0,Q.jsxs)(`div`,{className:`flex items-center`,children:[n&&!b&&(0,Q.jsx)(r,{label:`Generate with AI`,side:`bottom`,children:(0,Q.jsx)(`button`,{type:`button`,"aria-label":`Generate slides with AI`,"data-testid":`slides-ai-open`,onClick:()=>he(!0),className:`flex h-8 w-8 cursor-pointer items-center justify-center rounded-lg text-[var(--chrome-fg-600)] transition-[background-color,scale] hover:bg-[var(--chrome-hover)] active:scale-[0.96] coarse:h-11 coarse:w-11`,children:(0,Q.jsx)(Ge,{size:16,stroke:1.75})})}),!b&&(0,Q.jsx)(r,{label:`Add slide`,side:`bottom`,children:(0,Q.jsx)(`button`,{type:`button`,"aria-label":`Add slide`,"data-testid":`slides-add`,onClick:()=>pe(!0),className:`flex h-8 w-8 cursor-pointer items-center justify-center rounded-lg text-[var(--chrome-fg-600)] transition-[background-color,scale] hover:bg-[var(--chrome-hover)] active:scale-[0.96] coarse:h-11 coarse:w-11`,children:(0,Q.jsx)(Ve,{size:16,stroke:1.75})})}),i?null:(0,Q.jsx)(r,{label:`Export as PDF`,side:`bottom`,children:(0,Q.jsx)(`button`,{type:`button`,"aria-label":`Export slides as PDF`,"data-testid":`slides-export-pdf`,disabled:be===0,onClick:()=>ve({format:`pdf`}),className:`${At} disabled:pointer-events-none disabled:text-[var(--chrome-fg-300)]`,children:(0,Q.jsx)(Ce,{size:16,stroke:1.75})})}),(0,Q.jsx)(r,{label:`Hide slides`,side:`bottom`,children:(0,Q.jsx)(`button`,{type:`button`,"aria-label":`Hide slides`,"data-testid":`slides-close`,onClick:()=>fe(!1),className:At,children:(0,Q.jsx)(Ke,{size:16,stroke:1.75})})})]})]}),(0,Q.jsx)(`div`,{className:`mx-3 h-px bg-[var(--chrome-divider)]`}),(0,Q.jsxs)(`div`,{ref:F.listRef,"data-testid":`slides-list`,className:`flex flex-1 flex-col gap-3 overflow-y-auto p-3`,children:[M.length===0&&(0,Q.jsxs)(`div`,{className:`flex flex-col items-center gap-3 py-6 text-center`,children:[(0,Q.jsx)(`p`,{className:`text-[12px] leading-relaxed text-[var(--chrome-fg-400)]`,children:`No slides yet. Create a new slide or generate one with AI to get started.`}),!b&&(0,Q.jsxs)(`button`,{type:`button`,"data-testid":`slides-add-empty`,onClick:()=>pe(!0),className:`flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-[12px] text-[var(--chrome-fg-600)] ring-1 ring-[var(--chrome-ring)] transition-colors hover:bg-[var(--chrome-rest)] hover:text-[var(--chrome-fg-900)]`,children:[(0,Q.jsx)(Ve,{size:14,stroke:1.75}),`Add slide`]})]}),M.map((e,t)=>{let n=O(e,t),r=t===Ee,o={onPresent:()=>Ne(t),onExportPng:i?null:()=>Me(t,`png`),onExportSvg:i?null:()=>Me(t,`svg`),onEmbed:a?()=>a(e.id):null,onDuplicate:()=>Oe(t),onRename:()=>xe({id:e.id,initial:n,value:n}),onEditNotes:()=>me(e.id),onToggleSkip:()=>te(e.id,{slideSkipped:!e.slideSkipped||void 0}),onAddAbove:()=>De(t),onAddBelow:()=>De(t+1),onDelete:()=>je(t)};return(0,Q.jsxs)(`div`,{ref:F.setItemRef(t),"data-testid":`slide-item-${t}`,className:`group relative shrink-0`,style:F.rowStyle(t),children:[(0,Q.jsx)(Mn,{index:t,actions:o,skipped:!!e.slideSkipped,disabled:b,children:(0,Q.jsxs)(`div`,{className:`relative cursor-pointer touch-none overflow-hidden rounded-lg ring-1 transition-shadow ${r?`ring-2 ring-[var(--chrome-fg-500)]`:`ring-[var(--chrome-ring)] hover:ring-black/25`}`,...F.rowHandlers(t),children:[(0,Q.jsx)(`div`,{className:e.slideSkipped?`opacity-40`:void 0,children:(0,Q.jsx)(Jr,{figure:e,shapes:p})}),(0,Q.jsxs)(`div`,{className:`absolute left-1.5 top-1.5 flex items-center gap-1`,children:[e.slideSkipped&&(0,Q.jsxs)(`div`,{"data-testid":`slide-skipped-${t}`,title:`Skipped — not shown when presenting`,className:Yr,children:[(0,Q.jsx)(we,{size:11,stroke:1.75}),`Skipped`]}),ye.has(e.id)&&(0,Q.jsxs)(`div`,{"data-testid":`slide-animated-${t}`,title:`Animated: plays in ${ye.get(e.id)} clicks`,className:Yr,children:[(0,Q.jsx)(Ae,{size:11,stroke:1.75}),ye.get(e.id)]})]}),N?.id===e.id?(0,Q.jsx)(`input`,{autoFocus:!0,onFocus:e=>e.target.select(),value:N.value,onChange:e=>xe({...N,value:e.target.value}),onBlur:Pe,onKeyDown:e=>{e.stopPropagation(),e.key===`Enter`&&Pe(),e.key===`Escape`&&xe(null)},onPointerDown:e=>e.stopPropagation(),className:`absolute inset-x-0 bottom-0 border-t border-[var(--chrome-ring)] bg-[var(--chrome-popup)] px-2.5 py-1.5 text-[12px] text-[var(--chrome-fg-800)] outline-none`}):(0,Q.jsxs)(`div`,{className:`absolute inset-x-0 bottom-0 flex items-center gap-1.5 border-t border-[var(--chrome-ring)] bg-[var(--chrome-surface)] px-2.5 py-1.5 text-[12px] text-[var(--chrome-fg-800)] backdrop-blur-sm`,title:n,onPointerDown:e=>e.stopPropagation(),onClick:()=>P(e),onDoubleClick:t=>{t.stopPropagation(),b||xe({id:e.id,initial:n,value:n})},children:[(0,Q.jsx)(`span`,{className:`shrink-0 text-[var(--chrome-fg-400)]`,children:t+1}),(0,Q.jsx)(`span`,{className:`truncate`,children:n})]})]})}),(0,Q.jsx)(jn,{index:t,actions:o,skipped:!!e.slideSkipped,disabled:b})]},e.id)})]}),(0,Q.jsx)(`div`,{className:`border-t border-[var(--chrome-ring)] p-3`,children:(0,Q.jsx)(Dn,{disabled:be===0,onPresent:e=>Ne(e===`beginning`?0:void 0)})})]}),(0,Q.jsx)(Vr,{open:h,onOpenChange:pe,onPick:e=>{De(M.length,e),Se||fe(!1)}})]})}export{Qr as SlidesPanel};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{K as e,Z as t,n}from"./shapes-D5w8NTQQ.js";import{t as r}from"./web-card-font-BbZEq3En.js";function i(e,t,n){}function a(e){return(e.split(`,`)[0]?.trim()??``).replace(/^['"]|['"]$/g,``)}var o=`JetBrains Mono`;function s(e,t){return e.type===`control`?`${e.label??``} ${e.body??``}`:e.type===`arrow`?[e.label,e.startLabel,e.endLabel].filter(Boolean).join(` `):e.type===`figure`?[e.label,...e.lanes??[]].filter(Boolean).join(` `):e.type===`chart`?[...e.showTitles?[e.title,e.xTitle,e.yTitle]:[],...e.quadrantLabels??[]].filter(Boolean).join(` `):(e.type===`rectangle`||e.type===`icon`||e.type===`line`)&&`label`in e?e.label??``:e.type===`text`||e.type===`sticky`?e.text:e.type===`web`&&!e.poster?t?t(e):`${e.label} ${e.kind}`:``}function c(e,t){let n=new Set,i=!1,c=!1,l=new Set,u=e=>{for(let t of e)l.add(t.codePointAt(0)??0)};for(let l of e){let e=s(l,t),d=!!e||l.type===`chart`||l.type===`table`;if(d&&`fontFamily`in l&&l.fontFamily&&n.add(a(l.fontFamily)),d&&l.type===`web`&&n.add(a(r)),e.includes(`<code`)&&n.add(o),i||=e.includes(`<strong`),c||=e.includes(`<em`),u(e),`cells`in l&&Array.isArray(l.cells))for(let e of l.cells)for(let t of e)u(String(t));if(l.type===`table`&&l.cellStyles){for(let e of l.cellStyles)if(e)for(let t of e)t?.fontFamily&&n.add(a(t.fontFamily))}}return{families:n,bold:i,italic:c,codepoints:l}}var l={woff2:`font/woff2`,woff:`font/woff`,truetype:`font/ttf`,opentype:`font/otf`};function u(e,t){let n=e.format??`woff2`,r=`data:${l[n]};base64,${t(e.data)}`,i=e.unicodeRange?` unicode-range: ${e.unicodeRange};\n`:``;return`@font-face {\n font-family: "${e.family}";\n font-style: ${e.style??`normal`};\n font-weight: ${e.weight??`400`};\n font-display: swap;\n src: url(${r}) format("${n}");\n`+i+`}`}function d(e,t,n){let{families:r,bold:i,italic:a,codepoints:o}=e;return t.filter(e=>r.has(e.family)&&(i||(e.weight??`400`).trim()!==`700`)&&(a||(e.style??`normal`)!==`italic`)&&f(e.unicodeRange??``,o)).map(e=>u(e,n)).join(`
|
|
2
|
+
`)}function f(e,t){if(!e.trim())return!0;for(let n of e.split(`,`)){let e=n.trim().match(/^U\+([0-9a-f?]+)(?:-([0-9a-f]+))?$/i);if(!e)continue;let r=parseInt(e[1].replaceAll(`?`,`0`),16),i=e[2]?parseInt(e[2],16):parseInt(e[1].replaceAll(`?`,`f`),16);for(let e of t)if(e>=r&&e<=i)return!0}return!1}var p=`#ffec99`,m=.14;function h(e,t){return(e.fill??``).localeCompare(t.fill??``)||e.y-t.y||e.x-t.x}function g(e,t){return{id:n(),type:`sticky`,x:e.x,y:e.y,width:180,height:180,rotation:0,text:``,fontSize:t.fontSize,fontFamily:t.fontFamily,fill:t.fill===`transparent`?p:t.fill,opacity:t.opacity}}var _=new Set([`/`,`\\`,`.`,`_`,`-`,`:`,`#`,`,`,`?`,`&`,`=`,`@`]),v=2,y=/^[A-Za-z0-9]{1,5}$/,b=e=>e!==e.toUpperCase()&&e===e.toLowerCase(),x=e=>e!==e.toLowerCase()&&e===e.toUpperCase();function S(e){let t=Array.from(e),n=[];for(let e=v;e<=t.length-v;e+=1){let r=t[e-1],i=t[e];if(_.has(r)&&!_.has(i)){(r!==`.`||!y.test(t.slice(e).join(``)))&&n.push(e);continue}let a=b(r)&&x(i),o=x(r)&&x(i)&&b(t[e+1]??``);(a||o)&&n.push(e)}return n}function C(e){let t=Array.from(e),n=[0,...S(e),t.length],r=[];for(let e=0;e<n.length-1;e+=1)r.push(t.slice(n[e],n[e+1]).join(``));return r}function w(e,t,n){let r=[],i=``;for(let a of e){if(i&&n(i+a)>t){r.push(i),i=a;continue}i+=a}return r.push(i),r}function T(e,t,n){if(n(e)<=t)return[e];let r=[],i=``,a=(e,a)=>{let o=i?`${i}${a}${e}`:e;if(n(o)<=t){i=o;return}if(i&&=(r.push(i),``),n(e)<=t){i=e;return}let s=w(e,t,n);r.push(...s.slice(0,-1)),i=s[s.length-1]};for(let r of e.split(` `)){if(n(r)<=t){a(r,` `);continue}C(r).forEach((e,t)=>a(e,t===0?` `:``))}return(i||r.length===0)&&r.push(i),r}function E(n,r,i){return n.split(`
|
|
3
|
+
`).map(n=>n.split(` `).map(n=>e(n,i)<=r?t(n):C(n).map(t).join(`<wbr>`)).join(` `)).join(`
|
|
4
|
+
`)}var D={"&":`&`,"<":`<`,">":`>`,""":`"`,"'":`'`},O=/^<\/?(?:br|p|div|li|ul|ol|h[1-6]|blockquote)\b/i;function k(e){let t=[];for(let n of e.split(/(<[^>]*>)/))if(n){if(n.startsWith(`<`)&&n.endsWith(`>`)){t.push({raw:n,char:O.test(n)?`
|
|
5
|
+
`:``,tag:!0});continue}for(let e of n.matchAll(/&[#\w]+;|[\s\S]/gu)){let n=e[0],r=n.length>1?D[n]??`x`:n;t.push({raw:n,char:r,tag:!1})}}return t}function A(t,n,r){let i=k(t),a=new Set,o=[],s=()=>{let t=o.map(e=>i[e].char).join(``);if(t&&e(t,r)>n&&Array.from(t).length===o.length)for(let e of S(t))a.add(o[e]);o=[]};return i.forEach((e,t)=>{if(!(e.tag&&e.char===``)){if(/\s/.test(e.char)){s();return}o.push(t)}}),s(),i.map((e,t)=>a.has(t)?`<wbr>${e.raw}`:e.raw).join(``)}function j(t,n,r){return t.split(`
|
|
6
|
+
`).map(t=>t.split(` `).map(t=>e(t,r)<=n?t:C(t).join(``)).join(` `)).join(`
|
|
7
|
+
`)}export{T as a,h as c,a as d,f,j as i,g as l,i as m,E as n,p as o,c as p,A as r,m as s,S as t,d as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{dt as e}from"./shapes-D5w8NTQQ.js";var t={...e,bg:`#ffffff`},n={bg:`#1c1c1f`,ink:`#e6e6e6`,inkMuted:`#a6a7ae`,inkInverse:`#1e1e1e`,paperBg:`#26262b`,paperGrid:`rgba(255, 255, 255, 0.06)`,paperLine:`rgba(255, 255, 255, 0.13)`};export{t as n,n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{S as e,Z as t}from"./style-BENGW2ZV.js";import{$ as n,C as r,M as i,h as a,j as o}from"./shapes-D5w8NTQQ.js";import{_ as s}from"./slides-DDNzjFz9.js";import{r as c}from"./elk-worker-loader-BCdkmVMX.js";import{t as l}from"./icons-DzW1j-r3.js";import{i as u,r as d,t as f}from"./tidy-scope-REEad7oC.js";import{n as p}from"./asset-glyph-DjBHkQcP.js";import{n as m}from"./shape-meta-YgfIm0bQ.js";import{a as h,c as g,l as _,n as v,o as y,s as b,t as x}from"./layout-offthread-JPTCbsLL.js";import{T as S}from"./builders-DrWdKwLQ.js";import{t as C}from"./widget-source-C3N9ZKTz.js";var w={none:[!1,!1],start:[!0,!1],end:[!1,!0],both:[!0,!0]},T={top:{x:.5,y:0},bottom:{x:.5,y:1},left:{x:0,y:.5},right:{x:1,y:.5},center:{x:.5,y:.5}},E={top:`top`,right:`right`,bottom:`bottom`,left:`left`};function D(e,t){return!e||!t||`kind`in e||!T[t]?e:{...e,anchor:T[t],precise:!0}}function O(t,n){if(t.type!==`arrow`)return t;let r={...t};n.fromSide&&(r.startBinding=D(r.startBinding,n.fromSide)),n.toSide&&(r.endBinding=D(r.endBinding,n.toSide));let i=n.style??(n.dashed?`dashed`:void 0);i&&(r.dash=i),n.color&&e[n.color]&&(r.color=e[n.color]);let a=n.arrows?w[n.arrows]:n.bidirectional?w.both:void 0;return a&&(r.startArrow=a[0],r.endArrow=a[1]),typeof n.label==`string`&&(r.label=n.label),n.bend===`elbow`?r={...r,bendStyle:`elbow`,bend:0,bendAlong:0,bow:0,elbowPoints:void 0,elbowRoute:void 0,elbowMidHandle:void 0}:n.bend===`curved`&&(r.bendStyle=`curved`),r}function k(e){return e.type===`rectangle`||e.type===`icon`||e.type===`sticky`||e.type===`table`||e.type===`chart`}function A(e,t){return{id:e,width:t.width,height:t.height,rank:0,x:t.x,y:t.y}}function j(t,n,r,a,s){let c=()=>{let e=O(S(i(t),i(n),t,n),r);return e.strokeWidth=g,e},l=o(t),u=o(n),d=a.filter(e=>e.id!==t.id&&e.id!==n.id&&k(e)).map(e=>o(e));if(!b([i(t),i(n)],d)&&r.bend===`curved`)return c();let f=_({bounds:l,side:r.fromSide?E[r.fromSide]:void 0},{bounds:u,side:r.toSide?E[r.toSide]:void 0},d,void 0,s);if(!f)return c();let p=y({from:A(t.id,l),to:A(n.id,u),fromShapeId:t.id,toShapeId:n.id,routed:{elbow:!0,bend:0,route:f},label:r.label,labelObstacles:d,dashed:r.style===`dashed`||r.dashed,color:r.color&&e[r.color]?e[r.color]:void 0}),m=r.arrows?w[r.arrows]:r.bidirectional?w.both:void 0;return m&&(p.startArrow=m[0],p.endArrow=m[1]),r.style===`dotted`&&(p.dash=`dotted`),p}function M(e,t){return{...e,x:t.x,y:t.y,x2:t.x2,y2:t.y2,bend:t.bend,bendAlong:t.bendAlong,bendStyle:t.bendStyle,elbowPoints:t.elbowPoints,elbowRoute:void 0,elbowMidHandle:void 0,labelAlong:t.labelAlong,startBinding:t.startBinding,endBinding:t.endBinding}}var N=(()=>{let e={};for(let[t,n]of Object.entries(h))n&&!(n in e)&&(e[n]=t);return e})();function P(e){let t=m(e);if(e.type===`icon`){let n=e.source===`lucide`?e.name:`${e.source}:${e.name}`;return{id:e.id,label:t,icon:n}}return e.type===`sticky`?{id:e.id,label:t,shape:`sticky`}:e.type===`rectangle`?{id:e.id,label:t,shape:N[e.kind]}:{id:e.id,label:t}}var F=28,I=44;function L(e,t,n,r,i){if(e.type===`rectangle`||e.type===`icon`||e.type===`sticky`)return{...e,x:t,y:n,width:r,height:i};let s=o(e);return a(e,{x:t-s.x,y:n-s.y})}function R(e,t){let n=new Map(t.map(e=>[e.id,e])),r=e.startBinding&&!(`kind`in e.startBinding)?n.get(e.startBinding.shapeId):void 0,i=e.endBinding&&!(`kind`in e.endBinding)?n.get(e.endBinding.shapeId):void 0;return!r||!i||r.id===i.id?e:M(e,j(r,i,{},t))}async function z(e,c,l,p){let h=new Set;if(Array.isArray(e.ids)&&e.ids.forEach(e=>h.add(e)),e.selection&&l.forEach(e=>h.add(e)),h.size===0)return[];let g=d(c,h),_=c.filter(e=>g.has(e.id)),v=_.filter(e=>f.has(e.type));if(v.length<2)return[];let y=new Set(v.map(e=>e.id)),b=_.filter(e=>e.type===`arrow`&&!!e.startBinding&&!(`kind`in e.startBinding)&&!!e.endBinding&&!(`kind`in e.endBinding)&&y.has(e.startBinding.shapeId)&&y.has(e.endBinding.shapeId)&&e.startBinding.shapeId!==e.endBinding.shapeId),x=r(v);if(!x)return[];let S=_.filter(e=>e.type===`figure`),C=(e,n)=>t(i(n),o(e)),w=S.filter(e=>!v.every(t=>C(e,t))),T=e=>u(w,e)?.id,E=new Set,D=v.map(e=>{let t=P(e),n=T(e);return n?(E.add(n),{...t,group:n}):t}),O={kind:`graph`,title:``,direction:e.direction??(x.height>x.width*1.3?`down`:`right`),nodes:D,groups:S.filter(e=>E.has(e.id)).map(e=>({id:e.id,label:m(e)})),edges:b.map(e=>({from:e.startBinding.shapeId,to:e.endBinding.shapeId,label:e.label,dashed:e.dash===`dashed`}))},k=await p.layoutGraph(O),A=k.filter(e=>e.type===`rectangle`||e.type===`icon`||e.type===`sticky`);if(A.length!==v.length)return[];let j=r(A);if(!j)return[];let N=x.x-j.x,z=x.y-j.y,B=new Map,V=new Map;v.forEach((e,t)=>{let n=o(A[t]);V.set(A[t].id,e.id),B.set(e.id,L(e,n.x+N,n.y+z,n.width,n.height))});let H=k.filter(e=>e.type===`arrow`),U=e=>{if(!e||`kind`in e)return e;let t=V.get(e.shapeId);return t?{...e,shapeId:t}:e},W;W=H.length===b.length?b.map((e,t)=>{let r=a(H[t],{x:N,y:z}),i=M(e,r);return i.startBinding=U(i.startBinding),i.endBinding=U(i.endBinding),r.label&&e.label&&!n(e.label)&&(i.label=r.label),i}):[];let G=[],K=new Map(B);W.forEach(e=>K.set(e.id,e));let q=S.filter(e=>E.has(e.id)),J=k.filter(e=>e.type===`figure`);J.length===q.length&&q.forEach((e,t)=>{let n=o(J[t]),r={...e,x:n.x+N,y:n.y+z,width:n.width,height:n.height};G.push(r),K.set(e.id,r)});let Y=new Set(G.map(e=>e.id));for(let e of S){if(Y.has(e.id))continue;let t=r(s(c,e).map(e=>K.get(e.id)).filter(e=>e!==void 0));if(t){let n={...e,x:t.x-F,y:t.y-I,width:t.width+F*2,height:t.height+F+I};G.push(n),K.set(e.id,n)}}if(W.length===0&&b.length>0){let e=c.map(e=>K.get(e.id)??e);W=b.map(t=>R(t,e))}return[...B.values(),...G,...W]}var B=c(),V={resolveIcon:e=>l().resolveIcon(e),glyphAspect:p,layoutDiagram:(e,t)=>x(e,t),layoutGraph:v,measureText:typeof document>`u`?void 0:(e,t,n,r)=>B.measure(e,t,n,r),loadWidgetHtml:C};function H(e,t,n){return z(e,t,n,V)}export{H as tidyInBrowser};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Z as e}from"./style-BENGW2ZV.js";import{M as t,j as n}from"./shapes-D5w8NTQQ.js";import{_ as r}from"./slides-DDNzjFz9.js";var i=new Set([`rectangle`,`icon`,`sticky`]);function a(r,i){let a=t(i),o;for(let t of r){let r=n(t);e(a,r)&&(!o||r.width*r.height<o.width*o.height)&&(o=t)}return o}function o(e,t){let n=new Set(t),o=e.filter(e=>e.type===`figure`&&(e.kind??`simple`)===`simple`&&e.slideOrder===void 0);for(let t=0;t<4;t+=1){let t=n.size;for(let t of e)n.has(t.id)&&t.type===`figure`&&r(e,t).forEach(e=>n.add(e.id));for(let t of e){if(!n.has(t.id)||!i.has(t.type))continue;let e=a(o,t);e&&n.add(e.id)}if(n.size===t)break}return n}function s(e,t){if(t.size===0)return!1;let n=o(e,t),r=0;for(let t of e)if(n.has(t.id)&&i.has(t.type)&&(r+=1,r>=2))return!0;return!1}export{a as i,s as n,o as r,i as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{t}from"./react-lCSYwAWP.js";import{An as n,Cn as r,Dn as i,Fn as a,Gt as o,Ht as s,Mn as c,Nn as l,Pn as u,Ut as d,Wt as f,an as p,at as m,bt as h,dt as g,en as _,ht as ee,in as v,it as y,jn as b,lt as x,mn as S,mt as te,pt as C,rn as w,tn as T,yt as E}from"./useScrollLock-CQpr0n6U.js";import{t as D}from"./jsx-runtime-DKdBMi_L.js";import{t as O}from"./FloatingPortalLite-HnWQWrLk.js";var k=e(t(),1),A=k.createContext(void 0);function ne(){let e=k.useContext(A);if(!e)throw Error(b(73));return e}var j=0;function M(e){return j+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${j}`}function N(e,t){if(typeof e==`string`)return{description:e};if(typeof e==`function`){let n=e(t);return typeof n==`string`?{description:n}:n}return e}function P(e){let t=new Map,n=0,r=0;return e.forEach((e,i)=>{let a=e.transitionStatus===`ending`;t.set(e.id,{value:e,domIndex:i,visibleIndex:a?-1:n,offsetY:r}),r+=e.height||0,a||(n+=1)}),t}function F(e,t){let n=0;return e.map(e=>{if(e.transitionStatus===`ending`)return e;let r=n>=t;return n+=1,e.limited===r?e:{...e,limited:r}})}var I=e=>e.toastMetadata,L={toasts:n(e=>e.toasts),isEmpty:n(e=>e.toasts.length===0),toast:n(I,(e,t)=>e.get(t)?.value),toastIndex:n(I,(e,t)=>e.get(t)?.domIndex??-1),toastOffsetY:n(I,(e,t)=>e.get(t)?.offsetY??0),toastVisibleIndex:n(I,(e,t)=>e.get(t)?.visibleIndex??-1),hovering:n(e=>e.hovering),focused:n(e=>e.focused),expanded:n(e=>e.hovering||e.focused),expandedOrOutOfFocus:n(e=>e.hovering||e.focused||!e.isWindowFocused),prevFocusElement:n(e=>e.prevFocusElement)},R=class extends r{timers=new Map;areTimersPaused=!1;constructor(e){super({...e,toastMetadata:P(e.toasts)},{},L)}setFocused(e){this.set(`focused`,e)}setHovering(e){this.set(`hovering`,e)}setIsWindowFocused(e){this.set(`isWindowFocused`,e)}setPrevFocusElement(e){this.set(`prevFocusElement`,e)}setViewport=e=>{this.set(`viewport`,e)};syncProviderProps(e){let t=this.state.limit!==e.limit;if(this.state.timeout===e.timeout&&!t)return;let n={timeout:e.timeout,limit:e.limit};if(t){let t=F(this.state.toasts,e.limit);n.toasts=t,n.toastMetadata=P(t)}this.update(n)}disposeEffect=()=>()=>{this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear()};removeToast(e,t={}){let n=L.toastIndex(this.state,e);if(n===-1)return;let r=this.state.toasts[n];t.skipOnRemove||r?.onRemove?.();let i=[...this.state.toasts];i.splice(n,1),this.setToasts(i)}addToast=e=>{let{timeout:t,limit:n}=this.state,r=e.id||M(`toast`);if(e.id){let t=L.toast(this.state,e.id);if(t)if(t.transitionStatus===`ending`)this.removeToast(e.id,{skipOnRemove:!0});else{let{id:t,transitionStatus:n,...r}=e;return this.updateToastInternal(e.id,r,{resetTimer:!0,markUpdated:!0}),e.id}}let i={...e,id:r,updateKey:0,transitionStatus:`starting`},a=[i,...this.state.toasts];this.setToasts(F(a,n));let o=i.timeout??t;return i.type!==`loading`&&o>0&&this.scheduleTimer(r,o,()=>this.closeToast(r)),L.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),r};updateToast=(e,t)=>{this.updateToastInternal(e,t,{markUpdated:!0})};updateToastInternal=(e,t,n={})=>{let{timeout:r,toasts:i}=this.state,a=L.toast(this.state,e)??null;if(!a||a.transitionStatus===`ending`)return;let o={...a,...t,...n.markUpdated&&{updateKey:(a.updateKey??0)+1}};this.setToasts(i.map(t=>t.id===e?o:t));let s=o.timeout??r,c=a?.timeout??r,l=Object.hasOwn(t,`timeout`),u=o.transitionStatus!==`ending`&&o.type!==`loading`&&s>0,d=this.timers.has(e),f=c!==s,p=a?.type===`loading`;if(!u&&d){this.clearTimer(e);return}u&&(!d||f||l||p||n.resetTimer)&&(this.clearTimer(e),this.scheduleTimer(e,s,()=>this.closeToast(e)),L.expandedOrOutOfFocus(this.state)&&this.pauseTimers())};closeToast=e=>{let t=e===void 0,{limit:n,toasts:r}=this.state,i;if(t)i=r,this.clearTimers();else{let t=L.toast(this.state,e);if(!t)return;i=[t],this.clearTimer(e)}let a=F(r.map(n=>t||n.id===e?{...n,transitionStatus:`ending`,height:0}:n),n),o={toasts:a,toastMetadata:P(a)};a.some(e=>e.transitionStatus!==`ending`)||(o.hovering=!1,o.focused=!1),this.update(o),i.forEach(e=>{e.transitionStatus!==`ending`&&e.onClose?.()}),this.handleFocusManagement(e)};promiseToast=(e,t)=>{let n=N(t.loading),r=this.addToast({...n,type:`loading`}),i=e.then(e=>{let n=N(t.success,e);return this.updateToast(r,{...n,type:`success`,timeout:n.timeout}),e}).catch(e=>{let n=N(t.error,e);return this.updateToast(r,{...n,type:`error`,timeout:n.timeout}),Promise.reject(e)});return{}.hasOwnProperty.call(t,`setPromise`)&&t.setPromise(i),i};pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(e=>{if(e.timeout){e.timeout.clear();let t=Date.now()-e.start,n=e.delay-t;e.remaining=n>0?n:0}}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((e,t)=>{e.remaining=e.remaining>0?e.remaining:e.delay,e.timeout??=_.create(),e.timeout.start(e.remaining,()=>{this.handleTimerFired(t),e.callback()}),e.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}handleDocumentPointerDown=e=>{if(e.pointerType!==`touch`)return;let t=o(e);f(this.state.viewport,t)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))};scheduleTimer(e,t,n){let r=Date.now(),i=!L.expandedOrOutOfFocus(this.state),a=i?_.create():void 0;a?.start(t,()=>{this.handleTimerFired(e),n()}),this.timers.set(e,{timeout:a,start:i?r:0,delay:t,remaining:t,callback:n})}clearTimers(){this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear(),this.areTimersPaused=!1}clearTimer(e){this.timers.get(e)?.timeout?.clear(),this.timers.delete(e),this.resetPausedStateIfNoTimersRemain()}handleTimerFired(e){this.timers.delete(e),this.resetPausedStateIfNoTimersRemain()}resetPausedStateIfNoTimersRemain(){this.timers.size===0&&(this.areTimersPaused=!1)}setToasts(e){let t={toasts:e,toastMetadata:P(e)};e.length===0&&(t.hovering=!1,t.focused=!1),this.update(t)}handleFocusManagement(e){let t=d(v(this.state.viewport));if(!this.state.viewport||!f(this.state.viewport,t)||!s(t))return;if(e===void 0){this.restoreFocusToPrevElement();return}let n=L.toasts(this.state),r=L.toastIndex(this.state,e),i=null,a=r+1;for(;a<n.length;){if(n[a].transitionStatus!==`ending`){i=n[a];break}a+=1}if(!i)for(a=r-1;a>=0;){if(n[a].transitionStatus!==`ending`){i=n[a];break}--a}i?i.ref?.current?.focus():this.restoreFocusToPrevElement()}},z=D(),B=function(e){let{children:t,timeout:n=5e3,limit:r=3,toastManager:i}=e,a=l(()=>new R({timeout:n,limit:r,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return u(a.disposeEffect),k.useEffect(function(){if(i)return i[` subscribe`](({action:e,options:t})=>{let n=t.id;e===`promise`&&t.promise?a.promiseToast(t.promise,t):e===`update`&&n?a.updateToast(n,t):e===`close`?a.closeToast(n):a.addToast(t)})},[a,i]),c(()=>{a.syncProviderProps({timeout:n,limit:r})},[a,n,r]),(0,z.jsx)(A.Provider,{value:a,children:t})},V=function(e){return e.frontmostHeight=`--toast-frontmost-height`,e}({}),H=k.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...c}=e,l=ne(),u=T(),m=k.useRef(!1),g=k.useRef(!1),_=k.useRef(!1),y=l.useState(`isEmpty`),b=l.useState(`toasts`),x=l.useState(`focused`),te=l.useState(`expanded`),C=l.useState(`prevFocusElement`),D=b[0]?.height??0,O=k.useMemo(()=>b.some(e=>e.transitionStatus===`ending`),[b]),A=k.useMemo(()=>b.filter(e=>e.priority===`high`),[b]);k.useEffect(()=>{let e=l.state.viewport;if(!e)return;function t(t){y||t.key===`F6`&&o(t)!==e&&(t.preventDefault(),l.setPrevFocusElement(d(v(e))),e?.focus({preventScroll:!0}),l.pauseTimers(),l.setFocused(!0))}return w(S(e),`keydown`,t)},[l,y]),k.useEffect(()=>{let e=l.state.viewport;if(!e||y)return;let t=S(e);function n(e){o(e)===t&&(l.setIsWindowFocused(!1),l.pauseTimers())}function r(n){if(n.relatedTarget)return;let r=o(n),i=d(v(e));(r===t||!f(e,r)||!s(i))&&l.resumeTimers(),u.start(0,()=>l.setIsWindowFocused(!0))}return p(w(t,`blur`,n,!0),w(t,`focus`,r,!0))},[l,u,y]),k.useEffect(()=>{let e=l.state.viewport;if(!(!e||y))return w(v(e),`pointerdown`,l.handleDocumentPointerDown,!0)},[y,l]);function j(e){let t=l.state.viewport;if(t)if(m.current=!0,e.relatedTarget===t){let e=b.find(e=>e.transitionStatus!==`ending`&&!e.limited);e?e.ref?.current?.focus():l.restoreFocusToPrevElement()}else l.restoreFocusToPrevElement()}function M(e){e.key===`Tab`&&e.shiftKey&&o(e.nativeEvent)===l.state.viewport&&(e.preventDefault(),l.restoreFocusToPrevElement(),l.resumeTimers())}function N(){l.state.toasts.some(e=>e.transitionStatus===`ending`)||_.current||!g.current||(l.state.isWindowFocused&&l.resumeTimers(),l.setHovering(!1),g.current=!1)}k.useEffect(N,[O,l]);function P(){l.pauseTimers(),l.setHovering(!0),g.current=!1}function F(){l.state.isWindowFocused&&l.resumeTimers()}function I(){l.state.toasts.some(e=>e.transitionStatus===`ending`)||_.current?g.current=!0:(F(),l.setHovering(!1))}function L(e){e.pointerType===`touch`&&(_.current=!0)}function R(e){e.pointerType===`touch`&&(_.current=!1,N())}function B(){if(m.current){m.current=!1;return}x||s(d(v(l.state.viewport)))&&(l.setFocused(!0),l.pauseTimers())}function H(e){!x||f(l.state.viewport,e.relatedTarget)||(l.setFocused(!1),F())}let re={tabIndex:-1,role:`region`,"aria-live":`polite`,"aria-atomic":!1,"aria-relevant":`additions text`,"aria-label":`Notifications`,onMouseEnter:P,onMouseMove:P,onMouseLeave:I,onFocus:B,onBlur:H,onKeyDown:M,onClick:B,onPointerDown:L,onPointerUp:R,onPointerCancel:R},ie={expanded:te},U=ee(`div`,e,{ref:[t,l.setViewport],state:ie,props:[re,{style:{[V.frontmostHeight]:D?`${D}px`:void 0}},c,{children:(0,z.jsxs)(k.Fragment,{children:[!y&&C&&(0,z.jsx)(E,{onFocus:j}),a,!y&&C&&(0,z.jsx)(E,{onFocus:j})]})}]});return(0,z.jsxs)(k.Fragment,{children:[!y&&C&&(0,z.jsx)(E,{onFocus:j}),U,!x&&A.length>0&&(0,z.jsx)(`div`,{style:h,children:A.map(e=>(0,z.jsxs)(`div`,{role:`alert`,"aria-atomic":!0,children:[(0,z.jsx)(`div`,{children:e.title}),(0,z.jsx)(`div`,{children:e.description})]},e.id))})]})}),re=e(a(),1),ie=k.createContext(void 0);function U(){let e=k.useContext(ie);if(!e)throw Error(b(66));return e}var W=function(e){return e.index=`--toast-index`,e.offsetY=`--toast-offset-y`,e.height=`--toast-height`,e.swipeMovementX=`--toast-swipe-movement-x`,e.swipeMovementY=`--toast-swipe-movement-y`,e}({});function ae(e,t,n){switch(e){case`up`:return-n;case`down`:return n;case`left`:return-t;case`right`:return t;default:return 0}}function oe(e){let t=S(e).getComputedStyle(e).transform,n=0,r=0,i=1;if(t&&t!==`none`){let e=t.match(/matrix(?:3d)?\(([^)]+)\)/);if(e){let t=e[1].split(`, `).map(parseFloat);t.length===6?(n=t[4],r=t[5],i=Math.sqrt(t[0]*t[0]+t[1]*t[1])):t.length===16&&(n=t[12],r=t[13],i=t[0])}}return{x:n,y:r,scale:i}}var se={...C,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},ce=40,le=10,G=.5,ue=1,de=`${m},${x}`,K=k.forwardRef(function(e,t){let{toast:n,render:r,className:a,swipeDirection:s=[`down`,`right`],style:l,...u}=e,p=n.positionerProps?.anchor!==void 0,m=[];p||(m=Array.isArray(s)?s:[s]);let h=m.length>0,_=ne(),[y,b]=k.useState(void 0),[x,S]=k.useState(!1),[C,T]=k.useState(!1),[E,D]=k.useState(!1),[O,A]=k.useState({x:0,y:0}),[j,M]=k.useState({x:0,y:0,scale:1}),[N,P]=k.useState(),[F,I]=k.useState(),[L,R]=k.useState(null),B=k.useRef(null),V=k.useRef({x:0,y:0}),H=k.useRef({x:0,y:0,scale:1}),U=k.useRef(void 0),K=k.useRef(0),q=k.useRef(!1),J=k.useRef({x:0,y:0}),fe=k.useRef(!1),pe=k.useRef({x:0,y:0}),Y=k.useRef(null),X=k.useRef(null),Z=_.useState(`toastIndex`,n.id),Q=_.useState(`toastVisibleIndex`,n.id),me=_.useState(`toastOffsetY`,n.id),he=_.useState(`focused`),$=_.useState(`expanded`);g({open:n.transitionStatus!==`ending`,ref:B,onComplete(){n.transitionStatus===`ending`&&_.removeToast(n.id)}});let ge=i((e=!1)=>{let t=B.current;if(!t)return;let r=t.style.height;t.style.height=`auto`;let i=t.offsetHeight;t.style.height=r;function a(){_.updateToastInternal(n.id,{ref:B,height:i,...n.transitionStatus===`starting`?{transitionStatus:void 0}:{}})}e?re.flushSync(a):a()});c(ge,[ge]);function _e(e){pe.current=e,A(e)}c(()=>()=>{X.current?.abort()},[]);function ve(e,t){let n=e,r=t;return!m.includes(`left`)&&!m.includes(`right`)?n=e>0?e**G:-(Math.abs(e)**G):(!m.includes(`right`)&&e>0&&(n=e**G),!m.includes(`left`)&&e<0&&(n=-(Math.abs(e)**G))),!m.includes(`up`)&&!m.includes(`down`)?r=t>0?t**G:-(Math.abs(t)**G):(!m.includes(`down`)&&t>0&&(r=t**G),!m.includes(`up`)&&t<0&&(r=-(Math.abs(t)**G))),{x:n,y:r}}let ye=i(e=>{if(e.pointerId!==Y.current)return;Y.current=null,X.current?.abort(),X.current=null,S(!1),T(!1),R(null);let t=H.current;if(e.type===`pointercancel`||q.current){_e({x:t.x,y:t.y}),b(void 0);return}let r=!1,i=pe.current,a=i.x-t.x,o=i.y-t.y,s;for(let e of m){switch(e){case`right`:a>ce&&(r=!0,s=`right`);break;case`left`:a<-40&&(r=!0,s=`left`);break;case`down`:o>ce&&(r=!0,s=`down`);break;case`up`:o<-40&&(r=!0,s=`up`);break;default:break}if(r)break}r?(b(s),D(!0),_.closeToast(n.id)):(_e({x:t.x,y:t.y}),b(void 0))});function be(e){if(e.button!==0)return;e.pointerType===`touch`&&_.pauseTimers();let t=o(e.nativeEvent);if(t&&t.closest(`button,a,input,textarea,[role="button"],${de}`))return;if(q.current=!1,U.current=void 0,K.current=0,Y.current=e.pointerId,V.current={x:e.clientX,y:e.clientY},J.current=V.current,B.current){let e=oe(B.current);H.current=e,M(e),_e({x:e.x,y:e.y})}_.setHovering(!0),S(!0),T(!1),R(null),fe.current=!0;let n=B.current;if(n){X.current?.abort();let t=new AbortController;X.current=t;let r=v(n);r.addEventListener(`pointerup`,ye,{signal:t.signal}),r.addEventListener(`pointercancel`,ye,{signal:t.signal}),n.setPointerCapture?.(e.pointerId)}}function xe(e){if(e.pointerId!==Y.current)return;e.preventDefault(),fe.current&&=(V.current={x:e.clientX,y:e.clientY},!1);let{clientY:t,clientX:n,movementX:r,movementY:i}=e;(i<0&&t>J.current.y||i>0&&t<J.current.y)&&(J.current={x:J.current.x,y:t}),(r<0&&n>J.current.x||r>0&&n<J.current.x)&&(J.current={x:n,y:J.current.y});let a=n-V.current.x,o=t-V.current.y,s=t-J.current.y,c=n-J.current.x;if(!C&&Math.sqrt(a*a+o*o)>=ue&&(T(!0),L===null)){let e=m.includes(`left`)||m.includes(`right`),t=m.includes(`up`)||m.includes(`down`);e&&t&&R(Math.abs(a)>Math.abs(o)?`horizontal`:`vertical`)}let l;if(!U.current)L===`vertical`?o>0?l=`down`:o<0&&(l=`up`):L===`horizontal`?a>0?l=`right`:a<0&&(l=`left`):l=Math.abs(a)>=Math.abs(o)?a>0?`right`:`left`:o>0?`down`:`up`,l&&m.includes(l)&&(U.current=l,K.current=ae(l,a,o),b(l));else{let e=U.current,t=ae(e,c,s);t>ce?(q.current=!1,b(e)):!(m.includes(`left`)&&m.includes(`right`))&&!(m.includes(`up`)&&m.includes(`down`))&&K.current-t>=le&&(q.current=!0)}let u=ve(a,o),d=H.current.x,f=H.current.y;L===`horizontal`?(m.includes(`left`)||m.includes(`right`))&&(d+=u.x):(L===`vertical`||(m.includes(`left`)||m.includes(`right`))&&(d+=u.x),(m.includes(`up`)||m.includes(`down`))&&(f+=u.y)),_e({x:d,y:f})}function Se(e){if(e.key===`Escape`){if(!B.current||!f(B.current,d(v(B.current))))return;_.closeToast(n.id)}}k.useEffect(()=>{if(!h)return;let e=B.current;if(!e)return;function t(t){Y.current===null||!f(e,o(t))||t.preventDefault()}return w(e,`touchmove`,t,{passive:!1})},[h]);function Ce(){if(!x&&O.x===j.x&&O.y===j.y&&!E)return{[W.swipeMovementX]:`0px`,[W.swipeMovementY]:`0px`};let e=O.x-j.x,t=O.y-j.y;return{transition:x?`none`:void 0,transform:x?`translateX(${O.x}px) translateY(${O.y}px) scale(${j.scale})`:void 0,[W.swipeMovementX]:`${e}px`,[W.swipeMovementY]:`${t}px`}}let we=n.priority===`high`,Te={role:we?`alertdialog`:`dialog`,tabIndex:0,"aria-modal":!1,"aria-labelledby":N,"aria-describedby":F,"aria-hidden":we&&!he?!0:void 0,onPointerDown:h?be:void 0,onPointerMove:h?xe:void 0,onPointerUp:h?ye:void 0,onPointerCancel:h?ye:void 0,onKeyDown:Se,inert:te(n.limited),style:{...Ce(),[W.index]:n.transitionStatus===`ending`?Z:Q,[W.offsetY]:`${me}px`,[W.height]:n.height?`${n.height}px`:void 0}},Ee=k.useMemo(()=>({rootRef:B,toast:n,titleId:N,setTitleId:P,descriptionId:F,setDescriptionId:I,swiping:x,swipeDirection:y,recalculateHeight:ge,index:Z,visibleIndex:Q,expanded:$}),[n,N,F,x,y,ge,Z,Q,$]),De={transitionStatus:n.transitionStatus,expanded:$,limited:n.limited||!1,type:n.type,swiping:Ee.swiping,swipeDirection:Ee.swipeDirection},Oe=ee(`div`,e,{ref:[t,Ee.rootRef],state:De,stateAttributesMapping:se,props:[Te,u]});return(0,z.jsx)(ie.Provider,{value:Ee,children:Oe})}),q=k.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,children:o,...s}=e,{toast:l,setTitleId:u}=U(),d=o??l.title,f=!!d,p=y(a);c(()=>{if(f)return u(p),()=>{u(void 0)}},[f,p,u]);let m=ee(`h2`,e,{ref:t,state:{type:l.type},props:{...s,id:p,children:d}});return f?m:null}),J=O;function fe(){let e=k.useContext(A);if(!e)throw Error(b(73));let t=e.useState(`toasts`);return k.useMemo(()=>({toasts:t,add:e.addToast,close:e.closeToast,update:e.updateToast,promise:e.promiseToast}),[t,e])}function pe(){let e=new Set;function t(t){e.forEach(e=>e(t))}return{" subscribe":function(t){return e.add(t),()=>{e.delete(t)}},add(e){let n=e.id||M(`toast`);return t({action:`add`,options:{...e,id:n,transitionStatus:`starting`}}),n},close(e){t({action:`close`,options:{id:e}})},update(e,n){t({action:`update`,options:{...n,id:e}})},promise(e,n){let r=e;return t({action:`promise`,options:{...n,promise:e,setPromise(e){r=e}}}),r}}}function Y(e=pe()){let t=null;function n(n){t!==null&&e.close(t);let r=e.add({title:n,timeout:2600,onClose:()=>{t===r&&(t=null)}});t=r}return{manager:e,notify:n}}var X=[`absolute bottom-0 right-0 z-[calc(1000-var(--toast-index))]`,`w-max select-none rounded-full bg-[var(--chrome-accent)] px-3.5 py-2 text-[13px] text-white`,`shadow-[0_8px_30px_rgba(0,0,0,0.22)] transition-all duration-300 ease-out`,`data-[starting-style]:translate-x-[110%] data-[starting-style]:opacity-0`,`data-[ending-style]:translate-x-[110%] data-[ending-style]:opacity-0`].join(` `);function Z(){let{toasts:e}=fe();return e.map(e=>(0,z.jsx)(K,{toast:e,className:X,swipeDirection:`right`,children:(0,z.jsx)(q,{})},e.id))}var Q=(0,k.createContext)(null);function me(e){let{controller:t,children:n}=e;return(0,z.jsx)(Q.Provider,{value:t,children:(0,z.jsxs)(B,{toastManager:t.manager,children:[n,(0,z.jsx)(J,{children:(0,z.jsx)(H,{"data-overlay":!0,"data-testid":`toast-viewport`,className:`fixed bottom-4 right-4 z-50`,children:(0,z.jsx)(Z,{})})})]})})}var he=()=>{};function $(){let e=(0,k.useContext)(Q);return{notify:e?e.notify:he}}export{Y as n,$ as r,me as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-2Zwg-L3c.js";import{Sr as t}from"./slides-D9bnXqtf.js";import{r as n}from"./frames-CRP8oPP8.js";import{t as r}from"./createReactComponent-9UsI5fmM.js";import{t as i}from"./IconAlertTriangle-CxPhYpe-.js";import{t as a}from"./IconEraser-DlZQe3-r.js";import{t as ee}from"./IconLink-ze4g4Lrj.js";import{t as o}from"./IconMinus-y4ejub-s.js";import{t as te}from"./IconMoodSmile-Bic_fw54.js";import{t as ne}from"./IconPencil-C5Y-Y4dC.js";import{t as s}from"./IconPhoto-CR36IK-b.js";import{t as c}from"./IconSearch-C1K0_Pq_.js";import{t as l}from"./IconSparkles-WDcg8BA9.js";import{C as u,b as d,c as f,f as p,g as m,h as re,p as ie,s as ae,v as oe,x as se,y as ce}from"./PopoverPopup-BqGWd_uB.js";import{t as le}from"./keys-DrjiT9FL.js";var h=r(`outline`,`adjustments-horizontal`,`AdjustmentsHorizontal`,[[`path`,{d:`M12 6a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-0`}],[`path`,{d:`M4 6l8 0`,key:`svg-1`}],[`path`,{d:`M16 6l4 0`,key:`svg-2`}],[`path`,{d:`M6 12a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-3`}],[`path`,{d:`M4 12l2 0`,key:`svg-4`}],[`path`,{d:`M10 12l10 0`,key:`svg-5`}],[`path`,{d:`M15 18a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-6`}],[`path`,{d:`M4 18l11 0`,key:`svg-7`}],[`path`,{d:`M19 18l1 0`,key:`svg-8`}]]),ue=r(`outline`,`align-justified`,`AlignJustified`,[[`path`,{d:`M4 6l16 0`,key:`svg-0`}],[`path`,{d:`M4 12l16 0`,key:`svg-1`}],[`path`,{d:`M4 18l12 0`,key:`svg-2`}]]),de=r(`outline`,`antenna-bars-5`,`AntennaBars5`,[[`path`,{d:`M6 18l0 -3`,key:`svg-0`}],[`path`,{d:`M10 18l0 -6`,key:`svg-1`}],[`path`,{d:`M14 18l0 -9`,key:`svg-2`}],[`path`,{d:`M18 18l0 -12`,key:`svg-3`}]]),fe=r(`outline`,`app-window`,`AppWindow`,[[`path`,{d:`M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10`,key:`svg-0`}],[`path`,{d:`M6 8h.01`,key:`svg-1`}],[`path`,{d:`M9 8h.01`,key:`svg-2`}]]),pe=r(`outline`,`box-margin`,`BoxMargin`,[[`path`,{d:`M8 8h8v8h-8l0 -8`,key:`svg-0`}],[`path`,{d:`M4 4v.01`,key:`svg-1`}],[`path`,{d:`M8 4v.01`,key:`svg-2`}],[`path`,{d:`M12 4v.01`,key:`svg-3`}],[`path`,{d:`M16 4v.01`,key:`svg-4`}],[`path`,{d:`M20 4v.01`,key:`svg-5`}],[`path`,{d:`M4 20v.01`,key:`svg-6`}],[`path`,{d:`M8 20v.01`,key:`svg-7`}],[`path`,{d:`M12 20v.01`,key:`svg-8`}],[`path`,{d:`M16 20v.01`,key:`svg-9`}],[`path`,{d:`M20 20v.01`,key:`svg-10`}],[`path`,{d:`M20 16v.01`,key:`svg-11`}],[`path`,{d:`M20 12v.01`,key:`svg-12`}],[`path`,{d:`M20 8v.01`,key:`svg-13`}],[`path`,{d:`M4 16v.01`,key:`svg-14`}],[`path`,{d:`M4 12v.01`,key:`svg-15`}],[`path`,{d:`M4 8v.01`,key:`svg-16`}]]),g=r(`outline`,`brackets-contain`,`BracketsContain`,[[`path`,{d:`M7 4h-4v16h4`,key:`svg-0`}],[`path`,{d:`M17 4h4v16h-4`,key:`svg-1`}],[`path`,{d:`M8 16h.01`,key:`svg-2`}],[`path`,{d:`M12 16h.01`,key:`svg-3`}],[`path`,{d:`M16 16h.01`,key:`svg-4`}]]),me=r(`outline`,`browser`,`Browser`,[[`path`,{d:`M4 8h16`,key:`svg-0`}],[`path`,{d:`M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12`,key:`svg-1`}],[`path`,{d:`M8 4v4`,key:`svg-2`}]]),he=r(`outline`,`calendar`,`Calendar`,[[`path`,{d:`M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12`,key:`svg-0`}],[`path`,{d:`M16 3v4`,key:`svg-1`}],[`path`,{d:`M8 3v4`,key:`svg-2`}],[`path`,{d:`M4 11h16`,key:`svg-3`}],[`path`,{d:`M11 15h1`,key:`svg-4`}],[`path`,{d:`M12 15v3`,key:`svg-5`}]]),ge=r(`outline`,`cards`,`Cards`,[[`path`,{d:`M3.604 7.197l7.138 -3.109a.96 .96 0 0 1 1.27 .527l4.924 11.902a1 1 0 0 1 -.514 1.304l-7.137 3.109a.96 .96 0 0 1 -1.271 -.527l-4.924 -11.903a1 1 0 0 1 .514 -1.304l0 .001`,key:`svg-0`}],[`path`,{d:`M15 4h1a1 1 0 0 1 1 1v3.5`,key:`svg-1`}],[`path`,{d:`M20 6c.264 .112 .52 .217 .768 .315a1 1 0 0 1 .53 1.311l-2.298 5.374`,key:`svg-2`}]]),_=r(`outline`,`chart-area-line`,`ChartAreaLine`,[[`path`,{d:`M4 19l4 -6l4 2l4 -5l4 4l0 5l-16 0`,key:`svg-0`}],[`path`,{d:`M4 12l3 -4l4 2l5 -6l4 4`,key:`svg-1`}]]),v=r(`outline`,`chart-bar`,`ChartBar`,[[`path`,{d:`M3 13a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -6`,key:`svg-0`}],[`path`,{d:`M15 9a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -10`,key:`svg-1`}],[`path`,{d:`M9 5a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -14`,key:`svg-2`}],[`path`,{d:`M4 20h14`,key:`svg-3`}]]),y=r(`outline`,`chart-dots`,`ChartDots`,[[`path`,{d:`M3 3v18h18`,key:`svg-0`}],[`path`,{d:`M7 9a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-1`}],[`path`,{d:`M17 7a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-2`}],[`path`,{d:`M12 15a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-3`}],[`path`,{d:`M10.16 10.62l2.34 2.88`,key:`svg-4`}],[`path`,{d:`M15.088 13.328l2.837 -4.586`,key:`svg-5`}]]),b=r(`outline`,`chart-grid-dots`,`ChartGridDots`,[[`path`,{d:`M16 6a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-0`}],[`path`,{d:`M4 12a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-1`}],[`path`,{d:`M4 18a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-2`}],[`path`,{d:`M16 18a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-3`}],[`path`,{d:`M8 18h8`,key:`svg-4`}],[`path`,{d:`M18 20v1`,key:`svg-5`}],[`path`,{d:`M18 3v1`,key:`svg-6`}],[`path`,{d:`M6 20v1`,key:`svg-7`}],[`path`,{d:`M6 10v-7`,key:`svg-8`}],[`path`,{d:`M12 3v18`,key:`svg-9`}],[`path`,{d:`M18 8v8`,key:`svg-10`}],[`path`,{d:`M8 12h13`,key:`svg-11`}],[`path`,{d:`M21 6h-1`,key:`svg-12`}],[`path`,{d:`M16 6h-13`,key:`svg-13`}],[`path`,{d:`M3 12h1`,key:`svg-14`}],[`path`,{d:`M20 18h1`,key:`svg-15`}],[`path`,{d:`M3 18h1`,key:`svg-16`}],[`path`,{d:`M6 14v2`,key:`svg-17`}]]),x=r(`outline`,`chart-line`,`ChartLine`,[[`path`,{d:`M4 19l16 0`,key:`svg-0`}],[`path`,{d:`M4 15l4 -6l4 2l4 -5l4 4`,key:`svg-1`}]]),S=r(`outline`,`chart-pie`,`ChartPie`,[[`path`,{d:`M10 3.2a9 9 0 1 0 10.8 10.8a1 1 0 0 0 -1 -1h-6.8a2 2 0 0 1 -2 -2v-7a.9 .9 0 0 0 -1 -.8`,key:`svg-0`}],[`path`,{d:`M15 3.5a9 9 0 0 1 5.5 5.5h-4.5a1 1 0 0 1 -1 -1v-4.5`,key:`svg-1`}]]),C=r(`outline`,`checkbox`,`Checkbox`,[[`path`,{d:`M9 11l3 3l8 -8`,key:`svg-0`}],[`path`,{d:`M20 12v6a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h9`,key:`svg-1`}]]),w=r(`outline`,`chevrons-right`,`ChevronsRight`,[[`path`,{d:`M7 7l5 5l-5 5`,key:`svg-0`}],[`path`,{d:`M13 7l5 5l-5 5`,key:`svg-1`}]]),T=r(`outline`,`circle-dashed`,`CircleDashed`,[[`path`,{d:`M8.56 3.69a9 9 0 0 0 -2.92 1.95`,key:`svg-0`}],[`path`,{d:`M3.69 8.56a9 9 0 0 0 -.69 3.44`,key:`svg-1`}],[`path`,{d:`M3.69 15.44a9 9 0 0 0 1.95 2.92`,key:`svg-2`}],[`path`,{d:`M8.56 20.31a9 9 0 0 0 3.44 .69`,key:`svg-3`}],[`path`,{d:`M15.44 20.31a9 9 0 0 0 2.92 -1.95`,key:`svg-4`}],[`path`,{d:`M20.31 15.44a9 9 0 0 0 .69 -3.44`,key:`svg-5`}],[`path`,{d:`M20.31 8.56a9 9 0 0 0 -1.95 -2.92`,key:`svg-6`}],[`path`,{d:`M15.44 3.69a9 9 0 0 0 -3.44 -.69`,key:`svg-7`}]]),E=r(`outline`,`circle-dot`,`CircleDot`,[[`path`,{d:`M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-0`}],[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`,key:`svg-1`}]]),D=r(`outline`,`circle-number-1`,`CircleNumber1`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`,key:`svg-0`}],[`path`,{d:`M10 10l2 -2v8`,key:`svg-1`}]]),O=r(`outline`,`circle-plus`,`CirclePlus`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0`,key:`svg-0`}],[`path`,{d:`M9 12h6`,key:`svg-1`}],[`path`,{d:`M12 9v6`,key:`svg-2`}]]),k=r(`outline`,`circle`,`Circle`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`,key:`svg-0`}]]),A=r(`outline`,`device-mobile`,`DeviceMobile`,[[`path`,{d:`M6 5a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2v-14`,key:`svg-0`}],[`path`,{d:`M11 4h2`,key:`svg-1`}],[`path`,{d:`M12 17v.01`,key:`svg-2`}]]),j=r(`outline`,`device-tablet`,`DeviceTablet`,[[`path`,{d:`M5 4a1 1 0 0 1 1 -1h12a1 1 0 0 1 1 1v16a1 1 0 0 1 -1 1h-12a1 1 0 0 1 -1 -1v-16`,key:`svg-0`}],[`path`,{d:`M11 17a1 1 0 1 0 2 0a1 1 0 0 0 -2 0`,key:`svg-1`}]]),M=r(`outline`,`forms`,`Forms`,[[`path`,{d:`M12 3a3 3 0 0 0 -3 3v12a3 3 0 0 0 3 3`,key:`svg-0`}],[`path`,{d:`M6 3a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3`,key:`svg-1`}],[`path`,{d:`M13 7h7a1 1 0 0 1 1 1v8a1 1 0 0 1 -1 1h-7`,key:`svg-2`}],[`path`,{d:`M5 7h-1a1 1 0 0 0 -1 1v8a1 1 0 0 0 1 1h1`,key:`svg-3`}],[`path`,{d:`M17 12h.01`,key:`svg-4`}],[`path`,{d:`M13 12h.01`,key:`svg-5`}]]),N=r(`outline`,`hand-stop`,`HandStop`,[[`path`,{d:`M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5`,key:`svg-0`}],[`path`,{d:`M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5`,key:`svg-1`}],[`path`,{d:`M14 5.5a1.5 1.5 0 0 1 3 0v6.5`,key:`svg-2`}],[`path`,{d:`M17 7.5a1.5 1.5 0 0 1 3 0v8.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47`,key:`svg-3`}]]),P=r(`outline`,`heading`,`Heading`,[[`path`,{d:`M7 12h10`,key:`svg-0`}],[`path`,{d:`M7 5v14`,key:`svg-1`}],[`path`,{d:`M17 5v14`,key:`svg-2`}],[`path`,{d:`M15 19h4`,key:`svg-3`}],[`path`,{d:`M15 5h4`,key:`svg-4`}],[`path`,{d:`M5 19h4`,key:`svg-5`}],[`path`,{d:`M5 5h4`,key:`svg-6`}]]),F=r(`outline`,`highlight`,`Highlight`,[[`path`,{d:`M3 19h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4`,key:`svg-0`}],[`path`,{d:`M12.5 5.5l4 4`,key:`svg-1`}],[`path`,{d:`M4.5 13.5l4 4`,key:`svg-2`}],[`path`,{d:`M21 15v4h-8l4 -4l4 0`,key:`svg-3`}]]),I=r(`outline`,`lasso`,`Lasso`,[[`path`,{d:`M4.028 13.252c-.657 -.972 -1.028 -2.078 -1.028 -3.252c0 -3.866 4.03 -7 9 -7s9 3.134 9 7s-4.03 7 -9 7c-1.913 0 -3.686 -.464 -5.144 -1.255`,key:`svg-0`}],[`path`,{d:`M3 15a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-1`}],[`path`,{d:`M5 17c0 1.42 .316 2.805 1 4`,key:`svg-2`}]]),L=r(`outline`,`layout-bottombar`,`LayoutBottombar`,[[`path`,{d:`M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12`,key:`svg-0`}],[`path`,{d:`M4 15l16 0`,key:`svg-1`}]]),R=r(`outline`,`layout-columns`,`LayoutColumns`,[[`path`,{d:`M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12`,key:`svg-0`}],[`path`,{d:`M12 4l0 16`,key:`svg-1`}]]),_e=r(`outline`,`layout-kanban`,`LayoutKanban`,[[`path`,{d:`M4 4l6 0`,key:`svg-0`}],[`path`,{d:`M14 4l6 0`,key:`svg-1`}],[`path`,{d:`M4 10a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2l0 -8`,key:`svg-2`}],[`path`,{d:`M14 10a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2l0 -2`,key:`svg-3`}]]),ve=r(`outline`,`layout-navbar`,`LayoutNavbar`,[[`path`,{d:`M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12`,key:`svg-0`}],[`path`,{d:`M4 9l16 0`,key:`svg-1`}]]),ye=r(`outline`,`layout-rows`,`LayoutRows`,[[`path`,{d:`M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12`,key:`svg-0`}],[`path`,{d:`M4 12l16 0`,key:`svg-1`}]]),be=r(`outline`,`layout-sidebar`,`LayoutSidebar`,[[`path`,{d:`M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12`,key:`svg-0`}],[`path`,{d:`M9 4l0 16`,key:`svg-1`}]]),z=r(`outline`,`list`,`List`,[[`path`,{d:`M9 6l11 0`,key:`svg-0`}],[`path`,{d:`M9 12l11 0`,key:`svg-1`}],[`path`,{d:`M9 18l11 0`,key:`svg-2`}],[`path`,{d:`M5 6l0 .01`,key:`svg-3`}],[`path`,{d:`M5 12l0 .01`,key:`svg-4`}],[`path`,{d:`M5 18l0 .01`,key:`svg-5`}]]),B=r(`outline`,`menu-2`,`Menu2`,[[`path`,{d:`M4 6l16 0`,key:`svg-0`}],[`path`,{d:`M4 12l16 0`,key:`svg-1`}],[`path`,{d:`M4 18l16 0`,key:`svg-2`}]]),V=r(`outline`,`message`,`Message`,[[`path`,{d:`M8 9h8`,key:`svg-0`}],[`path`,{d:`M8 13h6`,key:`svg-1`}],[`path`,{d:`M18 4a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-5l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12`,key:`svg-2`}]]),xe=r(`outline`,`north-star`,`NorthStar`,[[`path`,{d:`M3 12h18`,key:`svg-0`}],[`path`,{d:`M12 21v-18`,key:`svg-1`}],[`path`,{d:`M7.5 7.5l9 9`,key:`svg-2`}],[`path`,{d:`M7.5 16.5l9 -9`,key:`svg-3`}]]),Se=r(`outline`,`note`,`Note`,[[`path`,{d:`M13 20l7 -7`,key:`svg-0`}],[`path`,{d:`M13 20v-6a1 1 0 0 1 1 -1h6v-7a2 2 0 0 0 -2 -2h-12a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7`,key:`svg-1`}]]),Ce=r(`outline`,`numbers`,`Numbers`,[[`path`,{d:`M8 10v-7l-2 2`,key:`svg-0`}],[`path`,{d:`M6 16a2 2 0 1 1 4 0c0 .591 -.601 1.46 -1 2l-3 3h4`,key:`svg-1`}],[`path`,{d:`M15 14a2 2 0 1 0 2 -2a2 2 0 1 0 -2 -2`,key:`svg-2`}],[`path`,{d:`M6.5 10h3`,key:`svg-3`}]]),we=r(`outline`,`pointer`,`Pointer`,[[`path`,{d:`M7.904 17.563a1.2 1.2 0 0 0 2.228 .308l2.09 -3.093l4.907 4.907a1.067 1.067 0 0 0 1.509 0l1.047 -1.047a1.067 1.067 0 0 0 0 -1.509l-4.907 -4.907l3.113 -2.09a1.2 1.2 0 0 0 -.309 -2.228l-13.582 -3.904l3.904 13.563`,key:`svg-0`}]]),Te=r(`outline`,`polygon`,`Polygon`,[[`path`,{d:`M10 5a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-0`}],[`path`,{d:`M17 8a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-1`}],[`path`,{d:`M3 11a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-2`}],[`path`,{d:`M13 19a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-3`}],[`path`,{d:`M6.5 9.5l3.5 -3`,key:`svg-4`}],[`path`,{d:`M14 5.5l3 1.5`,key:`svg-5`}],[`path`,{d:`M18.5 10l-2.5 7`,key:`svg-6`}],[`path`,{d:`M13.5 17.5l-7 -5`,key:`svg-7`}]]),Ee=r(`outline`,`select`,`Select`,[[`path`,{d:`M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14`,key:`svg-0`}],[`path`,{d:`M9 11l3 3l3 -3`,key:`svg-1`}]]),De=r(`outline`,`separator-horizontal`,`SeparatorHorizontal`,[[`path`,{d:`M4 12l16 0`,key:`svg-0`}],[`path`,{d:`M8 8l4 -4l4 4`,key:`svg-1`}],[`path`,{d:`M16 16l-4 4l-4 -4`,key:`svg-2`}]]),H=r(`outline`,`square`,`Square`,[[`path`,{d:`M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14`,key:`svg-0`}]]),Oe=r(`outline`,`star`,`Star`,[[`path`,{d:`M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873l-6.158 -3.245`,key:`svg-0`}]]),U=r(`outline`,`table`,`Table`,[[`path`,{d:`M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14`,key:`svg-0`}],[`path`,{d:`M3 10h18`,key:`svg-1`}],[`path`,{d:`M10 3v18`,key:`svg-2`}]]),ke=r(`outline`,`tag`,`Tag`,[[`path`,{d:`M6.5 7.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-0`}],[`path`,{d:`M3 6v5.172a2 2 0 0 0 .586 1.414l7.71 7.71a2.41 2.41 0 0 0 3.408 0l5.592 -5.592a2.41 2.41 0 0 0 0 -3.408l-7.71 -7.71a2 2 0 0 0 -1.414 -.586h-5.172a3 3 0 0 0 -3 3`,key:`svg-1`}]]),Ae=r(`outline`,`toggle-right`,`ToggleRight`,[[`path`,{d:`M14 12a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-0`}],[`path`,{d:`M2 12a6 6 0 0 1 6 -6h8a6 6 0 0 1 6 6a6 6 0 0 1 -6 6h-8a6 6 0 0 1 -6 -6`,key:`svg-1`}]]),je=r(`outline`,`typography`,`Typography`,[[`path`,{d:`M4 20l3 0`,key:`svg-0`}],[`path`,{d:`M14 20l7 0`,key:`svg-1`}],[`path`,{d:`M6.9 15l6.9 0`,key:`svg-2`}],[`path`,{d:`M10.2 6.3l5.8 13.7`,key:`svg-3`}],[`path`,{d:`M5 20l6 -16l2 0l7 16`,key:`svg-4`}]]),Me=r(`outline`,`user-circle`,`UserCircle`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`,key:`svg-0`}],[`path`,{d:`M9 10a3 3 0 1 0 6 0a3 3 0 1 0 -6 0`,key:`svg-1`}],[`path`,{d:`M6.168 18.849a4 4 0 0 1 3.832 -2.849h4a4 4 0 0 1 3.834 2.855`,key:`svg-2`}]]),Ne=r(`outline`,`vector-spline`,`VectorSpline`,[[`path`,{d:`M17 4a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1l0 -2`,key:`svg-0`}],[`path`,{d:`M3 18a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1l0 -2`,key:`svg-1`}],[`path`,{d:`M17 5c-6.627 0 -12 5.373 -12 12`,key:`svg-2`}]]),Pe=r(`outline`,`window-maximize`,`WindowMaximize`,[[`path`,{d:`M3 17a1 1 0 0 1 1 -1h3a1 1 0 0 1 1 1v3a1 1 0 0 1 -1 1h-3a1 1 0 0 1 -1 -1l0 -3`,key:`svg-0`}],[`path`,{d:`M4 12v-6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-6`,key:`svg-1`}],[`path`,{d:`M12 8h4v4`,key:`svg-2`}],[`path`,{d:`M16 8l-5 5`,key:`svg-3`}]]),W={select:{label:`Select`,chord:`v`,icon:we,tool:`select`,viewSafe:!0},lasso:{label:`Lasso select`,chord:`q`,icon:I,tool:`lasso`},hand:{label:`Hand`,help:`Hand (pan)`,chord:`h`,icon:N,tool:`hand`,viewSafe:!0},rectangle:{label:`Rectangle`,chord:`r`,icon:H,tool:`rectangle`},ellipse:{label:`Ellipse`,chord:`o`,icon:k},arrow:{label:`Arrow`,chord:`a`,icon:f,tool:`arrow`},line:{label:`Line`,chord:`l`,icon:o,tool:`line`},polyline:{label:`Multi-point line`,chord:`Shift+KeyC`,icon:Ne,tool:`polyline`},polygon:{label:`Polygon`,chord:`y`,icon:Te,tool:`polygon`},draw:{label:`Draw`,chord:`p`,icon:ne,tool:`draw`},highlight:{label:`Highlighter`,chord:`Shift+KeyP`,icon:F,tool:`highlight`},laser:{label:`Laser pointer`,chord:`k`,icon:xe,tool:`laser`,viewSafe:!0},text:{label:`Text`,chord:`t`,icon:je,tool:`text`},sticky:{label:`Sticky note`,chord:`n`,icon:Se,tool:`sticky`},figure:{label:`Frame`,chord:`f`,tool:`figure`},image:{label:`Image`,chord:`i`,icon:s,tool:`image`},icon:{label:`Icons`,chord:`s`,icon:te,tool:`icon`},imageLibrary:{label:`Image library`,chord:`Shift+KeyS`},chart:{label:`Chart`,chord:`g`,tool:`chart`},stepbadge:{label:`Step badge`,chord:`b`,icon:D},eraser:{label:`Eraser`,chord:`e`,icon:a,tool:`eraser`},comment:{label:`Comment`,chord:`c`,icon:V,viewSafe:!0}};function G(e){return le(W[e].chord)}var Fe=Object.fromEntries(Object.values(W).flatMap(e=>e.tool?[[e.chord,e.tool]]:[])),K=[{kind:`simple`,icon:ie},{kind:`phone`,icon:A},{kind:`tablet`,icon:j},{kind:`browser`,icon:me},{kind:`window`,icon:fe},{kind:`lanes`,icon:ye},{kind:`vlanes`,icon:R},{kind:`boundary`,icon:pe}],q=[{value:`table`,label:`Table`,icon:U},{value:`bar`,label:`Bar chart`,icon:v},{value:`line`,label:`Line chart`,icon:x},{value:`area`,label:`Area chart`,icon:_},{value:`scatter`,label:`Scatter chart`,icon:y},{value:`pie`,label:`Pie chart`,icon:S},{value:`donut`,label:`Donut chart`,icon:T},{value:`radar`,label:`Radar chart`,icon:d},{value:`quadrant`,label:`Quadrant chart`,icon:b}],J=[{kind:`button`,label:`Button`,icon:H},{kind:`input`,label:`Input`,icon:M},{kind:`search`,label:`Search field`,icon:c},{kind:`checkbox`,label:`Checkbox`,icon:C},{kind:`radio`,label:`Radio`,icon:E},{kind:`toggle`,label:`Toggle`,icon:Ae},{kind:`dropdown`,label:`Dropdown`,icon:Ee},{kind:`slider`,label:`Slider`,icon:h},{kind:`navbar`,label:`Navbar`,icon:ve},{kind:`tabs`,label:`Tabs`,icon:_e},{kind:`image`,label:`Image placeholder`,icon:s},{kind:`avatar`,label:`Avatar`,icon:Me},{kind:`heading`,label:`Heading`,icon:P},{kind:`paragraph`,label:`Paragraph`,icon:ue},{kind:`divider`,label:`Divider`,icon:De},{kind:`link`,label:`Link`,icon:ee},{kind:`textarea`,label:`Text area`,icon:u},{kind:`stepper`,label:`Number stepper`,icon:Ce},{kind:`badge`,label:`Badge`,icon:ke},{kind:`progress`,label:`Progress bar`,icon:ce},{kind:`breadcrumbs`,label:`Breadcrumbs`,icon:w},{kind:`pagination`,label:`Pagination`,icon:oe},{kind:`rating`,label:`Rating`,icon:Oe},{kind:`card`,label:`Card`,icon:ge},{kind:`list`,label:`List`,icon:z},{kind:`alert`,label:`Alert`,icon:i},{kind:`modal`,label:`Modal dialog`,icon:Pe},{kind:`menu`,label:`Menu`,icon:B},{kind:`tooltip`,label:`Tooltip`,icon:V},{kind:`accordion`,label:`Accordion`,icon:ae},{kind:`datepicker`,label:`Date picker`,icon:he},{kind:`sidebar`,label:`Sidebar`,icon:be},{kind:`scrollbar`,label:`Scrollbar`,icon:se},{kind:`segmented`,label:`Segmented control`,icon:R},{kind:`tabbar`,label:`Bottom tab bar`,icon:L},{kind:`statusbar`,label:`Status bar`,icon:de},{kind:`fab`,label:`Floating button`,icon:O}],Y={rectangle:`Rectangle`,ellipse:`Ellipse`,diamond:`Diamond`,triangle:`Triangle`,oval:`Oval`,parallelogram:`Parallelogram`,trapezoid:`Trapezoid`,cylinder:`Cylinder`,note:`Note`,hexagon:`Hexagon`,star:`Star`,checkbox:`Checkbox`,crossbox:`Crossed box`,heart:`Heart`,cloud:`Cloud`,"arrow-up":`Arrow up`,"arrow-down":`Arrow down`,"arrow-left":`Arrow left`,"arrow-right":`Arrow right`,plus:`Plus`,"speech-bubble":`Speech bubble`,bolt:`Lightning bolt`,queue:`Queue`,callout:`Callout`,document:`Document`,"predefined-process":`Predefined process`,"manual-input":`Manual input`,pentagon:`Pentagon`,chevron:`Chevron`,octagon:`Octagon`,cube:`Cube`,actor:`Actor`,"double-circle":`Double circle`,card:`Card`,delay:`Delay`,"fork-join":`Fork / join`,"multi-document":`Multi-document`,"multi-process":`Multi-process`,package:`Package`,component:`Component`,brace:`Brace`},X=t.filter(e=>e!==`rectangle`&&e!==`ellipse`&&e!==`actor`),Ie=e();function Le(e){return t=>(0,Ie.jsx)(re,{kind:e,size:t.size})}function Z(e,t,n,r){let i=W[e];return{id:e,label:i.label,group:t,shortcut:G(e),keywords:n,icon:i.icon??H,action:r??{kind:`tool`,tool:i.tool??`select`}}}var Re=[Z(`select`,`Basic`),Z(`hand`,`Basic`,`pan`),Z(`lasso`,`Basic`,`freehand select`),Z(`eraser`,`Basic`),Z(`laser`,`Basic`,`present`),Z(`comment`,`Basic`,`review note feedback pin annotate`,{kind:`tool`,tool:`comment`})],Q=[{id:`ask-ai`,label:`Ask AI`,group:`AI`,keywords:`assistant chat sparkles help`,icon:l,action:{kind:`ai`}},{id:`ai-diagram`,label:`Generate diagram with AI`,group:`AI`,keywords:`assistant architecture flowchart create`,icon:l,action:{kind:`ai`,prompt:`Draw a diagram of `,send:!1}},{id:`ai-deck`,label:`Generate slides with AI`,group:`AI`,keywords:`assistant deck presentation create`,icon:l,action:{kind:`ai`,prompt:`Create a short deck about `,send:!1}},{id:`ai-image`,label:`Generate image with AI`,group:`AI`,keywords:`assistant picture photo create`,icon:l,action:{kind:`ai`,prompt:`Generate an image of `,send:!1}}],ze=[Z(`rectangle`,`Shapes`,`box square`,{kind:`shape`,shape:`rectangle`}),Z(`ellipse`,`Shapes`,`circle oval`,{kind:`shape`,shape:`ellipse`}),...X.map(e=>({id:`shape-${e}`,label:Y[e],group:`Shapes`,keywords:`shape`,icon:Le(e),action:{kind:`shape`,shape:e}})),Z(`stepbadge`,`Shapes`,`number step`,{kind:`control`,control:`stepbadge`}),{id:`entity`,label:`Class / entity`,group:`Shapes`,keywords:`erd uml class table attributes fields`,icon:p,action:{kind:`control`,control:`entity`}},{id:`lifeline`,label:`Lifeline`,group:`Shapes`,keywords:`sequence uml participant`,icon:m,action:{kind:`control`,control:`lifeline`}},{id:`fragment`,label:`Fragment`,group:`Shapes`,keywords:`sequence uml combined opt alt loop par frame container`,icon:g,action:{kind:`control`,control:`fragment`}}],Be=[Z(`arrow`,`Connectors`,`connector`),Z(`line`,`Connectors`,`connector`),Z(`polyline`,`Connectors`,`connector elbow path`),Z(`polygon`,`Connectors`,`shape filled closed outline area band`)],Ve=[Z(`text`,`Text & media`),Z(`sticky`,`Text & media`,`note`),Z(`draw`,`Text & media`,`pen pencil freehand`),Z(`highlight`,`Text & media`,`marker highlight pen freehand`),Z(`image`,`Text & media`,`photo picture`),Z(`icon`,`Text & media`,`emoji sticker symbol`)],He=q.map(e=>({id:`data-${e.value}`,label:e.label,group:`Charts & data`,keywords:e.value===`table`?`grid data`:`chart graph data`,icon:e.icon,action:e.value===`table`?{kind:`table`}:{kind:`chart`,chart:e.value}})),Ue=K.map(e=>({id:`frame-${e.kind}`,label:n[e.kind],group:`Frames`,shortcut:e.kind===`simple`?G(`figure`):void 0,keywords:`frame container device mockup`,icon:e.icon,action:{kind:`frame`,frame:e.kind}})),We=J.map(e=>({id:`control-${e.kind}`,label:e.label,group:`UI controls`,keywords:`wireframe mockup ui widget`,icon:e.icon,action:{kind:`control`,control:e.kind}})),$=[...Re,...Q,...ze,...Be,...Ve,...He,...Ue,...We],Ge=new Map($.map(e=>[e.id,e]));function Ke(e,t){let n=$.filter(e=>e.group===`AI`?t.ai:e.id!==`comment`||t.comments),r=new Set(n.map(e=>e.id)),i=e.map(e=>Ge.get(e)).filter(e=>e!==void 0&&r.has(e.id)),a=new Set(i.map(e=>e.id));return{recent:i,rest:n.filter(e=>!a.has(e.id))}}function qe(e,t){if(e.kind===`ai`){t.askAi(e.prompt??``,e.send??!1);return}if(e.kind===`tool`){t.selectTool(e.tool);return}if(e.kind===`shape`){t.selectTool(`rectangle`),t.setShapeKind(e.shape);return}if(e.kind===`chart`){t.selectTool(`chart`),t.setChartKind(e.chart);return}if(e.kind===`table`){t.selectTool(`table`);return}if(e.kind===`frame`){t.selectTool(`figure`),t.setFrameKind(e.frame);return}t.insertControl(e.control)}export{_ as C,v as S,h as T,T as _,X as a,b,Fe as c,U as d,H as f,k as g,z as h,q as i,W as l,B as m,Ke as n,K as o,V as p,J as r,Y as s,qe as t,G as u,S as v,g as w,y as x,x as y};
|
|
1
|
+
import{t as e}from"./jsx-runtime-DKdBMi_L.js";import{Jt as t}from"./shapes-D5w8NTQQ.js";import{r as n}from"./frames-DRSLvE9E.js";import{t as r}from"./createReactComponent-C51FAx3B.js";import{t as i}from"./IconAlertTriangle-B33xznYN.js";import{t as a}from"./IconEraser-CYfXj27R.js";import{t as ee}from"./IconLink-VS5p9Ytk.js";import{t as te}from"./IconMinus-BcaDLts8.js";import{t as ne}from"./IconMoodSmile-CSZ5p_Hy.js";import{t as re}from"./IconPencil-D_pQsAyv.js";import{t as o}from"./IconPhoto-5zuCDtnR.js";import{t as ie}from"./IconSearch-CCpMt02s.js";import{t as s}from"./IconSparkles-CnCp3BCQ.js";import{C as c,b as l,c as u,f as d,g as f,h as p,p as ae,s as oe,v as se,x as ce,y as le}from"./PopoverPopup-1zO38CRl.js";import{t as ue}from"./keys-DrjiT9FL.js";var m=r(`outline`,`adjustments-horizontal`,`AdjustmentsHorizontal`,[[`path`,{d:`M12 6a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-0`}],[`path`,{d:`M4 6l8 0`,key:`svg-1`}],[`path`,{d:`M16 6l4 0`,key:`svg-2`}],[`path`,{d:`M6 12a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-3`}],[`path`,{d:`M4 12l2 0`,key:`svg-4`}],[`path`,{d:`M10 12l10 0`,key:`svg-5`}],[`path`,{d:`M15 18a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-6`}],[`path`,{d:`M4 18l11 0`,key:`svg-7`}],[`path`,{d:`M19 18l1 0`,key:`svg-8`}]]),de=r(`outline`,`align-justified`,`AlignJustified`,[[`path`,{d:`M4 6l16 0`,key:`svg-0`}],[`path`,{d:`M4 12l16 0`,key:`svg-1`}],[`path`,{d:`M4 18l12 0`,key:`svg-2`}]]),fe=r(`outline`,`antenna-bars-5`,`AntennaBars5`,[[`path`,{d:`M6 18l0 -3`,key:`svg-0`}],[`path`,{d:`M10 18l0 -6`,key:`svg-1`}],[`path`,{d:`M14 18l0 -9`,key:`svg-2`}],[`path`,{d:`M18 18l0 -12`,key:`svg-3`}]]),h=r(`outline`,`app-window`,`AppWindow`,[[`path`,{d:`M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10`,key:`svg-0`}],[`path`,{d:`M6 8h.01`,key:`svg-1`}],[`path`,{d:`M9 8h.01`,key:`svg-2`}]]),pe=r(`outline`,`box-margin`,`BoxMargin`,[[`path`,{d:`M8 8h8v8h-8l0 -8`,key:`svg-0`}],[`path`,{d:`M4 4v.01`,key:`svg-1`}],[`path`,{d:`M8 4v.01`,key:`svg-2`}],[`path`,{d:`M12 4v.01`,key:`svg-3`}],[`path`,{d:`M16 4v.01`,key:`svg-4`}],[`path`,{d:`M20 4v.01`,key:`svg-5`}],[`path`,{d:`M4 20v.01`,key:`svg-6`}],[`path`,{d:`M8 20v.01`,key:`svg-7`}],[`path`,{d:`M12 20v.01`,key:`svg-8`}],[`path`,{d:`M16 20v.01`,key:`svg-9`}],[`path`,{d:`M20 20v.01`,key:`svg-10`}],[`path`,{d:`M20 16v.01`,key:`svg-11`}],[`path`,{d:`M20 12v.01`,key:`svg-12`}],[`path`,{d:`M20 8v.01`,key:`svg-13`}],[`path`,{d:`M4 16v.01`,key:`svg-14`}],[`path`,{d:`M4 12v.01`,key:`svg-15`}],[`path`,{d:`M4 8v.01`,key:`svg-16`}]]),g=r(`outline`,`brackets-contain`,`BracketsContain`,[[`path`,{d:`M7 4h-4v16h4`,key:`svg-0`}],[`path`,{d:`M17 4h4v16h-4`,key:`svg-1`}],[`path`,{d:`M8 16h.01`,key:`svg-2`}],[`path`,{d:`M12 16h.01`,key:`svg-3`}],[`path`,{d:`M16 16h.01`,key:`svg-4`}]]),me=r(`outline`,`browser`,`Browser`,[[`path`,{d:`M4 8h16`,key:`svg-0`}],[`path`,{d:`M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12`,key:`svg-1`}],[`path`,{d:`M8 4v4`,key:`svg-2`}]]),he=r(`outline`,`calendar`,`Calendar`,[[`path`,{d:`M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12`,key:`svg-0`}],[`path`,{d:`M16 3v4`,key:`svg-1`}],[`path`,{d:`M8 3v4`,key:`svg-2`}],[`path`,{d:`M4 11h16`,key:`svg-3`}],[`path`,{d:`M11 15h1`,key:`svg-4`}],[`path`,{d:`M12 15v3`,key:`svg-5`}]]),ge=r(`outline`,`cards`,`Cards`,[[`path`,{d:`M3.604 7.197l7.138 -3.109a.96 .96 0 0 1 1.27 .527l4.924 11.902a1 1 0 0 1 -.514 1.304l-7.137 3.109a.96 .96 0 0 1 -1.271 -.527l-4.924 -11.903a1 1 0 0 1 .514 -1.304l0 .001`,key:`svg-0`}],[`path`,{d:`M15 4h1a1 1 0 0 1 1 1v3.5`,key:`svg-1`}],[`path`,{d:`M20 6c.264 .112 .52 .217 .768 .315a1 1 0 0 1 .53 1.311l-2.298 5.374`,key:`svg-2`}]]),_=r(`outline`,`chart-area-line`,`ChartAreaLine`,[[`path`,{d:`M4 19l4 -6l4 2l4 -5l4 4l0 5l-16 0`,key:`svg-0`}],[`path`,{d:`M4 12l3 -4l4 2l5 -6l4 4`,key:`svg-1`}]]),v=r(`outline`,`chart-bar`,`ChartBar`,[[`path`,{d:`M3 13a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -6`,key:`svg-0`}],[`path`,{d:`M15 9a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -10`,key:`svg-1`}],[`path`,{d:`M9 5a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -14`,key:`svg-2`}],[`path`,{d:`M4 20h14`,key:`svg-3`}]]),y=r(`outline`,`chart-dots`,`ChartDots`,[[`path`,{d:`M3 3v18h18`,key:`svg-0`}],[`path`,{d:`M7 9a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-1`}],[`path`,{d:`M17 7a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-2`}],[`path`,{d:`M12 15a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-3`}],[`path`,{d:`M10.16 10.62l2.34 2.88`,key:`svg-4`}],[`path`,{d:`M15.088 13.328l2.837 -4.586`,key:`svg-5`}]]),b=r(`outline`,`chart-grid-dots`,`ChartGridDots`,[[`path`,{d:`M16 6a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-0`}],[`path`,{d:`M4 12a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-1`}],[`path`,{d:`M4 18a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-2`}],[`path`,{d:`M16 18a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-3`}],[`path`,{d:`M8 18h8`,key:`svg-4`}],[`path`,{d:`M18 20v1`,key:`svg-5`}],[`path`,{d:`M18 3v1`,key:`svg-6`}],[`path`,{d:`M6 20v1`,key:`svg-7`}],[`path`,{d:`M6 10v-7`,key:`svg-8`}],[`path`,{d:`M12 3v18`,key:`svg-9`}],[`path`,{d:`M18 8v8`,key:`svg-10`}],[`path`,{d:`M8 12h13`,key:`svg-11`}],[`path`,{d:`M21 6h-1`,key:`svg-12`}],[`path`,{d:`M16 6h-13`,key:`svg-13`}],[`path`,{d:`M3 12h1`,key:`svg-14`}],[`path`,{d:`M20 18h1`,key:`svg-15`}],[`path`,{d:`M3 18h1`,key:`svg-16`}],[`path`,{d:`M6 14v2`,key:`svg-17`}]]),x=r(`outline`,`chart-line`,`ChartLine`,[[`path`,{d:`M4 19l16 0`,key:`svg-0`}],[`path`,{d:`M4 15l4 -6l4 2l4 -5l4 4`,key:`svg-1`}]]),S=r(`outline`,`chart-pie`,`ChartPie`,[[`path`,{d:`M10 3.2a9 9 0 1 0 10.8 10.8a1 1 0 0 0 -1 -1h-6.8a2 2 0 0 1 -2 -2v-7a.9 .9 0 0 0 -1 -.8`,key:`svg-0`}],[`path`,{d:`M15 3.5a9 9 0 0 1 5.5 5.5h-4.5a1 1 0 0 1 -1 -1v-4.5`,key:`svg-1`}]]),C=r(`outline`,`checkbox`,`Checkbox`,[[`path`,{d:`M9 11l3 3l8 -8`,key:`svg-0`}],[`path`,{d:`M20 12v6a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h9`,key:`svg-1`}]]),w=r(`outline`,`chevrons-right`,`ChevronsRight`,[[`path`,{d:`M7 7l5 5l-5 5`,key:`svg-0`}],[`path`,{d:`M13 7l5 5l-5 5`,key:`svg-1`}]]),T=r(`outline`,`circle-dashed`,`CircleDashed`,[[`path`,{d:`M8.56 3.69a9 9 0 0 0 -2.92 1.95`,key:`svg-0`}],[`path`,{d:`M3.69 8.56a9 9 0 0 0 -.69 3.44`,key:`svg-1`}],[`path`,{d:`M3.69 15.44a9 9 0 0 0 1.95 2.92`,key:`svg-2`}],[`path`,{d:`M8.56 20.31a9 9 0 0 0 3.44 .69`,key:`svg-3`}],[`path`,{d:`M15.44 20.31a9 9 0 0 0 2.92 -1.95`,key:`svg-4`}],[`path`,{d:`M20.31 15.44a9 9 0 0 0 .69 -3.44`,key:`svg-5`}],[`path`,{d:`M20.31 8.56a9 9 0 0 0 -1.95 -2.92`,key:`svg-6`}],[`path`,{d:`M15.44 3.69a9 9 0 0 0 -3.44 -.69`,key:`svg-7`}]]),E=r(`outline`,`circle-dot`,`CircleDot`,[[`path`,{d:`M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-0`}],[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`,key:`svg-1`}]]),D=r(`outline`,`circle-number-1`,`CircleNumber1`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`,key:`svg-0`}],[`path`,{d:`M10 10l2 -2v8`,key:`svg-1`}]]),O=r(`outline`,`circle-plus`,`CirclePlus`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0`,key:`svg-0`}],[`path`,{d:`M9 12h6`,key:`svg-1`}],[`path`,{d:`M12 9v6`,key:`svg-2`}]]),k=r(`outline`,`circle`,`Circle`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`,key:`svg-0`}]]),A=r(`outline`,`device-mobile`,`DeviceMobile`,[[`path`,{d:`M6 5a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2v-14`,key:`svg-0`}],[`path`,{d:`M11 4h2`,key:`svg-1`}],[`path`,{d:`M12 17v.01`,key:`svg-2`}]]),j=r(`outline`,`device-tablet`,`DeviceTablet`,[[`path`,{d:`M5 4a1 1 0 0 1 1 -1h12a1 1 0 0 1 1 1v16a1 1 0 0 1 -1 1h-12a1 1 0 0 1 -1 -1v-16`,key:`svg-0`}],[`path`,{d:`M11 17a1 1 0 1 0 2 0a1 1 0 0 0 -2 0`,key:`svg-1`}]]),M=r(`outline`,`forms`,`Forms`,[[`path`,{d:`M12 3a3 3 0 0 0 -3 3v12a3 3 0 0 0 3 3`,key:`svg-0`}],[`path`,{d:`M6 3a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3`,key:`svg-1`}],[`path`,{d:`M13 7h7a1 1 0 0 1 1 1v8a1 1 0 0 1 -1 1h-7`,key:`svg-2`}],[`path`,{d:`M5 7h-1a1 1 0 0 0 -1 1v8a1 1 0 0 0 1 1h1`,key:`svg-3`}],[`path`,{d:`M17 12h.01`,key:`svg-4`}],[`path`,{d:`M13 12h.01`,key:`svg-5`}]]),N=r(`outline`,`hand-stop`,`HandStop`,[[`path`,{d:`M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5`,key:`svg-0`}],[`path`,{d:`M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5`,key:`svg-1`}],[`path`,{d:`M14 5.5a1.5 1.5 0 0 1 3 0v6.5`,key:`svg-2`}],[`path`,{d:`M17 7.5a1.5 1.5 0 0 1 3 0v8.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47`,key:`svg-3`}]]),P=r(`outline`,`heading`,`Heading`,[[`path`,{d:`M7 12h10`,key:`svg-0`}],[`path`,{d:`M7 5v14`,key:`svg-1`}],[`path`,{d:`M17 5v14`,key:`svg-2`}],[`path`,{d:`M15 19h4`,key:`svg-3`}],[`path`,{d:`M15 5h4`,key:`svg-4`}],[`path`,{d:`M5 19h4`,key:`svg-5`}],[`path`,{d:`M5 5h4`,key:`svg-6`}]]),F=r(`outline`,`highlight`,`Highlight`,[[`path`,{d:`M3 19h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4`,key:`svg-0`}],[`path`,{d:`M12.5 5.5l4 4`,key:`svg-1`}],[`path`,{d:`M4.5 13.5l4 4`,key:`svg-2`}],[`path`,{d:`M21 15v4h-8l4 -4l4 0`,key:`svg-3`}]]),I=r(`outline`,`lasso`,`Lasso`,[[`path`,{d:`M4.028 13.252c-.657 -.972 -1.028 -2.078 -1.028 -3.252c0 -3.866 4.03 -7 9 -7s9 3.134 9 7s-4.03 7 -9 7c-1.913 0 -3.686 -.464 -5.144 -1.255`,key:`svg-0`}],[`path`,{d:`M3 15a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-1`}],[`path`,{d:`M5 17c0 1.42 .316 2.805 1 4`,key:`svg-2`}]]),L=r(`outline`,`layout-bottombar`,`LayoutBottombar`,[[`path`,{d:`M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12`,key:`svg-0`}],[`path`,{d:`M4 15l16 0`,key:`svg-1`}]]),R=r(`outline`,`layout-columns`,`LayoutColumns`,[[`path`,{d:`M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12`,key:`svg-0`}],[`path`,{d:`M12 4l0 16`,key:`svg-1`}]]),_e=r(`outline`,`layout-kanban`,`LayoutKanban`,[[`path`,{d:`M4 4l6 0`,key:`svg-0`}],[`path`,{d:`M14 4l6 0`,key:`svg-1`}],[`path`,{d:`M4 10a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2l0 -8`,key:`svg-2`}],[`path`,{d:`M14 10a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2l0 -2`,key:`svg-3`}]]),ve=r(`outline`,`layout-navbar`,`LayoutNavbar`,[[`path`,{d:`M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12`,key:`svg-0`}],[`path`,{d:`M4 9l16 0`,key:`svg-1`}]]),ye=r(`outline`,`layout-rows`,`LayoutRows`,[[`path`,{d:`M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12`,key:`svg-0`}],[`path`,{d:`M4 12l16 0`,key:`svg-1`}]]),be=r(`outline`,`layout-sidebar`,`LayoutSidebar`,[[`path`,{d:`M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12`,key:`svg-0`}],[`path`,{d:`M9 4l0 16`,key:`svg-1`}]]),z=r(`outline`,`list`,`List`,[[`path`,{d:`M9 6l11 0`,key:`svg-0`}],[`path`,{d:`M9 12l11 0`,key:`svg-1`}],[`path`,{d:`M9 18l11 0`,key:`svg-2`}],[`path`,{d:`M5 6l0 .01`,key:`svg-3`}],[`path`,{d:`M5 12l0 .01`,key:`svg-4`}],[`path`,{d:`M5 18l0 .01`,key:`svg-5`}]]),B=r(`outline`,`menu-2`,`Menu2`,[[`path`,{d:`M4 6l16 0`,key:`svg-0`}],[`path`,{d:`M4 12l16 0`,key:`svg-1`}],[`path`,{d:`M4 18l16 0`,key:`svg-2`}]]),V=r(`outline`,`message`,`Message`,[[`path`,{d:`M8 9h8`,key:`svg-0`}],[`path`,{d:`M8 13h6`,key:`svg-1`}],[`path`,{d:`M18 4a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-5l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12`,key:`svg-2`}]]),xe=r(`outline`,`north-star`,`NorthStar`,[[`path`,{d:`M3 12h18`,key:`svg-0`}],[`path`,{d:`M12 21v-18`,key:`svg-1`}],[`path`,{d:`M7.5 7.5l9 9`,key:`svg-2`}],[`path`,{d:`M7.5 16.5l9 -9`,key:`svg-3`}]]),Se=r(`outline`,`note`,`Note`,[[`path`,{d:`M13 20l7 -7`,key:`svg-0`}],[`path`,{d:`M13 20v-6a1 1 0 0 1 1 -1h6v-7a2 2 0 0 0 -2 -2h-12a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7`,key:`svg-1`}]]),Ce=r(`outline`,`numbers`,`Numbers`,[[`path`,{d:`M8 10v-7l-2 2`,key:`svg-0`}],[`path`,{d:`M6 16a2 2 0 1 1 4 0c0 .591 -.601 1.46 -1 2l-3 3h4`,key:`svg-1`}],[`path`,{d:`M15 14a2 2 0 1 0 2 -2a2 2 0 1 0 -2 -2`,key:`svg-2`}],[`path`,{d:`M6.5 10h3`,key:`svg-3`}]]),we=r(`outline`,`pointer`,`Pointer`,[[`path`,{d:`M7.904 17.563a1.2 1.2 0 0 0 2.228 .308l2.09 -3.093l4.907 4.907a1.067 1.067 0 0 0 1.509 0l1.047 -1.047a1.067 1.067 0 0 0 0 -1.509l-4.907 -4.907l3.113 -2.09a1.2 1.2 0 0 0 -.309 -2.228l-13.582 -3.904l3.904 13.563`,key:`svg-0`}]]),Te=r(`outline`,`polygon`,`Polygon`,[[`path`,{d:`M10 5a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-0`}],[`path`,{d:`M17 8a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-1`}],[`path`,{d:`M3 11a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-2`}],[`path`,{d:`M13 19a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-3`}],[`path`,{d:`M6.5 9.5l3.5 -3`,key:`svg-4`}],[`path`,{d:`M14 5.5l3 1.5`,key:`svg-5`}],[`path`,{d:`M18.5 10l-2.5 7`,key:`svg-6`}],[`path`,{d:`M13.5 17.5l-7 -5`,key:`svg-7`}]]),Ee=r(`outline`,`select`,`Select`,[[`path`,{d:`M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14`,key:`svg-0`}],[`path`,{d:`M9 11l3 3l3 -3`,key:`svg-1`}]]),De=r(`outline`,`separator-horizontal`,`SeparatorHorizontal`,[[`path`,{d:`M4 12l16 0`,key:`svg-0`}],[`path`,{d:`M8 8l4 -4l4 4`,key:`svg-1`}],[`path`,{d:`M16 16l-4 4l-4 -4`,key:`svg-2`}]]),H=r(`outline`,`square`,`Square`,[[`path`,{d:`M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14`,key:`svg-0`}]]),Oe=r(`outline`,`star`,`Star`,[[`path`,{d:`M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873l-6.158 -3.245`,key:`svg-0`}]]),U=r(`outline`,`table`,`Table`,[[`path`,{d:`M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14`,key:`svg-0`}],[`path`,{d:`M3 10h18`,key:`svg-1`}],[`path`,{d:`M10 3v18`,key:`svg-2`}]]),ke=r(`outline`,`tag`,`Tag`,[[`path`,{d:`M6.5 7.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-0`}],[`path`,{d:`M3 6v5.172a2 2 0 0 0 .586 1.414l7.71 7.71a2.41 2.41 0 0 0 3.408 0l5.592 -5.592a2.41 2.41 0 0 0 0 -3.408l-7.71 -7.71a2 2 0 0 0 -1.414 -.586h-5.172a3 3 0 0 0 -3 3`,key:`svg-1`}]]),Ae=r(`outline`,`toggle-right`,`ToggleRight`,[[`path`,{d:`M14 12a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-0`}],[`path`,{d:`M2 12a6 6 0 0 1 6 -6h8a6 6 0 0 1 6 6a6 6 0 0 1 -6 6h-8a6 6 0 0 1 -6 -6`,key:`svg-1`}]]),je=r(`outline`,`typography`,`Typography`,[[`path`,{d:`M4 20l3 0`,key:`svg-0`}],[`path`,{d:`M14 20l7 0`,key:`svg-1`}],[`path`,{d:`M6.9 15l6.9 0`,key:`svg-2`}],[`path`,{d:`M10.2 6.3l5.8 13.7`,key:`svg-3`}],[`path`,{d:`M5 20l6 -16l2 0l7 16`,key:`svg-4`}]]),Me=r(`outline`,`user-circle`,`UserCircle`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`,key:`svg-0`}],[`path`,{d:`M9 10a3 3 0 1 0 6 0a3 3 0 1 0 -6 0`,key:`svg-1`}],[`path`,{d:`M6.168 18.849a4 4 0 0 1 3.832 -2.849h4a4 4 0 0 1 3.834 2.855`,key:`svg-2`}]]),Ne=r(`outline`,`vector-spline`,`VectorSpline`,[[`path`,{d:`M17 4a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1l0 -2`,key:`svg-0`}],[`path`,{d:`M3 18a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1l0 -2`,key:`svg-1`}],[`path`,{d:`M17 5c-6.627 0 -12 5.373 -12 12`,key:`svg-2`}]]),Pe=r(`outline`,`window-maximize`,`WindowMaximize`,[[`path`,{d:`M3 17a1 1 0 0 1 1 -1h3a1 1 0 0 1 1 1v3a1 1 0 0 1 -1 1h-3a1 1 0 0 1 -1 -1l0 -3`,key:`svg-0`}],[`path`,{d:`M4 12v-6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-6`,key:`svg-1`}],[`path`,{d:`M12 8h4v4`,key:`svg-2`}],[`path`,{d:`M16 8l-5 5`,key:`svg-3`}]]),W={select:{label:`Select`,chord:`v`,icon:we,tool:`select`,viewSafe:!0},lasso:{label:`Lasso select`,chord:`q`,icon:I,tool:`lasso`},hand:{label:`Hand`,help:`Hand (pan)`,chord:`h`,icon:N,tool:`hand`,viewSafe:!0},rectangle:{label:`Rectangle`,chord:`r`,icon:H,tool:`rectangle`},ellipse:{label:`Ellipse`,chord:`o`,icon:k},arrow:{label:`Arrow`,chord:`a`,icon:u,tool:`arrow`},line:{label:`Line`,chord:`l`,icon:te,tool:`line`},polyline:{label:`Multi-point line`,chord:`Shift+KeyC`,icon:Ne,tool:`polyline`},polygon:{label:`Polygon`,chord:`y`,icon:Te,tool:`polygon`},draw:{label:`Draw`,chord:`p`,icon:re,tool:`draw`},highlight:{label:`Highlighter`,chord:`Shift+KeyP`,icon:F,tool:`highlight`},laser:{label:`Laser pointer`,chord:`k`,icon:xe,tool:`laser`,viewSafe:!0},text:{label:`Text`,chord:`t`,icon:je,tool:`text`},sticky:{label:`Sticky note`,chord:`n`,icon:Se,tool:`sticky`},figure:{label:`Frame`,chord:`f`,tool:`figure`},image:{label:`Image`,chord:`i`,icon:o,tool:`image`},icon:{label:`Icons`,chord:`s`,icon:ne,tool:`icon`},imageLibrary:{label:`Image library`,chord:`Shift+KeyS`},chart:{label:`Chart`,chord:`g`,tool:`chart`},stepbadge:{label:`Step badge`,chord:`b`,icon:D},eraser:{label:`Eraser`,chord:`e`,icon:a,tool:`eraser`},comment:{label:`Comment`,chord:`c`,icon:V,viewSafe:!0}};function G(e){return ue(W[e].chord)}var Fe=Object.fromEntries(Object.values(W).flatMap(e=>e.tool?[[e.chord,e.tool]]:[])),K=[{kind:`simple`,icon:ae},{kind:`phone`,icon:A},{kind:`tablet`,icon:j},{kind:`browser`,icon:me},{kind:`window`,icon:h},{kind:`lanes`,icon:ye},{kind:`vlanes`,icon:R},{kind:`boundary`,icon:pe}],q=[{value:`table`,label:`Table`,icon:U},{value:`bar`,label:`Bar chart`,icon:v},{value:`line`,label:`Line chart`,icon:x},{value:`area`,label:`Area chart`,icon:_},{value:`scatter`,label:`Scatter chart`,icon:y},{value:`pie`,label:`Pie chart`,icon:S},{value:`donut`,label:`Donut chart`,icon:T},{value:`radar`,label:`Radar chart`,icon:l},{value:`quadrant`,label:`Quadrant chart`,icon:b}],J=[{kind:`button`,label:`Button`,icon:H},{kind:`input`,label:`Input`,icon:M},{kind:`search`,label:`Search field`,icon:ie},{kind:`checkbox`,label:`Checkbox`,icon:C},{kind:`radio`,label:`Radio`,icon:E},{kind:`toggle`,label:`Toggle`,icon:Ae},{kind:`dropdown`,label:`Dropdown`,icon:Ee},{kind:`slider`,label:`Slider`,icon:m},{kind:`navbar`,label:`Navbar`,icon:ve},{kind:`tabs`,label:`Tabs`,icon:_e},{kind:`image`,label:`Image placeholder`,icon:o},{kind:`avatar`,label:`Avatar`,icon:Me},{kind:`heading`,label:`Heading`,icon:P},{kind:`paragraph`,label:`Paragraph`,icon:de},{kind:`divider`,label:`Divider`,icon:De},{kind:`link`,label:`Link`,icon:ee},{kind:`textarea`,label:`Text area`,icon:c},{kind:`stepper`,label:`Number stepper`,icon:Ce},{kind:`badge`,label:`Badge`,icon:ke},{kind:`progress`,label:`Progress bar`,icon:le},{kind:`breadcrumbs`,label:`Breadcrumbs`,icon:w},{kind:`pagination`,label:`Pagination`,icon:se},{kind:`rating`,label:`Rating`,icon:Oe},{kind:`card`,label:`Card`,icon:ge},{kind:`list`,label:`List`,icon:z},{kind:`alert`,label:`Alert`,icon:i},{kind:`modal`,label:`Modal dialog`,icon:Pe},{kind:`menu`,label:`Menu`,icon:B},{kind:`tooltip`,label:`Tooltip`,icon:V},{kind:`accordion`,label:`Accordion`,icon:oe},{kind:`datepicker`,label:`Date picker`,icon:he},{kind:`sidebar`,label:`Sidebar`,icon:be},{kind:`scrollbar`,label:`Scrollbar`,icon:ce},{kind:`segmented`,label:`Segmented control`,icon:R},{kind:`tabbar`,label:`Bottom tab bar`,icon:L},{kind:`statusbar`,label:`Status bar`,icon:fe},{kind:`fab`,label:`Floating button`,icon:O}],Y={rectangle:`Rectangle`,ellipse:`Ellipse`,diamond:`Diamond`,triangle:`Triangle`,oval:`Oval`,parallelogram:`Parallelogram`,trapezoid:`Trapezoid`,cylinder:`Cylinder`,note:`Note`,hexagon:`Hexagon`,star:`Star`,checkbox:`Checkbox`,crossbox:`Crossed box`,heart:`Heart`,cloud:`Cloud`,"arrow-up":`Arrow up`,"arrow-down":`Arrow down`,"arrow-left":`Arrow left`,"arrow-right":`Arrow right`,plus:`Plus`,"speech-bubble":`Speech bubble`,bolt:`Lightning bolt`,queue:`Queue`,callout:`Callout`,document:`Document`,"predefined-process":`Predefined process`,"manual-input":`Manual input`,pentagon:`Pentagon`,chevron:`Chevron`,octagon:`Octagon`,cube:`Cube`,actor:`Actor`,"double-circle":`Double circle`,card:`Card`,delay:`Delay`,"fork-join":`Fork / join`,"multi-document":`Multi-document`,"multi-process":`Multi-process`,package:`Package`,component:`Component`,brace:`Brace`},X=t.filter(e=>e!==`rectangle`&&e!==`ellipse`&&e!==`actor`),Ie=e();function Le(e){return t=>(0,Ie.jsx)(p,{kind:e,size:t.size})}function Z(e,t,n,r){let i=W[e];return{id:e,label:i.label,group:t,shortcut:G(e),keywords:n,icon:i.icon??H,action:r??{kind:`tool`,tool:i.tool??`select`}}}var Re=[Z(`select`,`Basic`),Z(`hand`,`Basic`,`pan`),Z(`lasso`,`Basic`,`freehand select`),Z(`eraser`,`Basic`),Z(`laser`,`Basic`,`present`),Z(`comment`,`Basic`,`review note feedback pin annotate`,{kind:`tool`,tool:`comment`})],Q=[{id:`ask-ai`,label:`Ask AI`,group:`AI`,keywords:`assistant chat sparkles help`,icon:s,action:{kind:`ai`}},{id:`ai-diagram`,label:`Generate diagram with AI`,group:`AI`,keywords:`assistant architecture flowchart create`,icon:s,action:{kind:`ai`,prompt:`Draw a diagram of `,send:!1}},{id:`ai-deck`,label:`Generate slides with AI`,group:`AI`,keywords:`assistant deck presentation create`,icon:s,action:{kind:`ai`,prompt:`Create a short deck about `,send:!1}},{id:`ai-image`,label:`Generate image with AI`,group:`AI`,keywords:`assistant picture photo create`,icon:s,action:{kind:`ai`,prompt:`Generate an image of `,send:!1}}],ze=[Z(`rectangle`,`Shapes`,`box square`,{kind:`shape`,shape:`rectangle`}),Z(`ellipse`,`Shapes`,`circle oval`,{kind:`shape`,shape:`ellipse`}),...X.map(e=>({id:`shape-${e}`,label:Y[e],group:`Shapes`,keywords:`shape`,icon:Le(e),action:{kind:`shape`,shape:e}})),Z(`stepbadge`,`Shapes`,`number step`,{kind:`control`,control:`stepbadge`}),{id:`entity`,label:`Class / entity`,group:`Shapes`,keywords:`erd uml class table attributes fields`,icon:d,action:{kind:`control`,control:`entity`}},{id:`lifeline`,label:`Lifeline`,group:`Shapes`,keywords:`sequence uml participant`,icon:f,action:{kind:`control`,control:`lifeline`}},{id:`fragment`,label:`Fragment`,group:`Shapes`,keywords:`sequence uml combined opt alt loop par frame container`,icon:g,action:{kind:`control`,control:`fragment`}}],Be=[Z(`arrow`,`Connectors`,`connector`),Z(`line`,`Connectors`,`connector`),Z(`polyline`,`Connectors`,`connector elbow path`),Z(`polygon`,`Connectors`,`shape filled closed outline area band`)],Ve=[Z(`text`,`Text & media`),Z(`sticky`,`Text & media`,`note`),Z(`draw`,`Text & media`,`pen pencil freehand`),Z(`highlight`,`Text & media`,`marker highlight pen freehand`),Z(`image`,`Text & media`,`photo picture`),Z(`icon`,`Text & media`,`emoji sticker symbol`),{id:`web-embed`,label:`Web embed…`,group:`Text & media`,keywords:`iframe video youtube vimeo loom figma codepen map spotify website link url`,icon:h,action:{kind:`web-embed`}}],He=q.map(e=>({id:`data-${e.value}`,label:e.label,group:`Charts & data`,keywords:e.value===`table`?`grid data`:`chart graph data`,icon:e.icon,action:e.value===`table`?{kind:`table`}:{kind:`chart`,chart:e.value}})),Ue=K.map(e=>({id:`frame-${e.kind}`,label:n[e.kind],group:`Frames`,shortcut:e.kind===`simple`?G(`figure`):void 0,keywords:`frame container device mockup`,icon:e.icon,action:{kind:`frame`,frame:e.kind}})),We=J.map(e=>({id:`control-${e.kind}`,label:e.label,group:`UI controls`,keywords:`wireframe mockup ui widget`,icon:e.icon,action:{kind:`control`,control:e.kind}})),$=[...Re,...Q,...ze,...Be,...Ve,...He,...Ue,...We],Ge=new Map($.map(e=>[e.id,e]));function Ke(e,t){let n=$.filter(e=>e.group===`AI`?t.ai:e.id!==`comment`||t.comments),r=new Set(n.map(e=>e.id)),i=e.map(e=>Ge.get(e)).filter(e=>e!==void 0&&r.has(e.id)),a=new Set(i.map(e=>e.id));return{recent:i,rest:n.filter(e=>!a.has(e.id))}}function qe(e,t){if(e.kind===`ai`){t.askAi(e.prompt??``,e.send??!1);return}if(e.kind===`web-embed`){t.openWebEmbed();return}if(e.kind===`tool`){t.selectTool(e.tool);return}if(e.kind===`shape`){t.selectTool(`rectangle`),t.setShapeKind(e.shape);return}if(e.kind===`chart`){t.selectTool(`chart`),t.setChartKind(e.chart);return}if(e.kind===`table`){t.selectTool(`table`);return}if(e.kind===`frame`){t.selectTool(`figure`),t.setFrameKind(e.frame);return}t.insertControl(e.control)}export{_ as C,m as E,v as S,h as T,T as _,X as a,b,Fe as c,U as d,H as f,k as g,z as h,q as i,W as l,B as m,Ke as n,K as o,V as p,J as r,Y as s,qe as t,G as u,S as v,g as w,y as x,x as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{t}from"./react-lCSYwAWP.js";import{t as n}from"./jsx-runtime-DKdBMi_L.js";import{i as r,r as i}from"./config-D8b1QyEk.js";import{o as a}from"./editor-DAJETlQW.js";import{n as o}from"./tool-catalog-CIjdZm_C.js";import{a as s,i as c,r as l,t as u}from"./PopoverPopup-1zO38CRl.js";import{n as d}from"./storage-CvDRYh5V.js";import{s as f}from"./chrome-C2RCq3SI.js";import{CommandList as p}from"./command-palette-Uat68wmJ.js";import{t as m}from"./use-recent-list-DuazDypH.js";var h=e(t(),1),g=n(),_=`[data-canvas-toolbar]`,v=8;function y(e){let{onPick:t,onClose:n}=e,{ai:y}=r(),b=i()!==null,x=a(e=>e.deviceMode===`phone`),[S,C]=(0,h.useState)();(0,h.useLayoutEffect)(()=>{if(x){C(void 0);return}let e=()=>{let e=document.querySelector(_);e&&C(e.getBoundingClientRect().height)};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[x]);let{recent:w,remember:T}=m(d.recentTools,v,{sanitize:e=>e.filter(e=>typeof e==`string`)}),E=(0,h.useRef)(T);E.current=T;let D=(0,h.useMemo)(()=>{let e=(e,r)=>({id:e.id,label:e.label,group:r,hint:e.shortcut,keywords:e.keywords,icon:e.icon,run:()=>{t(e.action),E.current(e.id),n()}}),r=o(w,{ai:y,comments:b});return[...r.recent.map(t=>e(t,`Recent`)),...r.rest.map(t=>e(t,t.group))]},[w,t,n,y,b]);return(0,g.jsx)(s,{open:!0,modal:!1,onOpenChange:e=>{e||n()},children:(0,g.jsx)(c,{children:(0,g.jsx)(l,{anchor:()=>document.querySelector(_),side:x?`top`:`right`,align:`start`,sideOffset:8,collisionPadding:8,children:(0,g.jsx)(u,{finalFocus:!1,initialFocus:!x&&void 0,children:(0,g.jsx)(`div`,{"data-overlay":!0,"data-testid":`tool-drawer`,className:`flex w-64 flex-col overflow-hidden rounded-xl ${x?`max-h-[55dvh]`:`max-h-[calc(100dvh-72px)]`} ${f}`,style:{maxHeight:S},children:(0,g.jsx)(p,{commands:D,onRun:e=>e.run(),placeholder:`Search all tools`,inputTestId:`tool-drawer-input`,itemTestId:e=>`tool-${e}`,emptyLabel:`No matching tools`,dense:!0,listClassName:`min-h-0 p-1`})})})})})})}export{y as ToolDrawer};
|