From 67488e06a91e94f35e861ff25b6148402673e14e Mon Sep 17 00:00:00 2001 From: Michael Housh Date: Sun, 2 Mar 2025 21:51:52 -0500 Subject: [PATCH] feat: Initial filter pressure drop views, calculations need implemented. --- Public/output.css | 2 +- Sources/ApiController/ApiController.swift | 5 + Sources/Routes/Models/ClimateZone.swift | 10 +- .../Routes/Models/FilterPressureDrop.swift | 62 ++++- Sources/Routes/Models/HVACSystemSize.swift | 2 +- Sources/Routes/SiteRoutes.swift | 66 +++++ Sources/Styleguide/Buttons.swift | 68 +++++ Sources/Styleguide/FormElements.swift | 56 +++- Sources/Styleguide/Note.swift | 15 +- Sources/Styleguide/Row.swift | 34 +++ Sources/Styleguide/VerticalGroup.swift | 25 ++ Sources/ViewController/HomePage.swift | 9 +- Sources/ViewController/Live.swift | 10 + .../Views/AtticVentilation.swift | 1 + Sources/ViewController/Views/Capacitor.swift | 46 +--- .../Views/FilterPressureDrop.swift | 249 ++++++++++++++++++ .../ViewController/Views/RoomPressure.swift | 47 +--- 17 files changed, 610 insertions(+), 97 deletions(-) create mode 100644 Sources/Styleguide/Row.swift create mode 100644 Sources/Styleguide/VerticalGroup.swift create mode 100644 Sources/ViewController/Views/FilterPressureDrop.swift diff --git a/Public/output.css b/Public/output.css index ccc3de0..6edd217 100644 --- a/Public/output.css +++ b/Public/output.css @@ -1,2 +1,2 @@ /*! tailwindcss v4.0.8 | MIT License | https://tailwindcss.com */ -@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-100:oklch(.936 .032 17.717);--color-red-200:oklch(.885 .062 18.334);--color-red-500:oklch(.637 .237 25.331);--color-red-600:oklch(.577 .245 27.325);--color-red-800:oklch(.444 .177 26.899);--color-orange-200:oklch(.901 .076 70.697);--color-orange-500:oklch(.705 .213 47.604);--color-orange-600:oklch(.646 .222 41.116);--color-orange-700:oklch(.553 .195 38.402);--color-amber-100:oklch(.962 .059 95.617);--color-amber-200:oklch(.924 .12 95.746);--color-amber-500:oklch(.769 .188 70.08);--color-yellow-100:oklch(.973 .071 103.193);--color-yellow-300:oklch(.905 .182 98.111);--color-yellow-400:oklch(.852 .199 91.936);--color-yellow-800:oklch(.476 .114 61.907);--color-green-100:oklch(.962 .044 156.743);--color-green-200:oklch(.925 .084 155.995);--color-green-500:oklch(.723 .219 149.579);--color-green-600:oklch(.627 .194 149.214);--color-blue-50:oklch(.97 .014 254.604);--color-blue-100:oklch(.932 .032 255.585);--color-blue-200:oklch(.882 .059 254.128);--color-blue-300:oklch(.809 .105 251.813);--color-blue-400:oklch(.707 .165 254.624);--color-blue-500:oklch(.623 .214 259.815);--color-blue-600:oklch(.546 .245 262.881);--color-blue-700:oklch(.488 .243 264.376);--color-blue-800:oklch(.424 .199 265.638);--color-purple-100:oklch(.946 .033 307.174);--color-purple-600:oklch(.558 .288 302.321);--color-slate-100:oklch(.968 .007 247.896);--color-slate-200:oklch(.929 .013 255.508);--color-slate-300:oklch(.869 .022 252.894);--color-slate-600:oklch(.446 .043 257.281);--color-slate-700:oklch(.372 .044 257.287);--color-gray-100:oklch(.967 .003 264.542);--color-gray-200:oklch(.928 .006 264.531);--color-gray-300:oklch(.872 .01 258.338);--color-gray-400:oklch(.707 .022 261.325);--color-gray-600:oklch(.446 .03 256.802);--color-gray-700:oklch(.373 .034 259.733);--color-gray-800:oklch(.278 .033 256.848);--color-zinc-50:oklch(.985 0 0);--color-zinc-300:oklch(.871 .006 286.286);--color-white:#fff;--spacing:.25rem;--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);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25/1.875);--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--font-weight-light:300;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--ease-in:cubic-bezier(.4,0,1,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-font-feature-settings:var(--font-sans--font-feature-settings);--default-font-variation-settings:var(--font-sans--font-variation-settings);--default-mono-font-family:var(--font-mono);--default-mono-font-feature-settings:var(--font-mono--font-feature-settings);--default-mono-font-variation-settings:var(--font-mono--font-variation-settings)}}@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,ui-sans-serif,system-ui,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}body{line-height:inherit}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;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{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;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}:-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}*,:after,:before,::backdrop{border-color:var(--color-gray-200,currentColor)}::file-selector-button{border-color:var(--color-gray-200,currentColor)}}@layer components;@layer utilities{.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.\!absolute{position:absolute!important}.\!fixed{position:fixed!important}.\!sticky{position:sticky!important}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.top-0{top:calc(var(--spacing)*0)}.top-20{top:calc(var(--spacing)*20)}.top-40{top:calc(var(--spacing)*40)}.right-0{right:calc(var(--spacing)*0)}.bottom-0{bottom:calc(var(--spacing)*0)}.left-10{left:calc(var(--spacing)*10)}.isolate{isolation:isolate}.z-1{z-index:1}.z-2{z-index:2}.z-3{z-index:3}.z-4{z-index:4}.z-6{z-index:6}.z-9{z-index:9}.order-2{order:2}.\!container{width:100%!important}@media (width>=40rem){.\!container{max-width:40rem!important}}@media (width>=48rem){.\!container{max-width:48rem!important}}@media (width>=64rem){.\!container{max-width:64rem!important}}@media (width>=80rem){.\!container{max-width:80rem!important}}@media (width>=96rem){.\!container{max-width:96rem!important}}.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-1{margin:calc(var(--spacing)*1)}.m-2{margin:calc(var(--spacing)*2)}.m-3{margin:calc(var(--spacing)*3)}.m-4{margin:calc(var(--spacing)*4)}.m-5{margin:calc(var(--spacing)*5)}.m-6{margin:calc(var(--spacing)*6)}.m-12{margin:calc(var(--spacing)*12)}.m-81{margin:calc(var(--spacing)*81)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-4{margin-inline:calc(var(--spacing)*4)}.mx-5{margin-inline:calc(var(--spacing)*5)}.mx-8{margin-inline:calc(var(--spacing)*8)}.mx-10{margin-inline:calc(var(--spacing)*10)}.mx-auto{margin-inline:auto}.ms-2{margin-inline-start:calc(var(--spacing)*2)}.ms-4{margin-inline-start:calc(var(--spacing)*4)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-6{margin-top:calc(var(--spacing)*6)}.mt-8{margin-top:calc(var(--spacing)*8)}.mt-10{margin-top:calc(var(--spacing)*10)}.mt-20{margin-top:calc(var(--spacing)*20)}.mt-30{margin-top:calc(var(--spacing)*30)}.mt-40{margin-top:calc(var(--spacing)*40)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.\!block{display:block!important}.\!contents{display:contents!important}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.table{display:table}.table\!{display:table!important}.h-0{height:calc(var(--spacing)*0)}.h-1{height:calc(var(--spacing)*1)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-8{height:calc(var(--spacing)*8)}.h-12{height:calc(var(--spacing)*12)}.h-29{height:calc(var(--spacing)*29)}.h-55{height:calc(var(--spacing)*55)}.min-h-screen{min-height:100vh}.w-0{width:calc(var(--spacing)*0)}.w-1{width:calc(var(--spacing)*1)}.w-2{width:calc(var(--spacing)*2)}.w-3{width:calc(var(--spacing)*3)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-7{width:calc(var(--spacing)*7)}.w-8{width:calc(var(--spacing)*8)}.w-9{width:calc(var(--spacing)*9)}.w-12{width:calc(var(--spacing)*12)}.w-20{width:calc(var(--spacing)*20)}.w-full{width:100%}.shrink{flex-shrink:1}.flex-grow,.grow{flex-grow:1}.transform{transform:var(--tw-rotate-x)var(--tw-rotate-y)var(--tw-rotate-z)var(--tw-skew-x)var(--tw-skew-y)}.resize{resize:both}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.content-center{align-content:center}.content-start{align-content:flex-start}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-items-center{justify-items:center}.justify-items-start{justify-items:start}.justify-items-stretch{justify-items:stretch}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-6{gap:calc(var(--spacing)*6)}.gap-8{gap:calc(var(--spacing)*8)}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}.gap-x-0{column-gap:calc(var(--spacing)*0)}.gap-x-2{column-gap:calc(var(--spacing)*2)}.gap-x-4{column-gap:calc(var(--spacing)*4)}.gap-x-6{column-gap:calc(var(--spacing)*6)}.gap-y-2{row-gap:calc(var(--spacing)*2)}.gap-y-4{row-gap:calc(var(--spacing)*4)}.justify-self-center{justify-self:center}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-s-lg{border-start-start-radius:var(--radius-lg);border-end-start-radius:var(--radius-lg)}.rounded-e-lg{border-start-end-radius:var(--radius-lg);border-end-end-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.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-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-amber-500{border-color:var(--color-amber-500)}.border-blue-500{border-color:var(--color-blue-500)}.border-blue-600{border-color:var(--color-blue-600)}.border-blue-700{border-color:var(--color-blue-700)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-400{border-color:var(--color-gray-400)}.border-green-500{border-color:var(--color-green-500)}.border-green-600{border-color:var(--color-green-600)}.border-orange-500{border-color:var(--color-orange-500)}.border-purple-600{border-color:var(--color-purple-600)}.border-red-500{border-color:var(--color-red-500)}.border-red-600{border-color:var(--color-red-600)}.border-yellow-300{border-color:var(--color-yellow-300)}.border-yellow-400{border-color:var(--color-yellow-400)}.border-yellow-800{border-color:var(--color-yellow-800)}.bg-amber-100{background-color:var(--color-amber-100)}.bg-amber-200{background-color:var(--color-amber-200)}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-200{background-color:var(--color-blue-200)}.bg-blue-300{background-color:var(--color-blue-300)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-600{background-color:var(--color-blue-600)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-700{background-color:var(--color-gray-700)}.bg-green-100{background-color:var(--color-green-100)}.bg-green-200{background-color:var(--color-green-200)}.bg-orange-200{background-color:var(--color-orange-200)}.bg-orange-500{background-color:var(--color-orange-500)}.bg-purple-100{background-color:var(--color-purple-100)}.bg-red-100{background-color:var(--color-red-100)}.bg-red-200{background-color:var(--color-red-200)}.bg-slate-100{background-color:var(--color-slate-100)}.bg-slate-300{background-color:var(--color-slate-300)}.bg-slate-700{background-color:var(--color-slate-700)}.bg-white{background-color:var(--color-white)}.bg-yellow-100{background-color:var(--color-yellow-100)}.bg-yellow-300{background-color:var(--color-yellow-300)}.bg-zinc-50{background-color:var(--color-zinc-50)}.bg-zinc-300{background-color:var(--color-zinc-300)}.p-0{padding:calc(var(--spacing)*0)}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-6{padding:calc(var(--spacing)*6)}.p-7{padding:calc(var(--spacing)*7)}.p-8{padding:calc(var(--spacing)*8)}.p-9{padding:calc(var(--spacing)*9)}.p-12{padding:calc(var(--spacing)*12)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-8{padding-inline:calc(var(--spacing)*8)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.ps-2{padding-inline-start:calc(var(--spacing)*2)}.ps-8{padding-inline-start:calc(var(--spacing)*8)}.ps-9{padding-inline-start:calc(var(--spacing)*9)}.pe-2{padding-inline-end:calc(var(--spacing)*2)}.pe-3{padding-inline-end:calc(var(--spacing)*3)}.pt-6{padding-top:calc(var(--spacing)*6)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pb-6{padding-bottom:calc(var(--spacing)*6)}.pb-8{padding-bottom:calc(var(--spacing)*8)}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.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))}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-extrabold{--tw-font-weight:var(--font-weight-extrabold);font-weight:var(--font-weight-extrabold)}.font-light{--tw-font-weight:var(--font-weight-light);font-weight:var(--font-weight-light)}.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)}.text-amber-500{color:var(--color-amber-500)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-blue-800{color:var(--color-blue-800)}.text-gray-300{color:var(--color-gray-300)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-green-500{color:var(--color-green-500)}.text-green-600{color:var(--color-green-600)}.text-orange-500{color:var(--color-orange-500)}.text-orange-700{color:var(--color-orange-700)}.text-purple-600{color:var(--color-purple-600)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-800{color:var(--color-red-800)}.text-white{color:var(--color-white)}.text-yellow-300{color:var(--color-yellow-300)}.text-yellow-400{color:var(--color-yellow-400)}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.underline{text-decoration-line:underline}.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-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)}.ring{--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)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);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,)}.invert{--tw-invert:invert(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,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter;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))}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.\!\[sswg\:graduated\|104x20\]{sswg:graduated|104x20!important}.\[b\:jo\$�\3 \*�X8I��\]{b:jo$�*�X8I��}.\[k\:\1d �\$��\15 O���\13 2Q�\|\]{k:�$��O���2Q�|}.\[r1\:r0\]{r1:r0}.\[v\:\6 �ì����8\14 F�\]{v:�ì����8F�}@media (hover:hover){.group-hover\:bg-blue-600:is(:where(.group):hover *){background-color:var(--color-blue-600)}.group-hover\:text-blue-600:is(:where(.group):hover *){color:var(--color-blue-600)}}.placeholder-shown\:\!border-gray-400:placeholder-shown{border-color:var(--color-gray-400)!important}.placeholder-shown\:border-gray-300:placeholder-shown{border-color:var(--color-gray-300)}.placeholder-shown\:border-gray-400:placeholder-shown{border-color:var(--color-gray-400)}.invalid\:border-red-500:invalid,.out-of-range\:border-red-500:out-of-range{border-color:var(--color-red-500)}@media (hover:hover){.hover\:border-b:hover{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.hover\:border-yellow-300:hover{border-color:var(--color-yellow-300)}.hover\:bg-blue-300:hover{background-color:var(--color-blue-300)}.hover\:bg-blue-600:hover{background-color:var(--color-blue-600)}.hover\:bg-orange-600:hover{background-color:var(--color-orange-600)}.hover\:bg-yellow-400:hover{background-color:var(--color-yellow-400)}.hover\:text-blue-600:hover{color:var(--color-blue-600)}.hover\:text-white:hover{color:var(--color-white)}.hover\:text-yellow-300:hover{color:var(--color-yellow-300)}.hover\:shadow-xl:hover{--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)}}.focus\:border-yellow-800:focus{border-color:var(--color-yellow-800)}.focus\:ring-2:focus{--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\:ring-yellow-800:focus{--tw-ring-color:var(--color-yellow-800)}@media (hover:hover){.enabled\:hover\:bg-blue-600:enabled:hover{background-color:var(--color-blue-600)}.enabled\:hover\:bg-yellow-400:enabled:hover{background-color:var(--color-yellow-400)}}@media (width>=40rem){.sm\:top-0{top:calc(var(--spacing)*0)}.sm\:top-20{top:calc(var(--spacing)*20)}.sm\:right-0{right:calc(var(--spacing)*0)}.sm\:left-10{left:calc(var(--spacing)*10)}.sm\:grid{display:grid}.sm\:w-1\/2{width:50%}.sm\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:gap-4{gap:calc(var(--spacing)*4)}.sm\:p-4{padding:calc(var(--spacing)*4)}}@media (width>=48rem){.md\:top-0{top:calc(var(--spacing)*0)}.md\:right-0{right:calc(var(--spacing)*0)}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@media (width>=64rem){.lg\:top-0{top:calc(var(--spacing)*0)}.lg\:right-0{right:calc(var(--spacing)*0)}.lg\:mx-20{margin-inline:calc(var(--spacing)*20)}.lg\:flex{display:flex}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.lg\:justify-between{justify-content:space-between}.lg\:gap-x-5{column-gap:calc(var(--spacing)*5)}.lg\:p-8{padding:calc(var(--spacing)*8)}}@media (width>=48rem){@media (width>=64rem){.md\:lg\:top-0{top:calc(var(--spacing)*0)}.md\:lg\:right-0{right:calc(var(--spacing)*0)}}}@media (prefers-color-scheme:dark){.dark\:border-gray-400{border-color:var(--color-gray-400)}.dark\:bg-amber-200{background-color:var(--color-amber-200)}.dark\:bg-blue-300{background-color:var(--color-blue-300)}.dark\:bg-blue-400{background-color:var(--color-blue-400)}.dark\:bg-blue-500{background-color:var(--color-blue-500)}.dark\:bg-blue-600{background-color:var(--color-blue-600)}.dark\:bg-gray-700{background-color:var(--color-gray-700)}.dark\:bg-gray-800{background-color:var(--color-gray-800)}.dark\:bg-slate-600{background-color:var(--color-slate-600)}.dark\:bg-slate-700{background-color:var(--color-slate-700)}.dark\:bg-yellow-300{background-color:var(--color-yellow-300)}.dark\:text-blue-500{color:var(--color-blue-500)}.dark\:text-gray-200{color:var(--color-gray-200)}.dark\:text-slate-200{color:var(--color-slate-200)}.dark\:text-slate-300{color:var(--color-slate-300)}.dark\:text-yellow-300{color:var(--color-yellow-300)}}@media (hover:hover){@media (prefers-color-scheme:dark){.group-hover\:dark\:bg-blue-700:is(:where(.group):hover *){background-color:var(--color-blue-700)}}}@media (prefers-color-scheme:dark){.placeholder-shown\:dark\:border-gray-400:placeholder-shown{border-color:var(--color-gray-400)}}@media (hover:hover){@media (prefers-color-scheme:dark){.hover\:dark\:bg-blue-600:hover{background-color:var(--color-blue-600)}.hover\:dark\:bg-yellow-400:hover{background-color:var(--color-yellow-400)}}}}body{font-family:Helvetica}*{box-sizing:border-box;-ms-box-sizing:border-box}nav a:active{border-color:var(--color-yellow-300);color:var(--color-white)}@property --tw-rotate-x{syntax:"*";inherits:false;initial-value:rotateX(0)}@property --tw-rotate-y{syntax:"*";inherits:false;initial-value:rotateY(0)}@property --tw-rotate-z{syntax:"*";inherits:false;initial-value:rotateZ(0)}@property --tw-skew-x{syntax:"*";inherits:false;initial-value:skewX(0)}@property --tw-skew-y{syntax:"*";inherits:false;initial-value:skewY(0)}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{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-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@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:"";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-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false} \ No newline at end of file +@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-100:oklch(.936 .032 17.717);--color-red-200:oklch(.885 .062 18.334);--color-red-500:oklch(.637 .237 25.331);--color-red-600:oklch(.577 .245 27.325);--color-red-800:oklch(.444 .177 26.899);--color-orange-200:oklch(.901 .076 70.697);--color-orange-500:oklch(.705 .213 47.604);--color-orange-600:oklch(.646 .222 41.116);--color-orange-700:oklch(.553 .195 38.402);--color-amber-100:oklch(.962 .059 95.617);--color-amber-200:oklch(.924 .12 95.746);--color-amber-500:oklch(.769 .188 70.08);--color-yellow-300:oklch(.905 .182 98.111);--color-yellow-400:oklch(.852 .199 91.936);--color-yellow-800:oklch(.476 .114 61.907);--color-green-100:oklch(.962 .044 156.743);--color-green-200:oklch(.925 .084 155.995);--color-green-500:oklch(.723 .219 149.579);--color-green-600:oklch(.627 .194 149.214);--color-blue-50:oklch(.97 .014 254.604);--color-blue-100:oklch(.932 .032 255.585);--color-blue-300:oklch(.809 .105 251.813);--color-blue-400:oklch(.707 .165 254.624);--color-blue-500:oklch(.623 .214 259.815);--color-blue-600:oklch(.546 .245 262.881);--color-blue-700:oklch(.488 .243 264.376);--color-blue-800:oklch(.424 .199 265.638);--color-purple-100:oklch(.946 .033 307.174);--color-purple-600:oklch(.558 .288 302.321);--color-slate-100:oklch(.968 .007 247.896);--color-slate-200:oklch(.929 .013 255.508);--color-slate-300:oklch(.869 .022 252.894);--color-slate-600:oklch(.446 .043 257.281);--color-slate-700:oklch(.372 .044 257.287);--color-gray-100:oklch(.967 .003 264.542);--color-gray-200:oklch(.928 .006 264.531);--color-gray-300:oklch(.872 .01 258.338);--color-gray-400:oklch(.707 .022 261.325);--color-gray-600:oklch(.446 .03 256.802);--color-gray-700:oklch(.373 .034 259.733);--color-gray-800:oklch(.278 .033 256.848);--color-zinc-50:oklch(.985 0 0);--color-zinc-300:oklch(.871 .006 286.286);--color-white:#fff;--spacing:.25rem;--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);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25/1.875);--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--font-weight-light:300;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--ease-in:cubic-bezier(.4,0,1,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-font-feature-settings:var(--font-sans--font-feature-settings);--default-font-variation-settings:var(--font-sans--font-variation-settings);--default-mono-font-family:var(--font-mono);--default-mono-font-feature-settings:var(--font-mono--font-feature-settings);--default-mono-font-variation-settings:var(--font-mono--font-variation-settings)}}@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,ui-sans-serif,system-ui,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}body{line-height:inherit}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;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{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;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}:-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}*,:after,:before,::backdrop{border-color:var(--color-gray-200,currentColor)}::file-selector-button{border-color:var(--color-gray-200,currentColor)}}@layer components;@layer utilities{.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.\!absolute{position:absolute!important}.\!fixed{position:fixed!important}.\!sticky{position:sticky!important}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.right-0{right:calc(var(--spacing)*0)}.bottom-0{bottom:calc(var(--spacing)*0)}.isolate{isolation:isolate}.z-1{z-index:1}.z-2{z-index:2}.z-3{z-index:3}.z-4{z-index:4}.z-6{z-index:6}.order-2{order:2}.\!container{width:100%!important}@media (width>=40rem){.\!container{max-width:40rem!important}}@media (width>=48rem){.\!container{max-width:48rem!important}}@media (width>=64rem){.\!container{max-width:64rem!important}}@media (width>=80rem){.\!container{max-width:80rem!important}}@media (width>=96rem){.\!container{max-width:96rem!important}}.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-1{margin:calc(var(--spacing)*1)}.m-2{margin:calc(var(--spacing)*2)}.m-3{margin:calc(var(--spacing)*3)}.m-4{margin:calc(var(--spacing)*4)}.m-5{margin:calc(var(--spacing)*5)}.m-6{margin:calc(var(--spacing)*6)}.m-12{margin:calc(var(--spacing)*12)}.m-81{margin:calc(var(--spacing)*81)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-5{margin-inline:calc(var(--spacing)*5)}.mx-8{margin-inline:calc(var(--spacing)*8)}.mx-10{margin-inline:calc(var(--spacing)*10)}.mx-auto{margin-inline:auto}.ms-2{margin-inline-start:calc(var(--spacing)*2)}.ms-7{margin-inline-start:calc(var(--spacing)*7)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-6{margin-top:calc(var(--spacing)*6)}.mt-8{margin-top:calc(var(--spacing)*8)}.mt-20{margin-top:calc(var(--spacing)*20)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.\!block{display:block!important}.\!contents{display:contents!important}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.table{display:table}.table\!{display:table!important}.h-0{height:calc(var(--spacing)*0)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-10{height:calc(var(--spacing)*10)}.h-11{height:calc(var(--spacing)*11)}.h-12{height:calc(var(--spacing)*12)}.h-20{height:calc(var(--spacing)*20)}.h-55{height:calc(var(--spacing)*55)}.min-h-10{min-height:calc(var(--spacing)*10)}.min-h-11{min-height:calc(var(--spacing)*11)}.min-h-screen{min-height:100vh}.w-0{width:calc(var(--spacing)*0)}.w-1{width:calc(var(--spacing)*1)}.w-2{width:calc(var(--spacing)*2)}.w-3{width:calc(var(--spacing)*3)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-7{width:calc(var(--spacing)*7)}.w-8{width:calc(var(--spacing)*8)}.w-9{width:calc(var(--spacing)*9)}.w-12{width:calc(var(--spacing)*12)}.w-20{width:calc(var(--spacing)*20)}.w-full{width:100%}.shrink{flex-shrink:1}.grow{flex-grow:1}.transform{transform:var(--tw-rotate-x)var(--tw-rotate-y)var(--tw-rotate-z)var(--tw-skew-x)var(--tw-skew-y)}.resize{resize:both}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.content-center{align-content:center}.content-start{align-content:flex-start}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-items-center{justify-items:center}.justify-items-start{justify-items:start}.justify-items-stretch{justify-items:stretch}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-6{gap:calc(var(--spacing)*6)}.gap-8{gap:calc(var(--spacing)*8)}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}.gap-x-0{column-gap:calc(var(--spacing)*0)}.gap-x-2{column-gap:calc(var(--spacing)*2)}.gap-x-4{column-gap:calc(var(--spacing)*4)}.gap-x-6{column-gap:calc(var(--spacing)*6)}.gap-y-2{row-gap:calc(var(--spacing)*2)}.gap-y-6{row-gap:calc(var(--spacing)*6)}.justify-self-center{justify-self:center}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-s-lg{border-start-start-radius:var(--radius-lg);border-end-start-radius:var(--radius-lg)}.rounded-e-lg{border-start-end-radius:var(--radius-lg);border-end-end-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.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-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-amber-500{border-color:var(--color-amber-500)}.border-blue-500{border-color:var(--color-blue-500)}.border-blue-600{border-color:var(--color-blue-600)}.border-blue-700{border-color:var(--color-blue-700)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-400{border-color:var(--color-gray-400)}.border-green-500{border-color:var(--color-green-500)}.border-green-600{border-color:var(--color-green-600)}.border-orange-500{border-color:var(--color-orange-500)}.border-purple-600{border-color:var(--color-purple-600)}.border-red-500{border-color:var(--color-red-500)}.border-red-600{border-color:var(--color-red-600)}.border-yellow-300{border-color:var(--color-yellow-300)}.border-yellow-800{border-color:var(--color-yellow-800)}.bg-amber-100{background-color:var(--color-amber-100)}.bg-amber-200{background-color:var(--color-amber-200)}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-600{background-color:var(--color-blue-600)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-700{background-color:var(--color-gray-700)}.bg-green-100{background-color:var(--color-green-100)}.bg-green-200{background-color:var(--color-green-200)}.bg-orange-200{background-color:var(--color-orange-200)}.bg-orange-500{background-color:var(--color-orange-500)}.bg-purple-100{background-color:var(--color-purple-100)}.bg-red-100{background-color:var(--color-red-100)}.bg-red-200{background-color:var(--color-red-200)}.bg-slate-100{background-color:var(--color-slate-100)}.bg-slate-300{background-color:var(--color-slate-300)}.bg-slate-700{background-color:var(--color-slate-700)}.bg-white{background-color:var(--color-white)}.bg-yellow-300{background-color:var(--color-yellow-300)}.bg-zinc-50{background-color:var(--color-zinc-50)}.bg-zinc-300{background-color:var(--color-zinc-300)}.p-0{padding:calc(var(--spacing)*0)}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-6{padding:calc(var(--spacing)*6)}.p-7{padding:calc(var(--spacing)*7)}.p-8{padding:calc(var(--spacing)*8)}.p-9{padding:calc(var(--spacing)*9)}.p-12{padding:calc(var(--spacing)*12)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-8{padding-inline:calc(var(--spacing)*8)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.ps-2{padding-inline-start:calc(var(--spacing)*2)}.pe-2{padding-inline-end:calc(var(--spacing)*2)}.pe-3{padding-inline-end:calc(var(--spacing)*3)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pb-6{padding-bottom:calc(var(--spacing)*6)}.pb-8{padding-bottom:calc(var(--spacing)*8)}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.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))}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-extrabold{--tw-font-weight:var(--font-weight-extrabold);font-weight:var(--font-weight-extrabold)}.font-light{--tw-font-weight:var(--font-weight-light);font-weight:var(--font-weight-light)}.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)}.text-amber-500{color:var(--color-amber-500)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-blue-800{color:var(--color-blue-800)}.text-gray-300{color:var(--color-gray-300)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-green-500{color:var(--color-green-500)}.text-green-600{color:var(--color-green-600)}.text-orange-500{color:var(--color-orange-500)}.text-orange-700{color:var(--color-orange-700)}.text-purple-600{color:var(--color-purple-600)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-800{color:var(--color-red-800)}.text-white{color:var(--color-white)}.text-yellow-300{color:var(--color-yellow-300)}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.underline{text-decoration-line:underline}.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-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)}.ring{--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)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);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,)}.invert{--tw-invert:invert(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,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter;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))}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.\!\[sswg\:graduated\|104x20\]{sswg:graduated|104x20!important}.\[b\:jo\$�\3 \*�X8I��\]{b:jo$�*�X8I��}.\[k\:\1d �\$��\15 O���\13 2Q�\|\]{k:�$��O���2Q�|}.\[r1\:r0\]{r1:r0}.\[v\:\6 �ì����8\14 F�\]{v:�ì����8F�}@media (hover:hover){.group-hover\:bg-blue-600:is(:where(.group):hover *){background-color:var(--color-blue-600)}.group-hover\:text-blue-600:is(:where(.group):hover *){color:var(--color-blue-600)}}.placeholder-shown\:\!border-gray-400:placeholder-shown{border-color:var(--color-gray-400)!important}.invalid\:border-red-500:invalid,.out-of-range\:border-red-500:out-of-range{border-color:var(--color-red-500)}@media (hover:hover){.hover\:border-b:hover{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.hover\:border-yellow-300:hover{border-color:var(--color-yellow-300)}.hover\:bg-blue-300:hover{background-color:var(--color-blue-300)}.hover\:bg-blue-600:hover{background-color:var(--color-blue-600)}.hover\:bg-orange-600:hover{background-color:var(--color-orange-600)}.hover\:bg-yellow-400:hover{background-color:var(--color-yellow-400)}.hover\:text-blue-600:hover{color:var(--color-blue-600)}.hover\:text-yellow-300:hover{color:var(--color-yellow-300)}.hover\:shadow-xl:hover{--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)}}.focus\:border-yellow-800:focus{border-color:var(--color-yellow-800)}.focus\:ring-2:focus{--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\:ring-yellow-800:focus{--tw-ring-color:var(--color-yellow-800)}@media (hover:hover){.enabled\:hover\:bg-blue-600:enabled:hover{background-color:var(--color-blue-600)}.enabled\:hover\:bg-yellow-400:enabled:hover{background-color:var(--color-yellow-400)}}@media (width>=40rem){.sm\:mt-6{margin-top:calc(var(--spacing)*6)}.sm\:mb-6{margin-bottom:calc(var(--spacing)*6)}.sm\:grid{display:grid}.sm\:w-1\/2{width:50%}.sm\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.sm\:gap-4{gap:calc(var(--spacing)*4)}:where(.sm\:space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}.sm\:p-4{padding:calc(var(--spacing)*4)}}@media (width>=48rem){.md\:mt-6{margin-top:calc(var(--spacing)*6)}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (width>=64rem){.lg\:mx-20{margin-inline:calc(var(--spacing)*20)}.lg\:mt-0{margin-top:calc(var(--spacing)*0)}.lg\:flex{display:flex}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:justify-between{justify-content:space-between}.lg\:gap-x-5{column-gap:calc(var(--spacing)*5)}.lg\:p-8{padding:calc(var(--spacing)*8)}}@media (prefers-color-scheme:dark){.dark\:border-gray-400{border-color:var(--color-gray-400)}.dark\:bg-amber-200{background-color:var(--color-amber-200)}.dark\:bg-blue-300{background-color:var(--color-blue-300)}.dark\:bg-blue-400{background-color:var(--color-blue-400)}.dark\:bg-blue-500{background-color:var(--color-blue-500)}.dark\:bg-blue-600{background-color:var(--color-blue-600)}.dark\:bg-gray-700{background-color:var(--color-gray-700)}.dark\:bg-gray-800{background-color:var(--color-gray-800)}.dark\:bg-slate-600{background-color:var(--color-slate-600)}.dark\:bg-slate-700{background-color:var(--color-slate-700)}.dark\:bg-yellow-300{background-color:var(--color-yellow-300)}.dark\:text-blue-500{color:var(--color-blue-500)}.dark\:text-gray-200{color:var(--color-gray-200)}.dark\:text-slate-200{color:var(--color-slate-200)}.dark\:text-slate-300{color:var(--color-slate-300)}.dark\:text-yellow-300{color:var(--color-yellow-300)}}@media (hover:hover){@media (prefers-color-scheme:dark){.group-hover\:dark\:bg-blue-700:is(:where(.group):hover *){background-color:var(--color-blue-700)}.hover\:dark\:bg-blue-600:hover{background-color:var(--color-blue-600)}.hover\:dark\:bg-yellow-400:hover{background-color:var(--color-yellow-400)}}}}body{font-family:Helvetica}*{box-sizing:border-box;-ms-box-sizing:border-box}nav a:active{border-color:var(--color-yellow-300);color:var(--color-white)}@property --tw-rotate-x{syntax:"*";inherits:false;initial-value:rotateX(0)}@property --tw-rotate-y{syntax:"*";inherits:false;initial-value:rotateY(0)}@property --tw-rotate-z{syntax:"*";inherits:false;initial-value:rotateZ(0)}@property --tw-skew-x{syntax:"*";inherits:false;initial-value:skewX(0)}@property --tw-skew-y{syntax:"*";inherits:false;initial-value:skewY(0)}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{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-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@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:"";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-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false} \ No newline at end of file diff --git a/Sources/ApiController/ApiController.swift b/Sources/ApiController/ApiController.swift index 698f0b5..4d0fe1c 100644 --- a/Sources/ApiController/ApiController.swift +++ b/Sources/ApiController/ApiController.swift @@ -40,6 +40,11 @@ extension ApiController: DependencyKey { logger.debug("Calculating dehumidifier size: \(request)") return try await request.respond(logger) + case let .calculateFilterPressureDrop(request): + logger.debug("Calculating filter pressure drop: \(request)") + // FIX: + fatalError() + case let .calculateHVACSystemPerformance(request): logger.debug("Calculating hvac system performance: \(request)") return try await request.respond(logger: logger) diff --git a/Sources/Routes/Models/ClimateZone.swift b/Sources/Routes/Models/ClimateZone.swift index 2d9c6cb..c9a2228 100644 --- a/Sources/Routes/Models/ClimateZone.swift +++ b/Sources/Routes/Models/ClimateZone.swift @@ -1,8 +1,10 @@ -public enum ClimateZone: String, Codable, Equatable, Sendable { - case dry +public enum ClimateZone: String, CaseIterable, Codable, Equatable, Sendable { + // NOTE: Keep in this order. + case hotHumid - case marine case moist + case dry + case marine public var zoneIdentifiers: [String] { switch self { @@ -26,6 +28,6 @@ public enum ClimateZone: String, Codable, Equatable, Sendable { } public var label: String { - return "\(rawValue.capitalized) (\(zoneIdentifiers.joined(separator: ",")))" + return "\(self == .hotHumid ? "Hot Humid" : rawValue.capitalized) (\(zoneIdentifiers.joined(separator: ", ")))" } } diff --git a/Sources/Routes/Models/FilterPressureDrop.swift b/Sources/Routes/Models/FilterPressureDrop.swift index 93c7f1e..a7cb59d 100644 --- a/Sources/Routes/Models/FilterPressureDrop.swift +++ b/Sources/Routes/Models/FilterPressureDrop.swift @@ -4,20 +4,25 @@ public enum FilterPressureDrop { Calculate filter pressure drop and sizing based on system requirements. """ + public enum Mode: String, CaseIterable, Codable, Equatable, Sendable { + case basic + case fanLaw + } + public enum Request: Codable, Equatable, Sendable { case basic(Basic) case fanLaw(FanLaw) public struct Basic: Codable, Equatable, Sendable { - let systemSize: HVACSystemSize + let systemSize: Double let climateZone: ClimateZone let filterType: FilterType let filterWidth: Double let filterHeight: Double public init( - systemSize: HVACSystemSize, + systemSize: Double, climateZone: ClimateZone, filterType: FilterPressureDrop.FilterType, filterWidth: Double, @@ -58,22 +63,30 @@ public enum FilterPressureDrop { } } - public enum Result: Codable, Equatable, Sendable { + public enum Response: Codable, Equatable, Sendable { case basic(Basic) case fanLaw(FanLaw) public struct Basic: Codable, Equatable, Sendable { - let filterArea: Double - let feetPerMinute: Double - let initialPressureDrop: Double - let maxPressureDrop: Double + public let filterArea: Double + public let feetPerMinute: Double + public let initialPressureDrop: Double + public let maxPressureDrop: Double + public let warnings: [String] - public init(filterArea: Double, feetPerMinute: Double, initialPressureDrop: Double, maxPressureDrop: Double) { + public init( + filterArea: Double, + feetPerMinute: Double, + initialPressureDrop: Double, + maxPressureDrop: Double, + warnings: [String] + ) { self.filterArea = filterArea self.feetPerMinute = feetPerMinute self.initialPressureDrop = initialPressureDrop self.maxPressureDrop = maxPressureDrop + self.warnings = warnings } } @@ -98,7 +111,7 @@ public enum FilterPressureDrop { } } - public enum FilterType: String, Codable, Equatable, Sendable { + public enum FilterType: String, CaseIterable, Codable, Equatable, Sendable { case fiberglass case pleatedBasic case pleatedBetter @@ -114,3 +127,34 @@ public enum FilterPressureDrop { } } } + +#if DEBUG + public extension FilterPressureDrop.Response { + + static func mock(mode: FilterPressureDrop.Mode) -> Self { + switch mode { + case .basic: + return .basic(.init( + filterArea: 3.47, + feetPerMinute: 230, + initialPressureDrop: 0.2, + maxPressureDrop: 0.15, + warnings: [ + """ + Intial pressure drop is more than 50% of maximum allowable. + Consider using a larger filter or different type with lower intial pressure drop. + """ + ] + )) + case .fanLaw: + return .fanLaw(.init( + predictedPressureDrop: 0.127, + velocityRatio: 1.13, + pressureRatio: 1.27, + faceVelocity: 259 + )) + } + } + + } +#endif diff --git a/Sources/Routes/Models/HVACSystemSize.swift b/Sources/Routes/Models/HVACSystemSize.swift index 540053f..9f48cde 100644 --- a/Sources/Routes/Models/HVACSystemSize.swift +++ b/Sources/Routes/Models/HVACSystemSize.swift @@ -1,4 +1,4 @@ -public enum HVACSystemSize: Double, Codable, Equatable, Sendable { +public enum HVACSystemSize: Double, CaseIterable, Codable, Equatable, Sendable { case one = 1 case oneAndAHalf = 1.5 case two = 2 diff --git a/Sources/Routes/SiteRoutes.swift b/Sources/Routes/SiteRoutes.swift index f56137a..5b70d4b 100644 --- a/Sources/Routes/SiteRoutes.swift +++ b/Sources/Routes/SiteRoutes.swift @@ -13,6 +13,10 @@ public enum SiteRoute: Equatable, Sendable { Route(.case(Self.api)) { Api.router } + Route(.case(Self.health)) { + Path { "health" } + Method.get + } Route(.case(Self.view)) { View.router } @@ -26,6 +30,7 @@ public extension SiteRoute { case calculateAtticVentilation(AtticVentilation.Request) case calculateCapacitor(Capacitor.Request) case calculateDehumidifierSize(DehumidifierSize.Request) + case calculateFilterPressureDrop(FilterPressureDrop.Request) case calculateHVACSystemPerformance(HVACSystemPerformance.Request) case calculateMoldRisk(MoldRisk.Request) case calculateRoomPressure(RoomPressure.Request) @@ -53,6 +58,16 @@ public extension SiteRoute { Method.post Body(.json(DehumidifierSize.Request.self)) } + Route(.case(Self.calculateFilterPressureDrop)) { + Path { "api"; "v1"; "calculateFilterPressureDrop" } + Method.post + OneOf { + Body(.json(FilterPressureDrop.Request.Basic.self)) + .map(.case(FilterPressureDrop.Request.basic)) + Body(.json(FilterPressureDrop.Request.FanLaw.self)) + .map(.case(FilterPressureDrop.Request.fanLaw)) + } + } Route(.case(Self.calculateHVACSystemPerformance)) { Path { "api"; "v1"; "calculateHVACSystemPerformance" } Method.post @@ -84,6 +99,7 @@ public extension SiteRoute { case atticVentilation(AtticVentilation) case capacitor(Capacitor) case dehumidifierSize(DehumidifierSize) + case filterPressureDrop(FilterPressureDrop) case hvacSystemPerformance(HVACSystemPerformance) case moldRisk(MoldRisk) case roomPressure(RoomPressure) @@ -101,6 +117,9 @@ public extension SiteRoute { Route(.case(Self.dehumidifierSize)) { DehumidifierSize.router } + Route(.case(Self.filterPressureDrop)) { + FilterPressureDrop.router + } Route(.case(Self.hvacSystemPerformance)) { HVACSystemPerformance.router } @@ -213,6 +232,53 @@ public extension SiteRoute { } } + public enum FilterPressureDrop: Equatable, Sendable { + case index(mode: Routes.FilterPressureDrop.Mode? = nil) + case submit(Routes.FilterPressureDrop.Request) + + public static let index = Self.index() + + static let rootPath = "filter-pressure-drop" + + public static let router = OneOf { + Route(.case(Self.index)) { + Path { rootPath } + Method.get + Query { + Optionally { Field("mode") { Routes.FilterPressureDrop.Mode.parser() } } + } + } + Route(.case(Self.submit)) { + Path { rootPath } + Method.post + Body { + OneOf { + FormData { + Field("systemSize") { Double.parser() } + Field("climateZone") { ClimateZone.parser() } + Field("filterType") { Routes.FilterPressureDrop.FilterType.parser() } + Field("filterWidth") { Double.parser() } + Field("filterHeight") { Double.parser() } + } + .map(.memberwise(Routes.FilterPressureDrop.Request.Basic.init)) + .map(.case(Routes.FilterPressureDrop.Request.basic)) + + FormData { + Field("filterWidth") { Double.parser() } + Field("filterHeight") { Double.parser() } + Field("filterDepth") { Double.parser() } + Field("ratedAirflow") { Double.parser() } + Field("ratedPressureDrop") { Double.parser() } + Field("designAirflow") { Double.parser() } + } + .map(.memberwise(Routes.FilterPressureDrop.Request.FanLaw.init)) + .map(.case(Routes.FilterPressureDrop.Request.fanLaw)) + } + } + } + } + } + public enum HVACSystemPerformance: Equatable, Sendable { case index case submit(Routes.HVACSystemPerformance.Request) diff --git a/Sources/Styleguide/Buttons.swift b/Sources/Styleguide/Buttons.swift index 1d0be7f..4698ca8 100644 --- a/Sources/Styleguide/Buttons.swift +++ b/Sources/Styleguide/Buttons.swift @@ -1,4 +1,5 @@ import Elementary +import Routes public struct PrimaryButton: HTML, Sendable { let label: String @@ -75,3 +76,70 @@ public struct ResetButton: HTML, Sendable { } } } + +public struct Toggle: HTML { + + let isOn: Bool + + // Left hand side / 'on' label. + let onLabel: String + // Applied to the rhs when the toggle is consider 'off'. + let onAttributes: [HTMLAttribute] + + // Right hand side / 'off' label. + let offLabel: String + // Applied to the left hand side when the toggle is consider 'on'. + let offAttributes: [HTMLAttribute] + + public init( + isOn: Bool, + onLabel: String, + onAttributes: [HTMLAttribute], + offLabel: String, + offAttributes: [HTMLAttribute] + ) { + self.isOn = isOn + self.onLabel = onLabel + self.onAttributes = onAttributes + self.offLabel = offLabel + self.offAttributes = offAttributes + } + + public var content: some HTML { + div(.class("flex items-center gap-x-0")) { + switch isOn { + case true: + SecondaryButton(label: onLabel) + .attributes(.class("rounded-s-lg"), .disabled) + + PrimaryButton(label: offLabel) + .attributes(contentsOf: offAttributes + [.class("rounded-e-lg")]) + + case false: + PrimaryButton(label: onLabel) + .attributes(contentsOf: onAttributes + [.class("rounded-s-lg")]) + + SecondaryButton(label: offLabel) + .attributes(.class("rounded-e-lg"), .disabled) + } + } + } +} + +public extension Array where Element == HTMLAttribute { + + static func hxDefaults( + _ attributes: HTMLAttribute... + ) -> Self { + [ + .hx.target("#content"), + .hx.pushURL(true) + ] + attributes + } + + static func hxDefaults( + get route: SiteRoute.View + ) -> Self { + .hxDefaults(.hx.get(route: route)) + } +} diff --git a/Sources/Styleguide/FormElements.swift b/Sources/Styleguide/FormElements.swift index 4e1f3c4..425335b 100644 --- a/Sources/Styleguide/FormElements.swift +++ b/Sources/Styleguide/FormElements.swift @@ -50,7 +50,7 @@ public struct Input: HTML, Sendable { input( .id(id), .placeholder(placeholder), .name(name ?? id), .class(""" - w-full px-4 py-2 border rounded-md + w-full px-4 py-2 border rounded-md min-h-11 focus:ring-2 focus:ring-yellow-800 focus:border-yellow-800 placeholder-shown:!border-gray-400 invalid:border-red-500 out-of-range:border-red-500 @@ -84,3 +84,57 @@ public struct InputLabel: HTML { } extension InputLabel: Sendable where InputLabel: Sendable {} + +public struct Select: HTML { + + let id: String + let name: String? + let values: [T] + let label: @Sendable (T) -> String + let value: @Sendable (T) -> String + + public init( + id: String, + name: String? = nil, + values: [T], + label: @escaping @Sendable (T) -> String, + value: @escaping @Sendable (T) -> String + ) { + self.id = id + self.name = name + self.values = values + self.label = label + self.value = value + } + + public var content: some HTML { + select( + .id(id), + .name(name ?? id), + .class("w-full rounded-md border px-4 py-2 min-h-11") + ) { + for value in values { + option(.value(self.value(value))) { label(value) } + } + } + } +} + +extension Select: Sendable where T: Sendable {} + +public extension Select where T: CaseIterable, T: RawRepresentable, T.RawValue: CustomStringConvertible { + init( + for type: T.Type, + id: String, + name: String? = nil, + label: @escaping @Sendable (T) -> String + ) { + self.init( + id: id, + name: name, + values: Array(T.allCases), + label: label, + value: { $0.rawValue.description } + ) + } +} diff --git a/Sources/Styleguide/Note.swift b/Sources/Styleguide/Note.swift index 273e036..3020c5b 100644 --- a/Sources/Styleguide/Note.swift +++ b/Sources/Styleguide/Note.swift @@ -10,11 +10,16 @@ public struct Note: HTML, Sendable { } public var content: some HTML { - div(.class("mt-8 p-4 bg-gray-100 dark:bg-gray-700 rounded-md shadow-md border border-blue-500")) { - p(.class("text-sm text-blue-500")) { - span(.class("font-extrabold pe-2")) { label } - text - } + div( + .class( + """ + mt-8 p-4 bg-gray-100 dark:bg-gray-700 rounded-md shadow-md + border border-blue-500 text-blue-500 text-sm + """ + ) + ) { + p(.class("font-extrabold mb-3")) { label } + p(.class("px-6")) { text } } } } diff --git a/Sources/Styleguide/Row.swift b/Sources/Styleguide/Row.swift new file mode 100644 index 0000000..e5823c7 --- /dev/null +++ b/Sources/Styleguide/Row.swift @@ -0,0 +1,34 @@ +import Elementary + +public struct Row: HTML { + + let body: Body + + public init( + @HTMLBuilder body: () -> Body + ) { + self.body = body() + } + + public var content: some HTML { + div(.class("flex justify-between")) { + body + } + } +} + +public extension Row + where Body == _HTMLTuple2, HTMLElement> +{ + init( + label: String, + value: String + ) { + self.init { + span(.class("font-bold")) { label } + span { value } + } + } +} + +extension Row: Sendable where Body: Sendable {} diff --git a/Sources/Styleguide/VerticalGroup.swift b/Sources/Styleguide/VerticalGroup.swift new file mode 100644 index 0000000..2d0cccd --- /dev/null +++ b/Sources/Styleguide/VerticalGroup.swift @@ -0,0 +1,25 @@ +import Elementary + +public struct VerticalGroup: HTML, Sendable { + let label: String + let value: String + let valueLabel: String? + + public init(label: String, value: String, valueLabel: String? = nil) { + self.label = label + self.value = value + self.valueLabel = valueLabel + } + + public var content: some HTML { + div(.class("grid grid-cols-1 justify-items-center")) { + p(.class("font-medium")) { label } + h3(.class("text-3xl font-extrabold")) { + value + if let valueLabel { + span(.class("text-lg ms-2")) { valueLabel } + } + } + } + } +} diff --git a/Sources/ViewController/HomePage.swift b/Sources/ViewController/HomePage.swift index 33ce444..8d43ef1 100644 --- a/Sources/ViewController/HomePage.swift +++ b/Sources/ViewController/HomePage.swift @@ -43,6 +43,12 @@ struct HomePage: HTML, Sendable { svg: .zap, route: .capacitor(.index) ) + group( + label: "Filter Pressure Drop", + description: FilterPressureDrop.description, + svg: .funnel, + route: .filterPressureDrop(.index) + ) } } @@ -53,8 +59,7 @@ struct HomePage: HTML, Sendable { route: SiteRoute.View ) -> some HTML { button( - .hx.get(route: route), - .hx.target("#content"), + .hx.get(route: route), .hx.target("#content"), .hx.pushURL(true), .class(""" w-full rounded-xl shadow-lg border border-blue-600 justify-items-start hover:bg-blue-600 hover:border-yellow-300 hover:text-yellow-300 transition-colors diff --git a/Sources/ViewController/Live.swift b/Sources/ViewController/Live.swift index 9b4d6e6..1da8436 100644 --- a/Sources/ViewController/Live.swift +++ b/Sources/ViewController/Live.swift @@ -100,6 +100,16 @@ extension ViewController: DependencyKey { return DehumidifierSizeResult(response: response) } + case let .filterPressureDrop(route): + switch route { + case let .index(mode: mode): + // FIX: remove response. + return request.respond(FilterPressureDropForm(mode: mode, response: .mock(mode: mode ?? .basic))) + case .submit: + // FIX: implement. + fatalError() + } + case let .hvacSystemPerformance(route): switch route { case .index: diff --git a/Sources/ViewController/Views/AtticVentilation.swift b/Sources/ViewController/Views/AtticVentilation.swift index c9fb67c..a7c5e24 100644 --- a/Sources/ViewController/Views/AtticVentilation.swift +++ b/Sources/ViewController/Views/AtticVentilation.swift @@ -143,6 +143,7 @@ struct AtticVentilationResponse: HTML, Sendable { } } + // TODO: Use Styleguid.VerticalGroup private func group(_ label: String, _ value: String) -> some HTML { div(.class("justify-self-center")) { div(.class("grid grid-cols-1 justify-items-center")) { diff --git a/Sources/ViewController/Views/Capacitor.swift b/Sources/ViewController/Views/Capacitor.swift index 9ea34c8..4cd220d 100644 --- a/Sources/ViewController/Views/Capacitor.swift +++ b/Sources/ViewController/Views/Capacitor.swift @@ -17,42 +17,16 @@ struct CapacitorForm: HTML, Sendable { div(.class("flex flex-wrap justify-between")) { FormHeader(label: "Capacitor Calculator - \(mode.rawValue.capitalized) Capacitor", svg: .zap) // Mode toggle / buttons. - div(.class("flex items-center gap-x-0")) { - switch mode { - case .test: - SecondaryButton(label: "Test Capacitor") - .attributes(.class("rounded-s-lg")) - .attributes(.disabled, when: mode == .test) - .attributes( - .hx.get(route: .capacitor(.index(mode: .test))), - .hx.target("#content"), - when: mode == .size - ) - PrimaryButton(label: "Size Capacitor") - .attributes(.class("rounded-e-lg")) - .attributes( - .hx.get(route: .capacitor(.index(mode: .size))), - .hx.target("#content"), - when: mode == .test - ) - case .size: - PrimaryButton(label: "Test Capacitor") - .attributes(.class("rounded-s-lg")) - .attributes( - .hx.get(route: .capacitor(.index(mode: .test))), - .hx.target("#content"), - when: mode == .size - ) - SecondaryButton(label: "Size Capacitor") - .attributes(.class("rounded-e-lg")) - .attributes(.disabled, when: mode == .size) - .attributes( - .hx.get(route: .capacitor(.index(mode: .size))), - .hx.target("#content"), - when: mode == .test - ) - } - } + + // Mode toggle / buttons. + Toggle( + isOn: mode == .test, + onLabel: "Test Capacitor", + onAttributes: .hxDefaults(get: .capacitor(.index(mode: .test))), + offLabel: "Size Capacitor", + offAttributes: .hxDefaults(get: .capacitor(.index(mode: .size))) + ) + .attributes(.class("mb-6")) } Form(mode: mode).attributes(.class("mt-6")) diff --git a/Sources/ViewController/Views/FilterPressureDrop.swift b/Sources/ViewController/Views/FilterPressureDrop.swift new file mode 100644 index 0000000..5f19210 --- /dev/null +++ b/Sources/ViewController/Views/FilterPressureDrop.swift @@ -0,0 +1,249 @@ +import Elementary +import ElementaryHTMX +import Routes +import Styleguide + +struct FilterPressureDropForm: HTML, Sendable { + let mode: FilterPressureDrop.Mode + let response: FilterPressureDrop.Response? + + init(mode: FilterPressureDrop.Mode? = nil, response: FilterPressureDrop.Response? = nil) { + self.mode = mode ?? .basic + self.response = response + } + + var content: some HTML { + div(.class("flex flex-wrap justify-between")) { + FormHeader(label: "Filter Pressure Drop - \(mode.label)", svg: .funnel) + Toggle( + isOn: mode == .basic, + onLabel: FilterPressureDrop.Mode.basic.label, + onAttributes: .hxDefaults(get: .filterPressureDrop(.index(mode: .basic))), + offLabel: FilterPressureDrop.Mode.fanLaw.label, + offAttributes: .hxDefaults(get: .filterPressureDrop(.index(mode: .fanLaw))) + ) + .attributes(.class("mb-6")) + } + + // FIX: Remove when done. + WarningBox("This is under construction and does not work currently.") + + form( + .hx.post(route: .filterPressureDrop(.index)), + .hx.target("#result") + ) { + div(.class("space-y-6")) { + switch mode { + case .basic: + BasicFormFields() + case .fanLaw: + FanLawFormFields() + } + div { + SubmitButton(label: "Calculate Pressure Drop") + } + } + } + + div(.id("result")) { + if let response { + FilterPressureDropResponse(response: response) + } + } + } + + private struct BasicFormFields: HTML, Sendable { + + var content: some HTML { + div { + div { + h4(.class("text-lg font-bold mb-4")) { "System Parameters" } + div(.class("grid grid-cols-1 lg:grid-cols-3 gap-x-4 space-y-6")) { + LabeledContent(label: "System Size: (Tons)") { + Input(id: "systemSize", placeholder: "Tons") + .attributes(.type(.number), .step("0.5"), .min("1.0"), .autofocus, .required) + } + div { + InputLabel(for: "climateZone") { "Climate Zone" } + Select(for: ClimateZone.self, id: "climateZone") { + $0.label + } + } + div { + InputLabel(for: "filterType") { "Filter Type" } + Select(for: FilterPressureDrop.FilterType.self, id: "filterType") { + $0.label + } + } + } + } + + div(.class("mt-6 lg:mt-0")) { + h4(.class("text-lg font-bold mb-4")) { "Filter Parameters" } + + div(.class("grid grid-cols-1 lg:grid-cols-2 gap-x-4 space-y-6")) { + LabeledContent(label: "Width: (in)") { + Input(id: "filterWidth", placeholder: "Width") + .attributes(.type(.number), .step("0.1"), .min("0.1"), .required) + } + LabeledContent(label: "Height: (in)") { + Input(id: "filterHeight", placeholder: "Height") + .attributes(.type(.number), .step("0.1"), .min("0.1"), .required) + } + } + } + } + } + } + + private struct FanLawFormFields: HTML, Sendable { + + var content: some HTML { + div { + div(.class("mt-6 lg:mt-0")) { + h4(.class("text-lg font-bold mb-4")) { "Filter Parameters" } + div(.class("grid grid-cols-1 lg:grid-cols-3 gap-x-4 space-y-6")) { + LabeledContent(label: "Width: (in)") { + Input(id: "filterWidth", placeholder: "Width") + .attributes(.type(.number), .step("0.1"), .min("0.1"), .required, .autofocus) + } + LabeledContent(label: "Height: (in)") { + Input(id: "filterHeight", placeholder: "Height") + .attributes(.type(.number), .step("0.1"), .min("0.1"), .required) + } + LabeledContent(label: "Depth: (in)") { + Input(id: "filterDepth", placeholder: "Depth") + .attributes(.type(.number), .step("1.0"), .min("1.0"), .required) + } + } + } + div(.class("mt-6 lg:mt-0")) { + h4(.class("text-lg font-bold mb-4")) { "Airflow Parameters" } + div(.class("grid grid-cols-1 lg:grid-cols-3 gap-x-4 space-y-6")) { + LabeledContent(label: "Rated Airflow: (CFM)") { + Input(id: "ratedAirflow", placeholder: "Rated or measured Airflow") + .attributes(.type(.number), .step("0.1"), .min("0.1"), .required) + } + LabeledContent(label: "Filter Pressure Drop: (in. w.c.)") { + Input(id: "ratedPressure", placeholder: "Rated or measured pressure drop") + .attributes(.type(.number), .step("0.1"), .min("0.1"), .required) + } + LabeledContent(label: "Design Airflow: (CFM)") { + Input(id: "designAirflow", placeholder: "Design or target airflow") + .attributes(.type(.number), .step("1.0"), .min("1.0"), .required) + } + } + } + } + } + } +} + +struct FilterPressureDropResponse: HTML, Sendable { + let response: FilterPressureDrop.Response + + var content: some HTML { + ResultContainer(reset: .filterPressureDrop(.index(mode: response.resetMode))) { + switch response { + case let .basic(response): + BasicView(response: response) + case let .fanLaw(response): + FanLawView(response: response) + } + } + } + + private struct BasicView: HTML { + let response: FilterPressureDrop.Response.Basic + + var content: some HTML { + div( + .class(""" + grid grid-cols-1 lg:grid-cols-2 gap-6 rounded-lg shadow-lg + border border-blue-600 text-blue-600 bg-blue-100 p-6 + """) + ) { + VerticalGroup( + label: "Filter Face Area", + value: "\(double: response.filterArea, fractionDigits: 2)", + valueLabel: "ft²" + ) + VerticalGroup( + label: "Filter Face Velocity", + value: "\(double: response.feetPerMinute, fractionDigits: 1)", + valueLabel: "FPM" + ) + VerticalGroup( + label: "Initial Pressure Drop", + value: "\(double: response.initialPressureDrop, fractionDigits: 2)\"", + valueLabel: "w.c." + ) + VerticalGroup( + label: "Maximum Allowable Pressure Drop", + value: "\(double: response.maxPressureDrop, fractionDigits: 2)\"", + valueLabel: "w.c." + ) + } + + WarningBox(warnings: response.warnings) + } + } + + private struct FanLawView: HTML { + let response: FilterPressureDrop.Response.FanLaw + + var content: some HTML { + div( + .class(""" + grid grid-cols-1 lg:grid-cols-2 gap-6 rounded-lg shadow-lg + border border-blue-600 text-blue-600 bg-blue-100 p-6 + """) + ) { + VerticalGroup( + label: "Filter Face Velocity", + value: "\(double: response.faceVelocity, fractionDigits: 1)", + valueLabel: "FPM" + ) + VerticalGroup( + label: "Predicted Pressure Drop", + value: "\(double: response.predictedPressureDrop, fractionDigits: 2)\"", + valueLabel: "w.c." + ) + VerticalGroup( + label: "Velocity Ratio", + value: "\(double: response.velocityRatio, fractionDigits: 2)" + ) + VerticalGroup( + label: "Pressure Ratio", + value: "\(double: response.pressureRatio, fractionDigits: 2)" + ) + } + Note { + """ + Predictions are based on fan laws where pressure drop varies with the square of the airflow ratio. + Results assume similar air properties and filter loading conditions. + """ + } + } + } +} + +private extension FilterPressureDrop.Mode { + + var label: String { + switch self { + case .basic: return rawValue.capitalized + case .fanLaw: return "Fan Law" + } + } +} + +private extension FilterPressureDrop.Response { + + var resetMode: FilterPressureDrop.Mode { + switch self { + case .basic: return .basic + case .fanLaw: return .fanLaw + } + } +} diff --git a/Sources/ViewController/Views/RoomPressure.swift b/Sources/ViewController/Views/RoomPressure.swift index 348a218..e08246d 100644 --- a/Sources/ViewController/Views/RoomPressure.swift +++ b/Sources/ViewController/Views/RoomPressure.swift @@ -16,44 +16,14 @@ struct RoomPressureForm: HTML, Sendable { div(.class("relative")) { div(.class("flex flex-wrap justify-between")) { FormHeader(label: "Room Pressure Calculator - \(mode.label)", svg: .leftRightArrow) - - // Mode toggle / buttons. - div(.class("flex items-center gap-x-0")) { - switch mode { - case .knownAirflow: - SecondaryButton(label: "Known Airflow") - .attributes(.class("rounded-s-lg")) - .attributes(.disabled, when: mode == .knownAirflow) - .attributes( - .hx.get(route: .roomPressure(.index(mode: .knownAirflow))), - .hx.target("#content"), - when: mode == .measuredPressure - ) - PrimaryButton(label: "Measured Pressure") - .attributes(.class("rounded-e-lg")) - .attributes( - .hx.get(route: .roomPressure(.index(mode: .measuredPressure))), - .hx.target("#content"), - when: mode == .knownAirflow - ) - case .measuredPressure: - PrimaryButton(label: "Known Airflow") - .attributes(.class("rounded-s-lg")) - .attributes( - .hx.get(route: .roomPressure(.index(mode: .knownAirflow))), - .hx.target("#content"), - when: mode == .measuredPressure - ) - SecondaryButton(label: "Measured Pressure") - .attributes(.class("rounded-e-lg")) - .attributes(.disabled, when: mode == .measuredPressure) - .attributes( - .hx.get(route: .roomPressure(.index(mode: .measuredPressure))), - .hx.target("#content"), - when: mode == .knownAirflow - ) - } - } + Toggle( + isOn: mode == .knownAirflow, + onLabel: "Known Airflow", + onAttributes: .hxDefaults(get: .roomPressure(.index(mode: .knownAirflow))), + offLabel: "Measured Pressure", + offAttributes: .hxDefaults(get: .roomPressure(.index(mode: .measuredPressure))) + ) + .attributes(.class("mb-6")) } Form(mode: mode) @@ -156,6 +126,7 @@ struct RoomPressureForm: HTML, Sendable { var content: some HTML { InputLabel(for: "preferredGrilleHeight") { "Preferred Grille Height" } + // TODO: Use Styleguide.Select select( .id("preferredGrilleHeight"), .name("preferredGrilleHeight"),