@fungi.computer/prints 0.20.0 → 0.20.2

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.
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./print-download-button-BNNi_aoW.js","./rolldown-runtime-hePW80VL.js","./button-oE2Hrd5D.js","./modules-C4mfDnjH.js","./dist-DAokFn5x.js","./log-event-B3BGsDWO.js","./useMutation-DH-cbXIA.js","./computer-Bfe-Ioxr.js","./ellipsis-DlNHenkt.js","./dropdown-menu-CAHLGfkb.js","./useTriggerFocusGuards-Bddw7Qdn.js","./keycap-D2RkH2IS.js"])))=>i.map(i=>d[i]);
2
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{C as t,Vn as n,bn as r,dn as i,sn as a,wn as o,x as s,yn as c}from"./button-oE2Hrd5D.js";import{jt as l}from"./dist-DAokFn5x.js";import{o as u,t as d,u as f}from"./log-event-B3BGsDWO.js";import{i as p,t as m}from"./query-CYqgVHJ7.js";import{t as h}from"./useMutation-DH-cbXIA.js";import{D as g,G as _,H as v,O as y,T as b,W as x,a as S,i as C,l as ee,o as w,r as T,s as E,t as te}from"./audio-waveform-xSq1S4ms.js";import{$ as D,C as ne,J as O,Q as k,X as A,Z as re,g as ie,it as j,l as ae,m as oe,nt as se,r as M,rt as ce,s as le,tt as ue,v as N}from"./generation-quote-QXeME8FS.js";import{f as de,m as P,p as fe,u as F}from"./textarea-DUwcxEMN.js";import{a as pe,o as me}from"./status-DNJRO5m5.js";import{n as he,t as ge}from"./heart-BquDo4lf.js";import{t as _e}from"./images-CQ3EhUoY.js";import{n as ve,t as I}from"./keycap-D2RkH2IS.js";var ye=s(`CircleDollarSign`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8`,key:`1h4pet`}],[`path`,{d:`M12 18V6`,key:`zqpxq5`}]]),be=s(`Clapperboard`,[[`path`,{d:`M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3Z`,key:`1tn4o7`}],[`path`,{d:`m6.2 5.3 3.1 3.9`,key:`iuk76l`}],[`path`,{d:`m12.4 3.4 3.1 4`,key:`6hsd6n`}],[`path`,{d:`M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z`,key:`ltgou9`}]]),xe=s(`Copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),Se=s(`Eraser`,[[`path`,{d:`m7 21-4.3-4.3c-1-1-1-2.5 0-3.4l9.6-9.6c1-1 2.5-1 3.4 0l5.6 5.6c1 1 1 2.5 0 3.4L13 21`,key:`182aya`}],[`path`,{d:`M22 21H7`,key:`t4ddhn`}],[`path`,{d:`m5 11 9 9`,key:`1mo9qw`}]]),Ce=s(`Link`,[[`path`,{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`,key:`1cjeqo`}],[`path`,{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`,key:`19qd67`}]]),we=s(`MessageSquareText`,[[`path`,{d:`M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z`,key:`1lielz`}],[`path`,{d:`M13 8H7`,key:`14i4kc`}],[`path`,{d:`M17 12H7`,key:`16if0g`}]]),Te=s(`Palette`,[[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`path`,{d:`M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z`,key:`12rzf8`}]]),Ee=s(`Ruler`,[[`path`,{d:`M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z`,key:`icamh8`}],[`path`,{d:`m14.5 12.5 2-2`,key:`inckbg`}],[`path`,{d:`m11.5 9.5 2-2`,key:`fmmyf7`}],[`path`,{d:`m8.5 6.5 2-2`,key:`vc6u1g`}],[`path`,{d:`m17.5 15.5 2-2`,key:`wo5hmg`}]]),De=s(`Shuffle`,[[`path`,{d:`M2 18h1.4c1.3 0 2.5-.6 3.3-1.7l6.1-8.6c.7-1.1 2-1.7 3.3-1.7H22`,key:`1wmou1`}],[`path`,{d:`m18 2 4 4-4 4`,key:`pucp1d`}],[`path`,{d:`M2 6h1.9c1.5 0 2.9.9 3.6 2.2`,key:`10bdb2`}],[`path`,{d:`M22 18h-5.9c-1.3 0-2.6-.7-3.3-1.8l-.5-.8`,key:`vgxac0`}],[`path`,{d:`m18 14 4 4-4 4`,key:`10pe0f`}]]),Oe=s(`Users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`path`,{d:`M16 3.13a4 4 0 0 1 0 7.75`,key:`1da9ce`}]]),ke=s(`WandSparkles`,[[`path`,{d:`m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72`,key:`ul74o6`}],[`path`,{d:`m14 7 3 3`,key:`1r5n42`}],[`path`,{d:`M5 6v4`,key:`ilb8ba`}],[`path`,{d:`M19 14v4`,key:`blhpug`}],[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M7 8H3`,key:`zfb6yr`}],[`path`,{d:`M21 16h-4`,key:`1cnmox`}],[`path`,{d:`M11 3H9`,key:`1obp7u`}]]),L=t(),R={coral:`var(--stipe-art-coral, #ff6558)`,blue:`var(--stipe-art-blue, #43a6f2)`,mint:`var(--stipe-art-mint, #63cfaa)`,grape:`var(--stipe-art-grape, #a66cc1)`,yellow:`var(--stipe-art-yellow, #ffd05d)`,cream:`var(--stipe-art-cream, #fff4de)`,ink:`var(--stipe-art-ink, #242c28)`,graphite:`var(--stipe-art-graphite, #49423f)`,inkcap:`var(--stipe-art-inkcap, #80499d)`},z=`light-dark(var(--stipe-sketch-ink, #242c28), var(--stipe-art-cream, #fff4de))`,Ae=`var(--color-base-100, light-dark(#fff4de, #242c28))`;function B({transform:e,fill:t=z}){return(0,L.jsx)(`path`,{transform:e,style:{fill:t},d:`M-1.264-9.479C-2.098-8.643-1.802-1.057-.907-.332.47.782 1.6-.446 1.618-3.075 1.623-3.888 1.691-5.398 1.77-6.429 1.979-9.202 1.596-10 .055-10-.588-10-.843-9.9-1.264-9.479Z`})}function je(){return(0,L.jsxs)(`g`,{children:[(0,L.jsx)(B,{transform:`translate(25.4 19.8) rotate(-39) scale(.95 .76)`}),(0,L.jsx)(B,{transform:`translate(32.1 17.8) scale(.96 .95)`}),(0,L.jsx)(B,{transform:`translate(38.8 19.9) rotate(39) scale(.95 .77)`})]})}function Me(){return(0,L.jsxs)(`g`,{style:{fill:R.blue},children:[(0,L.jsx)(`path`,{d:`M10.574 .604C9.804 1.375 9.867-.885 9.961 22.81 10.054 47.202 9.722 45.378 14.193 45.94 25.813 47.399 38.465 52.211 44.662 57.532 47.653 60.097 48.082 59.411 47.967 52.242L47.734 19.335C47.734 17.523 47.13 16.616 45.964 15.076 40.604 8.018 30.127 2.767 16.804 .462 13.045-.184 11.326-.148 10.574 .604Z`}),(0,L.jsx)(`path`,{d:`M81.571 .746C71.063 2.665 62.221 6.713 56.562 12.199 54.242 14.45 52 17.356 52.115 19.335L52.033 52.628C51.927 59.934 51.979 59.994 55.74 57.091 62.423 51.931 71.272 48.541 84.103 46.221 90.625 45.039 89.967 47.631 90.145 22.432 90.326-3.079 91.148-1 81.571 .746Z`}),(0,L.jsx)(`path`,{d:`M1.906 12.692C.1 13.42 .151 12.804 .151 33.825 .151 54.097 .163 54.302 1.447 55.498 2.71 56.674 3.384 56.81 7.937 56.816 20.943 56.834 30.647 58.293 38.776 61.45 45.964 64.242 46.435 61.924 39.526 57.773 32.296 53.429 26.656 51.544 14.943 49.553 5.958 48.027 6.535 49.414 6.408 29.003 6.32 14.74 6.263 13.103 5.816 12.764 5.254 12.335 2.9 12.293 1.906 12.692Z`}),(0,L.jsx)(`path`,{d:`M94.326 12.858C93.656 13.326 93.656 13.326 93.653 28.492 93.653 48.882 93.997 48.063 84.743 49.556 73.574 51.36 64.45 54.695 57.801 59.405 54.082 62.039 55.384 63.864 59.722 62.1 68.897 58.372 76.363 57.115 90.03 56.994 100.405 56.903 99.489 58.976 99.773 34.976 100.018 14.142 100.006 13.958 98.399 12.979 97.236 12.269 95.251 12.208 94.326 12.858Z`})]})}function V(){return(0,L.jsxs)(`g`,{children:[(0,L.jsx)(`path`,{style:{fill:R.cream},d:`M-8.572-25.123C-21.412-23.39-33.235-17.39-44.235-7.027-51.235-.433-51.251 .358-44.524 6.749-20.77 29.316 10.23 31.893 36.364 13.487 41.043 10.187 48.193 3.551 49.235 1.524 50.358-.642 49.471-2.102 43.738-7.497 29.257-21.128 9.968-27.631-8.572-25.123Z`}),(0,L.jsx)(`path`,{style:{fill:R.ink},d:`M-6.225-16.807C-17.727-13.267-21.176 4.433-12.08 13.257-1.118 23.898 16.829 16.102 17.032 .604 17.209-12.412 6.219-20.642-6.225-16.807Z`})]})}function Ne(){return(0,L.jsxs)(`g`,{children:[(0,L.jsx)(`path`,{style:{fill:R.mint},d:`M540 342C520 340 497 355 477 374C450 399 440 421 456 444C465 458 480 462 492 464C503 466 500 477 494 486C487 500 508 496 522 478L530 468C557 468 578 464 591 451C601 442 599 429 585 427C572 425 556 432 547 418C538 403 550 390 568 385C579 382 589 380 584 368C576 352 557 341 540 342Z`}),(0,L.jsx)(`path`,{style:{fill:R.coral},d:`M589 396C614 380 659 381 683 392C709 404 721 428 710 451C704 464 693 472 685 479C680 487 684 498 689 503C695 514 684 513 675 507C667 502 662 497 657 491C637 496 610 495 594 486C584 480 583 469 595 464C607 460 622 454 622 441C622 428 612 423 597 420C580 417 578 407 589 396Z`})]})}function H({fill:e}){return(0,L.jsx)(`path`,{style:{fill:e},d:`M44.648 .288C26.645 1.615 13.263 8.266 5.942 19.529-4.299 35.277-.917 57.684 13.224 67.784 16.958 70.452 16.936 71.742 13.064 77.665 11.28 80.391 10.895 81.565 11.341 82.914 13.163 88.435 25.022 86.396 36.307 78.62L38.681 76.986 41.294 77.335C45.371 77.878 59.645 77.789 64.125 77.191 89.213 73.837 100.562 61.427 99.92 38.044 99.18 11.1 79.587-2.285 44.648 .288Z`})}function U({onFigure:e=!1}){return(0,L.jsxs)(`g`,{style:{fill:e?Ae:R.ink},children:[(0,L.jsx)(`rect`,{x:`-15`,y:`-11`,width:`10`,height:`22`,rx:`5`}),(0,L.jsx)(`rect`,{x:`5`,y:`-11`,width:`10`,height:`22`,rx:`5`})]})}function Pe(){return(0,L.jsx)(`path`,{style:{fill:R.cream},d:`M18.125 .621C.039 1.574-2.575 4.791 2.264 20.133 17.454 68.284 77.345 69.396 96.119 21.875 100.749 10.154 100.318 4.348 94.605 1.513 91.981 .21 37.878-.421 18.125 .621Z`})}function Fe(){return(0,L.jsxs)(`g`,{children:[(0,L.jsx)(`path`,{style:{fill:R.yellow},d:`M31.42 5.279C29.108 5.983 28.068 6.993 25.817 10.732 24.033 13.687 24.027 13.762 25.58 14.265 30.375 15.821 36.711 20.506 39.938 24.885 42.077 27.788 41.835 27.806 45.281 24.463 48.633 21.213 49.164 20.185 48.982 17.325 48.812 14.643 48.174 13.872 42.68 9.741 36.737 5.273 34.439 4.361 31.42 5.279Z`}),(0,L.jsx)(`path`,{style:{fill:R.yellow},d:`M22.538 16.207C22.093 16.652 19.732 20.231 13.309 30.196 10.737 34.188 10.723 33.911 13.589 35.351 16.461 36.798 19.778 39.28 21.825 41.523L22.6 42.37Q23.34 43.186 24.05 42.538L24.711 41.933C31.278 35.937 38.928 28.484 38.928 28.083 38.928 24.656 24.521 14.219 22.538 16.207Z`}),(0,L.jsx)(`path`,{style:{fill:R.cream},d:`M8.89 38.053C8.203 39.566 6.598 44.473 6.598 45.056 6.598 45.137 6.887 45.125 7.236 45.036 9.655 44.404 13.526 47.475 13.526 50.027 13.526 51.132 13.361 51.164 16.187 49.49 21.421 46.387 21.966 45.665 20.575 43.659 19.002 41.387 14.975 38.238 11.909 36.881 9.799 35.949 9.854 35.926 8.89 38.053Z`}),(0,L.jsx)(`path`,{style:{fill:R.graphite},d:`M6.598 45.056C5.732 46.866 5.155 49.464 6.309 50.907 8.041 53.505 10.928 52.639 13.526 50.907 13.526 48.021 9.978 44.404 7.236 45.036Z`})]})}function Ie(){return(0,L.jsx)(`path`,{style:{fill:R.coral},d:`M40.804 40.625C38.238 41.462 37.291 41.953 31.169 45.625 15.743 54.871 8.047 56.158 5.879 49.856 5.501 48.754 5.501 48.754 4.843 50.913 1.673 61.302 12.377 61.671 30.386 51.796 39.649 46.719 41.142 46.647 40.81 51.291 40.565 54.775 41.168 56.135 43.486 57.31 49.556 60.387 62.035 54.816 59.605 50.116 58.502 47.983 56.1 47.882 52.163 49.799 47.082 52.273 45.983 51.652 47.998 47.449 50.89 41.416 47.686 38.376 40.804 40.625Z`})}function W({transform:e}){return(0,L.jsx)(`path`,{style:{fill:R.mint},transform:e,d:`M0 0C3 -2 5 -5 5 -8 5 -10.5 3 -12 0 -12S-5 -10.5 -5 -8C-5 -5 -3 -2 0 0Z`})}function Le(){return(0,L.jsxs)(`g`,{children:[(0,L.jsx)(`path`,{fillRule:`evenodd`,style:{fill:z},d:`M25.3 17.69C14.8 19.34 10.66 20.18 9.05 20.99 5.51 22.78 4.2 27.21 6.71 28.9 7.47 29.42 8.48 29.4 10.25 28.84 12.41 28.15 12.56 27.57 11.02 25.85 10 24.71 10.53 23.62 11.79 24.27 13.9 25.36 15.02 28.98 15.63 36.66 16.18 43.48 17.33 47.43 19.69 50.49 22.76 54.48 27.69 55.73 30.31 53.19 33 50.57 31.24 46.04 28.44 48.38 26.29 50.17 26.16 47.08 28.3 45.14 29.61 43.95 30.78 43.58 38.92 41.75 39.45 41.63 39.41 41.52 38.39 40.01 36.87 37.78 36.04 35.22 34.72 28.69 33.37 22 32.04 19.3 29.5 18.07 28.69 17.68 26.59 17.49 25.3 17.69M24.11 26.51C18.61 27.67 18.16 27.82 17.98 28.55 17.64 29.91 18.54 30.44 20.51 30.05 25.4 29.08 30.11 28.03 30.49 27.83 31.65 27.23 31 25.33 29.66 25.4 29.5 25.4 27 25.91 24.11 26.51M29.2 31.42C28.64 31.54 26.23 32.07 23.85 32.58 20.01 33.41 19.48 33.57 19.15 33.96 18.67 34.5 18.66 35.05 19.12 35.63 19.61 36.26 19.86 36.23 26.05 34.88 29.05 34.23 31.53 33.7 31.57 33.7 31.82 33.7 32.34 32.88 32.34 32.5 32.34 31.25 31.37 30.92 29.2 31.42M29.79 37.19C28.81 37.41 26.45 37.94 24.53 38.37 22.62 38.8 20.84 39.23 20.58 39.33 19.61 39.71 19.35 40.62 19.98 41.41 20.48 42.05 21 41.99 27.59 40.5 33.85 39.09 34.21 38.91 33.45 37.44 33.02 36.61 32.51 36.58 29.79 37.19M45.41 41.95C44.89 42.09 41.61 42.89 38.12 43.73 30.94 45.45 29.81 45.84 31.05 46.15 33.2 46.69 34.11 50.18 32.77 52.76 32.23 53.79 32.23 54.03 32.76 54.16 33.34 54.31 45.35 51.3 46.72 50.67 50.19 49.06 51.76 45.01 49.79 42.76 48.8 41.64 47.46 41.39 45.41 41.95`}),(0,L.jsx)(`path`,{style:{fill:R.grape},d:`M48.21 10.15C47.92 10.41 47.5 11.27 46.96 12.74 45.52 16.61 45.24 16.99 43.01 18.15 39.18 20.15 39.05 20.99 42.28 22.73 45.37 24.39 45.68 24.79 47.12 28.95 48.3 32.32 49.28 32.2 50.65 28.52 52.23 24.25 52.26 24.22 55.2 22.56 57.53 21.24 57.79 21 57.79 20.16 57.79 19.49 57.55 19.31 55.01 18.06 52.16 16.66 52.2 16.72 50.31 11.56 49.7 9.89 49.03 9.44 48.21 10.15M32.59 13.92C31.78 14.73 32.28 15.89 33.58 16.22 35.07 16.6 36.19 17.1 37.17 17.84 38.42 18.77 39.23 18.86 39.79 18.15 39.99 17.9 40.15 17.53 40.15 17.32 40.15 15.29 33.99 12.52 32.59 13.92M42.48 34.38C40.96 35.96 40.65 36.88 41.39 37.57 42.2 38.33 43.36 37.74 44.55 35.95 45.2 34.97 45.22 34.35 44.62 33.88 43.89 33.31 43.41 33.42 42.48 34.38`}),(0,L.jsx)(`path`,{style:{fill:R.yellow},d:`M40.75 25.96C39.69 27.07 38.11 30.69 38.11 31.98 38.11 32.66 38.55 33.19 39.12 33.19 39.8 33.19 40.24 32.73 40.58 31.66 40.95 30.46 41.65 29.09 42.42 28.01 43.77 26.14 42.29 24.32 40.75 25.96M54.85 27.67C54.71 27.81 54.47 28.32 54.31 28.82 53.67 30.76 53.19 31.37 51.67 32.13 50.25 32.85 50.34 33.36 52.04 34.21 53.25 34.82 53.57 35.23 54.24 37.01 54.98 38.98 55.47 39.08 56.03 37.37 56.7 35.32 57.08 34.81 58.64 33.87 60.18 32.95 60.14 32.65 58.38 31.78 57.02 31.11 56.68 30.66 56.02 28.65 55.69 27.64 55.25 27.27 54.85 27.67`})]})}function Re(){return(0,L.jsxs)(`g`,{children:[(0,L.jsx)(`path`,{fillRule:`evenodd`,style:{fill:z},d:`M42.24 14.07C41.52 14.24 40.53 14.54 35.06 16.26 33.33 16.8 31.2 17.47 30.34 17.74 29.47 18.01 27.86 18.52 26.75 18.88 25.64 19.23 24.03 19.74 23.16 20.01 20.16 20.94 19.45 21.4 18.97 22.71 18.71 23.44 18.45 26.33 17.83 35.41 17.64 38.25 17.44 41.03 17.41 41.58 17.32 42.77 17.24 42.69 18.79 42.84L20.01 42.95 21.98 39.97C24.69 35.88 24.85 35.82 27.05 37.9 27.9 38.7 28.43 39.08 28.61 39.02 28.76 38.96 28.91 38.91 28.94 38.91 28.98 38.91 29.38 38.38 29.84 37.73 30.3 37.08 31.47 35.48 32.43 34.17 33.4 32.86 34.86 30.85 35.67 29.71 36.49 28.56 37.5 27.29 37.91 26.88 39.73 25.07 41.01 26.43 43.32 32.67 43.76 33.84 44.3 35.28 44.52 35.86 44.74 36.44 44.97 37.28 45.04 37.74 45.19 38.71 45.17 38.71 46.63 38.03 47.69 37.53 47.77 37.46 47.68 37.02 47.58 36.52 46.97 30.64 46.79 28.41 46.73 27.69 46.62 26.43 46.53 25.61 46.44 24.79 46.24 22.87 46.09 21.32 45.61 16.44 45.5 15.66 45.22 15.12 44.72 14.15 43.59 13.76 42.24 14.07M29.38 22.45C26.04 23.47 24.49 27.62 26.6 29.91 29.17 32.7 34.15 30.16 34.16 26.05 34.16 23.38 31.9 21.68 29.38 22.45M46.7 41.5C39.3 44.23 28.33 46.04 20.1 45.88L17.21 45.82 17.16 46.88C17.08 48.22 17.33 49.03 18.01 49.68 18.73 50.37 19.73 50.35 23.77 49.53 25.46 49.19 29.12 48.47 31.91 47.93 46.31 45.14 46.9 44.99 47.57 43.91 47.95 43.3 48.25 41.29 47.99 41.15 47.91 41.11 47.33 41.26 46.7 41.5`}),(0,L.jsx)(`path`,{style:{fill:R.coral},d:`M29.72 22.45C25.84 23.34 24.28 28.36 27.25 30.42 29.34 31.88 32.91 30.43 33.83 27.75 34.92 24.55 32.75 21.76 29.72 22.45`}),(0,L.jsx)(`path`,{style:{fill:R.mint},d:`M12.96 14.29C12.87 14.41 12.7 15.03 12.58 15.68 12.37 16.82 11.59 18.26 11.18 18.26 11.08 18.26 10.88 18.46 10.72 18.7 10.36 19.25 10.59 19.58 11.45 19.74 12.18 19.88 13.08 20.63 13.54 21.49 14.23 22.76 14.75 22.53 15.15 20.79 15.39 19.71 15.51 19.51 16.4 18.66 17.54 17.58 17.51 17.36 16.18 16.85 15.16 16.47 14.84 16.19 14.14 15.1 13.56 14.2 13.22 13.96 12.96 14.29M49.04 24.13C48.56 24.86 48.91 25.31 50.59 26.09 53.89 27.64 54.85 29.82 53.45 32.6 52.01 35.43 46.84 38.54 40.51 40.39 39.73 40.62 38.88 40.89 38.62 40.99 37.24 41.52 30.85 42.64 27.54 42.93 20.72 43.52 13.63 42.49 10.57 40.46 5.81 37.3 7.51 32.32 14.74 28.24 15.84 27.61 16.17 27.1 15.9 26.4 15.66 25.78 15.35 25.84 13.19 26.94 6 30.61 2.97 35.32 4.95 39.74 7.86 46.21 22.78 47.8 40.05 43.46 51.97 40.47 58.57 36.38 59.47 31.43 60.09 27.97 57.74 25.34 52.93 24.12 50.6 23.53 49.43 23.54 49.04 24.13`}),(0,L.jsx)(`path`,{style:{fill:R.grape},d:`M34.82 8.91C33.48 10.04 34.21 12.14 35.94 12.14 37.29 12.14 38.18 10.99 37.77 9.77 37.36 8.53 35.81 8.08 34.82 8.91M53.15 43.16C53 43.28 52.74 43.86 52.57 44.45 52.18 45.78 51.76 46.32 50.64 46.93 49.52 47.53 49.45 47.89 50.33 48.34 51.34 48.85 52.24 49.95 52.56 51.04 53.13 53.01 53.6 53 54.21 50.99 54.61 49.69 55.13 48.93 55.91 48.54 57.17 47.91 57.23 47.51 56.15 46.96 55.23 46.49 54.67 45.76 54.23 44.44 53.8 43.15 53.54 42.84 53.15 43.16M24.18 53.18C22.45 53.9 22.87 56.59 24.71 56.59 26.79 56.59 27.2 53.67 25.2 53.09 24.89 53.01 24.51 53.04 24.18 53.18`}),(0,L.jsx)(`path`,{style:{fill:R.yellow},d:`M51.76 11.04C51.21 12.77 50.56 13.61 49.24 14.34 48.6 14.69 48.72 15.07 49.59 15.48 50.54 15.93 51.11 16.69 51.62 18.22 52.06 19.57 52.26 19.54 52.79 18.08 53.29 16.69 53.87 15.91 54.86 15.31 55.76 14.77 55.77 14.48 54.92 14.02 53.91 13.46 53.5 12.99 52.89 11.66 52.23 10.21 52.06 10.12 51.76 11.04M11.06 48.22C10.99 48.35 10.71 48.88 10.46 49.41 9.95 50.48 9.45 50.99 8.59 51.33 7.89 51.61 7.85 52.1 8.52 52.37 9.51 52.79 10.3 53.85 10.89 55.58 11.09 56.18 11.48 55.88 11.87 54.84 12.24 53.87 13.33 52.56 13.79 52.56 14 52.56 14.5 52.06 14.5 51.85 14.5 51.77 14.19 51.54 13.81 51.34 12.98 50.92 12.36 50.14 11.93 48.99 11.6 48.09 11.31 47.83 11.06 48.22`})]})}function ze(){return(0,L.jsxs)(`g`,{transform:`translate(2 8) scale(.114) translate(-125 -122)`,children:[(0,L.jsx)(`path`,{style:{fill:R.coral},d:`M278 155 482 123C517 117 527 135 530 167L542 309Q543 329 561 341L631 404Q649 419 646 444 645 465 623 472L407 521Q374 531 345 519L156 436Q115 418 128 375L221 191Q238 163 278 155Z`}),(0,L.jsx)(`path`,{style:{fill:R.ink},d:`M317 183 461 161Q493 155 497 188L504 288Q508 320 478 326L318 356Q289 362 286 331L281 226Q278 194 317 183Z`}),(0,L.jsx)(`path`,{style:{fill:R.cream},d:`M304 386 553 340Q562 337 570 346L631 404Q649 419 646 444Q645 448 629 452L411 483Q382 492 367 474Z`}),(0,L.jsxs)(`g`,{style:{fill:R.cream},children:[(0,L.jsx)(`rect`,{x:`319`,y:`236`,width:`26`,height:`59`,rx:`13`}),(0,L.jsx)(`rect`,{x:`364`,y:`229`,width:`26`,height:`59`,rx:`13`})]}),(0,L.jsxs)(`g`,{style:{fill:R.ink},transform:`rotate(-11 470 411)`,children:[(0,L.jsx)(`rect`,{x:`369`,y:`380`,width:`61`,height:`25`,rx:`13`}),(0,L.jsx)(`rect`,{x:`444`,y:`380`,width:`61`,height:`25`,rx:`13`}),(0,L.jsx)(`rect`,{x:`518`,y:`380`,width:`57`,height:`25`,rx:`13`}),(0,L.jsx)(`rect`,{x:`392`,y:`421`,width:`58`,height:`25`,rx:`13`}),(0,L.jsx)(`rect`,{x:`462`,y:`421`,width:`65`,height:`25`,rx:`13`}),(0,L.jsx)(`rect`,{x:`539`,y:`421`,width:`58`,height:`25`,rx:`13`})]})]})}function Be(){return(0,L.jsxs)(`g`,{transform:`translate(3 10) scale(.114) translate(-760 -140)`,children:[(0,L.jsx)(`path`,{style:{fill:R.blue},d:`M1226 153C1257 153 1273 195 1267 231Q1263 265 1237 268L1176 270V215C1176 178 1195 153 1226 153Z`}),(0,L.jsx)(`path`,{style:{fill:R.blue},d:`M824 376Q908 372 871 400C842 427 866 442 902 450L1113 480Q1188 479 1199 392C1207 447 1204 497 1163 511Q1134 521 1097 516C1055 510 991 507 957 507S869 511 826 512C781 513 758 483 760 441Q760 385 824 376Z`}),(0,L.jsx)(`path`,{style:{fill:R.cream},d:`M824 376 857 184Q864 133 911 141C1039 169 1124 151 1226 153Q1179 159 1184 241L1199 377C1202 434 1174 482 1117 480L902 450C864 445 849 429 871 400Q908 372 824 376Z`}),(0,L.jsxs)(`g`,{style:{fill:R.coral},children:[(0,L.jsx)(`path`,{d:`M982 198C1008 190 1030 197 1028 220L1023 265Q1020 295 1000 279C981 261 951 223 963 210Q970 202 982 198Z`}),(0,L.jsx)(`path`,{d:`M1063 220C1077 215 1100 237 1102 251Q1107 267 1084 282L1063 295Q1037 307 1040 278L1045 245Q1049 224 1063 220Z`}),(0,L.jsx)(`path`,{d:`M911 252C925 240 939 254 957 269L978 291Q995 311 961 316C938 318 907 316 898 308Q884 296 911 252Z`}),(0,L.jsx)(`path`,{d:`M1106 289Q1127 281 1134 304C1142 327 1146 352 1125 350Q1097 348 1073 335C1051 324 1072 311 1084 302Z`}),(0,L.jsx)(`path`,{d:`M927 338C946 334 972 334 985 343Q1004 353 984 384C970 408 957 418 940 403C922 389 896 356 913 345Z`}),(0,L.jsx)(`path`,{d:`M1010 375Q1025 363 1037 384C1049 407 1064 438 1044 442Q1025 448 1002 436C984 428 991 410 997 393Z`}),(0,L.jsx)(`path`,{d:`M1068 357C1084 359 1110 376 1120 389Q1130 402 1107 419C1090 432 1082 418 1073 401C1062 383 1043 355 1068 357Z`}),(0,L.jsx)(`path`,{d:`M1018 311C1037 312 1050 334 1034 343C1018 351 998 337 1005 320Q1009 311 1018 311Z`})]})]})}function Ve(){return(0,L.jsxs)(`g`,{transform:`translate(2 7) scale(.11) translate(-1380 -96)`,children:[(0,L.jsx)(`path`,{style:{fill:R.inkcap},d:`M1384 276C1394 238 1445 200 1497 158C1547 119 1604 97 1647 97C1690 97 1720 109 1745 138C1772 170 1791 184 1833 194C1870 201 1919 220 1922 257C1923 307 1891 339 1853 336C1801 335 1767 299 1701 294C1666 291 1620 294 1642 303Q1670 307 1675 333C1681 367 1697 389 1717 413C1735 434 1738 443 1719 464C1700 485 1692 502 1686 520Q1682 541 1653 541L1626 541Q1598 541 1594 519C1590 495 1578 474 1563 458C1545 440 1544 429 1559 410C1585 377 1608 337 1572 326C1554 320 1529 333 1506 340C1461 356 1428 357 1402 340Q1371 319 1384 276Z`}),(0,L.jsx)(`path`,{style:{fill:R.cream},d:`M1634 362Q1641 346 1649 362C1660 390 1676 404 1705 424Q1721 435 1704 453C1685 475 1677 490 1671 513Q1670 526 1653 525L1626 525Q1611 525 1610 513C1606 492 1592 465 1575 449Q1562 437 1577 424C1604 404 1620 390 1634 362Z`}),(0,L.jsx)(`path`,{style:{fill:R.inkcap},d:`M1634 456A18 18 0 1 1 1648 456V492Q1648 500 1641 500T1634 492Z`}),(0,L.jsx)(`path`,{style:{fill:R.inkcap},d:`M1780 391Q1786 386 1793 396C1810 420 1828 444 1827 467C1826 508 1768 510 1753 480C1741 456 1762 413 1780 391Z`})]})}var{coral:G,blue:K,mint:q,grape:J,yellow:Y,cream:X,ink:Z}=R,He={bonsai:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`path`,{fill:`none`,stroke:q,strokeWidth:`3.7`,strokeLinecap:`round`,d:`M35 27.5C36 25 35.5 22.5 34 21S31.5 17.5 31.5 14M36 27C40 26.8 43 26 45 24S47 20.5 47.5 18.5M30.5 31C32.5 26.5 30.5 24.6 26.5 24 22 23.5 18.5 21.6 16.8 18.5M29 37C26.5 34.5 25 33.7 21.5 33.2S15.5 32 13 31.6M36 39.5C38 38 40 37.5 42 36.5S47 34 51 32.2`}),(0,L.jsx)(`path`,{fill:q,d:`M25.5 43.5C28 40.5 28 37 27.5 33 27.3 29.5 29.5 27 33.5 26.3L37.5 26V29.5C35 29.8 34.2 31.5 34.3 34 34.5 37.5 37 39.5 41 43.5Z`}),(0,L.jsx)(`circle`,{fill:K,cx:`31.5`,cy:`10.7`,r:`4.8`}),(0,L.jsx)(`circle`,{fill:J,cx:`16.6`,cy:`18.3`,r:`4.6`}),(0,L.jsx)(`circle`,{fill:Y,cx:`47.9`,cy:`17.7`,r:`4.6`}),(0,L.jsx)(`circle`,{fill:Y,cx:`12.8`,cy:`31.5`,r:`4.6`}),(0,L.jsx)(`circle`,{fill:K,cx:`50.9`,cy:`32.1`,r:`4.6`}),(0,L.jsx)(`path`,{fill:G,d:`M16 46H47.5C47.5 54 44 58 38 58H25.5C19.5 58 16 54 16 46Z`}),(0,L.jsx)(`rect`,{fill:G,x:`14`,y:`43`,width:`35.5`,height:`4.6`,rx:`2.3`})]}),computer:(0,L.jsx)(ze,{}),prints:(0,L.jsx)(Be,{}),inkcap:(0,L.jsx)(Ve,{}),vishnu:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`path`,{style:{fill:G},d:`M6 37C6 21 17.5 9 32 9s26 12 26 28c0 2.2-1.8 4-4 4H10c-2.2 0-4-1.8-4-4Z`}),(0,L.jsx)(`circle`,{style:{fill:X},cx:`19`,cy:`25`,r:`4`}),(0,L.jsx)(`circle`,{style:{fill:X},cx:`33`,cy:`19.5`,r:`4.8`}),(0,L.jsx)(`circle`,{style:{fill:X},cx:`46`,cy:`28`,r:`3.4`}),(0,L.jsx)(`rect`,{style:{fill:K},x:`13`,y:`39`,width:`38`,height:`18`,rx:`9`}),(0,L.jsx)(`rect`,{style:{fill:X},x:`18.5`,y:`46.2`,width:`10`,height:`3.6`,rx:`1.8`}),(0,L.jsx)(`rect`,{style:{fill:X},x:`21.7`,y:`43`,width:`3.6`,height:`10`,rx:`1.8`}),(0,L.jsx)(`circle`,{style:{fill:Y},cx:`39`,cy:`50.5`,r:`2.7`}),(0,L.jsx)(`circle`,{style:{fill:X},cx:`45`,cy:`45.5`,r:`2.7`})]}),generateText:(0,L.jsx)(Le,{}),generateMedia:(0,L.jsx)(Re,{}),buyApps:(0,L.jsxs)(`g`,{transform:`rotate(-6 32 32)`,children:[(0,L.jsx)(`circle`,{fill:Y,cx:`32`,cy:`20`,r:`12`}),(0,L.jsx)(`circle`,{stroke:X,strokeWidth:`4`,cx:`32`,cy:`20`,r:`6`}),(0,L.jsx)(B,{fill:Y,transform:`translate(15.5 12) rotate(-60) scale(1.1 .85)`}),(0,L.jsx)(B,{fill:Y,transform:`translate(48.5 12) rotate(60) scale(1.1 .85)`}),(0,L.jsx)(`path`,{fill:K,d:`M10 35H54L50 53Q49 58 44 58H20Q15 58 14 53Z`}),(0,L.jsx)(`rect`,{fill:G,x:`5`,y:`27`,width:`54`,height:`10`,rx:`5`}),(0,L.jsxs)(`g`,{fill:X,children:[(0,L.jsx)(`rect`,{x:`20`,y:`41`,width:`5`,height:`11`,rx:`2.5`}),(0,L.jsx)(`rect`,{x:`29.5`,y:`41`,width:`5`,height:`11`,rx:`2.5`}),(0,L.jsx)(`rect`,{x:`39`,y:`41`,width:`5`,height:`11`,rx:`2.5`})]})]}),browseBazaar:(0,L.jsxs)(`g`,{transform:`rotate(-5 32 32)`,children:[(0,L.jsx)(`rect`,{fill:K,x:`10`,y:`14`,width:`44`,height:`38`,rx:`6`}),(0,L.jsx)(`rect`,{fill:K,x:`5`,y:`47`,width:`54`,height:`12`,rx:`6`}),(0,L.jsx)(`rect`,{fill:X,x:`12`,y:`50.5`,width:`40`,height:`4.5`,rx:`2.25`}),(0,L.jsx)(`rect`,{fill:G,x:`2`,y:`4`,width:`60`,height:`9`,rx:`4.5`}),(0,L.jsx)(`path`,{fill:G,d:`M3 9H14.6V18A5.8 5.8 0 0 1 3 18Z`}),(0,L.jsx)(`path`,{fill:X,d:`M14.6 9H26.2V18A5.8 5.8 0 0 1 14.6 18Z`}),(0,L.jsx)(`path`,{fill:G,d:`M26.2 9H37.8V18A5.8 5.8 0 0 1 26.2 18Z`}),(0,L.jsx)(`path`,{fill:X,d:`M37.8 9H49.4V18A5.8 5.8 0 0 1 37.8 18Z`}),(0,L.jsx)(`path`,{fill:G,d:`M49.4 9H61V18A5.8 5.8 0 0 1 49.4 18Z`}),(0,L.jsx)(`g`,{transform:`translate(32 36.5) scale(.34)`,children:(0,L.jsx)(V,{})})]}),agent:(0,L.jsxs)(`g`,{transform:`translate(32 33) scale(2.02) translate(-47.2 -41.8)`,children:[(0,L.jsx)(`path`,{fill:K,d:`M46.666 29.533C39.623 30.116 34.627 34.849 34.603 40.96 34.585 45.387 36.412 47.971 40.602 49.445 42.036 49.95 42.076 50.049 41.491 51.666 40.968 53.111 41.167 53.761 42.201 53.988 43.463 54.265 46.679 52.293 47.929 50.475 48.134 50.178 48.268 50.13 49.332 49.977 56.938 48.882 60.956 43.889 59.582 37.237 58.622 32.59 53.42 29.07 48.034 29.424 47.904 29.432 47.289 29.482 46.666 29.533Z`}),(0,L.jsx)(`g`,{transform:`translate(47.3 40) scale(.36 .34)`,children:(0,L.jsx)(U,{})})]}),list:(0,L.jsxs)(`g`,{transform:`rotate(-7 32 32)`,children:[(0,L.jsx)(`path`,{style:{fill:K},d:`M12 13Q6 13 6 19V50Q6 57 13 57H47Q53 57 53 50V20Q53 13 47 13Z`}),(0,L.jsx)(`path`,{style:{fill:X},d:`M19 7H39Q42 7 44 9L55 20Q57 22 57 26V44Q57 50 51 50H19Q13 50 13 44V13Q13 7 19 7Z`}),(0,L.jsx)(`path`,{style:{fill:G},d:`M39 7V18Q39 24 45 24H57Q57 22 55 20L44 9Q42 7 39 7Z`}),(0,L.jsxs)(`g`,{style:{fill:G},children:[(0,L.jsx)(`circle`,{cx:`22`,cy:`21`,r:`3`}),(0,L.jsx)(`circle`,{cx:`22`,cy:`31`,r:`3`}),(0,L.jsx)(`circle`,{cx:`22`,cy:`41`,r:`3`})]}),(0,L.jsx)(`path`,{style:{stroke:K},strokeWidth:`5`,strokeLinecap:`round`,d:`M31 21H32M31 31H46M31 41H42`})]}),chat:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`g`,{transform:`translate(3 11) scale(.22) translate(-449 -327)`,children:(0,L.jsx)(Ne,{})}),(0,L.jsx)(B,{transform:`translate(38.2 18) rotate(16) scale(.95 .6)`}),(0,L.jsx)(B,{transform:`translate(44.4 20.5) rotate(47) scale(.95 .6)`})]}),read:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`g`,{transform:`translate(4 20.5) scale(.56)`,children:(0,L.jsx)(Me,{})}),(0,L.jsx)(`g`,{transform:`translate(32 38.6) scale(.3164)`,children:(0,L.jsx)(V,{})}),(0,L.jsx)(je,{})]}),readConversations:(0,L.jsxs)(`g`,{transform:`translate(32 32) scale(.9) translate(-32 -32)`,children:[(0,L.jsx)(`g`,{transform:`translate(4 7.88) scale(.56)`,children:(0,L.jsx)(H,{fill:K})}),(0,L.jsx)(`g`,{transform:`translate(32.2 30.3) scale(.352)`,children:(0,L.jsx)(V,{})})]}),listAgents:(0,L.jsxs)(`g`,{transform:`translate(32 32) scale(1.04) translate(-32 -32)`,children:[(0,L.jsx)(`path`,{style:{fill:z},d:`M32.059 10.146C23.878 10.646 18.949 14.844 18.925 21.331 18.912 24.856 20.167 27.259 22.274 27.74 24.437 28.233 26.097 29.061 27.481 30.337 28.275 31.068 28.328 31.096 29.352 31.306 31.161 31.677 31.653 32.094 32.115 33.651 32.392 34.582 32.557 34.868 32.915 35.041 33.919 35.523 35.864 33.733 36.539 31.706L36.775 30.997 38.008 30.681C42.663 29.489 45.29 26.142 45.468 21.176 45.734 13.784 40.673 9.62 32.059 10.146Z`}),(0,L.jsx)(`g`,{transform:`translate(32.4 21.2) scale(.39)`,children:(0,L.jsx)(U,{onFigure:!0})}),(0,L.jsx)(`path`,{style:{fill:G},d:`M14.375 27.586C8.014 28.591 4.363 32.396 4.355 38.027 4.347 43.93 8.071 47.469 15.239 48.368L16.828 48.568 17.873 49.568C19.854 51.464 22.469 52.496 23.691 51.864 24.384 51.506 24.431 51.044 23.924 49.606 23.337 47.943 23.479 47.492 24.749 46.977 32.756 43.73 32.643 31.899 24.573 28.49 22.238 27.504 17.535 27.087 14.375 27.586Z`}),(0,L.jsx)(`g`,{transform:`translate(17.6 37.7) scale(.38 .36)`,children:(0,L.jsx)(U,{})}),(0,L.jsx)(`path`,{style:{fill:K},d:`M46.666 29.533C39.623 30.116 34.627 34.849 34.603 40.96 34.585 45.387 36.412 47.971 40.602 49.445 42.036 49.95 42.076 50.049 41.491 51.666 40.968 53.111 41.167 53.761 42.201 53.988 43.463 54.265 46.679 52.293 47.929 50.475 48.134 50.178 48.268 50.13 49.332 49.977 56.938 48.882 60.956 43.889 59.582 37.237 58.622 32.59 53.42 29.07 48.034 29.424 47.904 29.432 47.289 29.482 46.666 29.533Z`}),(0,L.jsx)(`g`,{transform:`translate(47.3 40) scale(.36 .34)`,children:(0,L.jsx)(U,{})})]}),createAgents:(0,L.jsxs)(`g`,{transform:`translate(32 32) scale(1.08) translate(-32 -32)`,children:[(0,L.jsx)(`path`,{style:{fill:z},d:`M20.436 24.499C13.35 25.216 7.504 28.799 5.442 33.687 3.114 39.208 4.438 45.791 8.593 49.358 10.446 50.949 10.34 50.831 10.34 51.301 10.34 51.796 10.106 52.294 9.281 53.558 7.191 56.76 12.108 56.905 16.701 53.777 17.517 53.221 17.715 53.135 18.015 53.201 20.013 53.639 25.739 53.051 28.595 52.113 35.47 49.857 39.129 44.162 37.83 37.738C37 31 33 26 26.717 24.428L24.075 24.413C22.623 24.405 20.985 24.444 20.436 24.499Z`}),(0,L.jsx)(`g`,{transform:`translate(21.9 40) scale(.46 .43)`,children:(0,L.jsx)(U,{onFigure:!0})}),(0,L.jsx)(`path`,{style:{fill:q},d:`M37.987 15.734C32.277 16.627 28.675 20.713 28.92 26.022 29.062 29.118 30.627 31.606 33.331 33.036 34.675 33.747 34.761 34.018 34.237 35.923 33.376 39.051 36.878 38.551 39.174 35.218 39.574 34.637 39.65 34.583 40.058 34.583 46.203 34.583 50.414 30.91 50.424 25.543 50.435 18.989 44.932 14.649 37.987 15.734Z`}),(0,L.jsx)(`g`,{transform:`translate(38.9 24.9) scale(.31)`,children:(0,L.jsx)(U,{})}),(0,L.jsx)(B,{fill:Y,transform:`translate(48.1 15.7) rotate(31) scale(1.25 .85)`}),(0,L.jsx)(B,{fill:Y,transform:`translate(52.2 19.8) rotate(70) scale(1.25 .85)`})]}),sendPrompts:(0,L.jsxs)(`g`,{transform:`translate(32 32) scale(1.08) translate(-32 -32)`,children:[(0,L.jsx)(`g`,{transform:`translate(4 13.2) scale(.412 .436)`,children:(0,L.jsx)(H,{fill:G})}),(0,L.jsx)(`g`,{transform:`translate(17.1 28.7) scale(.19)`,children:(0,L.jsx)(Pe,{})}),(0,L.jsx)(B,{fill:q,transform:`translate(48.1 26.4) rotate(65) scale(1.7 1.28)`}),(0,L.jsx)(B,{fill:q,transform:`translate(48.4 33.8) rotate(110) scale(1.7 1.28)`})]}),write:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Fe,{}),(0,L.jsx)(Ie,{})]}),run:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`rect`,{style:{fill:K},x:`6`,y:`9`,width:`52`,height:`43`,rx:`7`}),(0,L.jsx)(`path`,{style:{stroke:X},strokeWidth:`5`,strokeLinecap:`round`,strokeLinejoin:`round`,d:`m17 22 9 8-9 8m17 0h12`})]}),stop:(0,L.jsx)(`rect`,{style:{fill:G},x:`12`,y:`12`,width:`40`,height:`40`,rx:`9`}),connected:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`path`,{fill:`none`,style:{stroke:K},strokeWidth:`12`,strokeLinecap:`round`,d:`M34 37Q43 21 26 20H18Q3 20 6 37q2 10 15 9`}),(0,L.jsx)(`path`,{fill:`none`,style:{stroke:G},strokeWidth:`12`,strokeLinecap:`round`,d:`M29 33Q20 50 38 53h8q16-1 12-17-2-11-14-10`}),(0,L.jsx)(`path`,{style:{stroke:Y},strokeWidth:`4`,strokeLinecap:`round`,d:`m27 4 2 6m10-5-2 7m12 0-5 4`})]}),working:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`ellipse`,{style:{fill:q},cx:`23`,cy:`14`,rx:`13`,ry:`8`,transform:`rotate(-30 23 14)`}),(0,L.jsx)(`ellipse`,{style:{fill:Y},cx:`48`,cy:`36`,rx:`13`,ry:`8`,transform:`rotate(35 48 36)`}),(0,L.jsx)(`ellipse`,{style:{fill:J},cx:`22`,cy:`48`,rx:`13`,ry:`8`,transform:`rotate(45 22 48)`}),(0,L.jsx)(`path`,{fill:`none`,style:{stroke:z},strokeWidth:`3`,strokeLinecap:`round`,d:`M42 8q13 2 13 13M43 55q-5 5-12 4M5 39q-5-9 1-17`})]}),complete:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`path`,{style:{fill:q},d:`M32 6q5-8 10 0 9-3 10 6 9 2 5 11 8 6 0 12 3 9-6 11-1 9-10 6-6 8-12 0-9 3-11-6-9-2-6-11-8-6 0-12-3-9 6-11 1-9 10-6Z`}),(0,L.jsx)(`path`,{fill:`none`,style:{stroke:Z},strokeWidth:`6`,strokeLinecap:`round`,strokeLinejoin:`round`,d:`m23 29 7 7 13-15`}),(0,L.jsx)(`path`,{style:{stroke:z},strokeWidth:`3`,strokeLinecap:`round`,d:`m4 8 5 6m48-4 5-5M2 24l6 1`})]}),installApps:(0,L.jsxs)(`g`,{transform:`rotate(-6 32 32)`,children:[(0,L.jsx)(`rect`,{style:{fill:K},x:`9`,y:`26`,width:`46`,height:`32`,rx:`10`}),(0,L.jsx)(`rect`,{style:{fill:X},x:`17`,y:`33`,width:`30`,height:`18`,rx:`5`}),(0,L.jsx)(`path`,{style:{fill:q},d:`M22 38h8v8h-8z`}),(0,L.jsx)(`path`,{style:{fill:J},d:`M34 38h8v8h-8z`}),(0,L.jsx)(`path`,{style:{stroke:G},strokeWidth:`6`,strokeLinecap:`round`,strokeLinejoin:`round`,d:`M32 4v17m-8-7 8 8 8-8`})]}),restricted:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`path`,{fill:`none`,style:{stroke:G},strokeWidth:`9`,strokeLinecap:`round`,d:`M16 23V19q0-17 16-17t16 17v4`}),(0,L.jsx)(`rect`,{style:{fill:G},x:`8`,y:`26`,width:`48`,height:`36`,rx:`9`}),(0,L.jsx)(`path`,{style:{fill:X},d:`M32 34a7 7 0 0 0-4 13v7h8v-7a7 7 0 0 0-4-13Z`})]}),error:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`path`,{style:{fill:G},d:`M32 6q5-8 10 0 9-3 10 6 9 2 5 11 8 6 0 12 3 9-6 11-1 9-10 6-6 8-12 0-9 3-11-6-9-2-6-11-8-6 0-12-3-9 6-11 1-9 10-6Z`}),(0,L.jsx)(`path`,{fill:`none`,style:{stroke:X},strokeWidth:`7`,strokeLinecap:`round`,d:`M32 18v15`}),(0,L.jsx)(`circle`,{style:{fill:X},cx:`32`,cy:`45`,r:`4`})]}),trellis:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`g`,{fill:Y,children:[(0,L.jsx)(`rect`,{x:`17.25`,y:`9`,width:`3.9`,height:`49.2`,rx:`1.95`}),(0,L.jsx)(`rect`,{x:`42.95`,y:`9`,width:`3.9`,height:`49.2`,rx:`1.95`}),(0,L.jsx)(`rect`,{x:`30.4`,y:`18`,width:`3.2`,height:`26`}),(0,L.jsx)(`rect`,{x:`14.8`,y:`15.75`,width:`34.4`,height:`3.1`,rx:`1.55`}),(0,L.jsx)(`rect`,{x:`14.8`,y:`28.85`,width:`34.4`,height:`3.1`,rx:`1.55`}),(0,L.jsx)(`rect`,{x:`14.8`,y:`42.55`,width:`34.4`,height:`3.1`,rx:`1.55`})]}),(0,L.jsx)(`path`,{fill:`none`,stroke:q,strokeWidth:`3`,strokeLinecap:`round`,d:`M21.9 56.1C31.5 54.4 32.9 47 32.1 45.8`}),(0,L.jsx)(`path`,{fill:`none`,stroke:q,strokeWidth:`3`,strokeLinecap:`round`,d:`M32 44.2C28.7 41.8 25.2 35.7 32 32.3 38.8 28 38.9 24 31.9 18.8 32.4 16.3 32.8 14.7 34.5 12.2`}),(0,L.jsx)(W,{transform:`translate(32.1 14.1) rotate(45) scale(0.45 0.86)`}),(0,L.jsx)(W,{transform:`translate(32.2 14.7) rotate(-60) scale(0.42 0.58)`}),(0,L.jsx)(W,{transform:`translate(34.8 28.3) rotate(65) scale(0.38 0.8)`}),(0,L.jsx)(W,{transform:`translate(28.2 33.1) rotate(-51) scale(0.5 0.57)`}),(0,L.jsx)(W,{transform:`translate(28.6 53.3) rotate(-48) scale(0.47 0.6)`}),(0,L.jsx)(`circle`,{fill:G,cx:`31.9`,cy:`18.8`,r:`4`}),(0,L.jsx)(`circle`,{fill:K,cx:`32`,cy:`32.3`,r:`4`}),(0,L.jsx)(`circle`,{fill:J,cx:`32`,cy:`44.2`,r:`4`})]}),games:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`path`,{fill:K,d:`M18.5 28.5H45.5C49.5 29.5 53 32 54 35 55 37.5 56.8 45.5 56.6 48 56.5 53 52.5 57.5 47 58H15C9.5 56.5 6.6 51 7.6 45.5 8.6 39.5 9.3 35 10.5 33 12 31 14.5 29.5 18.5 28.5Z`}),(0,L.jsx)(`ellipse`,{fill:X,cx:`26.8`,cy:`37.9`,rx:`9.1`,ry:`5.6`}),(0,L.jsx)(`ellipse`,{fill:Z,cx:`27`,cy:`37.6`,rx:`4.7`,ry:`2.2`}),(0,L.jsx)(`path`,{fill:Z,d:`M23.1 26V35.4A4 4.2 0 0 0 31.1 35.4V26Z`}),(0,L.jsx)(`circle`,{fill:G,cx:`27.1`,cy:`18.3`,r:`12.4`}),(0,L.jsx)(`circle`,{fill:X,cx:`22.6`,cy:`14.3`,r:`3.05`}),(0,L.jsx)(`ellipse`,{fill:Y,cx:`45.1`,cy:`37.2`,rx:`5.6`,ry:`3.95`}),(0,L.jsx)(`ellipse`,{fill:X,cx:`40.1`,cy:`46.6`,rx:`6.2`,ry:`4.4`})]}),oyster:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`path`,{fill:J,d:`M35.5 6C33.7 6.3 32.3 7.6 31.4 9.4 30.9 10.3 30.4 10.3 29.5 10 25.5 9 20.6 11.6 19.6 15.9 19.4 16.6 19 17 18 17.1 14.5 17.6 12 20.6 12.1 24.2 12.2 25.4 12 25.9 11.5 26.5 7.5 30 10.5 34.5 17.5 34.4 15.3 32.6 16 31 19 29 26 24 37 19.5 43.5 19 46 19 46 22 43 25.5 46.5 23.5 51.5 18.5 53.5 15 55 11 50 7 45 9 43.8 9.4 43.3 9.2 42.5 8 40.7 6.3 38 5.6 35.5 6Z`}),(0,L.jsx)(`circle`,{fill:X,cx:`34.9`,cy:`41.9`,r:`11.3`}),(0,L.jsxs)(`g`,{fill:Z,children:[(0,L.jsx)(`rect`,{x:`29.9`,y:`33.2`,width:`3.2`,height:`5.6`,rx:`1.6`}),(0,L.jsx)(`rect`,{x:`36.7`,y:`33.2`,width:`3.2`,height:`5.6`,rx:`1.6`})]}),(0,L.jsx)(`path`,{fill:J,d:`M49.5 39C47.9 39.3 46.5 40 46.1 41.6 45.8 43.2 45.5 43.5 44 43.5 38.5 43.5 35 48 39 49.5 40 50 39.5 50.5 38 51 35.5 52.5 32.5 52 30 51 29 50.5 28.5 50 29.5 50 33 47.5 30 43.5 24.5 43.5 23.3 43.5 22.9 43.3 22.5 43 20.5 40.5 19 40 17.5 39.5 13 39.5 13 44 17 47.5 18.3 48.4 18.6 48.7 19 49.5 20.5 53 23 55 26 55 26.8 55 27 55.3 27.5 56 31 58.5 36.5 58.5 40 56 40.8 55.2 41.2 55 42 55 45 55 47.5 53 49 49.5 49.6 48.5 50 48 50.5 47.5 56 43.5 55 38.5 49.5 39Z`}),(0,L.jsx)(`path`,{fill:`none`,stroke:Y,strokeWidth:`3`,strokeLinecap:`round`,d:`M46.6 31.8 49.2 27.8 M49.4 35.5 52.8 33.7 M21.5 32.5 22.9 33.5 M19.3 37.5 21.1 38.1`})]}),tourtois:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`rect`,{fill:X,x:`11.07`,y:`35.73`,width:`26.8`,height:`9.7`,rx:`3.25`,transform:`rotate(-5 24.47 40.58)`}),(0,L.jsx)(`path`,{fill:Y,d:`M14.8 16C19 14.6 23 13.5 26.5 12.6 28.4 12.1 29.6 13.4 30.1 15.3L31.6 21 17.4 37.6C13.8 38.2 10.6 37.8 10.1 35.4L9.2 27.8C9.1 26.1 10.1 24.7 11.6 24.1 11.4 22.4 11.4 20.6 11.8 19.1 12.3 17.4 13.3 16.5 14.8 16Z`}),(0,L.jsx)(`path`,{fill:G,d:`M14.0 24.1Q13.3 21.2 16.2 20.4L30.7 16.2Q33.6 15.4 34.6 18.2L36.0 22.7Q37.0 25.5 34.7 27.4L20.2 39.7Q17.9 41.6 17.2 38.7Z`}),(0,L.jsx)(`path`,{fill:K,d:`M21 23.4 35.5 20.6C37.3 20.2 38.6 21 38.9 22.6L40 34.5C40.1 36.2 39.1 37.3 37.5 37.7 32.6 39.9 26 41 21 41 16 41 12.2 40.2 11 38.8 10.4 37.6 10.8 36.4 12.4 37L19.6 38.4 18.4 27C18.2 25.2 19.3 23.7 21 23.4Z`}),(0,L.jsx)(`path`,{fill:X,d:`M22.8 29.6 34.8 26.9C36.2 26.6 37 27.3 37.2 28.6L37.9 33C38.1 34.2 37.5 35 36.3 35.3L24.3 37.8C23 38.1 22.3 37.5 22.1 36.3L21.3 31.6C21.1 30.6 21.7 29.8 22.8 29.6Z`}),(0,L.jsxs)(`g`,{fill:X,children:[(0,L.jsx)(`circle`,{cx:`14.7`,cy:`18.45`,r:`1`}),(0,L.jsx)(`circle`,{cx:`17.6`,cy:`17.65`,r:`1`}),(0,L.jsx)(`circle`,{cx:`20.5`,cy:`16.85`,r:`1`}),(0,L.jsx)(`circle`,{cx:`17.9`,cy:`22.2`,r:`1`}),(0,L.jsx)(`circle`,{cx:`21`,cy:`21.5`,r:`1`}),(0,L.jsx)(`circle`,{cx:`24.1`,cy:`20.75`,r:`1`}),(0,L.jsx)(`circle`,{cx:`28.2`,cy:`25.3`,r:`1`})]}),(0,L.jsx)(`circle`,{fill:G,cx:`21.7`,cy:`26.6`,r:`1`}),(0,L.jsx)(`circle`,{fill:Y,cx:`24.9`,cy:`25.9`,r:`1.05`}),(0,L.jsxs)(`g`,{fill:q,children:[(0,L.jsx)(`ellipse`,{cx:`8.8`,cy:`36.6`,rx:`3.6`,ry:`1.9`,transform:`rotate(22 8.8 36.6)`}),(0,L.jsx)(`path`,{d:`M12 41C10 41.5 7.5 44.5 7 46.5 7 48 8.5 49.5 10.5 50 12.5 50.5 13.5 50 15 48 15.5 47 16.5 47.5 19 50 22 49.5 22 46.5 22 45.5 20.5 45.5 17 45 16.5 44.5 16.5 44 16.5 42 13.5 40.5L12 41Z`}),(0,L.jsx)(`path`,{d:`M40 33C39 38 36 42 34.5 41.5 32.5 40.5 29.5 42 28.5 44 26 49 27.5 51.5 32.5 51 36 51 37 50 36 46.5 36 45 37 44.5 38 44.5 38.5 45.5 40.5 49 43.5 50 46.5 47.5 47.5 46.5 46 43.5 44 42 43 41.5 43.5 40.5 44.5 39.5 46 38 47 37.5L47 33Z`})]}),(0,L.jsx)(`ellipse`,{fill:q,cx:`46.4`,cy:`30.6`,rx:`8.1`,ry:`8.3`}),(0,L.jsxs)(`g`,{fill:Z,children:[(0,L.jsx)(`rect`,{x:`45.05`,y:`26.95`,width:`2.25`,height:`4.6`,rx:`1.1`,transform:`rotate(-6 46.2 29.3)`}),(0,L.jsx)(`rect`,{x:`49.25`,y:`26.4`,width:`2.25`,height:`4.6`,rx:`1.1`,transform:`rotate(-6 50.4 28.7)`})]}),(0,L.jsx)(`path`,{fill:G,d:`M46.8 32.2H51C51 34.3 50 35.4 48.9 35.4S46.8 34.3 46.8 32.2Z`,transform:`rotate(-8 48.9 33.5)`}),(0,L.jsx)(`path`,{fill:`none`,stroke:Y,strokeWidth:`3`,strokeLinecap:`round`,d:`M50.9 17.7 50.5 19.7 M55.2 20.1 53.4 21.9 M56.5 24.5 55.7 24.7`})]}),allApps:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`rect`,{fill:G,x:`7`,y:`7.25`,width:`23.2`,height:`22.7`,rx:`4.6`,transform:`rotate(-6.2 18.6 18.6)`}),(0,L.jsx)(`rect`,{fill:K,x:`33.9`,y:`7.25`,width:`23.2`,height:`22.7`,rx:`4.6`,transform:`rotate(6.2 45.5 18.6)`}),(0,L.jsx)(`rect`,{fill:q,x:`7`,y:`34.15`,width:`23.2`,height:`22.7`,rx:`4.6`,transform:`rotate(6.2 18.6 45.5)`}),(0,L.jsx)(`rect`,{fill:Y,x:`33.9`,y:`34.15`,width:`23.2`,height:`22.7`,rx:`4.6`,transform:`rotate(-6.2 45.5 45.5)`})]}),search:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`path`,{fill:`none`,stroke:K,strokeWidth:`6.5`,d:`M37 37.5 43 43.5`}),(0,L.jsx)(`path`,{fill:`none`,stroke:G,strokeWidth:`12.6`,strokeLinecap:`round`,d:`M44.2 43.8 51.4 51.8`}),(0,L.jsx)(`path`,{fill:`none`,stroke:Y,strokeWidth:`3`,strokeLinecap:`round`,d:`M47.2 42.4 52.8 47.8`}),(0,L.jsx)(`ellipse`,{fill:K,cx:`25.6`,cy:`24.6`,rx:`19.25`,ry:`18.6`}),(0,L.jsx)(`ellipse`,{fill:X,cx:`25.2`,cy:`24.1`,rx:`14.2`,ry:`13.6`})]}),browser:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`rect`,{fill:G,x:`5.9`,y:`6.15`,width:`52.2`,height:`51.7`,rx:`5.5`}),(0,L.jsx)(`path`,{fill:X,d:`M10 16.5H29.4C30.3 16.1 31 14.4 31.8 12.5 32.5 10.9 33.2 10 34.5 10H52.2C53.4 10 54 10.7 54 12V16.5C55.2 16.5 56 17.1 56 18.3V52.4C56 53.7 55.1 54.6 53.8 54.6H10.2C8.9 54.6 8 53.7 8 52.4V18.2C8 17.1 8.7 16.5 10 16.5Z`}),(0,L.jsx)(`circle`,{fill:Y,cx:`12.2`,cy:`11.9`,r:`1.95`}),(0,L.jsx)(`circle`,{fill:K,cx:`18.6`,cy:`11.9`,r:`1.95`}),(0,L.jsx)(`circle`,{fill:J,cx:`25.1`,cy:`11.9`,r:`1.95`}),(0,L.jsx)(`circle`,{fill:q,cx:`32`,cy:`34.9`,r:`14.5`}),(0,L.jsxs)(`g`,{fill:`none`,stroke:X,strokeWidth:`3`,children:[(0,L.jsx)(`ellipse`,{cx:`32`,cy:`34.9`,rx:`7.7`,ry:`13.3`}),(0,L.jsx)(`path`,{d:`M17.5 34.9H46.5`})]})]}),internet:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`ellipse`,{fill:`none`,stroke:Y,strokeWidth:`4.4`,cx:`32.2`,cy:`30.2`,rx:`25.6`,ry:`8.1`,transform:`rotate(-20.8 32.2 30.2)`}),(0,L.jsx)(`circle`,{fill:K,cx:`32`,cy:`32`,r:`21.1`}),(0,L.jsxs)(`g`,{fill:`none`,stroke:X,strokeWidth:`3`,children:[(0,L.jsx)(`ellipse`,{cx:`32`,cy:`31.8`,rx:`12.2`,ry:`18.7`}),(0,L.jsx)(`path`,{d:`M32 13.1V50.5M15 20.4Q32 29 49 20.4M12.5 39Q32 44.6 51.5 39`})]}),(0,L.jsx)(`path`,{fill:`none`,stroke:Y,strokeWidth:`4.4`,d:`M6.6 30.2A25.6 8.1 0 0 0 57.8 30.2`,transform:`rotate(-20.8 32.2 30.2)`})]}),members:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`circle`,{fill:K,cx:`41.9`,cy:`22.85`,r:`12.2`}),(0,L.jsx)(`path`,{fill:K,d:`M36 34C33.8 34.8 32.2 35.8 31 37 37.5 39.5 40.5 43.5 40.5 49.5V53.5H54.5C57 53.5 58 51 58 47.5 58 40 55 35.5 49 34Z`}),(0,L.jsx)(`circle`,{fill:G,cx:`22.95`,cy:`27.6`,r:`12.85`}),(0,L.jsx)(`path`,{fill:G,d:`M15.5 38C10.5 39 7.5 42.5 6.5 47 5.5 50.5 6 53.5 8.5 53.5H38.5C42 52 40 43 36 40 34.5 39 32 38 31 38Z`}),(0,L.jsxs)(`g`,{fill:Z,children:[(0,L.jsx)(`circle`,{cx:`18.3`,cy:`28`,r:`1.6`}),(0,L.jsx)(`circle`,{cx:`27.9`,cy:`28`,r:`1.6`}),(0,L.jsx)(`circle`,{cx:`39.1`,cy:`23.05`,r:`1.55`}),(0,L.jsx)(`circle`,{cx:`47.25`,cy:`23.05`,r:`1.55`})]})]}),sell:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`path`,{fill:Y,d:`M6.4 41.2V48.4C6.4 51.4 13.2 54 21.8 54S37.2 51.4 37.2 48.4V41.2C37.2 37.8 30.4 35 21.8 35S6.4 37.8 6.4 41.2Z`}),(0,L.jsx)(`ellipse`,{fill:X,cx:`21.9`,cy:`40.8`,rx:`13.2`,ry:`3.6`}),(0,L.jsxs)(`g`,{transform:`rotate(-3 22.5 30) translate(0.5 0)`,children:[(0,L.jsx)(`path`,{fill:Y,d:`M7.5 26V34C7.5 37.3 14.2 40 22.5 40S37.5 37.3 37.5 34V26C37.5 22.7 30.8 20 22.5 20S7.5 22.7 7.5 26Z`}),(0,L.jsx)(`ellipse`,{fill:X,cx:`23.7`,cy:`26.55`,rx:`13.05`,ry:`4.4`})]}),(0,L.jsxs)(`g`,{transform:`translate(46.3 40.3) rotate(-25)`,children:[(0,L.jsx)(`path`,{fill:G,d:`M-8.5-10Q-8.5-12-7-13L-1.5-16.3Q0-17.2 1.5-16.3L7-13Q8.5-12 8.5-10V9Q8.5 12 5.5 12H-5.5Q-8.5 12-8.5 9Z`}),(0,L.jsx)(`circle`,{fill:X,cx:`0`,cy:`-10.7`,r:`2.2`})]}),(0,L.jsx)(B,{fill:Y,transform:`translate(38.2 18.6) scale(1.1 .86)`}),(0,L.jsx)(B,{fill:Y,transform:`translate(42.8 21.2) rotate(45) scale(1.1 .85)`})]}),schedule:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`rect`,{fill:X,x:`6`,y:`11`,width:`47.6`,height:`44`,rx:`6`}),(0,L.jsx)(`path`,{fill:G,d:`M12 11H47.6Q53.6 11 53.6 17V21.5H6V17Q6 11 12 11Z`}),(0,L.jsxs)(`g`,{fill:X,children:[(0,L.jsx)(`circle`,{cx:`16.1`,cy:`16.15`,r:`3.4`}),(0,L.jsx)(`circle`,{cx:`43.4`,cy:`16.15`,r:`3.4`})]}),(0,L.jsxs)(`g`,{fill:K,children:[(0,L.jsx)(`rect`,{x:`13.6`,y:`6`,width:`5`,height:`11.2`,rx:`2.5`}),(0,L.jsx)(`rect`,{x:`40.9`,y:`6`,width:`5`,height:`11.2`,rx:`2.5`})]}),(0,L.jsxs)(`g`,{fill:q,children:[(0,L.jsx)(`rect`,{x:`11.1`,y:`25.1`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,L.jsx)(`rect`,{x:`20.7`,y:`25.1`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,L.jsx)(`rect`,{x:`30.4`,y:`25.1`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,L.jsx)(`rect`,{x:`20.7`,y:`33.9`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,L.jsx)(`rect`,{x:`30.4`,y:`33.9`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,L.jsx)(`rect`,{x:`11.1`,y:`42.7`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,L.jsx)(`rect`,{x:`30.4`,y:`42.7`,width:`6.9`,height:`6.6`,rx:`1.8`})]}),(0,L.jsxs)(`g`,{fill:J,children:[(0,L.jsx)(`rect`,{x:`40.4`,y:`25.1`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,L.jsx)(`rect`,{x:`11.1`,y:`33.9`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,L.jsx)(`rect`,{x:`20.7`,y:`42.7`,width:`6.9`,height:`6.6`,rx:`1.8`})]}),(0,L.jsx)(`circle`,{fill:Y,cx:`45.5`,cy:`45.6`,r:`12.2`}),(0,L.jsx)(`path`,{fill:`none`,stroke:Z,strokeWidth:`3`,strokeLinecap:`round`,strokeLinejoin:`round`,d:`M45.1 39.3V46.2L51.3 49.8`}),(0,L.jsx)(`circle`,{fill:Z,cx:`45.1`,cy:`46.2`,r:`2.5`})]}),loop:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`path`,{style:{stroke:G},strokeWidth:`6`,strokeLinecap:`round`,d:`M47.5 14.5C43 11 37.5 9 32 9 19.5 9 9 19.5 9 32S19.5 55 32 55 55 44.5 55 32`}),(0,L.jsx)(`path`,{style:{fill:G},d:`M53.5 21.5Q54.5 20 55 22L58 33Q58.5 35 56.5 34.5L48.5 32.5Q47 32 48 30.5Z`}),(0,L.jsx)(`g`,{transform:`translate(18 21) scale(.28)`,children:(0,L.jsx)(H,{fill:K})}),(0,L.jsxs)(`g`,{style:{fill:X},children:[(0,L.jsx)(`rect`,{x:`25`,y:`27.5`,width:`14`,height:`3`,rx:`1.5`}),(0,L.jsx)(`rect`,{x:`25`,y:`33.5`,width:`9`,height:`3`,rx:`1.5`})]})]}),fungi:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`ellipse`,{fill:X,cx:`33.5`,cy:`43.6`,rx:`18.6`,ry:`14.4`,transform:`rotate(-6 33.5 43.6)`}),(0,L.jsx)(`path`,{fill:G,d:`M29.5 6.5C22 7.5 16 11 11 18.5 4 29 4.6 39.6 13.5 42.2 24 45 44 40.5 54 34.6 57.6 32.6 58.6 29.2 57.5 25 56.5 20 53 16 48.5 13 43.5 8 37 5.5 29.5 6.5Z`}),(0,L.jsxs)(`g`,{fill:X,children:[(0,L.jsx)(`ellipse`,{cx:`29`,cy:`15.7`,rx:`8.7`,ry:`6.3`,transform:`rotate(-15.5 29 15.7)`}),(0,L.jsx)(`ellipse`,{cx:`50.8`,cy:`20.1`,rx:`6.5`,ry:`3.5`,transform:`rotate(51.6 50.8 20.1)`}),(0,L.jsx)(`ellipse`,{cx:`13`,cy:`26.8`,rx:`4.2`,ry:`3.3`,transform:`rotate(-54.5 13 26.8)`})]}),(0,L.jsxs)(`g`,{fill:Z,transform:`translate(26.6 46.6) scale(1.1) translate(-33.7 -38.5)`,children:[(0,L.jsx)(`rect`,{x:`31.85`,y:`35.9`,width:`3.75`,height:`5.25`,rx:`1.85`}),(0,L.jsx)(`path`,{d:`M 47.4 34.3 C 46 35 44.6 35.8 43.5 36.7 42.9 37.2 43.2 38.3 44 38.4 45.2 38.6 46.5 38.6 47.7 38.4 48.4 38.3 48.3 37.3 47.6 37.3 46.6 37.4 45.7 37.4 45 37.3 45.9 36.7 46.9 36.1 48 35.6 48.7 35.3 48.2 34 47.4 34.3 Z`}),(0,L.jsx)(`path`,{d:`M 37.4 41.1 C 38.6 44.3 42.6 44.3 43.6 40.5 43.7 40 43.1 39.8 42.9 40.3 41.9 42.8 39.1 42.9 38.3 40.7 38.1 40.2 37.3 40.5 37.4 41.1 Z`})]})]})};function Ue({name:e,size:t}){return(0,L.jsx)(`svg`,{viewBox:`0 0 64 64`,width:t,height:t,fill:`none`,stroke:`none`,"aria-hidden":`true`,focusable:`false`,"data-sigil":e,children:He[e]})}var Q=e(n(),1),We=(e,t)=>p.of(e,`prints`,`share`,t);async function Ge(e,t,n){return n.kind===`stop`?e.stop(t):(n.kind===`reshare`&&await e.stop(t),e.share({requestId:t,showPrompt:n.showPrompt}))}function Ke({app:e,printId:t}){let n=l(),r=We(e,t),[i,a]=(0,Q.useState)(!0),[o,s]=(0,Q.useState)(!1),c=j({...m(e,u,r,e=>e.status(t)),enabled:e.capabilities.has(u)}),d=h({mutationFn:n=>Ge(e.capabilities.require(u),t,n),onSuccess:e=>{n.setQueryData(r,e),s(!1)}}),f=c.data?.shared===!0?c.data:null,p=f===null?i:f.showPrompt,g=c.isPending||d.isPending,_=d.isError||c.isError;return(0,Q.useEffect)(()=>{_&&E(`Sharing is unavailable right now. Try again.`,`prints-share-error`)},[_]),(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(N,{children:[(0,L.jsxs)(`span`,{className:`prints-info-label`,children:[(0,L.jsx)(Ue,{name:`connected`,size:16}),`Share`]}),(0,L.jsxs)(`span`,{className:`prints-info-value prints-share-value`,children:[(0,L.jsx)(F,{"aria-label":`Public link`,checked:f!==null,disabled:g||c.isError,onCheckedChange:e=>{d.mutate(e?{kind:`share`,showPrompt:i}:{kind:`stop`})}}),f===null?(0,L.jsx)(`span`,{className:`prints-share-note`,children:`Only your Team can see it`}):(0,L.jsx)(I,{density:`compact`,label:o?`Copied`:`Copy link`,icon:o?(0,L.jsx)(P,{}):(0,L.jsx)(Ce,{}),onClick:()=>{navigator.clipboard.writeText(f.url).then(()=>{s(!0)},()=>{s(!1)})}})]})]}),(0,L.jsxs)(N,{children:[(0,L.jsxs)(`span`,{className:`prints-info-label`,children:[(0,L.jsx)(Ue,{name:`sendPrompts`,size:16}),`On page`]}),(0,L.jsxs)(`span`,{className:`prints-info-value prints-share-value`,children:[(0,L.jsx)(F,{"aria-label":`Show the prompt on the public page`,checked:p,disabled:g||c.isError,onCheckedChange:e=>{a(e),f!==null&&d.mutate({kind:`reshare`,showPrompt:e})}}),(0,L.jsx)(`span`,{className:`prints-share-note`,children:p?`Print and prompt`:`Print only`})]})]})]})}function qe(e,t){return t.state===`loading`?`${e} · …`:t.state===`ready`&&t.price!==null?`${e} · ${t.price}`:e}function Je({models:e,source:t,operations:n}){let r=A(e,`remove_background`),i=A(e,`upscale`),a=i===void 0?[]:D(i,t),[o,s]=(0,Q.useState)(void 0),[c,l]=(0,Q.useState)(!1),u=a.find(e=>e.disabledReason===void 0),d=a.find(e=>e.megapixels===o&&e.disabledReason===void 0)?.megapixels??u?.megapixels,f=r===void 0?void 0:re(r,t),p=i===void 0?void 0:re(i,t),m=M(n.session,r===void 0||f!==void 0?null:k(r,t,void 0)),h=M(n.session,i===void 0||p!==void 0||d===void 0?null:k(i,t,d));if(r===void 0&&i===void 0)return null;let g=(e,t)=>{l(!0),n.onRun(e,t).finally(()=>{l(!1)})},_=c||n.atLimit,y=n.atLimit?v:void 0,b=a.filter(e=>e.disabledReason);return(0,L.jsxs)(`section`,{className:`prints-info-operations`,"aria-label":`Edit this image`,"data-print-operations":!0,children:[r?(0,L.jsx)(I,{label:qe(O.remove_background,m),icon:(0,L.jsx)(Se,{}),disabled:_||f!==void 0||m.state===`loading`,"aria-busy":m.state===`loading`,title:f??y,"data-operation":`remove_background`,onClick:()=>{g(`remove_background`,void 0)}}):null,i?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(C,{className:`prints-info-sizes`,value:d===void 0?``:String(d),onValueChange:e=>{s(Number(e))},children:(0,L.jsx)(S,{variant:`segmented`,"aria-label":`Upscale output size`,children:a.map(e=>(0,L.jsxs)(w,{value:String(e.megapixels),disabled:e.disabledReason!==void 0,title:e.disabledReason,children:[e.megapixels,` MP`]},e.megapixels))})}),b.length>0?(0,L.jsx)(`p`,{className:`prints-info-hint`,"data-operation-hint":!0,children:b[0]?.disabledReason}):null,(0,L.jsx)(I,{label:qe(d===void 0?O.upscale:`${O.upscale} to ${String(d)} MP`,h),icon:(0,L.jsx)(ue,{}),disabled:_||p!==void 0||d===void 0||h.state===`loading`,"aria-busy":h.state===`loading`,title:p??(d===void 0?`This image is already larger than any size offered.`:y),"data-operation":`upscale`,onClick:()=>{g(`upscale`,d)}})]}):null]})}var Ye=(0,Q.lazy)(async()=>({default:(await T(()=>import(`./print-download-button-BNNi_aoW.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11]),import.meta.url)).PrintDownloadButton})),Xe=r({print:r({printId:o(),source:a([`recorded`,`file`]),kind:a([`image`,`video`,`audio`]),model:o(),width:c().nullable(),height:c().nullable(),steps:c().nullable(),durationSeconds:c().nullable().optional(),costMilliunits:c(),createdAt:c()}),typed:r({prompt:o(),references:c()}),references:i(r({path:o(),computerId:o().optional()})),characters:i(o())}),Ze=(e,t)=>({style:t,kind:e.print.kind,model:e.print.model,typed:e.typed,references:e.references,steps:e.print.steps,width:e.print.width,height:e.print.height}),Qe={image:`Image`,video:`Video`,audio:`Audio`},$e=(e,t)=>t===0?e:$e(t,e%t),et=(e,t)=>{let n=$e(e,t);return`${String(e/n)}:${String(t/n)}`},tt=new Intl.DateTimeFormat(`en`,{dateStyle:`medium`,timeStyle:`short`});function nt(e,t){let n=e.source,r=n.kind===`computer`?n.path:null,i=n.kind===`computer`?n.computerId:null;return j({...m(t,_,p.of(t,`prints`,`output-details`,i,r),async(e,t)=>{let n=await e.call(`getOutput`,JSON.stringify({path:r}));t.throwIfAborted();let i=Xe.safeParse(n);return i.success?i.data:null}),enabled:!!(t&&r&&i&&t.capabilities.has(_)),retry:!1})}function $({icon:e,label:t,children:n}){return(0,L.jsxs)(N,{children:[(0,L.jsxs)(`span`,{className:`prints-info-label`,children:[(0,L.jsx)(e,{size:16,"aria-hidden":!0}),t]}),(0,L.jsx)(`span`,{className:`prints-info-value`,children:n})]})}function rt({name:e}){let t=e.length>it?e.slice(-it):``;return(0,L.jsxs)(`span`,{className:`prints-info-file`,title:e,"data-print-file":!0,children:[(0,L.jsx)(`span`,{className:`prints-info-file-head`,children:e.slice(0,e.length-t.length)}),t?(0,L.jsx)(`span`,{className:`prints-info-file-tail`,children:t}):null]})}var it=10,at=240;function ot({prompt:e,references:t}){let[n,r]=(0,Q.useState)(!1),[i,a]=(0,Q.useState)(!1),o=e.length>at,s=async()=>{try{await navigator.clipboard.writeText(e),a(!0),setTimeout(()=>{a(!1)},1500)}catch(e){d(`copy-print-prompt`,e)}};return(0,L.jsxs)(`span`,{className:`prints-info-prompt`,children:[(0,L.jsx)(`span`,{className:`whitespace-pre-wrap`,"data-print-prompt":!0,"data-folded":o&&!n?!0:void 0,children:e}),(0,L.jsx)(le,{tokens:ae(e,[],t,[])}),(0,L.jsxs)(`span`,{className:`prints-info-prompt-tools`,children:[(0,L.jsxs)(`button`,{type:`button`,className:`prints-info-link`,onClick:()=>{s()},children:[i?(0,L.jsx)(P,{"aria-hidden":!0,size:14}):(0,L.jsx)(xe,{"aria-hidden":!0,size:14}),` `,i?`Copied`:`Copy`]}),o?(0,L.jsxs)(`button`,{type:`button`,className:`prints-info-link`,"aria-expanded":n,onClick:()=>{r(!n)},children:[n?(0,L.jsx)(ce,{"aria-hidden":!0,size:14}):(0,L.jsx)(me,{"aria-hidden":!0,size:14}),` `,n?`Show less`:`Show more`]}):null]})]})}function st({image:e,app:t,download:n=(0,L.jsx)(Q.Suspense,{fallback:null,children:(0,L.jsx)(Ye,{source:e.source,app:t})}),referenceImages:r,models:i,canAnimate:a,onIterate:o,operations:s,library:c,onClose:l}){let d=e=>{e&&E(e,`prints-iterate-refusal`)},p=(0,Q.useRef)(null),m=j(ne(t,e.source.kind===`computer`?e.source.path:null)),h=nt(e,t).data,_=h?Ze(h,f(e.file.name)?null:m.data?.style??null):null,v=t=>e.source.kind===`computer`&&b(t,e.source.computerId)?r.find(e=>e.path===t.path):void 0,S=h?g(i,h.print.model):null,C=h?oe(h.print.costMilliunits):null,w=S?.transform?.operation,T=h?.references.at(0),D=w!==void 0&&T!==void 0?{operation:O[w],sourcePath:T.path}:null;return(0,Q.useEffect)(()=>{let e=document.activeElement;return p.current?.focus(),()=>{e instanceof HTMLElement&&e.isConnected&&e.focus()}},[]),(0,L.jsxs)(ee,{ref:p,className:`prints-info-drawer`,role:`region`,"aria-label":`Image information`,tabIndex:-1,onKeyDown:e=>{e.key===`Escape`&&(e.stopPropagation(),l())},children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between gap-sm`,children:[(0,L.jsxs)(`div`,{className:`prints-info-title`,children:[(0,L.jsx)(`h2`,{className:`text-base font-semibold`,title:e.file.name,children:e.file.name.replace(/\.[^.]+$/,``)}),(0,L.jsx)(`span`,{className:`prints-info-subtitle`,children:h?`${Qe[h.print.kind]} · ${tt.format(h.print.createdAt)}`:`Image info`})]}),(0,L.jsx)(ve,{className:`prints-info-close`,"aria-label":`Close image information`,icon:(0,L.jsx)(pe,{}),onClick:l})]}),(0,L.jsxs)(`div`,{className:`prints-info-actions`,role:`group`,"aria-label":`Image actions`,children:[_&&e.source.kind===`computer`?(0,L.jsxs)(L.Fragment,{children:[D===null?(0,L.jsx)(I,{label:`Reuse`,icon:(0,L.jsx)(de,{}),disabled:m.isPending,onClick:()=>{d(o(`reuse`,_))}}):null,_.kind===`audio`?null:(0,L.jsx)(I,{label:`Remix`,icon:(0,L.jsx)(De,{}),disabled:m.isPending,onClick:()=>{d(o(`remix`,_))}}),a&&_.kind===`image`?(0,L.jsx)(I,{label:`Animate`,icon:(0,L.jsx)(be,{}),disabled:m.isPending,onClick:()=>{d(o(`animate`,_))}}):null]}):null,c?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(I,{label:c.favorite?`Unfavorite`:`Favorite`,icon:(0,L.jsx)(ge,{}),onClick:c.onToggleFavorite}),c.onMove?(0,L.jsx)(I,{label:`Move to…`,icon:(0,L.jsx)(he,{}),onClick:c.onMove}):null]}):null,n]}),s&&h?.print.kind===`image`&&e.source.kind===`computer`?(0,L.jsx)(Je,{models:i,source:{computerId:e.source.computerId,path:e.source.path,width:e.width,height:e.height},operations:s}):null,(0,L.jsxs)(ie,{density:`compact`,className:`prints-info-facts`,children:[(0,L.jsx)($,{icon:fe,label:`File`,children:(0,L.jsx)(rt,{name:e.file.name})}),f(e.file.name)?null:(0,L.jsxs)($,{icon:Ee,label:`Size`,children:[e.width,` × `,e.height,` ·`,` `,et(e.width,e.height)]}),m.data?.style&&!f(e.file.name)?(0,L.jsx)($,{icon:Te,label:`Style`,children:m.data.style}):null,h&&D===null?(0,L.jsx)($,{icon:we,label:`Prompt`,children:(0,L.jsx)(ot,{prompt:h.typed.prompt,references:h.references.map((e,t)=>({number:t+1,name:e.path.split(`/`).at(-1)??e.path,url:v(e)?.url}))})}):null,h?(0,L.jsx)($,{icon:se,label:`Model`,children:(0,L.jsx)(`span`,{"data-print-model":!0,children:S?y(S):`${h.print.model} (no longer available)`})}):null,h&&D!==null?(0,L.jsx)($,{icon:ke,label:`Made from`,children:(0,L.jsxs)(`span`,{"data-print-source":!0,children:[D.operation,` of`,` `,D.sourcePath.split(`/`).at(-1)??D.sourcePath]})}):null,h&&h.characters.length>0?(0,L.jsx)($,{icon:Oe,label:`Characters`,children:(0,L.jsx)(`span`,{"data-print-characters":!0,children:h.characters.map(e=>`@${e}`).join(`, `)})}):null,h&&h.references.length>0?(0,L.jsx)($,{icon:_e,label:`References`,children:(0,L.jsx)(`ul`,{className:`prints-info-references`,"data-print-references":!0,"aria-label":`${String(h.references.length)} references`,children:h.references.map((e,t)=>{let n=e.path.split(`/`).at(-1),r=v(e);return(0,L.jsxs)(`li`,{title:e.path,children:[r?(0,L.jsx)(`img`,{src:r.url,alt:``}):null,(0,L.jsx)(`span`,{"data-print-reference-name":!0,children:n})]},`${String(t)}:${e.path}`)})})}):null,h!=null&&h.print.kind!==`image`&&h.print.durationSeconds!=null?(0,L.jsx)($,{icon:x,label:`Duration`,children:(0,L.jsx)(`span`,{"data-print-duration":!0,children:te(h.print.durationSeconds)})}):null,h?.print.source===`recorded`&&C!==null?(0,L.jsx)($,{icon:ye,label:`Cost`,children:(0,L.jsx)(`span`,{"data-print-cost":!0,children:C})}):null,h?(0,L.jsx)($,{icon:x,label:`Made`,children:tt.format(h.print.createdAt)}):null,t&&h?.print.source===`recorded`&&t.capabilities.has(u)?(0,L.jsx)(Ke,{app:t,printId:h.print.printId}):null]})]})}export{st as PrintInfoDrawer};
@@ -1,2 +1,2 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./print-download-button-BNNi_aoW.js","./rolldown-runtime-hePW80VL.js","./button-oE2Hrd5D.js","./modules-C4mfDnjH.js","./dist-DAokFn5x.js","./log-event-B3BGsDWO.js","./useMutation-DH-cbXIA.js","./computer-Bfe-Ioxr.js","./ellipsis-DlNHenkt.js","./dropdown-menu-CAHLGfkb.js","./useTriggerFocusGuards-Bddw7Qdn.js","./keycap-D2RkH2IS.js"])))=>i.map(i=>d[i]);
2
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{C as t,Vn as n,b as r,n as i,v as a,x as o}from"./button-oE2Hrd5D.js";import{d as s,t as c,u as l}from"./log-event-B3BGsDWO.js";import{A as u,D as d,E as f,O as p,_ as m,g as h,h as g,i as _,k as v,m as y,n as b,r as x,t as S,v as C}from"./audio-waveform-view-DbTyVH72.js";import{c as w,n as T,r as E,s as D,t as O}from"./audio-waveform-Be5wRu8s.js";import{a as k}from"./status-DNJRO5m5.js";import{a as A,u as j}from"./dropdown-menu-CAHLGfkb.js";import{n as M,t as N}from"./keycap-D2RkH2IS.js";import{c as P,l as F,n as I,s as L,t as R}from"./dialog-BXLOuKaF.js";var z=o(`ExternalLink`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),B=o(`Maximize`,[[`path`,{d:`M8 3H5a2 2 0 0 0-2 2v3`,key:`1dcmit`}],[`path`,{d:`M21 8V5a2 2 0 0 0-2-2h-3`,key:`1e4gt3`}],[`path`,{d:`M3 16v3a2 2 0 0 0 2 2h3`,key:`wsl5sc`}],[`path`,{d:`M16 21h3a2 2 0 0 0 2-2v-3`,key:`18trek`}]]),V=t(),H=e(n(),1),U=r(`badge caps-badge`,{variants:{tone:{neutral:`badge-neutral`,primary:`badge-primary`,secondary:`badge-secondary`,accent:`badge-accent`,success:`badge-success`,info:`badge-info`,warning:`badge-warning`,error:`badge-error`},size:{sm:`badge-sm`,default:`badge-md`,lg:`badge-lg`},variant:{solid:``,quiet:`caps-badge-quiet`}},defaultVariants:{tone:`neutral`,size:`default`}}),W=(0,H.forwardRef)(function({className:e,size:t,tone:n,variant:r,...i},o){return(0,V.jsx)(`span`,{...i,className:a(U({size:t,tone:n,variant:r}),e),ref:o})});function G(e){return e.map(e=>e.key)}function K(e,t,n){let r=e.indexOf(t);return r<0?null:e[r+n]??null}function q(e,t,n){if(e.includes(t))return t;let r=n.indexOf(t);if(r>=0){let t=new Set(e);for(let e=1;e<n.length;e+=1)for(let i of[e,-e]){let e=r+i;if(e<0||e>=n.length)continue;let a=n[e];if(t.has(a))return a}}return e[0]??null}function J({facts:e}){let t=b(e.url,s),n=T(e.url,96),r=e.durationSeconds??(n.status===`ready`?n.durationSeconds:void 0),i=e.mode===void 0?`Audio`:_[e.mode],a=t.progress*(r??0);return(0,V.jsxs)(`section`,{"aria-label":`${i} print`,className:`prints-audio-stage`,"data-audio-stage":!0,children:[(0,V.jsx)(W,{size:`sm`,variant:`quiet`,children:i}),(0,V.jsx)(`button`,{"aria-label":`Seek`,className:`prints-audio-stage-seek`,type:`button`,onClick:e=>{let n=e.currentTarget.getBoundingClientRect();t.seek((e.clientX-n.left)/n.width)},children:(0,V.jsx)(S,{bars:96,className:`prints-audio-stage-waveform`,progress:t.progress,url:e.url})}),(0,V.jsxs)(`div`,{className:`prints-audio-stage-controls`,children:[(0,V.jsx)(M,{"aria-label":t.playing?`Pause`:`Play`,icon:t.playing?(0,V.jsx)(d,{}):(0,V.jsx)(f,{}),iconSize:`md`,size:`default`,variant:`accent`,onClick:t.toggle}),(0,V.jsxs)(`span`,{className:`prints-audio-stage-time`,children:[O(a,`elapsed`),r===void 0?null:` / ${O(r)}`]})]})]})}var Y=(0,H.lazy)(async()=>({default:(await E(()=>import(`./print-download-button-BNNi_aoW.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11]),import.meta.url)).PrintDownloadButton}));function X({url:e,path:t,onError:n,autoPlay:r}){let i=(0,H.useRef)(null);return(0,H.useEffect)(()=>{let t=i.current;if(!t)return;let a=!1;return r&&t.play().catch(t=>{a||t instanceof DOMException&&(t.name===`NotAllowedError`||t.name===`AbortError`)||(c(`play-print-video`,t),n(e))}),()=>{a=!0,t.pause()}},[e,n,r]),(0,V.jsx)(`video`,{ref:i,src:e,"aria-label":t,controls:!0,playsInline:!0,preload:`auto`,className:`block max-h-full max-w-full object-contain`,onError:()=>{n(e)}})}function Z({item:e,actualSize:t}){let[n,r]=(0,H.useState)(null),[a,o]=(0,H.useState)(null),s=e.pending===!0&&!e.onVisible,[c,u]=(0,H.useState)(s);s&&!c&&u(!0);let d=e.pendingLabel??`Loading print…`,f=s?`Not saved`:`Prints can’t show this file`,p=(0,V.jsx)(`img`,{src:e.url,alt:e.path,decoding:`async`,width:t?e.width:void 0,height:t?e.height:void 0,className:t?`block max-w-none`:`block max-h-full max-w-full object-contain`,onLoad:()=>{r(e.url)},onError:()=>{o(e.url)}},e.url);return(0,V.jsx)(`div`,{className:`relative flex min-h-0 min-w-0 flex-1 items-center justify-center overflow-hidden`,"data-print-viewer-stage":!0,children:e.error||a===e.url?(0,V.jsx)(x,{status:`failed`,className:`h-full w-full`,failure:(0,V.jsxs)(`div`,{className:`flex max-w-full flex-col items-center gap-sm px-md text-center`,children:[(0,V.jsx)(`p`,{className:`max-w-full break-words text-sm`,children:e.path}),(0,V.jsx)(y,{density:`tile`,message:e.error?`${f}: ${e.error}`:f,onRetry:e.onRetry,onDismiss:e.onDismiss})]})}):l(e.path)&&e.url?(0,V.jsx)(J,{facts:{url:e.url}}):j(e.path)&&e.url?(0,V.jsx)(X,{url:e.url,path:e.path,onError:o,autoPlay:!c}):e.url?(0,V.jsxs)(V.Fragment,{children:[t?(0,V.jsx)(g,{className:`h-full w-full`,role:`region`,"aria-label":`Actual-size print`,tabIndex:0,"data-print-viewer-scroll":!0,children:p}):p,n===e.url?null:(0,V.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center`,children:(0,V.jsx)(i,{label:`Loading print`,variant:`bloom`})})]}):(0,V.jsx)(x,{status:`generating`,label:d,className:`h-full w-full`,indicator:(0,V.jsxs)(`div`,{"aria-hidden":`true`,className:`flex max-w-full flex-col items-center gap-sm px-md text-center`,children:[(0,V.jsx)(i,{decorative:!0,variant:`bloom`}),(0,V.jsx)(`p`,{className:`text-sm`,children:d})]})})})}var Q=`(max-width: 640px)`;function $(){return(0,H.useSyncExternalStore)(e=>{let t=globalThis.matchMedia(Q);return t.addEventListener(`change`,e),()=>{t.removeEventListener(`change`,e)}},()=>globalThis.matchMedia(Q).matches,()=>!1)}function ee(e){let[t,n]=(0,H.useState)(!1);return{pending:t,open:()=>{e&&(n(!0),m(e).catch(t=>{c(`open-print-in-inkcap`,t),D(`Could not open ${e.path} in Inkcap.`,`prints-inkcap-open`)}).finally(()=>{n(!1)}))}}}function te({source:e,app:t,inkcap:n,phone:r}){let i=e.kind===`computer`&&n?e:null,a=ee(i);return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(H.Suspense,{fallback:null,children:(0,V.jsx)(Y,{source:e,app:t,presentation:r?`menu`:`key`,menuItems:i?(0,V.jsx)(A,{disabled:a.pending,onSelect:a.open,children:`Open in Inkcap`}):void 0})}),i&&!r?(0,V.jsx)(N,{label:`Open in Inkcap`,icon:(0,V.jsx)(z,{}),disabled:a.pending,onClick:a.open}):null]})}function ne({items:e,images:t,viewerKey:n,app:r,onNavigate:i,onClose:a,renderInfo:o}){let s=(0,H.useRef)(null),c=C(r),d=$(),f=G(e),m=(0,H.useRef)(f),g=n===null?null:q(f,n,m.current);(0,H.useEffect)(()=>{m.current=f,n!==null&&g!==n&&(g===null?a(n):i(g))},[f,g,n,a,i]),(0,H.useEffect)(()=>{if(g===null)return;let t=e.findIndex(e=>e.key===g);for(let n of e.slice(Math.max(0,t-1),t+2))n.onVisible?.()},[e,g]);let[_,y]=(0,H.useState)(null),[b,x]=(0,H.useState)(null);(0,H.useEffect)(()=>{x(null)},[g]),(0,H.useEffect)(()=>{y(null)},[n]);let S=e.find(e=>e.key===g),T=t.find(e=>h(e)===g);if(!S||g===null)return null;let E=K(f,g,-1),D=K(f,g,1),O=S.path.split(`/`).at(-1)??S.path,A=()=>{a(g)},N=e=>{e!==null&&i(e)};return(0,V.jsx)(R,{open:!0,onOpenChange:e=>{e||A()},children:(0,V.jsxs)(P,{children:[(0,V.jsx)(I,{}),(0,V.jsxs)(L,{ref:s,size:`fill`,initialFocus:s,finalFocus:!1,className:`flex min-h-0 flex-col gap-sm`,onKeyDown:e=>{e.altKey||e.ctrlKey||e.metaKey||e.target instanceof HTMLElement&&e.target.closest(`input, textarea, select, video, [data-print-viewer-scroll], [contenteditable=true]`)||(e.key===`ArrowLeft`||e.key===`ArrowRight`?(e.preventDefault(),N(e.key===`ArrowLeft`?E:D)):e.key.toLowerCase()===`i`&&T&&(e.preventDefault(),y(_===g?null:g)))},children:[(0,V.jsx)(w,{className:`prints-viewer-frame`,children:(0,V.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col`,children:[(0,V.jsxs)(`div`,{className:`prints-viewer-caption`,"data-print-viewer-caption":!0,children:[(0,V.jsx)(F,{className:`prints-viewer-caption-name truncate text-xs font-normal`,children:O}),(0,V.jsxs)(`span`,{className:`prints-viewer-caption-position`,"aria-live":`polite`,"aria-atomic":`true`,children:[(0,V.jsxs)(`span`,{className:`sr-only`,children:[O,`, `]}),f.indexOf(g)+1,` of `,f.length]})]}),(0,V.jsxs)(`div`,{className:`@container relative flex min-h-0 min-w-0 flex-1`,children:[(0,V.jsx)(Z,{item:S,actualSize:b===g},g),_===g&&T?o(T,()=>{y(null)}):null]})]})}),(0,V.jsxs)(`div`,{className:`prints-viewer-actions`,children:[(0,V.jsx)(M,{size:`default`,iconSize:`md`,"aria-label":`Previous print`,title:`Previous print (Left arrow)`,"aria-keyshortcuts":`ArrowLeft`,icon:(0,V.jsx)(u,{}),disabled:E===null,onClick:()=>{N(E)}}),(0,V.jsx)(M,{size:`default`,iconSize:`md`,"aria-label":`Next print`,title:`Next print (Right arrow)`,"aria-keyshortcuts":`ArrowRight`,icon:(0,V.jsx)(v,{}),disabled:D===null,onClick:()=>{N(D)}}),(0,V.jsx)(M,{size:`default`,iconSize:`md`,"aria-label":`Image info`,title:`Image info (I)`,"aria-keyshortcuts":`i`,"aria-expanded":_===g,icon:(0,V.jsx)(p,{}),disabled:!T,onClick:()=>{y(_===g?null:g)}}),!j(S.path)&&!l(S.path)?(0,V.jsx)(M,{size:`default`,iconSize:`md`,"aria-label":`Actual size`,title:`Actual size`,"aria-pressed":b===g,active:b===g,icon:(0,V.jsx)(B,{}),disabled:!S.url||!!S.error,onClick:()=>{x(b===g?null:g)}}):null,T?(0,V.jsx)(te,{source:T.source,app:r,inkcap:c,phone:d},`${g}\n${T.url}`):null,(0,V.jsx)(M,{size:`default`,iconSize:`md`,"aria-label":`Close viewer`,title:`Close viewer (Escape)`,icon:(0,V.jsx)(k,{}),onClick:A})]})]})]})})}export{ne as PrintViewer};
2
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{C as t,Vn as n,b as r,n as i,v as a,x as o}from"./button-oE2Hrd5D.js";import{d as s,t as c,u as l}from"./log-event-B3BGsDWO.js";import{A as u,D as d,E as f,O as p,_ as m,g as h,h as g,i as _,k as v,m as y,n as b,r as x,t as S,v as C}from"./audio-waveform-view-D-icMwdH.js";import{c as w,n as T,r as E,s as D,t as O}from"./audio-waveform-xSq1S4ms.js";import{a as k}from"./status-DNJRO5m5.js";import{a as A,u as j}from"./dropdown-menu-CAHLGfkb.js";import{n as M,t as N}from"./keycap-D2RkH2IS.js";import{c as P,l as F,n as I,s as L,t as R}from"./dialog-BXLOuKaF.js";var z=o(`ExternalLink`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),B=o(`Maximize`,[[`path`,{d:`M8 3H5a2 2 0 0 0-2 2v3`,key:`1dcmit`}],[`path`,{d:`M21 8V5a2 2 0 0 0-2-2h-3`,key:`1e4gt3`}],[`path`,{d:`M3 16v3a2 2 0 0 0 2 2h3`,key:`wsl5sc`}],[`path`,{d:`M16 21h3a2 2 0 0 0 2-2v-3`,key:`18trek`}]]),V=t(),H=e(n(),1),U=r(`badge caps-badge`,{variants:{tone:{neutral:`badge-neutral`,primary:`badge-primary`,secondary:`badge-secondary`,accent:`badge-accent`,success:`badge-success`,info:`badge-info`,warning:`badge-warning`,error:`badge-error`},size:{sm:`badge-sm`,default:`badge-md`,lg:`badge-lg`},variant:{solid:``,quiet:`caps-badge-quiet`}},defaultVariants:{tone:`neutral`,size:`default`}}),W=(0,H.forwardRef)(function({className:e,size:t,tone:n,variant:r,...i},o){return(0,V.jsx)(`span`,{...i,className:a(U({size:t,tone:n,variant:r}),e),ref:o})});function G(e){return e.map(e=>e.key)}function K(e,t,n){let r=e.indexOf(t);return r<0?null:e[r+n]??null}function q(e,t,n){if(e.includes(t))return t;let r=n.indexOf(t);if(r>=0){let t=new Set(e);for(let e=1;e<n.length;e+=1)for(let i of[e,-e]){let e=r+i;if(e<0||e>=n.length)continue;let a=n[e];if(t.has(a))return a}}return e[0]??null}function J({facts:e}){let t=b(e.url,s),n=T(e.url,96),r=e.durationSeconds??(n.status===`ready`?n.durationSeconds:void 0),i=e.mode===void 0?`Audio`:_[e.mode],a=t.progress*(r??0);return(0,V.jsxs)(`section`,{"aria-label":`${i} print`,className:`prints-audio-stage`,"data-audio-stage":!0,children:[(0,V.jsx)(W,{size:`sm`,variant:`quiet`,children:i}),(0,V.jsx)(`button`,{"aria-label":`Seek`,className:`prints-audio-stage-seek`,type:`button`,onClick:e=>{let n=e.currentTarget.getBoundingClientRect();t.seek((e.clientX-n.left)/n.width)},children:(0,V.jsx)(S,{bars:96,className:`prints-audio-stage-waveform`,progress:t.progress,url:e.url})}),(0,V.jsxs)(`div`,{className:`prints-audio-stage-controls`,children:[(0,V.jsx)(M,{"aria-label":t.playing?`Pause`:`Play`,icon:t.playing?(0,V.jsx)(d,{}):(0,V.jsx)(f,{}),iconSize:`md`,size:`default`,variant:`accent`,onClick:t.toggle}),(0,V.jsxs)(`span`,{className:`prints-audio-stage-time`,children:[O(a,`elapsed`),r===void 0?null:` / ${O(r)}`]})]})]})}var Y=(0,H.lazy)(async()=>({default:(await E(()=>import(`./print-download-button-BNNi_aoW.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11]),import.meta.url)).PrintDownloadButton}));function X({url:e,path:t,onError:n,autoPlay:r}){let i=(0,H.useRef)(null);return(0,H.useEffect)(()=>{let t=i.current;if(!t)return;let a=!1;return r&&t.play().catch(t=>{a||t instanceof DOMException&&(t.name===`NotAllowedError`||t.name===`AbortError`)||(c(`play-print-video`,t),n(e))}),()=>{a=!0,t.pause()}},[e,n,r]),(0,V.jsx)(`video`,{ref:i,src:e,"aria-label":t,controls:!0,playsInline:!0,preload:`auto`,className:`block max-h-full max-w-full object-contain`,onError:()=>{n(e)}})}function Z({item:e,actualSize:t}){let[n,r]=(0,H.useState)(null),[a,o]=(0,H.useState)(null),s=e.pending===!0&&!e.onVisible,[c,u]=(0,H.useState)(s);s&&!c&&u(!0);let d=e.pendingLabel??`Loading print…`,f=s?`Not saved`:`Prints can’t show this file`,p=(0,V.jsx)(`img`,{src:e.url,alt:e.path,decoding:`async`,width:t?e.width:void 0,height:t?e.height:void 0,className:t?`block max-w-none`:`block max-h-full max-w-full object-contain`,onLoad:()=>{r(e.url)},onError:()=>{o(e.url)}},e.url);return(0,V.jsx)(`div`,{className:`relative flex min-h-0 min-w-0 flex-1 items-center justify-center overflow-hidden`,"data-print-viewer-stage":!0,children:e.error||a===e.url?(0,V.jsx)(x,{status:`failed`,className:`h-full w-full`,failure:(0,V.jsxs)(`div`,{className:`flex max-w-full flex-col items-center gap-sm px-md text-center`,children:[(0,V.jsx)(`p`,{className:`max-w-full break-words text-sm`,children:e.path}),(0,V.jsx)(y,{density:`tile`,message:e.error?`${f}: ${e.error}`:f,onRetry:e.onRetry,onDismiss:e.onDismiss})]})}):l(e.path)&&e.url?(0,V.jsx)(J,{facts:{url:e.url}}):j(e.path)&&e.url?(0,V.jsx)(X,{url:e.url,path:e.path,onError:o,autoPlay:!c}):e.url?(0,V.jsxs)(V.Fragment,{children:[t?(0,V.jsx)(g,{className:`h-full w-full`,role:`region`,"aria-label":`Actual-size print`,tabIndex:0,"data-print-viewer-scroll":!0,children:p}):p,n===e.url?null:(0,V.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center`,children:(0,V.jsx)(i,{label:`Loading print`,variant:`bloom`})})]}):(0,V.jsx)(x,{status:`generating`,label:d,className:`h-full w-full`,indicator:(0,V.jsxs)(`div`,{"aria-hidden":`true`,className:`flex max-w-full flex-col items-center gap-sm px-md text-center`,children:[(0,V.jsx)(i,{decorative:!0,variant:`bloom`}),(0,V.jsx)(`p`,{className:`text-sm`,children:d})]})})})}var Q=`(max-width: 640px)`;function $(){return(0,H.useSyncExternalStore)(e=>{let t=globalThis.matchMedia(Q);return t.addEventListener(`change`,e),()=>{t.removeEventListener(`change`,e)}},()=>globalThis.matchMedia(Q).matches,()=>!1)}function ee(e){let[t,n]=(0,H.useState)(!1);return{pending:t,open:()=>{e&&(n(!0),m(e).catch(t=>{c(`open-print-in-inkcap`,t),D(`Could not open ${e.path} in Inkcap.`,`prints-inkcap-open`)}).finally(()=>{n(!1)}))}}}function te({source:e,app:t,inkcap:n,phone:r}){let i=e.kind===`computer`&&n?e:null,a=ee(i);return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(H.Suspense,{fallback:null,children:(0,V.jsx)(Y,{source:e,app:t,presentation:r?`menu`:`key`,menuItems:i?(0,V.jsx)(A,{disabled:a.pending,onSelect:a.open,children:`Open in Inkcap`}):void 0})}),i&&!r?(0,V.jsx)(N,{label:`Open in Inkcap`,icon:(0,V.jsx)(z,{}),disabled:a.pending,onClick:a.open}):null]})}function ne({items:e,images:t,viewerKey:n,app:r,onNavigate:i,onClose:a,renderInfo:o}){let s=(0,H.useRef)(null),c=C(r),d=$(),f=G(e),m=(0,H.useRef)(f),g=n===null?null:q(f,n,m.current);(0,H.useEffect)(()=>{m.current=f,n!==null&&g!==n&&(g===null?a(n):i(g))},[f,g,n,a,i]),(0,H.useEffect)(()=>{if(g===null)return;let t=e.findIndex(e=>e.key===g);for(let n of e.slice(Math.max(0,t-1),t+2))n.onVisible?.()},[e,g]);let[_,y]=(0,H.useState)(null),[b,x]=(0,H.useState)(null);(0,H.useEffect)(()=>{x(null)},[g]),(0,H.useEffect)(()=>{y(null)},[n]);let S=e.find(e=>e.key===g),T=t.find(e=>h(e)===g);if(!S||g===null)return null;let E=K(f,g,-1),D=K(f,g,1),O=S.path.split(`/`).at(-1)??S.path,A=()=>{a(g)},N=e=>{e!==null&&i(e)};return(0,V.jsx)(R,{open:!0,onOpenChange:e=>{e||A()},children:(0,V.jsxs)(P,{children:[(0,V.jsx)(I,{}),(0,V.jsxs)(L,{ref:s,size:`fill`,initialFocus:s,finalFocus:!1,className:`flex min-h-0 flex-col gap-sm`,onKeyDown:e=>{e.altKey||e.ctrlKey||e.metaKey||e.target instanceof HTMLElement&&e.target.closest(`input, textarea, select, video, [data-print-viewer-scroll], [contenteditable=true]`)||(e.key===`ArrowLeft`||e.key===`ArrowRight`?(e.preventDefault(),N(e.key===`ArrowLeft`?E:D)):e.key.toLowerCase()===`i`&&T&&(e.preventDefault(),y(_===g?null:g)))},children:[(0,V.jsx)(w,{className:`prints-viewer-frame`,children:(0,V.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col`,children:[(0,V.jsxs)(`div`,{className:`prints-viewer-caption`,"data-print-viewer-caption":!0,children:[(0,V.jsx)(F,{className:`prints-viewer-caption-name truncate text-xs font-normal`,children:O}),(0,V.jsxs)(`span`,{className:`prints-viewer-caption-position`,"aria-live":`polite`,"aria-atomic":`true`,children:[(0,V.jsxs)(`span`,{className:`sr-only`,children:[O,`, `]}),f.indexOf(g)+1,` of `,f.length]})]}),(0,V.jsxs)(`div`,{className:`@container relative flex min-h-0 min-w-0 flex-1`,children:[(0,V.jsx)(Z,{item:S,actualSize:b===g},g),_===g&&T?o(T,()=>{y(null)}):null]})]})}),(0,V.jsxs)(`div`,{className:`prints-viewer-actions`,children:[(0,V.jsx)(M,{size:`default`,iconSize:`md`,"aria-label":`Previous print`,title:`Previous print (Left arrow)`,"aria-keyshortcuts":`ArrowLeft`,icon:(0,V.jsx)(u,{}),disabled:E===null,onClick:()=>{N(E)}}),(0,V.jsx)(M,{size:`default`,iconSize:`md`,"aria-label":`Next print`,title:`Next print (Right arrow)`,"aria-keyshortcuts":`ArrowRight`,icon:(0,V.jsx)(v,{}),disabled:D===null,onClick:()=>{N(D)}}),(0,V.jsx)(M,{size:`default`,iconSize:`md`,"aria-label":`Image info`,title:`Image info (I)`,"aria-keyshortcuts":`i`,"aria-expanded":_===g,icon:(0,V.jsx)(p,{}),disabled:!T,onClick:()=>{y(_===g?null:g)}}),!j(S.path)&&!l(S.path)?(0,V.jsx)(M,{size:`default`,iconSize:`md`,"aria-label":`Actual size`,title:`Actual size`,"aria-pressed":b===g,active:b===g,icon:(0,V.jsx)(B,{}),disabled:!S.url||!!S.error,onClick:()=>{x(b===g?null:g)}}):null,T?(0,V.jsx)(te,{source:T.source,app:r,inkcap:c,phone:d},`${g}\n${T.url}`):null,(0,V.jsx)(M,{size:`default`,iconSize:`md`,"aria-label":`Close viewer`,title:`Close viewer (Escape)`,icon:(0,V.jsx)(k,{}),onClick:A})]})]})]})})}export{ne as PrintViewer};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{$t as t,C as n,Ct as r,E as i,F as a,Ft as o,I as s,It as c,Jt as l,K as u,L as d,M as f,Nt as p,P as m,Pt as h,Qt as g,S as _,St as v,T as y,U as b,V as x,Vn as S,X as C,Xt as w,Yt as T,Z as E,Zt as D,_ as O,_t as k,a as A,an as j,bt as M,dt as N,en as P,ft as F,gt as I,h as L,ht as R,in as z,j as ee,jt as te,kn as ne,kt as B,mt as re,nn as ie,o as ae,on as oe,pt as se,rn as ce,s as le,st as ue,t as V,tn as de,v as H,vt as U,w as W,wt as fe,x as pe,xt as me,yt as he,z as ge}from"./button-oE2Hrd5D.js";import{a as _e,d as ve,i as ye,l as be,m as xe,t as Se,u as Ce}from"./textarea-LIOZDOK4.js";import{i as we,o as Te,r as Ee,t as De}from"./status-DNJRO5m5.js";import{_ as Oe,a as ke,c as Ae,d as je,f as G,g as Me,h as K,i as Ne,l as Pe,m as Fe,n as Ie,o as Le,p as Re,r as ze,s as Be,t as Ve,u as He}from"./upload-queue-BHAaEiPu.js";import{r as Ue}from"./modules-C4mfDnjH.js";import{A as We,B as Ge,C as Ke,D as qe,E as Je,F as Ye,G as Xe,Gt as Ze,H as Qe,I as $e,Kt as et,M as tt,N as nt,O as rt,On as it,P as at,Q as ot,S as st,St as ct,T as lt,Tn as ut,U as dt,V as ft,W as pt,X as mt,Y as ht,_ as gt,a as _t,b as q,bn as vt,bt as yt,c as bt,f as xt,fn as St,g as Ct,gn as wt,h as Tt,i as Et,j as Dt,k as Ot,kn as kt,lt as At,m as jt,mn as Mt,n as Nt,o as Pt,p as Ft,qt as It,r as Lt,s as Rt,t as zt,tt as Bt,u as Vt,v as Ht,vt as Ut,w as Wt,x as Gt,y as Kt,yn as J}from"./useTriggerFocusGuards-Bddw7Qdn.js";import{t as qt}from"./keycap-D2RkH2IS.js";import{a as Jt,i as Yt,l as Xt,o as Zt,r as Qt,t as $t}from"./dialog-BXLOuKaF.js";var en=pe(`EyeOff`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),tn=pe(`Eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Y=e(S(),1);function nn({getKey:e,isDisabled:t=()=>!1,items:n}){let r=(0,Y.useMemo)(()=>{let r=n.map(e);if(r.some(e=>!e))throw Error(`Selectable items require non-empty keys`);if(new Set(r).size!==r.length)throw Error(`Selectable items require unique keys`);return n.filter(e=>!t(e))},[e,t,n]),[i,a]=(0,Y.useState)(null);(0,Y.useEffect)(()=>{i!==null&&!r.some(t=>e(t)===i)&&a(null)},[i,r,e]);let o=r.find(t=>e(t)===i),s=o?r.findIndex(t=>e(t)===i):-1;return{activeIndex:s,activeItem:o,activeKey:i,enabledItems:r,move:(t,n)=>{if(r.length===0)return;let i=n?n===`start`?0:r.length-1:s<0?t>0?0:r.length-1:(s+t+r.length)%r.length,o=r[i];o&&a(e(o))},setActiveKey:a}}var rn=u(a),an=u(s({message:a}));function on(e){for(let t of e.errors){let e=te(c(h(an(t),e=>e.message),()=>rn(t)));if(e!==void 0&&e.length>0)return e}}var sn=Y.createContext(void 0);function X(e){let t=Y.useContext(sn);if(t===void 0&&!e)throw Error(J(47));return t}var cn=e(_(),1),ln={...q,disabled:e=>e.disabled,instantType:e=>e.instantType===`trigger-change`&&!q.open(e)?void 0:e.instantType,openMethod:e=>e.openMethod,openChangeReason:e=>e.openChangeReason,isPressOpenedByTrigger:(e,t)=>e.openChangeReason===`trigger-press`&&q.isOpenedByTrigger(e,t),isTouchPressOpen:(e,t)=>t&&e.openMethod===`touch`&&e.openChangeReason===`trigger-press`,hasTriggerFocusGuards:(e,t)=>q.isOpenedByTrigger(e,t)&&!e.focusManagerModal,modal:e=>e.modal,titleElementId:e=>e.titleElementId,descriptionElementId:e=>e.descriptionElementId,openOnHover:e=>e.openOnHover,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin},un=class extends Gt{constructor(e,t,n){let r=new Wt;super(dn(e,r,t,n),fn(r),ln)}setOpen=(e,t)=>{let n=t.reason===Ut,r=t.reason===`trigger-press`&&t.event.detail===0,i=!e&&(t.reason===`escape-key`||t.reason==null),a=qe(t),o=this.select(`activeTriggerId`);if(!e&&t.reason===`close-press`&&t.trigger==null&&o!=null&&(t.trigger=this.context.triggerElements.getById(o)??this.select(`activeTriggerElement`)??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let s=()=>{let n=Ot(this.state,e,t.trigger,a());n.openChangeReason=t.reason,this.update(n)};n?(this.context.stickIfOpen=!0,this.context.stickIfOpenTimeout.start(500,()=>{this.context.stickIfOpen=!1}),cn.flushSync(s)):s();let c;r?c=`click`:i?c=`dismiss`:t.reason===`focus-out`&&(c=`focus`),this.set(`instantType`,c)}};function dn(e,t,n,r=!1){let i={...Kt(t,n,r),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,openOnHover:!1,closeDelay:0,adaptiveOrigin:void 0,...e};return i.open&&e?.mounted===void 0&&(i.mounted=!0),i}function fn(e){return{popupRef:Y.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:Y.createRef(),beforeTriggerFocusGuardRef:Y.createRef(),beforeContentFocusGuardRef:Y.createRef(),stickIfOpenTimeout:new vt,stickIfOpen:!0,triggerElements:e}}var Z=n(),pn=st(function({props:e}){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,modal:o=!1,handle:s,triggerId:c,defaultTriggerId:l=null}=e,u=hn(s,{modal:o,open:r,openProp:n,activeTriggerId:l,triggerIdProp:c});u.useControlledProp(`openProp`,n),u.useControlledProp(`triggerIdProp`,c);let d=u.useState(`open`),f=u.useState(`mounted`),p=u.useState(`payload`);u.useContextCallback(`onOpenChange`,i),u.useContextCallback(`onOpenChangeComplete`,a),at(u,d),We(u);let{forceUnmount:m}=Dt(d,u,()=>{u.context.stickIfOpen=!0,u.set(`openChangeReason`,null)});u.useSyncedValues({modal:o}),Y.useEffect(()=>{d||u.context.stickIfOpenTimeout.clear()},[u,d]),Y.useImperativeHandle(e.actionsRef,()=>({unmount:m,close:()=>u.setOpen(!1,yt(At))}),[m,u]);let h=d||f||s!=null;return(0,Z.jsxs)(sn.Provider,{value:u,children:[s&&(0,Z.jsx)(Je,{handle:s,store:u}),h&&(0,Z.jsx)(gn,{store:u,modal:o}),typeof t==`function`?t({payload:p}):t]})});function mn(e){return X(!0)?(0,Z.jsx)(pn,{props:e}):(0,Z.jsx)(pt,{children:(0,Z.jsx)(pn,{props:e})})}function hn(e,t){let n=nt((e,n)=>new un(t,e,n));return Y.useEffect(()=>n.context.stickIfOpenTimeout.disposeEffect(),[n]),n}function gn({store:e,modal:t}){let n=e.useState(`floatingRootContext`),r=Ge(n,{outsidePressEvent:{mouse:t===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}}),i=r.reference,a=r.floating;return tt(e,{activeTriggerProps:i,inactiveTriggerProps:i,popupProps:a}),null}var _n=Ke(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,handle:s,payload:c,openOnHover:l=!1,delay:u=300,closeDelay:d=0,id:f,...p}=e,m=X(!0),h=Ht(s)??m;if(!h)throw Error(J(74));let g=Mt(f),_=h.useState(`isTriggerActive`,g),v=h.useState(`floatingRootContext`),y=h.useState(`isOpenedByTrigger`,g),b=h.useState(`triggerPopupId`,g),x=Y.useRef(null),{registerTrigger:S,isMountedByThisTrigger:C}=Ye(g,x,h,{payload:c,disabled:a,openOnHover:l,closeDelay:d}),w=h.useState(`isPressOpenedByTrigger`,g),T=h.useState(`isTouchPressOpen`,l),E=h.useState(`hasTriggerFocusGuards`,g),D=Ct(v,{enabled:!a&&l&&!T,mouseOnly:!0,move:!1,handleClose:Tt(),restMs:u,delay:{close:d},triggerElementRef:x,isActiveTrigger:_,isClosing:()=>h.select(`transitionStatus`)===`ending`}),O=ut(()=>h.context.stickIfOpen),k=ft(v,{stickIfOpen:O}),A=Vt(()=>h.select(`open`),e=>{h.set(`openMethod`,e)}),j=h.useState(`triggerProps`,C),{getButtonProps:M,buttonRef:N}=ct({disabled:a,native:o}),P={open(e){return w?et.open(e):It.open(e)}},{handlePreFocusGuardFocus:F,handleFocusTargetFocus:I}=zt(h,x),L=wt(`button`,e,{state:{disabled:a,open:y},ref:[N,t,S,x],props:[k.reference,D,j,A,{[mt]:``,id:g,"aria-haspopup":`dialog`,"aria-expanded":y,"aria-controls":b},p,M],stateAttributesMapping:P}),R=(0,Z.jsx)(Y.Fragment,{children:L},g);return E?(0,Z.jsxs)(Y.Fragment,{children:[(0,Z.jsx)(Bt,{ref:h.context.beforeTriggerFocusGuardRef,onFocus:F}),R,(0,Z.jsx)(Bt,{ref:h.context.triggerFocusTargetRef,onFocus:I})]}):R}),vn=Y.createContext(void 0);function yn(){let e=Y.useContext(vn);if(e===void 0)throw Error(J(45));return e}var bn=Y.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return X().useState(`mounted`)||n?(0,Z.jsx)(vn.Provider,{value:n,children:(0,Z.jsx)(ht,{ref:t,...r})}):null}),xn=Y.createContext(void 0);function Sn(){let e=Y.useContext(xn);if(!e)throw Error(J(46));return e}var Cn=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,anchor:a,positionMethod:o,side:s,align:c,sideOffset:l,alignOffset:u,collisionBoundary:d=`clipping-ancestors`,collisionPadding:f,arrowPadding:p,sticky:m,disableAnchorTracking:h=!1,collisionAvoidance:g=ot,..._}=e,v=X(),y=yn(),b=Xe(),x=v.useState(`floatingRootContext`),S=v.useState(`mounted`),C=v.useState(`open`),w=v.useState(`openChangeReason`),T=v.useState(`activeTriggerElement`),E=v.useState(`modal`),D=v.useState(`openMethod`),O=v.useState(`positionerElement`),k=v.useState(`instantType`),A=v.useState(`transitionStatus`),j=v.useState(`adaptiveOrigin`),M=_t({anchor:a,floatingRootContext:x,positionMethod:o,mounted:S,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:p,collisionBoundary:d,collisionPadding:f,sticky:m,disableAnchorTracking:h,keepMounted:y,nodeId:b,collisionAvoidance:g,adaptiveOrigin:j}),N=x.useState(`domReferenceElement`);Et({store:v,domReference:N,positionerElement:O,open:C});let P=E===!0&&w!==`trigger-hover`;Nt(C&&P,D===`touch`,O,T);let F=v.useStateSetter(`positionerElement`),I={open:C,side:M.side,align:M.align,anchorHidden:M.anchorHidden,instant:k},L=Lt(e,I,{styles:M.positionerStyles,transitionStatus:A,props:_,refs:[t,F],hidden:!S,inert:!C});return(0,Z.jsxs)(xn.Provider,{value:M,children:[S&&P&&(0,Z.jsx)(xt,{inert:Ft(!C),cutout:T}),(0,Z.jsx)(dt,{id:b,children:L})]})}),wn=Y.createContext(void 0);function Tn(){let[e,t]=Y.useState(0),n=ut(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:Y.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}var En=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...s}=e,c=X(),l=Sn(),u=Rt(!0)!=null,{context:d,hasClosePart:f}=Tn(),p=c.useState(`open`),m=c.useState(`openMethod`),h=c.useState(`instantType`),g=c.useState(`transitionStatus`),_=c.useState(`popupProps`),v=c.useState(`titleElementId`),y=c.useState(`descriptionElementId`),b=c.useState(`modal`),x=c.useState(`mounted`),S=c.useState(`openChangeReason`),C=c.useState(`activeTriggerElement`),w=c.useState(`floatingRootContext`),T=w.useState(`floatingId`),E=c.useState(`disabled`),D=c.useState(`openOnHover`),O=c.useState(`closeDelay`);$e({open:p,ref:c.context.popupRef,onComplete(){p&&c.context.onOpenChangeComplete?.(!0)}}),gt(w,{enabled:D&&!E,closeDelay:O});let k=a===void 0?rt(c.context.popupRef):a,A=b!==!1&&f;c.useSyncedValue(`focusManagerModal`,A);let j=c.useStateSetter(`popupElement`),M={open:p,side:l.side,align:l.align,instant:h,transitionStatus:g},N=wt(`div`,e,{state:M,ref:[t,c.context.popupRef,j],props:[_,{id:T,role:`dialog`,...lt,"aria-labelledby":v,"aria-describedby":y,onKeyDown(e){u&&jt.has(e.key)&&e.stopPropagation()}},Pt(g),s],stateAttributesMapping:Ze});return(0,Z.jsx)(Qe,{context:w,openInteractionType:m,modal:A,disabled:!x||S===`trigger-hover`,initialFocus:k,returnFocus:o,restoreFocus:`popup`,getInsideElements:()=>[c.context.beforeTriggerFocusGuardRef.current],previousFocusableElement:St(C)?C:void 0,nextFocusableElement:c.context.triggerFocusTargetRef,beforeContentFocusGuardRef:c.context.beforeContentFocusGuardRef,children:(0,Z.jsx)(wn.Provider,{value:d,children:N})})}),Dn=(0,Y.forwardRef)(function({children:e,className:t,type:n=`button`,...r},i){return(0,Z.jsxs)(`button`,{...r,ref:i,type:n,className:H(`select caps-select caps-combobox-trigger w-full`,t),children:[(0,Z.jsx)(`span`,{children:e}),(0,Z.jsx)(Te,{className:`caps-select-chevron`,"aria-hidden":`true`})]})});function On({defaultInputValue:e,defaultOpen:t,defaultValue:n,getKey:r,getSearchText:i,groupBy:a,id:o,isDisabled:s,items:c,onOpenChange:l,onCommit:u,multiple:d,controlledOpen:f,controlledKeys:p,trigger:m}){let h=`${o}-listbox`,[g,_]=(0,Y.useState)(e),[v,y]=(0,Y.useState)(!1),[b,x]=(0,Y.useState)(n),[S,C]=(0,Y.useState)(t),w=p??(b===null?[]:[b]),T=m?f??S:!0,E=(0,Y.useMemo)(()=>{let e=g.trim().toLowerCase();return e?c.filter(t=>i(t).toLowerCase().includes(e)):c},[i,c,g]),D=nn({getKey:r,isDisabled:s,items:E});(0,Y.useEffect)(()=>{if(D.activeKey!==null)return;let e=D.enabledItems.find(e=>w.includes(r(e)))??D.enabledItems[0];e&&D.setActiveKey(r(e))},[D.activeKey,D.enabledItems,D.setActiveKey,r,w]);let O=e=>{y(!1),e||_(``),f===void 0&&C(e),l?.(e)},k=e=>`${h}-option-${encodeURIComponent(e)}`,A=e=>{let t=r(e);p===void 0&&x(t),u(e),m&&!d&&O(!1)},j=e=>{y(!0),_(e.target.value),D.setActiveKey(null)},M=e=>{if(be(e))return;let t;switch(e.key){case`ArrowDown`:t=[1,void 0];break;case`ArrowUp`:t=[-1,void 0];break;case`End`:t=[1,`end`];break;case`Home`:t=[-1,`start`]}t?(y(!0),e.preventDefault(),D.move(t[0],t[1])):e.key===`Enter`&&D.activeItem&&(e.preventDefault(),A(D.activeItem))},N=(0,Y.useMemo)(()=>{if(!a)return[{label:``,items:E}];let e=new Map;for(let t of E){let n=a(t),r=e.get(n);r?r.push(t):e.set(n,[t])}return[...e].map(([e,t])=>({label:e,items:t}))},[E,a]);return{keyboardNavigation:v,onPointerMove:()=>{y(!1)},activeKey:D.activeKey,activeItem:D.activeItem,groups:N,inputValue:g,listboxId:h,onInputChange:j,onInputKeyDown:M,optionId:k,open:T,commit:A,selectedKeys:w,setOpen:O}}function kn(e){let{"aria-describedby":t,"aria-invalid":n,"aria-label":r,"aria-labelledby":i,"aria-required":a,activeTone:o=`neutral`,container:s,contentClassName:c,defaultInputValue:l=``,defaultOpen:u=!1,defaultValue:d=null,emptyMessage:f=`No matches`,getKey:p,getLabel:m,getSearchText:h=m,groupBy:g,id:_,inputProps:v,inputRef:y,isDisabled:b=()=>!1,items:x,onOpenChange:S,onValueChange:C,multiple:w,open:T,placeholder:E=`Search…`,renderItem:D,rootRef:O,trigger:k,triggerRef:A,value:j,...M}=e,N=e=>{let t=p(e);if(w){let e=j.includes(t)?j.filter(e=>e!==t):[...j,t];C?.(e,x.filter(t=>e.includes(p(t))))}else C?.(t,e)},P;w?P=j:j!==void 0&&(P=j===null?[]:[j]);let F=(0,Y.useId)(),I=k?.props??v,L=_??I?.id??F,R={id:L,"aria-describedby":[t,I?.[`aria-describedby`]].filter(Boolean).join(` `)||void 0,"aria-invalid":n??I?.[`aria-invalid`],"aria-label":I?.[`aria-label`]??r,"aria-labelledby":I?.[`aria-labelledby`]??i,"aria-required":a??I?.[`aria-required`]},{keyboardNavigation:z,onPointerMove:ee,activeItem:te,activeKey:ne,commit:B,groups:re,inputValue:ie,listboxId:ae,onInputChange:oe,onInputKeyDown:se,open:ce,optionId:le,selectedKeys:ue,setOpen:V}=On({defaultInputValue:l,defaultOpen:u,defaultValue:d,getKey:p,getSearchText:h,groupBy:g,id:L,isDisabled:b,items:x,onOpenChange:S,onCommit:N,multiple:w??!1,controlledOpen:T,controlledKeys:P,trigger:k});it(()=>{k&&V(!1)});let de=kt(`popover`),U=s===void 0?de:s,W=bt(`.caps-combobox-option[data-active="true"]:not(:disabled), [data-navigation="pointer"] .caps-combobox-option:hover:not(:disabled)`),fe=(0,Z.jsx)(G,{...v,...k?{}:R,"aria-activedescendant":te?le(p(te)):void 0,"aria-autocomplete":`list`,"aria-controls":ae,"aria-expanded":!0,className:H(`input-sm`,v?.className),id:k?v?.id??`${L}-input`:L,onChange:e=>{v?.onChange?.(e),oe(e)},onKeyDown:e=>{v?.onKeyDown?.(e),e.defaultPrevented||se(e)},placeholder:v?.placeholder??E,ref:y,role:`combobox`,value:ie}),pe=(0,Z.jsx)(`div`,{id:ae,ref:W,className:`caps-combobox-list`,"data-navigation":z?`keyboard`:`pointer`,onPointerMove:ee,role:`listbox`,"aria-multiselectable":w??void 0,children:re.every(e=>e.items.length===0)?(0,Z.jsx)(`div`,{className:`px-md py-md text-sm text-base-content`,children:f}):re.map(e=>(0,Z.jsxs)(`div`,{"aria-label":e.label||void 0,role:e.label?`group`:void 0,children:[e.label?(0,Z.jsx)(`div`,{className:`px-md pb-xs pt-sm text-xs text-base-content uppercase tracking-wider`,children:e.label}):null,e.items.map(e=>{let t=p(e),n=b(e),r=ne===t,i={active:r,disabled:n,selected:ue.includes(t)};return(0,Z.jsxs)(`button`,{"aria-disabled":n||void 0,"aria-selected":i.selected,className:`caps-combobox-option`,"data-active":r&&z,disabled:n,id:le(t),onClick:()=>{B(e)},onMouseDown:e=>{e.preventDefault()},role:`option`,tabIndex:-1,type:`button`,children:[(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`caps-combobox-check`,children:i.selected?(0,Z.jsx)(xe,{}):null}),D?.(e,r,i)??m(e)]},t)})]},e.label))});return k?(0,Z.jsx)(`div`,{...M,className:H(M.className),ref:O,children:(0,Z.jsxs)(mn,{modal:!0,onOpenChange:V,open:ce,children:[(0,Z.jsx)(_n,{...R,"aria-haspopup":`dialog`,className:`btn`,ref:A,render:k}),U===null?null:(0,Z.jsx)(bn,{container:U,children:(0,Z.jsx)(Cn,{align:`start`,side:`bottom`,sideOffset:4,children:(0,Z.jsxs)(En,{"data-active-tone":o,className:H(`min-w-40 rounded-box border border-base-300 bg-base-100 p-xs shadow-lg outline-none caps-combobox-panel caps-combobox-popup`,c),children:[(0,Z.jsx)(`div`,{className:`caps-combobox-search`,children:fe}),pe]})})})]})}):(0,Z.jsx)(`div`,{...M,className:H(M.className),ref:O,children:(0,Z.jsxs)(`div`,{className:H(`caps-combobox-panel`,c),"data-active-tone":o,children:[(0,Z.jsx)(`div`,{className:`caps-combobox-search`,children:fe}),pe]})})}function An({icon:e,caption:t}){return(0,Z.jsxs)(`span`,{className:`caps-icon-choice-mark`,"aria-hidden":`true`,children:[(0,Z.jsx)(`span`,{className:`caps-icon-choice-art`,children:e}),t?(0,Z.jsx)(`span`,{className:`caps-icon-choice-caption`,children:t}):null,(0,Z.jsx)(`span`,{className:`caps-icon-choice-lamp`})]})}var jn=(0,Y.forwardRef)(function({label:e,icon:t,caption:n,appearance:r,className:i,...a},o){return(0,Z.jsx)(`label`,{className:`caps-icon-choice`,"data-appearance":r===`compact`?r:void 0,children:(0,Z.jsx)(Ie,{...a,appearance:r??`default`,"aria-label":e,className:H(`caps-icon-choice-input`,i),indicator:(0,Z.jsx)(An,{icon:t,caption:n}),ref:o})})}),Mn=(0,Y.forwardRef)(function({label:e,icon:t,hint:n,className:r,...i},a){let o=(0,Y.useId)(),s=[i[`aria-describedby`],n?o:null].filter(Boolean).join(` `)||void 0;return(0,Z.jsx)(`label`,{className:`caps-check-key`,children:(0,Z.jsx)(Ie,{...i,"aria-label":e,"aria-describedby":s,className:H(`caps-check-key-input`,r),indicator:(0,Z.jsxs)(`span`,{className:`caps-check-key-face`,"aria-hidden":`true`,children:[t?(0,Z.jsx)(`span`,{className:`caps-check-key-icon`,children:t}):null,(0,Z.jsxs)(`span`,{className:`caps-check-key-copy`,children:[(0,Z.jsx)(`span`,{className:`caps-check-key-label`,children:e}),n?(0,Z.jsx)(`span`,{className:`caps-check-key-hint`,id:o,children:n}):null]}),(0,Z.jsx)(`span`,{className:`caps-check-key-lamp`})]}),ref:a})})});function Nn({className:e,...t}){return(0,Z.jsx)(`div`,{...t,className:H(`caps-check-keys`,e)})}function Pn({checked:e}){let t=`caps-radio-${(0,Y.useId)().replaceAll(`:`,``)}`,n=(0,Y.useRef)(null),r=(0,Y.useRef)(e).current,i=(0,Y.useRef)(e),a=(0,Y.useRef)(null),o=L(a),{reduced:s}=o;return(0,Y.useLayoutEffect)(()=>{if(!n.current)return;let t=s||i.current===e;i.current=e;let r=e?4:0,a=Ee(o,{ease:`outCubic`,duration:75}),c=e?we(o,{bounce:.65,duration:300}):Ee(o,{ease:`inCubic`,duration:100}),l=Ue(n.current,t?{rx:r,ry:r,cy:6,duration:0}:{rx:[{to:e?3.5:4.15,...a},{to:r,...c}],ry:[{to:e?4.5:3.85,...a},{to:r,...c}],cy:[{to:e?5.85:6.1,...a},{to:6,...c}]});return()=>{l.cancel()}},[e,s,o]),(0,Z.jsxs)(`svg`,{ref:a,className:`caps-radio-visual`,width:`24`,height:`24`,viewBox:`0 0 12 12`,"aria-hidden":`true`,focusable:`false`,children:[(0,Z.jsxs)(`defs`,{children:[(0,Z.jsx)(le,{id:`${t}-surface`,transform:`matrix(1 0 0 1 6 6)`}),(0,Z.jsx)(ae,{id:`${t}-shadow`}),(0,Z.jsx)(A,{id:`${t}-inset`}),(0,Z.jsx)(`clipPath`,{id:`${t}-well`,children:(0,Z.jsx)(`circle`,{cx:`6`,cy:`6`,r:`5`})})]}),(0,Z.jsx)(`circle`,{className:`caps-radio-track`,cx:`6`,cy:`6`,r:`5.5`,filter:`url(#${t}-inset)`}),(0,Z.jsx)(`g`,{clipPath:`url(#${t}-well)`,children:(0,Z.jsx)(`ellipse`,{ref:n,cx:`6`,cy:`6`,rx:r?4:0,ry:r?4:0,fill:`url(#${t}-surface)`,filter:`url(#${t}-shadow)`})})]})}var Fn=(0,Y.createContext)(null),In=(0,Y.forwardRef)(function({children:e,className:t,defaultValue:n,disabled:r=!1,name:i,onValueChange:a,orientation:o=`vertical`,value:s,...c},l){let u=(0,Y.useId)(),d=(0,Y.useRef)(null);(0,Y.useImperativeHandle)(l,()=>{if(!d.current)throw Error(`RadioGroup is not mounted`);return d.current},[]);let f=i??`radio-group-${u}`,[p,m]=(0,Y.useState)(n),h=s??p;return(0,Y.useEffect)(()=>{let e=d.current?.form;if(!e||s!==void 0)return;let t=e=>{queueMicrotask(()=>{e.defaultPrevented||m(n)})};return e.addEventListener(`reset`,t),()=>{e.removeEventListener(`reset`,t)}},[s,n,c.form]),(0,Z.jsx)(Fn.Provider,{value:{disabled:r,name:f,onValueChange:e=>{s===void 0&&m(e),a?.(e)},value:h},children:(0,Z.jsx)(`fieldset`,{...c,className:H(`flex gap-md`,o===`horizontal`?`flex-row flex-wrap`:`flex-col`,t),disabled:r,role:c.role??`radiogroup`,ref:d,children:e})})}),Q=(0,Y.forwardRef)(function({className:e,indicator:t,onChange:n,onClick:r,value:i,...a},o){let s=(0,Y.useContext)(Fn);if(!s)throw Error(`RadioGroupItem must be used inside <RadioGroup>`);let c=s.value===i,l=e=>{n?.(e),e.target.checked&&s.onValueChange?.(i)};return(0,Z.jsxs)(`span`,{className:`caps-radio`,"data-checked":c,"data-custom-indicator":t!==void 0||void 0,children:[(0,Z.jsx)(`input`,{...a,"aria-checked":c,checked:c,className:H(`caps-radio-input`,e),disabled:s.disabled||a.disabled,name:s.name,onChange:l,onClick:r,ref:o,type:`radio`,value:i}),t===void 0?(0,Z.jsx)(Pn,{checked:c}):t]})}),Ln=(0,Y.forwardRef)(function({description:e,id:t,meta:n,title:r,...i},a){let o=(0,Y.useContext)(Fn),s=(0,Y.useId)(),c=t??s,l=o?.value===i.value,u=o?.disabled===!0||i.disabled===!0;return(0,Z.jsxs)(`label`,{className:`caps-choice-card`,"data-checked":l,"data-disabled":u||void 0,htmlFor:c,children:[(0,Z.jsx)(Q,{...i,"aria-describedby":e?`${c}-description`:void 0,"aria-labelledby":`${c}-title`,id:c,ref:a}),(0,Z.jsxs)(`span`,{className:`caps-choice-card-copy`,children:[(0,Z.jsx)(`span`,{className:`caps-choice-card-title`,id:`${c}-title`,children:r}),e?(0,Z.jsx)(`span`,{className:`caps-choice-card-description`,id:`${c}-description`,children:e}):null]}),n?(0,Z.jsx)(`span`,{className:`caps-choice-card-meta`,children:n}):null]})}),Rn=(0,Y.forwardRef)(function({label:e,icon:t,caption:n,art:r=`dim`,className:i,...a},o){return(0,Z.jsx)(`label`,{className:`caps-icon-choice`,"data-art":r===`color`?r:void 0,children:(0,Z.jsx)(Q,{...a,"aria-label":e,className:H(`caps-icon-choice-input`,i),indicator:(0,Z.jsx)(An,{icon:t,caption:n}),ref:o})})});(0,Y.forwardRef)(function({label:e,color:t,className:n,...r},i){return(0,Z.jsx)(`label`,{className:`caps-icon-choice`,"data-art":`color`,"data-swatch":``,title:e,children:(0,Z.jsx)(Q,{...r,"aria-label":e,className:H(`caps-icon-choice-input`,n),indicator:(0,Z.jsx)(An,{icon:(0,Z.jsx)(`span`,{className:`caps-swatch-dot`,style:{backgroundColor:t}})}),ref:i})})});var zn=u(a),Bn=u(y),Vn=u(f(i)),Hn=u(W(a)),Un=W(C(File)),Wn=u(Un),Gn=x([a,i,y,ee,ge,W(a),Un]),Kn=u(Gn),$=e=>B(zn(e.state.value),()=>``),qn=e=>B(Bn(e.state.value),()=>!1),Jn=e=>B(Vn(e.state.value),()=>null),Yn=e=>B(Hn(e.state.value),()=>[]),Xn=e=>B(Wn(e.state.value),()=>[]),Zn=e=>B(Kn(e.state.value),()=>null);function Qn({field:e,spec:t,locked:n,...r}){let[i,a]=(0,Y.useState)(!1);return(0,Z.jsxs)(He,{children:[(0,Z.jsx)(G,{...r,name:t.name,disabled:n,type:i?`text`:`password`,autoComplete:`off`,spellCheck:!1,className:`caps-field-secret`,placeholder:t.placeholder,readOnly:t.readOnly,value:$(e),onBlur:e.handleBlur,onChange:t=>{e.handleChange(t.currentTarget.value)}}),(0,Z.jsx)(V,{type:`button`,variant:`outline`,size:`icon`,"aria-label":i?`Hide`:`Show`,"aria-pressed":i,disabled:n,onClick:()=>{a(e=>!e)},children:i?(0,Z.jsx)(en,{"aria-hidden":`true`}):(0,Z.jsx)(tn,{"aria-hidden":`true`})})]})}var $n={text:`text`,email:`email`,url:`url`,tel:`tel`};function er({spec:e,field:t,locked:n,...r}){let i=Xn(t),a=n||e.readOnly===!0,o=(0,Y.useRef)(null);return(0,Z.jsxs)(`div`,{className:`flex flex-col gap-sm`,children:[(0,Z.jsx)(O,{asChild:!0,children:(0,Z.jsx)(`input`,{...r,ref:o,type:`file`,tabIndex:-1,required:r.required===!0&&i.length===0,name:e.name,accept:e.accept,multiple:e.multiple,disabled:a,onBlur:t.handleBlur,onChange:e=>{t.handleChange(Array.from(e.currentTarget.files??[])),e.currentTarget.value=``}})}),(0,Z.jsx)(V,{type:`button`,variant:`outline`,"aria-label":`Choose files for ${e.label}`,"aria-describedby":r[`aria-describedby`],"aria-invalid":r[`aria-invalid`],disabled:a,onBlur:t.handleBlur,onClick:()=>{o.current?.click()},children:`Choose files`}),(0,Z.jsx)(Ve,{items:i.map((e,t)=>({id:String(t),name:e.name,preview:{kind:`file`},progress:0,progressLabel:`${String(e.size)} bytes`,statusLabel:`Selected`,actions:a?{}:{remove:{label:`Remove`,accessibleLabel:`Remove ${e.name}`}}})),onRemove:e=>{t.handleChange(i.filter((t,n)=>String(n)!==e))},onCancel:()=>void 0,onRetry:()=>void 0})]})}function tr({spec:e,field:t,locked:n,...r}){let i=e=>{t.handleChange(e)},a={...r,name:e.name,disabled:n,onBlur:t.handleBlur};switch(e.kind){case`text`:case`email`:case`url`:case`tel`:return(0,Z.jsx)(G,{...a,type:$n[e.kind],inputMode:e.kind===`text`?void 0:e.kind,autoComplete:e.autoComplete,placeholder:e.placeholder,maxLength:e.maxLength,readOnly:e.readOnly,value:$(t),onChange:e=>{i(e.currentTarget.value)}});case`textarea`:return(0,Z.jsx)(Se,{...a,rows:e.rows??3,placeholder:e.placeholder,maxLength:e.maxLength,readOnly:e.readOnly,value:$(t),onChange:e=>{i(e.currentTarget.value)}});case`secret`:return(0,Z.jsx)(Qn,{...r,field:t,spec:e,locked:n});case`money`:return(0,Z.jsxs)(He,{children:[(0,Z.jsx)(je,{className:`caps-field-currency`,children:e.currency??`USD`}),(0,Z.jsx)(G,{...a,inputMode:`decimal`,autoComplete:`off`,className:`caps-field-amount`,placeholder:e.placeholder??`0.00`,readOnly:e.readOnly,value:$(t),onChange:e=>{i(e.currentTarget.value)}})]});case`date`:return(0,Z.jsx)(G,{...a,type:`date`,readOnly:e.readOnly,value:$(t),onChange:e=>{i(e.currentTarget.value)}});case`number`:return(0,Z.jsx)(Pe,{...a,...e.min===void 0?{}:{min:e.min},...e.max===void 0?{}:{max:e.max},...e.step===void 0?{}:{step:e.step},...e.unit===void 0?{}:{unit:e.unit},...e.wrap===void 0?{}:{wrap:e.wrap},disabled:n||e.readOnly===!0,decrementLabel:`Decrease ${e.label}`,incrementLabel:`Increase ${e.label}`,value:Jn(t),onValueChange:e=>{t.handleChange(e)}});case`select`:return(0,Z.jsxs)(ze,{...a,value:$(t),onChange:e=>{i(e.currentTarget.value)},children:[e.placeholder===void 0?null:(0,Z.jsx)(`option`,{value:``,disabled:!0,children:e.placeholder}),e.options.map(e=>(0,Z.jsx)(`option`,{value:e.value,disabled:e.disabled,children:e.label},e.value))]});case`combobox`:return(0,Z.jsx)(kn,{id:r.id??e.name,"aria-describedby":r[`aria-describedby`],"aria-invalid":r[`aria-invalid`],"aria-required":r[`aria-required`],items:e.options,getKey:e=>e.value,getLabel:e=>e.label,isDisabled:t=>t.disabled||n||e.readOnly===!0,value:$(t),...e.placeholder===void 0?{}:{placeholder:e.placeholder},trigger:(0,Z.jsx)(Dn,{name:e.name,disabled:n||e.readOnly===!0,onBlur:t.handleBlur,children:e.options.find(e=>e.value===$(t))?.label??e.placeholder??`Choose…`}),inputProps:{"aria-label":`Search ${e.label}`,disabled:n||e.readOnly===!0},onValueChange:e=>{i(e??``),t.handleBlur()}});case`file`:return(0,Z.jsx)(er,{...r,spec:e,field:t,locked:n});case`checkbox`:return(0,Z.jsx)(Ie,{...a,disabled:n||e.readOnly===!0,checked:qn(t),onChange:e=>{t.handleChange(e.currentTarget.checked)}});case`switch`:return(0,Z.jsx)(Ce,{...a,disabled:n||e.readOnly===!0,checked:qn(t),onCheckedChange:e=>{t.handleChange(e)}});case`radio`:case`icon-radio`:case`checkboxes`:case`icon-checkboxes`:return null}}var nr=new Set([`radio`,`icon-radio`,`checkboxes`,`icon-checkboxes`]);function rr({spec:e,field:t,locked:n,error:r,layout:i}){let a=n||e.readOnly===!0,o=e.label;if(e.kind===`checkboxes`||e.kind===`icon-checkboxes`){let n=Yn(t),s=(e,r)=>{t.handleChange(r?[...n,e]:n.filter(t=>t!==e))};return(0,Z.jsx)(ke,{legend:o,icon:e.icon,layout:i,...i===`columns`?{legendTitle:o}:{},description:e.help,disabled:a,error:r??null,children:e.kind===`icon-checkboxes`?(0,Z.jsx)(`div`,{className:`caps-field-icon-choices`,children:e.options.map(r=>(0,Z.jsx)(jn,{name:e.name,value:r.value,label:r.label,...r.caption===void 0?{}:{caption:r.caption},icon:r.icon,disabled:r.disabled,checked:n.includes(r.value),onBlur:t.handleBlur,onChange:e=>{s(r.value,e.currentTarget.checked)}},r.value))}):(0,Z.jsx)(Nn,{children:e.options.map(r=>(0,Z.jsx)(Mn,{name:e.name,value:r.value,label:r.label,icon:r.icon,hint:r.description,disabled:r.disabled,checked:n.includes(r.value),onBlur:t.handleBlur,onChange:e=>{s(r.value,e.currentTarget.checked)}},r.value))})})}let s=e.options.some(e=>e.description!==void 0||e.meta!==void 0);return(0,Z.jsx)(ke,{legend:o,icon:e.icon,layout:i,...i===`columns`?{legendTitle:o}:{},description:e.help,disabled:a,error:r??null,children:(0,Z.jsx)(In,{name:e.name,"aria-label":o,value:$(t),onValueChange:e=>{t.handleChange(e),t.handleBlur()},orientation:e.kind===`icon-radio`||s?`horizontal`:`vertical`,children:e.options.map(t=>e.kind===`icon-radio`?(0,Z.jsx)(Rn,{value:t.value,label:t.label,...t.caption===void 0?{}:{caption:t.caption},icon:t.icon,disabled:t.disabled},t.value):s?(0,Z.jsx)(Ln,{value:t.value,title:t.label,description:t.description,meta:t.meta,disabled:t.disabled},t.value):(0,Z.jsx)(Ne,{label:t.label,orientation:`inline`,children:(0,Z.jsx)(Q,{value:t.value,disabled:t.disabled})},t.value))})})}function ir({spec:e,field:t,locked:n,error:r,render:i,...a}){return i({name:e.name,label:e.label,help:e.help,value:Zn(t),onChange:e=>{t.handleChange(e)},onBlur:t.handleBlur,error:r,disabled:n,id:a.id??e.name,"aria-describedby":a[`aria-describedby`],"aria-invalid":r!==void 0})}function ar({form:e,spec:t,locked:n,layout:r}){let i=Fe({form:e,name:t.name}),a=K(e.store,e=>e.submissionAttempts>0),o=i.state.meta.isBlurred||a?on(i.state.meta):void 0;if(t.render===void 0&&nr.has(t.kind))return(0,Z.jsx)(rr,{spec:t,field:i,locked:n,error:o,layout:r});let s=r===`columns`?t.kind===`switch`||t.kind===`checkbox`?`horizontal`:`vertical`:t.kind===`checkbox`?`inline`:(t.layout??(t.kind===`switch`?`row`:`stacked`))===`row`?`horizontal`:`vertical`;return(0,Z.jsx)(Ne,{label:t.label,...r===`columns`?{labelTitle:t.label}:{},description:t.help,icon:t.icon,orientation:s,error:o,...t.required===void 0?{}:{required:t.required},...t.optional===void 0?{}:{optional:t.optional},children:t.render===void 0?(0,Z.jsx)(tr,{spec:t,field:i,locked:n}):(0,Z.jsx)(ir,{spec:t,field:i,locked:n,error:o,render:t.render})})}var or=u(m(a,Gn));function sr({form:e,spec:t,locked:n,layout:r}){let i=t.when;return K(e.store,e=>i===void 0||i(B(or(e.values),()=>({}))))?(0,Z.jsx)(ar,{form:e,spec:t,locked:n,layout:r}):null}function cr({form:e,section:t,locked:n,layout:r}){let i=t.fields.map(t=>(0,Z.jsx)(sr,{form:e,spec:t,locked:n,layout:r},t.name));return t.title===void 0?i:(0,Z.jsx)(Ae,{title:t.title,description:t.description,layout:r,children:i})}function lr({model:e,names:t,disabled:n=!1,layout:r}){let i=e.form;return t===void 0?e.description.sections.map(e=>(0,Z.jsx)(cr,{form:i,section:e,locked:n,layout:r},e.id??``)):t.map(t=>{let a=e.description.fields.find(e=>e.name===t);return a===void 0?null:(0,Z.jsx)(sr,{form:i,spec:a,locked:n,layout:r},t)})}var ur=class{annotation;constructor(e){this.annotation=e}},dr=class{sections;constructor(e){this.sections=e}},fr=`caps/form`,pr=0;function mr(e){pr+=1;let t={[`${fr}:${String(pr)}`]:new ur(e)};return e.label!==void 0&&(t.title=e.label),e.help!==void 0&&(t.description=e.help),t}a.annotate(mr({kind:`secret`})).pipe(b(`Secret`));var hr=e=>{let t=e.replace(/([a-z0-9])([A-Z])/g,`$1 $2`).replace(/[-_]+/g,` `).toLowerCase();return t.charAt(0).toUpperCase()+t.slice(1)};function gr(e){return Object.values(e??{}).reduce((e,t)=>t instanceof ur?{...e,...t.annotation}:e,{})}function _r(e){return e.reduce((e,t)=>({...e,...gr(t)}),{})}function vr(e){let t=e?.[fr];return t instanceof dr?t.sections:{}}var yr=u(a);function br(e){if(re(e))return o(yr(e.literal),{onNone:()=>null,onSome:e=>[e]});if(!M(e))return null;let t=[];for(let n of e.types){if(he(n))continue;let e=br(n);if(e===null)return null;t.push(...e)}return t}function xr(e){if(U(e))return{type:`string`,literals:[]};if(I(e))return{type:`number`,nullable:!1};if(se(e))return{type:`boolean`};let t=br(e);if(t!==null)return{type:`string`,literals:t};if(F(e)){let[t]=e.rest;if(t===void 0)return null;if(U(t))return{type:`strings`,literals:[]};let n=br(t);return n===null?null:{type:`strings`,literals:n}}if(M(e)){let t=e.types.filter(e=>!he(e)&&!R(e)),n=e.types.some(e=>R(e)),[r]=t;if(t.length!==1||r===void 0)return null;let i=xr(r);return i?.type===`number`?{type:`number`,nullable:n}:n?null:i}return null}function Sr(e){let t=e.ast;if(!k(t))throw Error(`A schema form needs a Schema.Struct.`);return{fields:t.propertySignatures.map(e=>{let t=String(e.name),n=fe(e.type),i=_r([e.type.annotations,...(e.type.checks??[]).map(e=>e.annotations)]),a=i.kind===`file`?{type:`files`}:xr(n);if(a===null)throw Error(`Schema field "${t}" has no form control. Annotate it with field({ render }) or a kind.`);return{name:t,valueType:a,optional:e.type.context?.isOptional===!0,annotation:i,title:r(e.type),description:v(e.type)}}),sections:vr(me(t))}}function Cr(e){let n=e,r=!1,i=!1;for(;;)if(n instanceof ie)r=!0,n=n.unwrap();else if(n instanceof t)i=!0,n=n.unwrap();else if(n instanceof w)n=n.unwrap();else if(n instanceof ce)n=n.in;else return{node:n,optional:r,nullable:i}}function wr(e){if(e instanceof oe){let t=e.options.map(e=>wr(e));return t.some(e=>e===null)?null:t.flatMap(e=>e??[])}let t=e instanceof D?e.options:e instanceof g?[...e.values]:null;if(t===null)return null;let n=t.map(e=>yr(e));return n.every(p)?n.map(e=>e.value):null}function Tr(e){let{node:t,nullable:n}=Cr(e);if(t instanceof z)return{type:`string`,literals:[]};if(t instanceof P)return{type:`number`,nullable:n};if(t instanceof T)return{type:`boolean`};let r=wr(t);if(r!==null)return{type:`string`,literals:r};if(t instanceof l){let e=Cr(t.element).node;if(e instanceof z)return{type:`strings`,literals:[]};let n=wr(e);return n===null?null:{type:`strings`,literals:n}}return null}function Er(e){let n=[e];for(;;){let e=n[n.length-1];if(e===void 0)break;let r=e instanceof ie||e instanceof t||e instanceof w?e.unwrap():e instanceof ce?e.in:e;if(r===e)break;n.push(r)}return n.reverse().map(e=>ne.get(e))}function Dr(e){return Er(e).reduce((e,t)=>({...e,...t}),{})}function Or(e){return Object.entries(e.shape)}function kr(e){let t=Cr(e).node;if(!(t instanceof de))throw Error(`A schema form needs a z.object.`);return{fields:Or(t).map(([e,t])=>{let n=_r(Er(t)),r=n.kind===`file`?{type:`files`}:Tr(t);if(r===null)throw Error(`Schema field "${e}" has no form control. Annotate it with field({ render }) or a kind.`);let i=Dr(t);return{name:e,valueType:r,optional:Cr(t).optional,annotation:n,title:i.title,description:i.description}}),sections:vr(Dr(e))}}function Ar(e,t){let n=t.options??{};return(e.length>0?e:Object.keys(n)).map(e=>{let t=n[e],r=t===void 0?{}:t instanceof Object?t:{label:t};return{value:e,label:r.label??hr(e),description:r.description,meta:r.meta,icon:r.icon,caption:r.caption,disabled:r.disabled===!0}})}function jr(e,t){let n=t.some(e=>e.icon!==void 0);switch(e.type){case`boolean`:return`switch`;case`number`:return`number`;case`strings`:return n?`icon-checkboxes`:`checkboxes`;case`files`:return`file`;case`string`:return t.length===0?`text`:t.length>12?`combobox`:n?`icon-radio`:t.some(e=>e.description!==void 0||e.meta!==void 0)||t.length<=3?`radio`:`select`}}function Mr(e,t){switch(e.type){case`boolean`:return!1;case`number`:return e.nullable?null:0;case`strings`:case`files`:return[];case`string`:return t[0]?.value??``}}function Nr(e){let t=e instanceof j?kr(e):Sr(e),n=t.fields.map((e,t)=>{let{kind:n,...r}=e.annotation,i=Ar(e.valueType.type===`string`||e.valueType.type===`strings`?e.valueType.literals:[],e.annotation),a=r.help??e.description;return{...r,name:e.name,label:r.label??e.title??hr(e.name),help:a,kind:n??jr(e.valueType,i),options:i,optionalInSchema:e.optional,index:t}}),r={};t.fields.forEach((e,t)=>{let i=n[t];i&&(r[e.name]=Mr(e.valueType,i.options))});let i=e=>e.order??e.index,a=e=>e.section!==void 0&&Object.hasOwn(t.sections,e.section)?e.section:null,o=e=>n.filter(t=>a(t)===e).sort((e,t)=>i(e)-i(t)),s=Object.entries(t.sections).map(([e,t])=>({id:e,title:t.title,description:t.description,fields:o(e)}));return{fields:n,sections:[{id:null,title:void 0,description:void 0,fields:o(null)},...s].filter(e=>e.fields.length>0),defaults:r}}function Pr(e){let t=e instanceof j?e:N(e);return{"~standard":{...t[`~standard`],validate:e=>{let n=t[`~standard`].validate(e);return n instanceof Promise?n.then(e=>Fr(e)):Fr(n)}}}}function Fr(e){return e.issues===void 0?e:{issues:e.issues.map(e=>e.path===void 0?e:{...e,path:e.path.slice(0,1)})}}var Ir=`onServer`;function Lr(e){let t=e.querySelector(`[aria-invalid="true"]`),n=t?.matches(`input, select, textarea, button, [tabindex]`)?t:t?.querySelector(`input, select, textarea, button`);return n?.focus(),n!=null}function Rr(e){if(Lr(e))return()=>void 0;let t=new MutationObserver(()=>{Lr(e)&&t.disconnect()});return t.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`aria-invalid`]}),()=>{t.disconnect()}}function zr(e){return e.state.meta.errorMap.onServer!==void 0}function Br(e){e.setMeta(e=>({...e,errorMap:{...e.errorMap,[Ir]:void 0}}))}function Vr(e,t,n){e.setFieldMeta(t,e=>({...e,isBlurred:!0,errorMap:{...e.errorMap,[Ir]:n}}))}function Hr(e){let[t,n]=(0,Y.useState)(null),[r,i]=(0,Y.useState)(null),[a,o]=(0,Y.useState)(e.defaultValues),[s,c]=(0,Y.useState)(null);Me(a,e.defaultValues)||(o(e.defaultValues),c(null));let{schema:l}=e,u=(0,Y.useMemo)(()=>Nr(l),[l]),d=(0,Y.useMemo)(()=>Pr(l),[l]),f=Re({defaultValues:s??a,validators:{onChange:d,onSubmit:d},listeners:{onChange:({fieldApi:e})=>{n(null),i(null),zr(e)&&Br(e)}},onSubmit:async({value:t,formApi:r})=>{n(null),i(null);let a=await Pr(l)[`~standard`].validate(t);if(a.issues){n(a.issues[0]?.message??`Check the form and try again.`);return}let o;try{o=await e.onSubmit(a.value,t)??{kind:`saved`}}catch(t){console.error(`SchemaForm submit failed`,t),n(e.failure??`Couldn't save changes. Try again.`);return}if(o.kind===`refused`){n(o.error??null);let e=r;for(let[t,n]of Object.entries(o.fields??{}))n!==void 0&&n.length>0&&Vr(e,t,n);return}let s=o.values??t;c(s),r.reset(s),i(o.message??`Saved`),e.onSaved?.(s)}});return{description:u,form:f,error:t,saved:r,discard:()=>{n(null),i(null),f.reset()},submit:()=>f.handleSubmit()}}function Ur(e){return{dirty:K(e.form.store,e=>!e.isDefaultValue),submitting:K(e.form.store,e=>e.isSubmitting),canSubmit:K(e.form.store,e=>e.canSubmit)}}function Wr({model:e,submitLabel:t=`Save changes`,discardLabel:n,onCancel:r,cancelLabel:i,allowClean:a,layout:o,footer:s,children:c,disabled:l=!1,...u}){let{submitting:d}=Ur(e),f=(0,Y.useRef)(null),p=(0,Y.useRef)(()=>void 0);return(0,Y.useEffect)(()=>()=>{p.current()},[]),(0,Z.jsxs)(Le,{...u,ref:f,layout:o,busy:d,noValidate:!0,onSubmit:t=>{t.preventDefault(),e.form.state.isSubmitting||e.submit().then(()=>{p.current();let t=f.current;t!==null&&!e.form.state.isValid&&(p.current=Rr(t))})},children:[c??(0,Z.jsx)(lr,{model:e,disabled:l,layout:o}),s===void 0?(0,Z.jsx)(qr,{model:e,label:t,discardLabel:r===void 0?n:void 0,onCancel:r,cancelLabel:i,allowClean:a??r!==void 0,divider:r===void 0}):s]})}function Gr({schema:e,defaultValues:t,onSubmit:n,onSaved:r,failure:i,...a}){let o=Hr({schema:e,defaultValues:t,onSubmit:n,onSaved:r,failure:i});return(0,Z.jsx)(Wr,{...a,model:o})}function Kr(e){return`model`in e?(0,Z.jsx)(Wr,{...e}):(0,Z.jsx)(Gr,{...e})}function qr({model:e,label:t,discardLabel:n,onCancel:r,cancelLabel:i=`Cancel`,allowClean:a=!1,dirtyLabel:o=`Unsaved changes`,buttonProps:s,...c}){let{dirty:l,submitting:u}=Ur(e),d=u?null:e.saved&&!l?(0,Z.jsx)(De,{tone:`success`,size:`compact`,label:e.saved}):l?(0,Z.jsx)(De,{tone:`neutral`,size:`compact`,label:o}):null;return(0,Z.jsxs)(Be,{...c,error:e.error,status:d,children:[r?(0,Z.jsx)(V,{type:`button`,variant:`ghost`,disabled:u,onClick:r,children:i}):n&&l?(0,Z.jsx)(V,{type:`button`,variant:`ghost`,disabled:u,onClick:e.discard,children:n}):null,(0,Z.jsx)(V,{...s,type:`submit`,loading:u,disabled:u||!l&&!a,title:!l&&!a?`No changes to save`:void 0,children:t})]})}function Jr({folder:e}){return(0,Z.jsx)($t,{open:e.editing,onOpenChange:e.setEditing,children:(0,Z.jsxs)(Yt,{children:[(0,Z.jsx)(Zt,{children:(0,Z.jsx)(Xt,{children:`Save prints to`})}),(0,Z.jsx)(Xr,{folder:e},e.computerId),(0,Z.jsx)(Jt,{children:(0,Z.jsx)(Qt,{render:(0,Z.jsx)(V,{variant:`outline`,size:`sm`}),children:`Close`})})]})})}var Yr=s({path:d.check(ue(E(ve),{message:`Enter an absolute Computer folder, such as /media.`})).annotate(mr({label:`Folder`,placeholder:`/media`}))});function Xr({folder:e}){let t=(0,Y.useRef)(!1),n=Hr({schema:Yr,defaultValues:{path:e.path??`/media`},onSubmit:async({path:n})=>{let r=await e.choose(n,t.current);return r?{kind:`refused`,fields:{path:r}}:{kind:`saved`}}}),r=e=>{t.current=e,n.form.setFieldMeta(`path`,e=>({...e,errorMap:{...e.errorMap,onServer:void 0}}))},i=e.busy||!e.writable;return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Kr,{model:n,disabled:i,footer:(0,Z.jsxs)(Be,{divider:!1,children:[(0,Z.jsx)(qt,{className:`[--caps-keycap-width:auto]`,label:`Use`,type:`submit`,disabled:i,onClick:()=>{r(!1)}}),(0,Z.jsx)(qt,{className:`[--caps-keycap-width:auto]`,label:`Create`,type:`submit`,disabled:i,onClick:()=>{r(!0)}})]})}),e.error?(0,Z.jsx)(_e,{role:`alert`,icon:(0,Z.jsx)(Oe,{"aria-hidden":`true`,className:`size-[var(--stipe-icon-size-sm)]`}),primary:e.error}):(0,Z.jsx)(ye,{children:e.writable?`Prints saves new images and uploads here and shows this folder as your gallery.`:`This Computer is read-only for Prints, so the folder can’t change.`})]})}export{Jr as PrintsFolderDialog};
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{$t as t,C as n,Ct as r,E as i,F as a,Ft as o,I as s,It as c,Jt as l,K as u,L as d,M as f,Nt as p,P as m,Pt as h,Qt as g,S as _,St as v,T as y,U as b,V as x,Vn as S,X as C,Xt as w,Yt as T,Z as E,Zt as D,_ as O,_t as k,a as A,an as j,bt as M,dt as N,en as P,ft as F,gt as I,h as L,ht as R,in as z,j as ee,jt as te,kn as ne,kt as B,mt as re,nn as ie,o as ae,on as oe,pt as se,rn as ce,s as le,st as ue,t as V,tn as de,v as H,vt as U,w as W,wt as fe,x as pe,xt as me,yt as he,z as ge}from"./button-oE2Hrd5D.js";import{a as _e,d as ve,i as ye,l as be,m as xe,t as Se,u as Ce}from"./textarea-DUwcxEMN.js";import{i as we,o as Te,r as Ee,t as De}from"./status-DNJRO5m5.js";import{_ as Oe,a as ke,c as Ae,d as je,f as G,g as Me,h as K,i as Ne,l as Pe,m as Fe,n as Ie,o as Le,p as Re,r as ze,s as Be,t as Ve,u as He}from"./upload-queue-BHNUzgYV.js";import{r as Ue}from"./modules-C4mfDnjH.js";import{A as We,B as Ge,C as Ke,D as qe,E as Je,F as Ye,G as Xe,Gt as Ze,H as Qe,I as $e,Kt as et,M as tt,N as nt,O as rt,On as it,P as at,Q as ot,S as st,St as ct,T as lt,Tn as ut,U as dt,V as ft,W as pt,X as mt,Y as ht,_ as gt,a as _t,b as q,bn as vt,bt as yt,c as bt,f as xt,fn as St,g as Ct,gn as wt,h as Tt,i as Et,j as Dt,k as Ot,kn as kt,lt as At,m as jt,mn as Mt,n as Nt,o as Pt,p as Ft,qt as It,r as Lt,s as Rt,t as zt,tt as Bt,u as Vt,v as Ht,vt as Ut,w as Wt,x as Gt,y as Kt,yn as J}from"./useTriggerFocusGuards-Bddw7Qdn.js";import{t as qt}from"./keycap-D2RkH2IS.js";import{a as Jt,i as Yt,l as Xt,o as Zt,r as Qt,t as $t}from"./dialog-BXLOuKaF.js";var en=pe(`EyeOff`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),tn=pe(`Eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Y=e(S(),1);function nn({getKey:e,isDisabled:t=()=>!1,items:n}){let r=(0,Y.useMemo)(()=>{let r=n.map(e);if(r.some(e=>!e))throw Error(`Selectable items require non-empty keys`);if(new Set(r).size!==r.length)throw Error(`Selectable items require unique keys`);return n.filter(e=>!t(e))},[e,t,n]),[i,a]=(0,Y.useState)(null);(0,Y.useEffect)(()=>{i!==null&&!r.some(t=>e(t)===i)&&a(null)},[i,r,e]);let o=r.find(t=>e(t)===i),s=o?r.findIndex(t=>e(t)===i):-1;return{activeIndex:s,activeItem:o,activeKey:i,enabledItems:r,move:(t,n)=>{if(r.length===0)return;let i=n?n===`start`?0:r.length-1:s<0?t>0?0:r.length-1:(s+t+r.length)%r.length,o=r[i];o&&a(e(o))},setActiveKey:a}}var rn=u(a),an=u(s({message:a}));function on(e){for(let t of e.errors){let e=te(c(h(an(t),e=>e.message),()=>rn(t)));if(e!==void 0&&e.length>0)return e}}var sn=Y.createContext(void 0);function X(e){let t=Y.useContext(sn);if(t===void 0&&!e)throw Error(J(47));return t}var cn=e(_(),1),ln={...q,disabled:e=>e.disabled,instantType:e=>e.instantType===`trigger-change`&&!q.open(e)?void 0:e.instantType,openMethod:e=>e.openMethod,openChangeReason:e=>e.openChangeReason,isPressOpenedByTrigger:(e,t)=>e.openChangeReason===`trigger-press`&&q.isOpenedByTrigger(e,t),isTouchPressOpen:(e,t)=>t&&e.openMethod===`touch`&&e.openChangeReason===`trigger-press`,hasTriggerFocusGuards:(e,t)=>q.isOpenedByTrigger(e,t)&&!e.focusManagerModal,modal:e=>e.modal,titleElementId:e=>e.titleElementId,descriptionElementId:e=>e.descriptionElementId,openOnHover:e=>e.openOnHover,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin},un=class extends Gt{constructor(e,t,n){let r=new Wt;super(dn(e,r,t,n),fn(r),ln)}setOpen=(e,t)=>{let n=t.reason===Ut,r=t.reason===`trigger-press`&&t.event.detail===0,i=!e&&(t.reason===`escape-key`||t.reason==null),a=qe(t),o=this.select(`activeTriggerId`);if(!e&&t.reason===`close-press`&&t.trigger==null&&o!=null&&(t.trigger=this.context.triggerElements.getById(o)??this.select(`activeTriggerElement`)??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let s=()=>{let n=Ot(this.state,e,t.trigger,a());n.openChangeReason=t.reason,this.update(n)};n?(this.context.stickIfOpen=!0,this.context.stickIfOpenTimeout.start(500,()=>{this.context.stickIfOpen=!1}),cn.flushSync(s)):s();let c;r?c=`click`:i?c=`dismiss`:t.reason===`focus-out`&&(c=`focus`),this.set(`instantType`,c)}};function dn(e,t,n,r=!1){let i={...Kt(t,n,r),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,openOnHover:!1,closeDelay:0,adaptiveOrigin:void 0,...e};return i.open&&e?.mounted===void 0&&(i.mounted=!0),i}function fn(e){return{popupRef:Y.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:Y.createRef(),beforeTriggerFocusGuardRef:Y.createRef(),beforeContentFocusGuardRef:Y.createRef(),stickIfOpenTimeout:new vt,stickIfOpen:!0,triggerElements:e}}var Z=n(),pn=st(function({props:e}){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,modal:o=!1,handle:s,triggerId:c,defaultTriggerId:l=null}=e,u=hn(s,{modal:o,open:r,openProp:n,activeTriggerId:l,triggerIdProp:c});u.useControlledProp(`openProp`,n),u.useControlledProp(`triggerIdProp`,c);let d=u.useState(`open`),f=u.useState(`mounted`),p=u.useState(`payload`);u.useContextCallback(`onOpenChange`,i),u.useContextCallback(`onOpenChangeComplete`,a),at(u,d),We(u);let{forceUnmount:m}=Dt(d,u,()=>{u.context.stickIfOpen=!0,u.set(`openChangeReason`,null)});u.useSyncedValues({modal:o}),Y.useEffect(()=>{d||u.context.stickIfOpenTimeout.clear()},[u,d]),Y.useImperativeHandle(e.actionsRef,()=>({unmount:m,close:()=>u.setOpen(!1,yt(At))}),[m,u]);let h=d||f||s!=null;return(0,Z.jsxs)(sn.Provider,{value:u,children:[s&&(0,Z.jsx)(Je,{handle:s,store:u}),h&&(0,Z.jsx)(gn,{store:u,modal:o}),typeof t==`function`?t({payload:p}):t]})});function mn(e){return X(!0)?(0,Z.jsx)(pn,{props:e}):(0,Z.jsx)(pt,{children:(0,Z.jsx)(pn,{props:e})})}function hn(e,t){let n=nt((e,n)=>new un(t,e,n));return Y.useEffect(()=>n.context.stickIfOpenTimeout.disposeEffect(),[n]),n}function gn({store:e,modal:t}){let n=e.useState(`floatingRootContext`),r=Ge(n,{outsidePressEvent:{mouse:t===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}}),i=r.reference,a=r.floating;return tt(e,{activeTriggerProps:i,inactiveTriggerProps:i,popupProps:a}),null}var _n=Ke(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,handle:s,payload:c,openOnHover:l=!1,delay:u=300,closeDelay:d=0,id:f,...p}=e,m=X(!0),h=Ht(s)??m;if(!h)throw Error(J(74));let g=Mt(f),_=h.useState(`isTriggerActive`,g),v=h.useState(`floatingRootContext`),y=h.useState(`isOpenedByTrigger`,g),b=h.useState(`triggerPopupId`,g),x=Y.useRef(null),{registerTrigger:S,isMountedByThisTrigger:C}=Ye(g,x,h,{payload:c,disabled:a,openOnHover:l,closeDelay:d}),w=h.useState(`isPressOpenedByTrigger`,g),T=h.useState(`isTouchPressOpen`,l),E=h.useState(`hasTriggerFocusGuards`,g),D=Ct(v,{enabled:!a&&l&&!T,mouseOnly:!0,move:!1,handleClose:Tt(),restMs:u,delay:{close:d},triggerElementRef:x,isActiveTrigger:_,isClosing:()=>h.select(`transitionStatus`)===`ending`}),O=ut(()=>h.context.stickIfOpen),k=ft(v,{stickIfOpen:O}),A=Vt(()=>h.select(`open`),e=>{h.set(`openMethod`,e)}),j=h.useState(`triggerProps`,C),{getButtonProps:M,buttonRef:N}=ct({disabled:a,native:o}),P={open(e){return w?et.open(e):It.open(e)}},{handlePreFocusGuardFocus:F,handleFocusTargetFocus:I}=zt(h,x),L=wt(`button`,e,{state:{disabled:a,open:y},ref:[N,t,S,x],props:[k.reference,D,j,A,{[mt]:``,id:g,"aria-haspopup":`dialog`,"aria-expanded":y,"aria-controls":b},p,M],stateAttributesMapping:P}),R=(0,Z.jsx)(Y.Fragment,{children:L},g);return E?(0,Z.jsxs)(Y.Fragment,{children:[(0,Z.jsx)(Bt,{ref:h.context.beforeTriggerFocusGuardRef,onFocus:F}),R,(0,Z.jsx)(Bt,{ref:h.context.triggerFocusTargetRef,onFocus:I})]}):R}),vn=Y.createContext(void 0);function yn(){let e=Y.useContext(vn);if(e===void 0)throw Error(J(45));return e}var bn=Y.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return X().useState(`mounted`)||n?(0,Z.jsx)(vn.Provider,{value:n,children:(0,Z.jsx)(ht,{ref:t,...r})}):null}),xn=Y.createContext(void 0);function Sn(){let e=Y.useContext(xn);if(!e)throw Error(J(46));return e}var Cn=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,anchor:a,positionMethod:o,side:s,align:c,sideOffset:l,alignOffset:u,collisionBoundary:d=`clipping-ancestors`,collisionPadding:f,arrowPadding:p,sticky:m,disableAnchorTracking:h=!1,collisionAvoidance:g=ot,..._}=e,v=X(),y=yn(),b=Xe(),x=v.useState(`floatingRootContext`),S=v.useState(`mounted`),C=v.useState(`open`),w=v.useState(`openChangeReason`),T=v.useState(`activeTriggerElement`),E=v.useState(`modal`),D=v.useState(`openMethod`),O=v.useState(`positionerElement`),k=v.useState(`instantType`),A=v.useState(`transitionStatus`),j=v.useState(`adaptiveOrigin`),M=_t({anchor:a,floatingRootContext:x,positionMethod:o,mounted:S,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:p,collisionBoundary:d,collisionPadding:f,sticky:m,disableAnchorTracking:h,keepMounted:y,nodeId:b,collisionAvoidance:g,adaptiveOrigin:j}),N=x.useState(`domReferenceElement`);Et({store:v,domReference:N,positionerElement:O,open:C});let P=E===!0&&w!==`trigger-hover`;Nt(C&&P,D===`touch`,O,T);let F=v.useStateSetter(`positionerElement`),I={open:C,side:M.side,align:M.align,anchorHidden:M.anchorHidden,instant:k},L=Lt(e,I,{styles:M.positionerStyles,transitionStatus:A,props:_,refs:[t,F],hidden:!S,inert:!C});return(0,Z.jsxs)(xn.Provider,{value:M,children:[S&&P&&(0,Z.jsx)(xt,{inert:Ft(!C),cutout:T}),(0,Z.jsx)(dt,{id:b,children:L})]})}),wn=Y.createContext(void 0);function Tn(){let[e,t]=Y.useState(0),n=ut(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:Y.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}var En=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...s}=e,c=X(),l=Sn(),u=Rt(!0)!=null,{context:d,hasClosePart:f}=Tn(),p=c.useState(`open`),m=c.useState(`openMethod`),h=c.useState(`instantType`),g=c.useState(`transitionStatus`),_=c.useState(`popupProps`),v=c.useState(`titleElementId`),y=c.useState(`descriptionElementId`),b=c.useState(`modal`),x=c.useState(`mounted`),S=c.useState(`openChangeReason`),C=c.useState(`activeTriggerElement`),w=c.useState(`floatingRootContext`),T=w.useState(`floatingId`),E=c.useState(`disabled`),D=c.useState(`openOnHover`),O=c.useState(`closeDelay`);$e({open:p,ref:c.context.popupRef,onComplete(){p&&c.context.onOpenChangeComplete?.(!0)}}),gt(w,{enabled:D&&!E,closeDelay:O});let k=a===void 0?rt(c.context.popupRef):a,A=b!==!1&&f;c.useSyncedValue(`focusManagerModal`,A);let j=c.useStateSetter(`popupElement`),M={open:p,side:l.side,align:l.align,instant:h,transitionStatus:g},N=wt(`div`,e,{state:M,ref:[t,c.context.popupRef,j],props:[_,{id:T,role:`dialog`,...lt,"aria-labelledby":v,"aria-describedby":y,onKeyDown(e){u&&jt.has(e.key)&&e.stopPropagation()}},Pt(g),s],stateAttributesMapping:Ze});return(0,Z.jsx)(Qe,{context:w,openInteractionType:m,modal:A,disabled:!x||S===`trigger-hover`,initialFocus:k,returnFocus:o,restoreFocus:`popup`,getInsideElements:()=>[c.context.beforeTriggerFocusGuardRef.current],previousFocusableElement:St(C)?C:void 0,nextFocusableElement:c.context.triggerFocusTargetRef,beforeContentFocusGuardRef:c.context.beforeContentFocusGuardRef,children:(0,Z.jsx)(wn.Provider,{value:d,children:N})})}),Dn=(0,Y.forwardRef)(function({children:e,className:t,type:n=`button`,...r},i){return(0,Z.jsxs)(`button`,{...r,ref:i,type:n,className:H(`select caps-select caps-combobox-trigger w-full`,t),children:[(0,Z.jsx)(`span`,{children:e}),(0,Z.jsx)(Te,{className:`caps-select-chevron`,"aria-hidden":`true`})]})});function On({defaultInputValue:e,defaultOpen:t,defaultValue:n,getKey:r,getSearchText:i,groupBy:a,id:o,isDisabled:s,items:c,onOpenChange:l,onCommit:u,multiple:d,controlledOpen:f,controlledKeys:p,trigger:m}){let h=`${o}-listbox`,[g,_]=(0,Y.useState)(e),[v,y]=(0,Y.useState)(!1),[b,x]=(0,Y.useState)(n),[S,C]=(0,Y.useState)(t),w=p??(b===null?[]:[b]),T=m?f??S:!0,E=(0,Y.useMemo)(()=>{let e=g.trim().toLowerCase();return e?c.filter(t=>i(t).toLowerCase().includes(e)):c},[i,c,g]),D=nn({getKey:r,isDisabled:s,items:E});(0,Y.useEffect)(()=>{if(D.activeKey!==null)return;let e=D.enabledItems.find(e=>w.includes(r(e)))??D.enabledItems[0];e&&D.setActiveKey(r(e))},[D.activeKey,D.enabledItems,D.setActiveKey,r,w]);let O=e=>{y(!1),e||_(``),f===void 0&&C(e),l?.(e)},k=e=>`${h}-option-${encodeURIComponent(e)}`,A=e=>{let t=r(e);p===void 0&&x(t),u(e),m&&!d&&O(!1)},j=e=>{y(!0),_(e.target.value),D.setActiveKey(null)},M=e=>{if(be(e))return;let t;switch(e.key){case`ArrowDown`:t=[1,void 0];break;case`ArrowUp`:t=[-1,void 0];break;case`End`:t=[1,`end`];break;case`Home`:t=[-1,`start`]}t?(y(!0),e.preventDefault(),D.move(t[0],t[1])):e.key===`Enter`&&D.activeItem&&(e.preventDefault(),A(D.activeItem))},N=(0,Y.useMemo)(()=>{if(!a)return[{label:``,items:E}];let e=new Map;for(let t of E){let n=a(t),r=e.get(n);r?r.push(t):e.set(n,[t])}return[...e].map(([e,t])=>({label:e,items:t}))},[E,a]);return{keyboardNavigation:v,onPointerMove:()=>{y(!1)},activeKey:D.activeKey,activeItem:D.activeItem,groups:N,inputValue:g,listboxId:h,onInputChange:j,onInputKeyDown:M,optionId:k,open:T,commit:A,selectedKeys:w,setOpen:O}}function kn(e){let{"aria-describedby":t,"aria-invalid":n,"aria-label":r,"aria-labelledby":i,"aria-required":a,activeTone:o=`neutral`,container:s,contentClassName:c,defaultInputValue:l=``,defaultOpen:u=!1,defaultValue:d=null,emptyMessage:f=`No matches`,getKey:p,getLabel:m,getSearchText:h=m,groupBy:g,id:_,inputProps:v,inputRef:y,isDisabled:b=()=>!1,items:x,onOpenChange:S,onValueChange:C,multiple:w,open:T,placeholder:E=`Search…`,renderItem:D,rootRef:O,trigger:k,triggerRef:A,value:j,...M}=e,N=e=>{let t=p(e);if(w){let e=j.includes(t)?j.filter(e=>e!==t):[...j,t];C?.(e,x.filter(t=>e.includes(p(t))))}else C?.(t,e)},P;w?P=j:j!==void 0&&(P=j===null?[]:[j]);let F=(0,Y.useId)(),I=k?.props??v,L=_??I?.id??F,R={id:L,"aria-describedby":[t,I?.[`aria-describedby`]].filter(Boolean).join(` `)||void 0,"aria-invalid":n??I?.[`aria-invalid`],"aria-label":I?.[`aria-label`]??r,"aria-labelledby":I?.[`aria-labelledby`]??i,"aria-required":a??I?.[`aria-required`]},{keyboardNavigation:z,onPointerMove:ee,activeItem:te,activeKey:ne,commit:B,groups:re,inputValue:ie,listboxId:ae,onInputChange:oe,onInputKeyDown:se,open:ce,optionId:le,selectedKeys:ue,setOpen:V}=On({defaultInputValue:l,defaultOpen:u,defaultValue:d,getKey:p,getSearchText:h,groupBy:g,id:L,isDisabled:b,items:x,onOpenChange:S,onCommit:N,multiple:w??!1,controlledOpen:T,controlledKeys:P,trigger:k});it(()=>{k&&V(!1)});let de=kt(`popover`),U=s===void 0?de:s,W=bt(`.caps-combobox-option[data-active="true"]:not(:disabled), [data-navigation="pointer"] .caps-combobox-option:hover:not(:disabled)`),fe=(0,Z.jsx)(G,{...v,...k?{}:R,"aria-activedescendant":te?le(p(te)):void 0,"aria-autocomplete":`list`,"aria-controls":ae,"aria-expanded":!0,className:H(`input-sm`,v?.className),id:k?v?.id??`${L}-input`:L,onChange:e=>{v?.onChange?.(e),oe(e)},onKeyDown:e=>{v?.onKeyDown?.(e),e.defaultPrevented||se(e)},placeholder:v?.placeholder??E,ref:y,role:`combobox`,value:ie}),pe=(0,Z.jsx)(`div`,{id:ae,ref:W,className:`caps-combobox-list`,"data-navigation":z?`keyboard`:`pointer`,onPointerMove:ee,role:`listbox`,"aria-multiselectable":w??void 0,children:re.every(e=>e.items.length===0)?(0,Z.jsx)(`div`,{className:`px-md py-md text-sm text-base-content`,children:f}):re.map(e=>(0,Z.jsxs)(`div`,{"aria-label":e.label||void 0,role:e.label?`group`:void 0,children:[e.label?(0,Z.jsx)(`div`,{className:`px-md pb-xs pt-sm text-xs text-base-content uppercase tracking-wider`,children:e.label}):null,e.items.map(e=>{let t=p(e),n=b(e),r=ne===t,i={active:r,disabled:n,selected:ue.includes(t)};return(0,Z.jsxs)(`button`,{"aria-disabled":n||void 0,"aria-selected":i.selected,className:`caps-combobox-option`,"data-active":r&&z,disabled:n,id:le(t),onClick:()=>{B(e)},onMouseDown:e=>{e.preventDefault()},role:`option`,tabIndex:-1,type:`button`,children:[(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`caps-combobox-check`,children:i.selected?(0,Z.jsx)(xe,{}):null}),D?.(e,r,i)??m(e)]},t)})]},e.label))});return k?(0,Z.jsx)(`div`,{...M,className:H(M.className),ref:O,children:(0,Z.jsxs)(mn,{modal:!0,onOpenChange:V,open:ce,children:[(0,Z.jsx)(_n,{...R,"aria-haspopup":`dialog`,className:`btn`,ref:A,render:k}),U===null?null:(0,Z.jsx)(bn,{container:U,children:(0,Z.jsx)(Cn,{align:`start`,side:`bottom`,sideOffset:4,children:(0,Z.jsxs)(En,{"data-active-tone":o,className:H(`min-w-40 rounded-box border border-base-300 bg-base-100 p-xs shadow-lg outline-none caps-combobox-panel caps-combobox-popup`,c),children:[(0,Z.jsx)(`div`,{className:`caps-combobox-search`,children:fe}),pe]})})})]})}):(0,Z.jsx)(`div`,{...M,className:H(M.className),ref:O,children:(0,Z.jsxs)(`div`,{className:H(`caps-combobox-panel`,c),"data-active-tone":o,children:[(0,Z.jsx)(`div`,{className:`caps-combobox-search`,children:fe}),pe]})})}function An({icon:e,caption:t}){return(0,Z.jsxs)(`span`,{className:`caps-icon-choice-mark`,"aria-hidden":`true`,children:[(0,Z.jsx)(`span`,{className:`caps-icon-choice-art`,children:e}),t?(0,Z.jsx)(`span`,{className:`caps-icon-choice-caption`,children:t}):null,(0,Z.jsx)(`span`,{className:`caps-icon-choice-lamp`})]})}var jn=(0,Y.forwardRef)(function({label:e,icon:t,caption:n,appearance:r,className:i,...a},o){return(0,Z.jsx)(`label`,{className:`caps-icon-choice`,"data-appearance":r===`compact`?r:void 0,children:(0,Z.jsx)(Ie,{...a,appearance:r??`default`,"aria-label":e,className:H(`caps-icon-choice-input`,i),indicator:(0,Z.jsx)(An,{icon:t,caption:n}),ref:o})})}),Mn=(0,Y.forwardRef)(function({label:e,icon:t,hint:n,className:r,...i},a){let o=(0,Y.useId)(),s=[i[`aria-describedby`],n?o:null].filter(Boolean).join(` `)||void 0;return(0,Z.jsx)(`label`,{className:`caps-check-key`,children:(0,Z.jsx)(Ie,{...i,"aria-label":e,"aria-describedby":s,className:H(`caps-check-key-input`,r),indicator:(0,Z.jsxs)(`span`,{className:`caps-check-key-face`,"aria-hidden":`true`,children:[t?(0,Z.jsx)(`span`,{className:`caps-check-key-icon`,children:t}):null,(0,Z.jsxs)(`span`,{className:`caps-check-key-copy`,children:[(0,Z.jsx)(`span`,{className:`caps-check-key-label`,children:e}),n?(0,Z.jsx)(`span`,{className:`caps-check-key-hint`,id:o,children:n}):null]}),(0,Z.jsx)(`span`,{className:`caps-check-key-lamp`})]}),ref:a})})});function Nn({className:e,...t}){return(0,Z.jsx)(`div`,{...t,className:H(`caps-check-keys`,e)})}function Pn({checked:e}){let t=`caps-radio-${(0,Y.useId)().replaceAll(`:`,``)}`,n=(0,Y.useRef)(null),r=(0,Y.useRef)(e).current,i=(0,Y.useRef)(e),a=(0,Y.useRef)(null),o=L(a),{reduced:s}=o;return(0,Y.useLayoutEffect)(()=>{if(!n.current)return;let t=s||i.current===e;i.current=e;let r=e?4:0,a=Ee(o,{ease:`outCubic`,duration:75}),c=e?we(o,{bounce:.65,duration:300}):Ee(o,{ease:`inCubic`,duration:100}),l=Ue(n.current,t?{rx:r,ry:r,cy:6,duration:0}:{rx:[{to:e?3.5:4.15,...a},{to:r,...c}],ry:[{to:e?4.5:3.85,...a},{to:r,...c}],cy:[{to:e?5.85:6.1,...a},{to:6,...c}]});return()=>{l.cancel()}},[e,s,o]),(0,Z.jsxs)(`svg`,{ref:a,className:`caps-radio-visual`,width:`24`,height:`24`,viewBox:`0 0 12 12`,"aria-hidden":`true`,focusable:`false`,children:[(0,Z.jsxs)(`defs`,{children:[(0,Z.jsx)(le,{id:`${t}-surface`,transform:`matrix(1 0 0 1 6 6)`}),(0,Z.jsx)(ae,{id:`${t}-shadow`}),(0,Z.jsx)(A,{id:`${t}-inset`}),(0,Z.jsx)(`clipPath`,{id:`${t}-well`,children:(0,Z.jsx)(`circle`,{cx:`6`,cy:`6`,r:`5`})})]}),(0,Z.jsx)(`circle`,{className:`caps-radio-track`,cx:`6`,cy:`6`,r:`5.5`,filter:`url(#${t}-inset)`}),(0,Z.jsx)(`g`,{clipPath:`url(#${t}-well)`,children:(0,Z.jsx)(`ellipse`,{ref:n,cx:`6`,cy:`6`,rx:r?4:0,ry:r?4:0,fill:`url(#${t}-surface)`,filter:`url(#${t}-shadow)`})})]})}var Fn=(0,Y.createContext)(null),In=(0,Y.forwardRef)(function({children:e,className:t,defaultValue:n,disabled:r=!1,name:i,onValueChange:a,orientation:o=`vertical`,value:s,...c},l){let u=(0,Y.useId)(),d=(0,Y.useRef)(null);(0,Y.useImperativeHandle)(l,()=>{if(!d.current)throw Error(`RadioGroup is not mounted`);return d.current},[]);let f=i??`radio-group-${u}`,[p,m]=(0,Y.useState)(n),h=s??p;return(0,Y.useEffect)(()=>{let e=d.current?.form;if(!e||s!==void 0)return;let t=e=>{queueMicrotask(()=>{e.defaultPrevented||m(n)})};return e.addEventListener(`reset`,t),()=>{e.removeEventListener(`reset`,t)}},[s,n,c.form]),(0,Z.jsx)(Fn.Provider,{value:{disabled:r,name:f,onValueChange:e=>{s===void 0&&m(e),a?.(e)},value:h},children:(0,Z.jsx)(`fieldset`,{...c,className:H(`flex gap-md`,o===`horizontal`?`flex-row flex-wrap`:`flex-col`,t),disabled:r,role:c.role??`radiogroup`,ref:d,children:e})})}),Q=(0,Y.forwardRef)(function({className:e,indicator:t,onChange:n,onClick:r,value:i,...a},o){let s=(0,Y.useContext)(Fn);if(!s)throw Error(`RadioGroupItem must be used inside <RadioGroup>`);let c=s.value===i,l=e=>{n?.(e),e.target.checked&&s.onValueChange?.(i)};return(0,Z.jsxs)(`span`,{className:`caps-radio`,"data-checked":c,"data-custom-indicator":t!==void 0||void 0,children:[(0,Z.jsx)(`input`,{...a,"aria-checked":c,checked:c,className:H(`caps-radio-input`,e),disabled:s.disabled||a.disabled,name:s.name,onChange:l,onClick:r,ref:o,type:`radio`,value:i}),t===void 0?(0,Z.jsx)(Pn,{checked:c}):t]})}),Ln=(0,Y.forwardRef)(function({description:e,id:t,meta:n,title:r,...i},a){let o=(0,Y.useContext)(Fn),s=(0,Y.useId)(),c=t??s,l=o?.value===i.value,u=o?.disabled===!0||i.disabled===!0;return(0,Z.jsxs)(`label`,{className:`caps-choice-card`,"data-checked":l,"data-disabled":u||void 0,htmlFor:c,children:[(0,Z.jsx)(Q,{...i,"aria-describedby":e?`${c}-description`:void 0,"aria-labelledby":`${c}-title`,id:c,ref:a}),(0,Z.jsxs)(`span`,{className:`caps-choice-card-copy`,children:[(0,Z.jsx)(`span`,{className:`caps-choice-card-title`,id:`${c}-title`,children:r}),e?(0,Z.jsx)(`span`,{className:`caps-choice-card-description`,id:`${c}-description`,children:e}):null]}),n?(0,Z.jsx)(`span`,{className:`caps-choice-card-meta`,children:n}):null]})}),Rn=(0,Y.forwardRef)(function({label:e,icon:t,caption:n,art:r=`dim`,className:i,...a},o){return(0,Z.jsx)(`label`,{className:`caps-icon-choice`,"data-art":r===`color`?r:void 0,children:(0,Z.jsx)(Q,{...a,"aria-label":e,className:H(`caps-icon-choice-input`,i),indicator:(0,Z.jsx)(An,{icon:t,caption:n}),ref:o})})});(0,Y.forwardRef)(function({label:e,color:t,className:n,...r},i){return(0,Z.jsx)(`label`,{className:`caps-icon-choice`,"data-art":`color`,"data-swatch":``,title:e,children:(0,Z.jsx)(Q,{...r,"aria-label":e,className:H(`caps-icon-choice-input`,n),indicator:(0,Z.jsx)(An,{icon:(0,Z.jsx)(`span`,{className:`caps-swatch-dot`,style:{backgroundColor:t}})}),ref:i})})});var zn=u(a),Bn=u(y),Vn=u(f(i)),Hn=u(W(a)),Un=W(C(File)),Wn=u(Un),Gn=x([a,i,y,ee,ge,W(a),Un]),Kn=u(Gn),$=e=>B(zn(e.state.value),()=>``),qn=e=>B(Bn(e.state.value),()=>!1),Jn=e=>B(Vn(e.state.value),()=>null),Yn=e=>B(Hn(e.state.value),()=>[]),Xn=e=>B(Wn(e.state.value),()=>[]),Zn=e=>B(Kn(e.state.value),()=>null);function Qn({field:e,spec:t,locked:n,...r}){let[i,a]=(0,Y.useState)(!1);return(0,Z.jsxs)(He,{children:[(0,Z.jsx)(G,{...r,name:t.name,disabled:n,type:i?`text`:`password`,autoComplete:`off`,spellCheck:!1,className:`caps-field-secret`,placeholder:t.placeholder,readOnly:t.readOnly,value:$(e),onBlur:e.handleBlur,onChange:t=>{e.handleChange(t.currentTarget.value)}}),(0,Z.jsx)(V,{type:`button`,variant:`outline`,size:`icon`,"aria-label":i?`Hide`:`Show`,"aria-pressed":i,disabled:n,onClick:()=>{a(e=>!e)},children:i?(0,Z.jsx)(en,{"aria-hidden":`true`}):(0,Z.jsx)(tn,{"aria-hidden":`true`})})]})}var $n={text:`text`,email:`email`,url:`url`,tel:`tel`};function er({spec:e,field:t,locked:n,...r}){let i=Xn(t),a=n||e.readOnly===!0,o=(0,Y.useRef)(null);return(0,Z.jsxs)(`div`,{className:`flex flex-col gap-sm`,children:[(0,Z.jsx)(O,{asChild:!0,children:(0,Z.jsx)(`input`,{...r,ref:o,type:`file`,tabIndex:-1,required:r.required===!0&&i.length===0,name:e.name,accept:e.accept,multiple:e.multiple,disabled:a,onBlur:t.handleBlur,onChange:e=>{t.handleChange(Array.from(e.currentTarget.files??[])),e.currentTarget.value=``}})}),(0,Z.jsx)(V,{type:`button`,variant:`outline`,"aria-label":`Choose files for ${e.label}`,"aria-describedby":r[`aria-describedby`],"aria-invalid":r[`aria-invalid`],disabled:a,onBlur:t.handleBlur,onClick:()=>{o.current?.click()},children:`Choose files`}),(0,Z.jsx)(Ve,{items:i.map((e,t)=>({id:String(t),name:e.name,preview:{kind:`file`},progress:0,progressLabel:`${String(e.size)} bytes`,statusLabel:`Selected`,actions:a?{}:{remove:{label:`Remove`,accessibleLabel:`Remove ${e.name}`}}})),onRemove:e=>{t.handleChange(i.filter((t,n)=>String(n)!==e))},onCancel:()=>void 0,onRetry:()=>void 0})]})}function tr({spec:e,field:t,locked:n,...r}){let i=e=>{t.handleChange(e)},a={...r,name:e.name,disabled:n,onBlur:t.handleBlur};switch(e.kind){case`text`:case`email`:case`url`:case`tel`:return(0,Z.jsx)(G,{...a,type:$n[e.kind],inputMode:e.kind===`text`?void 0:e.kind,autoComplete:e.autoComplete,placeholder:e.placeholder,maxLength:e.maxLength,readOnly:e.readOnly,value:$(t),onChange:e=>{i(e.currentTarget.value)}});case`textarea`:return(0,Z.jsx)(Se,{...a,rows:e.rows??3,placeholder:e.placeholder,maxLength:e.maxLength,readOnly:e.readOnly,value:$(t),onChange:e=>{i(e.currentTarget.value)}});case`secret`:return(0,Z.jsx)(Qn,{...r,field:t,spec:e,locked:n});case`money`:return(0,Z.jsxs)(He,{children:[(0,Z.jsx)(je,{className:`caps-field-currency`,children:e.currency??`USD`}),(0,Z.jsx)(G,{...a,inputMode:`decimal`,autoComplete:`off`,className:`caps-field-amount`,placeholder:e.placeholder??`0.00`,readOnly:e.readOnly,value:$(t),onChange:e=>{i(e.currentTarget.value)}})]});case`date`:return(0,Z.jsx)(G,{...a,type:`date`,readOnly:e.readOnly,value:$(t),onChange:e=>{i(e.currentTarget.value)}});case`number`:return(0,Z.jsx)(Pe,{...a,...e.min===void 0?{}:{min:e.min},...e.max===void 0?{}:{max:e.max},...e.step===void 0?{}:{step:e.step},...e.unit===void 0?{}:{unit:e.unit},...e.wrap===void 0?{}:{wrap:e.wrap},disabled:n||e.readOnly===!0,decrementLabel:`Decrease ${e.label}`,incrementLabel:`Increase ${e.label}`,value:Jn(t),onValueChange:e=>{t.handleChange(e)}});case`select`:return(0,Z.jsxs)(ze,{...a,value:$(t),onChange:e=>{i(e.currentTarget.value)},children:[e.placeholder===void 0?null:(0,Z.jsx)(`option`,{value:``,disabled:!0,children:e.placeholder}),e.options.map(e=>(0,Z.jsx)(`option`,{value:e.value,disabled:e.disabled,children:e.label},e.value))]});case`combobox`:return(0,Z.jsx)(kn,{id:r.id??e.name,"aria-describedby":r[`aria-describedby`],"aria-invalid":r[`aria-invalid`],"aria-required":r[`aria-required`],items:e.options,getKey:e=>e.value,getLabel:e=>e.label,isDisabled:t=>t.disabled||n||e.readOnly===!0,value:$(t),...e.placeholder===void 0?{}:{placeholder:e.placeholder},trigger:(0,Z.jsx)(Dn,{name:e.name,disabled:n||e.readOnly===!0,onBlur:t.handleBlur,children:e.options.find(e=>e.value===$(t))?.label??e.placeholder??`Choose…`}),inputProps:{"aria-label":`Search ${e.label}`,disabled:n||e.readOnly===!0},onValueChange:e=>{i(e??``),t.handleBlur()}});case`file`:return(0,Z.jsx)(er,{...r,spec:e,field:t,locked:n});case`checkbox`:return(0,Z.jsx)(Ie,{...a,disabled:n||e.readOnly===!0,checked:qn(t),onChange:e=>{t.handleChange(e.currentTarget.checked)}});case`switch`:return(0,Z.jsx)(Ce,{...a,disabled:n||e.readOnly===!0,checked:qn(t),onCheckedChange:e=>{t.handleChange(e)}});case`radio`:case`icon-radio`:case`checkboxes`:case`icon-checkboxes`:return null}}var nr=new Set([`radio`,`icon-radio`,`checkboxes`,`icon-checkboxes`]);function rr({spec:e,field:t,locked:n,error:r,layout:i}){let a=n||e.readOnly===!0,o=e.label;if(e.kind===`checkboxes`||e.kind===`icon-checkboxes`){let n=Yn(t),s=(e,r)=>{t.handleChange(r?[...n,e]:n.filter(t=>t!==e))};return(0,Z.jsx)(ke,{legend:o,icon:e.icon,layout:i,...i===`columns`?{legendTitle:o}:{},description:e.help,disabled:a,error:r??null,children:e.kind===`icon-checkboxes`?(0,Z.jsx)(`div`,{className:`caps-field-icon-choices`,children:e.options.map(r=>(0,Z.jsx)(jn,{name:e.name,value:r.value,label:r.label,...r.caption===void 0?{}:{caption:r.caption},icon:r.icon,disabled:r.disabled,checked:n.includes(r.value),onBlur:t.handleBlur,onChange:e=>{s(r.value,e.currentTarget.checked)}},r.value))}):(0,Z.jsx)(Nn,{children:e.options.map(r=>(0,Z.jsx)(Mn,{name:e.name,value:r.value,label:r.label,icon:r.icon,hint:r.description,disabled:r.disabled,checked:n.includes(r.value),onBlur:t.handleBlur,onChange:e=>{s(r.value,e.currentTarget.checked)}},r.value))})})}let s=e.options.some(e=>e.description!==void 0||e.meta!==void 0);return(0,Z.jsx)(ke,{legend:o,icon:e.icon,layout:i,...i===`columns`?{legendTitle:o}:{},description:e.help,disabled:a,error:r??null,children:(0,Z.jsx)(In,{name:e.name,"aria-label":o,value:$(t),onValueChange:e=>{t.handleChange(e),t.handleBlur()},orientation:e.kind===`icon-radio`||s?`horizontal`:`vertical`,children:e.options.map(t=>e.kind===`icon-radio`?(0,Z.jsx)(Rn,{value:t.value,label:t.label,...t.caption===void 0?{}:{caption:t.caption},icon:t.icon,disabled:t.disabled},t.value):s?(0,Z.jsx)(Ln,{value:t.value,title:t.label,description:t.description,meta:t.meta,disabled:t.disabled},t.value):(0,Z.jsx)(Ne,{label:t.label,orientation:`inline`,children:(0,Z.jsx)(Q,{value:t.value,disabled:t.disabled})},t.value))})})}function ir({spec:e,field:t,locked:n,error:r,render:i,...a}){return i({name:e.name,label:e.label,help:e.help,value:Zn(t),onChange:e=>{t.handleChange(e)},onBlur:t.handleBlur,error:r,disabled:n,id:a.id??e.name,"aria-describedby":a[`aria-describedby`],"aria-invalid":r!==void 0})}function ar({form:e,spec:t,locked:n,layout:r}){let i=Fe({form:e,name:t.name}),a=K(e.store,e=>e.submissionAttempts>0),o=i.state.meta.isBlurred||a?on(i.state.meta):void 0;if(t.render===void 0&&nr.has(t.kind))return(0,Z.jsx)(rr,{spec:t,field:i,locked:n,error:o,layout:r});let s=r===`columns`?t.kind===`switch`||t.kind===`checkbox`?`horizontal`:`vertical`:t.kind===`checkbox`?`inline`:(t.layout??(t.kind===`switch`?`row`:`stacked`))===`row`?`horizontal`:`vertical`;return(0,Z.jsx)(Ne,{label:t.label,...r===`columns`?{labelTitle:t.label}:{},description:t.help,icon:t.icon,orientation:s,error:o,...t.required===void 0?{}:{required:t.required},...t.optional===void 0?{}:{optional:t.optional},children:t.render===void 0?(0,Z.jsx)(tr,{spec:t,field:i,locked:n}):(0,Z.jsx)(ir,{spec:t,field:i,locked:n,error:o,render:t.render})})}var or=u(m(a,Gn));function sr({form:e,spec:t,locked:n,layout:r}){let i=t.when;return K(e.store,e=>i===void 0||i(B(or(e.values),()=>({}))))?(0,Z.jsx)(ar,{form:e,spec:t,locked:n,layout:r}):null}function cr({form:e,section:t,locked:n,layout:r}){let i=t.fields.map(t=>(0,Z.jsx)(sr,{form:e,spec:t,locked:n,layout:r},t.name));return t.title===void 0?i:(0,Z.jsx)(Ae,{title:t.title,description:t.description,layout:r,children:i})}function lr({model:e,names:t,disabled:n=!1,layout:r}){let i=e.form;return t===void 0?e.description.sections.map(e=>(0,Z.jsx)(cr,{form:i,section:e,locked:n,layout:r},e.id??``)):t.map(t=>{let a=e.description.fields.find(e=>e.name===t);return a===void 0?null:(0,Z.jsx)(sr,{form:i,spec:a,locked:n,layout:r},t)})}var ur=class{annotation;constructor(e){this.annotation=e}},dr=class{sections;constructor(e){this.sections=e}},fr=`caps/form`,pr=0;function mr(e){pr+=1;let t={[`${fr}:${String(pr)}`]:new ur(e)};return e.label!==void 0&&(t.title=e.label),e.help!==void 0&&(t.description=e.help),t}a.annotate(mr({kind:`secret`})).pipe(b(`Secret`));var hr=e=>{let t=e.replace(/([a-z0-9])([A-Z])/g,`$1 $2`).replace(/[-_]+/g,` `).toLowerCase();return t.charAt(0).toUpperCase()+t.slice(1)};function gr(e){return Object.values(e??{}).reduce((e,t)=>t instanceof ur?{...e,...t.annotation}:e,{})}function _r(e){return e.reduce((e,t)=>({...e,...gr(t)}),{})}function vr(e){let t=e?.[fr];return t instanceof dr?t.sections:{}}var yr=u(a);function br(e){if(re(e))return o(yr(e.literal),{onNone:()=>null,onSome:e=>[e]});if(!M(e))return null;let t=[];for(let n of e.types){if(he(n))continue;let e=br(n);if(e===null)return null;t.push(...e)}return t}function xr(e){if(U(e))return{type:`string`,literals:[]};if(I(e))return{type:`number`,nullable:!1};if(se(e))return{type:`boolean`};let t=br(e);if(t!==null)return{type:`string`,literals:t};if(F(e)){let[t]=e.rest;if(t===void 0)return null;if(U(t))return{type:`strings`,literals:[]};let n=br(t);return n===null?null:{type:`strings`,literals:n}}if(M(e)){let t=e.types.filter(e=>!he(e)&&!R(e)),n=e.types.some(e=>R(e)),[r]=t;if(t.length!==1||r===void 0)return null;let i=xr(r);return i?.type===`number`?{type:`number`,nullable:n}:n?null:i}return null}function Sr(e){let t=e.ast;if(!k(t))throw Error(`A schema form needs a Schema.Struct.`);return{fields:t.propertySignatures.map(e=>{let t=String(e.name),n=fe(e.type),i=_r([e.type.annotations,...(e.type.checks??[]).map(e=>e.annotations)]),a=i.kind===`file`?{type:`files`}:xr(n);if(a===null)throw Error(`Schema field "${t}" has no form control. Annotate it with field({ render }) or a kind.`);return{name:t,valueType:a,optional:e.type.context?.isOptional===!0,annotation:i,title:r(e.type),description:v(e.type)}}),sections:vr(me(t))}}function Cr(e){let n=e,r=!1,i=!1;for(;;)if(n instanceof ie)r=!0,n=n.unwrap();else if(n instanceof t)i=!0,n=n.unwrap();else if(n instanceof w)n=n.unwrap();else if(n instanceof ce)n=n.in;else return{node:n,optional:r,nullable:i}}function wr(e){if(e instanceof oe){let t=e.options.map(e=>wr(e));return t.some(e=>e===null)?null:t.flatMap(e=>e??[])}let t=e instanceof D?e.options:e instanceof g?[...e.values]:null;if(t===null)return null;let n=t.map(e=>yr(e));return n.every(p)?n.map(e=>e.value):null}function Tr(e){let{node:t,nullable:n}=Cr(e);if(t instanceof z)return{type:`string`,literals:[]};if(t instanceof P)return{type:`number`,nullable:n};if(t instanceof T)return{type:`boolean`};let r=wr(t);if(r!==null)return{type:`string`,literals:r};if(t instanceof l){let e=Cr(t.element).node;if(e instanceof z)return{type:`strings`,literals:[]};let n=wr(e);return n===null?null:{type:`strings`,literals:n}}return null}function Er(e){let n=[e];for(;;){let e=n[n.length-1];if(e===void 0)break;let r=e instanceof ie||e instanceof t||e instanceof w?e.unwrap():e instanceof ce?e.in:e;if(r===e)break;n.push(r)}return n.reverse().map(e=>ne.get(e))}function Dr(e){return Er(e).reduce((e,t)=>({...e,...t}),{})}function Or(e){return Object.entries(e.shape)}function kr(e){let t=Cr(e).node;if(!(t instanceof de))throw Error(`A schema form needs a z.object.`);return{fields:Or(t).map(([e,t])=>{let n=_r(Er(t)),r=n.kind===`file`?{type:`files`}:Tr(t);if(r===null)throw Error(`Schema field "${e}" has no form control. Annotate it with field({ render }) or a kind.`);let i=Dr(t);return{name:e,valueType:r,optional:Cr(t).optional,annotation:n,title:i.title,description:i.description}}),sections:vr(Dr(e))}}function Ar(e,t){let n=t.options??{};return(e.length>0?e:Object.keys(n)).map(e=>{let t=n[e],r=t===void 0?{}:t instanceof Object?t:{label:t};return{value:e,label:r.label??hr(e),description:r.description,meta:r.meta,icon:r.icon,caption:r.caption,disabled:r.disabled===!0}})}function jr(e,t){let n=t.some(e=>e.icon!==void 0);switch(e.type){case`boolean`:return`switch`;case`number`:return`number`;case`strings`:return n?`icon-checkboxes`:`checkboxes`;case`files`:return`file`;case`string`:return t.length===0?`text`:t.length>12?`combobox`:n?`icon-radio`:t.some(e=>e.description!==void 0||e.meta!==void 0)||t.length<=3?`radio`:`select`}}function Mr(e,t){switch(e.type){case`boolean`:return!1;case`number`:return e.nullable?null:0;case`strings`:case`files`:return[];case`string`:return t[0]?.value??``}}function Nr(e){let t=e instanceof j?kr(e):Sr(e),n=t.fields.map((e,t)=>{let{kind:n,...r}=e.annotation,i=Ar(e.valueType.type===`string`||e.valueType.type===`strings`?e.valueType.literals:[],e.annotation),a=r.help??e.description;return{...r,name:e.name,label:r.label??e.title??hr(e.name),help:a,kind:n??jr(e.valueType,i),options:i,optionalInSchema:e.optional,index:t}}),r={};t.fields.forEach((e,t)=>{let i=n[t];i&&(r[e.name]=Mr(e.valueType,i.options))});let i=e=>e.order??e.index,a=e=>e.section!==void 0&&Object.hasOwn(t.sections,e.section)?e.section:null,o=e=>n.filter(t=>a(t)===e).sort((e,t)=>i(e)-i(t)),s=Object.entries(t.sections).map(([e,t])=>({id:e,title:t.title,description:t.description,fields:o(e)}));return{fields:n,sections:[{id:null,title:void 0,description:void 0,fields:o(null)},...s].filter(e=>e.fields.length>0),defaults:r}}function Pr(e){let t=e instanceof j?e:N(e);return{"~standard":{...t[`~standard`],validate:e=>{let n=t[`~standard`].validate(e);return n instanceof Promise?n.then(e=>Fr(e)):Fr(n)}}}}function Fr(e){return e.issues===void 0?e:{issues:e.issues.map(e=>e.path===void 0?e:{...e,path:e.path.slice(0,1)})}}var Ir=`onServer`;function Lr(e){let t=e.querySelector(`[aria-invalid="true"]`),n=t?.matches(`input, select, textarea, button, [tabindex]`)?t:t?.querySelector(`input, select, textarea, button`);return n?.focus(),n!=null}function Rr(e){if(Lr(e))return()=>void 0;let t=new MutationObserver(()=>{Lr(e)&&t.disconnect()});return t.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`aria-invalid`]}),()=>{t.disconnect()}}function zr(e){return e.state.meta.errorMap.onServer!==void 0}function Br(e){e.setMeta(e=>({...e,errorMap:{...e.errorMap,[Ir]:void 0}}))}function Vr(e,t,n){e.setFieldMeta(t,e=>({...e,isBlurred:!0,errorMap:{...e.errorMap,[Ir]:n}}))}function Hr(e){let[t,n]=(0,Y.useState)(null),[r,i]=(0,Y.useState)(null),[a,o]=(0,Y.useState)(e.defaultValues),[s,c]=(0,Y.useState)(null);Me(a,e.defaultValues)||(o(e.defaultValues),c(null));let{schema:l}=e,u=(0,Y.useMemo)(()=>Nr(l),[l]),d=(0,Y.useMemo)(()=>Pr(l),[l]),f=Re({defaultValues:s??a,validators:{onChange:d,onSubmit:d},listeners:{onChange:({fieldApi:e})=>{n(null),i(null),zr(e)&&Br(e)}},onSubmit:async({value:t,formApi:r})=>{n(null),i(null);let a=await Pr(l)[`~standard`].validate(t);if(a.issues){n(a.issues[0]?.message??`Check the form and try again.`);return}let o;try{o=await e.onSubmit(a.value,t)??{kind:`saved`}}catch(t){console.error(`SchemaForm submit failed`,t),n(e.failure??`Couldn't save changes. Try again.`);return}if(o.kind===`refused`){n(o.error??null);let e=r;for(let[t,n]of Object.entries(o.fields??{}))n!==void 0&&n.length>0&&Vr(e,t,n);return}let s=o.values??t;c(s),r.reset(s),i(o.message??`Saved`),e.onSaved?.(s)}});return{description:u,form:f,error:t,saved:r,discard:()=>{n(null),i(null),f.reset()},submit:()=>f.handleSubmit()}}function Ur(e){return{dirty:K(e.form.store,e=>!e.isDefaultValue),submitting:K(e.form.store,e=>e.isSubmitting),canSubmit:K(e.form.store,e=>e.canSubmit)}}function Wr({model:e,submitLabel:t=`Save changes`,discardLabel:n,onCancel:r,cancelLabel:i,allowClean:a,layout:o,footer:s,children:c,disabled:l=!1,...u}){let{submitting:d}=Ur(e),f=(0,Y.useRef)(null),p=(0,Y.useRef)(()=>void 0);return(0,Y.useEffect)(()=>()=>{p.current()},[]),(0,Z.jsxs)(Le,{...u,ref:f,layout:o,busy:d,noValidate:!0,onSubmit:t=>{t.preventDefault(),e.form.state.isSubmitting||e.submit().then(()=>{p.current();let t=f.current;t!==null&&!e.form.state.isValid&&(p.current=Rr(t))})},children:[c??(0,Z.jsx)(lr,{model:e,disabled:l,layout:o}),s===void 0?(0,Z.jsx)(qr,{model:e,label:t,discardLabel:r===void 0?n:void 0,onCancel:r,cancelLabel:i,allowClean:a??r!==void 0,divider:r===void 0}):s]})}function Gr({schema:e,defaultValues:t,onSubmit:n,onSaved:r,failure:i,...a}){let o=Hr({schema:e,defaultValues:t,onSubmit:n,onSaved:r,failure:i});return(0,Z.jsx)(Wr,{...a,model:o})}function Kr(e){return`model`in e?(0,Z.jsx)(Wr,{...e}):(0,Z.jsx)(Gr,{...e})}function qr({model:e,label:t,discardLabel:n,onCancel:r,cancelLabel:i=`Cancel`,allowClean:a=!1,dirtyLabel:o=`Unsaved changes`,buttonProps:s,...c}){let{dirty:l,submitting:u}=Ur(e),d=u?null:e.saved&&!l?(0,Z.jsx)(De,{tone:`success`,size:`compact`,label:e.saved}):l?(0,Z.jsx)(De,{tone:`neutral`,size:`compact`,label:o}):null;return(0,Z.jsxs)(Be,{...c,error:e.error,status:d,children:[r?(0,Z.jsx)(V,{type:`button`,variant:`ghost`,disabled:u,onClick:r,children:i}):n&&l?(0,Z.jsx)(V,{type:`button`,variant:`ghost`,disabled:u,onClick:e.discard,children:n}):null,(0,Z.jsx)(V,{...s,type:`submit`,loading:u,disabled:u||!l&&!a,title:!l&&!a?`No changes to save`:void 0,children:t})]})}function Jr({folder:e}){return(0,Z.jsx)($t,{open:e.editing,onOpenChange:e.setEditing,children:(0,Z.jsxs)(Yt,{children:[(0,Z.jsx)(Zt,{children:(0,Z.jsx)(Xt,{children:`Save prints to`})}),(0,Z.jsx)(Xr,{folder:e},e.computerId),(0,Z.jsx)(Jt,{children:(0,Z.jsx)(Qt,{render:(0,Z.jsx)(V,{variant:`outline`,size:`sm`}),children:`Close`})})]})})}var Yr=s({path:d.check(ue(E(ve),{message:`Enter an absolute Computer folder, such as /media.`})).annotate(mr({label:`Folder`,placeholder:`/media`}))});function Xr({folder:e}){let t=(0,Y.useRef)(!1),n=Hr({schema:Yr,defaultValues:{path:e.path??`/media`},onSubmit:async({path:n})=>{let r=await e.choose(n,t.current);return r?{kind:`refused`,fields:{path:r}}:{kind:`saved`}}}),r=e=>{t.current=e,n.form.setFieldMeta(`path`,e=>({...e,errorMap:{...e.errorMap,onServer:void 0}}))},i=e.busy||!e.writable;return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Kr,{model:n,disabled:i,footer:(0,Z.jsxs)(Be,{divider:!1,children:[(0,Z.jsx)(qt,{className:`[--caps-keycap-width:auto]`,label:`Use`,type:`submit`,disabled:i,onClick:()=>{r(!1)}}),(0,Z.jsx)(qt,{className:`[--caps-keycap-width:auto]`,label:`Create`,type:`submit`,disabled:i,onClick:()=>{r(!0)}})]})}),e.error?(0,Z.jsx)(_e,{role:`alert`,icon:(0,Z.jsx)(Oe,{"aria-hidden":`true`,className:`size-[var(--stipe-icon-size-sm)]`}),primary:e.error}):(0,Z.jsx)(ye,{children:e.writable?`Prints saves new images and uploads here and shows this folder as your gallery.`:`This Computer is read-only for Prints, so the folder can’t change.`})]})}export{Jr as PrintsFolderDialog};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{A as t,An as n,Bn as r,C as i,F as a,Fn as o,I as s,In as c,Ln as l,M as u,Mn as d,Nn as f,Pn as p,Rn as m,Vn as h,W as g,a as _,g as v,it as y,jn as b,m as x,o as S,s as C,st as w,v as T,x as E,zn as D}from"./button-oE2Hrd5D.js";import{a as O,i as k,r as A,t as j}from"./status-DNJRO5m5.js";import{r as M}from"./modules-C4mfDnjH.js";import{n as N}from"./keycap-D2RkH2IS.js";var P=r(`ZodMiniType`,(e,t)=>{if(!e._zod)throw Error(`Uninitialized schema in ZodMiniType.`);d.init(e,t),e.def=t,e.type=t.type,e.parse=(t,n)=>f(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>o(e,t,n),e.parseAsync=async(t,n)=>p(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>c(e,t,n),e.check=(...n)=>e.clone({...t,checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]},{parent:!0}),e.with=e.check,e.clone=(t,n)=>l(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.apply=t=>t(e)}),F=r(`ZodMiniObject`,(e,t)=>{b.init(e,t),P.init(e,t),m(e,`shape`,()=>t.shape)});function I(e,t){return new F({type:`object`,shape:e??{},...D(t)})}var L=r(`ZodMiniLiteral`,(e,t)=>{n.init(e,t),P.init(e,t)});function R(e,t){return new L({type:`literal`,values:Array.isArray(e)?e:[e],...D(t)})}var z=E(`Check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),B=E(`FileImage`,[[`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`,key:`1rqfz7`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`circle`,{cx:`10`,cy:`12`,r:`2`,key:`737tya`}],[`path`,{d:`m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22`,key:`wt3hpn`}]]),V=E(`RotateCcw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]);s({computerId:t});var H=a.pipe(g(y(4096)),g(w(e=>e.startsWith(`/`)&&e!==`/`&&!e.includes(`\0`)&&!e.endsWith(`/`)&&!e.split(`/`).some(e=>e===`.`||e===`..`))));s({path:u(H)});var U=i(),W=e(h(),1);function G({checked:e}){let t=`caps-switch-${(0,W.useId)().replaceAll(`:`,``)}`,n=(0,W.useRef)(null),r=(0,W.useRef)(null),i=(0,W.useRef)(e).current,a=(0,W.useRef)(e),o=v();return(0,W.useLayoutEffect)(()=>{if(!n.current||!r.current)return;let t=o||a.current===e;a.current=e;let i=e?16:8,s=x(n.current),c=k(s,{bounce:.25,duration:440}),l=A(s,{ease:`inOutSine`,duration:100}),u=M(n.current,t?{x:2,y:2,width:i,height:8,duration:0}:{x:[{to:e?2.5:1.5,...l},{to:2,...c}],y:[{to:1.5,...l},{to:2,...c}],height:[{to:9,...l},{to:8,...c}],width:[{to:e?7:16.5,...l},{to:i,...c}]}),d=M(r.current,{gradientTransform:e?`matrix(2 0 0 1 10 6)`:`matrix(1 0 0 1 6 6)`,...t?{duration:0}:{delay:l.duration,...c}});return()=>{u.cancel(),d.cancel()}},[e,o]),(0,U.jsxs)(`svg`,{className:`caps-switch-visual`,width:`40`,height:`24`,viewBox:`0 0 20 12`,"aria-hidden":`true`,focusable:`false`,children:[(0,U.jsxs)(`defs`,{children:[(0,U.jsx)(C,{ref:r,id:`${t}-surface`,transform:i?`matrix(2 0 0 1 10 6)`:`matrix(1 0 0 1 6 6)`}),(0,U.jsx)(S,{id:`${t}-shadow`}),(0,U.jsx)(_,{id:`${t}-inset`}),(0,U.jsx)(`clipPath`,{id:`${t}-track`,children:(0,U.jsx)(`rect`,{x:`1`,y:`1`,width:`18`,height:`10`,rx:`5`})})]}),(0,U.jsx)(`rect`,{className:`caps-switch-track`,filter:`url(#${t}-inset)`,x:`0.5`,y:`0.5`,width:`19`,height:`11`,rx:`5.5`}),(0,U.jsx)(`g`,{clipPath:`url(#${t}-track)`,children:(0,U.jsx)(`rect`,{ref:n,x:`2`,y:`2`,width:i?16:8,height:`8`,rx:`4`,fill:`url(#${t}-surface)`,filter:`url(#${t}-shadow)`})})]})}var K=(0,W.forwardRef)(function({className:e,checked:t,defaultChecked:n=!1,onChange:r,onCheckedChange:i,...a},o){let s=(0,W.useRef)(null),[c,l]=(0,W.useState)(n),u=t??c;return(0,W.useImperativeHandle)(o,()=>{if(!s.current)throw Error(`Switch input is not mounted`);return s.current},[]),(0,W.useEffect)(()=>{let e=s.current?.form;if(!e||t!==void 0)return;let r=e=>{queueMicrotask(()=>{!e.defaultPrevented&&s.current&&l(n)})};return e.addEventListener(`reset`,r),()=>{e.removeEventListener(`reset`,r)}},[t,n,a.form]),(0,U.jsxs)(`span`,{className:`caps-switch`,"data-checked":u,children:[(0,U.jsx)(`input`,{...a,checked:u,className:T(`caps-switch-input`,e),onChange:e=>{t===void 0&&l(e.target.checked),r?.(e),i?.(e.target.checked)},ref:s,role:`switch`,type:`checkbox`}),(0,U.jsx)(G,{checked:u})]})}),q=I({keyCode:R(229)});function J(e){return e.nativeEvent.isComposing||o(q,e.nativeEvent).success}var Y=(0,W.forwardRef)(function({className:e,...t},n){return(0,U.jsx)(`div`,{...t,ref:n,className:T(`caps-popover-anchor`,e)})}),X=(0,W.forwardRef)(function({className:e,open:t,side:n=`top`,...r},i){return t?(0,U.jsx)(`div`,{...r,ref:i,className:T(`caps-popover`,e),"data-side":n}):null}),Z=(0,W.forwardRef)(function({active:e,className:t,onMouseDown:n,...r},i){return(0,U.jsx)(`div`,{role:`option`,"aria-selected":e,...r,ref:i,className:T(`caps-popover-option`,t),"data-active":e,onMouseDown:e=>{e.preventDefault(),n?.(e)}})});function Q({items:e,openId:t,onOpenChange:n,leading:r,trailing:i,renderTrigger:a,placement:o=`housing`,align:s=`end`,hostInset:c,className:l,...u}){let d=(0,W.useId)(),f=(0,W.useRef)(null),p=(0,W.useRef)(null),m=(0,W.useRef)(new Map),h=e.find(e=>e.id===t&&!e.disabled),g=h?.id,_=()=>{g&&m.current.get(g)?.focus(),n(null)};return(0,W.useEffect)(()=>{g&&p.current?.focus()},[g]),(0,W.useEffect)(()=>{c===void 0?f.current?.style.removeProperty(`--caps-status-tray-host-inset`):f.current?.style.setProperty(`--caps-status-tray-host-inset`,`${String(Math.max(0,c))}px`)},[c]),(0,W.useEffect)(()=>{if(!g)return;let e=e=>{e.key!==`Escape`||e.defaultPrevented||(e.preventDefault(),m.current.get(g)?.focus(),n(null))},t=e=>{!(e.target instanceof Node)||f.current?.contains(e.target)||f.current?.querySelector(`[aria-haspopup="menu"][aria-expanded="true"]`)||n(null)};return document.addEventListener(`keydown`,e),document.addEventListener(`pointerdown`,t,!0),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`pointerdown`,t,!0)}},[g,n]),(0,U.jsxs)(Y,{...u,ref:f,className:T(`caps-status-tray`,l),"data-placement":o,"data-align":s,children:[h?(0,U.jsxs)(X,{open:!0,ref:p,tabIndex:-1,side:`top`,id:`${d}-${h.id}`,role:`dialog`,"aria-labelledby":`${d}-title`,className:`caps-status-tray-panel`,"data-status-tray-panel":h.id,children:[(0,U.jsxs)(`div`,{className:`caps-status-tray-head`,children:[h.tone?(0,U.jsx)(j,{size:`compact`,tone:h.tone,glyph:h.glyph??`dot`}):null,(0,U.jsx)(`span`,{id:`${d}-title`,className:`caps-status-tray-title`,children:h.title??h.label}),h.actions,(0,U.jsx)(N,{"aria-label":`Close tray`,icon:(0,U.jsx)(O,{"aria-hidden":`true`}),onClick:_})]}),(0,U.jsx)(`div`,{className:`caps-status-tray-body`,children:h.content})]}):null,o===`host`?null:(0,U.jsxs)(`div`,{className:`caps-status-tray-row`,children:[r,(0,U.jsx)(`div`,{className:`caps-status-tray-chips`,children:e.map(e=>{let r={ref:t=>{t?m.current.set(e.id,t):m.current.delete(e.id)},type:`button`,className:a?void 0:`caps-status-tray-chip`,"aria-expanded":g===e.id,"aria-controls":g===e.id?`${d}-${e.id}`:void 0,"aria-label":e.accessibleLabel,disabled:e.disabled,title:e.disabled?e.accessibleLabel:void 0,"aria-haspopup":`dialog`,"data-status-tray-chip":e.id,onClick:()=>{n(t===e.id?null:e.id)},children:(0,U.jsxs)(U.Fragment,{children:[e.tone?(0,U.jsx)(j,{size:`compact`,glyph:e.glyph??`dot`,motion:e.motion??`none`,tone:e.tone}):null,(0,U.jsx)(`span`,{className:`caps-status-tray-label`,children:e.label}),e.count!==void 0&&e.count>0?(0,U.jsx)(`span`,{className:`caps-status-tray-count`,children:e.count}):null]})};return(0,U.jsxs)(W.Fragment,{children:[a?a(r):(0,U.jsx)(`button`,{...r}),e.after]},e.id)})}),i]})]})}function $({children:e,className:t,...n}){return(0,U.jsx)(`div`,{...n,className:T(`caps-status-tray-list`,t),children:e})}function ee({icon:e,primary:t,secondary:n,actions:r,className:i,...a}){return(0,U.jsxs)(`div`,{...a,className:T(`caps-status-tray-item`,i),children:[e?(0,U.jsx)(`span`,{className:`caps-status-tray-icon`,children:e}):null,(0,U.jsxs)(`span`,{className:`caps-status-tray-text`,children:[(0,U.jsx)(`span`,{className:`caps-status-tray-primary`,children:t}),n?(0,U.jsx)(`span`,{className:`caps-status-tray-secondary`,children:n}):null]}),r?(0,U.jsx)(`span`,{className:`caps-status-tray-actions`,children:r}):null]})}function te({children:e=`All caught up.`,title:t}){return(0,U.jsxs)(`div`,{className:`caps-status-tray-note`,children:[t?(0,U.jsx)(`strong`,{className:`caps-status-tray-note-title`,children:t}):null,(0,U.jsx)(`p`,{children:e})]})}var ne=(0,W.forwardRef)(function({className:e,invalid:t,...n},r){return(0,U.jsx)(`textarea`,{...n,"aria-invalid":t?!0:n[`aria-invalid`]===!1?void 0:n[`aria-invalid`],className:T(`textarea textarea-bordered w-full`,t&&`textarea-error`,e),ref:r})});export{ee as a,Z as c,H as d,V as f,te as i,J as l,z as m,Q as n,X as o,B as p,$ as r,Y as s,ne as t,K as u};