koboyo 0.2.0 → 0.4.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 +6 -1
- 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-CaEwHrsN.js +2 -0
- package/assets/editor/assets/IconLink-VS5p9Ytk.js +1 -0
- 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/{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-KacA9GM8.js +1 -0
- package/assets/editor/assets/PopoverPopup-B3Y0VRYc.js +1 -0
- package/assets/editor/assets/{asset-glyph-B3c--Mx2.js → asset-glyph-C1E6cGwM.js} +1 -1
- package/assets/editor/assets/billing-BSXr-z2r.js +1 -0
- package/assets/editor/assets/build-pips-BV-uwXlP.js +1 -0
- package/assets/editor/assets/build-visibility-DyML9SHt.js +1 -0
- package/assets/editor/assets/builders-DMHAOPEv.js +1 -0
- package/assets/editor/assets/{chart-Z4HQx-0h.js → chart-4iRduYdU.js} +4 -4
- package/assets/editor/assets/{chrome-layout-B8YmHznO.js → chrome-layout-BzPU9far.js} +1 -1
- package/assets/editor/assets/{code-panel-BfsykjSz.js → code-panel-koBUgEWp.js} +7 -7
- package/assets/editor/assets/command-palette-BR-_ChOL.js +1 -0
- package/assets/editor/assets/config-D8b1QyEk.js +1 -0
- package/assets/editor/assets/connector-labels-CrEgadsC.js +2 -0
- package/assets/editor/assets/copy-image-dialog-BzGP7Xw8.js +1 -0
- package/assets/editor/assets/{core-CBnmD9hT.js → core-CmsJyU_-.js} +1 -1
- package/assets/editor/assets/createReactComponent-C51FAx3B.js +1 -0
- package/assets/editor/assets/{diagram-fingerprint-CsqZK4xZ.js → diagram-fingerprint-WGQ5iVXx.js} +1 -1
- package/assets/editor/assets/dialog-DnXgEbpz.js +1 -0
- package/assets/editor/assets/{edit-BJ_kibk8.js → edit-C0sBxxsg.js} +1 -1
- package/assets/editor/assets/editor-BeufBV54.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-CVBdN1je.js} +1 -1
- package/assets/editor/assets/{export-ChP0k5F5.js → export-Bce6ra0N.js} +1 -1
- package/assets/editor/assets/export-K2VWg76n.js +6 -0
- package/assets/editor/assets/export-dialog-x2n2a4KX.js +1 -0
- package/assets/editor/assets/flow-layer-ewaL7g2y.js +1 -0
- package/assets/editor/assets/flow-panel-BzXNGGke.js +1 -0
- package/assets/editor/assets/flow-stage-Ba_CAggI.js +1 -0
- package/assets/editor/assets/flow-start-CpAvU-9P.js +1 -0
- package/assets/editor/assets/{flows-GGbkNqs8.js → flows-Cj7AFMIA.js} +2 -2
- package/assets/editor/assets/frames-Cp1QD3LR.js +1 -0
- package/assets/editor/assets/icon-picker-Cg39IKNJ.js +1 -0
- package/assets/editor/assets/image-library-JQu_tb8P.js +1 -0
- package/assets/editor/assets/index-CBPPqsiR.js +24 -0
- package/assets/editor/assets/{index-CC2h28V_.css → index-DBrN0u0i.css} +1 -1
- package/assets/editor/assets/jsx-runtime-DKdBMi_L.js +1 -0
- package/assets/editor/assets/layout-offthread-mRHRulkS.js +18 -0
- package/assets/editor/assets/{layout.worker-BIE1_z0S.js → layout.worker-CekYkaxO.js} +2 -2
- package/assets/editor/assets/menu-B9BAk63v.js +1 -0
- package/assets/editor/assets/panel-controls-DWVXiNUZ.js +1 -0
- package/assets/editor/assets/{panel-shell-CG2aq4Ia.js → panel-shell-BnMOHgWM.js} +1 -1
- package/assets/editor/assets/{plan-jQm1jDpt.js → plan-CkgM52Yh.js} +1 -1
- package/assets/editor/assets/presentation-DJUO0t7I.js +1 -0
- package/assets/editor/assets/presenter-keys-Bs3LnmOa.js +1 -0
- package/assets/editor/assets/{jsx-runtime-2Zwg-L3c.js → react-lCSYwAWP.js} +1 -1
- package/assets/editor/assets/reflow-DaYiVkwp.js +1 -0
- package/assets/editor/assets/registry-rEGZW7Ab.js +1 -0
- package/assets/editor/assets/renderer-environment-D3n3hbug.js +1 -0
- package/assets/editor/assets/ride-overlay-Hx90v4ZK.js +1 -0
- package/assets/editor/assets/selection-overlay-primitives-BRp854AD.js +1 -0
- package/assets/editor/assets/shape-meta-COE2ATNh.js +1 -0
- package/assets/editor/assets/sign-in-dialog-tmQEB2bx.js +1 -0
- package/assets/editor/assets/slide-notes-dialog-BQBXpep6.js +1 -0
- package/assets/editor/assets/slides-D686obFO.js +15 -0
- package/assets/editor/assets/slides-panel-BEJCevJi.js +26 -0
- package/assets/editor/assets/text-breaks-DM4W6y5f.js +7 -0
- package/assets/editor/assets/{theme-palette-D1nbDFBC.js → theme-palette-Dl_G_VIJ.js} +1 -1
- package/assets/editor/assets/tidy-browser-dF3BON7J.js +1 -0
- package/assets/editor/assets/tidy-scope-BGG3ZXvZ.js +1 -0
- package/assets/editor/assets/toast-Czv_DJ-4.js +1 -0
- package/assets/editor/assets/tool-catalog-DXPhX2S1.js +1 -0
- package/assets/editor/assets/tool-drawer-CWOX_njp.js +1 -0
- package/assets/editor/assets/tooltip-CyBz17g8.js +1 -0
- package/assets/editor/assets/tree-KSgPjntC.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-sC9UHj3_.js +2 -0
- package/assets/editor/assets/use-grid-keyboard-nav-DhQKecO1.js +0 -0
- package/assets/editor/assets/use-icon-node-BxqH7H27.js +1 -0
- package/assets/editor/assets/use-key-held-094C3Mn3.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/useValueChanged-SqLfIDi5.js +1 -0
- package/assets/editor/assets/web-controls-CLE9zr7i.js +1 -0
- package/assets/editor/assets/web-embed-dialog-XUNelFFM.js +1 -0
- package/assets/editor/assets/web-html-dialog-BcAyzH5D.js +1 -0
- package/assets/editor/assets/web-shape-C941TGTy.js +1 -0
- package/assets/editor/assets/widget-source-CHujvUeA.js +1 -0
- package/assets/editor/index.html +73 -69
- package/dist/koboyo.js +258 -214
- package/package.json +5 -5
- package/skills/koboyo/SKILL.md +22 -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/IconArrowBackUp-Brd2WpCh.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/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/IconNote-CSELvWzx.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/billing-C-BNGM3Z.js +0 -1
- package/assets/editor/assets/build-pips-CIaHaEPB.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/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/createReactComponent-9UsI5fmM.js +0 -1
- package/assets/editor/assets/dialog-B32krrce.js +0 -1
- package/assets/editor/assets/editor-B0tARd79.js +0 -1
- 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-BC35drcK.js +0 -1
- package/assets/editor/assets/flow-panel-D_K9wgZi.js +0 -1
- package/assets/editor/assets/flow-stage-fiF5Nggn.js +0 -1
- package/assets/editor/assets/flow-start-ccYJ2KB9.js +0 -1
- package/assets/editor/assets/frames-CRP8oPP8.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-DfNbwHl_.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/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-DV-zQJhV.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-catalog-ChSwaLIq.js +0 -1
- package/assets/editor/assets/tool-drawer-CG7-cnML.js +0 -1
- package/assets/editor/assets/tooltip-DgEojto1.js +0 -1
- package/assets/editor/assets/tree-rq4RTGgw.js +0 -1
- package/assets/editor/assets/upgrade-dialog-DpZeaLDB.js +0 -1
- package/assets/editor/assets/use-drag-reorder-C3h4ZMoZ.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-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
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{n as t,t as n}from"./jsx-runtime-2Zwg-L3c.js";import{t as r}from"./tooltip-DgEojto1.js";import{D as i,E as a,T as o,a as s,g as c,h as l,l as u,m as d,n as f,o as p,p as m,r as h}from"./menu-BPrc8Ara.js";import{i as g}from"./config-a_lz-57R.js";import{a as ee,o as _}from"./editor-B0tARd79.js";import{_ as v,g as y,t as b}from"./reflow-Cv75wPSh.js";import{W as x}from"./style-BENGW2ZV.js";import{A as S,C as te,Kn as C,Sn as ne,an as w,c as re,d as ie,f as T,fn as E,i as D,l as O,n as ae,o as oe,p as se,r as ce,s as le,t as ue,u as k,vn as de,x as fe}from"./slides-D9bnXqtf.js";import{n as pe}from"./renderer-environment-DmWXvuT4.js";import{A as me,C as he,D as ge,E as _e,O as ve,S as ye,T as be,_ as xe,b as Se,k as Ce,m as we,v as A,x as Te,y as Ee}from"./panel-controls-DYZ7QFT5.js";import{t as j}from"./createReactComponent-9UsI5fmM.js";import{n as M,r as De,t as Oe}from"./IconTrash-DbN_RxB7.js";import{t as ke}from"./IconArrowLeft-DFk3Krim.js";import{n as N,t as Ae}from"./IconPlayerStopFilled-BUbX6ZO5.js";import{t as je}from"./IconChevronLeft-BR0iwdRI.js";import{t as Me}from"./IconChevronRight-DBDnxPYT.js";import{t as Ne}from"./IconCode-hd05zxU4.js";import{i as Pe,n as Fe,r as Ie,t as Le}from"./use-drag-reorder-C3h4ZMoZ.js";import{a as Re,c as ze,i as Be,n as Ve,o as He,r as Ue,s as We,t as Ge}from"./build-visibility-E1mHeDCW.js";import{t as Ke}from"./IconPencil-C5Y-Y4dC.js";import{t as qe}from"./IconPlus-BbmieIBT.js";import{t as Je}from"./IconSparkles-WDcg8BA9.js";import{t as Ye}from"./IconX-AlbPkO_g.js";import{t as Xe}from"./IconPlayerPlayFilled-D4OODBX7.js";import{a as Ze,i as Qe,l as $e,r as et,t as tt}from"./PopoverPopup-BqGWd_uB.js";import{t as nt}from"./use-export-command-CPc7qug1.js";import{n as rt}from"./surface-Dke4SWpE.js";import{_ as it,a as at,c as ot,d as st,f as ct,h as lt,i as ut,l as dt,m as ft,n as pt,o as mt,p as ht,r as gt,t as _t,u as vt,v as yt,y as bt}from"./plan-jQm1jDpt.js";import{a as xt,c as St,d as Ct,f as wt,i as Tt,l as Et,n as Dt,o as Ot,r as kt,s as At,t as jt,u as Mt}from"./edit-BJ_kibk8.js";import{a as Nt,c as Pt}from"./chrome-C2RCq3SI.js";import{i as Ft,n as It,r as Lt,t as Rt}from"./DialogRoot-mHGRFW9m.js";import{n as zt,t as Bt}from"./DialogTitle-CFhr-gP9.js";import{n as Vt,t as Ht}from"./shape-meta-BpwsiB82.js";import{r as Ut}from"./chrome-layout-B8YmHznO.js";import{t as Wt}from"./panel-shell-CG2aq4Ia.js";import{A as P,C as F,D as I,E as L,O as R,S as z,T as Gt,_ as Kt,a as B,b as qt,c as Jt,d as Yt,f as V,g as Xt,h as Zt,i as Qt,k as H,l as U,m as W,n as $t,o as G,p as en,r as K,s as q,t as tn,u as nn,v as rn,w as J,x as Y,y as an}from"./builders-DbF28yId.js";import{n as on,t as sn}from"./export-DEFKKRRi.js";var 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 Ht(e[0]);let n=e.find(e=>Vt(e).trim().length>0);return n?Ht(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)(Ze,{open:u,onOpenChange:e=>{d(e),e||a(null)},children:[(0,Q.jsx)(xe,{"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)(qe,{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)(Qe,{children:(0,Q.jsx)(et,{side:`left`,align:`end`,sideOffset:8,collisionPadding:8,children:(0,Q.jsxs)(tt,{"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 ${rt.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)(be,{size:12,stroke:2})]}),t.map(e=>{let t=e.shapes[0],n=new Set(_t(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)(ye,{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)}),vt(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)})]},yt(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,te=_t(x).filter((e,t)=>t!==b.index).map(e=>e.kind),C=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)(Pe,{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:``}),C&&!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:C,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)(Me,{size:12,stroke:2}):(0,Q.jsx)(i,{size:12,stroke:2})}):C&&(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)(Ce,{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:te,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)(Ye,{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=>de(t,e)&&E(e,n)),x=vt(t),S=Re(i);return(0,Q.jsxs)(Ze,{open:ee,onOpenChange:_,children:[(0,Q.jsxs)(xe,{"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)($e,{})]}),(0,Q.jsx)(Qe,{children:(0,Q.jsx)(et,{side:`left`,align:`center`,sideOffset:8,collisionPadding:8,children:(0,Q.jsxs)(tt,{"data-overlay":!0,onPointerDown:e=>e.stopPropagation(),className:`w-64 p-2.5 ${rt.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 ${Pt(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 ${Pt(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:[Ue[e].label,(0,Q.jsxs)(`span`,{className:`text-[10px] tabular-nums text-[var(--chrome-fg-400)]`,children:[Math.round(Be(e,e===i?a:void 0,t)),`ms`]})]}),(0,Q.jsx)(`button`,{type:`button`,"data-testid":`animate-effect-play-${e}`,"aria-label":`Preview ${Ue[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)(Xe,{size:10})})]},e))})]}),We(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 ${Pt(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 ${Pt(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)(we,{label:`duration in milliseconds`,testId:`animate-duration`,value:Math.round(Be(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)(we,{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:M,down:De,left:ke,right:N},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=Ve(),m=(0,X.useMemo)(()=>ct(u,t),[u,t]),h=(0,X.useMemo)(()=>it(u,t),[u,t]),g=(0,X.useMemo)(()=>pt(m,h),[m,h]),v=(0,X.useMemo)(()=>ft(u,t,h),[u,t,h]),y=(0,X.useMemo)(()=>ut(u,t,h),[u,t,h]),b=(0,X.useMemo)(()=>bt(m),[m]),x=(0,X.useMemo)(()=>y.filter(e=>e.shapes.some(e=>d.has(e.id))),[y,d]),te=(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]),ne=(0,X.useMemo)(()=>gt(m),[m]);function re(e,t){T(Dt(m,[e],t===`enter`?lt(e.shapes[0]):void 0,t))}function ie(){T(k?Dt(m,v):jt(u,t))}function T(e){e.length!==0&&(l.beginTransaction(),c.getState().replaceMany(e),l.endTransaction())}(0,X.useEffect)(()=>{o(t)},[t.id]);let[E,D]=(0,X.useState)(null);(0,X.useLayoutEffect)(()=>{if(E===null||E<0)return;let e=m[E];e&&p.play(e,w(t))},[E,m,t,p]),(0,X.useEffect)(()=>{if(E===null)return;let e=E>=0?m[E]:null,t=m[E+1]?.afterPrevious?0:xn,n=(e?He(e):0)+t,r=setTimeout(()=>{D(e=>e===null||e+1>=m.length?null:e+1)},n);return()=>clearTimeout(r)},[E,m]);let[O,ae]=(0,X.useState)(null);function oe(e,t,n){D(null),p.cancel(),ae({items:e.map(e=>({shape:e.shape,index:e.index,start:0,row:e.row,animation:{...e.animation,step:0,effect:at(e.shape,t,e.animation.kind),duration:n,delay:void 0}})),armed:e[0]?.animation.kind===`exit`})}(0,X.useEffect)(()=>{if(!O||O.armed)return;let e=setTimeout(()=>ae(e=>e&&!e.armed?{...e,armed:!0}:e),Sn);return()=>clearTimeout(e)},[O]),(0,X.useLayoutEffect)(()=>{if(!O?.armed)return;let e=O.items.some(e=>e.animation.kind===`exit`);p.play({index:0,items:O.items,afterPrevious:!1},w(t)).then(()=>{e&&window.setTimeout(()=>p.cancel(),Sn)})},[O,t,p]),(0,X.useEffect)(()=>{D(null),ae(null)},[m]);function se(){if(ae(null),E!==null){p.cancel(),D(null);return}m.length!==0&&(o(t),p.cancel(),D(-1))}let ce=(0,X.useMemo)(()=>{let e=new Set;if(!f)return e;e.add(f);let t=S(u,f);return t?.groupId&&h.has(t.groupId)&&e.add(t.groupId),e},[f,u,h]);function le(e){return{onPointerEnter:()=>c.getState().setHoveredId(e),onPointerLeave:()=>c.getState().setHoveredId(null)}}(0,X.useEffect)(()=>()=>c.getState().setHoveredId(null),[c]);let ue=Le({count:g.length,gap:bn,disabled:s,onReorder:(e,t)=>T(Ot(g,e,t)),onPress:e=>{let t=g[e];t&&c.getState().setSelectedIds(new Set(t.items.map(e=>e.shape.id)))}}),k=g.length>0;return(0,Q.jsxs)(Q.Fragment,{children:[E!==null&&(0,Q.jsx)(Ge,{pending:ot(m,E)}),O&&!O.armed&&(0,Q.jsx)(Ge,{pending:new Set(O.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)(be,{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)(je,{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)(Me,{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)re(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:ue.listRef,"data-testid":`animate-list`,className:`flex flex-1 flex-col overflow-y-auto px-3 pb-3 pt-2`,children:[!k&&(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)(be,{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:k,onHover:e=>c.getState().setHoveredId(e),onAdd:re,onSweep:ie})]})}),k&&(0,Q.jsx)(`div`,{className:`flex flex-col gap-1`,children:g.map((e,t)=>{let n=ht(e);return(0,Q.jsx)(`div`,{ref:ue.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:ue.rowStyle(t),children:(0,Q.jsx)(pn,{unit:e,click:ne[C[t]],playing:E!==null&&C[t]===E,start:n,canJoin:t>0,pointed:ce.has(mt(e)),unseen:b.has(dt(e.items[0])),selected:e.items.every(e=>d.has(e.shape.id)),viewMode:s,handlers:{...ue.rowHandlers(t),...le(e.items[0].shape.id)},onSplit:e.groupId?()=>T(wt(g,e.groupId)):null,onMerge:te.has(t)?()=>T(xt(g,te.get(t))):null,onSetEffect:(t,n)=>T(Et(e.items,t,n)),onSetDelay:t=>T(At(e.items,t)),onSetKind:t=>T(Mt(e.items,t)),onSetDirection:t=>T(St(e.items,t)),onPreviewEffect:(t,n)=>oe(e.items,t,n),onSetStart:t=>T(Ct(g,mt(e),t)),onRemove:()=>T(kt(g,mt(e)))})},mt(e))})}),!s&&k&&(0,Q.jsx)(`div`,{className:`pt-3`,children:(0,Q.jsx)(dn,{units:y,idleCount:v.length,hasBuild:k,onHover:e=>c.getState().setHoveredId(e),onSweep:ie,onAdd:re})})]}),(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:!k,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:se,children:E===null?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Xe,{size:13}),`Play`]}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Ae,{size:13}),`Stop`]})}),!s&&k&&(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:()=>T(Tt(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 vt(t[0]).filter(e=>e===`emphasis`||t.some(t=>!_t(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)(Xe,{size:14}),`Start presentation`]}),(0,Q.jsxs)(u,{children:[(0,Q.jsx)(p,{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)(d,{children:(0,Q.jsx)(m,{side:`top`,align:`end`,sideOffset:6,className:`z-50 outline-none`,children:(0,Q.jsxs)(h,{"data-overlay":!0,className:`min-w-[185px] p-1`,children:[(0,Q.jsxs)(f,{"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)(f,{"data-testid":`slides-present-current`,onClick:()=>n(`current`),children:[(0,Q.jsx)(o,{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 ${rt.popup}`;function An(e){let{index:t,prefix:n,actions:r,skipped:i,Item:a,Separator:s}=e;function c(e,r,i,o,s=!1){return(0,Q.jsxs)(a,{className:s?`${On} text-red-600 data-[highlighted]:bg-red-50`:On,"data-testid":`${n}-${e}-${t}`,onClick:o,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)(o,{size:15,stroke:1.75}),`Present from here`,r.onPresent),l,r.onExportPng?c(`export-png`,(0,Q.jsx)(he,{size:15,stroke:1.75}),`Export slide as PNG`,r.onExportPng):null,r.onExportSvg?c(`export-svg`,(0,Q.jsx)(ge,{size:15,stroke:1.75}),`Export slide as SVG`,r.onExportSvg):null,r.onEmbed?c(`embed`,(0,Q.jsx)(Ne,{size:15,stroke:1.75}),`Embed slide…`,r.onEmbed):null,l,c(`duplicate`,(0,Q.jsx)(me,{size:15,stroke:1.75}),`Duplicate slide`,r.onDuplicate),c(`rename`,(0,Q.jsx)(Ke,{size:15,stroke:1.75}),`Rename slide`,r.onRename),c(`notes`,(0,Q.jsx)(ze,{size:15,stroke:1.75}),`Speaker notes`,r.onEditNotes),i?c(`skip`,(0,Q.jsx)(ve,{size:15,stroke:1.75}),`Unskip slide`,r.onToggleSkip):c(`skip`,(0,Q.jsx)(Ce,{size:15,stroke:1.75}),`Skip slide`,r.onToggleSkip),c(`add-above`,(0,Q.jsx)(Fe,{size:15,stroke:1.75}),`Add slide above`,r.onAddAbove),c(`add-below`,(0,Q.jsx)(Ie,{size:15,stroke:1.75}),`Add slide below`,r.onAddBelow),l,c(`delete`,(0,Q.jsx)(Oe,{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)(u,{children:[(0,Q.jsx)(p,{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)(a,{size:13,stroke:1.75})})}),(0,Q.jsx)(d,{children:(0,Q.jsx)(m,{side:`left`,align:`start`,sideOffset:6,className:`z-50 outline-none`,children:(0,Q.jsx)(l,{"data-overlay":!0,className:kn,children:(0,Q.jsx)(An,{index:t,prefix:`slide-menu`,actions:n,skipped:r,Item:c,Separator:s})})})})]})}function Mn(e){let{index:t,actions:n,skipped:r,children:i,disabled:a}=e,o=_(e=>e.coarsePointer);return a||o?(0,Q.jsx)(Q.Fragment,{children:i}):(0,Q.jsxs)(Ee,{children:[(0,Q.jsx)(A,{render:(0,Q.jsx)(`div`,{style:{display:`contents`}}),children:i}),(0,Q.jsx)(d,{children:(0,Q.jsx)(m,{className:`z-50 outline-none`,children:(0,Q.jsx)(l,{"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:c,Separator:s})})})})]})}function Nn(e){let t=I(e),n=18*t.unit,r=[{x:433,fill:U.red},{x:471,fill:U.yellow},{x:509,fill:U.blue}].map(({x:e,fill:r})=>{let i=t.point(e,158);return L({x:i.x,y:i.y,width:n,height:n},r,{kind:`ellipse`,fillStyle:`bold`})}),i=(e,n,r,i)=>L(t.rect(e,n,r,r),i,{kind:`star`,fillStyle:`bold`});return[...r,i(812,100,24,U.yellow),i(128,416,16,U.pink),P(t.rect(120,204,720,90),`Presentation title`,t.font(56)),P(t.rect(180,306,600,40),`A short subtitle that sets the scene`,t.font(24),{color:K}),R([t.point(432,436),t.point(528,436)],{color:V,strokeWidth:4}),P(t.rect(280,452,400,30),`Your name · Occasion · Date`,t.font(16),{color:K})]}function Pn(e){let t=I(e);return[L(t.rect(110,145,230,230),U.yellow,{kind:`ellipse`,label:`01`,fontSize:t.font(80)}),P(t.rect(420,190,460,64),`Section title`,t.font(48),{align:`left`}),R([t.point(422,268),t.point(640,268)],{color:q,strokeWidth:4}),P(t.rect(420,292,460,36),`A one-line summary of this chapter`,t.font(20),{align:`left`,color:K})]}function Fn(e){let t=I(e);return[P(t.rect(330,148,300,26),`THE BIG IDEA`,t.font(15),{letterSpacing:.3,color:K}),P(t.rect(120,192,720,156),`Say the one thing that matters.`,t.font(64)),R([t.point(390,374),t.point(570,374)],{color:V,strokeWidth:5})]}function In(e){let t=I(e),n=(e,n,r,i)=>L(t.rect(e,n,r,r),i,{kind:`star`,fillStyle:`bold`});return[Zt(t),n(150,106,26,U.yellow),n(806,92,18,U.blue),n(730,414,20,U.yellow),n(208,408,14,U.pink),R([t.point(434,198),t.point(526,198)],{color:V,strokeWidth:4}),Xt(t.rect(120,216,720,90),`A title that glows in the dark`,t.font(52)),Xt(t.rect(240,322,480,40),`A quieter cover for serious rooms`,t.font(20),{color:Qt})]}function Ln(e){let t=I(e);return[L(t.rect(0,0,424,Yt.height),U.gray,{dash:`none`,label:`Drop an image
|
|
2
|
-
or paste a screenshot`,fontSize:t.font(18),labelColor:K}),P(t.rect(486,168,300,26),`A DECK ABOUT`,t.font(14),{align:`left`,letterSpacing:.3,color:K}),P(t.rect(486,202,408,140),`The thing you came to hear`,t.font(44),{align:`left`,valign:`top`,lineHeight:1.25}),R([t.point(488,360),t.point(600,360)],{color:V,strokeWidth:4}),P(t.rect(486,384,408,30),`Your name · Occasion · Date`,t.font(16),{align:`left`,color:K})]}function Rn(e){let t=I(e),n=U.green,r=(e,n)=>L(t.rect(e,26,15,15),n,{kind:`ellipse`,fillStyle:`bold`,dash:`none`});return[Zt(t),r(30,U.red),r(56,U.yellow),r(82,U.green),Y(t.point(80,130),`~/talks $ present --topic`,t.font(20),n,{fontFamily:G}),Y(t.point(80,176),`"Your big idea"`,t.font(50),Jt,{fontFamily:G}),L(t.rect(80,268,20,42),Jt,{dash:`none`}),Y(t.point(80,356),`loading slides… ████████░░ 80%`,t.font(17),n,{fontFamily:G,opacity:.8}),Y(t.point(80,458),`# your name · today`,t.font(15),Jt,{fontFamily:G,opacity:.5})]}function zn(e){let t=I(e);return[...F(t,`Slide title`),P(t.rect(72,156,816,312),ne([`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:B})]}function Bn(e){let t=I(e),n=[{fill:U.blue,text:`Where we are today`},{fill:U.green,text:`What we learned`},{fill:U.yellow,text:`The plan from here`},{fill:U.pink,text:`Questions and next steps`}].flatMap(({fill:e,text:n},r)=>{let i=160+r*78;return z([L(t.rect(72,i,48,48),e,{kind:`ellipse`,label:String(r+1),fontSize:t.font(20)}),P(t.rect(140,i,720,48),n,t.font(24),{align:`left`})])});return[...F(t,`Agenda`),...n]}function Vn(e){let t=I(e);return[...F(t,`Slide title`),R([t.point(480,160),t.point(480,468)],{strokeWidth:1.5,dash:`dashed`,opacity:.35}),P(t.rect(72,156,380,40),`First column`,t.font(24),{align:`left`}),R([t.point(74,204),t.point(150,204)],{color:`#1971c2`,strokeWidth:3}),P(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:B}),P(t.rect(508,156,380,40),`Second column`,t.font(24),{align:`left`}),R([t.point(510,204),t.point(586,204)],{color:`#2f9e44`,strokeWidth:3}),P(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:B})]}function Hn(e){let t=I(e);return[P(t.rect(72,48,816,50),`Which way do we go?`,t.font(36)),...z([L(t.rect(72,132,384,344),U.green,{fillStyle:`outline`}),L(t.rect(404,152,32,32),U.green,{kind:`checkbox`,fillStyle:`bold`}),P(t.rect(96,156,336,40),`Option A`,t.font(28)),P(t.rect(108,212,312,240),ne([`Cheaper to build`,`Ships this quarter`,`Less flexible later`]),t.font(20),{align:`left`,valign:`top`,lineHeight:2,color:B})]),...z([L(t.rect(504,132,384,344),U.gray,{fillStyle:`outline`}),P(t.rect(528,156,336,40),`Option B`,t.font(28)),P(t.rect(540,212,312,240),ne([`More upfront work`,`Ships next quarter`,`Grows with us`]),t.font(20),{align:`left`,valign:`top`,lineHeight:2,color:B})]),L(t.rect(450,274,60,60),U.yellow,{kind:`ellipse`,fillStyle:`bold`,label:`vs`,fontSize:t.font(22)})]}function Un(e){let t=I(e);return[...F(t,`Before and after`),...z([L(t.rect(72,140,384,330),U.gray),P(t.rect(96,162,344,36),`Before`,t.font(26),{align:`left`}),P(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:B})]),...z([L(t.rect(504,140,384,330),U.green),P(t.rect(528,162,344,36),`After`,t.font(26),{align:`left`}),P(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:B})]),qt(t.point(462,305),t.point(498,305),5)]}function Wn(e){let t=I(e),n=[{x:72,fill:U.blue,value:`42%`,caption:`more signups`},{x:360,fill:U.teal,value:`3×`,caption:`faster builds`},{x:648,fill:U.purple,value:`12k`,caption:`happy users`}].flatMap(({x:e,fill:n,value:r,caption:i})=>z([L(t.rect(e,150,240,260),n,{fillStyle:`outline`,label:r,fontSize:t.font(56)}),P(t.rect(e+20,330,200,56),i,t.font(18),{color:K})]));return[...F(t,`The quarter in numbers`),...n]}function Gn(e){let t=I(e),n=[{color:q,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=z([Y(t.point(84,i+14),String(r+1),t.font(44),e),P(t.rect(160,i,720,84),n,t.font(26),{align:`left`})]);return r>0&&a.push(R([t.point(84,i-10),t.point(876,i-10)],{strokeWidth:1.5,opacity:.15})),a});return[...F(t,`Three takeaways`),...n]}function Kn(e){let t=I(e);return[...F(t,`Do and don't`),...z([L(t.rect(72,150,400,310),U.green,{fillStyle:`outline`}),L(t.rect(96,170,36,36),U.green,{kind:`checkbox`,fillStyle:`bold`}),P(t.rect(148,170,300,36),`Do`,t.font(28),{align:`left`}),P(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:B})]),...z([L(t.rect(488,150,400,310),U.red,{fillStyle:`outline`}),L(t.rect(512,170,36,36),U.red,{kind:`crossbox`,fillStyle:`bold`}),P(t.rect(564,170,300,36),`Don't`,t.font(28),{align:`left`}),P(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:B})])]}function qn(e){let t=I(e),n=[{icon:`zap`,fill:U.yellow,name:`Fast`,desc:`Blank canvas to first stroke in a second`},{icon:`users`,fill:U.blue,name:`Together`,desc:`Share a link, draw with the whole room`},{icon:`share-2`,fill:U.green,name:`Portable`,desc:`PNG, SVG and PDF out of the box`},{icon:`undo-2`,fill:U.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 z([L({x:c.x,y:c.y,width:s,height:s},n,{kind:`ellipse`,dash:`none`}),J({x:c.x+(s-l)/2,y:c.y+(s-l)/2},l,e,{color:$t}),P(t.rect(148,o+2,210,48),r,t.font(22),{align:`left`}),P(t.rect(366,o+2,522,48),i,t.font(17),{align:`left`,color:B})])});return[...F(t,`What you get`),...n]}function Jn(e){let t=I(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 z([J({x:c.x,y:c.y},s,e,{color:q}),P(t.rect(a+46,o-4,200,40),n,t.font(21),{align:`left`}),P(t.rect(a,o+48,252,76),r,t.font(15),{align:`left`,valign:`top`,lineHeight:1.6,color:B})])});return[...F(t,`Why teams switch`),...n]}function Yn(e){let t=I(e),n=(e,n,r,i)=>L(t.rect(e-126,n-126,252,252),r,{kind:`ellipse`,opacity:.6,color:i,strokeWidth:2}),r=[{cx:300,cy:262,fill:U.blue,ink:tn.blue,name:`What users beg for`},{cx:432,cy:262,fill:U.yellow,ink:tn.yellow,name:`What we're best at`},{cx:366,cy:376,fill:U.teal,ink:tn.teal,name:`What pays the bills`}],i=r.flatMap(({fill:e,name:n},r)=>z([L(t.rect(660,214+r*66,20,20),e,{kind:`ellipse`,fillStyle:`bold`}),P(t.rect(694,208+r*66,200,32),n,t.font(17),{align:`left`})]));return[...F(t,`Where the three meet`),...r.map(({cx:e,cy:t,fill:r,ink:i})=>n(e,t,r,i)),P(t.rect(288,292,156,40),`Do this`,t.font(20)),...i]}function Xn(e){let t=I(e),n=z([L(t.rect(72,140,392,300),U.blue,{fillStyle:`outline`}),P(t.rect(96,164,344,96),`38%`,t.font(72),{align:`left`}),P(t.rect(96,250,344,34),`faster to a first board`,t.font(18),{align:`left`,color:B}),Kt(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=z([L(t.rect(480,140,196,142),U.green,{fillStyle:`outline`}),P(t.rect(496,164,164,62),`4.8`,t.font(48),{align:`left`}),P(t.rect(496,228,164,32),`average rating`,t.font(15),{align:`left`,color:B})]),i=z([L(t.rect(692,140,196,142),U.orange,{fillStyle:`outline`}),J(t.point(710,162),30*t.unit,`trophy`,{color:q}),P(t.rect(708,204,164,32),`12 of 14 shipped`,t.font(17),{align:`left`}),P(t.rect(708,234,164,28),`two slipped to Q3`,t.font(14),{align:`left`,color:K})]),a=z([L(t.rect(480,298,408,142),U.gray,{fillStyle:`outline`}),P(t.rect(504,316,360,76),`“It replaced three tools and a weekly meeting.”`,t.font(20),{align:`left`,valign:`top`,lineHeight:1.5}),P(t.rect(504,396,360,28),`Kim, platform lead at Globex`,t.font(14),{align:`left`,color:K})]);return[...F(t,`The quarter at a glance`),...n,...r,...i,...a]}function Zn(e){let t=I(e),n=[{fill:U.green,tag:`Added`,text:`Dark mode, at last`},{fill:U.blue,tag:`Improved`,text:`Boards open twice as fast`},{fill:U.red,tag:`Fixed`,text:`That one bug, gone for good`}].flatMap(({fill:e,tag:n,text:r},i)=>{let a=168+i*88;return z([L(t.rect(72,a+4,140,48),e,{fillStyle:`outline`,label:n,fontSize:t.font(18)}),P(t.rect(236,a,652,56),r,t.font(22),{align:`left`})])});return[P(t.rect(72,48,460,56),`What's new`,t.font(36),{align:`left`}),R([t.point(74,118),t.point(250,118)],{color:V,strokeWidth:4}),P(t.rect(560,58,328,36),`v2.4.0 · this week`,t.font(15),{align:`right`,fontFamily:G,color:K}),...n,P(t.rect(72,442,816,40),`…plus twelve smaller fixes nobody will notice but us.`,t.font(24),{fontFamily:nn,color:K})]}function Qn(e){let t=I(e),n=[U.blue,U.green,U.yellow,U.pink,U.teal,U.purple].flatMap((e,n)=>{let r=240+n%3*240,i=n<3?152:312;return z([L(t.rect(r-42,i,84,84),e,{kind:`ellipse`,label:String.fromCharCode(65+n),fontSize:t.font(28)}),P(t.rect(r-110,i+92,220,24),`Name Surname`,t.font(18)),P(t.rect(r-110,i+118,220,20),`What they do`,t.font(14),{color:K})])});return[...F(t,`Meet the team`),...n]}function $n(e){let t=I(e),n=[{x:72,fill:U.blue,quote:`“It changed how our team plans every single week.”`,who:`Sam, Acme`},{x:368,fill:U.orange,quote:`“The first tool everyone actually kept using.”`,who:`Ada, Initech`},{x:664,fill:U.pink,quote:`“We shipped the rework two weeks early.”`,who:`Kim, Globex`}].flatMap(({x:e,fill:n,quote:r,who:i})=>z([L(t.rect(e,150,256,268),n,{fillStyle:`outline`}),P(t.rect(e+20,172,216,150),r,t.font(18),{align:`left`,valign:`top`,lineHeight:1.5}),W(t.rect(e+18,330,104,22),`rating`,{value:5,fill:V}),P(t.rect(e+20,362,216,32),i,t.font(14),{align:`left`,color:K})]));return[...F(t,`What people say`),...n]}function er(e){let t=I(e),n=e.width/Yt.width,r=e.height/Yt.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?U.blue:`#e9ecef`}:n===2?{background:`#e7f5ff`}:{}));return[...F(t,`Compare the options`),rn(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=I(e),n=[{x:176,fill:U.blue,when:`Q1`,what:`Discovery, 20 interviews`},{x:384,fill:U.green,when:`Q2`,what:`First beta, 10 teams`},{x:592,fill:U.yellow,when:`Q3`,what:`Public launch`},{x:792,fill:U.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 z([R([t.point(e,306+l*16),t.point(e,306+l*54)],{strokeWidth:1.5,opacity:.3}),L({x:c.x-s/2,y:c.y-s/2,width:s,height:s},n,{kind:`ellipse`,fillStyle:`bold`}),P(t.rect(e-92,o?184:364,184,34),r,t.font(22),{valign:o?`bottom`:`top`}),P(t.rect(e-92,o?218:398,184,56),i,t.font(15),{valign:o?`bottom`:`top`,lineHeight:1.5,color:B})])});return[...F(t,`Roadmap`),R([t.point(88,306),t.point(890,306)],{strokeWidth:3,endArrow:!0}),...n,L(t.rect(96,332,96,34),q,{kind:`oval`,fillStyle:`bold`,label:`today`,fontSize:t.font(14)}),R([t.point(144,284),t.point(144,332)],{color:q,strokeWidth:2})]}function nr(e){let t=I(e),n=[{x:72,title:`Now`},{x:350,title:`Next`},{x:628,title:`Later`}].flatMap(({x:e,title:n})=>z([L(t.rect(e,140,260,330),`transparent`,{dash:`dashed`,opacity:.6}),P(t.rect(e,152,260,30),n,t.font(22))])),r=116*t.unit,i=[{x:100,y:206,rot:-2,fill:U.yellow,text:`Ship the fix`},{x:168,y:332,rot:3,fill:U.blue,text:`Call the pilot users`},{x:396,y:224,rot:-4,fill:U.green,text:`Write the launch post`},{x:690,y:240,rot:5,fill:U.pink,text:`Explore pricing`}].map(({x:e,y:n,rot:i,fill:a,text:o})=>H(t.point(e,n),r,o,t.font(15),i,a));return[...F(t,`Now, next, later`),...n,...i]}function rr(e){let t=I(e),n=[{label:`Infrastructure`,fill:U.green,pct:.8},{label:`Mobile app`,fill:U.blue,pct:.6},{label:`Documentation`,fill:U.yellow,pct:.45},{label:`Onboarding`,fill:U.pink,pct:.2}].flatMap(({label:e,fill:n,pct:r},i)=>{let a=168+i*76;return z([P(t.rect(72,a,240,32),e,t.font(20),{align:`left`}),L(t.rect(330,a,470,32),U.gray,{dash:`none`}),L(t.rect(330,a,470*r,32),n,{fillStyle:`bold`,dash:`none`}),P(t.rect(814,a,76,32),`${Math.round(r*100)}%`,t.font(16),{align:`left`,fontFamily:G,color:B})])});return[...F(t,`Where things stand`),...n]}function ir(e){let t=I(e),n=[{x:72,y:140,fill:U.green,title:`Strengths`,hint:`What we do well`},{x:504,y:140,fill:U.red,title:`Weaknesses`,hint:`Where we struggle`},{x:72,y:314,fill:U.blue,title:`Opportunities`,hint:`What we could ride`},{x:504,y:314,fill:U.yellow,title:`Threats`,hint:`What could hurt us`}].flatMap(({x:e,y:n,fill:r,title:i,hint:a})=>z([L(t.rect(e,n,384,158),r),P(t.rect(e+20,n+12,344,28),i,t.font(20),{align:`left`}),P(t.rect(e+20,n+48,344,96),a,t.font(15),{align:`left`,valign:`top`,color:B})]));return[...F(t,`SWOT`),...n]}function ar(e){let t=I(e),n=[{fill:U.blue,label:`Collect`,note:`Anyone can file a request`},{fill:U.teal,label:`Sort`,note:`Weekly triage, no backlog`},{fill:U.green,label:`Decide`,note:`One owner says yes or no`},{fill:U.yellow,label:`Ship`,note:`Behind a flag, then wide`}].flatMap(({fill:e,label:n,note:r},i)=>{let a=72+i*188;return z([L(t.rect(a,218,234,104),e,{kind:`chevron`,label:n,fontSize:t.font(21)}),P(t.rect(a+44,340,174,76),r,t.font(15),{valign:`top`,lineHeight:1.5,color:K})])});return[...F(t,`How it works`),...n]}var $=.56;function or(e){let t=I(e),n=[{fill:U.blue,value:`12,400`,name:`Visited the site`,note:`any page, any source`},{fill:U.teal,value:`1,860`,name:`Started a trial`,note:`15% of visitors`},{fill:U.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(...z([L(t.rect(340-r/2,l,r,96),e,{kind:`trapezoid`,rotation:180}),P(t.rect(340-d/2,u-24,d,48),n,t.font(30-c*4))]),...z([P(t.rect(646,u-30,250,30),o,t.font(20),{align:`left`}),P(t.rect(646,u+2,250,26),s,t.font(15),{align:`left`,color:K})])),c>0&&a.push(P(t.rect(40,u-30,134,30),c===1?`−10,540`:`−1,450`,t.font(17),{align:`right`,color:K}),qt(t.point(340-r/2+18,u-6),t.point(150,u+12),1.8,{color:K})),r*=$}),[...F(t,`Where people drop off`),...i,...a,R([t.point(622,156),t.point(622,428)],{strokeWidth:1.5,dash:`dashed`,opacity:.3}),L(t.rect(258,460,164,38),U.gray,{kind:`oval`,fillStyle:`outline`,label:`3.3% end to end`,fontSize:t.font(16)})]}function sr(e){let t=I(e),n=[{fill:U.purple,label:`Why`,note:`Teams lose their mornings to status meetings`},{fill:U.blue,label:`How`,note:`One board replaces the four tools they juggle`},{fill:U.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(...z([L(t.rect(330-r/2,s,r,96),e,{kind:`trapezoid`}),P(t.rect(330-r*$*.5,c-22,r*$,44),n,t.font(24))]),...z([L(t.rect(660,c-26,12,12),e,{kind:`ellipse`,fillStyle:`bold`}),P(t.rect(684,c-34,212,68),a,t.font(16),{align:`left`,valign:`top`,lineHeight:1.5,color:B})])),r/=$});let a=180*$;return[...F(t,`How the work ladders up`),L(t.rect(330-a/2,118,a,58),U.yellow,{kind:`triangle`}),...i]}function cr(e){let t=I(e),n={x:340,y:318},r=[{label:`Talk to users`,fill:U.blue},{label:`Pick one bet`,fill:U.teal},{label:`Ship it small`,fill:U.green},{label:`Measure it`,fill:U.yellow}],i=r.map(({label:e,fill:i},a)=>{let o=-Math.PI/2+a*2*Math.PI/r.length;return L(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 Gt({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[...F(t,`How we work`),...a,...i,J({x:t.point(n.x,n.y).x-o/2,y:t.point(n.x,n.y).y-o/2},o,`refresh-cw`,{color:K}),P(t.rect(646,240,250,34),`Every two weeks`,t.font(21),{align:`left`}),P(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:B})]}function lr(e){let t=I(e),n=an(t.rect(72,148,816,300),`lanes`,{lanes:[`Customer`,`Support`,`Engineering`]}),r=e=>148+e*100+50,i=(e,n,i,a)=>L(t.rect(e,r(n)-27,148,54),a,{label:i,fontSize:t.font(16)}),a=i(126,0,`Reports a bug`,U.blue),o=i(324,1,`Triages it`,U.teal),s=i(522,2,`Ships a fix`,U.green),c=i(720,0,`Confirms`,U.blue),l=(e,t)=>Gt({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[...F(t,`Who picks it up`),n,a,o,s,c,l(a,o),l(o,s),l(s,c)]}function ur(e){let t=I(e),n=e=>250+e*106,r=Array.from({length:6},(e,r)=>[R([t.point(n(r),150),t.point(n(r),440)],{strokeWidth:1.5,opacity:.12}),P(t.rect(n(r),118,106,26),`W${r+1}`,t.font(14),{color:K})]).flat(),i=[{name:`Research`,from:0,span:2,fill:U.purple},{name:`Design`,from:1,span:2,fill:U.blue},{name:`Build`,from:2,span:3,fill:U.teal},{name:`Beta`,from:4,span:1.5,fill:U.green},{name:`Launch prep`,from:5,span:.7,fill:U.yellow}].flatMap(({name:e,from:r,span:i,fill:a},o)=>{let s=170+o*52;return z([P(t.rect(72,s,164,36),e,t.font(17),{align:`left`}),L(t.rect(n(r)+6,s+4,106*i-12,28),a,{kind:`oval`,fillStyle:`bold`,dash:`none`})])});return[...F(t,`Six weeks to launch`),...r,...i,R([t.point(n(2),138),t.point(n(2),448)],{color:q,strokeWidth:2,dash:`dashed`}),P(t.rect(n(2)-60,452,120,26),`today`,t.font(14),{color:q}),L(t.rect(852,378,36,36),U.red,{kind:`diamond`,fillStyle:`bold`}),P(t.rect(714,418,168,26),`Launch`,t.font(15),{align:`right`,color:B})]}function dr(e){let t=I(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})=>z([P(t.rect(72,e,540,44),n,t.font(19),{align:`left`}),L(t.rect(640,e+9,160,24),U.gray,{dash:`none`}),L(t.rect(640,e+9,160*r,24),U.green,{fillStyle:`bold`,dash:`none`}),P(t.rect(812,e+2,76,38),i,t.font(18),{align:`left`,color:B})]));return[...F(t,`This quarter's OKRs`),L(t.rect(72,144,816,62),U.blue,{label:`Objective — Make onboarding effortless`,fontSize:t.font(22)}),...n]}function fr(e){let t=I(e);return[...F(t,`The problem we solve`),...z([L(t.rect(72,150,384,320),U.red,{fillStyle:`outline`}),P(t.rect(96,174,336,40),`The problem`,t.font(26),{align:`left`}),P(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:B})]),...z([L(t.rect(504,150,384,320),U.green,{fillStyle:`outline`}),P(t.rect(528,174,336,40),`Our solution`,t.font(26),{align:`left`}),P(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:B})]),qt(t.point(462,310),t.point(498,310),5)]}function pr(e){let t=I(e),n=[{d:340,fill:U.blue},{d:230,fill:U.teal},{d:120,fill:U.green}].map(({d:e,fill:n})=>L(t.rect(330-e/2,480-e,e,e),n,{kind:`ellipse`})),r=[{y:190,fill:U.blue,value:`TAM — $4.2B`,caption:`everyone with the problem`},{y:268,fill:U.teal,value:`SAM — $600M`,caption:`who we can reach`},{y:346,fill:U.green,value:`SOM — $40M`,caption:`a realistic first bite`}].flatMap(({y:e,fill:n,value:r,caption:i})=>z([L(t.rect(560,e+4,22,22),n,{kind:`ellipse`,fillStyle:`bold`}),P(t.rect(596,e,292,30),r,t.font(22),{align:`left`}),P(t.rect(596,e+34,292,26),i,t.font(15),{align:`left`,color:K})]));return[...F(t,`How big is this?`),...n,...r]}function mr(e){let t=I(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=[L(t.rect(e,156,248,314),a?U.blue:U.gray,{fillStyle:`outline`}),P(t.rect(e+24,180,200,34),n,t.font(22),{align:`left`}),P(t.rect(e+24,218,200,60),r,t.font(44),{align:`left`}),P(t.rect(e+26,240,200,60),`per person / month`,t.font(13),{align:`right`,valign:`bottom`,color:K}),P(t.rect(e+24,306,200,150),i,t.font(17),{align:`left`,valign:`top`,lineHeight:2,color:B})];return a&&o.push(en(t.rect(e+50,138,148,30),U.yellow,`MOST POPULAR`,t.font(12),{labelColor:$t})),z(o)});return[...F(t,`Pick a plan`),...n]}function hr(e){let t=I(e);return[...F(t,`Where the line is going`),Kt(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 z([P(t.rect(648,i,240,56),e,t.font(40),{align:`left`}),P(t.rect(648,i+54,240,30),n,t.font(15),{align:`left`,color:K})])})]}function gr(e){let t=I(e);return[...F(t,`How we sit in the market`),Kt(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=I(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 z([J({x:o.x,y:o.y},a,e,{color:`#2f9e44`}),P(t.rect(108,i,380,34),n,t.font(17),{align:`left`,color:B})])});return[...F(t,`The ask`),P(t.rect(72,158,420,96),`$2.5M`,t.font(76),{align:`left`}),P(t.rect(72,250,420,34),`seed round · 18 months of runway`,t.font(19),{align:`left`,color:K}),...n,Kt(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=I(e),n=[{x:136,y:146,fill:U.green,title:`Quick wins`,align:`left`},{x:491,y:146,fill:U.blue,title:`Big bets`,align:`right`},{x:136,y:299,fill:U.gray,title:`Fill-ins`,align:`left`},{x:491,y:299,fill:U.red,title:`Money pits`,align:`right`}].flatMap(({x:e,y:n,fill:r,title:i,align:a})=>[L({...t.rect(e,n,710/2,306/2)},r,{dash:`none`,opacity:.35}),P(t.rect(e+(a===`left`?16:-16),n+10,710/2-32,26),i,t.font(15),{align:a,color:B})]),r=96*t.unit,i=[{x:190,y:176,rot:-3,fill:U.green,text:`Ship this week`},{x:604,y:190,rot:4,fill:U.blue,text:`The big rewrite`},{x:236,y:322,rot:2,fill:U.yellow,text:`Nice to have`},{x:640,y:336,rot:-5,fill:U.red,text:`Kill it`}].map(({x:e,y:n,rot:i,fill:a,text:o})=>H(t.point(e,n),r,o,t.font(14),i,a));return[...F(t,`Where to spend the effort`),...n,R([t.point(120,299),t.point(868,299)],{strokeWidth:2,endArrow:!0,opacity:.5}),R([t.point(491,468),t.point(491,124)],{strokeWidth:2,endArrow:!0,opacity:.5}),...i,P(t.rect(692,466,160,26),`more effort`,t.font(14),{align:`right`,color:K}),P(t.rect(503,112,160,26),`more impact`,t.font(14),{align:`left`,color:K})]}function yr(e){let t=I(e),n=[{x:72,fill:U.green,icon:`circle-check`,title:`In scope`,body:`Shared inbox
|
|
21
|
-
Weekly digest
|
|
22
|
-
Slack alerts`},{x:350,fill:U.red,icon:`circle-slash`,title:`Not this time`,body:`Mobile app
|
|
23
|
-
Custom roles
|
|
24
|
-
SSO`},{x:628,fill:U.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})=>z([L(t.rect(e,232,260,186),n,{fillStyle:`outline`}),L(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`}}),P(t.rect(e+18,292,224,112),a,t.font(15),{align:`left`,valign:`top`,lineHeight:1.9,color:B})])),r=[`Owner · Ada`,`Ships · 14 August`,`Check-in · Fridays, 10:00`].map((e,n)=>en(t.rect(72+n*250,448,232,38),U.gray,e,t.font(15),{fillStyle:`pastel`}));return[...F(t,`Project kickoff`),L(t.rect(72,140,816,68),U.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=I(e),n=e=>186+e*140,r=[{label:`Hears of us`,doing:`A teammate shares a board`,mood:`smile`,fill:U.green},{label:`Signs up`,doing:`Three fields, no card`,mood:`smile`,fill:U.green},{label:`First board`,doing:`Stares at a blank canvas`,mood:`meh`,fill:U.yellow},{label:`Invites the team`,doing:`Nobody joins for a week`,mood:`frown`,fill:U.red},{label:`Renews`,doing:`Finance asks what it's for`,mood:`meh`,fill:U.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[en(t.rect(s,148,132,36),U.blue,e,t.font(14),{fillStyle:`outline`}),P(t.rect(s,206,132,76),r,t.font(14),{valign:`top`,lineHeight:1.5,color:B}),J({x:l.x-c/2,y:l.y-c/2},c,i,{color:a===U.green?`#2f9e44`:a===U.red?`#e03131`:`#f08c00`})]}),i=[`Doing`,`Feeling`,`Fix it here`].map((e,n)=>P(t.rect(56,[212,306,384][n],110,30),e,t.font(15),{align:`right`,color:K})),a=104*t.unit;return[...F(t,`The trip they take`),R([t.point(176,292),t.point(888,292)],{strokeWidth:1.5,opacity:.15}),R([t.point(176,366),t.point(888,366)],{strokeWidth:1.5,opacity:.15}),...r,...i,H(t.point(n(2)+14,384),a,`Start from a template`,t.font(13),-3),H(t.point(n(3)+14,384),a,`Invite from the empty board`,t.font(13),4)]}function xr(e){let t=I(e);return[...F(t,`What the data says`),Kt(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}),P(t.rect(648,170,240,30),`The takeaway`,t.font(22),{align:`left`}),P(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:B})]}function Sr(e){let t=I(e),n=L(t.rect(96,220,180,90),U.blue,{label:`Client`,fontSize:t.font(20),titleIcon:{source:`lucide`,name:`monitor`,placement:`inside`}}),r=L(t.rect(390,220,180,90),U.teal,{label:`API`,fontSize:t.font(20),titleIcon:{source:`lucide`,name:`server`,placement:`inside`}}),i=L(t.rect(684,205,180,120),U.purple,{kind:`cylinder`,label:`Database`,fontSize:t.font(20)});return[...F(t,`How it fits together`),n,r,i,Gt(t.point(278,265),t.point(388,265),n,r,{label:`REST`,fontSize:t.font(14),strokeWidth:2.4}),Gt(t.point(572,265),t.point(682,265),r,i,{label:`SQL`,fontSize:t.font(14),strokeWidth:2.4}),P(t.rect(72,420,816,30),`Swap the boxes for your pieces. The arrows stay attached.`,t.font(16),{color:K})]}function Cr(e){let t=I(e);return[L(t.rect(-65,277,330,56),U.yellow,{fillStyle:`bold`,label:`THE ONE NUMBER`,fontSize:t.font(17),letterSpacing:.15,rotation:-90}),P(t.rect(180,150,600,200),`99.9%`,t.font(120)),P(t.rect(180,366,600,40),`what it measures, and why it matters`,t.font(20),{color:K}),R([t.point(420,352),t.point(540,352)],{color:q,strokeWidth:4})]}function wr(e){let t=I(e);return[L(t.rect(72,84,400,372),U.gray,{dash:`none`,label:`Drop an image
|
|
26
|
-
or sketch here`,fontSize:t.font(18),labelColor:K}),P(t.rect(528,132,360,80),`Show, then tell`,t.font(36),{align:`left`}),R([t.point(530,224),t.point(660,224)],{color:V,strokeWidth:4}),P(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:B})]}function Tr(e){let t=I(e),n=58*t.unit,r=46*t.unit,i=t.point(136,412);return[J(t.point(136,148),n,`quote`,{color:q,strokeWidth:2.4}),P(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}),L({x:i.x,y:i.y,width:r,height:r},U.yellow,{kind:`ellipse`,label:`A`,fontSize:t.font(18)}),P(t.rect(196,410,400,28),`Ada Lovelace`,t.font(19),{align:`left`}),P(t.rect(196,436,400,26),`Head of platform, Initech`,t.font(15),{align:`left`,color:K})]}function Er(e){let t=I(e);return[an(t.rect(112,64,224,424),`phone`),W(t.rect(128,92,192,22),`statusbar`,{label:`9:41`,fontSize:t.font(11)}),W(t.rect(128,122,192,30),`heading`,{label:`Boards`,fontSize:t.font(18)}),W(t.rect(128,160,192,34),`search`,{label:`Search boards…`,fontSize:t.font(12)}),W(t.rect(128,206,192,116),`list`,{label:`Sprint board | Roadmap wall | Retro — Tuesday`,fontSize:t.font(12)}),W(t.rect(128,336,192,42),`button`,{label:`New board`,fill:U.blue,fontSize:t.font(13)}),W(t.rect(128,424,192,44),`tabbar`,{label:`Home | Search | You`,fontSize:t.font(11)}),P(t.rect(420,150,470,80),`In your pocket`,t.font(36),{align:`left`}),R([t.point(422,240),t.point(552,240)],{color:V,strokeWidth:4}),P(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:B})]}function Dr(e){let t=I(e);return[...F(t,`Where the work lives`),an(t.rect(72,148,520,312),`browser`),W(t.rect(84,196,96,252),`sidebar`,{label:`Boards | Team | Settings`,fontSize:t.font(11),fill:U.gray}),W(t.rect(192,194,200,30),`heading`,{label:`Roadmap wall`,fontSize:t.font(16)}),W(t.rect(428,196,152,28),`segmented`,{label:`Day | Week | Month`,fontSize:t.font(10),fill:U.blue}),...[{x:192,label:`Now`},{x:326,label:`Next`},{x:460,label:`Later`}].map(({x:e,label:n})=>W(t.rect(e,238,120,86),`card`,{label:n,fontSize:t.font(12)})),W(t.rect(192,340,388,100),`list`,{label:`Ship the fix | Call the pilot users | Write the launch post`,fontSize:t.font(12)}),P(t.rect(628,190,260,76),`One wall for the whole team`,t.font(25),{align:`left`,valign:`top`,lineHeight:1.3}),P(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:B})]}function Or(e){let t=I(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[...F(t,`What to look at`),L(t.rect(72,150,520,300),`transparent`,{dash:`dashed`,label:`Drop a screenshot here`,fontSize:t.font(17),labelColor:K,opacity:.6}),...n.flatMap(({x:e,y:n,note:i},a)=>{let o=t.point(e,n),s=178+a*92;return[W({x:o.x,y:o.y,width:r,height:r},`stepbadge`,{label:String(a+1),fontSize:t.font(15),fill:U.yellow}),...z([W(t.rect(628,s,34,34),`stepbadge`,{label:String(a+1),fontSize:t.font(15),fill:U.yellow}),P(t.rect(674,s-4,214,84),i,t.font(16),{align:`left`,valign:`top`,lineHeight:1.5,color:B})])]})]}function kr(e){let t=I(e),n=(e,n,r)=>L(e,`transparent`,{dash:`dashed`,label:n,fontSize:t.font(r),labelColor:K,opacity:.6});return[...F(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=I(e),n=124*t.unit,r=[{x:128,y:96,rot:-4,fill:U.blue,text:`What if…?`},{x:660,y:84,rot:3,fill:U.green,text:`Steal this idea`},{x:116,y:326,rot:5,fill:U.pink,text:`Open question`},{x:692,y:318,rot:-6,fill:U.teal,text:`Remember this`},{x:408,y:392,rot:2,fill:U.yellow,text:`Wild card`}].map(({x:e,y:r,rot:i,fill:a,text:o})=>H(t.point(e,r),n,o,t.font(15),i,a));return[L(t.rect(350,200,260,120),U.yellow,{kind:`ellipse`,fillStyle:`bold`,label:`The topic`,fontSize:t.font(26)}),...r]}function jr(e){let t=I(e),n=(e,n,r,i)=>L(t.rect(e,n,r,r),i,{kind:`star`,fillStyle:`bold`});return[n(186,122,44,U.yellow),n(744,104,32,U.pink),n(252,396,26,U.blue),P(t.rect(160,186,640,100),`Demo time`,t.font(72)),P(t.rect(280,300,400,48),`(everything will be fine)`,t.font(30),{fontFamily:nn,color:B}),H(t.point(656,360),132*t.unit,`Plan B: screenshots`,t.font(16),5)]}function Mr(e){let t=I(e),n=26*t.unit,r=t.point(772,102);return[L({x:r.x,y:r.y,width:n,height:n},U.pink,{kind:`heart`,fillStyle:`bold`}),P(t.rect(160,190,640,100),`Thank you!`,t.font(64)),...[`hello@example.com`,`koboyo.com`,`@yourhandle`].map((e,n)=>en(t.rect(196+n*200,306,184,40),U.gray,e,t.font(15),{fillStyle:`pastel`})),H(t.point(688,366),180*.85*t.unit,`Questions?`,t.font(20),-6)]}function Nr(e){let t=I(e),n=84*t.unit,r=t.point(480,132);return[J({x:r.x-n/2,y:r.y},n,`coffee`,{color:q}),P(t.rect(160,248,640,90),`Back in 10 minutes`,t.font(56)),P(t.rect(280,344,400,44),`stretch, refill, ignore Slack`,t.font(28),{fontFamily:nn,color:B}),W(t.rect(330,424,300,18),`progress`,{value:.35,fill:U.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 sn(await on(e,r,{bounds:t,padding:0,background:n(i),palette:i}))}var Ir=new Map;function Lr(e,t,n,r){let i=pe(),[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=Te(),ee=l.filter(e=>m===`all`||e.category===m||d?.(e));return(0,Q.jsx)(Rt,{open:t,onOpenChange:n,children:(0,Q.jsxs)(It,{children:[(0,Q.jsx)(Ft,{className:`fixed inset-0 bg-gray-900/15`}),(0,Q.jsxs)(Lt,{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)(Bt,{className:`text-[15px] text-[var(--chrome-fg-900)]`,children:r}),(0,Q.jsx)(zt,{"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)(Ye,{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:Yt,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=pe(),i=(0,X.useMemo)(()=>O(n,t),[n,t]),a=Te(),[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,w(t),e=>t.fill&&t.fill!==`transparent`?C(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=Se(`slide`),o=ee(),{store:s,viewportAnimation:c,history:l}=o,u=nt(),{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:ne,updateShape:E,setSelectedIds:de,setSlidesOpen:pe,setSlidePickerOpen:me,setNotesEditorId:he,setAnimateSlideId:ge,setAiOpen:ve,setPresentingIndex:ye,setViewport:xe,setExportDialog:we}=s.getState(),A=(0,X.useMemo)(()=>D(p),[p]),Te=(0,X.useMemo)(()=>st(p),[p]),Ee=(0,X.useMemo)(()=>oe(A).length,[A]),[j,M]=(0,X.useState)(null);(0,X.useEffect)(()=>{qr(new Set(A.map(e=>e.id)))},[A]);let De=Ut()===`docked`,Oe=(0,X.useCallback)(()=>{let e=t.current,n=e?.clientWidth??window.innerWidth,r=e?.clientHeight??window.innerHeight;return{width:Math.max(1,n-(De?272:0)),height:r}},[t,De]),ke=(0,X.useMemo)(()=>ue(A,m,Oe()),[A,m,Oe]);function N(e){c.animate(s.getState().viewport,fe(w(e),Oe(),Xr),xe)}(0,X.useEffect)(()=>{if(!v||y.size===0)return;let e=s.getState().shapes,t=ie(e,D(e),y);!t||t.id===v||ge(t.id)},[y,v,s,ge]);function Ae(e,t){let{width:n,height:r}=Oe(),i=te({x:n/2,y:r/2},m),a={...ae(A,i,p),slideOrder:e,slideLayout:t&&t.id!==`blank`?t.id:void 0},o=t?t.build(w(a)):[];d(),C(le(A,e)),x([a,...o]),S(new Set([a.id])),f(),de(new Set([a.id])),N(a)}function je(e){let t=s.getState().shapes,{clones:n,renumbered:r}=ce(t,A,e);d(),C(r),x(n),S(new Set([n[0].id])),f(),de(new Set([n[0].id])),N(n[0])}function Me(e){let t=s.getState().shapes;ne(se(t,A[e])),de(new Set)}function Ne(e,t){let n=s.getState().shapes,r=A[e],i=O(n,r),a={bounds:w(r),padding:0,background:r.fill,measurement:o.measurement},c=k(r,e);u(t===`png`?`downloadPng`:`downloadSvg`,i,{options:a,filename:c})}function Pe(e){Ee!==0&&ye(e??Math.max(0,ke))}function Fe(){if(!j)return;let e=j.value.trim();e!==j.initial&&E(j.id,{label:e}),M(null)}let Ie=Le({count:A.length,gap:Zr,disabled:b,onPress:e=>N(A[e]),onReorder:(e,t)=>C(re(A,e,t)),canDrag:()=>!j}),Re=v?A.findIndex(e=>e.id===v):-1,ze=Re>=0?A[Re]:void 0;return(0,Q.jsxs)(Wt,{width:272,testId:`slides-panel`,ariaLabel:`Slides`,onDismiss:()=>pe(!1),children:[ze?(0,Q.jsx)(Cn,{figure:ze,index:Re,total:A.length,viewMode:b,onBack:()=>ge(null),onGoToSlide:e=>{let t=A[e];t&&(ge(t.id),N(t))},onFocusSlide:N}):(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 (`,A.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:()=>ve(!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)(Je,{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:()=>me(!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)(qe,{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:Ee===0,onClick:()=>we({format:`pdf`}),className:`${Nt} disabled:pointer-events-none disabled:text-[var(--chrome-fg-300)]`,children:(0,Q.jsx)(_e,{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:()=>pe(!1),className:Nt,children:(0,Q.jsx)(Ye,{size:16,stroke:1.75})})})]})]}),(0,Q.jsx)(`div`,{className:`mx-3 h-px bg-[var(--chrome-divider)]`}),(0,Q.jsxs)(`div`,{ref:Ie.listRef,"data-testid":`slides-list`,className:`flex flex-1 flex-col gap-3 overflow-y-auto p-3`,children:[A.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:()=>me(!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)(qe,{size:14,stroke:1.75}),`Add slide`]})]}),A.map((e,t)=>{let n=T(e,t),r=t===ke,o={onPresent:()=>Pe(t),onExportPng:i?null:()=>Ne(t,`png`),onExportSvg:i?null:()=>Ne(t,`svg`),onEmbed:a?()=>a(e.id):null,onDuplicate:()=>je(t),onRename:()=>M({id:e.id,initial:n,value:n}),onEditNotes:()=>he(e.id),onToggleSkip:()=>E(e.id,{slideSkipped:!e.slideSkipped||void 0}),onAddAbove:()=>Ae(t),onAddBelow:()=>Ae(t+1),onDelete:()=>Me(t)};return(0,Q.jsxs)(`div`,{ref:Ie.setItemRef(t),"data-testid":`slide-item-${t}`,className:`group relative shrink-0`,style:Ie.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`}`,...Ie.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)(Ce,{size:11,stroke:1.75}),`Skipped`]}),Te.has(e.id)&&(0,Q.jsxs)(`div`,{"data-testid":`slide-animated-${t}`,title:`Animated: plays in ${Te.get(e.id)} clicks`,className:Yr,children:[(0,Q.jsx)(be,{size:11,stroke:1.75}),Te.get(e.id)]})]}),j?.id===e.id?(0,Q.jsx)(`input`,{autoFocus:!0,onFocus:e=>e.target.select(),value:j.value,onChange:e=>M({...j,value:e.target.value}),onBlur:Fe,onKeyDown:e=>{e.stopPropagation(),e.key===`Enter`&&Fe(),e.key===`Escape`&&M(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:()=>N(e),onDoubleClick:t=>{t.stopPropagation(),b||M({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:Ee===0,onPresent:e=>Pe(e===`beginning`?0:void 0)})})]}),(0,Q.jsx)(Vr,{open:h,onOpenChange:me,onPick:e=>{Ae(A.length,e),De||pe(!1)}})]})}export{Qr as SlidesPanel};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{At as e,Tn as t,bn as n}from"./slides-D9bnXqtf.js";function r(e,t,n){}function i(e){return(e.split(`,`)[0]?.trim()??``).replace(/^['"]|['"]$/g,``)}var a=`JetBrains Mono`;function o(e){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:``}function s(e){let t=new Set,n=!1,r=!1,s=new Set,c=e=>{for(let t of e)s.add(t.codePointAt(0)??0)};for(let s of e){let e=o(s);if((e||s.type===`chart`||s.type===`table`)&&`fontFamily`in s&&s.fontFamily&&t.add(i(s.fontFamily)),e.includes(`<code`)&&t.add(a),n||=e.includes(`<strong`),r||=e.includes(`<em`),c(e),`cells`in s&&Array.isArray(s.cells))for(let e of s.cells)for(let t of e)c(String(t));if(s.type===`table`&&s.cellStyles){for(let e of s.cellStyles)if(e)for(let n of e)n?.fontFamily&&t.add(i(n.fontFamily))}}return{families:t,bold:n,italic:r,codepoints:s}}var c={woff2:`font/woff2`,woff:`font/woff`,truetype:`font/ttf`,opentype:`font/otf`};function l(e,t){let n=e.format??`woff2`,r=`data:${c[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 u(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`)&&d(e.unicodeRange??``,o)).map(e=>l(e,n)).join(`
|
|
2
|
-
`)}function d(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 f=`#ffec99`,p=.14;function m(e,t){return(e.fill??``).localeCompare(t.fill??``)||e.y-t.y||e.x-t.x}function h(t,n){return{id:e(),type:`sticky`,x:t.x,y:t.y,width:180,height:180,rotation:0,text:``,fontSize:n.fontSize,fontFamily:n.fontFamily,fill:n.fill===`transparent`?f:n.fill,opacity:n.opacity}}var g=new Set([`/`,`\\`,`.`,`_`,`-`,`:`,`#`,`,`,`?`,`&`,`=`,`@`]),_=2,v=/^[A-Za-z0-9]{1,5}$/,y=e=>e!==e.toUpperCase()&&e===e.toLowerCase(),b=e=>e!==e.toLowerCase()&&e===e.toUpperCase();function x(e){let t=Array.from(e),n=[];for(let e=_;e<=t.length-_;e+=1){let r=t[e-1],i=t[e];if(g.has(r)&&!g.has(i)){(r!==`.`||!v.test(t.slice(e).join(``)))&&n.push(e);continue}let a=y(r)&&b(i),o=b(r)&&b(i)&&y(t[e+1]??``);(a||o)&&n.push(e)}return n}function S(e){let t=Array.from(e),n=[0,...x(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 C(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 w(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=C(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}S(r).forEach((e,t)=>a(e,t===0?` `:``))}return(i||r.length===0)&&r.push(i),r}function T(e,r,i){return e.split(`
|
|
3
|
-
`).map(e=>e.split(` `).map(e=>n(e,i)<=r?t(e):S(e).map(t).join(`<wbr>`)).join(` `)).join(`
|
|
4
|
-
`)}var E={"&":`&`,"<":`<`,">":`>`,""":`"`,"'":`'`},D=/^<\/?(?:br|p|div|li|ul|ol|h[1-6]|blockquote)\b/i;function O(e){let t=[];for(let n of e.split(/(<[^>]*>)/))if(n){if(n.startsWith(`<`)&&n.endsWith(`>`)){t.push({raw:n,char:D.test(n)?`
|
|
5
|
-
`:``,tag:!0});continue}for(let e of n.matchAll(/&[#\w]+;|[\s\S]/gu)){let n=e[0],r=n.length>1?E[n]??`x`:n;t.push({raw:n,char:r,tag:!1})}}return t}function k(e,t,r){let i=O(e),a=new Set,o=[],s=()=>{let e=o.map(e=>i[e].char).join(``);if(e&&n(e,r)>t&&Array.from(e).length===o.length)for(let t of x(e))a.add(o[t]);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 A(e,t,r){return e.split(`
|
|
6
|
-
`).map(e=>e.split(` `).map(e=>n(e,r)<=t?e:S(e).join(``)).join(` `)).join(`
|
|
7
|
-
`)}export{w as a,m as c,i as d,d as f,A as i,h as l,r as m,T as n,f as o,s as p,k as r,p as s,x as t,u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{S as e,Z as t}from"./style-BENGW2ZV.js";import{Dn as n,Ut as r,Zt as i,_ as a,an as o,on as s}from"./slides-D9bnXqtf.js";import{r as c}from"./elk-worker-loader-CC-I9MmI.js";import{t as l}from"./icons-DzW1j-r3.js";import{i as u,r as d,t as f}from"./tidy-scope-BgBSUklT.js";import{n as p}from"./asset-glyph-B3c--Mx2.js";import{n as m}from"./shape-meta-BpwsiB82.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-BwetpTFH.js";import{T as S}from"./builders-DbF28yId.js";var C={none:[!1,!1],start:[!0,!1],end:[!1,!0],both:[!0,!0]},w={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}},T={top:`top`,right:`right`,bottom:`bottom`,left:`left`};function E(e,t){return!e||!t||`kind`in e||!w[t]?e:{...e,anchor:w[t],precise:!0}}function D(t,n){if(t.type!==`arrow`)return t;let r={...t};n.fromSide&&(r.startBinding=E(r.startBinding,n.fromSide)),n.toSide&&(r.endBinding=E(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?C[n.arrows]:n.bidirectional?C.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 O(e){return e.type===`rectangle`||e.type===`icon`||e.type===`sticky`||e.type===`table`||e.type===`chart`}function k(e,t){return{id:e,width:t.width,height:t.height,rank:0,x:t.x,y:t.y}}function A(t,n,r,i,a){let c=()=>{let e=D(S(s(t),s(n),t,n),r);return e.strokeWidth=g,e},l=o(t),u=o(n),d=i.filter(e=>e.id!==t.id&&e.id!==n.id&&O(e)).map(e=>o(e));if(!b([s(t),s(n)],d)&&r.bend===`curved`)return c();let f=_({bounds:l,side:r.fromSide?T[r.fromSide]:void 0},{bounds:u,side:r.toSide?T[r.toSide]:void 0},d,void 0,a);if(!f)return c();let p=y({from:k(t.id,l),to:k(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?C[r.arrows]:r.bidirectional?C.both:void 0;return m&&(p.startArrow=m[0],p.endArrow=m[1]),r.style===`dotted`&&(p.dash=`dotted`),p}function j(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 M=(()=>{let e={};for(let[t,n]of Object.entries(h))n&&!(n in e)&&(e[n]=t);return e})();function N(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:M[e.kind]}:{id:e.id,label:t}}var P=28,F=44;function I(e,t,n,i,a){if(e.type===`rectangle`||e.type===`icon`||e.type===`sticky`)return{...e,x:t,y:n,width:i,height:a};let s=o(e);return r(e,{x:t-s.x,y:n-s.y})}function L(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:j(e,A(r,i,{},t))}async function R(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=i(v);if(!x)return[];let S=_.filter(e=>e.type===`figure`),C=(e,n)=>t(s(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=N(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 M=i(A);if(!M)return[];let R=x.x-M.x,z=x.y-M.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,I(e,n.x+R,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 i=r(H[t],{x:R,y:z}),a=j(e,i);return a.startBinding=U(a.startBinding),a.endBinding=U(a.endBinding),i.label&&e.label&&!n(e.label)&&(a.label=i.label),a}):[];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+R,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=i(a(c,e).map(e=>K.get(e.id)).filter(e=>e!==void 0));if(t){let n={...e,x:t.x-P,y:t.y-F,width:t.width+P*2,height:t.height+P+F};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=>L(t,e))}return[...B.values(),...G,...W]}var z=c(),B={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)=>z.measure(e,t,n,r)};function V(e,t,n){return R(e,t,n,B)}export{V as tidyInBrowser};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Z as e}from"./style-BENGW2ZV.js";import{_ as t,an as n,on as r}from"./slides-D9bnXqtf.js";var i=new Set([`rectangle`,`icon`,`sticky`]);function a(t,i){let a=r(i),o;for(let r of t){let t=n(r);e(a,t)&&(!o||t.width*t.height<o.width*o.height)&&(o=r)}return o}function o(e,n){let r=new Set(n),o=e.filter(e=>e.type===`figure`&&(e.kind??`simple`)===`simple`&&e.slideOrder===void 0);for(let n=0;n<4;n+=1){let n=r.size;for(let n of e)r.has(n.id)&&n.type===`figure`&&t(e,n).forEach(e=>r.add(e.id));for(let t of e){if(!r.has(t.id)||!i.has(t.type))continue;let e=a(o,t);e&&r.add(e.id)}if(r.size===n)break}return r}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};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{n as t,t as n}from"./jsx-runtime-2Zwg-L3c.js";import{An as r,Cn as i,Dn as a,Fn as o,Gt as s,Ht as c,Mn as l,Nn as u,Pn as d,Ut as f,Wt as p,an as m,at as h,bt as g,dt as _,en as v,ht as ee,in as y,it as b,jn as x,lt as S,mn as C,mt as w,pt as T,rn as E,tn as te,yt as D}from"./useScrollLock-B7mQdXyv.js";import{t as O}from"./FloatingPortalLite-Bf0q6fmL.js";var k=e(t(),1),A=k.createContext(void 0);function ne(){let e=k.useContext(A);if(!e)throw Error(x(73));return e}var j=0;function re(e){return j+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${j}`}function M(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 N(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 P(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 F=e=>e.toastMetadata,I={toasts:r(e=>e.toasts),isEmpty:r(e=>e.toasts.length===0),toast:r(F,(e,t)=>e.get(t)?.value),toastIndex:r(F,(e,t)=>e.get(t)?.domIndex??-1),toastOffsetY:r(F,(e,t)=>e.get(t)?.offsetY??0),toastVisibleIndex:r(F,(e,t)=>e.get(t)?.visibleIndex??-1),hovering:r(e=>e.hovering),focused:r(e=>e.focused),expanded:r(e=>e.hovering||e.focused),expandedOrOutOfFocus:r(e=>e.hovering||e.focused||!e.isWindowFocused),prevFocusElement:r(e=>e.prevFocusElement)},L=class extends i{timers=new Map;areTimersPaused=!1;constructor(e){super({...e,toastMetadata:N(e.toasts)},{},I)}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=P(this.state.toasts,e.limit);n.toasts=t,n.toastMetadata=N(t)}this.update(n)}disposeEffect=()=>()=>{this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear()};removeToast(e,t={}){let n=I.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||re(`toast`);if(e.id){let t=I.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(P(a,n));let o=i.timeout??t;return i.type!==`loading`&&o>0&&this.scheduleTimer(r,o,()=>this.closeToast(r)),I.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=I.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)),I.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=I.toast(this.state,e);if(!t)return;i=[t],this.clearTimer(e)}let a=P(r.map(n=>t||n.id===e?{...n,transitionStatus:`ending`,height:0}:n),n),o={toasts:a,toastMetadata:N(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=M(t.loading),r=this.addToast({...n,type:`loading`}),i=e.then(e=>{let n=M(t.success,e);return this.updateToast(r,{...n,type:`success`,timeout:n.timeout}),e}).catch(e=>{let n=M(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??=v.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=s(e);p(this.state.viewport,t)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))};scheduleTimer(e,t,n){let r=Date.now(),i=!I.expandedOrOutOfFocus(this.state),a=i?v.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:N(e)};e.length===0&&(t.hovering=!1,t.focused=!1),this.update(t)}handleFocusManagement(e){let t=f(y(this.state.viewport));if(!this.state.viewport||!p(this.state.viewport,t)||!c(t))return;if(e===void 0){this.restoreFocusToPrevElement();return}let n=I.toasts(this.state),r=I.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()}},R=n(),z=function(e){let{children:t,timeout:n=5e3,limit:r=3,toastManager:i}=e,a=u(()=>new L({timeout:n,limit:r,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return d(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]),l(()=>{a.syncProviderProps({timeout:n,limit:r})},[a,n,r]),(0,R.jsx)(A.Provider,{value:a,children:t})},B=function(e){return e.frontmostHeight=`--toast-frontmost-height`,e}({}),V=k.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,l=ne(),u=te(),d=k.useRef(!1),h=k.useRef(!1),_=k.useRef(!1),v=l.useState(`isEmpty`),b=l.useState(`toasts`),x=l.useState(`focused`),S=l.useState(`expanded`),w=l.useState(`prevFocusElement`),T=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){v||t.key===`F6`&&s(t)!==e&&(t.preventDefault(),l.setPrevFocusElement(f(y(e))),e?.focus({preventScroll:!0}),l.pauseTimers(),l.setFocused(!0))}return E(C(e),`keydown`,t)},[l,v]),k.useEffect(()=>{let e=l.state.viewport;if(!e||v)return;let t=C(e);function n(e){s(e)===t&&(l.setIsWindowFocused(!1),l.pauseTimers())}function r(n){if(n.relatedTarget)return;let r=s(n),i=f(y(e));(r===t||!p(e,r)||!c(i))&&l.resumeTimers(),u.start(0,()=>l.setIsWindowFocused(!0))}return m(E(t,`blur`,n,!0),E(t,`focus`,r,!0))},[l,u,v]),k.useEffect(()=>{let e=l.state.viewport;if(!(!e||v))return E(y(e),`pointerdown`,l.handleDocumentPointerDown,!0)},[v,l]);function j(e){let t=l.state.viewport;if(t)if(d.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 re(e){e.key===`Tab`&&e.shiftKey&&s(e.nativeEvent)===l.state.viewport&&(e.preventDefault(),l.restoreFocusToPrevElement(),l.resumeTimers())}function M(){l.state.toasts.some(e=>e.transitionStatus===`ending`)||_.current||!h.current||(l.state.isWindowFocused&&l.resumeTimers(),l.setHovering(!1),h.current=!1)}k.useEffect(M,[O,l]);function N(){l.pauseTimers(),l.setHovering(!0),h.current=!1}function P(){l.state.isWindowFocused&&l.resumeTimers()}function F(){l.state.toasts.some(e=>e.transitionStatus===`ending`)||_.current?h.current=!0:(P(),l.setHovering(!1))}function I(e){e.pointerType===`touch`&&(_.current=!0)}function L(e){e.pointerType===`touch`&&(_.current=!1,M())}function z(){if(d.current){d.current=!1;return}x||c(f(y(l.state.viewport)))&&(l.setFocused(!0),l.pauseTimers())}function V(e){!x||p(l.state.viewport,e.relatedTarget)||(l.setFocused(!1),P())}let ie={tabIndex:-1,role:`region`,"aria-live":`polite`,"aria-atomic":!1,"aria-relevant":`additions text`,"aria-label":`Notifications`,onMouseEnter:N,onMouseMove:N,onMouseLeave:F,onFocus:z,onBlur:V,onKeyDown:re,onClick:z,onPointerDown:I,onPointerUp:L,onPointerCancel:L},ae={expanded:S},H=ee(`div`,e,{ref:[t,l.setViewport],state:ae,props:[ie,{style:{[B.frontmostHeight]:T?`${T}px`:void 0}},o,{children:(0,R.jsxs)(k.Fragment,{children:[!v&&w&&(0,R.jsx)(D,{onFocus:j}),a,!v&&w&&(0,R.jsx)(D,{onFocus:j})]})}]});return(0,R.jsxs)(k.Fragment,{children:[!v&&w&&(0,R.jsx)(D,{onFocus:j}),H,!x&&A.length>0&&(0,R.jsx)(`div`,{style:g,children:A.map(e=>(0,R.jsxs)(`div`,{role:`alert`,"aria-atomic":!0,children:[(0,R.jsx)(`div`,{children:e.title}),(0,R.jsx)(`div`,{children:e.description})]},e.id))})]})}),ie=e(o(),1),ae=k.createContext(void 0);function H(){let e=k.useContext(ae);if(!e)throw Error(x(66));return e}var U=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 oe(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 se(e){let t=C(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 ce={...T,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},le=40,ue=10,W=.5,de=1,fe=`${h},${S}`,G=k.forwardRef(function(e,t){let{toast:n,render:r,className:i,swipeDirection:o=[`down`,`right`],style:c,...u}=e,d=n.positionerProps?.anchor!==void 0,m=[];d||(m=Array.isArray(o)?o:[o]);let h=m.length>0,g=ne(),[v,b]=k.useState(void 0),[x,S]=k.useState(!1),[C,T]=k.useState(!1),[te,D]=k.useState(!1),[O,A]=k.useState({x:0,y:0}),[j,re]=k.useState({x:0,y:0,scale:1}),[M,N]=k.useState(),[P,F]=k.useState(),[I,L]=k.useState(null),z=k.useRef(null),B=k.useRef({x:0,y:0}),V=k.useRef({x:0,y:0,scale:1}),H=k.useRef(void 0),G=k.useRef(0),K=k.useRef(!1),q=k.useRef({x:0,y:0}),pe=k.useRef(!1),me=k.useRef({x:0,y:0}),J=k.useRef(null),Y=k.useRef(null),X=g.useState(`toastIndex`,n.id),Z=g.useState(`toastVisibleIndex`,n.id),he=g.useState(`toastOffsetY`,n.id),ge=g.useState(`focused`),Q=g.useState(`expanded`);_({open:n.transitionStatus!==`ending`,ref:z,onComplete(){n.transitionStatus===`ending`&&g.removeToast(n.id)}});let $=a((e=!1)=>{let t=z.current;if(!t)return;let r=t.style.height;t.style.height=`auto`;let i=t.offsetHeight;t.style.height=r;function a(){g.updateToastInternal(n.id,{ref:z,height:i,...n.transitionStatus===`starting`?{transitionStatus:void 0}:{}})}e?ie.flushSync(a):a()});l($,[$]);function _e(e){me.current=e,A(e)}l(()=>()=>{Y.current?.abort()},[]);function ve(e,t){let n=e,r=t;return!m.includes(`left`)&&!m.includes(`right`)?n=e>0?e**W:-(Math.abs(e)**W):(!m.includes(`right`)&&e>0&&(n=e**W),!m.includes(`left`)&&e<0&&(n=-(Math.abs(e)**W))),!m.includes(`up`)&&!m.includes(`down`)?r=t>0?t**W:-(Math.abs(t)**W):(!m.includes(`down`)&&t>0&&(r=t**W),!m.includes(`up`)&&t<0&&(r=-(Math.abs(t)**W))),{x:n,y:r}}let ye=a(e=>{if(e.pointerId!==J.current)return;J.current=null,Y.current?.abort(),Y.current=null,S(!1),T(!1),L(null);let t=V.current;if(e.type===`pointercancel`||K.current){_e({x:t.x,y:t.y}),b(void 0);return}let r=!1,i=me.current,a=i.x-t.x,o=i.y-t.y,s;for(let e of m){switch(e){case`right`:a>le&&(r=!0,s=`right`);break;case`left`:a<-40&&(r=!0,s=`left`);break;case`down`:o>le&&(r=!0,s=`down`);break;case`up`:o<-40&&(r=!0,s=`up`);break;default:break}if(r)break}r?(b(s),D(!0),g.closeToast(n.id)):(_e({x:t.x,y:t.y}),b(void 0))});function be(e){if(e.button!==0)return;e.pointerType===`touch`&&g.pauseTimers();let t=s(e.nativeEvent);if(t&&t.closest(`button,a,input,textarea,[role="button"],${fe}`))return;if(K.current=!1,H.current=void 0,G.current=0,J.current=e.pointerId,B.current={x:e.clientX,y:e.clientY},q.current=B.current,z.current){let e=se(z.current);V.current=e,re(e),_e({x:e.x,y:e.y})}g.setHovering(!0),S(!0),T(!1),L(null),pe.current=!0;let n=z.current;if(n){Y.current?.abort();let t=new AbortController;Y.current=t;let r=y(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!==J.current)return;e.preventDefault(),pe.current&&=(B.current={x:e.clientX,y:e.clientY},!1);let{clientY:t,clientX:n,movementX:r,movementY:i}=e;(i<0&&t>q.current.y||i>0&&t<q.current.y)&&(q.current={x:q.current.x,y:t}),(r<0&&n>q.current.x||r>0&&n<q.current.x)&&(q.current={x:n,y:q.current.y});let a=n-B.current.x,o=t-B.current.y,s=t-q.current.y,c=n-q.current.x;if(!C&&Math.sqrt(a*a+o*o)>=de&&(T(!0),I===null)){let e=m.includes(`left`)||m.includes(`right`),t=m.includes(`up`)||m.includes(`down`);e&&t&&L(Math.abs(a)>Math.abs(o)?`horizontal`:`vertical`)}let l;if(!H.current)I===`vertical`?o>0?l=`down`:o<0&&(l=`up`):I===`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)&&(H.current=l,G.current=oe(l,a,o),b(l));else{let e=H.current,t=oe(e,c,s);t>le?(K.current=!1,b(e)):!(m.includes(`left`)&&m.includes(`right`))&&!(m.includes(`up`)&&m.includes(`down`))&&G.current-t>=ue&&(K.current=!0)}let u=ve(a,o),d=V.current.x,f=V.current.y;I===`horizontal`?(m.includes(`left`)||m.includes(`right`))&&(d+=u.x):(I===`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(!z.current||!p(z.current,f(y(z.current))))return;g.closeToast(n.id)}}k.useEffect(()=>{if(!h)return;let e=z.current;if(!e)return;function t(t){J.current===null||!p(e,s(t))||t.preventDefault()}return E(e,`touchmove`,t,{passive:!1})},[h]);function Ce(){if(!x&&O.x===j.x&&O.y===j.y&&!te)return{[U.swipeMovementX]:`0px`,[U.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,[U.swipeMovementX]:`${e}px`,[U.swipeMovementY]:`${t}px`}}let we=n.priority===`high`,Te={role:we?`alertdialog`:`dialog`,tabIndex:0,"aria-modal":!1,"aria-labelledby":M,"aria-describedby":P,"aria-hidden":we&&!ge?!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:w(n.limited),style:{...Ce(),[U.index]:n.transitionStatus===`ending`?X:Z,[U.offsetY]:`${he}px`,[U.height]:n.height?`${n.height}px`:void 0}},Ee=k.useMemo(()=>({rootRef:z,toast:n,titleId:M,setTitleId:N,descriptionId:P,setDescriptionId:F,swiping:x,swipeDirection:v,recalculateHeight:$,index:X,visibleIndex:Z,expanded:Q}),[n,M,P,x,v,$,X,Z,Q]),De={transitionStatus:n.transitionStatus,expanded:Q,limited:n.limited||!1,type:n.type,swiping:Ee.swiping,swipeDirection:Ee.swipeDirection},Oe=ee(`div`,e,{ref:[t,Ee.rootRef],state:De,stateAttributesMapping:ce,props:[Te,u]});return(0,R.jsx)(ae.Provider,{value:Ee,children:Oe})}),K=k.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,children:o,...s}=e,{toast:c,setTitleId:u}=H(),d=o??c.title,f=!!d,p=b(a);l(()=>{if(f)return u(p),()=>{u(void 0)}},[f,p,u]);let m=ee(`h2`,e,{ref:t,state:{type:c.type},props:{...s,id:p,children:d}});return f?m:null}),q=O;function pe(){let e=k.useContext(A);if(!e)throw Error(x(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 me(){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||re(`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 J(e=me()){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 Y=[`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 X(){let{toasts:e}=pe();return e.map(e=>(0,R.jsx)(G,{toast:e,className:Y,swipeDirection:`right`,children:(0,R.jsx)(K,{})},e.id))}var Z=(0,k.createContext)(null);function he(e){let{controller:t,children:n}=e;return(0,R.jsx)(Z.Provider,{value:t,children:(0,R.jsxs)(z,{toastManager:t.manager,children:[n,(0,R.jsx)(q,{children:(0,R.jsx)(V,{"data-overlay":!0,"data-testid":`toast-viewport`,className:`fixed bottom-4 right-4 z-50`,children:(0,R.jsx)(X,{})})})]})})}var ge=()=>{};function Q(){let e=(0,k.useContext)(Z);return{notify:e?e.notify:ge}}export{J as n,Q as r,he as t};
|
|
@@ -1 +0,0 @@
|
|
|
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{n as o,t as s}from"./IconNote-CSELvWzx.js";import{t as ee}from"./IconMinus-y4ejub-s.js";import{t as te}from"./IconMoodSmile-Bic_fw54.js";import{t as c}from"./IconPencil-C5Y-Y4dC.js";import{t as l}from"./IconPhoto-CR36IK-b.js";import{t as u}from"./IconSearch-C1K0_Pq_.js";import{t as d}from"./IconSparkles-WDcg8BA9.js";import{C as f,b as p,c as m,f as h,g as ne,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 g=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`}]]),_=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`}]]),v=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`}]]),y=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`}]]),b=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`}]]),x=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`}]]),S=r(`outline`,`chart-line`,`ChartLine`,[[`path`,{d:`M4 19l16 0`,key:`svg-0`}],[`path`,{d:`M4 15l4 -6l4 2l4 -5l4 4`,key:`svg-1`}]]),C=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`}]]),w=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`}]]),T=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`}]]),E=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`}]]),D=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`}]]),O=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`}]]),k=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`}]]),A=r(`outline`,`circle`,`Circle`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`,key:`svg-0`}]]),j=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`}]]),M=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`}]]),N=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`}]]),P=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`}]]),F=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`}]]),I=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`}]]),L=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`}]]),_e=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`}]]),ve=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`}]]),ye=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`}]]),be=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`}]]),xe=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`}]]),Se=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`}]]),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:L,tool:`lasso`},hand:{label:`Hand`,help:`Hand (pan)`,chord:`h`,icon:P,tool:`hand`,viewSafe:!0},rectangle:{label:`Rectangle`,chord:`r`,icon:H,tool:`rectangle`},ellipse:{label:`Ellipse`,chord:`o`,icon:A},arrow:{label:`Arrow`,chord:`a`,icon:m,tool:`arrow`},line:{label:`Line`,chord:`l`,icon:ee,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:c,tool:`draw`},highlight:{label:`Highlighter`,chord:`Shift+KeyP`,icon:I,tool:`highlight`},laser:{label:`Laser pointer`,chord:`k`,icon:Se,tool:`laser`,viewSafe:!0},text:{label:`Text`,chord:`t`,icon:je,tool:`text`},sticky:{label:`Sticky note`,chord:`n`,icon:s,tool:`sticky`},figure:{label:`Frame`,chord:`f`,tool:`figure`},image:{label:`Image`,chord:`i`,icon:l,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:O},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:j},{kind:`tablet`,icon:M},{kind:`browser`,icon:me},{kind:`window`,icon:fe},{kind:`lanes`,icon:be},{kind:`vlanes`,icon:R},{kind:`boundary`,icon:pe}],q=[{value:`table`,label:`Table`,icon:U},{value:`bar`,label:`Bar chart`,icon:y},{value:`line`,label:`Line chart`,icon:S},{value:`area`,label:`Area chart`,icon:v},{value:`scatter`,label:`Scatter chart`,icon:b},{value:`pie`,label:`Pie chart`,icon:C},{value:`donut`,label:`Donut chart`,icon:E},{value:`radar`,label:`Radar chart`,icon:p},{value:`quadrant`,label:`Quadrant chart`,icon:x}],J=[{kind:`button`,label:`Button`,icon:H},{kind:`input`,label:`Input`,icon:N},{kind:`search`,label:`Search field`,icon:u},{kind:`checkbox`,label:`Checkbox`,icon:w},{kind:`radio`,label:`Radio`,icon:D},{kind:`toggle`,label:`Toggle`,icon:Ae},{kind:`dropdown`,label:`Dropdown`,icon:Ee},{kind:`slider`,label:`Slider`,icon:g},{kind:`navbar`,label:`Navbar`,icon:ye},{kind:`tabs`,label:`Tabs`,icon:ve},{kind:`image`,label:`Image placeholder`,icon:l},{kind:`avatar`,label:`Avatar`,icon:Me},{kind:`heading`,label:`Heading`,icon:F},{kind:`paragraph`,label:`Paragraph`,icon:ue},{kind:`divider`,label:`Divider`,icon:De},{kind:`link`,label:`Link`,icon:o},{kind:`textarea`,label:`Text area`,icon:f},{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:T},{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:xe},{kind:`scrollbar`,label:`Scrollbar`,icon:se},{kind:`segmented`,label:`Segmented control`,icon:R},{kind:`tabbar`,label:`Bottom tab bar`,icon:_e},{kind:`statusbar`,label:`Status bar`,icon:de},{kind:`fab`,label:`Floating button`,icon:k}],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:d,action:{kind:`ai`}},{id:`ai-diagram`,label:`Generate diagram with AI`,group:`AI`,keywords:`assistant architecture flowchart create`,icon:d,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:d,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:d,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:h,action:{kind:`control`,control:`entity`}},{id:`lifeline`,label:`Lifeline`,group:`Shapes`,keywords:`sequence uml participant`,icon:ne,action:{kind:`control`,control:`lifeline`}},{id:`fragment`,label:`Fragment`,group:`Shapes`,keywords:`sequence uml combined opt alt loop par frame container`,icon:_,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{v as C,y as S,g as T,E as _,X as a,x as b,Fe as c,U as d,H as f,A 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,C as v,_ as w,b as x,S as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{n as t,t as n}from"./jsx-runtime-2Zwg-L3c.js";import{i as r,r as i}from"./config-a_lz-57R.js";import{o as a}from"./editor-B0tARd79.js";import{n as o}from"./tool-catalog-ChSwaLIq.js";import{a as s,i as c,r as l,t as u}from"./PopoverPopup-BqGWd_uB.js";import{n as d}from"./storage-CvDRYh5V.js";import{s as f}from"./chrome-C2RCq3SI.js";import{CommandList as p}from"./command-palette-BjFnQHnz.js";import{t as m}from"./use-recent-list-BEG0iBIm.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};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{n as t,t as n}from"./jsx-runtime-2Zwg-L3c.js";import{$t as r,A as i,An as a,C as o,Cn as s,Dn as c,Fn as l,Gt as u,H as d,Ht as f,I as p,It as m,K as h,Mn as g,Mt as _,On as v,Q as y,U as b,Ut as x,V as S,Vt as C,Wt as w,Y as T,Zt as E,_n as D,_t as O,a as k,an as A,b as j,c as ee,d as M,dt as N,en as P,f as F,gn as I,ht as L,in as R,jn as z,kn as B,l as V,m as H,mn as U,nt as W,o as te,p as ne,pt as re,rn as G,rt as ie,tn as ae,tt as K,u as oe,ut as se,v as ce,w as le,x as ue,y as de,zt as fe}from"./useScrollLock-B7mQdXyv.js";import{c as pe,d as me,f as he,i as ge,l as _e,n as ve,o as ye,r as be,s as xe,t as Se,u as q}from"./usePositioner-DA3aR0-T.js";import{t as Ce}from"./FloatingPortalLite-Bf0q6fmL.js";import{o as we}from"./editor-B0tARd79.js";import{n as Te}from"./keys-DrjiT9FL.js";import{t as Ee}from"./useBaseUiId-C0Zm5sUV.js";var J=e(t(),1),Y=n(),De=J.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new P,currentIdRef:{current:null},currentContextRef:{current:null}});function Oe(e,t){e.current=t.current}function ke(e){let{children:t,delay:n,timeoutMs:r=0}=e,i=J.useRef(n),a=J.useRef(n),o=J.useRef(null),s=J.useRef(null),c=ae();return g(()=>{if(a.current=n,!o.current){i.current=n;return}i.current={open:q(i.current,`open`),close:q(n,`close`)}},[n,o,i,a]),(0,Y.jsx)(De.Provider,{value:J.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:a,currentIdRef:o,timeoutMs:r,currentContextRef:s,timeout:c}),[r,c]),children:t})}function Ae(e,t={open:!1}){let{open:n}=t,r=`rootStore`in e?e.rootStore:e,i=r.useState(`floatingId`),{currentIdRef:a,delayRef:o,timeoutMs:s,initialDelayRef:c,currentContextRef:l,hasProvider:u,timeout:d}=J.useContext(De),[f,p]=J.useState(!1),m=J.useRef(n),h=J.useRef(!1);return g(()=>{m.current=n},[n]),g(()=>()=>{h.current=!0},[]),g(()=>{function e(){h.current||p(!1),l.current?.setIsInstantPhase(!1),a.current=null,l.current=null,o.current=c.current,d.clear()}if(a.current&&!n&&a.current===i){if(p(!1),s){let t=i;return d.start(s,()=>{r.select(`open`)||a.current&&a.current!==t||e()}),()=>{(m.current||a.current!==t)&&d.clear()}}e()}},[n,i,a,o,s,c,l,d,r]),g(()=>{if(!n)return;let e=l.current,t=a.current;d.clear(),l.current={onOpenChange:r.setOpen,setIsInstantPhase:p},a.current=i,o.current={open:0,close:q(c.current,`close`)},t!==null&&t!==i?(p(!0),e?.setIsInstantPhase(!0),e?.onOpenChange(!1,b(y))):(p(!1),e?.setIsInstantPhase(!1))},[n,i,r,a,o,c,l,d]),g(()=>()=>{if(a.current===i){if(l.current=null,!m.current)return;a.current=null,Oe(o,c),d.clear()}},[l,a,o,i,c,d]),J.useMemo(()=>({hasProvider:u,delayRef:o,isInstantPhase:f}),[u,o,f])}function je(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){let a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},o=t.axis===`x`||t.axis===`both`,s=t.axis===`y`||t.axis===`both`,c=[`mouseenter`,`mousemove`].includes(t.dataRef.current.openEvent?.type||``)&&t.pointerType!==`touch`,l=a.width,u=a.height,d=a.x,f=a.y;return n==null&&t.x&&o&&(n=a.x-t.x),r==null&&t.y&&s&&(r=a.y-t.y),d-=n||0,f-=r||0,l=0,u=0,!i||c?(l=t.axis===`y`?a.width:0,u=t.axis===`x`?a.height:0,d=o&&t.x!=null?t.x:d,f=s&&t.y!=null?t.y:f):i&&!c&&(u=t.axis===`x`?a.height:u,l=t.axis===`y`?a.width:l),i=!0,{width:l,height:u,x:d,y:f,top:f,right:d+l,bottom:f+u,left:d}}}}function Me(e){return e!=null&&e.clientX!=null}function Ne(e,t={}){let{enabled:n=!0,axis:r=`both`}=t,i=`rootStore`in e?e.rootStore:e,a=i.useState(`open`),o=i.useState(`floatingElement`),s=i.useState(`domReferenceElement`),l=i.context.dataRef,d=J.useRef(!1),f=J.useRef(null),[p,m]=J.useState(),[h,g]=J.useState([]),v=c(e=>{i.set(`positionReference`,e)}),y=c((e,t,n)=>{d.current||l.current.openEvent&&!Me(l.current.openEvent)||i.set(`positionReference`,je(n??s,{x:e,y:t,axis:r,dataRef:l,pointerType:p}))}),b=c(e=>{a?f.current||(y(e.clientX,e.clientY,e.currentTarget),g([])):y(e.clientX,e.clientY,e.currentTarget)}),x=_(p)?o:a;J.useEffect(()=>{if(!n){v(s);return}if(!x)return;function e(){f.current?.(),f.current=null}let t=U(o);function r(t){let n=u(t);w(o,n)?e():y(t.clientX,t.clientY)}return!l.current.openEvent||Me(l.current.openEvent)?f.current=G(t,`mousemove`,r):v(s),e},[x,n,o,l,s,i,y,v,h]),J.useEffect(()=>()=>{i.set(`positionReference`,null)},[i]),J.useEffect(()=>{n&&!o&&(d.current=!1)},[n,o]),J.useEffect(()=>{!n&&a&&(d.current=!0)},[n,a]);let S=J.useMemo(()=>{function e(e){m(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:b,onMouseEnter:b}},[b]);return J.useMemo(()=>n?{reference:S,trigger:S}:{},[n,S])}var Pe=r&&E;function Fe(e,t={}){let{enabled:n=!0,delay:r}=t,i=`rootStore`in e?e.rootStore:e,{events:a,dataRef:o}=i.context,s=J.useRef(!1),c=J.useRef(null),l=J.useRef(!0),d=ae();J.useEffect(()=>{let e=i.select(`domReferenceElement`);if(!n)return;let t=U(e);function r(){let e=i.select(`domReferenceElement`);!i.select(`open`)&&D(e)&&e===x(R(e))&&(s.current=!0)}function a(){l.current=!0}function o(){l.current=!1}return A(G(t,`blur`,r),Pe&&G(t,`keydown`,a,!0),Pe&&G(t,`pointerdown`,o,!0))},[i,n]),J.useEffect(()=>{if(!n)return;function e(e){if(e.reason===`trigger-press`||e.reason===`escape-key`){let e=i.select(`domReferenceElement`);I(e)&&(c.current=e,s.current=!0)}}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[a,n,i]);let p=J.useMemo(()=>{function e(){s.current=!1,c.current=null}return{onMouseLeave(){e()},onFocus(t){let n=t.currentTarget;if(s.current){if(c.current===n)return;e()}let a=u(t.nativeEvent);if(I(a)){if(Pe&&!t.relatedTarget){if(!l.current&&!C(a))return}else if(!f(a))return}let o=fe(t.relatedTarget,i.context.triggerElements),{nativeEvent:p,currentTarget:m}=t,h=typeof r==`function`?r():r;if(i.select(`open`)&&o||h===0||h===void 0){i.setOpen(!0,b(K,p,m));return}d.start(h,()=>{s.current||i.setOpen(!0,b(K,p,m))})},onBlur(t){e();let n=t.relatedTarget,r=t.nativeEvent,a=I(n)&&n.hasAttribute(S(`focus-guard`))&&n.getAttribute(`data-type`)===`outside`;d.start(0,()=>{let e=i.select(`domReferenceElement`),t=x(R(e));!n&&t===e||w(o.current.floatingContext?.refs.floating.current,t)||w(e,t)||a||fe(n??t,i.context.triggerElements)||i.setOpen(!1,b(K,r))})}}},[o,r,i,d]);return J.useMemo(()=>n?{reference:p,trigger:p}:{},[n,p])}var Ie=e(l(),1),Le={current:null};function Re(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:l=Le,externalTree:f,isActiveTrigger:m=!0,getHandleCloseContext:h,isClosing:g,shouldOpen:v}=t,y=`rootStore`in e?e.rootStore:e,{dataRef:x,events:S}=y.context,C=p(f),T=_e(y),E=J.useRef(!1),D=d(i),O=d(r),k=d(o),j=d(n),ee=d(v),M=d(g),N=c(()=>he(x.current.openEvent?.type,T.interactedInside)),P=c(()=>ee.current?.()!==!1),F=c((e,t,n)=>{let r=y.context.triggerElements;if(r.hasElement(t))return!e||!w(e,t);if(!I(n))return!1;let i=n;return r.hasMatchingElement(e=>w(e,i))&&(!e||!w(e,i))}),L=c(()=>{T.handler&&=(R(y.select(`domReferenceElement`)).removeEventListener(`mousemove`,T.handler),void 0)}),z=c(()=>{pe(T)});return m&&(T.handleCloseOptions=D.current?.__options),J.useEffect(()=>L,[L]),J.useEffect(()=>{if(!n)return;function e(e){e.open?E.current=!1:(E.current=e.reason===W,L(),T.openChangeTimeout.clear(),T.restTimeout.clear(),T.blockMouseMove=!0,T.restTimeoutPending=!1)}return S.on(`openchange`,e),()=>{S.off(`openchange`,e)}},[n,S,T,L]),J.useEffect(()=>{if(!n)return;function e(e,t=!0){let n=q(O.current,`close`,T.pointerType);n?T.openChangeTimeout.start(n,()=>{y.setOpen(!1,b(W,e)),C?.events.emit(`floating.closed`,e)}):t&&(T.openChangeTimeout.clear(),y.setOpen(!1,b(W,e)),C?.events.emit(`floating.closed`,e))}let t=l.current??(m?y.select(`domReferenceElement`):null);if(!I(t))return;function r(e){if(T.openChangeTimeout.clear(),T.blockMouseMove=!1,a&&!_(T.pointerType))return;let t=me(k.current),n=q(O.current,`open`,T.pointerType),r=u(e),i=e.currentTarget??null,o=y.select(`domReferenceElement`),s=i;if(I(r)&&!y.context.triggerElements.hasElement(r)){for(let e of y.context.triggerElements.elements())if(w(e,r)){s=e;break}}I(i)&&I(o)&&!y.context.triggerElements.hasElement(i)&&w(i,o)&&(s=o);let c=s!=null&&F(o,s,r),l=y.select(`open`),d=M.current?.()??y.select(`transitionStatus`)===`ending`,f=!l&&d&&E.current,p=!c&&I(s)&&I(o)&&w(o,s)&&f,m=t>0&&!n,h=c&&(l||f)||p,g=!l||c;if(h){P()&&y.setOpen(!0,b(W,e,s));return}m||(n?T.openChangeTimeout.start(n,()=>{g&&P()&&y.setOpen(!0,b(W,e,s))}):g&&P()&&y.setOpen(!0,b(W,e,s)))}function i(t){if(N()){z();return}L();let n=R(y.select(`domReferenceElement`));T.restTimeout.clear(),T.restTimeoutPending=!1;let r=x.current.floatingContext??h?.();if(!fe(t.relatedTarget,y.context.triggerElements)){if(D.current&&r){y.select(`open`)||T.openChangeTimeout.clear();let i=l.current;T.handler=D.current({...r,tree:C,x:t.clientX,y:t.clientY,onClose(){z(),L(),j.current&&!N()&&i===y.select(`domReferenceElement`)&&e(t,!0)}}),n.addEventListener(`mousemove`,T.handler),T.handler(t);return}(T.pointerType!==`touch`||!w(y.select(`floatingElement`),t.relatedTarget))&&e(t)}}return s?A(G(t,`mousemove`,r,{once:!0}),G(t,`mouseenter`,r),G(t,`mouseleave`,i)):A(G(t,`mouseenter`,r),G(t,`mouseleave`,i))},[L,z,x,O,y,n,D,T,m,F,N,a,s,k,l,C,j,h,M,P]),J.useMemo(()=>{if(!n)return;function e(e){T.pointerType=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e,n=e.currentTarget,r=y.select(`domReferenceElement`),i=y.select(`open`),o=F(r,n,e.target);if(a&&!_(T.pointerType))return;if(i&&o&&T.handleCloseOptions?.blockPointerEvents){let e=y.select(`floatingElement`);if(e){let t=T.handleCloseOptions?.getScope?.()??n.ownerDocument.body;xe(T,{scopeElement:t,referenceElement:n,floatingElement:e})}}let s=me(k.current);if(i&&!o||s===0||!o&&T.restTimeoutPending&&e.movementX**2+e.movementY**2<2)return;T.restTimeout.clear();function c(){if(T.restTimeoutPending=!1,N())return;let e=y.select(`open`);!T.blockMouseMove&&(!e||o)&&P()&&y.setOpen(!0,b(W,t,n))}T.pointerType===`touch`?Ie.flushSync(()=>{c()}):o&&i?c():(T.restTimeoutPending=!0,T.restTimeout.start(s,c))}}},[n,T,N,F,a,y,k,P])}var ze=.1,Be=ze*ze,X=.5;function Z(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function Q(e,t,n,r,i,a,o,s,c,l){let u=!1;return Z(e,t,n,r,i,a)&&(u=!u),Z(e,t,i,a,o,s)&&(u=!u),Z(e,t,o,s,c,l)&&(u=!u),Z(e,t,c,l,n,r)&&(u=!u),u}function Ve(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function $(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function He(e={}){let{blockPointerEvents:t=!1}=e,n=new P,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,d=null,f=null,p=typeof performance<`u`?performance.now():0;function h(e,t){let n=performance.now(),r=n-p;if(d===null||f===null||r===0)return d=e,f=t,p=n,!1;let i=e-d,a=t-f,o=i*i+a*a,s=r*r*Be;return d=e,f=t,p=n,o<s}function g(){n.clear(),a()}return function(r){n.clear();let a=i.domReference,d=i.floating;if(!a||!d||c==null||e==null||t==null)return;let{clientX:f,clientY:p}=r,_=u(r),v=r.type===`mouseleave`,y=w(d,_),b=w(a,_);if(y&&(l=!0,!v))return;if(b&&(l=!1,!v)){l=!0;return}if(v&&I(r.relatedTarget)&&w(d,r.relatedTarget))return;function x(){return!!(s&&m(s.nodesRef.current,o).length>0)}function S(){x()||g()}if(x())return;let C=a.getBoundingClientRect(),T=d.getBoundingClientRect(),E=e>T.right-T.width/2,D=t>T.bottom-T.height/2,O=T.width>C.width,k=T.height>C.height,A=(O?C:T).left,j=(O?C:T).right,ee=(k?C:T).top,M=(k?C:T).bottom;if(c===`top`&&t>=C.bottom-1||c===`bottom`&&t<=C.top+1||c===`left`&&e>=C.right-1||c===`right`&&e<=C.left+1){S();return}let N=!1;switch(c){case`top`:N=$(f,p,A,C.top+1,j,T.bottom-1);break;case`bottom`:N=$(f,p,A,T.top+1,j,C.bottom-1);break;case`left`:N=$(f,p,T.right-1,M,C.left+1,ee);break;case`right`:N=$(f,p,C.right-1,M,T.left+1,ee);break;default:}if(N)return;if(l&&!Ve(f,p,C)){S();return}if(!v&&h(f,p)){S();return}let P=!1;switch(c){case`top`:{let n=O?X/2:X*4,r=O||E?e+n:e-n,i=O?e-n:E?e+n:e-n,a=t+X+1,o=E||O?T.bottom-X:T.top,s=E?O?T.bottom-X:T.top:T.bottom-X;P=Q(f,p,r,a,i,a,T.left,o,T.right,s);break}case`bottom`:{let n=O?X/2:X*4,r=O||E?e+n:e-n,i=O?e-n:E?e+n:e-n,a=t-X,o=E||O?T.top+X:T.bottom,s=E?O?T.top+X:T.bottom:T.top+X;P=Q(f,p,r,a,i,a,T.left,o,T.right,s);break}case`left`:{let n=k?X/2:X*4,r=k||D?t+n:t-n,i=k?t-n:D?t+n:t-n,a=e+X+1,o=D||k?T.right-X:T.left,s=D?k?T.right-X:T.left:T.right-X;P=Q(f,p,o,T.top,s,T.bottom,a,r,a,i);break}case`right`:{let n=k?X/2:X*4,r=k||D?t+n:t-n,i=k?t-n:D?t+n:t-n,a=e-X,o=D||k?T.left+X:T.right,s=D?k?T.left+X:T.right:T.left+X;P=Q(f,p,a,r,a,i,o,T.top,s,T.bottom);break}default:}P?l||n.start(40,S):S()}};return r.__options={...e,blockPointerEvents:t},r}var Ue=J.createContext(void 0);function We(e){let t=J.useContext(Ue);if(t===void 0&&!e)throw Error(z(72));return t}var Ge={...M,disabled:a(e=>e.disabled),instantType:a(e=>e.instantType),isInstantPhase:a(e=>e.isInstantPhase),trackCursorAxis:a(e=>e.trackCursorAxis),disableHoverablePopup:a(e=>e.disableHoverablePopup),lastOpenChangeReason:a(e=>e.openChangeReason),closeOnClick:a(e=>e.closeOnClick),closeDelay:a(e=>e.closeDelay),hasViewport:a(e=>e.hasViewport)},Ke=class e extends s{constructor(e,t,n=!1){let r=new F,i={...qe(),...e};i.floatingRootContext=oe(r,t,n),super(i,{popupRef:J.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:r},Ge)}setOpen=(e,t)=>{H(this,e,t,{extraState:{openChangeReason:t.reason}})};cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,b(ie,e))}static useStore(t,n){return o(t,(t,r)=>new e(n,t,r)).store}};function qe(){return{...V(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:`none`,disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}var Je=v(function(e){let{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:a=`none`,actionsRef:o,onOpenChange:s,onOpenChangeComplete:c,handle:l,triggerId:u,defaultTriggerId:d=null,children:f}=e,p=Ke.useStore(l?.store,{open:n,openProp:r,activeTriggerId:d,triggerIdProp:u});de(p,r,n,d),p.useControlledProp(`openProp`,r),p.useControlledProp(`triggerIdProp`,u),p.useContextCallback(`onOpenChange`,s),p.useContextCallback(`onOpenChangeComplete`,c);let m=p.useState(`open`),_=!t&&m,v=p.useState(`activeTriggerId`),y=p.useState(`mounted`),x=p.useState(`payload`);p.useSyncedValues({trackCursorAxis:a,disableHoverablePopup:i}),p.useSyncedValue(`disabled`,t),ce(p,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:S,transitionStatus:C}=j(_,p),w=p.useState(`isInstantPhase`),E=p.useState(`instantType`),D=p.useState(`lastOpenChangeReason`),O=J.useRef(null);g(()=>{m&&t&&p.setOpen(!1,b(h))},[m,t,p]),g(()=>{C===`ending`&&D===`none`||C!==`ending`&&w?(E!==`delay`&&(O.current=E),p.set(`instantType`,`delay`)):O.current!==null&&(p.set(`instantType`,O.current),O.current=null)},[C,w,D,E,p]),g(()=>{_&&(v??p.set(`payload`,void 0))},[p,v,_]);let k=J.useCallback(()=>{p.setOpen(!1,b(T))},[p]);J.useImperativeHandle(o,()=>({unmount:S,close:k}),[S,k]);let A=_||y||!t&&a!==`none`;return(0,Y.jsxs)(Ue.Provider,{value:p,children:[A&&(0,Y.jsx)(Ye,{store:p,disabled:t,trackCursorAxis:a}),typeof f==`function`?f({payload:x}):f]})});function Ye({store:e,disabled:t,trackCursorAxis:n}){let r=e.useState(`floatingRootContext`),a=i(r,{enabled:!t,referencePress:()=>e.select(`closeOnClick`)}),o=Ne(r,{enabled:!t&&n!==`none`,axis:n===`none`?void 0:n});return ue(e,{activeTriggerProps:J.useMemo(()=>O(o.reference,a.reference),[o.reference,a.reference]),inactiveTriggerProps:J.useMemo(()=>O(o.trigger,a.trigger),[o.trigger,a.trigger]),popupProps:J.useMemo(()=>O(ne,o.floating,a.floating),[o.floating,a.floating])}),null}var Xe=J.createContext(void 0);function Ze(){return J.useContext(Xe)}var Qe=function(e){return e[e.popupOpen=k.popupOpen]=`popupOpen`,e.triggerDisabled=`data-trigger-disabled`,e}({}),$e=`data-base-ui-tooltip-trigger`;function et(e){if(`composedPath`in e){let t=e.composedPath();for(let e=0;e<t.length;e+=1){let n=t[e];if(I(n))return n}}let t=e.target;return I(t)?t:null}function tt(e){let t=e;for(;t;){if(t.hasAttribute($e))return t;let e=t.parentElement;if(e){t=e;continue}let n=t.getRootNode();t=`host`in n&&I(n.host)?n.host:null}return null}var nt=B(function(e,t){let{render:n,className:r,style:i,handle:a,payload:o,disabled:s,delay:c,closeOnClick:l=!0,closeDelay:u,id:f,...p}=e,m=We(!0),h=a?.store??m;if(!h)throw Error(z(82));let g=Ee(f),v=h.useState(`isTriggerActive`,g),y=h.useState(`isOpenedByTrigger`,g),x=h.useState(`floatingRootContext`),S=J.useRef(null),C=c??600,T=u??0,{registerTrigger:E,isMountedByThisTrigger:D}=le(g,S,h,{payload:o,closeOnClick:l,closeDelay:T}),O=Ze(),{delayRef:k,isInstantPhase:A,hasProvider:j}=Ae(x,{open:y}),M=_e(x);h.useSyncedValue(`isInstantPhase`,A);let N=h.useState(`disabled`),P=s??N,F=d(P),I=h.useState(`trackCursorAxis`),R=h.useState(`disableHoverablePopup`),B=J.useRef(!1),V=ae(),H=J.useRef(void 0);function U(){let e=O?.delay,t=typeof k.current==`object`?k.current.open:void 0,n=C;return j&&(n=t===0?0:c??e??C),n}function te(e){let t=S.current;if(!t||!e)return!1;let n=tt(e);return n!==null&&n!==t&&w(t,n)}function ne(e){let t=te(e);return B.current=t,t&&(M.openChangeTimeout.clear(),M.restTimeout.clear(),M.restTimeoutPending=!1,V.clear()),t}let re=Re(x,{enabled:!P,mouseOnly:!0,move:!1,handleClose:!R&&I!==`both`?He():null,restMs:U,delay(){let e=typeof k.current==`object`?k.current.close:void 0,t=T;return u==null&&j&&(t=e),{close:t}},triggerElementRef:S,isActiveTrigger:v,isClosing:()=>h.select(`transitionStatus`)===`ending`,shouldOpen(){return!B.current}}),G=Fe(x,{enabled:!P}).reference,ie=e=>{let t=B.current,n=et(e),r=ne(n),i=S.current,a=i&&n&&w(i,n);if(r&&h.select(`open`)&&h.select(`lastOpenChangeReason`)===`trigger-hover`){h.setOpen(!1,b(W,e));return}if(t&&!r&&a&&!F.current&&!h.select(`open`)&&i&&_(H.current)){let t=()=>{!B.current&&!F.current&&!h.select(`open`)&&h.setOpen(!0,b(W,e,i))},n=U();n===0?(V.clear(),t()):V.start(n,t)}},K=h.useState(`triggerProps`,D);return L(`button`,e,{state:{open:y},ref:[t,E,S],props:[re,G,D||I!==`none`?K:void 0,{onMouseOver(e){ie(e.nativeEvent)},onFocus(e){te(et(e.nativeEvent))&&e.preventBaseUIHandler()},onMouseLeave(){B.current=!1,V.clear(),H.current=void 0},onPointerEnter(e){H.current=e.pointerType},onPointerDown(e){H.current=e.pointerType,h.set(`closeOnClick`,l),l&&!h.select(`open`)&&h.cancelPendingOpen(e.nativeEvent)},onClick(e){l&&!h.select(`open`)&&h.cancelPendingOpen(e.nativeEvent)},id:g,[Qe.triggerDisabled]:P?``:void 0,[$e]:P?void 0:``},p],stateAttributesMapping:ee})}),rt=J.createContext(void 0);function it(){let e=J.useContext(rt);if(e===void 0)throw Error(z(70));return e}var at=J.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return We().useState(`mounted`)||n?(0,Y.jsx)(rt.Provider,{value:n,children:(0,Y.jsx)(Ce,{ref:t,...r})}):null}),ot=J.createContext(void 0);function st(){let e=J.useContext(ot);if(e===void 0)throw Error(z(71));return e}var ct=J.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`top`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=se,style:g,..._}=e,v=We(),y=it(),b=v.useState(`open`),x=v.useState(`mounted`),S=v.useState(`trackCursorAxis`),C=v.useState(`disableHoverablePopup`),w=v.useState(`floatingRootContext`),T=v.useState(`instantType`),E=v.useState(`transitionStatus`),D=be({anchor:i,positionMethod:a,floatingRootContext:w,mounted:x,side:o,sideOffset:c,align:s,alignOffset:l,collisionBoundary:u,collisionPadding:d,sticky:p,arrowPadding:f,disableAnchorTracking:m,keepMounted:y,collisionAvoidance:h,adaptiveOrigin:v.useState(`hasViewport`)?ge:void 0}),O=Se(e,J.useMemo(()=>({open:b,side:D.side,align:D.align,anchorHidden:D.anchorHidden,instant:S===`none`?T:`tracking-cursor`}),[b,D.side,D.align,D.anchorHidden,S,T]),{styles:D.positionerStyles,transitionStatus:E,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!x,inert:!b||S===`both`||C});return(0,Y.jsx)(ot.Provider,{value:D,children:O})}),lt={...te,...re},ut=J.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=We(),{side:s,align:c}=st(),l=o.useState(`open`),u=o.useState(`instantType`),d=o.useState(`transitionStatus`),f=o.useState(`popupProps`),p=o.useState(`floatingRootContext`),m=o.useState(`disabled`),h=o.useState(`closeDelay`);N({open:l,ref:o.context.popupRef,onComplete(){l&&o.context.onOpenChangeComplete?.(!0)}}),ye(p,{enabled:!m,closeDelay:h});let g=o.useStateSetter(`popupElement`);return L(`div`,e,{state:{open:l,side:s,align:c,instant:u,transitionStatus:d},ref:[t,o.context.popupRef,g],props:[f,ve(d),a],stateAttributesMapping:lt})}),dt=function(e){let{delay:t,closeDelay:n,timeout:r=400}=e,i=J.useMemo(()=>({delay:t,closeDelay:n}),[t,n]),a=J.useMemo(()=>({open:t,close:n}),[t,n]);return(0,Y.jsx)(Xe.Provider,{value:i,children:(0,Y.jsx)(ke,{delay:a,timeoutMs:r,children:e.children})})};function ft(e){let{label:t,shortcut:n,side:r=`top`,sideOffset:i=8,leading:a,disabled:o,testId:s,children:c}=e;return we(e=>e.coarsePointer)?c:(0,Y.jsxs)(Je,{disableHoverablePopup:!0,disabled:o,children:[(0,Y.jsx)(nt,{render:c}),(0,Y.jsx)(at,{children:(0,Y.jsx)(ct,{side:r,sideOffset:i,children:(0,Y.jsxs)(ut,{"data-testid":s,className:`pointer-events-none flex items-center gap-1.5 rounded-md bg-[var(--chrome-accent)] px-2 py-1 text-[11px] text-white shadow-md`,children:[a,(0,Y.jsx)(`span`,{children:t}),n?(0,Y.jsx)(`span`,{className:`text-[var(--chrome-fg-400)]`,children:Te(n)}):null]})})})]})}export{Fe as a,Re as i,dt as n,He as r,ft as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./reflow-Cv75wPSh.js";import{an as t}from"./slides-D9bnXqtf.js";import{t as n}from"./createReactComponent-9UsI5fmM.js";import{i as r,n as i}from"./core-CBnmD9hT.js";import{i as a,t as o}from"./flow-start-ccYJ2KB9.js";import{c as s,i as c,n as l,s as u}from"./flows-GGbkNqs8.js";var d=n(`outline`,`arrow-fork`,`ArrowFork`,[[`path`,{d:`M16 3h5v5`,key:`svg-0`}],[`path`,{d:`M8 3h-5v5`,key:`svg-1`}],[`path`,{d:`M21 3l-7.536 7.536a5 5 0 0 0 -1.464 3.534v6.93`,key:`svg-2`}],[`path`,{d:`M3 3l7.536 7.536a5 5 0 0 1 1.464 3.534v.93`,key:`svg-3`}]]),f=24;function p(e,t,n){let r=new Set([...t,...n]),i=e.filter(e=>r.has(e.id)&&e.type!==`arrow`),a=e=>i.find(t=>m(t,e))?.id??null,o=(e,r)=>t.includes(e)&&n.includes(r)||n.includes(e)&&t.includes(r),s=null;for(let t of e){if(t.type!==`arrow`)continue;let e={x:t.x,y:t.y},n={x:t.x2,y:t.y2},r=t.startBinding?.shapeId??a(e),i=t.endBinding?.shapeId??a(n);if(!r||!i||r===i||!o(r,i))continue;if(t.startBinding&&t.endBinding)return null;let c=[];t.startBinding||c.push({end:`start`,shapeId:r,point:e}),t.endBinding||c.push({end:`end`,shapeId:i,point:n}),s??={arrow:t,ends:c}}return s}function m(e,n){let r=t(e);return n.x>=r.x-f&&n.x<=r.x+r.width+f&&n.y>=r.y-f&&n.y<=r.y+r.height+f}function h(e,t,n){let r=b(t,e.length);return e[r-1]?.target===n.target?e:[...e.slice(0,r),n,...e.slice(r)]}function g(e,t,n){let r=Math.min(Math.max(n,0),e.length-1);if(t===r||!e[t])return e;let i=[...e],[a]=i.splice(t,1);return i.splice(r,0,a),i}function _(e,t){return e[t]?e.filter((e,n)=>n!==t):e}function v(e,t,n,r){let i=e[t];if(!i||i.target===n)return e;let a={...i,target:n};r!==void 0&&(a.title=r);let o=(i.also??[]).filter(e=>e!==n);return o.length>0?a.also=o:delete a.also,e.map((e,n)=>n===t?a:e)}function y(e,t,n){let r=e[t];if(!r||r.target===n)return e;let i=r.also??[],a={...r,also:i.includes(n)?i.filter(e=>e!==n):[...i,n]};return a.also?.length===0&&delete a.also,e.map((e,n)=>n===t?a:e)}function b(e,t){return Math.min(Math.max(e,0),t)}function x(e,t,n,r){let i=o(e,t);i&&a(e,i,(i.flows??[]).flatMap(e=>{if(e.id!==n)return[e];let t=r(e);return t?[t]:[]}))}function S(e,t,n,i){let s=o(e,t);if(!s)return;let c=s.flows??[],l=r(c);e.history.withTransaction(()=>{a(e,s,[...c.map(e=>e.id===n?{...e,steps:e.steps.map((e,t)=>t===i?{...e,branches:[...e.branches??[],l.id]}:e)}:e),l])}),e.store.getState().setFlowEdit({frameId:t,flowId:l.id})}function C(e,t,n){let{flowEdit:r,flowPlay:i,flowPreview:a,setFlowEdit:s,setFlowPlay:c,setFlowPreview:l}=e.store.getState();if(x(e,t,n,()=>null),i?.flowId===n&&c(null),a?.flowId===n&&l(null),r?.flowId!==n)return;let u=o(e,t)?.flows?.[0];s(u?{frameId:t,flowId:u.id}:null)}function w(e,t,n){let r=e.store.getState();r.setFlowPlay(null),r.setFlowEdit({frameId:t,flowId:n})}function T(e,t){let n=e.slot;return n==null||n>=t?t:Math.max(n,0)}function E(e,t){return T(e,t)<t}function D(e,t){let n=e.selected;return n==null||n<0||n>=t?null:n}function O(e,t){let n=D(e,t);if(n!==null)return n;let r=T(e,t)-1;return r>=0?r:null}function k(e,t,n){return{selected:t,slot:E(e,n)?t+1:null,picking:null}}function A(e,t){let n=e=>e==null?null:e>t?e-1:e;return{selected:e.selected===t?null:n(e.selected),slot:n(e.slot),hovered:null,picking:null}}function j(e,t,n){let r=e=>e==null?e:e===t?n:t<e&&e<=n?e-1:n<=e&&e<t?e+1:e,i={};return e.selected!==null&&e.selected!==void 0&&(i.selected=r(e.selected)),e.picking!==null&&e.picking!==void 0&&(i.picking=r(e.picking)),i}function M(e,t,n){let r=o(e,t),a=r?.flows?.find(e=>e.id===n);if(!r||!a)return null;let s=e.store.getState().shapes;return u(a,i(s,r)).steps}function N(e,t,n,r){let i=M(e,t,n);if(!i)return!1;let a=r(i);return a===i?!1:(x(e,t,n,e=>({...e,steps:a})),!0)}function P(e,t,n){let r=e.store.getState().flowEdit;return r&&r.frameId===t&&r.flowId===n?r:null}function F(e,t,n,r){P(e,t,n)&&e.store.getState().patchFlowEdit(r)}function I(e,t,n,r){let i=M(e,t,n);if(!i)return;let a=P(e,t,n)??{},o=T(a,i.length),s=e.store.getState().shapes,l={target:r.id,title:c(s,r)};N(e,t,n,e=>h(e,o,l))&&F(e,t,n,k(a,o,i.length))}function L(e,t,n,r){let i=M(e,t,n);if(!i)return;let a=O(P(e,t,n)??{},i.length);a!==null&&(N(e,t,n,e=>y(e,a,r.id)),F(e,t,n,{selected:a}))}function R(e,t,n,r,i){let a=M(e,t,n),o=a?.[r];if(!a||!o){F(e,t,n,{picking:null});return}let s=e.store.getState().shapes,l=s.find(e=>e.id===o.target),u=l&&o.title===c(s,l)?c(s,i):void 0;N(e,t,n,e=>v(e,r,i.id,u)),F(e,t,n,{picking:null,selected:r})}function z(e,t,n,r){let i=P(e,t,n);N(e,t,n,e=>_(e,r))&&i&&F(e,t,n,A(i,r))}function B(e,t,n,r,i){let a=P(e,t,n);N(e,t,n,e=>g(e,r,i))&&a&&F(e,t,n,j(a,r,i))}function V(e,t,n,r,i){N(e,t,n,e=>e.map((e,t)=>t===r?H({...e,...i}):e))}function H(e){let t={...e};return t.text||delete t.text,(!t.kind||t.kind===`call`)&&delete t.kind,t.payload||delete t.payload,t.also?.length||delete t.also,t.branches?.length||delete t.branches,t.fails||delete t.fails,t}function U(e,t,n){let r=new Map;return t.forEach((i,a)=>{let o=a===0?n:t[a-1];if(!o)return;let c=p(e,s(o),s(i));c&&r.set(a,c)}),r}function W(e,t){return e.ends.map(e=>t.get(e.shapeId)??`the box`).join(` and `)}function G(t,n){let r=t.store.getState(),i=r.shapes.find(e=>e.id===n.arrow.id);if(i?.type!==`arrow`)return;let a={};for(let t of n.ends){let n=r.shapes.find(e=>e.id===t.shapeId);n&&(t.end===`start`?a.startBinding=e(n,{x:i.x,y:i.y}):a.endBinding=e(n,{x:i.x2,y:i.y2}))}Object.keys(a).length>0&&r.updateShape(i.id,a)}function K(e){let t=new Map,n=new Map,r=[];for(let i of e){let a=l(e,i.id);a?(t.set(a.flow.id,[...t.get(a.flow.id)??[],i]),n.set(i.id,{flowId:a.flow.id,index:a.index})):r.push(i)}let i=[],a=new Set,o=(e,r)=>{if(!a.has(e.id)){a.add(e.id),i.push({flow:e,depth:r,origin:r>0?n.get(e.id)??null:null});for(let n of t.get(e.id)??[])o(n,r+1)}};return r.forEach(e=>o(e,0)),e.forEach(e=>o(e,0)),i}function q(e){return K(e).filter(e=>e.depth===0).map(e=>e.flow)}export{C as _,U as a,d as b,L as c,R as d,E as f,S as g,T as h,W as i,B as l,D as m,q as n,I as o,O as p,G as r,V as s,K as t,z as u,w as v,x as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{n as t,t as n}from"./jsx-runtime-2Zwg-L3c.js";import{Dn as r,En as i,Mn as a,Nn as o,Q as s,Tn as c,U as l,_t as u,bt as d,gn as f,ht as p,jn as m,mn as h,vt as g,xt as _}from"./useScrollLock-B7mQdXyv.js";import{t as v}from"./useButton-D3eS7fh5.js";import{n as y}from"./config-a_lz-57R.js";import{t as b}from"./createReactComponent-9UsI5fmM.js";import{n as x,t as ee}from"./useValueChanged-p8z-93L4.js";import{n as S,r as C,t as te}from"./useControlled-C5xhvPXX.js";import{a as w,c as ne,i as T,l as E,o as D,r as O,s as re}from"./billing-C-BNGM3Z.js";import{t as ie}from"./IconLoader2-BQaF1LKo.js";import{t as k}from"./IconPencil-C5Y-Y4dC.js";import{t as ae}from"./IconPhoto-CR36IK-b.js";import{t as A}from"./IconSparkles-WDcg8BA9.js";import{t as oe}from"./IconUsers-Bwnyj4mm.js";import{t as j}from"./IconX-AlbPkO_g.js";import{t as M}from"./useBaseUiId-C0Zm5sUV.js";import{n as N}from"./surface-Dke4SWpE.js";import{i as P,n as F,r as I,t as L}from"./DialogRoot-mHGRFW9m.js";import{n as se,t as R}from"./DialogTitle-CFhr-gP9.js";import{t as z}from"./DialogDescription-ZtZCUsfy.js";import{n as B}from"./dialog-B32krrce.js";var V=b(`outline`,`infinity`,`Infinity`,[[`path`,{d:`M9.828 9.172a4 4 0 1 0 0 5.656a10 10 0 0 0 2.172 -2.828a10 10 0 0 1 2.172 -2.828a4 4 0 1 1 0 5.656a10 10 0 0 1 -2.172 -2.828a10 10 0 0 0 -2.172 -2.828`,key:`svg-0`}]]),H=e(t(),1),U=H.createContext(void 0);function W(){let e=H.useContext(U);if(e===void 0)throw Error(m(63));return e}var G=function(e){return e.disabled=`data-disabled`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.filled=`data-filled`,e.focused=`data-focused`,e}({}),K={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},q={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},J={disabled:!1,...q},ce={valid(e){return e===null?null:e?{[G.valid]:``}:{[G.invalid]:``}}},Y=function(e){return e.checked=`data-checked`,e.unchecked=`data-unchecked`,e.disabled=`data-disabled`,e.readonly=`data-readonly`,e.required=`data-required`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.filled=`data-filled`,e.focused=`data-focused`,e}({}),le={...ce,checked(e){return e?{[Y.checked]:``}:{[Y.unchecked]:``}}},ue={invalid:void 0,name:void 0,validityData:{state:K,errors:[],error:``,value:``,initialValue:null},setValidityData:i,disabled:void 0,touched:q.touched,setTouched:i,dirty:q.dirty,setDirty:i,filled:q.filled,setFilled:i,focused:q.focused,setFocused:i,validate:()=>null,validationMode:`onSubmit`,validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:J,markedDirtyRef:{current:!1},registerFieldControl:i,validation:{getValidationProps:(e,t=c)=>t,inputRef:{current:null},registerInput:i,commit:async()=>{},change:i}},de=H.createContext(ue);function X(e=!0){let t=H.useContext(de);if(t.setValidityData===i&&!e)throw Error(m(28));return t}function fe(e,t,n,r,i=!0,o){let{registerFieldControl:s}=X(),c=H.useRef(null);c.current||=Symbol(),a(()=>{let a=c.current;if(!(!a||!i))return s(a,{controlRef:e,getValue:r,id:t,name:o,value:n}),()=>{s(a,void 0)}},[e,i,r,t,o,s,n])}var pe=H.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:i,validationMode:`onSubmit`,submitAttemptedRef:{current:!1}});function me(){return H.useContext(pe)}var he=H.createContext({controlId:void 0,registerControlId:i,labelId:void 0,setLabelId:i,messageIds:[],setMessageIds:i,getDescriptionProps:e=>e});function ge(){return H.useContext(he)}function _e(e,t,n,r=!0,i){let[o,s]=H.useState(),c=M(i?`${i}-label`:void 0),l=e??t??o;return a(()=>{let i=e||t||!r?void 0:Z(n.current,c);o!==i&&s(i)}),l}function Z(e,t){let n=ve(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function ve(e){if(!e)return;let t=e.parentElement;if(t&&t.tagName===`LABEL`)return t;let n=e.id;if(n){let t=e.nextElementSibling;if(t&&t.htmlFor===n)return t}let r=e.labels;return r&&r[0]}function ye(e={}){let{id:t,implicit:n=!1,controlRef:s}=e,{controlId:c,registerControlId:l}=ge(),u=M(t),d=n?c:void 0,p=o(()=>Symbol(`labelable-control`)),m=H.useRef(!1),h=H.useRef(t!=null),g=r(()=>{!m.current||l===i||(m.current=!1,l(p.current,void 0))});return a(()=>{if(l===i)return;let e;if(n){let n=s?.current;e=f(n)&&n.closest(`label`)!=null?t??null:d??u}else if(t!=null)h.current=!0,e=t;else if(h.current)e=u;else{g();return}if(e===void 0){g();return}m.current=!0,l(p.current,e)},[t,s,d,l,n,u,p,g]),H.useEffect(()=>g,[g]),c??u}var Q=n(),be=H.forwardRef(function(e,t){let{checked:n,className:r,defaultChecked:i,"aria-labelledby":o,form:f,id:m,inputRef:y,name:b,nativeButton:x=!1,onCheckedChange:S,readOnly:C=!1,required:w=!1,disabled:ne=!1,render:T,uncheckedValue:E,value:D,style:O,...re}=e,{clearErrors:ie}=me(),{state:k,setTouched:ae,setDirty:A,validityData:oe,setFilled:j,setFocused:N,validationMode:P,disabled:F,name:I,validation:L}=X(),{labelId:se}=ge(),R=F||ne,z=I??b,B=H.useRef(null),V=g(B,y,L.inputRef),W=H.useRef(null),G=M(),K=ye({id:m,implicit:!1,controlRef:W}),q=x?void 0:K,[J,ce]=te({controlled:n,default:!!i,name:`Switch`,state:`checked`});fe(W,G,J,void 0,!R,b),a(()=>{B.current&&j(B.current.checked)},[B,j]),ee(J,()=>{ie(z),A(J!==oe.initialValue),j(J),L.change(J)});let{getButtonProps:Y,buttonRef:ue}=v({disabled:R,native:x}),de=_e(o,se,B,!x,q),pe={id:x?K:G,role:`switch`,"aria-checked":J,"aria-readonly":C||void 0,"aria-required":w||void 0,"aria-labelledby":de,onFocus(){R||N(!0)},onBlur(){let e=B.current;!e||R||(ae(!0),N(!1),P===`onBlur`&&L.commit(e.checked))},onClick(e){if(C||R)return;e.preventDefault();let t=B.current;t&&t.dispatchEvent(new(h(t)).PointerEvent(`click`,{bubbles:!0,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey}))}},he=u({checked:J,disabled:R,form:f,id:q,name:z,required:w,style:z?_:d,tabIndex:-1,type:`checkbox`,"aria-hidden":!0,ref:V,onChange(e){if(e.nativeEvent.defaultPrevented)return;if(C){e.preventDefault();return}let t=e.currentTarget.checked,n=l(s,e.nativeEvent);S?.(t,n),!n.isCanceled&&ce(t)},onFocus(){W.current?.focus()}},e=>L.getValidationProps(R,e),D===void 0?c:{value:D}),Z=H.useMemo(()=>({...k,checked:J,disabled:R,readOnly:C,required:w}),[k,J,R,C,w]),ve=p(`span`,e,{state:Z,ref:[t,W,ue],props:[pe,re,Y,e=>L.getValidationProps(R,e)],stateAttributesMapping:le});return(0,Q.jsxs)(U.Provider,{value:Z,children:[ve,!J&&z&&E!==void 0&&(0,Q.jsx)(`input`,{type:`hidden`,form:f,name:z,value:E,disabled:R}),(0,Q.jsx)(`input`,{...he,suppressHydrationWarning:!0})]})}),xe=H.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e;return p(`span`,e,{state:W(),ref:t,stateAttributesMapping:le,props:a})});function Se(e){let{testId:t,sellable:n,currentLabel:r,busy:i,busyLabel:a,ctaLabel:o,chargeLine:s,holdChargeLine:c,error:l,secondaryLabel:u,onSecondary:d,leadWithSecondary:f,onSubmit:p}=e,m=f&&u!=null&&d!=null;return(0,Q.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[m?(0,Q.jsx)(`button`,{type:`button`,onClick:d,"data-testid":`${t}-secondary`,className:`flex h-10 cursor-pointer items-center justify-center gap-2 rounded-xl bg-[var(--chrome-accent)] px-4 text-[14px] text-white outline-none transition-colors active:scale-[0.97] hover:bg-[var(--chrome-accent-hover)]`,children:u}):n?(0,Q.jsxs)(`button`,{type:`button`,onClick:p,disabled:i,"data-testid":`${t}-accept`,className:`flex h-10 cursor-pointer items-center justify-center gap-2 rounded-xl bg-[var(--chrome-accent)] px-4 text-[14px] text-white outline-none transition-colors active:scale-[0.97] hover:bg-[var(--chrome-accent-hover)] disabled:cursor-default disabled:opacity-60 disabled:active:scale-100`,children:[i&&(0,Q.jsx)(ie,{size:15,stroke:2.5,className:`animate-spin`}),i?a:o]}):(0,Q.jsx)(`button`,{type:`button`,disabled:!0,"data-testid":`${t}-current`,className:`flex h-10 items-center justify-center rounded-xl px-4 text-[13.5px] text-[var(--chrome-fg-400)] ring-1 ring-[var(--chrome-ring)]`,children:r}),(n||c)&&(0,Q.jsx)(`span`,{"data-testid":`${t}-charge`,className:`text-center text-[11.5px] text-[var(--chrome-fg-400)]`,children:n?s:`\xA0`}),l&&(0,Q.jsx)(`p`,{"data-testid":`${t}-error`,className:`text-[12px] text-[var(--chrome-danger)]`,children:l}),!m&&u&&d&&(0,Q.jsx)(`button`,{type:`button`,disabled:i,onClick:d,"data-testid":`${t}-secondary`,className:`cursor-pointer text-[12.5px] text-[var(--chrome-fg-500)] underline underline-offset-2 outline-none transition-colors hover:text-[var(--chrome-fg-800)] disabled:cursor-default disabled:opacity-60`,children:u})]})}var Ce=[`free`,`pro`];function $(e){return e===`lifetime`?`total`:`a month`}function we(e){return e==null?`Unlimited canvases`:`${e} canvas${e===1?``:`es`}`}function Te(e){return e==null?V:S}var Ee={free:`Everything you need to draw, diagram, and export.`,pro:`The full assistant, unlimited canvases, and your team.`};function De(e){return[{icon:A,title:`${e.messages.limit} AI credits ${$(e.messages.period)}`,detail:`One credit per assistant turn, to try it out.`},{icon:Te(e.canvasLimit),title:we(e.canvasLimit),detail:`Saved to your account and synced across devices.`},{icon:k,title:`Every drawing tool`,detail:`Shapes, connectors, diagrams, slides, and frames.`},{icon:C,title:`Export anywhere`,detail:`PNG, SVG, and PDF, with the fonts embedded.`}]}function Oe(e){let t=[{icon:A,title:`${e.messages.limit} AI credits ${$(e.messages.period)}`,detail:`Ask the assistant to draw, rewrite, and rearrange.`}];return e.images.limit>0&&t.push({icon:ae,title:`${e.images.limit} generated images ${$(e.images.period)}`,detail:`Drop generated art straight onto the canvas.`}),t.push({icon:Te(e.canvasLimit),title:we(e.canvasLimit),detail:`Keep every project, never clear one to start another.`}),e.folders&&t.push({icon:E,title:`Organize with folders`,detail:`Group client work, projects, and ideas.`}),t.push({icon:oe,title:`Invite your team`,detail:`Add seats at the same price per member.`}),t}function ke(e){return e===`free`?De(w.free):[{icon:x,title:`Everything in Free`,detail:`Every tool and export, unchanged.`},...Oe(w.pro)]}function Ae(){return[`${T.messages} AI credits and ${T.images} generated images`,`Pooled across the workspace, for everyone in it`,`Stacks on your allowance, spent only after it`,`Expires ${T.expiryDays} days after purchase`,`A one-time purchase, nothing renews`]}function je(e,t){return e===`pro`?t===`yearly`?`pro-yearly`:`pro-monthly`:null}var Me=Math.round(D.yearly.amountCents/D.monthly.amountCents),Ne=`flex w-full cursor-pointer items-center gap-3 rounded-lg px-3.5 py-3 text-left outline-none transition-colors disabled:cursor-default`;function Pe(e){let{choice:t,hidden:n,testId:r}=e;return(0,Q.jsxs)(`div`,{"data-testid":`${r}-detail-${t}`,className:`col-start-1 row-start-1 flex flex-col gap-4 ${n?`invisible max-sm:hidden`:``}`,children:[(0,Q.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,Q.jsxs)(`span`,{className:`flex items-center gap-1.5 text-[16px] text-[var(--chrome-fg-900)]`,children:[t===`pro`&&(0,Q.jsx)(A,{size:15,stroke:1.75,className:`text-[var(--chrome-fg-500)]`}),w[t].label]}),(0,Q.jsx)(`p`,{className:`text-[12.5px] leading-relaxed text-[var(--chrome-fg-500)]`,children:Ee[t]})]}),(0,Q.jsx)(`span`,{className:`text-[10.5px] uppercase tracking-wider text-[var(--chrome-fg-400)]`,children:`What's included`}),(0,Q.jsx)(`ul`,{className:`flex flex-col gap-3.5`,children:ke(t).map(e=>{let t=e.icon;return(0,Q.jsxs)(`li`,{className:`flex gap-2.5`,children:[(0,Q.jsx)(t,{size:16,stroke:1.75,className:`mt-0.5 shrink-0 text-[var(--chrome-fg-600)]`}),(0,Q.jsxs)(`span`,{className:`flex flex-col gap-0.5`,children:[(0,Q.jsx)(`span`,{className:`text-[13px] leading-snug text-[var(--chrome-fg-900)]`,children:e.title}),(0,Q.jsx)(`span`,{className:`text-[12px] leading-relaxed text-[var(--chrome-fg-500)]`,children:e.detail})]})]},e.title)})})]})}function Fe(e){let{choice:t,testId:n}=e;return(0,Q.jsx)(`div`,{className:`grid bg-[var(--chrome-rest)] p-7 ring-1 ring-[var(--chrome-ring)]`,children:Ce.map(e=>(0,Q.jsx)(Pe,{choice:e,hidden:e!==t,testId:n},e))})}function Ie(e){let{testId:t,selected:n,current:r,disabled:i,label:a,price:o,suffix:s,onSelect:c}=e;return(0,Q.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":n,disabled:i,"data-testid":t,onClick:c,className:`${Ne} ${n?`bg-[var(--chrome-rest)] ring-2 ring-[var(--chrome-fg-900)]`:`ring-1 ring-[var(--chrome-ring)] hover:bg-[var(--chrome-hover)]`}`,children:[(0,Q.jsx)(`span`,{className:`h-2.5 w-2.5 shrink-0 rounded-full ${n?`bg-[var(--chrome-fg-900)]`:`bg-[var(--chrome-fg-300)]`}`}),(0,Q.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,Q.jsx)(`span`,{className:`truncate text-[14px] text-[var(--chrome-fg-900)]`,children:a}),r&&(0,Q.jsx)(`span`,{className:`shrink-0 rounded-full bg-[var(--chrome-active)] px-2 py-0.5 text-[11px] text-[var(--chrome-fg-800)]`,children:`Current`})]}),(0,Q.jsxs)(`span`,{className:`ml-auto shrink-0 text-[12px] text-[var(--chrome-fg-500)]`,children:[(0,Q.jsx)(`span`,{className:`text-[15px] tabular-nums text-[var(--chrome-fg-900)]`,children:o}),` `,s]})]})}function Le(e){let{open:t,onOpenChange:n,initialChoice:r,topUp:i,onCheckout:a,onPurchased:o}=e,[s,c]=(0,H.useState)(r),[l,u]=(0,H.useState)(`yearly`),[d,f]=(0,H.useState)(null),[p,m]=(0,H.useState)(null),[h,g]=(0,H.useState)(null),_=(0,H.useRef)(!1);(0,H.useEffect)(()=>{t&&(c(r),u(`yearly`),f(null),m(null),g(null),_.current=!1)},[t,r]);let v=i?`credits`:je(s,l);async function y(){if(!(!a||v==null||_.current)){_.current=!0,m(null),f(`opening`);try{await a(v,f)===`purchased`&&g(v)}catch(e){m(B(e,`We couldn't start your checkout. Please try again.`))}finally{_.current=!1,f(null)}}}function b(){let e=h;n(!1),e!=null&&o?.(e)}return{choice:s,setChoice:c,billingInterval:l,setBillingInterval:u,phase:d,busy:d!=null,error:p,done:h,submit:y,close:b}}function Re(e){let{testId:t,done:n,onContinue:r}=e;return(0,Q.jsxs)(`div`,{"data-testid":`${t}-success`,className:`flex flex-col items-start gap-4 p-8`,children:[(0,Q.jsx)(`span`,{className:`flex h-9 w-9 items-center justify-center rounded-full bg-[var(--chrome-accent)] text-white`,children:(0,Q.jsx)(x,{size:18,stroke:2.5})}),(0,Q.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Q.jsx)(R,{className:`text-[20px] leading-tight text-[var(--chrome-fg-900)]`,children:n===`credits`?`Credits added`:`You're on ${w.pro.label}`}),(0,Q.jsx)(z,{className:`text-[13.5px] leading-relaxed text-[var(--chrome-fg-500)]`,children:n===`credits`?`${T.messages} AI credits and ${T.images} images are on your account.`:`Everything is unlocked: ${w.pro.messages.limit} AI credits a month, unlimited canvases, folders, and your team.`})]}),(0,Q.jsx)(`button`,{type:`button`,onClick:r,"data-testid":`${t}-continue`,className:`mt-1 flex h-10 cursor-pointer items-center justify-center rounded-xl bg-[var(--chrome-accent)] px-5 text-[14px] text-white outline-none transition-colors active:scale-[0.97] hover:bg-[var(--chrome-accent-hover)]`,children:`Continue`})]})}function ze(e){let{testId:t,reassurance:n,packPrice:r,canSell:i,footer:a}=e;return(0,Q.jsxs)(`div`,{"data-testid":`${t}-topup`,className:`flex flex-col gap-5 p-8`,children:[(0,Q.jsxs)(`div`,{className:`flex flex-col gap-2 pr-8`,children:[(0,Q.jsx)(`span`,{className:`flex h-9 w-9 items-center justify-center rounded-full bg-[var(--chrome-rest)] text-[var(--chrome-fg-700)] ring-1 ring-[var(--chrome-ring)]`,children:(0,Q.jsx)(A,{size:18,stroke:1.75})}),(0,Q.jsx)(R,{className:`text-[20px] leading-tight text-[var(--chrome-fg-900)]`,children:`Top up your credits`}),(0,Q.jsx)(z,{className:`text-[13.5px] leading-relaxed text-[var(--chrome-fg-500)]`,children:`You're on ${w.pro.label}, the highest plan, so there's nothing to upgrade. A one-time pack keeps you going now, and your allowance still renews as usual.`})]}),n&&(0,Q.jsx)(`p`,{"data-testid":`${t}-reassurance`,className:`rounded-lg bg-[var(--chrome-rest)] px-3.5 py-2.5 text-[12.5px] leading-relaxed text-[var(--chrome-fg-700)] ring-1 ring-[var(--chrome-ring)]`,children:n}),(0,Q.jsxs)(`div`,{className:`flex flex-col gap-3 rounded-xl bg-[var(--chrome-rest)] p-4 ring-1 ring-[var(--chrome-ring)]`,children:[(0,Q.jsxs)(`div`,{className:`flex items-baseline justify-between`,children:[(0,Q.jsx)(`span`,{className:`text-[15px] text-[var(--chrome-fg-900)]`,children:`Credit pack`}),(0,Q.jsxs)(`span`,{className:`text-[12px] text-[var(--chrome-fg-500)]`,children:[(0,Q.jsx)(`span`,{className:`text-[18px] tabular-nums text-[var(--chrome-fg-900)]`,children:r}),` `,`one-time`]})]}),(0,Q.jsx)(`ul`,{className:`flex flex-col gap-1.5`,children:Ae().map(e=>(0,Q.jsxs)(`li`,{className:`flex items-start gap-2 text-[13px] leading-snug text-[var(--chrome-fg-700)]`,children:[(0,Q.jsx)(x,{size:14,stroke:2,className:`mt-0.5 shrink-0 text-[var(--chrome-fg-500)]`}),e]},e))})]}),(0,Q.jsx)(Se,{...a,sellable:i,currentLabel:`You're on ${w.pro.label}`,holdChargeLine:!1})]})}function Be(e){let{testId:t,title:n,description:r,reassurance:i,currentPlan:a,choice:o,onChoose:s,billingInterval:c,setBillingInterval:l,busy:u,canSell:d,footer:f}=e,p=c===`yearly`,m=o===a,h=O(ne().cents,`usd`),g=O(D.monthly.amountCents,`usd`),_=O(re(),`usd`),v=p?_:g,y=m?`Your current plan`:`Upgrade unavailable`;return(0,Q.jsxs)(`div`,{className:`grid grid-cols-1 overflow-y-auto sm:grid-cols-2`,children:[(0,Q.jsxs)(`div`,{className:`flex flex-col gap-5 p-7`,children:[(0,Q.jsxs)(`div`,{className:`flex flex-col gap-2 pr-8`,children:[(0,Q.jsx)(R,{className:`text-[20px] leading-tight text-[var(--chrome-fg-900)]`,children:n}),(0,Q.jsx)(z,{className:`text-[13.5px] leading-relaxed text-[var(--chrome-fg-500)]`,children:r})]}),i&&(0,Q.jsx)(`p`,{"data-testid":`${t}-reassurance`,className:`rounded-lg bg-[var(--chrome-rest)] px-3.5 py-2.5 text-[12.5px] leading-relaxed text-[var(--chrome-fg-700)] ring-1 ring-[var(--chrome-ring)]`,children:i}),(0,Q.jsxs)(`div`,{role:`radiogroup`,"aria-label":`Choose a plan`,className:`flex flex-col gap-2`,children:[(0,Q.jsx)(Ie,{testId:`upgrade-choice-free`,selected:o===`free`,current:a===`free`,disabled:u,label:w.free.label,price:O(0,`usd`),suffix:`/ month`,onSelect:()=>s(`free`)}),(0,Q.jsx)(Ie,{testId:`upgrade-choice-pro`,selected:o===`pro`,current:!1,disabled:u,label:w.pro.label,price:v,suffix:`/ month`,onSelect:()=>s(`pro`)})]}),(0,Q.jsxs)(`div`,{className:`mt-auto flex flex-col gap-3`,children:[(0,Q.jsxs)(`div`,{"data-testid":`${t}-yearly-box`,className:`mt-8 flex flex-col gap-1.5 rounded-lg border border-dashed border-[var(--chrome-ring)] px-3.5 py-3 ${o===`pro`?``:`invisible max-sm:hidden`}`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,Q.jsxs)(`label`,{htmlFor:`${t}-yearly`,className:`cursor-pointer text-[13.5px] text-[var(--chrome-fg-900)]`,children:[`Save `,h,` with yearly billing`]}),(0,Q.jsx)(be,{id:`${t}-yearly`,checked:p,disabled:u,onCheckedChange:e=>l(e?`yearly`:`monthly`),"data-testid":`billing-interval-yearly`,className:`relative h-[22px] w-[38px] shrink-0 cursor-pointer rounded-full outline-none transition-colors disabled:cursor-default disabled:opacity-60 ${p?`bg-[var(--chrome-accent)]`:`bg-[var(--chrome-fg-400)]`}`,children:(0,Q.jsx)(xe,{className:`absolute left-[2px] top-[2px] block h-[18px] w-[18px] rounded-full bg-white shadow-sm transition-transform data-[checked]:translate-x-[16px]`})})]}),(0,Q.jsx)(`span`,{className:`text-[12.5px] leading-relaxed text-[var(--chrome-fg-500)]`,children:`Pay for ${Me} months, get 12. That's ${_}/month instead of ${g}/month.`})]}),(0,Q.jsx)(Se,{...f,sellable:!m&&d,currentLabel:y,holdChargeLine:!0})]})]}),(0,Q.jsx)(Fe,{choice:o,testId:t})]})}function Ve(e){let{open:t,onOpenChange:n,currentPlan:r,title:i,description:a,reassurance:o,onCheckout:s,onPurchased:c,secondaryLabel:l,onSecondary:u,testId:d=`upgrade-dialog`}=e,f=r===`pro`,p=Le({open:t,onOpenChange:n,initialChoice:e.initialChoice??`pro`,topUp:f,onCheckout:s,onPurchased:c}),{busy:m,close:h}=p,g=O(T.price*100,`usd`),_=f?`${g} billed once. No subscription.`:p.billingInterval===`yearly`?`${O(D.yearly.amountCents,`usd`)} billed today, then every year. Cancel anytime.`:`${O(D.monthly.amountCents,`usd`)} billed today, then every month. Cancel anytime.`,v=p.phase===`settling`?`Finishing up…`:p.phase===`checkout`?`Complete your payment…`:`Opening…`,y=u&&(()=>{h(),u()}),b={testId:d,busy:m,busyLabel:v,ctaLabel:f?`Buy credit pack`:`Upgrade to Pro`,chargeLine:_,error:p.error,secondaryLabel:l,onSecondary:y,leadWithSecondary:s==null,onSubmit:()=>void p.submit()};return(0,Q.jsx)(L,{open:t,onOpenChange:e=>{if(!(m&&!e)){if(e){n(!0);return}h()}},children:(0,Q.jsxs)(F,{children:[(0,Q.jsx)(P,{className:N.dialogBackdrop}),(0,Q.jsxs)(I,{"data-overlay":!0,"data-testid":d,className:`flex max-h-[92vh] flex-col overflow-hidden ${p.done||f?`w-[min(440px,92vw)]`:`w-[min(780px,94vw)]`} ${N.dialogPopup}`,children:[(0,Q.jsx)(se,{"aria-label":`Close`,disabled:m,className:`absolute right-3 top-3 z-10 flex h-7 w-7 items-center justify-center rounded-md text-[var(--chrome-fg-400)] outline-none transition-colors hover:bg-[var(--chrome-divider)] hover:text-[var(--chrome-fg-600)] disabled:opacity-40 disabled:hover:bg-transparent`,children:(0,Q.jsx)(j,{size:16,stroke:1.75})}),p.done?(0,Q.jsx)(Re,{testId:d,done:p.done,onContinue:h}):f?(0,Q.jsx)(ze,{testId:d,reassurance:o,packPrice:g,canSell:s!=null,footer:b}):(0,Q.jsx)(Be,{testId:d,title:i,description:a,reassurance:o,currentPlan:r,choice:p.choice,onChoose:p.setChoice,billingInterval:p.billingInterval,setBillingInterval:p.setBillingInterval,busy:m,canSell:s!=null,footer:b})]})]})})}function He(e){let{open:t,onOpenChange:n,currentPlan:r,reassurance:i,onPurchased:a,secondaryLabel:o,onSecondary:s,testId:c}=e,{state:l,startCheckout:u}=y(),d=l.status===`authenticated`&&l.canManageBilling===!1,f=l.status===`authenticated`&&l.canManageBilling!==!1;return(0,Q.jsx)(Ve,{open:t,onOpenChange:n,currentPlan:r,title:e.title??`Get more from the assistant`,description:e.description??`Move to Pro for a monthly credit allowance, image generation, and unlimited canvases.`,reassurance:i??(d?`Only an owner of this workspace can change its plan or buy credits. Ask an owner to upgrade it.`:void 0),onCheckout:f?u:void 0,onPurchased:a,secondaryLabel:o,onSecondary:s,testId:c??`upgrade-dialog`})}export{He as UpgradeDialog};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{n as t}from"./jsx-runtime-2Zwg-L3c.js";import{t as n}from"./createReactComponent-9UsI5fmM.js";var r=n(`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`}]]),i=n(`outline`,`row-insert-bottom`,`RowInsertBottom`,[[`path`,{d:`M20 6v4a1 1 0 0 1 -1 1h-14a1 1 0 0 1 -1 -1v-4a1 1 0 0 1 1 -1h14a1 1 0 0 1 1 1`,key:`svg-0`}],[`path`,{d:`M12 15l0 4`,key:`svg-1`}],[`path`,{d:`M14 17l-4 0`,key:`svg-2`}]]),a=n(`outline`,`row-insert-top`,`RowInsertTop`,[[`path`,{d:`M4 18v-4a1 1 0 0 1 1 -1h14a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-14a1 1 0 0 1 -1 -1`,key:`svg-0`}],[`path`,{d:`M12 9v-4`,key:`svg-1`}],[`path`,{d:`M10 7l4 0`,key:`svg-2`}]]),o=e(t(),1),s=5,c=48,l=16;function u(e,t,n){let r=e[0]-e[t],i=e[e.length-1]-e[t];return Math.max(r,Math.min(i,n))}function d(e,t,n){let r=e[t]+n;if(r<=e[0])return 0;for(let t=0;t<e.length;t+=1)if(r<e[t])return t;return e.length}function f(e,t){return e.gap===null?0:t<e.index&&e.gap<=t?e.lift:t>e.index&&e.gap>t?-e.lift:0}function p(e){let{count:t,gap:n,disabled:r,onReorder:i,onPress:a,canDrag:p}=e,[m,h]=(0,o.useState)(null),g=(0,o.useRef)(null),_=(0,o.useRef)([]),v=(0,o.useRef)(0);(0,o.useEffect)(()=>{if(!m?.dragging)return;let e=0,t=()=>{e=requestAnimationFrame(t);let n=g.current;if(!n)return;let r=n.getBoundingClientRect(),i=v.current,a=0;if(i<r.top+c?a=-Math.min(l,Math.ceil((r.top+c-i)/4)):i>r.bottom-c&&(a=Math.min(l,Math.ceil((i-(r.bottom-c))/4))),a===0)return;let o=n.scrollTop;n.scrollTop=o+a,n.scrollTop!==o&&h(e=>{if(!e?.dragging)return e;let t=v.current-e.startY+(n.scrollTop-e.startScroll),r=u(e.homes,e.index,t);return{...e,dy:r,gap:d(e.homes,e.index,r)}})};return e=requestAnimationFrame(t),()=>cancelAnimationFrame(e)},[m?.dragging]);let y=(0,o.useCallback)(e=>t=>{_.current[e]=t},[]);function b(e,r){if(e.button!==0||p?.(r)===!1)return;let i=g.current;if(!i)return;e.stopPropagation(),e.currentTarget.setPointerCapture(e.pointerId),v.current=e.clientY;let a=i.getBoundingClientRect().top-i.scrollTop,o=_.current.slice(0,t).map(e=>{if(!e)return 1/0;let t=e.getBoundingClientRect();return t.top-a+t.height/2}),s=_.current[r]?.getBoundingClientRect().height??0;h({index:r,startY:e.clientY,startScroll:i.scrollTop,dy:0,dragging:!1,gap:null,homes:o,lift:s+n})}function x(e){if(!m)return;v.current=e.clientY;let t=g.current?.scrollTop??m.startScroll,n=e.clientY-m.startY+(t-m.startScroll),i=!r&&(m.dragging||Math.abs(n)>s),a=u(m.homes,m.index,n);h({...m,dy:a,dragging:i,gap:i?d(m.homes,m.index,a):null})}function S(e){if(!m)return;let{index:t,dragging:n,gap:r}=m;if(h(null),!n){a?.(t);return}if(r===null)return;let o=r>t?r-1:r;o!==t&&(e.stopPropagation(),i(t,o))}function C(e){return{onPointerDown:t=>b(t,e),onPointerMove:x,onPointerUp:S,onPointerCancel:()=>h(null)}}function w(e){if(m?.dragging&&m.index===e)return{transform:`translateY(${m.dy}px)`,zIndex:10,opacity:.7};if(m?.dragging)return{transform:`translateY(${f(m,e)}px)`,transition:`transform 150ms ease`}}return{listRef:g,setItemRef:y,rowHandlers:C,rowStyle:w,dragging:!!m?.dragging,cancel:()=>h(null)}}export{r as i,a as n,i as r,p as t};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/export-ChP0k5F5.js","assets/slides-D9bnXqtf.js","assets/style-BENGW2ZV.js","assets/preload-helper-Czpn1I53.js","assets/blob-CTPsKWYv.js","assets/theme-palette-D1nbDFBC.js","assets/clipboard-CO7YHov7.js","assets/export-DEFKKRRi.js","assets/registry-DCgwH8wI.js","assets/text-breaks-YU-ymaF9.js","assets/icon-sources-CZI1h18s.js","assets/chart-Z4HQx-0h.js","assets/frames-CRP8oPP8.js","assets/connector-labels-vVnYQJRz.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{n as t}from"./jsx-runtime-2Zwg-L3c.js";import{r as n}from"./toast-Nu_fiCd9.js";import{a as r,s as i}from"./editor-B0tARd79.js";import{n as a}from"./renderer-environment-DmWXvuT4.js";import{t as o}from"./preload-helper-Czpn1I53.js";import{r as s}from"./lazy-module-DkWvu4va.js";import{t as c}from"./clipboard-CO7YHov7.js";var l=e(t(),1),u=()=>o(()=>import(`./export-ChP0k5F5.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]));function d(e){return s(u).then(t=>t.createBrowserExport(e))}function f(e){return e===`copyPng`||e===`copySvg`}function p(e){return e===0?null:e===1?`One shape made in a newer version of Koboyo is not in this export. It is still saved on the canvas.`:`${e} shapes made in a newer version of Koboyo are not in this export. They are still saved on the canvas.`}function m(e,t){let n=p(t);if(!f(e))return n;let r=e===`copyPng`?`Copied as PNG`:`Copied as SVG`;return n?`${r}. ${n}`:r}function h(e){return f(e)?`Couldn't copy, try again`:`Couldn't export, try again`}function g(e){return f(e)?`Nothing to copy yet`:`Nothing to export yet`}function _(){let e=i(),t=r(),o=a(),{notify:s}=n();return(0,l.useCallback)((n,r,i)=>{if(r.length===0)return s(g(n)),Promise.resolve(!1);let a=e.getState().opaqueShapes.length,l={measurement:t.measurement,...i?.options};return d(o).then(e=>n===`copyPng`||n===`copySvg`?e[n](r,l):n===`downloadPdf`?e.downloadSlidesPdf(r,l,i?.filename):e[n](r,l,i?.filename)).then(()=>{let e=m(n,a);return e&&s(e),!0}).catch(t=>t instanceof c&&t.image?(e.getState().setImageToCopy(t.image),!0):(s(h(n)),!1))},[e,t,o,s])}export{_ as t};
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{n as t,t as n}from"./jsx-runtime-2Zwg-L3c.js";import{t as r}from"./icons-DzW1j-r3.js";import{a as i,r as a}from"./asset-glyph-B3c--Mx2.js";var o=e(t(),1),s=n();function c(e){let[t,n]=(0,o.useState)(()=>({name:e,node:r().cachedNode(e)??null}));return(0,o.useEffect)(()=>{let t=r().cachedNode(e);if(t!==void 0){n(n=>n.name===e&&n.node===t?n:{name:e,node:t});return}let i=!0,a,o=(t,s)=>{r().loadNode(e).then(t=>{i&&n({name:e,node:t})}).catch(()=>{i&&t>0&&(a=setTimeout(()=>o(t-1,s*2),s))})};return o(4,2500),()=>{i=!1,a!==void 0&&clearTimeout(a)}},[e]),t.name===e?t.node:r().cachedNode(e)??null}function l(e){return e.map(([e,t],n)=>{let{key:r,...i}=t;return(0,o.createElement)(e,{key:n,...i})})}var u={fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`};function d(e){let{node:t,size:n=24,strokeWidth:r=2}=e;return(0,s.jsx)(`svg`,{width:n,height:n,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:r,...u,children:l(t)})}function f(e){let{node:t,at:n,size:r,stroke:i,strokeWidth:a=2,...o}=e,c=r/24;return(0,s.jsx)(`g`,{transform:`translate(${n.x} ${n.y}) scale(${c})`,stroke:i,strokeWidth:c>0?a/c:a,...u,...o,children:l(t)})}function p(e,t){let n=`${e}/${t}`,[r,s]=(0,o.useState)(()=>({key:n,glyph:a(e,t)??null}));return(0,o.useEffect)(()=>{let r=a(e,t);if(r!==void 0){s(e=>e.key===n&&e.glyph===r?e:{key:n,glyph:r});return}let o=!0;return i(e,t).then(e=>{o&&s({key:n,glyph:e})}),()=>{o=!1}},[n,e,t]),r.key===n?r.glyph:a(e,t)??null}export{c as i,d as n,p as r,f as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{n as t}from"./jsx-runtime-2Zwg-L3c.js";import{t as n}from"./storage-CvDRYh5V.js";var r=e(t(),1);function i(e,t,n,r){let i=r(t);return[t,...e.filter(e=>r(e)!==i)].slice(0,n)}function a(e,t){let r=n.getJSON(e,[]);return t(Array.isArray(r)?r:[])}function o(e,t,o){let s=o?.keyOf??(e=>String(e)),c=o?.sanitize??(e=>e),[l,u]=(0,r.useState)(()=>a(e,c));function d(r){let a=i(l,r,t,s);u(a),n.setJSON(e,a)}return{recent:l,remember:d}}export{o as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{n as t}from"./jsx-runtime-2Zwg-L3c.js";import{Mn as n,in as r,jn as i,t as a}from"./useScrollLock-B7mQdXyv.js";var o=e(t(),1),s=o.createContext(void 0);function c(e){let t=o.useContext(s);if(t===void 0&&!e)throw Error(i(69));return t}var l=20;function u(e,t,i,s){let[c,u]=o.useState(!1);n(()=>{if(!e||!t||i==null){u(!1);return}let n=r(i).documentElement.clientWidth,a=i.offsetWidth;u(n>0&&a>0&&a>=n-l)},[e,t,i]),a(e&&(!t||c),s)}export{c as n,u as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{it as e}from"./useScrollLock-B7mQdXyv.js";function t(t){return e(t,`base-ui`)}export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{n as t}from"./jsx-runtime-2Zwg-L3c.js";import{Dn as n,Mn as r,_n as i,_t as a,gt as o,jn as s}from"./useScrollLock-B7mQdXyv.js";var c=e(t(),1),l=c.createContext(void 0);function u(e=!1){let t=c.useContext(l);if(t===void 0&&!e)throw Error(s(16));return t}function d(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:c.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function f(e={}){let{disabled:t=!1,focusableWhenDisabled:i,tabIndex:s=0,native:l=!0,composite:f}=e,h=c.useRef(null),g=u(!0),_=f??g!==void 0,{props:v}=d({focusableWhenDisabled:i,disabled:t,composite:_,tabIndex:s,isNativeButton:l}),y=c.useCallback(()=>{let e=h.current;p(e)&&_&&t&&v.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,v.disabled,_]);return r(y,[y]),{getButtonProps:c.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:i,onKeyDown:s,onPointerDown:c,...u}=e;return a({onClick(e){if(t){e.preventDefault();return}n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(o(e),s?.(e),e.baseUIHandlerPrevented))return;let r=e.target===e.currentTarget,i=e.currentTarget,a=p(i),c=!l&&m(i),u=r&&(l?a:!c),d=e.key===`Enter`,f=e.key===` `,h=i.getAttribute(`role`),g=h?.startsWith(`menuitem`)||h===`option`||h===`gridcell`;if(r&&_&&f){if(e.defaultPrevented&&g)return;e.preventDefault(),c||l&&a?(i.click(),e.preventBaseUIHandler()):u&&(n?.(e),e.preventBaseUIHandler());return}u&&(!l&&(f||d)&&e.preventDefault(),!l&&d&&n?.(e))},onKeyUp(e){if(!t){if(o(e),i?.(e),e.target===e.currentTarget&&l&&_&&p(e.currentTarget)&&e.key===` `){e.preventDefault();return}e.baseUIHandlerPrevented||e.target===e.currentTarget&&!l&&!_&&e.key===` `&&n?.(e)}},onPointerDown(e){if(t){e.preventDefault();return}c?.(e)}},l?{type:`button`}:{role:`button`},v,u)},[t,v,_,l]),buttonRef:n(e=>{h.current=e,y()})}}function p(e){return i(e)&&e.tagName===`BUTTON`}function m(e){return!!(e?.tagName===`A`&&e?.href)}export{u as n,f as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{n as t}from"./jsx-runtime-2Zwg-L3c.js";import{t as n}from"./createReactComponent-9UsI5fmM.js";var r=n(`outline`,`download`,`Download`,[[`path`,{d:`M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2`,key:`svg-0`}],[`path`,{d:`M7 11l5 5l5 -5`,key:`svg-1`}],[`path`,{d:`M12 4l0 12`,key:`svg-2`}]]),i=n(`outline`,`layout-grid`,`LayoutGrid`,[[`path`,{d:`M4 5a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -4`,key:`svg-0`}],[`path`,{d:`M14 5a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -4`,key:`svg-1`}],[`path`,{d:`M4 15a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -4`,key:`svg-2`}],[`path`,{d:`M14 15a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -4`,key:`svg-3`}]]),a=e(t(),1);function o({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=a.useRef(e!==void 0),[o,s]=a.useState(t);return[i?e:o,a.useCallback(e=>{i||s(e)},[])]}export{i as n,r,o as t};
|