@dubusoft/toodo-linux-arm64 1.9.2-dev.119 → 1.9.2-dev.121
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/toodo +0 -0
- package/bin/toodo-server +0 -0
- package/package.json +1 -1
- package/web/assets/{details-sheet-BJf5WBDy.js → details-sheet-jYHiT_Ag.js} +1 -1
- package/web/assets/event-CHxdkAIB.js +7 -0
- package/web/assets/{index-CKxNxMCO.js → index-CIFtOFkp.js} +5 -5
- package/web/assets/index-DHzwSsNe.css +2 -0
- package/web/assets/{offline-screen-f-9Vpi6j.js → offline-screen-CVBZkhb6.js} +1 -1
- package/web/assets/queries-JuIQKikB.js +1 -0
- package/web/assets/{review-Dxur5Ili.js → review-DihNMhgL.js} +1 -1
- package/web/assets/server-access-CzRgnc0Y.js +1 -0
- package/web/assets/{task-details-Cbfgx1-G.js → task-details-CcF2RHPQ.js} +1 -1
- package/web/assets/{task-graph-qDAGR3d0.js → task-graph-C1SbUshM.js} +1 -1
- package/web/index.html +5 -5
- package/web/sw.js +2 -2
- package/web/version.json +1 -1
- package/web/assets/event-DMqRNLc_.js +0 -7
- package/web/assets/index-dbSaGk6B.css +0 -2
- package/web/assets/queries-DQ2qKkj-.js +0 -1
- package/web/assets/server-access-J5w3e413.js +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
|
|
2
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){:root,:host{--shimmer-angle:20deg}*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0;--scroll-fade-t:0px;--scroll-fade-b:0px;--scroll-fade-s:0px;--scroll-fade-e:0px;--scroll-fade-mask:initial;--shimmer-image:initial;--shimmer-text-fill:initial}}}@layer theme{:root,:host{--font-sans:"Geist Variable", sans-serif;--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-amber-950:oklch(27.9% .077 45.635);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-700:oklch(50.8% .118 165.612);--color-emerald-800:oklch(43.2% .095 166.913);--color-emerald-900:oklch(37.8% .077 168.94);--color-emerald-950:oklch(26.2% .051 172.552);--color-sky-50:oklch(97.7% .013 236.62);--color-sky-100:oklch(95.1% .026 236.824);--color-sky-200:oklch(90.1% .058 230.902);--color-sky-300:oklch(82.8% .111 230.318);--color-sky-500:oklch(68.5% .169 237.323);--color-sky-600:oklch(58.8% .158 241.966);--color-sky-700:oklch(50% .134 242.749);--color-sky-800:oklch(44.3% .11 240.79);--color-sky-900:oklch(39.1% .09 240.876);--color-sky-950:oklch(29.3% .066 243.157);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-blue-950:oklch(28.2% .091 267.935);--color-violet-100:oklch(94.3% .029 294.588);--color-violet-200:oklch(89.4% .057 293.283);--color-violet-300:oklch(81.1% .111 293.571);--color-violet-500:oklch(60.6% .25 292.717);--color-violet-700:oklch(49.1% .27 292.581);--color-violet-800:oklch(43.2% .232 292.759);--color-violet-950:oklch(28.3% .141 291.089);--color-rose-50:oklch(96.9% .015 12.422);--color-rose-100:oklch(94.1% .03 12.58);--color-rose-200:oklch(89.2% .058 10.001);--color-rose-300:oklch(81% .117 11.638);--color-rose-400:oklch(71.2% .194 13.428);--color-rose-500:oklch(64.5% .246 16.439);--color-rose-700:oklch(51.4% .222 16.935);--color-rose-800:oklch(45.5% .188 13.697);--color-rose-900:oklch(41% .159 10.272);--color-rose-950:oklch(27.1% .105 12.094);--color-neutral-400:oklch(70.8% 0 none);--color-black:#000;--spacing:.25rem;--container-sm:24rem;--container-md:28rem;--container-xl:36rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--tracking-tight:-.025em;--leading-snug:1.375;--radius-xs:.125rem;--radius-md:calc(var(--radius) * .8);--radius-xl:calc(var(--radius) * 1.4);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:"Geist Variable", sans-serif;--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){*{outline-color:color-mix(in oklab, var(--ring) 50%, transparent)}}body{background-color:var(--background);color:var(--foreground)}html{font-family:Geist Variable,sans-serif}input,textarea,[contenteditable]{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}::placeholder{color:var(--muted-foreground);opacity:1}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:0}.inset-x-0{inset-inline:0}.inset-x-2{inset-inline:calc(var(--spacing) * 2)}.inset-y-0{inset-block:0}.-top-1{top:calc(var(--spacing) * -1)}.top-0{top:0}.top-1\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.right-0{right:0}.bottom-0{bottom:0}.bottom-2{bottom:calc(var(--spacing) * 2)}.-left-1{left:calc(var(--spacing) * -1)}.left-0{left:0}.z-10{z-index:10}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.m-4{margin:calc(var(--spacing) * 4)}.mx-auto{margin-inline:auto}.-mt-2{margin-top:calc(var(--spacing) * -2)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-auto{margin-top:auto}.mr-1{margin-right:var(--spacing)}.mr-1\.5{margin-right:calc(var(--spacing) * 1.5)}.mb-1{margin-bottom:var(--spacing)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.-ml-1{margin-left:calc(var(--spacing) * -1)}.ml-1{margin-left:var(--spacing)}.ml-5\.5{margin-left:calc(var(--spacing) * 5.5)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.size-1\.5{width:calc(var(--spacing) * 1.5);height:calc(var(--spacing) * 1.5)}.size-2{width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2)}.size-3{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.size-3\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-9{width:calc(var(--spacing) * 9);height:calc(var(--spacing) * 9)}.h-1{height:var(--spacing)}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-3{height:calc(var(--spacing) * 3)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-11{height:calc(var(--spacing) * 11)}.h-24{height:calc(var(--spacing) * 24)}.h-40{height:calc(var(--spacing) * 40)}.h-auto{height:auto}.h-dvh{height:100dvh}.h-full{height:100%}.max-h-60{max-height:calc(var(--spacing) * 60)}.max-h-\[90dvh\]{max-height:90dvh}.max-h-\[min\(32rem\,calc\(100dvh-2rem\)\)\]{max-height:min(32rem,100dvh - 2rem)}.min-h-0{min-height:0}.min-h-7{min-height:calc(var(--spacing) * 7)}.min-h-16{min-height:calc(var(--spacing) * 16)}.min-h-40{min-height:calc(var(--spacing) * 40)}.min-h-svh{min-height:100svh}.w-2{width:calc(var(--spacing) * 2)}.w-3{width:calc(var(--spacing) * 3)}.w-4{width:calc(var(--spacing) * 4)}.w-9{width:calc(var(--spacing) * 9)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-24{width:calc(var(--spacing) * 24)}.w-28{width:calc(var(--spacing) * 28)}.w-32{width:calc(var(--spacing) * 32)}.w-40{width:calc(var(--spacing) * 40)}.w-48{width:calc(var(--spacing) * 48)}.w-56{width:calc(var(--spacing) * 56)}.w-64{width:calc(var(--spacing) * 64)}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.max-w-40{max-width:calc(var(--spacing) * 40)}.max-w-48{max-width:calc(var(--spacing) * 48)}.max-w-56{max-width:calc(var(--spacing) * 56)}.max-w-full{max-width:100%}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.max-w-xl{max-width:var(--container-xl)}.min-w-0{min-width:0}.min-w-44{min-width:calc(var(--spacing) * 44)}.min-w-48{min-width:calc(var(--spacing) * 48)}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.basis-40{flex-basis:calc(var(--spacing) * 40)}.basis-48{flex-basis:calc(var(--spacing) * 48)}.basis-56{flex-basis:calc(var(--spacing) * 56)}.basis-full{flex-basis:100%}.border-collapse{border-collapse:collapse}.-rotate-90{rotate:-90deg}.rotate-45{rotate:45deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.resize{resize:both}.resize-y{resize:vertical}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-x-4{column-gap:calc(var(--spacing) * 4)}.gap-x-6{column-gap:calc(var(--spacing) * 6)}.gap-y-0\.5{row-gap:calc(var(--spacing) * .5)}.gap-y-1{row-gap:var(--spacing)}.gap-y-2{row-gap:calc(var(--spacing) * 2)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}.self-start{align-self:flex-start}.self-stretch{align-self:stretch}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.rounded{border-radius:.25rem}.rounded-\[min\(var\(--radius-md\)\,10px\)\]{border-radius:min(var(--radius-md), 10px)}.rounded-\[min\(var\(--radius-md\)\,12px\)\]{border-radius:min(var(--radius-md), 12px)}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) * .8)}.rounded-sm{border-radius:calc(var(--radius) * .6)}.rounded-xl{border-radius:calc(var(--radius) * 1.4)}.rounded-t-xl{border-top-left-radius:calc(var(--radius) * 1.4);border-top-right-radius:calc(var(--radius) * 1.4)}.rounded-l-md{border-top-left-radius:calc(var(--radius) * .8);border-bottom-left-radius:calc(var(--radius) * .8)}.rounded-r-md{border-top-right-radius:calc(var(--radius) * .8);border-bottom-right-radius:calc(var(--radius) * .8)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-amber-300{border-color:var(--color-amber-300)}.border-amber-500{border-color:var(--color-amber-500)}.border-blue-300{border-color:var(--color-blue-300)}.border-blue-500{border-color:var(--color-blue-500)}.border-border,.border-border\/60{border-color:var(--border)}@supports (color:color-mix(in lab, red, red)){.border-border\/60{border-color:color-mix(in oklab, var(--border) 60%, transparent)}}.border-destructive\/40{border-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.border-destructive\/40{border-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.border-destructive\/60{border-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.border-destructive\/60{border-color:color-mix(in oklab, var(--destructive) 60%, transparent)}}.border-emerald-300{border-color:var(--color-emerald-300)}.border-emerald-500{border-color:var(--color-emerald-500)}.border-foreground\/70{border-color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.border-foreground\/70{border-color:color-mix(in oklab, var(--foreground) 70%, transparent)}}.border-input{border-color:var(--input)}.border-muted-foreground,.border-muted-foreground\/70{border-color:var(--muted-foreground)}@supports (color:color-mix(in lab, red, red)){.border-muted-foreground\/70{border-color:color-mix(in oklab, var(--muted-foreground) 70%, transparent)}}.border-rose-300{border-color:var(--color-rose-300)}.border-rose-500{border-color:var(--color-rose-500)}.border-sky-300{border-color:var(--color-sky-300)}.border-sky-500{border-color:var(--color-sky-500)}.border-transparent{border-color:#0000}.border-violet-300{border-color:var(--color-violet-300)}.border-violet-500{border-color:var(--color-violet-500)}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-100{background-color:var(--color-amber-100)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-background{background-color:var(--background)}.bg-black{background-color:var(--color-black)}.bg-black\/40{background-color:#0006}@supports (color:color-mix(in lab, red, red)){.bg-black\/40{background-color:color-mix(in oklab, var(--color-black) 40%, transparent)}}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-card{background-color:var(--card)}.bg-current{background-color:currentColor}.bg-destructive,.bg-destructive\/5{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.bg-destructive\/5{background-color:color-mix(in oklab, var(--destructive) 5%, transparent)}}.bg-destructive\/10{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.bg-destructive\/10{background-color:color-mix(in oklab, var(--destructive) 10%, transparent)}}.bg-emerald-100{background-color:var(--color-emerald-100)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-muted{background-color:var(--muted)}.bg-muted-foreground\/40{background-color:var(--muted-foreground)}@supports (color:color-mix(in lab, red, red)){.bg-muted-foreground\/40{background-color:color-mix(in oklab, var(--muted-foreground) 40%, transparent)}}.bg-muted\/60{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.bg-muted\/60{background-color:color-mix(in oklab, var(--muted) 60%, transparent)}}.bg-neutral-400{background-color:var(--color-neutral-400)}.bg-popover{background-color:var(--popover)}.bg-primary{background-color:var(--primary)}.bg-rose-50{background-color:var(--color-rose-50)}.bg-rose-100{background-color:var(--color-rose-100)}.bg-rose-500{background-color:var(--color-rose-500)}.bg-secondary{background-color:var(--secondary)}.bg-sidebar{background-color:var(--sidebar)}.bg-sidebar-accent{background-color:var(--sidebar-accent)}.bg-sky-50{background-color:var(--color-sky-50)}.bg-sky-100{background-color:var(--color-sky-100)}.bg-sky-500{background-color:var(--color-sky-500)}.bg-transparent{background-color:#0000}.bg-violet-100{background-color:var(--color-violet-100)}.bg-violet-500{background-color:var(--color-violet-500)}.bg-clip-padding{background-clip:padding-box}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-10{padding-block:calc(var(--spacing) * 10)}.pt-1{padding-top:var(--spacing)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-\[min\(15vh\,8rem\)\]{padding-top:min(15vh,8rem)}.pb-1{padding-bottom:var(--spacing)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-\[env\(safe-area-inset-bottom\)\]{padding-bottom:env(safe-area-inset-bottom)}.pl-0\.5{padding-left:calc(var(--spacing) * .5)}.pl-1{padding-left:var(--spacing)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-5{padding-left:calc(var(--spacing) * 5)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-middle{vertical-align:middle}.align-text-bottom{vertical-align:text-bottom}.font-mono{font-family:var(--font-mono)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[0\.8rem\]{font-size:.8rem}.text-\[0\.85em\]{font-size:.85em}.text-\[0\.625rem\]{font-size:.625rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-4{--tw-leading:calc(var(--spacing) * 4);line-height:calc(var(--spacing) * 4)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.break-normal{overflow-wrap:normal;word-break:normal}.\[overflow-wrap\:normal\]{overflow-wrap:normal}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.text-amber-700{color:var(--color-amber-700)}.text-amber-900{color:var(--color-amber-900)}.text-amber-950{color:var(--color-amber-950)}.text-blue-700{color:var(--color-blue-700)}.text-blue-800{color:var(--color-blue-800)}.text-card-foreground{color:var(--card-foreground)}.text-destructive{color:var(--destructive)}.text-emerald-700{color:var(--color-emerald-700)}.text-emerald-800{color:var(--color-emerald-800)}.text-foreground,.text-foreground\/70{color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.text-foreground\/70{color:color-mix(in oklab, var(--foreground) 70%, transparent)}}.text-muted-foreground{color:var(--muted-foreground)}.text-popover-foreground{color:var(--popover-foreground)}.text-primary{color:var(--primary)}.text-primary-foreground{color:var(--primary-foreground)}.text-rose-700{color:var(--color-rose-700)}.text-rose-800{color:var(--color-rose-800)}.text-rose-900{color:var(--color-rose-900)}.text-secondary-foreground{color:var(--secondary-foreground)}.text-sidebar-foreground{color:var(--sidebar-foreground)}.text-sky-700{color:var(--color-sky-700)}.text-sky-800{color:var(--color-sky-800)}.text-sky-900{color:var(--color-sky-900)}.text-violet-700{color:var(--color-violet-700)}.text-violet-800{color:var(--color-violet-800)}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.decoration-muted-foreground\/60{-webkit-text-decoration-color:var(--muted-foreground);-webkit-text-decoration-color:var(--muted-foreground);-webkit-text-decoration-color:var(--muted-foreground);text-decoration-color:var(--muted-foreground)}@supports (color:color-mix(in lab, red, red)){.decoration-muted-foreground\/60{-webkit-text-decoration-color:color-mix(in oklab, var(--muted-foreground) 60%, transparent);-webkit-text-decoration-color:color-mix(in oklab, var(--muted-foreground) 60%, transparent);-webkit-text-decoration-color:color-mix(in oklab, var(--muted-foreground) 60%, transparent);text-decoration-color:color-mix(in oklab, var(--muted-foreground) 60%, transparent)}}.decoration-dotted{text-decoration-style:dotted}.underline-offset-2{text-underline-offset:2px}.underline-offset-4{text-underline-offset:4px}.accent-sky-600{accent-color:var(--color-sky-600)}.opacity-0{opacity:0}.opacity-40{opacity:.4}.opacity-60{opacity:.6}.opacity-80{opacity:.8}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring,.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-muted-foreground\/40{--tw-ring-color:var(--muted-foreground)}@supports (color:color-mix(in lab, red, red)){.ring-muted-foreground\/40{--tw-ring-color:color-mix(in oklab, var(--muted-foreground) 40%, transparent)}}.ring-primary{--tw-ring-color:var(--primary)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.sepia{--tw-sepia:sepia(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.outline-none{--tw-outline-style:none;outline-style:none}.select-all{-webkit-user-select:all;user-select:all}.select-none{-webkit-user-select:none;user-select:none}.\!running{animation-play-state:running!important}.\[text-shadow\:0_0_3px_var\(--background\)\,0_0_3px_var\(--background\)\]{text-shadow:0 0 3px var(--background),0 0 3px var(--background)}.paused{animation-play-state:paused}.ring-inset{--tw-ring-inset:inset}.running{animation-play-state:running}.group-open\:rotate-90:is(:where(.group):is([open],:popover-open,:open) *){rotate:90deg}.group-focus-within\/guideline\:opacity-100:is(:where(.group\/guideline):focus-within *){opacity:1}@media (hover:hover){.group-hover\:opacity-100:is(:where(.group):hover *),.group-hover\/guideline\:opacity-100:is(:where(.group\/guideline):hover *){opacity:1}}.placeholder\:text-muted-foreground::placeholder{color:var(--muted-foreground)}.first\:pt-0:first-child{padding-top:0}.open\:basis-full:is([open],:popover-open,:open){flex-basis:100%}.empty\:hidden:empty{display:none}@media (hover:hover){.hover\:bg-\[color-mix\(in_oklch\,var\(--secondary\)\,var\(--foreground\)_5\%\)\]:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-\[color-mix\(in_oklch\,var\(--secondary\)\,var\(--foreground\)_5\%\)\]:hover{background-color:color-mix(in oklch,var(--secondary),var(--foreground) 5%)}}.hover\:bg-destructive\/10:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-destructive\/10:hover{background-color:color-mix(in oklab, var(--destructive) 10%, transparent)}}.hover\:bg-destructive\/20:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-destructive\/20:hover{background-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.hover\:bg-emerald-200:hover{background-color:var(--color-emerald-200)}.hover\:bg-muted:hover{background-color:var(--muted)}.hover\:bg-primary\/80:hover{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-primary\/80:hover{background-color:color-mix(in oklab, var(--primary) 80%, transparent)}}.hover\:bg-sidebar-accent:hover{background-color:var(--sidebar-accent)}.hover\:text-destructive:hover{color:var(--destructive)}.hover\:text-foreground:hover{color:var(--foreground)}.hover\:no-underline:hover{text-decoration-line:none}.hover\:underline:hover{text-decoration-line:underline}.hover\:brightness-95:hover{--tw-brightness:brightness(95%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}}.focus-visible\:border-destructive\/40:focus-visible{border-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.focus-visible\:border-destructive\/40:focus-visible{border-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.focus-visible\:border-ring:focus-visible{border-color:var(--ring)}.focus-visible\:opacity-100:focus-visible{opacity:1}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-3:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.active\:translate-y-px:active{--tw-translate-y:1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-default:disabled{cursor:default}.disabled\:bg-emerald-100:disabled{background-color:var(--color-emerald-100)}.disabled\:bg-muted:disabled{background-color:var(--muted)}.disabled\:text-muted-foreground:disabled{color:var(--muted-foreground)}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}@media (hover:hover){.disabled\:hover\:bg-transparent:disabled:hover{background-color:#0000}}:where([data-slot=button-group]) .in-data-\[slot\=button-group\]\:rounded-lg{border-radius:var(--radius)}.has-data-\[icon\=inline-end\]\:pr-1\.5:has([data-icon=inline-end]){padding-right:calc(var(--spacing) * 1.5)}.has-data-\[icon\=inline-end\]\:pr-2:has([data-icon=inline-end]){padding-right:calc(var(--spacing) * 2)}.has-data-\[icon\=inline-start\]\:pl-1\.5:has([data-icon=inline-start]){padding-left:calc(var(--spacing) * 1.5)}.has-data-\[icon\=inline-start\]\:pl-2:has([data-icon=inline-start]){padding-left:calc(var(--spacing) * 2)}.aria-expanded\:bg-muted[aria-expanded=true]{background-color:var(--muted)}.aria-expanded\:bg-secondary[aria-expanded=true]{background-color:var(--secondary)}.aria-expanded\:text-foreground[aria-expanded=true]{color:var(--foreground)}.aria-expanded\:text-secondary-foreground[aria-expanded=true]{color:var(--secondary-foreground)}.aria-invalid\:border-destructive[aria-invalid=true]{border-color:var(--destructive)}.aria-invalid\:ring-3[aria-invalid=true]{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[highlighted\]\:bg-destructive\/10[data-highlighted]{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.data-\[highlighted\]\:bg-destructive\/10[data-highlighted]{background-color:color-mix(in oklab, var(--destructive) 10%, transparent)}}.data-\[highlighted\]\:bg-muted[data-highlighted]{background-color:var(--muted)}@media (prefers-reduced-motion:no-preference){.motion-safe\:active\:not-aria-\[haspopup\]\:translate-y-px:active:not([aria-haspopup]){--tw-translate-y:1px;translate:var(--tw-translate-x) var(--tw-translate-y)}}@media (prefers-reduced-motion:reduce){.motion-reduce\:transition-none{transition-property:none}}@media not all and (width>=48rem){.max-md\:sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.max-md\:fixed{position:fixed}.max-md\:inset-x-0{inset-inline:0}.max-md\:inset-y-0{inset-block:0}.max-md\:bottom-0{bottom:0}.max-md\:left-0{left:0}.max-md\:z-40{z-index:40}.max-md\:order-last{order:9999}.max-md\:col-span-2{grid-column:span 2/span 2}.max-md\:col-start-2{grid-column-start:2}.max-md\:col-start-3{grid-column-start:3}.max-md\:row-start-2{grid-row-start:2}.max-md\:row-start-3{grid-row-start:3}.max-md\:-mx-3\.5{margin-inline:calc(var(--spacing) * -3.5)}.max-md\:grid{display:grid}.max-md\:hidden{display:none}.max-md\:inline-flex{display:inline-flex}.max-md\:size-11{width:calc(var(--spacing) * 11);height:calc(var(--spacing) * 11)}.max-md\:h-11{height:calc(var(--spacing) * 11)}.max-md\:h-32{height:calc(var(--spacing) * 32)}.max-md\:h-auto{height:auto}.max-md\:h-full{height:100%}.max-md\:max-h-\[90dvh\]{max-height:90dvh}.max-md\:min-h-11{min-height:calc(var(--spacing) * 11)}.max-md\:w-0{width:0}.max-md\:w-11{width:calc(var(--spacing) * 11)}.max-md\:w-full{width:100%}.max-md\:min-w-0{min-width:0}.max-md\:min-w-11{min-width:calc(var(--spacing) * 11)}.max-md\:flex-1{flex:1}.max-md\:basis-full{flex-basis:100%}.max-md\:touch-none{touch-action:none}.max-md\:\[scrollbar-width\:none\]{scrollbar-width:none}.max-md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.max-md\:grid-cols-\[1rem_1fr_auto\]{grid-template-columns:1rem 1fr auto}.max-md\:flex-col{flex-direction:column}.max-md\:flex-nowrap{flex-wrap:nowrap}.max-md\:flex-wrap{flex-wrap:wrap}.max-md\:items-center{align-items:center}.max-md\:gap-2{gap:calc(var(--spacing) * 2)}.max-md\:gap-3{gap:calc(var(--spacing) * 3)}.max-md\:gap-y-0{row-gap:0}.max-md\:gap-y-1{row-gap:var(--spacing)}.max-md\:overflow-x-auto{overflow-x:auto}.max-md\:rounded-lg{border-radius:var(--radius)}.max-md\:rounded-md{border-radius:calc(var(--radius) * .8)}.max-md\:rounded-t-2xl{border-top-left-radius:calc(var(--radius) * 1.8);border-top-right-radius:calc(var(--radius) * 1.8)}.max-md\:border{border-style:var(--tw-border-style);border-width:1px}.max-md\:border-0{border-style:var(--tw-border-style);border-width:0}.max-md\:border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.max-md\:p-2{padding:calc(var(--spacing) * 2)}.max-md\:px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.max-md\:px-3{padding-inline:calc(var(--spacing) * 3)}.max-md\:pt-0{padding-top:0}.max-md\:pt-\[env\(safe-area-inset-top\)\]{padding-top:env(safe-area-inset-top)}.max-md\:pt-\[max\(1rem\,env\(safe-area-inset-top\)\)\]{padding-top:max(1rem, env(safe-area-inset-top))}.max-md\:pr-0{padding-right:0}.max-md\:pb-\[env\(safe-area-inset-bottom\)\]{padding-bottom:env(safe-area-inset-bottom)}.max-md\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.max-md\:shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.max-md\:transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}:is(.max-md\:\*\:shrink-0>*){flex-shrink:0}.max-md\:data-dragging\:transition-none[data-dragging]{transition-property:none}}@media (width>=40rem){.sm\:grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}}@media (width>=48rem){.md\:absolute{position:absolute}.md\:inset-y-4{inset-block:calc(var(--spacing) * 4)}.md\:top-1\/2{top:50%}.md\:right-4{right:calc(var(--spacing) * 4)}.md\:left-1\/2{left:50%}.md\:hidden{display:none}.md\:h-\[min\(40rem\,calc\(100dvh-4rem\)\)\]{height:min(40rem,100dvh - 4rem)}.md\:max-h-\[min\(40rem\,calc\(100dvh-4rem\)\)\]{max-height:min(40rem,100dvh - 4rem)}.md\:w-\(--sheet-width\){width:var(--sheet-width)}.md\:w-56{width:calc(var(--spacing) * 56)}.md\:w-\[min\(36rem\,calc\(100vw-4rem\)\)\]{width:min(36rem,100vw - 4rem)}.md\:w-\[min\(52rem\,calc\(100vw-4rem\)\)\]{width:min(52rem,100vw - 4rem)}.md\:flex-1{flex:1}.md\:shrink-0{flex-shrink:0}.md\:-translate-x-1\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.md\:-translate-y-1\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.md\:rounded-2xl{border-radius:calc(var(--radius) * 1.8)}.md\:rounded-xl{border-radius:calc(var(--radius) * 1.4)}.md\:border{border-style:var(--tw-border-style);border-width:1px}.md\:border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.md\:bg-secondary{background-color:var(--secondary)}.md\:px-6{padding-inline:calc(var(--spacing) * 6)}.md\:px-8{padding-inline:calc(var(--spacing) * 8)}.md\:py-3{padding-block:calc(var(--spacing) * 3)}.md\:py-6{padding-block:calc(var(--spacing) * 6)}.md\:pt-4{padding-top:calc(var(--spacing) * 4)}.md\:text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.md\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.md\:font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.md\:shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}}@media not print{.dark\:border-amber-800:is(.dark *){border-color:var(--color-amber-800)}.dark\:border-blue-800:is(.dark *){border-color:var(--color-blue-800)}.dark\:border-emerald-800:is(.dark *){border-color:var(--color-emerald-800)}.dark\:border-input:is(.dark *){border-color:var(--input)}.dark\:border-rose-400:is(.dark *){border-color:var(--color-rose-400)}.dark\:border-rose-800:is(.dark *){border-color:var(--color-rose-800)}.dark\:border-sky-800:is(.dark *){border-color:var(--color-sky-800)}.dark\:border-violet-800:is(.dark *){border-color:var(--color-violet-800)}.dark\:bg-amber-950:is(.dark *){background-color:var(--color-amber-950)}.dark\:bg-blue-950:is(.dark *){background-color:var(--color-blue-950)}.dark\:bg-destructive\/20:is(.dark *){background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:bg-destructive\/20:is(.dark *){background-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.dark\:bg-emerald-950:is(.dark *){background-color:var(--color-emerald-950)}.dark\:bg-input\/10:is(.dark *){background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.dark\:bg-input\/10:is(.dark *){background-color:color-mix(in oklab, var(--input) 10%, transparent)}}.dark\:bg-rose-950:is(.dark *){background-color:var(--color-rose-950)}.dark\:bg-sky-950:is(.dark *){background-color:var(--color-sky-950)}.dark\:bg-violet-950:is(.dark *){background-color:var(--color-violet-950)}.dark\:text-amber-100:is(.dark *){color:var(--color-amber-100)}.dark\:text-amber-200:is(.dark *){color:var(--color-amber-200)}.dark\:text-amber-300:is(.dark *){color:var(--color-amber-300)}.dark\:text-blue-200:is(.dark *){color:var(--color-blue-200)}.dark\:text-blue-300:is(.dark *){color:var(--color-blue-300)}.dark\:text-emerald-200:is(.dark *){color:var(--color-emerald-200)}.dark\:text-emerald-300:is(.dark *){color:var(--color-emerald-300)}.dark\:text-rose-100:is(.dark *){color:var(--color-rose-100)}.dark\:text-rose-200:is(.dark *){color:var(--color-rose-200)}.dark\:text-rose-300:is(.dark *){color:var(--color-rose-300)}.dark\:text-sky-100:is(.dark *){color:var(--color-sky-100)}.dark\:text-sky-200:is(.dark *){color:var(--color-sky-200)}.dark\:text-sky-300:is(.dark *){color:var(--color-sky-300)}.dark\:text-violet-200:is(.dark *){color:var(--color-violet-200)}.dark\:text-violet-300:is(.dark *){color:var(--color-violet-300)}@media (hover:hover){.dark\:hover\:bg-destructive\/20:is(.dark *):hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-destructive\/20:is(.dark *):hover{background-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.dark\:hover\:bg-destructive\/30:is(.dark *):hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-destructive\/30:is(.dark *):hover{background-color:color-mix(in oklab, var(--destructive) 30%, transparent)}}.dark\:hover\:bg-emerald-900:is(.dark *):hover{background-color:var(--color-emerald-900)}.dark\:hover\:bg-input\/20:is(.dark *):hover{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-input\/20:is(.dark *):hover{background-color:color-mix(in oklab, var(--input) 20%, transparent)}}.dark\:hover\:bg-muted\/50:is(.dark *):hover{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-muted\/50:is(.dark *):hover{background-color:color-mix(in oklab, var(--muted) 50%, transparent)}}.dark\:hover\:brightness-125:is(.dark *):hover{--tw-brightness:brightness(125%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}}.dark\:focus-visible\:ring-destructive\/40:is(.dark *):focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:focus-visible\:ring-destructive\/40:is(.dark *):focus-visible{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.dark\:disabled\:bg-emerald-950:is(.dark *):disabled{background-color:var(--color-emerald-950)}.dark\:aria-invalid\:border-destructive\/50:is(.dark *)[aria-invalid=true]{border-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:aria-invalid\:border-destructive\/50:is(.dark *)[aria-invalid=true]{border-color:color-mix(in oklab, var(--destructive) 50%, transparent)}}.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.dark\:data-\[highlighted\]\:bg-destructive\/20:is(.dark *)[data-highlighted]{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:data-\[highlighted\]\:bg-destructive\/20:is(.dark *)[data-highlighted]{background-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}}@media print{.print\:block{display:block}.print\:hidden{display:none}.print\:inline{display:inline}.print\:h-auto{height:auto}.print\:overflow-visible{overflow:visible}.print\:p-0{padding:0}}.\[\&_code\]\:bg-transparent code{background-color:#0000}.\[\&_code\]\:p-0 code{padding:0}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&_svg\]\:size-6 svg{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_svg\]\:text-muted-foreground svg{color:var(--muted-foreground)}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-3 svg:not([class*=size-]){width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-3\.5 svg:not([class*=size-]){width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4 svg:not([class*=size-]){width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&\:\:-webkit-details-marker\]\:hidden::-webkit-details-marker{display:none}.\[\&\>li\]\:whitespace-nowrap>li{white-space:nowrap}@media (hover:none){.\[\@media\(hover\:none\)\]\:opacity-100{opacity:1}}@media (pointer:coarse){.\[\@media\(pointer\:coarse\)\]\:hidden{display:none}}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}@property --scroll-fade-t{syntax:"<length-percentage>";inherits:false;initial-value:0}@property --scroll-fade-b{syntax:"<length-percentage>";inherits:false;initial-value:0}@property --scroll-fade-s{syntax:"<length-percentage>";inherits:false;initial-value:0}@property --scroll-fade-e{syntax:"<length-percentage>";inherits:false;initial-value:0}@property --scroll-fade-mask{syntax:"*";inherits:false}@property --shimmer-angle{syntax:"<angle>";inherits:true;initial-value:20deg}@property --shimmer-image{syntax:"*";inherits:false}@property --shimmer-text-fill{syntax:"*";inherits:false}@media (prefers-reduced-motion:reduce){.shimmer{-webkit-text-fill-color:currentColor;background-image:none;animation:none}}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2)format("woff2-variations");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2)format("woff2-variations");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2)format("woff2-variations");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-latin-wght-normal-BgDaEnEv.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}:root{--background:oklch(100% 0 0);--foreground:oklch(14.5% 0 0);--card:oklch(100% 0 0);--card-foreground:oklch(14.5% 0 0);--popover:oklch(100% 0 0);--popover-foreground:oklch(14.5% 0 0);--primary:oklch(20.5% 0 0);--primary-foreground:oklch(98.5% 0 0);--secondary:oklch(97% 0 0);--secondary-foreground:oklch(20.5% 0 0);--muted:oklch(97% 0 0);--muted-foreground:oklch(55.6% 0 0);--accent:oklch(97% 0 0);--accent-foreground:oklch(20.5% 0 0);--destructive:oklch(57.7% .245 27.325);--border:oklch(92.2% 0 0);--input:oklch(64% 0 0);--ring:oklch(70.8% 0 0);--chart-1:oklch(87% 0 0);--chart-2:oklch(55.6% 0 0);--chart-3:oklch(43.9% 0 0);--chart-4:oklch(37.1% 0 0);--chart-5:oklch(26.9% 0 0);--radius:.625rem;--sidebar:oklch(98.5% 0 0);--sidebar-foreground:oklch(14.5% 0 0);--sidebar-primary:oklch(20.5% 0 0);--sidebar-primary-foreground:oklch(98.5% 0 0);--sidebar-accent:oklch(97% 0 0);--sidebar-accent-foreground:oklch(20.5% 0 0);--sidebar-border:oklch(92.2% 0 0);--sidebar-ring:oklch(70.8% 0 0);--dependency-line:oklch(70.8% 0 0)}@media not print{.dark{--background:oklch(14.5% 0 0);--foreground:oklch(98.5% 0 0);--card:oklch(20.5% 0 0);--card-foreground:oklch(98.5% 0 0);--popover:oklch(20.5% 0 0);--popover-foreground:oklch(98.5% 0 0);--primary:oklch(92.2% 0 0);--primary-foreground:oklch(20.5% 0 0);--secondary:oklch(26.9% 0 0);--secondary-foreground:oklch(98.5% 0 0);--muted:oklch(26.9% 0 0);--muted-foreground:oklch(70.8% 0 0);--accent:oklch(26.9% 0 0);--accent-foreground:oklch(98.5% 0 0);--destructive:oklch(70.4% .191 22.216);--border:oklch(100% 0 0/.1);--input:oklch(100% 0 0/.4);--ring:oklch(55.6% 0 0);--chart-1:oklch(87% 0 0);--chart-2:oklch(55.6% 0 0);--chart-3:oklch(43.9% 0 0);--chart-4:oklch(37.1% 0 0);--chart-5:oklch(26.9% 0 0);--sidebar:oklch(20.5% 0 0);--sidebar-foreground:oklch(98.5% 0 0);--sidebar-primary:oklch(48.8% .243 264.376);--sidebar-primary-foreground:oklch(98.5% 0 0);--sidebar-accent:oklch(26.9% 0 0);--sidebar-accent-foreground:oklch(98.5% 0 0);--sidebar-border:oklch(100% 0 0/.1);--sidebar-ring:oklch(55.6% 0 0);--dependency-line:oklch(55.6% 0 0)}}@media screen and (width<48rem){main .text-xs:not(.react-flow__renderer *){font-size:var(--text-sm);line-height:var(--text-sm--line-height)}}.break-words-keep{word-break:keep-all;overflow-wrap:anywhere}.react-flow{--xy-edge-stroke:var(--dependency-line);--xy-edge-stroke-selected:var(--foreground)}.react-flow .react-flow__node.react-flow__node-bar:focus-visible{outline:2px solid var(--foreground);outline-offset:2px;border-radius:calc(var(--radius) * .8)}.react-flow .react-flow__node-bar .react-flow__handle{opacity:0}.react-flow .react-flow__node-bar:hover .react-flow__handle,.react-flow .react-flow__node-bar.selected .react-flow__handle,.react-flow .react-flow__node-bar:focus-visible .react-flow__handle,.react-flow.connecting .react-flow__handle,.react-flow .react-flow__handle.connectingfrom{opacity:1}@media print{@page{margin:1.5cm}main section>ul>li,main section[aria-label=Summary]{break-inside:avoid}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,n as t,r as n,s as r}from"./dist-ZmB2kPfR.js";import{hn as i,mt as a,t as o}from"./queries-
|
|
1
|
+
import{i as e,n as t,r as n,s as r}from"./dist-ZmB2kPfR.js";import{hn as i,mt as a,t as o}from"./queries-JuIQKikB.js";import{g as s,h as c,v as l,y as u}from"./event-CHxdkAIB.js";import{bt as d}from"./index-CIFtOFkp.js";var f={name:`wifi-off`,size:24,node:[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}],[`path`,{d:`M5 12.859a10 10 0 0 1 5.17-2.69`,key:`1dl1wf`}],[`path`,{d:`M19 12.859a10 10 0 0 0-2.007-1.523`,key:`4k23kn`}],[`path`,{d:`M2 8.82a15 15 0 0 1 4.177-2.643`,key:`1grhjp`}],[`path`,{d:`M22 8.82a15 15 0 0 0-11.288-3.764`,key:`z3jwby`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]};f.node;var p=t(f),m=r(e(),1),h=n();function g({children:e}){let t=(0,m.useSyncExternalStore)(l,c),n=t===`unreachable`||t===`retrying`;return(0,h.jsxs)(h.Fragment,{children:[n&&(0,h.jsx)(_,{retrying:t===`retrying`}),e,n&&(0,h.jsx)(`div`,{"aria-hidden":!0,className:`h-40`})]})}function _({retrying:e}){let t=navigator.onLine?u():`This device is offline.`,n=i().getQueryState(o.tasks)?.dataUpdatedAt;return(0,h.jsxs)(`div`,{role:`alert`,className:`fixed inset-x-2 bottom-2 z-50 mx-auto flex max-w-xl flex-wrap items-center gap-x-3 gap-y-2 rounded-lg border border-amber-500 bg-amber-100 p-3 text-sm text-amber-950 shadow-md dark:bg-amber-950 dark:text-amber-100`,children:[(0,h.jsx)(p,{"aria-hidden":!0,className:`size-4 shrink-0`}),(0,h.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,h.jsx)(`p`,{className:`font-medium`,children:`Can't reach the Toodo server`}),(0,h.jsxs)(`p`,{className:`text-xs`,children:[t,` `,n?(0,h.jsxs)(h.Fragment,{children:[`Read-only: the tasks shown were loaded `,(0,h.jsx)(d,{at:Math.floor(n/1e3)}),` and may be out of date.`]}):`What you see may be out of date.`,` `,`Changes are paused. Toodo reconnects on its own as soon as the server answers.`]})]}),(0,h.jsx)(a,{size:`sm`,variant:`outline`,disabled:e,onClick:s,children:e?`Trying...`:`Retry now`})]})}export{g as ConnectionGate};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,r as t,s as n,t as r}from"./dist-ZmB2kPfR.js";import{_ as i,c as a,d as o,h as s,n as c,o as l,r as u,u as d,v as f}from"./event-CHxdkAIB.js";var p=n(e(),1),m=t(),h=p.createContext(void 0),g=e=>{let t=p.useContext(h);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},_=({client:e,children:t})=>(p.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,m.jsx)(h.Provider,{value:e,children:t})),v={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},y=new class{#e=v;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function ee(e){setTimeout(e,0)}var te=typeof window>`u`||`Deno`in globalThis;function b(){}function ne(e,t){return typeof e==`function`?e(t):e}function re(e){return typeof e==`number`&&e>=0&&e!==1/0}function ie(e,t){return Math.max(e+(t||0)-Date.now(),0)}function x(e,t){return typeof e==`function`?e(t):e}function ae(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==se(o,t.options))return!1}else if(!C(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function oe(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(S(t.options.mutationKey)!==S(a))return!1}else if(!C(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function se(e,t){return(t?.queryKeyHashFn||S)(e)}function S(e){return JSON.stringify(e,(e,t)=>de(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function C(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let n=0;n<t.length;n++)if(!C(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!C(e[r],t[r]))return!1;return!0}return!1}var ce=Object.prototype.hasOwnProperty;function le(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=ue(e)&&ue(t);if(!r&&!(de(e)&&de(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:ce.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=le(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function w(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function ue(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function de(e){if(!fe(e))return!1;let t=Object.getPrototypeOf(e),n=t?.constructor;if(n===void 0)return!0;if(typeof n!=`function`)return!1;let r=n.prototype;return!(!fe(r)||!r.hasOwnProperty(`isPrototypeOf`)||t!==Object.prototype)}function fe(e){return Object.prototype.toString.call(e)===`[object Object]`}function pe(e){return new Promise(t=>{y.setTimeout(t,e)})}function me(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:le(e,t)}function he(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function ge(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var _e=Symbol();function ve(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===_e?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function ye(e,t){return typeof e==`function`?e(...t):!!e}function be(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r||(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0})),i)}),e}var xe=()=>te,Se=()=>xe(),T=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ce=new class extends T{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},we=ee;function Te(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=we,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var E=Te(),Ee=new class extends T{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function De(e){return Math.min(1e3*2**e,3e4)}function Oe(e){return(e??`online`)!==`online`||Ee.isOnline()}var ke=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function Ae(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(b);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new ke(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>Ce.isFocused()&&(e.networkMode===`always`||Ee.isOnline())&&e.canRun(),p=()=>Oe(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=t=>new Promise(n=>{r=e=>{(c()||t())&&n(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??(Se()?0:3),a=e.retryDelay??De,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);t||!s?h(r):(n++,e.onFail?.(n,r),pe(o).then(()=>f()?void 0:g(f)).then(()=>{t?h(r):_()}))})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g(p).then(_),s)}}var je=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),re(this.gcTime)&&(this.#e=y.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Se()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(y.clearTimeout(this.#e),this.#e=void 0)}};function Me(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{be(e,()=>t.signal,()=>n=!0)},u=ve(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?ge:he;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?Pe:Ne,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:Ne(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function Ne(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Pe(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function Fe(e,t){return t?Ne(e,t)!=null:!1}function Ie(e,t){return!t||!e.getPreviousPageParam?!1:Pe(e,t)!=null}var Le=class extends je{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=Be(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=Be(this.options);e.data!==void 0&&(this.setState(ze(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=me(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#c({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(b).catch(b):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>x(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===_e||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>x(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!ie(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#s||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=ve(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?Me(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=Ae({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof ke&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await o.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof ke){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0),this.scheduleGc()}}#c(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...Re(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...ze(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),E.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function Re(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Oe(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function ze(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Be(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var Ve=class extends T{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Ue(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return We(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return We(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof x(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!w(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Ge(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||x(this.options.enabled,this.#t)!==x(t.enabled,this.#t)||x(this.options.staleTime,this.#t)!==x(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||x(this.options.enabled,this.#t)!==x(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return w(this.getCurrentResult(),n)||(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch().then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(b)),t}#h(e){return!Se()&&x(this.options.enabled,this.#t)!==!1&&re(e)}#g(){this.#b();let e=x(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=ie(this.#r.dataUpdatedAt,e)+1;this.#u=y.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return x(this.options.refetchInterval,this.#t)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=y.setInterval(()=>{(this.options.refetchIntervalInBackground||Ce.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(y.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(y.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Ue(e,t),o=i&&Ge(e,n,t,r);(a||o)&&(l={...l,...Re(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,e!==void 0&&(m=`success`,d=me(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h){if(i&&d===a?.data&&t.select===this.#s)d=this.#c;else try{this.#s=t.select,d=t.select(d),d=me(i?.data,d,t),this.#c=d,this.#o=null}catch(e){this.#o=e}}else d===void 0&&(this.#o=null);this.#o&&(f=this.#o,d=this.#c,p=Date.now(),m=`error`,u=!1);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,ee=d!==void 0;return{status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!ee,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&ee,isStale:Ke(e,t),refetch:this.refetch,isEnabled:x(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#l=this.#t),w(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size)return!0;let r=new Set(n??this.#p);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})();E.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function He(e,t){return x(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||x(t.retryOnMount,e)!==!1)}function Ue(e,t){return He(e,t)||e.state.data!==void 0&&We(e,t,t.refetchOnMount)}function We(e,t,n){if(x(t.enabled,e)!==!1&&x(t.staleTime,e)!==`static`){let r=x(n,e);return r===`always`||r!==!1&&Ke(e,t)}return!1}function Ge(e,t,n,r){return(e!==t||x(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Ke(e,n)}function Ke(e,t){return x(t.enabled,e)!==!1&&e.isStaleByTime(x(t.staleTime,e))}var qe=class extends Ve{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:s}=r,c=n.fetchMeta?.fetchMore?.direction,l=o&&c===`forward`,u=i&&c===`forward`,d=o&&c===`backward`,f=i&&c===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:Fe(t,n.data),hasPreviousPage:Ie(t,n.data),isFetchNextPageError:l,isFetchingNextPage:u,isFetchPreviousPageError:d,isFetchingPreviousPage:f,isRefetchError:s&&!l&&!d,isRefetching:a&&!u&&!f}}},Je=class extends je{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Ye(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#r=Ae({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),i=this.state.status===`pending`,a=!r.canStart();try{if(i)t();else{this.#i({type:`pending`,variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:a})}let o=await r.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#i({type:`success`,data:o}),o}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#r===r&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),E.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Ye(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Xe=class extends T{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),w(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&S(t.mutationKey)!==S(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#n&&(this.#n.addObserver(this),this.#i())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??Ye();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){E.batch(()=>{let t=this.#r;if(t&&this.hasListeners()){let n=this.#t.variables,r=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{t.onSuccess?.(e.data,n,r,i)}catch(e){Promise.reject(e)}try{t.onSettled?.(e.data,null,n,r,i)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{t.onError?.(e.error,n,r,i)}catch(e){Promise.reject(e)}try{t.onSettled?.(void 0,e.error,n,r,i)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},Ze=p.createContext(!1),Qe=()=>p.useContext(Ze);Ze.Provider;function $e(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var et=p.createContext($e()),tt=()=>p.useContext(et),nt=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?ye(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},rt=e=>{p.useEffect(()=>{e.clearReset()},[e])},it=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||ye(n,[e.error,r])),at=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},ot=(e,t)=>e?.suspense&&t.isPending,st=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function ct(e,t,n){let r=Qe(),i=tt(),a=g(n),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,at(o),nt(o,i,s),rt(i);let[l]=p.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&c;if(p.useSyncExternalStore(p.useCallback(e=>{let t=d?l.subscribe(E.batchCalls(e)):b;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),p.useEffect(()=>{l.setOptions(o)},[o,l]),ot(o,u))throw st(o,l,i);if(it({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return o.notifyOnChangeProps?u:l.trackResult(u)}function D(e,t){return ct(e,Ve,t)}function O(e,t){let n=g(t),[r]=p.useState(()=>new Xe(n,e));p.useEffect(()=>{r.setOptions(e)},[r,e]);let i=p.useSyncExternalStore(p.useCallback(e=>r.subscribe(E.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=p.useCallback((...e)=>{r.mutate(e[0],e[1]).catch(b)},[r]);if(i.error&&ye(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}function lt(e,t){return ct(e,qe,t)}function k(){return typeof window<`u`}function A(e){return dt(e)?(e.nodeName||``).toLowerCase():`#document`}function j(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ut(e){return((dt(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function dt(e){return k()?e instanceof Node||e instanceof j(e).Node:!1}function ft(e){return k()?e instanceof Element||e instanceof j(e).Element:!1}function M(e){return k()?e instanceof HTMLElement||e instanceof j(e).HTMLElement:!1}function pt(e){return!k()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof j(e).ShadowRoot}function mt(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=wt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function ht(e){return/^(table|td|th)$/.test(A(e))}function gt(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var _t=/transform|translate|scale|rotate|perspective|filter/,vt=/paint|layout|strict|content/,N=e=>!!e&&e!==`none`,yt;function bt(e){let t=ft(e)?wt(e):e;return N(t.transform)||N(t.translate)||N(t.scale)||N(t.rotate)||N(t.perspective)||!St()&&(N(t.backdropFilter)||N(t.filter))||_t.test(t.willChange||``)||vt.test(t.contain||``)}function xt(e){let t=P(e);for(;M(t)&&!Ct(t);){if(bt(t))return t;if(gt(t))return null;t=P(t)}return null}function St(){return yt??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),yt}function Ct(e){return/^(html|body|#document)$/.test(A(e))}function wt(e){return j(e).getComputedStyle(e)}function Tt(e){return ft(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function P(e){if(A(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||pt(e)&&e.host||ut(e);return pt(t)?t.host:t}function Et(e){let t=P(e);return Ct(t)?(e.ownerDocument||e).body:M(t)&&mt(t)?t:Et(t)}function Dt(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Et(e),i=r===e.ownerDocument?.body,a=j(r);if(i){let e=Ot(a);return t.concat(a,a.visualViewport||[],mt(r)?r:[],e&&n?Dt(e):[])}return t.concat(r,Dt(r,[],n))}function Ot(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var kt={...p},At={};function F(e,t){let n=p.useRef(At);return n.current===At&&(n.current=e(t)),n}var jt=kt.useInsertionEffect,Mt=jt&&jt!==kt.useLayoutEffect?jt:e=>e();function Nt(e){let t=F(Pt).current;return t.next=e,Mt(t.effect),t.trampoline}function Pt(){let e={next:void 0,callback:Ft,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Ft(){}var It=typeof document<`u`?p.useLayoutEffect:()=>{};function Lt(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}var Rt={};function I(e,t,n,r,i){if(!n&&!r&&!i&&!e)return L(t);let a=L(e);return t&&(a=R(a,t)),n&&(a=R(a,n)),r&&(a=R(a,r)),i&&(a=R(a,i)),a}function zt(e){if(e.length===0)return Rt;if(e.length===1)return L(e[0]);let t=L(e[0]);for(let n=1;n<e.length;n+=1)t=R(t,e[n]);return t}function L(e){return Ut(e)?{...e(Rt)}:Bt(e)}function R(e,t){return Ut(t)?t(e):Vt(e,t)}function Bt(e){let t={...e};for(let e in t){let n=t[e];Ht(e,n)&&(t[e]=Gt(n))}return t}function Vt(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=Lt(e.style,r);break;case`className`:e[n]=Kt(e.className,r);break;default:e[n]=Ht(n,r)?Wt(e[n],r):r}}return e}function Ht(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function Ut(e){return typeof e==`function`}function Wt(e,t){return t?e?(...n)=>{let r=n[0];if(qt(r)){let i=r;z(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:Gt(t):e}function Gt(e){return e&&((...t)=>{let n=t[0];return qt(n)&&z(n),e(...t)})}function z(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Kt(e,t){return t?e?t+` `+e:t:e}function qt(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function Jt(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var Yt=Jt(`https://base-ui.com/production-error`,`Base UI`),Xt=p.createContext(void 0);function Zt(e=!1){let t=p.useContext(Xt);if(t===void 0&&!e)throw Error(Yt(16));return t}function Qt(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:p.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function B(e,t,{detail:n=0,pointerType:r=``}={}){e.dispatchEvent(new(j(e)).PointerEvent(`click`,{bubbles:!0,cancelable:!0,composed:!0,detail:n,pointerType:r,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function $t(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=p.useRef(null),s=Zt(!0),c=a??s!==void 0,{props:l}=Qt({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i}),u=p.useCallback(()=>{let e=o.current;en(e)&&c&&t&&l.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,l.disabled,c]);return It(u,[u]),{getButtonProps:p.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...u}=e;return I({onClick(e){t?e.preventDefault():n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(z(e),o?.(e),e.baseUIHandlerPrevented))return;let n=e.target===e.currentTarget,r=e.currentTarget,a=en(r),s=!i&&tn(r),l=n&&(i?a:!s),u=e.key===`Enter`,d=e.key===` `,f=r.getAttribute(`role`),p=f?.startsWith(`menuitem`)||f===`option`||f===`gridcell`;if(n&&c&&d){if(e.defaultPrevented&&p)return;e.preventDefault(),(!i||a)&&(e.preventBaseUIHandler(),B(r,e))}else!l||i||!d&&!u?n&&s&&d&&e.preventDefault():e.defaultPrevented||(e.preventDefault(),u&&(e.preventBaseUIHandler(),B(r,e)))},onKeyUp(e){t||(z(e),a?.(e),e.target===e.currentTarget&&i&&c&&en(e.currentTarget)&&e.key===` `?e.preventDefault():e.baseUIHandlerPrevented||e.target===e.currentTarget&&!i&&!c&&!e.defaultPrevented&&e.key===` `&&(e.preventBaseUIHandler(),B(e.currentTarget,e)))},onPointerDown(e){t?e.preventDefault():s?.(e)}},i?{type:`button`}:{role:`button`},l,u)},[t,l,c,i]),buttonRef:Nt(e=>{o.current=e,u()})}}function en(e){return M(e)&&e.tagName===`BUTTON`}function tn(e){return M(e)&&e.tagName===`A`&&!!e.href}function nn(e,t,n,r){let i=F(an).current;return on(i,e,t,n,r)&&cn(i,[e,t,n,r]),i.callback}function rn(e){let t=F(an).current;return sn(t,e)&&cn(t,e),t.callback}function an(){return{callback:null,cleanup:null,refs:[]}}function on(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function sn(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function cn(e,t){e.refs=t,e.callback=t.every(e=>e==null)?null:n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null}}}}}}var ln=19;function un(e){return ln>=e}function dn(e){if(!p.isValidElement(e))return null;let t=e,n=t.props;return(un(19)?n?.ref:t.ref)??null}function fn(){}var pn=Object.freeze([]),V=Object.freeze({});function mn(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e)}else i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function hn(e,t){return typeof e==`function`?e(t):e}function gn(e,t){return typeof e==`function`?e(t):e}function _n(e,t,n={}){let r=t.render;n.enabled!==!1&&(r=xn(r));let i=vn(t,n,r);if(n.enabled===!1)return null;let a=n.state??V;return Sn(e,r,i,a)}function vn(e,t,n){let{className:r,style:i}=e,{state:a=V,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?hn(r,a):void 0,d=l?gn(i,a):void 0,f=l?mn(a,c):V,p=l&&s?yn(s):void 0,m=l?Lt(f,p)??{}:V;return typeof document<`u`&&(l?m.ref=Array.isArray(o)?rn([m.ref,dn(n),...o]):nn(m.ref,dn(n),o):nn(null,null)),l?(u!==void 0&&(m.className=Kt(m.className,u)),d!==void 0&&(m.style=Lt(m.style,d)),m):V}function yn(e){return Array.isArray(e)?zt(e):I(void 0,e)}var bn=Symbol.for(`react.lazy`);function xn(e){if(e?.$$typeof!==bn)return e;let t=p.Children.toArray(e)[0];return p.isValidElement(t)?t:e}function Sn(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=I(n,t.props);return e.ref=n.ref,p.cloneElement(t,e)}return Cn(e,n)}function Cn(e,t){return e===`button`?(0,p.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,p.createElement)(`img`,{alt:``,...t,key:t.key}):p.createElement(e,t)}var wn=p.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,focusableWhenDisabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{getButtonProps:l,buttonRef:u}=$t({disabled:i,focusableWhenDisabled:a,native:o});return _n(`button`,e,{state:{disabled:i},ref:[t,u],props:[c,l]})});function Tn(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Tn(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function En(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Tn(e))&&(r&&(r+=` `),r+=t);return r}var Dn=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,On=En,kn=((e,t)=>n=>{if(t?.variants==null)return On(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Dn(t)||Dn(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return On(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)})(`group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 motion-safe:active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:text-muted-foreground aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 max-md:min-h-11 max-md:min-w-11`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/80 disabled:bg-muted`,outline:`border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/10 dark:hover:bg-input/20`,secondary:`bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground disabled:bg-muted`,ghost:`hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50`,destructive:`bg-destructive/10 text-destructive hover:bg-destructive/20 disabled:bg-muted focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] max-md:text-sm in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,icon:`size-8`,"icon-xs":`size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg`,"icon-lg":`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function An({className:e,variant:t=`default`,size:n=`default`,autoFocus:i,changesData:a,disabled:o,...c}){let l=(0,p.useSyncExternalStore)(f,s),u=l===`unreachable`||l===`retrying`,d=a??c.type===`submit`,h=(0,p.useRef)(null);return(0,p.useEffect)(()=>{i&&h.current?.focus()},[]),(0,m.jsx)(wn,{ref:h,"data-slot":`button`,disabled:o||d&&u,className:r(kn({variant:t,size:n,className:e})),...c})}function jn(e){return typeof e==`object`&&!!e&&typeof e.kind==`string`&&typeof e.code==`string`&&typeof e.message==`string`}async function H(e,t={}){let n=l();if(n===null)throw Error(`No access token for the Toodo server.`);let r=await i(`/api/rpc/${encodeURIComponent(e)}`,{method:`POST`,headers:{...n,"Content-Type":`application/json`},body:JSON.stringify(t)});if(r.status===401)throw await o(r)?(a(),Error(`The Toodo server did not accept the access token.`)):d();let s=await r.text();if(r.ok)return s?JSON.parse(s):null;let c=null;try{c=JSON.parse(s)}catch{}throw jn(c)?c:Error(s||`${r.status} ${r.statusText}`)}var U={appInfo:()=>H(`app_info`),checkUpdate:()=>H(`check_update`),listWorkspaces:()=>W(H(`list_workspaces`)),getWorkspace:e=>W(H(`get_workspace`,{id:e})),createWorkspace:e=>W(H(`create_workspace`,{workspace:e})),updateWorkspace:e=>W(H(`update_workspace`,{workspace:e})),deleteWorkspace:e=>W(H(`delete_workspace`,{id:e})),restoreWorkspace:e=>W(H(`restore_workspace`,{id:e})),purgeWorkspace:e=>W(H(`purge_workspace`,{id:e})),listArchive:()=>W(H(`list_archive`)),listGuidelines:e=>W(H(`list_guidelines`,{workspaceId:e})),addGuideline:e=>W(H(`add_guideline`,{guideline:e})),updateGuideline:e=>W(H(`update_guideline`,{guideline:e})),deleteGuideline:e=>W(H(`delete_guideline`,{id:e})),listTasks:e=>W(H(`list_tasks`,{filter:e})),listTaskRelations:()=>W(H(`list_task_relations`)),addTaskRelation:(e,t)=>W(H(`add_task_relation`,{taskId:e,relatedId:t})),removeTaskRelation:(e,t)=>W(H(`remove_task_relation`,{taskId:e,relatedId:t})),getTask:e=>W(H(`get_task`,{id:e})),createTask:e=>W(H(`create_task`,{task:e})),updateTask:e=>W(H(`update_task`,{task:e})),moveTask:(e,t)=>W(H(`move_task`,{id:e,workspaceId:t})),pauseTask:e=>W(H(`pause_task`,{id:e})),waitTask:(e,t,n)=>W(H(`wait_task`,{id:e,until:t,reason:n})),endWait:e=>W(H(`end_wait`,{id:e})),setCompletionNote:(e,t)=>W(H(`set_completion_note`,{id:e,note:t})),reopenTask:(e,t)=>W(H(`reopen_task`,{id:e,reason:t})),setTaskOutcome:(e,t,n)=>W(H(`set_task_outcome`,{id:e,resolution:t,note:n})),checkCriterion:(e,t,n,r)=>W(H(`check_criterion`,{taskId:e,criterionId:t,met:n,evidence:r})),deleteTask:e=>W(H(`delete_task`,{id:e})),deleteDoneTasks:e=>W(H(`delete_done_tasks`,{workspaceId:e})),restoreTask:e=>W(H(`restore_task`,{id:e})),purgeTask:e=>W(H(`purge_task`,{id:e})),addDependency:(e,t,n)=>W(H(`add_dependency`,{taskId:e,dependsOn:t,confirmPause:n})),removeDependency:(e,t)=>W(H(`remove_dependency`,{taskId:e,dependsOn:t})),startTask:(e,t,n)=>W(H(`start_task`,{id:e,reason:t,refs:n})),completeTask:(e,t,n)=>W(H(`complete_task`,{id:e,note:t,refs:n})),concludeTask:(e,t,n,r)=>W(H(`conclude_task`,{id:e,note:t,outcome:n,shippedWith:r})),linkIssue:(e,t)=>W(H(`link_issue`,{id:e,reference:t})),mcpServerInfo:()=>H(`mcp_server_info`),listConnectedApps:()=>W(H(`list_connected_apps`)),revokeConnectedApp:e=>W(H(`revoke_connected_app`,{grantId:e})),reviewPeriod:(e,t)=>W(H(`review_period`,{from:e,to:t})),reviewReport:e=>W(H(`review_report`,{request:e})),getReviewTimeZone:()=>W(H(`get_review_time_zone`)),setReviewTimeZone:e=>W(H(`set_review_time_zone`,{timeZone:e})),saveReviewSnapshot:e=>W(H(`save_review_snapshot`,{request:e})),listReviewSnapshots:()=>W(H(`list_review_snapshots`)),getReviewSnapshot:e=>W(H(`get_review_snapshot`,{id:e})),deleteReviewSnapshot:e=>W(H(`delete_review_snapshot`,{id:e})),getBackupSettings:()=>H(`get_backup_settings`),getBackupStatus:()=>H(`get_backup_status`),saveBackupSettings:e=>W(H(`save_backup_settings`,{settings:e})),listBackups:()=>W(H(`list_backups`)),restoreBackup:e=>W(H(`restore_backup`,{name:e}))},Mn={tasksChanged:G(`tasks-changed`),workspacesChanged:G(`workspaces-changed`),guidelinesChanged:G(`guidelines-changed`),taskStatusChanged:G(`task-status-changed`),taskReady:G(`task-ready`)};async function W(e){try{return{status:`ok`,data:await e}}catch(e){if(e instanceof Error)throw e;return{status:`error`,error:e}}}function G(e){return{listen:t=>c(e,t)}}function Nn(e){switch(e.code){case`unknownCommand`:case`invalidArguments`:return`This page is out of date with the Toodo server. Reload the page, then try again.`;case`commandPanicked`:return`Something went wrong on the Toodo server. Try again; if it keeps failing, look for "a command panicked" in the toodo-server log.`;case`guidelineNotFound`:return`This guideline no longer exists; it was deleted elsewhere. Reload the page to see the current guidelines, and add your text as a new guideline if it is still needed.`;case`storageFailed`:return`The Toodo server could not use its database (${e.message}). Try again; if it keeps failing, check the toodo-server log.`;default:return e.message}}function Pn(e,t){return/filename="([^"]+)"/.exec(e.headers.get(`Content-Disposition`)??``)?.[1]??t}function Fn(e,t){let n=URL.createObjectURL(t),r=document.createElement(`a`);r.href=n,r.download=e,r.click(),URL.revokeObjectURL(n)}async function In(){let e=await u(`/api/backups/export`),t=Pn(e,`toodo-backup.sqlite3`);return Fn(t,await e.blob()),t}async function Ln(e){return Fn(e,await(await u(`/api/backups/${encodeURIComponent(e)}`)).blob()),e}async function Rn(e){return await(await u(`/api/backups/restore`,{method:`POST`,headers:{"Content-Type":`application/octet-stream`},body:e})).json()}var zn=`toodo-install-dismissed`;function Bn(){let{userAgent:e,maxTouchPoints:t}=navigator;return/iPhone|iPad|iPod/.test(e)||e.includes(`Macintosh`)&&t>1}function Vn(){return matchMedia(`(display-mode: standalone)`).matches||`standalone`in navigator&&navigator.standalone===!0}var K=null,Hn=!1,Un=new Set;function q(){Un.forEach(e=>e())}function Wn(e){return Un.add(e),()=>Un.delete(e)}function Gn(){return Hn||Vn()||localStorage.getItem(zn)!==null?`none`:K===null?Bn()?`home-screen`:`none`:`prompt`}function Kn(){localStorage.setItem(zn,`1`),q()}async function qn(){let e=K;if(e===null)return;K=null,await e.prompt();let{outcome:t}=await e.userChoice;t===`dismissed`?Kn():q()}function Jn(){addEventListener(`beforeinstallprompt`,e=>{e.preventDefault(),K=e,q()}),addEventListener(`appinstalled`,()=>{K=null,Hn=!0,q()})}function Yn(){return`serviceWorker`in navigator&&`PushManager`in window&&`Notification`in window?`supported`:Bn()&&!Vn()?`needs-install`:`unsupported`}var J=null,Xn={agent:[],pullRequests:[],completion:[`Task awaiting completion`]};function Zn(e){return J!==null&&Object.keys(Xn).some(t=>J?.[t]===!0&&Xn[t].includes(e))}function Qn(e){let t=e.replaceAll(`-`,`+`).replaceAll(`_`,`/`),n=t.padEnd(Math.ceil(t.length/4)*4,`=`);return Uint8Array.from(atob(n),e=>e.charCodeAt(0))}function $n(e,t){let n=e.options.applicationServerKey;return n===null||n.byteLength===t.length&&new Uint8Array(n).every((e,n)=>e===t[n])}function er(){return navigator.serviceWorker.getRegistration()}async function tr(e){let t=await(await er())?.pushManager.getSubscription()??null;return t===null||$n(t,e)?t:(await t.unsubscribe(),null)}async function nr(e){return await(await u(`/api/push/subscription`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e.toJSON())})).json()}async function rr(){let e=await(await u(`/api/push`)).json(),t=await tr(Qn(e.publicKey)),n=t===null?null:t.endpoint===e.subscription?.endpoint?e.subscription:await nr(t);return J=n?.settings??null,{publicKey:e.publicKey,permission:Notification.permission,subscription:n}}async function ir(e,t){if(await e!==`granted`)throw Error(`Notifications were not allowed.`);if(await er()===void 0)throw Error(`Notifications need the service worker, which only the built app installs.`);let{pushManager:n}=await navigator.serviceWorker.ready,r=Qn(t),i=await tr(r)??await n.subscribe({userVisibleOnly:!0,applicationServerKey:r});try{let e=await nr(i);return J=e.settings,e}catch(e){throw await i.unsubscribe(),e}}async function ar(){await(await(await er())?.pushManager.getSubscription())?.unsubscribe(),J=null,await u(`/api/push/subscription`,{method:`DELETE`})}async function or(e){let t=await(await u(`/api/push/settings`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)})).json();return J=t.settings,t}async function sr(){await u(`/api/push/test`,{method:`POST`})}var cr=`toodo-open-task`;function lr(e){if(!(`serviceWorker`in navigator))return()=>{};let t=navigator.serviceWorker,n=({data:t})=>{typeof t==`object`&&t&&`type`in t&&t.type===cr&&`taskId`in t&&typeof t.taskId==`number`&&e(t.taskId)};return t.addEventListener(`message`,n),()=>t.removeEventListener(`message`,n)}async function ur(){return`Notification`in window&&Notification.permission===`granted`}async function dr(){return`Notification`in window?Notification.requestPermission():`denied`}function fr(e){Zn(e.title)||new Notification(e.title,{body:e.body})}var pr={planned:`Planned`,in_progress:`In progress`,in_review:`Awaiting completion`,done:`Done`};function mr(e){return e.status===`done`&&e.resolution===`completed`?`Completed`:e.status===`done`&&e.resolution===`not_adopted`?`Not adopted`:pr[e.status]}function hr(e,t){switch(t.status){case`in_progress`:return`Task started`;case`in_review`:return`Task awaiting completion`;case`done`:return t.resolution===`not_adopted`?`Task concluded without merging`:`Task done`;case`planned`:return e===`in_progress`?`Task paused`:`Task status changed`}}function gr(e,t){let n=new Map(e.map(e=>[e.id,e.status]));return t.flatMap(e=>{let t=n.get(e.id);return t===void 0||t===e.status?[]:[{title:hr(t,e),body:`#${e.id} ${e.title}: ${pr[t]} -> ${mr(e)}`}]})}async function _r(e){if(e.length!==0&&(await ur()||await dr()===`granted`))for(let t of e)fr(t)}var vr=class extends Error{kind;code;constructor(e){super(Nn(e)),this.name=`CommandFailure`,this.kind=e.kind,this.code=e.code}};async function Y(e){let t=await e;if(t.status===`error`)throw new vr(t.error);return t.data}var X={workspaces:[`workspaces`],guidelines:e=>[`guidelines`,e],tasks:[`task-list`,`pages`],taskRelations:[`tasks`,`relations`],archive:[`tasks`,`archive`],backups:[`backups`],backupSettings:[`backup-settings`],backupStatus:[`backup-status`],mcpServerInfo:[`mcp-server-info`],review:(e,t)=>[`review`,e,t],reviewTimeZone:[`review`,`time-zone`],reviewSnapshots:[`review-snapshots`],reviewSnapshot:e=>[`review-snapshots`,e]};function yr(){return D({queryKey:X.mcpServerInfo,queryFn:()=>U.mcpServerInfo(),refetchInterval:5e3})}function br(){return D({queryKey:X.backups,queryFn:()=>Y(U.listBackups())})}function xr(){return D({queryKey:X.backupSettings,queryFn:()=>U.getBackupSettings()})}function Sr(){return D({queryKey:X.backupStatus,queryFn:()=>U.getBackupStatus(),refetchInterval:6e4})}function Cr(){let e=g();return O({mutationFn:e=>Y(U.saveBackupSettings(e)),onSuccess:t=>(e.setQueryData(X.backupSettings,t),Promise.all([e.invalidateQueries({queryKey:X.backups}),e.invalidateQueries({queryKey:X.backupStatus})]))})}function wr(){let e=g();return O({mutationFn:e=>Y(U.restoreBackup(e)),onSuccess:()=>e.invalidateQueries()})}function Tr(){return O({mutationFn:In})}function Er(){return O({mutationFn:Ln})}function Dr(){let e=g();return O({mutationFn:Rn,onSuccess:()=>e.invalidateQueries()})}function Or(){return D({queryKey:X.workspaces,queryFn:()=>Y(U.listWorkspaces())})}function kr(){let e=g();return O({mutationFn:e=>Y(U.createWorkspace(e)),onSuccess:()=>e.invalidateQueries({queryKey:X.workspaces})})}function Ar(){let e=g();return O({mutationFn:e=>Y(U.updateWorkspace(e)),onSuccess:()=>e.invalidateQueries({queryKey:X.workspaces,exact:!0})})}function jr(){return Z(e=>Y(U.deleteWorkspace(e)))}function Mr(){return D({queryKey:X.archive,queryFn:()=>Y(U.listArchive())})}function Z(e){let t=g();return O({mutationFn:e,onSuccess:()=>Promise.all([t.invalidateQueries({queryKey:X.tasks}),t.invalidateQueries({queryKey:X.workspaces,exact:!0}),t.invalidateQueries({queryKey:X.archive}),t.invalidateQueries({queryKey:[`review`]})])})}function Nr(){return Z(e=>Y(U.restoreWorkspace(e)))}function Pr(){return Z(e=>Y(U.purgeWorkspace(e)))}function Fr(){return Z(e=>Y(U.restoreTask(e)))}function Ir(){return Z(e=>Y(U.purgeTask(e)))}function Lr(e){return D({queryKey:X.guidelines(e),queryFn:()=>Y(U.listGuidelines(e))})}function Rr(e){let t=g();return O({mutationFn:e,onSuccess:e=>t.invalidateQueries({queryKey:X.guidelines(e.workspaceId)})})}function zr(){return Rr(e=>Y(U.addGuideline(e)))}function Br(){return Rr(e=>Y(U.updateGuideline(e)))}function Vr(){return Rr(e=>Y(U.deleteGuideline(e)))}var Hr=[`planned`,`in_progress`,`in_review`];function Q(e){return Y(U.listTasks(e))}async function Ur(e){let t=Q({statuses:[`done`],before:e,limit:100}),n=e=>e.length<100?null:Math.min(...e.map(e=>e.id));if(e!==null){let e=await t;return{tasks:e,olderBefore:n(e)}}let[r,i]=await Promise.all([Q({statuses:Hr}),t]),a=new Set([...r,...i].map(e=>e.id)),o=[...new Set(r.flatMap(e=>e.dependsOn))].filter(e=>!a.has(e)),s=[];for(let e=0;e<o.length;e+=100)s.push(o.slice(e,e+100));let c=await Promise.all(s.map(e=>Q({ids:e})));return{tasks:[...r,...i,...c.flat()],olderBefore:n(i)}}function Wr(e){let t=new Map;for(let n of e.pages)for(let e of n.tasks)t.set(e.id,e);return[...t.values()].sort((e,t)=>e.id-t.id)}function Gr(e){let t=e.getQueryData(X.tasks);return t===void 0?void 0:Wr(t)}function Kr(e=[]){let t=lt({queryKey:X.tasks,queryFn:({pageParam:e})=>Ur(e),initialPageParam:null,getNextPageParam:e=>e.olderBefore,select:Wr}),n=t.data,r=new Set(n?.map(e=>e.id)),i=[...new Set(e.filter(e=>e!=null&&!r.has(e)))].sort((e,t)=>e-t),a=D({queryKey:[...X.tasks,`by-id`,i],queryFn:()=>Q({ids:i}),enabled:n!==void 0&&i.length>0}),o=i.length===0?[]:a.data??[];return n===void 0||o.length===0?t:{...t,data:[...n,...o].sort((e,t)=>e.id-t.id)}}function qr(e,t){return D({queryKey:X.review(e,t),queryFn:()=>Y(U.reviewPeriod(e,t))})}function Jr(){return D({queryKey:X.reviewTimeZone,queryFn:()=>Y(U.getReviewTimeZone())})}function Yr(){let e=g();return O({mutationFn:e=>Y(U.setReviewTimeZone(e)),onSuccess:()=>e.invalidateQueries({queryKey:[`review`]})})}function Xr(){return D({queryKey:X.reviewSnapshots,queryFn:()=>Y(U.listReviewSnapshots())})}function Zr(e){return D({queryKey:X.reviewSnapshot(e??0),queryFn:()=>Y(U.getReviewSnapshot(e??0)),enabled:e!==null,staleTime:1/0})}function Qr(){let e=g();return O({mutationFn:e=>Y(U.saveReviewSnapshot(e)),onSuccess:()=>e.invalidateQueries({queryKey:X.reviewSnapshots})})}function $r(){let e=g();return O({mutationFn:e=>Y(U.deleteReviewSnapshot(e)),onSuccess:()=>e.invalidateQueries({queryKey:X.reviewSnapshots})})}function ei(){let e=g();(0,p.useEffect)(()=>{let t=[Mn.tasksChanged.listen(async()=>{let t=Gr(e);await e.invalidateQueries({queryKey:X.tasks}),!(t===void 0||document.hasFocus())&&_r(gr(t,Gr(e)??[])).catch(e=>console.error(`toodo: failed to show status notifications`,e))}),Mn.workspacesChanged.listen(()=>e.invalidateQueries({queryKey:X.workspaces,exact:!0})),Mn.guidelinesChanged.listen(t=>e.invalidateQueries({queryKey:X.guidelines(t.payload.workspaceId)}))];return()=>{for(let e of t)e.then(e=>e())}},[e])}function ti(){let e=g();return O({mutationFn:e=>Y(U.startTask(e,null,null)),onSuccess:()=>e.invalidateQueries({queryKey:X.tasks})})}function ni(){let e=g();return O({mutationFn:e=>Y(U.completeTask(e,null,null)),onSuccess:()=>Promise.all([e.invalidateQueries({queryKey:X.tasks}),e.invalidateQueries({queryKey:[`review`]})])})}function ri(){let e=g();return O({mutationFn:({id:e,note:t,shippedWith:n=null})=>Y(U.concludeTask(e,t,n===null?`not_adopted`:`shipped_with`,n)),onSuccess:()=>Promise.all([e.invalidateQueries({queryKey:X.tasks}),e.invalidateQueries({queryKey:[`review`]})])})}function ii(){let e=g();return O({mutationFn:({id:e,note:t})=>Y(U.setCompletionNote(e,t)),onSuccess:()=>Promise.all([e.invalidateQueries({queryKey:X.tasks}),e.invalidateQueries({queryKey:[`review`]})])})}function ai(){let e=g();return O({mutationFn:({id:e,reason:t})=>Y(U.reopenTask(e,t)),onSuccess:()=>Promise.all([e.invalidateQueries({queryKey:X.tasks}),e.invalidateQueries({queryKey:[`review`]})])})}function oi(){let e=g();return O({mutationFn:({id:e,resolution:t,note:n})=>Y(U.setTaskOutcome(e,t,n)),onSuccess:()=>Promise.all([e.invalidateQueries({queryKey:X.tasks}),e.invalidateQueries({queryKey:[`review`]})])})}function si(){let e=g();return O({mutationFn:e=>Y(U.updateTask(e)),onSuccess:()=>Promise.all([e.invalidateQueries({queryKey:X.tasks}),e.invalidateQueries({queryKey:[`review`]})])})}function ci(){let e=g();return O({mutationFn:({id:e,workspaceId:t})=>Y(U.moveTask(e,t)),onSuccess:()=>Promise.all([e.invalidateQueries({queryKey:X.tasks}),e.invalidateQueries({queryKey:[`review`]})])})}function $(e){let t=g();return O({mutationFn:e,onSuccess:()=>t.invalidateQueries({queryKey:X.tasks})})}function li(){return $(e=>Y(U.pauseTask(e)))}function ui(){return $(({id:e,until:t,reason:n})=>Y(U.waitTask(e,t,n)))}function di(){return $(e=>Y(U.endWait(e)))}function fi(){return $(({taskId:e,criterionId:t,met:n,evidence:r})=>Y(U.checkCriterion(e,t,n,r)))}function pi(){return Z(e=>Y(U.deleteTask(e)))}function mi(){return Z(e=>Y(U.deleteDoneTasks(e)))}function hi(e,t){return D({queryKey:[...X.tasks,`done-count`,e],queryFn:async()=>(await Q({workspaceId:e,statuses:[`done`]})).length,enabled:t})}function gi(){return $(({id:e,dependsOn:t,confirmPause:n})=>Y(U.addDependency(e,t,n)))}function _i(){return $(({id:e,dependsOn:t})=>Y(U.removeDependency(e,t)))}function vi(){return D({queryKey:X.taskRelations,queryFn:()=>Y(U.listTaskRelations())})}function yi(e){let t=g();return O({mutationFn:e,onSuccess:()=>t.invalidateQueries({queryKey:X.taskRelations})})}function bi(){return yi(({taskId:e,relatedId:t})=>Y(U.addTaskRelation(e,t)))}function xi(){return yi(({taskId:e,relatedId:t})=>Y(U.removeTaskRelation(e,t)))}function Si(){let e=g();return O({mutationFn:e=>Y(U.createTask(e)),onSuccess:()=>e.invalidateQueries({queryKey:X.tasks})})}export{ui as $,Je as $t,_i as A,F as At,Cr as B,j as Bt,di as C,$t as Ct,li as D,I as Dt,ci as E,Yt as Et,Nr as F,Ot as Ft,oi as G,dt as Gt,ei as H,ft as Ht,qr as I,A as It,Kr as J,ht as Jt,ti as K,mt as Kt,Zr as L,Tt as Lt,ai as M,wt as Mt,wr as N,xt as Nt,Ir as O,It as Ot,Fr as P,ut as Pt,Dr as Q,D as Qt,Xr as R,Dt as Rt,Tr as S,nn as St,yr as T,Zt as Tt,ii as U,M as Ut,Qr as V,bt as Vt,Yr as W,Ct as Wt,si as X,St as Xt,Br as Y,gt as Yt,Ar as Z,O as Zt,$r as _,_n as _t,bi as a,ne as an,Yn as at,hi as b,fn as bt,Sr as c,oe as cn,Kn as ct,ni as d,C as dn,Wn as dt,Le as en,Or as et,ri as f,x as fn,Jn as ft,Vr as g,xn as gt,mi as h,g as hn,kn as ht,zr as i,T as in,lr as it,xi as j,kt as jt,Pr as k,Nt as kt,br as l,ae as ln,qn as lt,kr as m,_ as mn,An as mt,Y as n,E as nn,ir as nt,Mr as o,S as on,or as ot,Si as p,_e as pn,U as pt,vi as q,pt as qt,gi as r,Ce as rn,rr as rt,xr as s,se as sn,sr as st,X as t,Ee as tn,ar as tt,fi as u,b as un,Gn as ut,pi as v,pn as vt,Lr as w,B as wt,Er as x,un as xt,jr as y,V as yt,Jr as z,P as zt};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,n as t,r as n,s as r,t as i}from"./dist-ZmB2kPfR.js";import{I as a,L as o,R as s,V as c,W as l,_ as u,et as d,mt as f,n as p,o as m,pt as ee,z as h}from"./queries-DQ2qKkj-.js";import{A as g,Bt as te,C as ne,Ct as re,D as _,Dt as v,E as y,Et as b,It as x,K as ie,M as ae,N as oe,Nt as S,O as C,P as se,Pt as w,S as ce,St as T,T as E,V as D,Vt as le,Z as O,_ as ue,_t as k,b as A,bt as j,c as de,d as fe,f as M,g as N,h as P,j as F,k as pe,l as I,m as L,p as R,q as me,s as he,u as z,v as B,w as ge,x as V,xt as H,y as U,zt as W}from"./index-CKxNxMCO.js";import{t as G}from"./opener-DWhHPoCL.js";var K={name:`calendar-check`,size:24,node:[[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`m9 15 2 2 4-4`,key:`1grp1n`}]]};K.node;var _e=t(K),q=r(e(),1),J=n(),ve={completed:x.success,opened_for_review:x.review,started:x.progress,worked_on:x.progress,planned:x.neutral},Y=i(`shrink-0 rounded-full px-2 py-0.5 text-xs font-medium`,S.neutral),ye=[{kind:`week`,label:`Week`},{kind:`month`,label:`Month`},{kind:`quarter`,label:`Quarter`},{kind:`year`,label:`Year`},{kind:`custom`,label:`Custom`}];function be(e,t,n){let r=URL.createObjectURL(new Blob([t],{type:`${n};charset=utf-8`})),i=document.createElement(`a`);i.href=r,i.download=e,i.click(),URL.revokeObjectURL(r)}function xe({disabled:e,children:t}){let[n,r]=(0,q.useState)(!1),i=(0,q.useRef)(null);return(0,q.useEffect)(()=>{if(!n)return;let e=e=>{i.current?.contains(e.target)||r(!1)},t=e=>e.key===`Escape`&&r(!1);return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[n]),(0,J.jsxs)(`div`,{ref:i,className:`relative`,children:[(0,J.jsxs)(f,{size:`sm`,"aria-haspopup":`menu`,"aria-expanded":n,disabled:e,onClick:()=>r(!n),children:[(0,J.jsx)(W,{}),(0,J.jsx)(`span`,{className:`max-md:sr-only`,children:`Export`})]}),n&&(0,J.jsx)(`div`,{role:`menu`,"aria-label":`Export review`,className:`absolute right-0 z-10 mt-1 flex w-48 flex-col rounded-lg border bg-popover p-1 text-popover-foreground shadow-md`,children:t(()=>r(!1))})]})}function X(e,t){return`${e} ${t}${e===1?``:`s`}`}function Z({onSelect:e,children:t}){return(0,J.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:e,className:`rounded-md px-2 py-1.5 text-left text-sm hover:bg-muted max-md:min-h-11`,children:t})}function Se(){let e=h(),t=l(),[n,r]=(0,q.useState)(!1),[a,o]=(0,q.useState)(``),[s,c]=(0,q.useState)(null),u=typeof Intl.supportedValuesOf==`function`?Intl.supportedValuesOf(`timeZone`):[];async function d(e){c(null);try{await t.mutateAsync(e),r(!1)}catch(e){c(e instanceof Error?e.message:String(e))}}if(!e.data)return null;let{timeZone:p,configured:m}=e.data;return n?(0,J.jsxs)(`form`,{"aria-label":`Review time zone`,className:`flex flex-wrap items-center gap-2 print:hidden`,onSubmit:e=>{e.preventDefault(),d(a)},children:[(0,J.jsx)(`label`,{htmlFor:`review-time-zone`,className:`text-xs`,children:`Time zone for every device`}),(0,J.jsx)(`input`,{id:`review-time-zone`,list:`review-time-zones`,required:!0,className:i(O,`w-56`),value:a,onChange:e=>o(e.target.value)}),(0,J.jsx)(`datalist`,{id:`review-time-zones`,children:u.map(e=>(0,J.jsx)(`option`,{value:e},e))}),(0,J.jsx)(f,{size:`sm`,type:`submit`,disabled:t.isPending,children:`Save`}),m!==null&&(0,J.jsx)(f,{size:`sm`,type:`button`,variant:`outline`,onClick:()=>void d(null),children:`Use the server's`}),(0,J.jsx)(f,{size:`sm`,type:`button`,variant:`ghost`,onClick:()=>r(!1),children:`Cancel`}),s&&(0,J.jsx)(`span`,{role:`alert`,className:`w-full text-xs text-destructive`,children:s})]}):(0,J.jsxs)(`span`,{children:[`Days are in `,p,m===null&&` (the server's time zone)`,`.`,` `,(0,J.jsx)(`button`,{type:`button`,className:`text-primary underline underline-offset-2 hover:no-underline print:hidden`,onClick:()=>{o(m??p),r(!0)},children:`Change time zone`})]})}function Q({onShowTask:e}){let[t,n]=(0,q.useState)(()=>V(`week`,T(Date.now()/1e3))),[r,l]=(0,q.useState)(null),[h,v]=(0,q.useState)(U),[y,b]=(0,q.useState)(null),[x,oe]=(0,q.useState)(null),C=a(t.from,t.to),w=s(),E=o(x),k=c(),M=u(),N=x!==null,P=N?E:C,F=d(),I=m(),L=N?E.data?.workspaces??[]:[...F.data??[],...I.data?.workspaces??[]],R=new Map(L.map(e=>[e.id,e.name])),z=N?E.data&&{period:{kind:E.data.summary.period,from:E.data.summary.from,to:E.data.summary.to},entries:E.data.entries,start:E.data.summary.start,end:E.data.summary.end,timeZone:E.data.summary.timeZone,now:E.data.summary.savedAt}:C.data&&{period:t,entries:C.data.entries,start:C.data.start,end:C.data.end,timeZone:C.data.timeZone,now:Date.now()/1e3},B=z?.period??t,H=z&&fe(z.entries,h),W=pe(z?.entries??[]);h.label!==null&&!W.includes(h.label)&&W.push(h.label);let G=[h.workspaceId===null?`across all workspaces`:`in ${R.get(h.workspaceId)??`workspace ${h.workspaceId}`}`,h.label!==null&&`labelled ${h.label}`].filter(Boolean).join(`, `),K=ne[B.kind];function Q(e){l(null),n(e)}function $(e){l(null),b(null),oe(e)}async function Oe(){try{let e=await k.mutateAsync({period:t.kind,from:t.from,to:t.kind===`custom`?t.to:null,workspaceId:h.workspaceId,label:h.label,title:null});l(`Saved "${e.title}" with ${X(e.entryCount,`task`)}; reopen it from Saved reviews.`)}catch(e){l(`Could not save the review: ${e instanceof Error?e.message:String(e)}`)}}async function ke(e){try{await M.mutateAsync(e),$(null),l(`Deleted the saved review.`)}catch(e){l(`Could not delete the saved review: ${e instanceof Error?e.message:String(e)}`)}}function Ae(e){e!==t.kind&&Q(e===`custom`?{...t,kind:e}:V(e,t.from))}function je(e){return N?E.data?Promise.resolve(e===`csv`?E.data.csv:E.data.markdown):Promise.reject(Error(`the saved review is still loading`)):p(ee.reviewReport({period:t.kind,date:null,from:t.from,to:t.kind===`custom`?t.to:null,format:e,timeZone:null,workspaceId:h.workspaceId,label:h.label}))}async function Me(){try{let e=je(`markdown`);if(typeof ClipboardItem>`u`)await navigator.clipboard.writeText((await e).contents);else{let t=e.then(({contents:e})=>new Blob([e],{type:`text/plain`}));await navigator.clipboard.write([new ClipboardItem({"text/plain":t})])}l(`Copied as Markdown.`)}catch(e){l(`Could not copy: ${String(e)}`)}}async function Ne(e){try{let t=await je(e);be(t.fileName,t.contents,t.mediaType),l(`Downloaded ${t.fileName}`)}catch(e){l(`Could not export: ${String(e)}`)}}return(0,J.jsxs)(`section`,{"aria-labelledby":`review-heading`,className:`flex flex-col gap-4`,children:[(0,J.jsxs)(`header`,{className:`flex flex-col gap-1`,children:[(0,J.jsx)(`h2`,{id:`review-heading`,className:`text-xl font-semibold tracking-tight`,children:N&&E.data?E.data.summary.title:ge[B.kind]}),(0,J.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Work recorded from `,B.from,` to `,B.to,` `,G,`.`,` `,N?E.data&&(0,J.jsxs)(`span`,{children:[`Saved `,re(E.data.summary.savedAt),`, with days in `,E.data.summary.timeZone,`; it stays as it was when saved.`]}):(0,J.jsx)(Se,{})]})]}),(N||(w.data?.length??0)>0)&&(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 print:hidden`,children:[(0,J.jsxs)(`select`,{"aria-label":`Saved reviews`,className:i(`h-8 w-full min-w-0 rounded-lg border border-input bg-background px-2.5 text-sm outline-none max-md:h-11 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,`w-auto max-md:min-w-0 max-md:flex-1`),value:x??``,onChange:e=>$(e.target.value===``?null:Number(e.target.value)),children:[(0,J.jsx)(`option`,{value:``,children:`Live review`}),w.data?.map(e=>(0,J.jsxs)(`option`,{value:e.id,children:[e.title,` (saved `,T(e.savedAt),`)`]},e.id))]}),x!==null&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(f,{size:`sm`,variant:`outline`,onClick:()=>$(null),children:`Back to the live review`}),(0,J.jsx)(f,{size:`sm`,variant:`ghost`,disabled:M.isPending,onClick:()=>void ke(x),children:`Delete saved review`})]})]}),(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 print:hidden`,children:[!N&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`div`,{role:`group`,"aria-label":`Review period`,className:`flex rounded-md border p-0.5 max-md:w-full`,children:ye.map(({kind:e,label:n})=>(0,J.jsx)(f,{size:`sm`,variant:t.kind===e?`default`:`ghost`,"aria-pressed":t.kind===e,onClick:()=>Ae(e),children:n},e))}),t.kind===`week`&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`label`,{htmlFor:`week-start`,className:`text-xs text-muted-foreground max-md:sr-only`,children:`Week starting`}),(0,J.jsx)(`input`,{id:`week-start`,type:`date`,required:!0,className:i(`h-8 w-full min-w-0 rounded-lg border border-input bg-background px-2.5 text-sm outline-none max-md:h-11 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,`w-40 max-md:w-0 max-md:min-w-0 max-md:flex-1`),value:t.from,onChange:e=>e.target.value&&Q(ae(e.target.value))})]}),t.kind===`custom`&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`label`,{htmlFor:`review-from`,className:`text-xs text-muted-foreground max-md:sr-only`,children:`From`}),(0,J.jsx)(`input`,{id:`review-from`,type:`date`,required:!0,max:t.to,className:i(`h-8 w-full min-w-0 rounded-lg border border-input bg-background px-2.5 text-sm outline-none max-md:h-11 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,`w-40`),value:t.from,onChange:e=>e.target.value&&e.target.value<=t.to&&Q({...t,from:e.target.value})}),(0,J.jsx)(`label`,{htmlFor:`review-to`,className:`text-xs text-muted-foreground max-md:sr-only`,children:`To`}),(0,J.jsx)(`input`,{id:`review-to`,type:`date`,required:!0,min:t.from,className:i(`h-8 w-full min-w-0 rounded-lg border border-input bg-background px-2.5 text-sm outline-none max-md:h-11 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,`w-40`),value:t.to,onChange:e=>e.target.value&&e.target.value>=t.from&&Q({...t,to:e.target.value})})]}),t.kind!==`week`&&t.kind!==`custom`&&(0,J.jsx)(`span`,{className:`px-1 text-sm font-medium`,children:ce(t)}),(0,J.jsx)(f,{size:`icon-sm`,variant:`outline`,"aria-label":`Previous ${K}`,title:`Previous ${K}`,onClick:()=>Q(g(t,-1)),children:(0,J.jsx)(te,{})}),(0,J.jsx)(f,{size:`icon-sm`,variant:`outline`,"aria-label":`Next ${K}`,title:`Next ${K}`,onClick:()=>Q(g(t,1)),children:(0,J.jsx)(le,{})}),t.kind!==`custom`&&(0,J.jsxs)(f,{size:`sm`,variant:`ghost`,onClick:()=>Q(V(t.kind,T(Date.now()/1e3))),children:[(0,J.jsx)(_e,{className:`md:hidden`,"aria-hidden":!0}),(0,J.jsxs)(`span`,{className:`max-md:sr-only`,children:[`This `,K]})]})]}),(0,J.jsx)(`div`,{className:`ml-auto`,children:(0,J.jsx)(xe,{disabled:!H,children:e=>(0,J.jsxs)(J.Fragment,{children:[!N&&(0,J.jsx)(Z,{onSelect:()=>{e(),Oe()},children:`Save as snapshot`}),(0,J.jsx)(Z,{onSelect:()=>{e(),Me()},children:`Copy as Markdown`}),(0,J.jsx)(Z,{onSelect:()=>{e(),Ne(`markdown`)},children:`Save as Markdown`}),(0,J.jsx)(Z,{onSelect:()=>{e(),Ne(`csv`)},children:`Save as CSV`}),(0,J.jsx)(Z,{onSelect:()=>{e(),window.print()},children:`Print or save as PDF`})]})})})]}),(0,J.jsxs)(`div`,{role:`group`,"aria-label":`Review filters`,className:`flex flex-wrap items-center gap-2 print:hidden`,children:[(0,J.jsxs)(`select`,{"aria-label":`Workspace`,className:i(O,`w-auto max-md:min-w-0 max-md:flex-1`),value:h.workspaceId??``,onChange:e=>v({...h,workspaceId:e.target.value===``?null:Number(e.target.value)}),children:[(0,J.jsx)(`option`,{value:``,children:`All workspaces`}),L.map(e=>(0,J.jsx)(`option`,{value:e.id,children:e.name},e.id))]}),(0,J.jsxs)(`select`,{"aria-label":`Label`,className:i(O,`w-auto max-md:min-w-0 max-md:flex-1`),value:h.label??``,onChange:e=>v({...h,label:e.target.value===``?null:e.target.value}),children:[(0,J.jsx)(`option`,{value:``,children:W.length===0?`No labels in this period`:`Any label`}),W.map(e=>(0,J.jsx)(`option`,{value:e,children:e},e))]}),(h.workspaceId!==null||h.label!==null)&&(0,J.jsx)(f,{size:`sm`,variant:`ghost`,onClick:()=>v(U),children:`Clear filters`})]}),r&&(0,J.jsx)(`p`,{role:`status`,className:`text-xs text-muted-foreground print:hidden`,children:r}),(0,J.jsx)(`p`,{role:`status`,className:i(`text-sm text-muted-foreground`,!P.isPending&&`sr-only`),children:P.isPending?`Loading the review...`:H?`Showing ${H.length} ${H.length===1?`task`:`tasks`} with activity in this ${K}.`:``}),P.isError&&(0,J.jsxs)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:[`Failed to load the review: `,P.error.message]}),H?.length===0&&(0,J.jsx)(he,{title:z?.entries.length===0?`No recorded activity in this ${K}.`:`No recorded activity in this ${K} matches the filters.`,hint:N?`This saved review keeps the tasks it had when it was saved.`:z?.entries.length===0?`Toodo records each task as it is planned, started, moved to review, and completed, so reviews fill up as you work.`:`Pick another period or change the filters to look at other work.`,action:N?void 0:(0,J.jsx)(`div`,{className:`flex flex-wrap justify-center gap-2 print:hidden`,children:(0,J.jsxs)(f,{size:`sm`,variant:`outline`,onClick:()=>Q(g(t,-1)),children:[`Show the `,K,` before`]})})}),z&&H&&H.length>0&&(0,J.jsx)(De,{shown:z,entries:H,workspaces:L}),z&&H&&(0,J.jsx)(Ee,{shown:z,entries:H,editable:!N}),B.kind===`year`&&H&&(0,J.jsx)(Te,{entries:H}),H&&ue(H).map(t=>(0,J.jsxs)(`section`,{"aria-label":A[t.outcome],className:`flex flex-col gap-2`,children:[(0,J.jsxs)(`h3`,{className:i(`text-sm font-semibold`,ve[t.outcome]),children:[A[t.outcome],` `,(0,J.jsxs)(`span`,{className:`font-normal text-muted-foreground`,children:[`(`,t.entries.length,`)`]})]}),(0,J.jsx)(`ul`,{className:`flex flex-col divide-y rounded-lg border`,children:t.entries.map(({task:t,at:n,commits:r,archived:a,pullRequest:o})=>(0,J.jsxs)(`li`,{className:`flex flex-col gap-1 px-3 py-2`,children:[(0,J.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,J.jsx)(D,{type:t.taskType}),(0,J.jsxs)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:[`#`,t.id]}),(0,J.jsx)(`button`,{type:`button`,"aria-label":`Open #${t.id} ${t.title}`,title:t.title,onClick:()=>e?.(t.id),className:`min-w-0 flex-1 truncate text-left text-sm font-medium hover:underline max-md:min-h-11`,children:t.title}),t.resolution===`not_adopted`&&(0,J.jsx)(`span`,{className:Y,children:`Not adopted`}),a&&(0,J.jsx)(`span`,{className:Y,children:`Archived`}),t.resolution===`completed`&&(0,J.jsx)(`span`,{className:i(`shrink-0 rounded-full px-2 py-0.5 text-xs font-medium`,S.success),children:`Completed`}),_(t)&&(0,J.jsx)(we,{url:_(t),stats:o}),(0,J.jsxs)(`span`,{className:`shrink-0 text-xs text-muted-foreground max-md:hidden print:inline`,children:[R.get(t.workspaceId)??`Workspace ${t.workspaceId}`,` · `,(0,J.jsx)(j,{at:n})]})]}),(0,J.jsx)(me,{task:t}),a||N?null:y?.id===t.id?(0,J.jsx)(se,{task:t,focusPlan:y.field,onDone:()=>b(null)}):(0,J.jsx)(`p`,{className:`text-xs text-muted-foreground empty:hidden print:hidden`,children:(0,J.jsx)(ie,{task:t,onEdit:e=>b({id:t.id,field:e})})}),t.completionNote&&(0,J.jsx)(`p`,{"aria-label":`Completion note of #${t.id}`,className:`whitespace-pre-line break-words-keep text-xs`,children:t.completionNote}),z&&(0,J.jsx)(Ce,{task:t,shown:z}),r.length>0&&(0,J.jsx)(`ul`,{"aria-label":`Commits of #${t.id} this ${K}`,className:`flex flex-col gap-0.5`,children:r.map(e=>(0,J.jsxs)(`li`,{className:`flex gap-2 text-xs`,title:e.author,children:[(0,J.jsx)(`code`,{className:`shrink-0 text-muted-foreground`,children:e.sha.slice(0,7)}),(0,J.jsx)(`span`,{className:`truncate`,children:de(e.message)})]},e.sha))})]},t.id))})]},t.outcome))]})}function $(e){return e===0?`0h`:L(e)}function Ce({task:e,shown:t}){let{start:n,end:r,now:i}=t,a=H(e.timeline,i),o=b(e.timeline,i);if(a===null||o===null)return null;let s=v(e.timeline).filter(e=>e.state===`paused`&&e.start<r&&(e.end??i)>n);return(0,J.jsxs)(`div`,{"aria-label":`Time of #${e.id}`,className:`flex flex-col gap-0.5 text-xs text-muted-foreground`,children:[(0,J.jsxs)(`p`,{children:[$(a),` active, `,$(o),` waiting`]}),s.length>0&&(0,J.jsx)(`ul`,{"aria-label":`Waits of #${e.id}`,className:`flex flex-col gap-0.5`,children:s.map(e=>(0,J.jsxs)(`li`,{className:`break-words-keep`,children:[`Waiting `,$(Math.max((e.end??i)-e.start,0)),` from `,T(e.start),e.end===null&&`, still waiting`,`: `,e.reason??`no reason recorded`]},e.start))})]})}function we({url:e,stats:t}){let n=y(e),r=t=>{t.preventDefault(),G(e).catch(t=>console.error(`Failed to open ${e}`,t))};return(0,J.jsx)(`a`,{href:e,title:t?`${e} \u00b7 ${C(t)}`:e,"aria-label":n?`Pull request #${n}`:`Pull request`,onClick:r,onAuxClick:r,className:`shrink-0 text-xs text-primary underline underline-offset-2 hover:no-underline max-md:inline-flex max-md:min-h-11 max-md:items-center`,children:n?`#${n}`:`PR`})}function Te({entries:e}){let t=oe(e);return t===null?null:(0,J.jsxs)(`section`,{"aria-labelledby":`year-in-review-heading`,className:`flex flex-col gap-3 rounded-lg border p-3`,children:[(0,J.jsx)(`h3`,{id:`year-in-review-heading`,className:`text-sm font-semibold`,children:`Year in review`}),t.pullRequests&&(0,J.jsxs)(`dl`,{className:`flex flex-wrap gap-x-6 gap-y-2`,children:[(0,J.jsxs)(`div`,{className:`flex flex-col`,children:[(0,J.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Merged pull requests`}),(0,J.jsx)(`dd`,{className:`text-lg font-semibold`,children:t.pullRequests.pullRequests})]}),(0,J.jsxs)(`div`,{className:`flex flex-col`,children:[(0,J.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Lines changed`}),(0,J.jsxs)(`dd`,{className:`text-lg font-semibold`,children:[(0,J.jsxs)(`span`,{children:[`+`,t.pullRequests.additions]}),(0,J.jsx)(`span`,{className:`text-muted-foreground`,children:` / `}),(0,J.jsxs)(`span`,{children:[`-`,t.pullRequests.deletions]})]})]}),(0,J.jsxs)(`div`,{className:`flex flex-col`,children:[(0,J.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Files changed`}),(0,J.jsx)(`dd`,{className:`text-lg font-semibold`,children:t.pullRequests.changedFiles})]}),(0,J.jsxs)(`div`,{className:`flex flex-col`,children:[(0,J.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Reviews`}),(0,J.jsxs)(`dd`,{className:`text-lg font-semibold`,title:N(t.pullRequests),children:[t.pullRequests.reviews,(0,J.jsxs)(`span`,{className:`ml-1 text-xs font-normal text-muted-foreground`,children:[`on `,t.pullRequests.reviewed,` of `,t.pullRequests.pullRequests]})]})]})]}),t.largest.length>0&&(0,J.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,J.jsx)(`h4`,{className:`text-xs text-muted-foreground`,children:`Largest pull requests`}),(0,J.jsx)(`ol`,{"aria-label":`Largest pull requests`,className:`flex flex-col gap-1`,children:t.largest.map(({task:e,pullRequest:t})=>(0,J.jsxs)(`li`,{className:`flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 text-sm`,children:[(0,J.jsx)(D,{type:e.taskType}),(0,J.jsx)(`span`,{className:`truncate font-medium`,children:e.title}),(0,J.jsx)(`span`,{className:`ml-auto shrink-0 text-xs text-muted-foreground`,children:C(t)})]},e.id))})]}),t.research.length>0&&(0,J.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,J.jsx)(`h4`,{className:`text-xs text-muted-foreground`,children:`Research conclusions`}),(0,J.jsx)(`ul`,{"aria-label":`Research conclusions`,className:`flex flex-col divide-y rounded-md border`,children:t.research.map(({task:e,at:t,adopted:n})=>(0,J.jsxs)(`li`,{className:`flex flex-col gap-1 px-2 py-1.5`,children:[(0,J.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 text-sm`,children:[(0,J.jsx)(`span`,{className:`truncate font-medium`,children:e.title}),(0,J.jsx)(`span`,{className:i(`shrink-0 rounded-full px-2 py-0.5 text-xs font-medium`,n?S.success:S.neutral),children:n?`Adopted`:`Not adopted`}),(0,J.jsx)(j,{className:`ml-auto shrink-0 text-xs text-muted-foreground`,at:t})]}),(0,J.jsx)(`p`,{"aria-label":`Research conclusion of #${e.id}`,className:`whitespace-pre-line break-words-keep text-xs`,children:e.completionNote??(0,J.jsx)(`span`,{className:`text-muted-foreground`,children:`No conclusion written.`})})]},e.id))})]}),t.overruns.length>0&&(0,J.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,J.jsx)(`h4`,{className:`text-xs text-muted-foreground`,children:`Largest estimate overruns`}),(0,J.jsx)(`ol`,{"aria-label":`Largest estimate overruns`,className:`flex flex-col gap-1`,children:t.overruns.map(({task:e,estimated:t,actual:n})=>(0,J.jsxs)(`li`,{className:`flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 text-sm`,children:[(0,J.jsx)(D,{type:e.taskType}),(0,J.jsx)(`span`,{className:`truncate font-medium`,children:e.title}),(0,J.jsxs)(`span`,{className:`ml-auto shrink-0 text-xs text-muted-foreground`,children:[`estimated `,L(t),`, `,L(n),` active`]})]},e.id))})]})]})}function Ee({shown:e,entries:t,editable:n}){let r=E(e.end,t,e.now),a=n?t.filter(({archived:e})=>!e).map(({task:e})=>k(e)):[],o=a.filter(e=>e.includes(`estimate`)).length,s=a.filter(e=>e.includes(`dueDate`)).length;if(r===null&&o+s===0)return null;let c=(0,J.jsxs)(`div`,{className:`contents`,children:[(0,J.jsx)(`dt`,{className:`text-muted-foreground`,children:`Missing plan`}),(0,J.jsxs)(`dd`,{children:[[o>0&&`${X(o,`task`)} without an estimate`,s>0&&`${X(s,`task`)} without a due date`].filter(Boolean).join(`, `),`; add them from the marks on the tasks below`]})]});return(0,J.jsxs)(`section`,{"aria-labelledby":`plan-heading`,className:`flex flex-col gap-3 rounded-lg border p-3`,children:[(0,J.jsx)(`h3`,{id:`plan-heading`,className:`text-sm font-semibold`,children:`Plan vs actual`}),r===null?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`p`,{className:`text-sm`,children:`No reviewed task has an estimate or a due date, so there is nothing to compare yet.`}),(0,J.jsx)(`dl`,{className:`grid gap-x-4 gap-y-1 text-sm sm:grid-cols-[auto_1fr]`,children:c})]}):(0,J.jsxs)(`dl`,{className:`grid gap-x-4 gap-y-1 text-sm sm:grid-cols-[auto_1fr]`,children:[(0,J.jsxs)(`div`,{className:`contents`,children:[(0,J.jsx)(`dt`,{className:`text-muted-foreground`,children:`Estimate vs active time`}),(0,J.jsx)(`dd`,{children:r.time?P(r.time):`No completed task had an estimate`})]}),(0,J.jsxs)(`div`,{className:`contents`,children:[(0,J.jsx)(`dt`,{className:`text-muted-foreground`,children:`Due dates met`}),(0,J.jsx)(`dd`,{children:r.dueDates?R(r.dueDates):`No completed task had a due date`})]}),o+s>0&&c]}),r!==null&&r.late.length>0&&(0,J.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,J.jsx)(`h4`,{className:`text-xs text-muted-foreground`,children:`Late tasks`}),(0,J.jsx)(`ul`,{"aria-label":`Late tasks`,className:`flex flex-col gap-1`,children:r.late.map(e=>(0,J.jsxs)(`li`,{className:`flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 text-sm`,children:[(0,J.jsxs)(`span`,{className:`flex min-w-0 max-w-full items-center gap-2`,children:[(0,J.jsx)(D,{type:e.task.taskType}),(0,J.jsx)(`span`,{className:`truncate font-medium`,children:e.task.title})]}),(0,J.jsx)(`span`,{className:i(`ml-auto shrink-0 text-xs`,x.danger),children:B(e)})]},e.task.id))})]})]})}function De({shown:e,entries:t,workspaces:n}){let r=F(e.period,t,n,e.timeZone),a=Math.max(1,...(r.completedPerMonth??[]).map(({count:e})=>e));return(0,J.jsxs)(`section`,{"aria-label":`Summary`,className:`flex flex-col gap-3 rounded-lg border p-3`,children:[(0,J.jsxs)(`dl`,{className:`flex flex-wrap gap-x-6 gap-y-2`,children:[r.outcomes.map(({outcome:e,count:t})=>(0,J.jsxs)(`div`,{className:`flex flex-col`,children:[(0,J.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:A[e]}),(0,J.jsx)(`dd`,{className:`text-lg font-semibold`,children:t})]},e)),r.notAdopted>0&&(0,J.jsxs)(`div`,{className:`flex flex-col`,children:[(0,J.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Not adopted`}),(0,J.jsx)(`dd`,{className:`text-lg font-semibold`,children:r.notAdopted})]}),(0,J.jsxs)(`div`,{className:`flex flex-col`,children:[(0,J.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Commits`}),(0,J.jsx)(`dd`,{className:`text-lg font-semibold`,children:r.commits})]})]}),(0,J.jsxs)(`dl`,{className:`grid gap-x-4 gap-y-1 text-sm sm:grid-cols-[auto_1fr]`,children:[I.map(e=>{let t=r[e];return(0,J.jsxs)(`div`,{className:`contents`,children:[(0,J.jsx)(`dt`,{className:`text-muted-foreground`,children:z[e]}),(0,J.jsx)(`dd`,{children:t===null?`No data`:`${L(t.median)} (${t.tasks} ${t.tasks===1?`task`:`tasks`})`})]},e)}),r.changes&&(0,J.jsxs)(`div`,{className:`contents`,children:[(0,J.jsx)(`dt`,{className:`text-muted-foreground`,children:`Changes in completed pull requests`}),(0,J.jsx)(`dd`,{children:M(r.changes)})]}),r.completedByType.length>0&&(0,J.jsxs)(`div`,{className:`contents`,children:[(0,J.jsx)(`dt`,{className:`text-muted-foreground`,children:`Completed by type`}),(0,J.jsx)(`dd`,{children:r.completedByType.map(({taskType:e,count:t})=>`${e} ${t}`).join(`, `)})]}),r.completedByWorkspace.length>0&&(0,J.jsxs)(`div`,{className:`contents`,children:[(0,J.jsx)(`dt`,{className:`text-muted-foreground`,children:`Completed by workspace`}),(0,J.jsx)(`dd`,{children:r.completedByWorkspace.map(({workspace:e,count:t})=>`${e} ${t}`).join(`, `)})]})]}),r.completedPerMonth&&(0,J.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,J.jsx)(`h3`,{className:`text-xs text-muted-foreground`,children:`Completed per month`}),(0,J.jsx)(`ul`,{"aria-label":`Completed per month`,className:`flex flex-col gap-0.5`,children:r.completedPerMonth.map(({month:e,count:t})=>(0,J.jsxs)(`li`,{className:`flex items-center gap-2 text-xs`,children:[(0,J.jsx)(`span`,{className:`w-16 shrink-0 font-mono text-muted-foreground`,children:e}),(0,J.jsx)(`span`,{"aria-hidden":!0,className:i(`h-2 rounded-sm`,w.success),style:{width:`${t/a*60}%`,minWidth:t>0?4:0}}),(0,J.jsx)(`span`,{children:t})]},e))})]})]})}export{Q as Review};
|
|
1
|
+
import{i as e,n as t,r as n,s as r,t as i}from"./dist-ZmB2kPfR.js";import{I as a,L as o,R as s,V as c,W as l,_ as u,et as d,mt as f,n as p,o as m,pt as ee,z as h}from"./queries-JuIQKikB.js";import{A as g,Bt as te,C as ne,Ct as re,D as _,Dt as v,E as y,Et as b,It as x,K as ie,M as ae,N as oe,Nt as S,O as C,P as se,Pt as w,S as ce,St as T,T as E,V as D,Vt as le,Z as O,_ as ue,_t as k,b as A,bt as j,c as de,d as fe,f as M,g as N,h as P,j as F,k as pe,l as I,m as L,p as R,q as me,s as he,u as z,v as B,w as ge,x as V,xt as H,y as U,zt as W}from"./index-CIFtOFkp.js";import{t as G}from"./opener-DWhHPoCL.js";var K={name:`calendar-check`,size:24,node:[[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`m9 15 2 2 4-4`,key:`1grp1n`}]]};K.node;var _e=t(K),q=r(e(),1),J=n(),ve={completed:x.success,opened_for_review:x.review,started:x.progress,worked_on:x.progress,planned:x.neutral},Y=i(`shrink-0 rounded-full px-2 py-0.5 text-xs font-medium`,S.neutral),ye=[{kind:`week`,label:`Week`},{kind:`month`,label:`Month`},{kind:`quarter`,label:`Quarter`},{kind:`year`,label:`Year`},{kind:`custom`,label:`Custom`}];function be(e,t,n){let r=URL.createObjectURL(new Blob([t],{type:`${n};charset=utf-8`})),i=document.createElement(`a`);i.href=r,i.download=e,i.click(),URL.revokeObjectURL(r)}function xe({disabled:e,children:t}){let[n,r]=(0,q.useState)(!1),i=(0,q.useRef)(null);return(0,q.useEffect)(()=>{if(!n)return;let e=e=>{i.current?.contains(e.target)||r(!1)},t=e=>e.key===`Escape`&&r(!1);return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[n]),(0,J.jsxs)(`div`,{ref:i,className:`relative`,children:[(0,J.jsxs)(f,{size:`sm`,"aria-haspopup":`menu`,"aria-expanded":n,disabled:e,onClick:()=>r(!n),children:[(0,J.jsx)(W,{}),(0,J.jsx)(`span`,{className:`max-md:sr-only`,children:`Export`})]}),n&&(0,J.jsx)(`div`,{role:`menu`,"aria-label":`Export review`,className:`absolute right-0 z-10 mt-1 flex w-48 flex-col rounded-lg border bg-popover p-1 text-popover-foreground shadow-md`,children:t(()=>r(!1))})]})}function X(e,t){return`${e} ${t}${e===1?``:`s`}`}function Z({onSelect:e,children:t}){return(0,J.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:e,className:`rounded-md px-2 py-1.5 text-left text-sm hover:bg-muted max-md:min-h-11`,children:t})}function Se(){let e=h(),t=l(),[n,r]=(0,q.useState)(!1),[a,o]=(0,q.useState)(``),[s,c]=(0,q.useState)(null),u=typeof Intl.supportedValuesOf==`function`?Intl.supportedValuesOf(`timeZone`):[];async function d(e){c(null);try{await t.mutateAsync(e),r(!1)}catch(e){c(e instanceof Error?e.message:String(e))}}if(!e.data)return null;let{timeZone:p,configured:m}=e.data;return n?(0,J.jsxs)(`form`,{"aria-label":`Review time zone`,className:`flex flex-wrap items-center gap-2 print:hidden`,onSubmit:e=>{e.preventDefault(),d(a)},children:[(0,J.jsx)(`label`,{htmlFor:`review-time-zone`,className:`text-xs`,children:`Time zone for every device`}),(0,J.jsx)(`input`,{id:`review-time-zone`,list:`review-time-zones`,required:!0,className:i(O,`w-56`),value:a,onChange:e=>o(e.target.value)}),(0,J.jsx)(`datalist`,{id:`review-time-zones`,children:u.map(e=>(0,J.jsx)(`option`,{value:e},e))}),(0,J.jsx)(f,{size:`sm`,type:`submit`,disabled:t.isPending,children:`Save`}),m!==null&&(0,J.jsx)(f,{size:`sm`,type:`button`,variant:`outline`,onClick:()=>void d(null),children:`Use the server's`}),(0,J.jsx)(f,{size:`sm`,type:`button`,variant:`ghost`,onClick:()=>r(!1),children:`Cancel`}),s&&(0,J.jsx)(`span`,{role:`alert`,className:`w-full text-xs text-destructive`,children:s})]}):(0,J.jsxs)(`span`,{children:[`Days are in `,p,m===null&&` (the server's time zone)`,`.`,` `,(0,J.jsx)(`button`,{type:`button`,className:`text-primary underline underline-offset-2 hover:no-underline print:hidden`,onClick:()=>{o(m??p),r(!0)},children:`Change time zone`})]})}function Q({onShowTask:e}){let[t,n]=(0,q.useState)(()=>V(`week`,T(Date.now()/1e3))),[r,l]=(0,q.useState)(null),[h,v]=(0,q.useState)(U),[y,b]=(0,q.useState)(null),[x,oe]=(0,q.useState)(null),C=a(t.from,t.to),w=s(),E=o(x),k=c(),M=u(),N=x!==null,P=N?E:C,F=d(),I=m(),L=N?E.data?.workspaces??[]:[...F.data??[],...I.data?.workspaces??[]],R=new Map(L.map(e=>[e.id,e.name])),z=N?E.data&&{period:{kind:E.data.summary.period,from:E.data.summary.from,to:E.data.summary.to},entries:E.data.entries,start:E.data.summary.start,end:E.data.summary.end,timeZone:E.data.summary.timeZone,now:E.data.summary.savedAt}:C.data&&{period:t,entries:C.data.entries,start:C.data.start,end:C.data.end,timeZone:C.data.timeZone,now:Date.now()/1e3},B=z?.period??t,H=z&&fe(z.entries,h),W=pe(z?.entries??[]);h.label!==null&&!W.includes(h.label)&&W.push(h.label);let G=[h.workspaceId===null?`across all workspaces`:`in ${R.get(h.workspaceId)??`workspace ${h.workspaceId}`}`,h.label!==null&&`labelled ${h.label}`].filter(Boolean).join(`, `),K=ne[B.kind];function Q(e){l(null),n(e)}function $(e){l(null),b(null),oe(e)}async function Oe(){try{let e=await k.mutateAsync({period:t.kind,from:t.from,to:t.kind===`custom`?t.to:null,workspaceId:h.workspaceId,label:h.label,title:null});l(`Saved "${e.title}" with ${X(e.entryCount,`task`)}; reopen it from Saved reviews.`)}catch(e){l(`Could not save the review: ${e instanceof Error?e.message:String(e)}`)}}async function ke(e){try{await M.mutateAsync(e),$(null),l(`Deleted the saved review.`)}catch(e){l(`Could not delete the saved review: ${e instanceof Error?e.message:String(e)}`)}}function Ae(e){e!==t.kind&&Q(e===`custom`?{...t,kind:e}:V(e,t.from))}function je(e){return N?E.data?Promise.resolve(e===`csv`?E.data.csv:E.data.markdown):Promise.reject(Error(`the saved review is still loading`)):p(ee.reviewReport({period:t.kind,date:null,from:t.from,to:t.kind===`custom`?t.to:null,format:e,timeZone:null,workspaceId:h.workspaceId,label:h.label}))}async function Me(){try{let e=je(`markdown`);if(typeof ClipboardItem>`u`)await navigator.clipboard.writeText((await e).contents);else{let t=e.then(({contents:e})=>new Blob([e],{type:`text/plain`}));await navigator.clipboard.write([new ClipboardItem({"text/plain":t})])}l(`Copied as Markdown.`)}catch(e){l(`Could not copy: ${String(e)}`)}}async function Ne(e){try{let t=await je(e);be(t.fileName,t.contents,t.mediaType),l(`Downloaded ${t.fileName}`)}catch(e){l(`Could not export: ${String(e)}`)}}return(0,J.jsxs)(`section`,{"aria-labelledby":`review-heading`,className:`flex flex-col gap-4`,children:[(0,J.jsxs)(`header`,{className:`flex flex-col gap-1`,children:[(0,J.jsx)(`h2`,{id:`review-heading`,className:`text-xl font-semibold tracking-tight`,children:N&&E.data?E.data.summary.title:ge[B.kind]}),(0,J.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Work recorded from `,B.from,` to `,B.to,` `,G,`.`,` `,N?E.data&&(0,J.jsxs)(`span`,{children:[`Saved `,re(E.data.summary.savedAt),`, with days in `,E.data.summary.timeZone,`; it stays as it was when saved.`]}):(0,J.jsx)(Se,{})]})]}),(N||(w.data?.length??0)>0)&&(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 print:hidden`,children:[(0,J.jsxs)(`select`,{"aria-label":`Saved reviews`,className:i(`h-8 w-full min-w-0 rounded-lg border border-input bg-background px-2.5 text-sm outline-none max-md:h-11 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,`w-auto max-md:min-w-0 max-md:flex-1`),value:x??``,onChange:e=>$(e.target.value===``?null:Number(e.target.value)),children:[(0,J.jsx)(`option`,{value:``,children:`Live review`}),w.data?.map(e=>(0,J.jsxs)(`option`,{value:e.id,children:[e.title,` (saved `,T(e.savedAt),`)`]},e.id))]}),x!==null&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(f,{size:`sm`,variant:`outline`,onClick:()=>$(null),children:`Back to the live review`}),(0,J.jsx)(f,{size:`sm`,variant:`ghost`,disabled:M.isPending,onClick:()=>void ke(x),children:`Delete saved review`})]})]}),(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 print:hidden`,children:[!N&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`div`,{role:`group`,"aria-label":`Review period`,className:`flex rounded-md border p-0.5 max-md:w-full`,children:ye.map(({kind:e,label:n})=>(0,J.jsx)(f,{size:`sm`,variant:t.kind===e?`default`:`ghost`,"aria-pressed":t.kind===e,onClick:()=>Ae(e),children:n},e))}),t.kind===`week`&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`label`,{htmlFor:`week-start`,className:`text-xs text-muted-foreground max-md:sr-only`,children:`Week starting`}),(0,J.jsx)(`input`,{id:`week-start`,type:`date`,required:!0,className:i(`h-8 w-full min-w-0 rounded-lg border border-input bg-background px-2.5 text-sm outline-none max-md:h-11 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,`w-40 max-md:w-0 max-md:min-w-0 max-md:flex-1`),value:t.from,onChange:e=>e.target.value&&Q(ae(e.target.value))})]}),t.kind===`custom`&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`label`,{htmlFor:`review-from`,className:`text-xs text-muted-foreground max-md:sr-only`,children:`From`}),(0,J.jsx)(`input`,{id:`review-from`,type:`date`,required:!0,max:t.to,className:i(`h-8 w-full min-w-0 rounded-lg border border-input bg-background px-2.5 text-sm outline-none max-md:h-11 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,`w-40`),value:t.from,onChange:e=>e.target.value&&e.target.value<=t.to&&Q({...t,from:e.target.value})}),(0,J.jsx)(`label`,{htmlFor:`review-to`,className:`text-xs text-muted-foreground max-md:sr-only`,children:`To`}),(0,J.jsx)(`input`,{id:`review-to`,type:`date`,required:!0,min:t.from,className:i(`h-8 w-full min-w-0 rounded-lg border border-input bg-background px-2.5 text-sm outline-none max-md:h-11 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,`w-40`),value:t.to,onChange:e=>e.target.value&&e.target.value>=t.from&&Q({...t,to:e.target.value})})]}),t.kind!==`week`&&t.kind!==`custom`&&(0,J.jsx)(`span`,{className:`px-1 text-sm font-medium`,children:ce(t)}),(0,J.jsx)(f,{size:`icon-sm`,variant:`outline`,"aria-label":`Previous ${K}`,title:`Previous ${K}`,onClick:()=>Q(g(t,-1)),children:(0,J.jsx)(te,{})}),(0,J.jsx)(f,{size:`icon-sm`,variant:`outline`,"aria-label":`Next ${K}`,title:`Next ${K}`,onClick:()=>Q(g(t,1)),children:(0,J.jsx)(le,{})}),t.kind!==`custom`&&(0,J.jsxs)(f,{size:`sm`,variant:`ghost`,onClick:()=>Q(V(t.kind,T(Date.now()/1e3))),children:[(0,J.jsx)(_e,{className:`md:hidden`,"aria-hidden":!0}),(0,J.jsxs)(`span`,{className:`max-md:sr-only`,children:[`This `,K]})]})]}),(0,J.jsx)(`div`,{className:`ml-auto`,children:(0,J.jsx)(xe,{disabled:!H,children:e=>(0,J.jsxs)(J.Fragment,{children:[!N&&(0,J.jsx)(Z,{onSelect:()=>{e(),Oe()},children:`Save as snapshot`}),(0,J.jsx)(Z,{onSelect:()=>{e(),Me()},children:`Copy as Markdown`}),(0,J.jsx)(Z,{onSelect:()=>{e(),Ne(`markdown`)},children:`Save as Markdown`}),(0,J.jsx)(Z,{onSelect:()=>{e(),Ne(`csv`)},children:`Save as CSV`}),(0,J.jsx)(Z,{onSelect:()=>{e(),window.print()},children:`Print or save as PDF`})]})})})]}),(0,J.jsxs)(`div`,{role:`group`,"aria-label":`Review filters`,className:`flex flex-wrap items-center gap-2 print:hidden`,children:[(0,J.jsxs)(`select`,{"aria-label":`Workspace`,className:i(O,`w-auto max-md:min-w-0 max-md:flex-1`),value:h.workspaceId??``,onChange:e=>v({...h,workspaceId:e.target.value===``?null:Number(e.target.value)}),children:[(0,J.jsx)(`option`,{value:``,children:`All workspaces`}),L.map(e=>(0,J.jsx)(`option`,{value:e.id,children:e.name},e.id))]}),(0,J.jsxs)(`select`,{"aria-label":`Label`,className:i(O,`w-auto max-md:min-w-0 max-md:flex-1`),value:h.label??``,onChange:e=>v({...h,label:e.target.value===``?null:e.target.value}),children:[(0,J.jsx)(`option`,{value:``,children:W.length===0?`No labels in this period`:`Any label`}),W.map(e=>(0,J.jsx)(`option`,{value:e,children:e},e))]}),(h.workspaceId!==null||h.label!==null)&&(0,J.jsx)(f,{size:`sm`,variant:`ghost`,onClick:()=>v(U),children:`Clear filters`})]}),r&&(0,J.jsx)(`p`,{role:`status`,className:`text-xs text-muted-foreground print:hidden`,children:r}),(0,J.jsx)(`p`,{role:`status`,className:i(`text-sm text-muted-foreground`,!P.isPending&&`sr-only`),children:P.isPending?`Loading the review...`:H?`Showing ${H.length} ${H.length===1?`task`:`tasks`} with activity in this ${K}.`:``}),P.isError&&(0,J.jsxs)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:[`Failed to load the review: `,P.error.message]}),H?.length===0&&(0,J.jsx)(he,{title:z?.entries.length===0?`No recorded activity in this ${K}.`:`No recorded activity in this ${K} matches the filters.`,hint:N?`This saved review keeps the tasks it had when it was saved.`:z?.entries.length===0?`Toodo records each task as it is planned, started, moved to review, and completed, so reviews fill up as you work.`:`Pick another period or change the filters to look at other work.`,action:N?void 0:(0,J.jsx)(`div`,{className:`flex flex-wrap justify-center gap-2 print:hidden`,children:(0,J.jsxs)(f,{size:`sm`,variant:`outline`,onClick:()=>Q(g(t,-1)),children:[`Show the `,K,` before`]})})}),z&&H&&H.length>0&&(0,J.jsx)(De,{shown:z,entries:H,workspaces:L}),z&&H&&(0,J.jsx)(Ee,{shown:z,entries:H,editable:!N}),B.kind===`year`&&H&&(0,J.jsx)(Te,{entries:H}),H&&ue(H).map(t=>(0,J.jsxs)(`section`,{"aria-label":A[t.outcome],className:`flex flex-col gap-2`,children:[(0,J.jsxs)(`h3`,{className:i(`text-sm font-semibold`,ve[t.outcome]),children:[A[t.outcome],` `,(0,J.jsxs)(`span`,{className:`font-normal text-muted-foreground`,children:[`(`,t.entries.length,`)`]})]}),(0,J.jsx)(`ul`,{className:`flex flex-col divide-y rounded-lg border`,children:t.entries.map(({task:t,at:n,commits:r,archived:a,pullRequest:o})=>(0,J.jsxs)(`li`,{className:`flex flex-col gap-1 px-3 py-2`,children:[(0,J.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,J.jsx)(D,{type:t.taskType}),(0,J.jsxs)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:[`#`,t.id]}),(0,J.jsx)(`button`,{type:`button`,"aria-label":`Open #${t.id} ${t.title}`,title:t.title,onClick:()=>e?.(t.id),className:`min-w-0 flex-1 truncate text-left text-sm font-medium hover:underline max-md:min-h-11`,children:t.title}),t.resolution===`not_adopted`&&(0,J.jsx)(`span`,{className:Y,children:`Not adopted`}),a&&(0,J.jsx)(`span`,{className:Y,children:`Archived`}),t.resolution===`completed`&&(0,J.jsx)(`span`,{className:i(`shrink-0 rounded-full px-2 py-0.5 text-xs font-medium`,S.success),children:`Completed`}),_(t)&&(0,J.jsx)(we,{url:_(t),stats:o}),(0,J.jsxs)(`span`,{className:`shrink-0 text-xs text-muted-foreground max-md:hidden print:inline`,children:[R.get(t.workspaceId)??`Workspace ${t.workspaceId}`,` · `,(0,J.jsx)(j,{at:n})]})]}),(0,J.jsx)(me,{task:t}),a||N?null:y?.id===t.id?(0,J.jsx)(se,{task:t,focusPlan:y.field,onDone:()=>b(null)}):(0,J.jsx)(`p`,{className:`text-xs text-muted-foreground empty:hidden print:hidden`,children:(0,J.jsx)(ie,{task:t,onEdit:e=>b({id:t.id,field:e})})}),t.completionNote&&(0,J.jsx)(`p`,{"aria-label":`Completion note of #${t.id}`,className:`whitespace-pre-line break-words-keep text-xs`,children:t.completionNote}),z&&(0,J.jsx)(Ce,{task:t,shown:z}),r.length>0&&(0,J.jsx)(`ul`,{"aria-label":`Commits of #${t.id} this ${K}`,className:`flex flex-col gap-0.5`,children:r.map(e=>(0,J.jsxs)(`li`,{className:`flex gap-2 text-xs`,title:e.author,children:[(0,J.jsx)(`code`,{className:`shrink-0 text-muted-foreground`,children:e.sha.slice(0,7)}),(0,J.jsx)(`span`,{className:`truncate`,children:de(e.message)})]},e.sha))})]},t.id))})]},t.outcome))]})}function $(e){return e===0?`0h`:L(e)}function Ce({task:e,shown:t}){let{start:n,end:r,now:i}=t,a=H(e.timeline,i),o=b(e.timeline,i);if(a===null||o===null)return null;let s=v(e.timeline).filter(e=>e.state===`paused`&&e.start<r&&(e.end??i)>n);return(0,J.jsxs)(`div`,{"aria-label":`Time of #${e.id}`,className:`flex flex-col gap-0.5 text-xs text-muted-foreground`,children:[(0,J.jsxs)(`p`,{children:[$(a),` active, `,$(o),` waiting`]}),s.length>0&&(0,J.jsx)(`ul`,{"aria-label":`Waits of #${e.id}`,className:`flex flex-col gap-0.5`,children:s.map(e=>(0,J.jsxs)(`li`,{className:`break-words-keep`,children:[`Waiting `,$(Math.max((e.end??i)-e.start,0)),` from `,T(e.start),e.end===null&&`, still waiting`,`: `,e.reason??`no reason recorded`]},e.start))})]})}function we({url:e,stats:t}){let n=y(e),r=t=>{t.preventDefault(),G(e).catch(t=>console.error(`Failed to open ${e}`,t))};return(0,J.jsx)(`a`,{href:e,title:t?`${e} \u00b7 ${C(t)}`:e,"aria-label":n?`Pull request #${n}`:`Pull request`,onClick:r,onAuxClick:r,className:`shrink-0 text-xs text-primary underline underline-offset-2 hover:no-underline max-md:inline-flex max-md:min-h-11 max-md:items-center`,children:n?`#${n}`:`PR`})}function Te({entries:e}){let t=oe(e);return t===null?null:(0,J.jsxs)(`section`,{"aria-labelledby":`year-in-review-heading`,className:`flex flex-col gap-3 rounded-lg border p-3`,children:[(0,J.jsx)(`h3`,{id:`year-in-review-heading`,className:`text-sm font-semibold`,children:`Year in review`}),t.pullRequests&&(0,J.jsxs)(`dl`,{className:`flex flex-wrap gap-x-6 gap-y-2`,children:[(0,J.jsxs)(`div`,{className:`flex flex-col`,children:[(0,J.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Merged pull requests`}),(0,J.jsx)(`dd`,{className:`text-lg font-semibold`,children:t.pullRequests.pullRequests})]}),(0,J.jsxs)(`div`,{className:`flex flex-col`,children:[(0,J.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Lines changed`}),(0,J.jsxs)(`dd`,{className:`text-lg font-semibold`,children:[(0,J.jsxs)(`span`,{children:[`+`,t.pullRequests.additions]}),(0,J.jsx)(`span`,{className:`text-muted-foreground`,children:` / `}),(0,J.jsxs)(`span`,{children:[`-`,t.pullRequests.deletions]})]})]}),(0,J.jsxs)(`div`,{className:`flex flex-col`,children:[(0,J.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Files changed`}),(0,J.jsx)(`dd`,{className:`text-lg font-semibold`,children:t.pullRequests.changedFiles})]}),(0,J.jsxs)(`div`,{className:`flex flex-col`,children:[(0,J.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Reviews`}),(0,J.jsxs)(`dd`,{className:`text-lg font-semibold`,title:N(t.pullRequests),children:[t.pullRequests.reviews,(0,J.jsxs)(`span`,{className:`ml-1 text-xs font-normal text-muted-foreground`,children:[`on `,t.pullRequests.reviewed,` of `,t.pullRequests.pullRequests]})]})]})]}),t.largest.length>0&&(0,J.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,J.jsx)(`h4`,{className:`text-xs text-muted-foreground`,children:`Largest pull requests`}),(0,J.jsx)(`ol`,{"aria-label":`Largest pull requests`,className:`flex flex-col gap-1`,children:t.largest.map(({task:e,pullRequest:t})=>(0,J.jsxs)(`li`,{className:`flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 text-sm`,children:[(0,J.jsx)(D,{type:e.taskType}),(0,J.jsx)(`span`,{className:`truncate font-medium`,children:e.title}),(0,J.jsx)(`span`,{className:`ml-auto shrink-0 text-xs text-muted-foreground`,children:C(t)})]},e.id))})]}),t.research.length>0&&(0,J.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,J.jsx)(`h4`,{className:`text-xs text-muted-foreground`,children:`Research conclusions`}),(0,J.jsx)(`ul`,{"aria-label":`Research conclusions`,className:`flex flex-col divide-y rounded-md border`,children:t.research.map(({task:e,at:t,adopted:n})=>(0,J.jsxs)(`li`,{className:`flex flex-col gap-1 px-2 py-1.5`,children:[(0,J.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 text-sm`,children:[(0,J.jsx)(`span`,{className:`truncate font-medium`,children:e.title}),(0,J.jsx)(`span`,{className:i(`shrink-0 rounded-full px-2 py-0.5 text-xs font-medium`,n?S.success:S.neutral),children:n?`Adopted`:`Not adopted`}),(0,J.jsx)(j,{className:`ml-auto shrink-0 text-xs text-muted-foreground`,at:t})]}),(0,J.jsx)(`p`,{"aria-label":`Research conclusion of #${e.id}`,className:`whitespace-pre-line break-words-keep text-xs`,children:e.completionNote??(0,J.jsx)(`span`,{className:`text-muted-foreground`,children:`No conclusion written.`})})]},e.id))})]}),t.overruns.length>0&&(0,J.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,J.jsx)(`h4`,{className:`text-xs text-muted-foreground`,children:`Largest estimate overruns`}),(0,J.jsx)(`ol`,{"aria-label":`Largest estimate overruns`,className:`flex flex-col gap-1`,children:t.overruns.map(({task:e,estimated:t,actual:n})=>(0,J.jsxs)(`li`,{className:`flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 text-sm`,children:[(0,J.jsx)(D,{type:e.taskType}),(0,J.jsx)(`span`,{className:`truncate font-medium`,children:e.title}),(0,J.jsxs)(`span`,{className:`ml-auto shrink-0 text-xs text-muted-foreground`,children:[`estimated `,L(t),`, `,L(n),` active`]})]},e.id))})]})]})}function Ee({shown:e,entries:t,editable:n}){let r=E(e.end,t,e.now),a=n?t.filter(({archived:e})=>!e).map(({task:e})=>k(e)):[],o=a.filter(e=>e.includes(`estimate`)).length,s=a.filter(e=>e.includes(`dueDate`)).length;if(r===null&&o+s===0)return null;let c=(0,J.jsxs)(`div`,{className:`contents`,children:[(0,J.jsx)(`dt`,{className:`text-muted-foreground`,children:`Missing plan`}),(0,J.jsxs)(`dd`,{children:[[o>0&&`${X(o,`task`)} without an estimate`,s>0&&`${X(s,`task`)} without a due date`].filter(Boolean).join(`, `),`; add them from the marks on the tasks below`]})]});return(0,J.jsxs)(`section`,{"aria-labelledby":`plan-heading`,className:`flex flex-col gap-3 rounded-lg border p-3`,children:[(0,J.jsx)(`h3`,{id:`plan-heading`,className:`text-sm font-semibold`,children:`Plan vs actual`}),r===null?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`p`,{className:`text-sm`,children:`No reviewed task has an estimate or a due date, so there is nothing to compare yet.`}),(0,J.jsx)(`dl`,{className:`grid gap-x-4 gap-y-1 text-sm sm:grid-cols-[auto_1fr]`,children:c})]}):(0,J.jsxs)(`dl`,{className:`grid gap-x-4 gap-y-1 text-sm sm:grid-cols-[auto_1fr]`,children:[(0,J.jsxs)(`div`,{className:`contents`,children:[(0,J.jsx)(`dt`,{className:`text-muted-foreground`,children:`Estimate vs active time`}),(0,J.jsx)(`dd`,{children:r.time?P(r.time):`No completed task had an estimate`})]}),(0,J.jsxs)(`div`,{className:`contents`,children:[(0,J.jsx)(`dt`,{className:`text-muted-foreground`,children:`Due dates met`}),(0,J.jsx)(`dd`,{children:r.dueDates?R(r.dueDates):`No completed task had a due date`})]}),o+s>0&&c]}),r!==null&&r.late.length>0&&(0,J.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,J.jsx)(`h4`,{className:`text-xs text-muted-foreground`,children:`Late tasks`}),(0,J.jsx)(`ul`,{"aria-label":`Late tasks`,className:`flex flex-col gap-1`,children:r.late.map(e=>(0,J.jsxs)(`li`,{className:`flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 text-sm`,children:[(0,J.jsxs)(`span`,{className:`flex min-w-0 max-w-full items-center gap-2`,children:[(0,J.jsx)(D,{type:e.task.taskType}),(0,J.jsx)(`span`,{className:`truncate font-medium`,children:e.task.title})]}),(0,J.jsx)(`span`,{className:i(`ml-auto shrink-0 text-xs`,x.danger),children:B(e)})]},e.task.id))})]})]})}function De({shown:e,entries:t,workspaces:n}){let r=F(e.period,t,n,e.timeZone),a=Math.max(1,...(r.completedPerMonth??[]).map(({count:e})=>e));return(0,J.jsxs)(`section`,{"aria-label":`Summary`,className:`flex flex-col gap-3 rounded-lg border p-3`,children:[(0,J.jsxs)(`dl`,{className:`flex flex-wrap gap-x-6 gap-y-2`,children:[r.outcomes.map(({outcome:e,count:t})=>(0,J.jsxs)(`div`,{className:`flex flex-col`,children:[(0,J.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:A[e]}),(0,J.jsx)(`dd`,{className:`text-lg font-semibold`,children:t})]},e)),r.notAdopted>0&&(0,J.jsxs)(`div`,{className:`flex flex-col`,children:[(0,J.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Not adopted`}),(0,J.jsx)(`dd`,{className:`text-lg font-semibold`,children:r.notAdopted})]}),(0,J.jsxs)(`div`,{className:`flex flex-col`,children:[(0,J.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Commits`}),(0,J.jsx)(`dd`,{className:`text-lg font-semibold`,children:r.commits})]})]}),(0,J.jsxs)(`dl`,{className:`grid gap-x-4 gap-y-1 text-sm sm:grid-cols-[auto_1fr]`,children:[I.map(e=>{let t=r[e];return(0,J.jsxs)(`div`,{className:`contents`,children:[(0,J.jsx)(`dt`,{className:`text-muted-foreground`,children:z[e]}),(0,J.jsx)(`dd`,{children:t===null?`No data`:`${L(t.median)} (${t.tasks} ${t.tasks===1?`task`:`tasks`})`})]},e)}),r.changes&&(0,J.jsxs)(`div`,{className:`contents`,children:[(0,J.jsx)(`dt`,{className:`text-muted-foreground`,children:`Changes in completed pull requests`}),(0,J.jsx)(`dd`,{children:M(r.changes)})]}),r.completedByType.length>0&&(0,J.jsxs)(`div`,{className:`contents`,children:[(0,J.jsx)(`dt`,{className:`text-muted-foreground`,children:`Completed by type`}),(0,J.jsx)(`dd`,{children:r.completedByType.map(({taskType:e,count:t})=>`${e} ${t}`).join(`, `)})]}),r.completedByWorkspace.length>0&&(0,J.jsxs)(`div`,{className:`contents`,children:[(0,J.jsx)(`dt`,{className:`text-muted-foreground`,children:`Completed by workspace`}),(0,J.jsx)(`dd`,{children:r.completedByWorkspace.map(({workspace:e,count:t})=>`${e} ${t}`).join(`, `)})]})]}),r.completedPerMonth&&(0,J.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,J.jsx)(`h3`,{className:`text-xs text-muted-foreground`,children:`Completed per month`}),(0,J.jsx)(`ul`,{"aria-label":`Completed per month`,className:`flex flex-col gap-0.5`,children:r.completedPerMonth.map(({month:e,count:t})=>(0,J.jsxs)(`li`,{className:`flex items-center gap-2 text-xs`,children:[(0,J.jsx)(`span`,{className:`w-16 shrink-0 font-mono text-muted-foreground`,children:e}),(0,J.jsx)(`span`,{"aria-hidden":!0,className:i(`h-2 rounded-sm`,w.success),style:{width:`${t/a*60}%`,minWidth:t>0?4:0}}),(0,J.jsx)(`span`,{children:t})]},e))})]})]})}export{Q as Review};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,r as t,s as n}from"./dist-ZmB2kPfR.js";import{mt as r}from"./queries-JuIQKikB.js";import{a as i,f as a,l as o,p as s}from"./event-CHxdkAIB.js";import{Z as c,a as l,i as u,n as d,o as f,r as p}from"./index-CIFtOFkp.js";var m=n(e(),1),h=t();function g({children:e}){let t=(0,m.useSyncExternalStore)(s,o),[n,r]=(0,m.useState)(!1);return(0,m.useEffect)(()=>{if(t)return;let e=!0;return i().catch(e=>console.warn(`toodo: could not ask the server about Cloudflare Access`,e)).finally(()=>{e&&r(!0)}),()=>{e=!1,r(!1)}},[t]),t?e:n?(0,h.jsx)(_,{}):null}function _(){let[e,t]=(0,m.useState)(``),[n,i]=(0,m.useState)(()=>l(navigator.userAgent)),[o,s]=(0,m.useState)(d.scope),[g,_]=(0,m.useState)(String(d.expiresInDays)),[v,y]=(0,m.useState)(null),[b,x]=(0,m.useState)(!1),[S,C]=(0,m.useState)(!1),w=(0,m.useRef)(null),T=(0,m.useId)(),E=`${T}-help`,D=`${T}-rejected`;async function O(t){t.preventDefault(),C(!0),y(null),x(!1);try{let t=g===`never`?null:Number(g);a(await f(e.trim(),n.trim(),{scope:o,expiresInDays:t}))}catch(e){e instanceof u?(x(!0),w.current?.focus(),w.current?.select()):e instanceof TypeError?y(`Could not reach the server: ${String(e)}`):y(e instanceof Error?e.message:String(e))}finally{C(!1)}}return(0,h.jsx)(`main`,{className:`flex min-h-svh flex-col items-center justify-center gap-4 p-6`,children:(0,h.jsxs)(`form`,{onSubmit:O,"aria-label":`Server access`,className:`flex w-full max-w-sm flex-col gap-3 rounded-lg border p-5`,children:[(0,h.jsx)(`h1`,{className:`text-lg font-semibold`,children:`Toodo server`}),(0,h.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Sign in with the server's access token. This browser then gets a token of its own, which you can revoke under Devices.`}),(0,h.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,h.jsx)(`label`,{htmlFor:`${T}-token`,className:`text-xs text-muted-foreground`,children:`Access token`}),(0,h.jsx)(`input`,{ref:w,id:`${T}-token`,className:`${c} aria-invalid:border-destructive`,type:`password`,autoComplete:`current-password`,value:e,onChange:e=>{t(e.target.value),x(!1)},"aria-invalid":b||void 0,"aria-describedby":b?`${D} ${E}`:E,required:!0}),b&&(0,h.jsxs)(`p`,{id:D,role:`alert`,className:`text-xs text-destructive`,children:[`The server did not accept this token. Paste the whole contents of`,` `,(0,h.jsx)(`code`,{className:`text-xs`,children:`web-token`}),` again; a device token stops working once it is revoked.`]}),(0,h.jsxs)(`p`,{id:E,className:`text-xs text-muted-foreground`,children:[`Copy it from `,(0,h.jsx)(`code`,{className:`text-xs`,children:`web-token`}),` in the server's data directory.`]})]}),(0,h.jsxs)(`label`,{className:`flex flex-col gap-1 text-xs text-muted-foreground`,children:[`Device name`,(0,h.jsx)(`input`,{className:c,maxLength:80,value:n,onChange:e=>i(e.target.value),"aria-describedby":`${T}-name-help`,required:!0})]}),(0,h.jsx)(`p`,{id:`${T}-name-help`,className:`-mt-2 text-xs text-muted-foreground`,children:`Signing in again under a device's name replaces that device, so give each browser its own name.`}),(0,h.jsxs)(`div`,{className:`grid grid-cols-2 gap-2`,children:[(0,h.jsxs)(`label`,{className:`flex flex-col gap-1 text-xs text-muted-foreground`,children:[`Access`,(0,h.jsxs)(`select`,{className:c,value:o,onChange:e=>s(e.target.value),children:[(0,h.jsx)(`option`,{value:`full`,children:`Full access`}),(0,h.jsx)(`option`,{value:`read`,children:`Read-only`})]})]}),(0,h.jsxs)(`label`,{className:`flex flex-col gap-1 text-xs text-muted-foreground`,children:[`Token expires after`,(0,h.jsx)(`select`,{className:c,value:g,onChange:e=>_(e.target.value),children:p.map(({label:e,days:t})=>(0,h.jsx)(`option`,{value:t===null?`never`:String(t),children:e},e))})]})]}),(0,h.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Applies when you sign in with `,(0,h.jsx)(`code`,{className:`text-xs`,children:`web-token`}),`. When the token expires, sign in again.`]}),v&&(0,h.jsx)(`p`,{role:`alert`,className:`text-xs text-destructive`,children:v}),(0,h.jsx)(r,{type:`submit`,disabled:S||!e.trim()||!n.trim(),children:S?`Checking...`:`Continue`})]})})}export{g as ServerAccess};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as e,n as t,r as n,s as r,t as i}from"./dist-ZmB2kPfR.js";import{E as a,X as o,a as s,et as c,j as l,mt as u,q as d,u as f}from"./queries-DQ2qKkj-.js";import{Ct as p,F as m,G as h,Ht as g,I as _,It as v,J as y,L as b,Lt as x,Nt as S,R as C,Tt as w,U as T,W as E,X as D,Y as O,bt as k,gt as ee,q as te,wt as ne,z as re}from"./index-CKxNxMCO.js";import{t as A}from"./opener-DWhHPoCL.js";import{t as j}from"./details-sheet-BJf5WBDy.js";var M={name:`circle-check`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`check-circle-2`]};M.node;var N=t(M),P={name:`circle-x`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]],aliases:[`x-circle`]};P.node;var F=t(P),I={name:`circle`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]};I.node;var L=t(I),R=r(e(),1),z=n();function B({onClose:e,children:t}){let n=(0,R.useRef)(null),[r,i]=(0,R.useState)(!1);function a(){n.current?.querySelector(`form[data-dirty]`)?i(!0):e()}return(0,R.useEffect)(()=>{function e(e){e.key!==`Escape`||e.defaultPrevented||document.querySelector(`[role=menu]`)||(r?i(!1):e.target instanceof HTMLElement&&e.target.closest(`input, textarea, select`)||a())}return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)}),(0,z.jsx)(j,{ref:n,width:`min(480px, max(360px, 40vw), calc(100vw - 32px))`,onClose:a,banner:r&&(0,z.jsxs)(`div`,{role:`group`,"aria-label":`Unsaved changes`,className:`flex shrink-0 flex-wrap items-center gap-2 border-b bg-muted px-4 py-2 text-xs`,children:[(0,z.jsx)(`span`,{className:`min-w-0 flex-1`,children:`Discard your unsaved changes?`}),(0,z.jsx)(u,{size:`xs`,variant:`outline`,autoFocus:!0,onClick:()=>i(!1),children:`Keep editing`}),(0,z.jsx)(u,{size:`xs`,variant:`destructive`,onClick:e,children:`Discard changes`})]}),children:t})}function V(e){switch(e.status){case`in_progress`:return`Started`;case`in_review`:return`In review`;case`done`:return`Completed`;case`planned`:return e.reopened?`Reopened`:`Paused`}}function H({task:e}){let t=e.timeline.filter(e=>e.reason!==null);return t.length===0?null:(0,z.jsx)(`ol`,{"aria-label":`Reasons of #${e.id}`,className:`mt-1 flex flex-col gap-0.5`,children:t.map((e,t)=>(0,z.jsxs)(`li`,{className:`flex min-w-0 items-baseline gap-2 max-md:flex-wrap max-md:gap-y-0`,children:[(0,z.jsx)(k,{className:`shrink-0 text-muted-foreground`,at:e.at}),(0,z.jsx)(`span`,{className:`shrink-0 font-medium`,children:V(e)}),(0,z.jsx)(`span`,{className:`min-w-0 whitespace-pre-line break-words-keep max-md:basis-full`,children:e.reason})]},t))})}var U={lane:`Lane`,discord:`Discord`,pr:`PR`};function W({value:e}){if(/^https?:\/\//i.test(e)){let t=t=>{t.preventDefault(),A(e).catch(t=>console.error(`Failed to open ${e}`,t))};return(0,z.jsx)(`a`,{href:e,onClick:t,onAuxClick:t,className:`min-w-0 break-all text-primary underline underline-offset-2 hover:no-underline`,children:e})}let t=e.indexOf(`:`),n=t>0?U[e.slice(0,t)]:void 0;return n===void 0?(0,z.jsx)(`code`,{className:`min-w-0 break-all`,children:e}):(0,z.jsxs)(`span`,{className:`flex min-w-0 items-baseline gap-1`,children:[(0,z.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:n}),(0,z.jsx)(`code`,{className:`min-w-0 break-all`,children:e.slice(t+1)})]})}function G({task:e}){return e.refs.length===0?null:(0,z.jsx)(T,{label:`Refs`,children:(0,z.jsx)(`ul`,{"aria-label":`Refs of #${e.id}`,className:`flex flex-col gap-0.5`,children:e.refs.map(e=>(0,z.jsx)(`li`,{className:`flex min-w-0`,children:(0,z.jsx)(W,{value:e})},e))})})}function K({task:e,detailed:t}){let n=w(e.milestones);return n.length===0?null:t?(0,z.jsxs)(T,{label:`Timeline`,children:[(0,z.jsx)(`dl`,{"aria-label":`Timeline of #${e.id}`,className:`grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5`,children:n.map(({label:e,at:t})=>(0,z.jsxs)(`div`,{className:`contents`,children:[(0,z.jsx)(`dt`,{className:`text-muted-foreground`,children:e}),(0,z.jsx)(`dd`,{children:(0,z.jsx)(k,{at:t})})]},e))}),(0,z.jsx)(H,{task:e})]}):(0,z.jsx)(`p`,{"aria-label":`Timeline of #${e.id}`,className:`flex flex-wrap gap-x-2 text-xs text-muted-foreground`,children:n.map(({label:e,at:t})=>(0,z.jsx)(k,{at:t,prefix:`${e} `},e))})}function q({task:e,tasks:t,context:n,navigation:r}){let a=d(),o=s(),c=l(),u=(a.data??[]).flatMap(({taskId:t,relatedId:n})=>t===e.id?[n]:n===e.id?[t]:[]).filter(e=>n.byId.has(e)),f=t.filter(t=>t.id!==e.id&&!u.includes(t.id)),p=[...new Set([e.workspaceId,...f.map(e=>e.workspaceId)])].map(e=>({workspaceId:e,tasks:f.filter(t=>t.workspaceId===e)})).filter(e=>e.tasks.length>0),m=O(),h=o.isPending||c.isPending||m,g=o.error??c.error;if(u.length===0&&p.length===0)return null;let _=p.length>0&&(0,z.jsxs)(`select`,{"aria-label":`Add related task to #${e.id}`,className:i(`h-6 rounded-md border border-input bg-background px-1.5 text-xs outline-none max-md:h-11 max-md:px-2.5 max-md:text-sm focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50`,`max-w-48`),value:``,disabled:h,onChange:t=>{t.target.value&&o.mutate({taskId:e.id,relatedId:Number(t.target.value)})},children:[(0,z.jsx)(`option`,{value:``,children:`Add related task...`}),p.map(e=>(0,z.jsx)(`optgroup`,{label:n.workspaceName(e.workspaceId),children:e.tasks.map(e=>(0,z.jsxs)(`option`,{value:e.id,children:[`#`,e.id,` `,e.title]},e.id))},e.workspaceId))]}),v=g&&(0,z.jsx)(`p`,{role:`alert`,className:`text-destructive`,children:g.message});return u.length===0?(0,z.jsxs)(`div`,{className:`flex flex-col gap-1 text-xs`,children:[_,v]}):(0,z.jsxs)(T,{label:`Related`,children:[(0,z.jsxs)(`ul`,{"aria-label":`Related tasks of #${e.id}`,className:`flex flex-wrap items-center gap-1 max-md:gap-2`,children:[u.map(t=>{let i=n.byId.get(t),a=y(t,e.workspaceId,n);return(0,z.jsxs)(`li`,{className:`inline-flex h-6 min-w-0 items-center rounded-md border max-md:h-11 max-md:gap-2 max-md:border-0`,children:[(0,z.jsxs)(`button`,{type:`button`,"aria-label":`Open related task ${a}`,title:i?.title,className:`h-full min-w-0 max-w-56 truncate rounded-l-md px-1.5 tabular-nums hover:bg-muted max-md:rounded-md max-md:border max-md:px-3 disabled:cursor-default disabled:hover:bg-transparent`,disabled:r===void 0||!r.canOpen(t),onClick:()=>r?.open(t),children:[a,` `,i?.title]}),(0,z.jsx)(`button`,{type:`button`,"aria-label":`Remove related task #${t} from #${e.id}`,title:`Remove related task`,className:`flex h-full items-center justify-center rounded-r-md p-1 text-muted-foreground hover:bg-muted max-md:w-11 max-md:rounded-md max-md:border hover:text-foreground disabled:opacity-50`,disabled:h,onClick:()=>c.mutate({taskId:e.id,relatedId:t}),children:(0,z.jsx)(x,{className:`size-3`})})]},t)}),_]}),v]})}function J({task:e}){let t=o();return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(u,{size:`xs`,variant:`outline`,changesData:!0,"aria-pressed":e.autopilot,"aria-label":`Autopilot of #${e.id}`,title:e.autopilot?`Marked for autopilot: an executor may take it up on its own once it is ready. Click to clear.`:`Not marked for autopilot. Click to let an executor take it up on its own once it is ready.`,disabled:t.isPending,onClick:()=>t.mutate({status:null,id:e.id,taskType:e.taskType,title:e.title,description:e.description,estimate:e.estimate,dueDate:e.dueDate,autopilot:!e.autopilot,criteria:null}),className:i(`shrink-0`,e.autopilot&&S.info),children:[(0,z.jsx)(g,{"aria-hidden":!0}),e.autopilot?`Autopilot on`:`Autopilot off`]}),t.error&&(0,z.jsx)(`span`,{role:`alert`,className:`text-xs text-destructive`,children:t.error.message})]})}function Y({task:e}){let t=c(),n=a(),r=O(),o=t.data??[];return o.length<2?null:(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`select`,{"aria-label":`Workspace of #${e.id}`,title:`Move the task to another workspace; its history, notes, criteria, refs, and links stay`,className:i(D,`max-w-40`),value:e.workspaceId,disabled:n.isPending||r,onChange:t=>n.mutate({id:e.id,workspaceId:Number(t.target.value)}),children:o.map(e=>(0,z.jsx)(`option`,{value:e.id,children:e.name},e.id))}),n.error&&(0,z.jsx)(`span`,{role:`alert`,className:`text-xs text-destructive`,children:n.error.message})]})}function ie({task:e}){return(0,z.jsxs)(z.Fragment,{children:[(e.estimate!==null||e.dueDate!==null)&&(0,z.jsxs)(`p`,{"aria-label":`Plan of #${e.id}`,className:`flex flex-wrap gap-x-2 text-xs text-muted-foreground`,children:[e.estimate!==null&&(0,z.jsxs)(`span`,{children:[`Estimate `,ee(e.estimate)]}),e.dueDate!==null&&(0,z.jsx)(E,{task:e})]}),(0,z.jsx)(te,{task:e}),(0,z.jsx)(G,{task:e})]})}var ae={progress:`Progress`,blocker:`Blocker`,decision:`Decision`},oe={progress:`neutral`,blocker:`attention`,decision:`info`};function X({kind:e}){return(0,z.jsx)(`span`,{"data-note-kind":e,className:i(`shrink-0 rounded-md px-1.5 font-medium`,S[oe[e]]),children:ae[e]})}function se({task:e,detailed:t}){let n=e.notes;if(n.length===0)return null;if(!t){let t=n[n.length-1];return(0,z.jsxs)(`p`,{"aria-label":`Latest note of #${e.id}`,className:`flex min-w-0 items-center gap-1.5 text-xs`,title:p(t.at),children:[(0,z.jsx)(X,{kind:t.kind}),(0,z.jsx)(`span`,{className:`min-w-0 truncate text-muted-foreground`,children:re(t.body)}),n.length>1&&(0,z.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:`+${n.length-1} more`})]})}return(0,z.jsx)(T,{label:`Notes (${n.length})`,children:(0,z.jsx)(`ol`,{"aria-label":`Notes of #${e.id}`,className:`flex flex-col gap-2`,children:n.map((e,t)=>(0,z.jsxs)(`li`,{className:`flex flex-col gap-0.5`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,z.jsx)(X,{kind:e.kind}),(0,z.jsx)(k,{className:`text-muted-foreground`,at:e.at})]}),(0,z.jsx)(R.Suspense,{fallback:(0,z.jsx)(`p`,{className:`whitespace-pre-line break-words-keep`,children:e.body}),children:(0,z.jsx)(h,{source:e.body})})]},t))})})}var ce={pending:`Pending`,met:`Met`,failed:`Failed`},Z={pending:v.neutral,met:v.success,failed:v.danger},Q={user:`you`,agent:`an agent`,toodo:`Toodo`};function $({state:e}){let t=e===`met`?N:e===`failed`?F:L;return(0,z.jsx)(`span`,{role:`img`,"aria-label":ce[e],className:i(`flex size-4 shrink-0 items-center justify-center`,Z[e]),children:(0,z.jsx)(t,{"aria-hidden":!0,className:`size-3.5`})})}function le(e){if(e.checkedBy===null)return null;let t=e.checkedAt===null?``:` ${ne(e.checkedAt)}`;return`Checked by ${Q[e.checkedBy]}${t}`}function ue({task:e,detailed:t}){let n=e.criteria;if(n.length===0)return null;let r=(0,z.jsx)(`ul`,{"aria-label":`Criteria of #${e.id}`,className:`flex flex-col gap-0.5`,children:n.map(n=>(0,z.jsx)(de,{task:e,criterion:n,detailed:t},n.id))});if(!t)return r;let i=n.filter(e=>e.state===`met`).length;return(0,z.jsx)(T,{label:`Criteria (${i} of ${n.length} met)`,children:r})}function de({task:e,criterion:t,detailed:n}){let r=f(),a=O(),[o,s]=(0,R.useState)(!1),[c,l]=(0,R.useState)(``),d=t.kind===`manual`&&e.status!==`done`,p=le(t),h=_(t.kind)?t.target:null;function g(){s(!1),l(``)}let y=C(c.trim()!==``,g,r.isPending);function x(n){o?g():n?(r.reset(),s(!0)):r.mutate({taskId:e.id,criterionId:t.id,met:!1,evidence:null})}function S(n){n.preventDefault(),r.mutate({taskId:e.id,criterionId:t.id,met:!0,evidence:c.trim()||null},{onSuccess:g})}return(0,z.jsxs)(`li`,{"data-criterion-state":t.state,className:`flex min-w-0 flex-col gap-0.5 text-xs`,children:[(0,z.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,title:n?void 0:[p,t.evidence,h].filter(Boolean).join(`
|
|
1
|
+
import{i as e,n as t,r as n,s as r,t as i}from"./dist-ZmB2kPfR.js";import{E as a,X as o,a as s,et as c,j as l,mt as u,q as d,u as f}from"./queries-JuIQKikB.js";import{Ct as p,F as m,G as h,Ht as g,I as _,It as v,J as y,L as b,Lt as x,Nt as S,R as C,Tt as w,U as T,W as E,X as D,Y as O,bt as k,gt as ee,q as te,wt as ne,z as re}from"./index-CIFtOFkp.js";import{t as A}from"./opener-DWhHPoCL.js";import{t as j}from"./details-sheet-jYHiT_Ag.js";var M={name:`circle-check`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`check-circle-2`]};M.node;var N=t(M),P={name:`circle-x`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]],aliases:[`x-circle`]};P.node;var F=t(P),I={name:`circle`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]};I.node;var L=t(I),R=r(e(),1),z=n();function B({onClose:e,children:t}){let n=(0,R.useRef)(null),[r,i]=(0,R.useState)(!1);function a(){n.current?.querySelector(`form[data-dirty]`)?i(!0):e()}return(0,R.useEffect)(()=>{function e(e){e.key!==`Escape`||e.defaultPrevented||document.querySelector(`[role=menu]`)||(r?i(!1):e.target instanceof HTMLElement&&e.target.closest(`input, textarea, select`)||a())}return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)}),(0,z.jsx)(j,{ref:n,width:`min(480px, max(360px, 40vw), calc(100vw - 32px))`,onClose:a,banner:r&&(0,z.jsxs)(`div`,{role:`group`,"aria-label":`Unsaved changes`,className:`flex shrink-0 flex-wrap items-center gap-2 border-b bg-muted px-4 py-2 text-xs`,children:[(0,z.jsx)(`span`,{className:`min-w-0 flex-1`,children:`Discard your unsaved changes?`}),(0,z.jsx)(u,{size:`xs`,variant:`outline`,autoFocus:!0,onClick:()=>i(!1),children:`Keep editing`}),(0,z.jsx)(u,{size:`xs`,variant:`destructive`,onClick:e,children:`Discard changes`})]}),children:t})}function V(e){switch(e.status){case`in_progress`:return`Started`;case`in_review`:return`In review`;case`done`:return`Completed`;case`planned`:return e.reopened?`Reopened`:`Paused`}}function H({task:e}){let t=e.timeline.filter(e=>e.reason!==null);return t.length===0?null:(0,z.jsx)(`ol`,{"aria-label":`Reasons of #${e.id}`,className:`mt-1 flex flex-col gap-0.5`,children:t.map((e,t)=>(0,z.jsxs)(`li`,{className:`flex min-w-0 items-baseline gap-2 max-md:flex-wrap max-md:gap-y-0`,children:[(0,z.jsx)(k,{className:`shrink-0 text-muted-foreground`,at:e.at}),(0,z.jsx)(`span`,{className:`shrink-0 font-medium`,children:V(e)}),(0,z.jsx)(`span`,{className:`min-w-0 whitespace-pre-line break-words-keep max-md:basis-full`,children:e.reason})]},t))})}var U={lane:`Lane`,discord:`Discord`,pr:`PR`};function W({value:e}){if(/^https?:\/\//i.test(e)){let t=t=>{t.preventDefault(),A(e).catch(t=>console.error(`Failed to open ${e}`,t))};return(0,z.jsx)(`a`,{href:e,onClick:t,onAuxClick:t,className:`min-w-0 break-all text-primary underline underline-offset-2 hover:no-underline`,children:e})}let t=e.indexOf(`:`),n=t>0?U[e.slice(0,t)]:void 0;return n===void 0?(0,z.jsx)(`code`,{className:`min-w-0 break-all`,children:e}):(0,z.jsxs)(`span`,{className:`flex min-w-0 items-baseline gap-1`,children:[(0,z.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:n}),(0,z.jsx)(`code`,{className:`min-w-0 break-all`,children:e.slice(t+1)})]})}function G({task:e}){return e.refs.length===0?null:(0,z.jsx)(T,{label:`Refs`,children:(0,z.jsx)(`ul`,{"aria-label":`Refs of #${e.id}`,className:`flex flex-col gap-0.5`,children:e.refs.map(e=>(0,z.jsx)(`li`,{className:`flex min-w-0`,children:(0,z.jsx)(W,{value:e})},e))})})}function K({task:e,detailed:t}){let n=w(e.milestones);return n.length===0?null:t?(0,z.jsxs)(T,{label:`Timeline`,children:[(0,z.jsx)(`dl`,{"aria-label":`Timeline of #${e.id}`,className:`grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5`,children:n.map(({label:e,at:t})=>(0,z.jsxs)(`div`,{className:`contents`,children:[(0,z.jsx)(`dt`,{className:`text-muted-foreground`,children:e}),(0,z.jsx)(`dd`,{children:(0,z.jsx)(k,{at:t})})]},e))}),(0,z.jsx)(H,{task:e})]}):(0,z.jsx)(`p`,{"aria-label":`Timeline of #${e.id}`,className:`flex flex-wrap gap-x-2 text-xs text-muted-foreground`,children:n.map(({label:e,at:t})=>(0,z.jsx)(k,{at:t,prefix:`${e} `},e))})}function q({task:e,tasks:t,context:n,navigation:r}){let a=d(),o=s(),c=l(),u=(a.data??[]).flatMap(({taskId:t,relatedId:n})=>t===e.id?[n]:n===e.id?[t]:[]).filter(e=>n.byId.has(e)),f=t.filter(t=>t.id!==e.id&&!u.includes(t.id)),p=[...new Set([e.workspaceId,...f.map(e=>e.workspaceId)])].map(e=>({workspaceId:e,tasks:f.filter(t=>t.workspaceId===e)})).filter(e=>e.tasks.length>0),m=O(),h=o.isPending||c.isPending||m,g=o.error??c.error;if(u.length===0&&p.length===0)return null;let _=p.length>0&&(0,z.jsxs)(`select`,{"aria-label":`Add related task to #${e.id}`,className:i(`h-6 rounded-md border border-input bg-background px-1.5 text-xs outline-none max-md:h-11 max-md:px-2.5 max-md:text-sm focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50`,`max-w-48`),value:``,disabled:h,onChange:t=>{t.target.value&&o.mutate({taskId:e.id,relatedId:Number(t.target.value)})},children:[(0,z.jsx)(`option`,{value:``,children:`Add related task...`}),p.map(e=>(0,z.jsx)(`optgroup`,{label:n.workspaceName(e.workspaceId),children:e.tasks.map(e=>(0,z.jsxs)(`option`,{value:e.id,children:[`#`,e.id,` `,e.title]},e.id))},e.workspaceId))]}),v=g&&(0,z.jsx)(`p`,{role:`alert`,className:`text-destructive`,children:g.message});return u.length===0?(0,z.jsxs)(`div`,{className:`flex flex-col gap-1 text-xs`,children:[_,v]}):(0,z.jsxs)(T,{label:`Related`,children:[(0,z.jsxs)(`ul`,{"aria-label":`Related tasks of #${e.id}`,className:`flex flex-wrap items-center gap-1 max-md:gap-2`,children:[u.map(t=>{let i=n.byId.get(t),a=y(t,e.workspaceId,n);return(0,z.jsxs)(`li`,{className:`inline-flex h-6 min-w-0 items-center rounded-md border max-md:h-11 max-md:gap-2 max-md:border-0`,children:[(0,z.jsxs)(`button`,{type:`button`,"aria-label":`Open related task ${a}`,title:i?.title,className:`h-full min-w-0 max-w-56 truncate rounded-l-md px-1.5 tabular-nums hover:bg-muted max-md:rounded-md max-md:border max-md:px-3 disabled:cursor-default disabled:hover:bg-transparent`,disabled:r===void 0||!r.canOpen(t),onClick:()=>r?.open(t),children:[a,` `,i?.title]}),(0,z.jsx)(`button`,{type:`button`,"aria-label":`Remove related task #${t} from #${e.id}`,title:`Remove related task`,className:`flex h-full items-center justify-center rounded-r-md p-1 text-muted-foreground hover:bg-muted max-md:w-11 max-md:rounded-md max-md:border hover:text-foreground disabled:opacity-50`,disabled:h,onClick:()=>c.mutate({taskId:e.id,relatedId:t}),children:(0,z.jsx)(x,{className:`size-3`})})]},t)}),_]}),v]})}function J({task:e}){let t=o();return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(u,{size:`xs`,variant:`outline`,changesData:!0,"aria-pressed":e.autopilot,"aria-label":`Autopilot of #${e.id}`,title:e.autopilot?`Marked for autopilot: an executor may take it up on its own once it is ready. Click to clear.`:`Not marked for autopilot. Click to let an executor take it up on its own once it is ready.`,disabled:t.isPending,onClick:()=>t.mutate({status:null,id:e.id,taskType:e.taskType,title:e.title,description:e.description,estimate:e.estimate,dueDate:e.dueDate,autopilot:!e.autopilot,criteria:null}),className:i(`shrink-0`,e.autopilot&&S.info),children:[(0,z.jsx)(g,{"aria-hidden":!0}),e.autopilot?`Autopilot on`:`Autopilot off`]}),t.error&&(0,z.jsx)(`span`,{role:`alert`,className:`text-xs text-destructive`,children:t.error.message})]})}function Y({task:e}){let t=c(),n=a(),r=O(),o=t.data??[];return o.length<2?null:(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`select`,{"aria-label":`Workspace of #${e.id}`,title:`Move the task to another workspace; its history, notes, criteria, refs, and links stay`,className:i(D,`max-w-40`),value:e.workspaceId,disabled:n.isPending||r,onChange:t=>n.mutate({id:e.id,workspaceId:Number(t.target.value)}),children:o.map(e=>(0,z.jsx)(`option`,{value:e.id,children:e.name},e.id))}),n.error&&(0,z.jsx)(`span`,{role:`alert`,className:`text-xs text-destructive`,children:n.error.message})]})}function ie({task:e}){return(0,z.jsxs)(z.Fragment,{children:[(e.estimate!==null||e.dueDate!==null)&&(0,z.jsxs)(`p`,{"aria-label":`Plan of #${e.id}`,className:`flex flex-wrap gap-x-2 text-xs text-muted-foreground`,children:[e.estimate!==null&&(0,z.jsxs)(`span`,{children:[`Estimate `,ee(e.estimate)]}),e.dueDate!==null&&(0,z.jsx)(E,{task:e})]}),(0,z.jsx)(te,{task:e}),(0,z.jsx)(G,{task:e})]})}var ae={progress:`Progress`,blocker:`Blocker`,decision:`Decision`},oe={progress:`neutral`,blocker:`attention`,decision:`info`};function X({kind:e}){return(0,z.jsx)(`span`,{"data-note-kind":e,className:i(`shrink-0 rounded-md px-1.5 font-medium`,S[oe[e]]),children:ae[e]})}function se({task:e,detailed:t}){let n=e.notes;if(n.length===0)return null;if(!t){let t=n[n.length-1];return(0,z.jsxs)(`p`,{"aria-label":`Latest note of #${e.id}`,className:`flex min-w-0 items-center gap-1.5 text-xs`,title:p(t.at),children:[(0,z.jsx)(X,{kind:t.kind}),(0,z.jsx)(`span`,{className:`min-w-0 truncate text-muted-foreground`,children:re(t.body)}),n.length>1&&(0,z.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:`+${n.length-1} more`})]})}return(0,z.jsx)(T,{label:`Notes (${n.length})`,children:(0,z.jsx)(`ol`,{"aria-label":`Notes of #${e.id}`,className:`flex flex-col gap-2`,children:n.map((e,t)=>(0,z.jsxs)(`li`,{className:`flex flex-col gap-0.5`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,z.jsx)(X,{kind:e.kind}),(0,z.jsx)(k,{className:`text-muted-foreground`,at:e.at})]}),(0,z.jsx)(R.Suspense,{fallback:(0,z.jsx)(`p`,{className:`whitespace-pre-line break-words-keep`,children:e.body}),children:(0,z.jsx)(h,{source:e.body})})]},t))})})}var ce={pending:`Pending`,met:`Met`,failed:`Failed`},Z={pending:v.neutral,met:v.success,failed:v.danger},Q={user:`you`,agent:`an agent`,toodo:`Toodo`};function $({state:e}){let t=e===`met`?N:e===`failed`?F:L;return(0,z.jsx)(`span`,{role:`img`,"aria-label":ce[e],className:i(`flex size-4 shrink-0 items-center justify-center`,Z[e]),children:(0,z.jsx)(t,{"aria-hidden":!0,className:`size-3.5`})})}function le(e){if(e.checkedBy===null)return null;let t=e.checkedAt===null?``:` ${ne(e.checkedAt)}`;return`Checked by ${Q[e.checkedBy]}${t}`}function ue({task:e,detailed:t}){let n=e.criteria;if(n.length===0)return null;let r=(0,z.jsx)(`ul`,{"aria-label":`Criteria of #${e.id}`,className:`flex flex-col gap-0.5`,children:n.map(n=>(0,z.jsx)(de,{task:e,criterion:n,detailed:t},n.id))});if(!t)return r;let i=n.filter(e=>e.state===`met`).length;return(0,z.jsx)(T,{label:`Criteria (${i} of ${n.length} met)`,children:r})}function de({task:e,criterion:t,detailed:n}){let r=f(),a=O(),[o,s]=(0,R.useState)(!1),[c,l]=(0,R.useState)(``),d=t.kind===`manual`&&e.status!==`done`,p=le(t),h=_(t.kind)?t.target:null;function g(){s(!1),l(``)}let y=C(c.trim()!==``,g,r.isPending);function x(n){o?g():n?(r.reset(),s(!0)):r.mutate({taskId:e.id,criterionId:t.id,met:!1,evidence:null})}function S(n){n.preventDefault(),r.mutate({taskId:e.id,criterionId:t.id,met:!0,evidence:c.trim()||null},{onSuccess:g})}return(0,z.jsxs)(`li`,{"data-criterion-state":t.state,className:`flex min-w-0 flex-col gap-0.5 text-xs`,children:[(0,z.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,title:n?void 0:[p,t.evidence,h].filter(Boolean).join(`
|
|
2
2
|
`)||void 0,children:[d?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`label`,{className:`flex size-4 shrink-0 items-center justify-center max-md:-mx-3.5 max-md:size-11`,children:(0,z.jsx)(`input`,{type:`checkbox`,"aria-label":`Check criterion ${t.id} of #${e.id}`,checked:t.state===`met`||o,disabled:r.isPending||a,onChange:e=>x(e.target.checked)})}),t.state===`failed`&&(0,z.jsx)($,{state:`failed`})]}):(0,z.jsx)($,{state:t.state}),(0,z.jsx)(`span`,{className:i(`min-w-0`,n?`break-words-keep`:`truncate`,t.state===`failed`&&v.danger),children:t.text}),t.kind!==`manual`&&(0,z.jsx)(`span`,{className:`shrink-0 rounded-md bg-muted px-1.5 text-muted-foreground`,children:m[t.kind]}),!n&&t.evidence&&(0,z.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-muted-foreground`,children:t.evidence})]}),n&&h&&(0,z.jsx)(`code`,{className:`ml-5.5 break-all text-muted-foreground`,children:h}),n&&(t.evidence||p)&&(0,z.jsxs)(`p`,{className:`ml-5.5 whitespace-pre-line break-words-keep text-muted-foreground`,children:[t.evidence,t.evidence&&p&&` · `,t.checkedBy!==null&&(0,z.jsxs)(z.Fragment,{children:[`Checked by `,Q[t.checkedBy],t.checkedAt!==null&&(0,z.jsxs)(z.Fragment,{children:[` `,(0,z.jsx)(k,{at:t.checkedAt})]})]})]}),o&&(0,z.jsxs)(`form`,{onSubmit:S,className:`ml-5.5 flex flex-wrap items-center gap-1`,onKeyDown:y.onKeyDown,children:[(0,z.jsx)(`input`,{className:i(`h-8 w-full min-w-0 rounded-lg border border-input bg-background px-2.5 text-sm outline-none max-md:h-11 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,`h-7 flex-1 basis-48`),"aria-label":`Evidence for criterion ${t.id}`,placeholder:`Evidence (optional), e.g. a link or what you checked`,value:c,onChange:e=>l(e.target.value),autoFocus:!0}),y.asking?(0,z.jsx)(b,{label:`Discard evidence for criterion ${t.id}`,question:`Discard the evidence?`,onKeep:y.keep,onDiscard:y.discard}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(u,{type:`submit`,size:`xs`,disabled:r.isPending,children:r.isPending?`Saving...`:`Save`}),(0,z.jsx)(u,{type:`button`,size:`xs`,variant:`ghost`,onClick:y.request,children:`Cancel`})]})]}),r.isError&&(0,z.jsx)(`p`,{role:`alert`,className:`ml-5.5 text-destructive`,children:r.error.message})]})}export{J as AutopilotToggle,q as RelatedTasks,ue as TaskCriteria,B as TaskDetailsSheet,se as TaskNotes,ie as TaskPlan,K as TaskTimeline,Y as TaskWorkspace};
|