From 1c9ef22ad7627066853078cc683fdf52096fce84 Mon Sep 17 00:00:00 2001 From: jc <46619361+juancwu@users.noreply.github.com> Date: Wed, 10 Dec 2025 14:22:54 -0500 Subject: [PATCH] bare minimum http --- .gitignore | 5 +- .templui.json | 7 + assets/embed.go | 6 + assets/js/avatar.min.js | 1 + assets/js/calendar.min.js | 1 + assets/js/carousel.min.js | 1 + assets/js/chart.min.js | 15 + assets/js/code.min.js | 1 + assets/js/collapsible.min.js | 1 + assets/js/copybutton.min.js | 1 + assets/js/datepicker.min.js | 1 + assets/js/dialog.min.js | 1 + assets/js/dropdown.min.js | 1 + assets/js/input.min.js | 1 + assets/js/inputotp.min.js | 1 + assets/js/label.min.js | 1 + assets/js/popover.min.js | 6 + assets/js/progress.min.js | 1 + assets/js/rating.min.js | 1 + assets/js/selectbox.min.js | 1 + assets/js/sidebar.min.js | 1 + assets/js/slider.min.js | 1 + assets/js/tabs.min.js | 1 + assets/js/tagsinput.min.js | 11 + assets/js/textarea.min.js | 1 + assets/js/timepicker.min.js | 1 + assets/js/toast.min.js | 1 + cmd/server/main.go | 36 + go.mod | 30 + go.sum | 94 + internal/app/app.go | 33 + internal/config/config.go | 76 + internal/db/db.go | 48 + internal/routes/routes.go | 19 + .../ui/components/accordion/accordion.templ | 126 + internal/ui/components/alert/alert.templ | 110 + .../components/aspectratio/aspectratio.templ | 63 + internal/ui/components/avatar/avatar.templ | 97 + internal/ui/components/badge/badge.templ | 59 + .../ui/components/breadcrumb/breadcrumb.templ | 176 + internal/ui/components/button/button.templ | 152 + .../ui/components/calendar/calendar.templ | 195 + internal/ui/components/card/card.templ | 167 + .../ui/components/carousel/carousel.templ | 211 + internal/ui/components/chart/chart.templ | 113 + .../ui/components/checkbox/checkbox.templ | 69 + internal/ui/components/code/code.templ | 56 + .../components/collapsible/collapsible.templ | 86 + .../ui/components/copybutton/copybutton.templ | 48 + .../ui/components/datepicker/datepicker.templ | 158 + internal/ui/components/dialog/dialog.templ | 332 + .../ui/components/dropdown/dropdown.templ | 391 + internal/ui/components/form/form.templ | 138 + internal/ui/components/icon/icon.go | 118 + internal/ui/components/icon/icon_data.go | 6494 +++++++++++++++++ internal/ui/components/icon/icon_defs.go | 1641 +++++ internal/ui/components/input/input.templ | 130 + .../ui/components/inputotp/inputotp.templ | 181 + internal/ui/components/label/label.templ | 43 + .../ui/components/pagination/pagination.templ | 250 + internal/ui/components/popover/popover.templ | 135 + .../ui/components/progress/progress.templ | 127 + internal/ui/components/radio/radio.templ | 57 + internal/ui/components/rating/rating.templ | 193 + .../ui/components/selectbox/selectbox.templ | 325 + .../ui/components/separator/separator.templ | 98 + internal/ui/components/sheet/sheet.templ | 318 + internal/ui/components/sidebar/sidebar.templ | 753 ++ .../ui/components/skeleton/skeleton.templ | 30 + internal/ui/components/slider/slider.templ | 121 + internal/ui/components/switch/switch.templ | 86 + internal/ui/components/table/table.templ | 205 + internal/ui/components/tabs/tabs.templ | 163 + .../ui/components/tagsinput/tagsinput.templ | 94 + .../ui/components/textarea/textarea.templ | 85 + .../ui/components/timepicker/timepicker.templ | 250 + internal/ui/components/toast/toast.templ | 153 + internal/ui/components/tooltip/tooltip.templ | 94 + internal/utils/templui.go | 60 + main.go | 7 - 80 files changed, 15357 insertions(+), 8 deletions(-) create mode 100644 .templui.json create mode 100644 assets/embed.go create mode 100644 assets/js/avatar.min.js create mode 100644 assets/js/calendar.min.js create mode 100644 assets/js/carousel.min.js create mode 100644 assets/js/chart.min.js create mode 100644 assets/js/code.min.js create mode 100644 assets/js/collapsible.min.js create mode 100644 assets/js/copybutton.min.js create mode 100644 assets/js/datepicker.min.js create mode 100644 assets/js/dialog.min.js create mode 100644 assets/js/dropdown.min.js create mode 100644 assets/js/input.min.js create mode 100644 assets/js/inputotp.min.js create mode 100644 assets/js/label.min.js create mode 100644 assets/js/popover.min.js create mode 100644 assets/js/progress.min.js create mode 100644 assets/js/rating.min.js create mode 100644 assets/js/selectbox.min.js create mode 100644 assets/js/sidebar.min.js create mode 100644 assets/js/slider.min.js create mode 100644 assets/js/tabs.min.js create mode 100644 assets/js/tagsinput.min.js create mode 100644 assets/js/textarea.min.js create mode 100644 assets/js/timepicker.min.js create mode 100644 assets/js/toast.min.js create mode 100644 cmd/server/main.go create mode 100644 go.sum create mode 100644 internal/app/app.go create mode 100644 internal/config/config.go create mode 100644 internal/db/db.go create mode 100644 internal/routes/routes.go create mode 100644 internal/ui/components/accordion/accordion.templ create mode 100644 internal/ui/components/alert/alert.templ create mode 100644 internal/ui/components/aspectratio/aspectratio.templ create mode 100644 internal/ui/components/avatar/avatar.templ create mode 100644 internal/ui/components/badge/badge.templ create mode 100644 internal/ui/components/breadcrumb/breadcrumb.templ create mode 100644 internal/ui/components/button/button.templ create mode 100644 internal/ui/components/calendar/calendar.templ create mode 100644 internal/ui/components/card/card.templ create mode 100644 internal/ui/components/carousel/carousel.templ create mode 100644 internal/ui/components/chart/chart.templ create mode 100644 internal/ui/components/checkbox/checkbox.templ create mode 100644 internal/ui/components/code/code.templ create mode 100644 internal/ui/components/collapsible/collapsible.templ create mode 100644 internal/ui/components/copybutton/copybutton.templ create mode 100644 internal/ui/components/datepicker/datepicker.templ create mode 100644 internal/ui/components/dialog/dialog.templ create mode 100644 internal/ui/components/dropdown/dropdown.templ create mode 100644 internal/ui/components/form/form.templ create mode 100644 internal/ui/components/icon/icon.go create mode 100644 internal/ui/components/icon/icon_data.go create mode 100644 internal/ui/components/icon/icon_defs.go create mode 100644 internal/ui/components/input/input.templ create mode 100644 internal/ui/components/inputotp/inputotp.templ create mode 100644 internal/ui/components/label/label.templ create mode 100644 internal/ui/components/pagination/pagination.templ create mode 100644 internal/ui/components/popover/popover.templ create mode 100644 internal/ui/components/progress/progress.templ create mode 100644 internal/ui/components/radio/radio.templ create mode 100644 internal/ui/components/rating/rating.templ create mode 100644 internal/ui/components/selectbox/selectbox.templ create mode 100644 internal/ui/components/separator/separator.templ create mode 100644 internal/ui/components/sheet/sheet.templ create mode 100644 internal/ui/components/sidebar/sidebar.templ create mode 100644 internal/ui/components/skeleton/skeleton.templ create mode 100644 internal/ui/components/slider/slider.templ create mode 100644 internal/ui/components/switch/switch.templ create mode 100644 internal/ui/components/table/table.templ create mode 100644 internal/ui/components/tabs/tabs.templ create mode 100644 internal/ui/components/tagsinput/tagsinput.templ create mode 100644 internal/ui/components/textarea/textarea.templ create mode 100644 internal/ui/components/timepicker/timepicker.templ create mode 100644 internal/ui/components/toast/toast.templ create mode 100644 internal/ui/components/tooltip/tooltip.templ create mode 100644 internal/utils/templui.go delete mode 100644 main.go diff --git a/.gitignore b/.gitignore index cabdc6b..9cd3faa 100644 --- a/.gitignore +++ b/.gitignore @@ -51,6 +51,9 @@ tmp/ *_templ.txt # Database files -*.db *.sqlite *.sqlite3 +/data/ +*.db +*.db-shm +*.db-wal diff --git a/.templui.json b/.templui.json new file mode 100644 index 0000000..969c1b1 --- /dev/null +++ b/.templui.json @@ -0,0 +1,7 @@ +{ + "componentsDir": "internal/ui/components", + "utilsDir": "internal/utils", + "moduleName": "git.juancwu.dev/juancwu/budgething", + "jsDir": "assets/js", + "jsPublicPath": "/assets/js" +} \ No newline at end of file diff --git a/assets/embed.go b/assets/embed.go new file mode 100644 index 0000000..fd00dcc --- /dev/null +++ b/assets/embed.go @@ -0,0 +1,6 @@ +package assets + +import "embed" + +//go:embed js/* +var AssetsFS embed.FS diff --git a/assets/js/avatar.min.js b/assets/js/avatar.min.js new file mode 100644 index 0000000..39ec0fc --- /dev/null +++ b/assets/js/avatar.min.js @@ -0,0 +1 @@ +(()=>{(function(){"use strict";document.addEventListener("load",function(t){if(t.target.matches("[data-tui-avatar-image]")){let a=t.target.parentElement.querySelector("[data-tui-avatar-fallback]");a&&(a.style.display="none")}},!0),document.addEventListener("error",function(t){if(t.target.matches("[data-tui-avatar-image]")){t.target.style.display="none";let a=t.target.parentElement.querySelector("[data-tui-avatar-fallback]");a&&(a.style.display="flex")}},!0);function e(){document.querySelectorAll("[data-tui-avatar-image]").forEach(function(t){let a=t.parentElement.querySelector("[data-tui-avatar-fallback]");t.complete&&t.naturalWidth>0?a&&(a.style.display="none"):t.complete&&t.naturalWidth===0&&(t.style.display="none",a&&(a.style.display="flex"))})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e):e()})();})(); diff --git a/assets/js/calendar.min.js b/assets/js/calendar.min.js new file mode 100644 index 0000000..1338784 --- /dev/null +++ b/assets/js/calendar.min.js @@ -0,0 +1 @@ +(()=>{(function(){"use strict";function m(t){if(!t)return null;let a=t.split("-");if(a.length!==3)return null;let n=parseInt(a[0],10),e=parseInt(a[1],10)-1,r=parseInt(a[2],10),s=new Date(Date.UTC(n,e,r));return s.getUTCFullYear()===n&&s.getUTCMonth()===e&&s.getUTCDate()===r?s:null}function y(t){try{return Array.from({length:12},(a,n)=>new Intl.DateTimeFormat(t,{month:"short",timeZone:"UTC"}).format(new Date(Date.UTC(2e3,n,1))))}catch{return["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}}function v(t,a){try{return Array.from({length:7},(n,e)=>new Intl.DateTimeFormat(t,{weekday:"short",timeZone:"UTC"}).format(new Date(Date.UTC(2e3,0,e+2+a))))}catch{return["Su","Mo","Tu","We","Th","Fr","Sa"]}}function p(t){let n=t.closest("[data-tui-calendar-wrapper]")?.querySelector("[data-tui-calendar-hidden-input]");if(!n&&t.id){let e=t.id.replace("-calendar-instance","");n=document.getElementById(e+"-hidden")}return n}function u(t){let a=t.querySelector("[data-tui-calendar-weekdays]"),n=t.querySelector("[data-tui-calendar-days]");if(!a||!n)return;let e=parseInt(t.dataset.tuiCalendarCurrentMonth),r=parseInt(t.dataset.tuiCalendarCurrentYear);if(isNaN(e)||isNaN(r)){let d=parseInt(t.getAttribute("data-tui-calendar-initial-month")),l=parseInt(t.getAttribute("data-tui-calendar-initial-year")),h=t.getAttribute("data-tui-calendar-selected-date");if(h){let f=m(h);f&&(e=f.getUTCMonth(),r=f.getUTCFullYear())}isNaN(e)&&(e=isNaN(d)?new Date().getMonth():d),isNaN(r)&&(r=!isNaN(l)&&l>0?l:new Date().getFullYear()),t.dataset.tuiCalendarCurrentMonth=e,t.dataset.tuiCalendarCurrentYear=r}let s=t.getAttribute("data-tui-calendar-locale-tag")||"en-US",i=parseInt(t.getAttribute("data-tui-calendar-start-of-week"))||1,o=t.getAttribute("data-tui-calendar-selected-date"),c=o?m(o):null,M=y(s),w=t.querySelector(`#${t.id}-month-value`),T=t.querySelector(`#${t.id}-year-value`);if(w&&(w.textContent=M[e]),T&&(T.textContent=r),!a.children.length){let d=v(s,i);a.innerHTML=d.map(l=>`
${l}
`).join("")}n.innerHTML="";let I=((new Date(Date.UTC(r,e,1)).getUTCDay()-i)%7+7)%7,S=new Date(Date.UTC(r,e+1,0)).getUTCDate(),C=new Date,b=new Date(Date.UTC(C.getFullYear(),C.getMonth(),C.getDate()));for(let d=0;d';for(let d=1;d<=S;d++){let l=new Date(Date.UTC(r,e,d)),h=c&&l.getTime()===c.getTime(),f=l.getTime()===b.getTime(),g="inline-flex h-8 w-8 items-center justify-center rounded-md text-sm font-medium focus:outline-none focus:ring-1 focus:ring-ring";h?g+=" bg-primary text-primary-foreground hover:bg-primary/90":f?g+=" bg-accent text-accent-foreground":g+=" hover:bg-accent hover:text-accent-foreground";let Y=[`data-tui-calendar-day="${d}"`,f?'data-tui-calendar-today="true"':"",h?'data-tui-calendar-selected="true"':""].filter(Boolean).join(" ");n.innerHTML+=``}}document.addEventListener("change",t=>{if(t.target.matches("[data-tui-calendar-month-select]")){let a=t.target.closest("[data-tui-calendar-container]");if(!a)return;let n=parseInt(t.target.value,10);if(isNaN(n))return;a.dataset.tuiCalendarCurrentMonth=n,u(a);return}if(t.target.matches("[data-tui-calendar-year-select]")){let a=t.target.closest("[data-tui-calendar-container]");if(!a)return;let n=parseInt(t.target.value,10);if(isNaN(n))return;a.dataset.tuiCalendarCurrentYear=n,u(a);return}}),document.addEventListener("click",t=>{let a=t.target.closest("[data-tui-calendar-prev]");if(a){let e=a.closest("[data-tui-calendar-container]");if(!e)return;let r=parseInt(e.dataset.tuiCalendarCurrentMonth,10),s=parseInt(e.dataset.tuiCalendarCurrentYear,10);isNaN(r)&&(r=new Date().getMonth()),isNaN(s)&&(s=new Date().getFullYear()),r--,r<0&&(r=11,s--),e.dataset.tuiCalendarCurrentMonth=r,e.dataset.tuiCalendarCurrentYear=s,u(e),D(e);return}let n=t.target.closest("[data-tui-calendar-next]");if(n){let e=n.closest("[data-tui-calendar-container]");if(!e)return;let r=parseInt(e.dataset.tuiCalendarCurrentMonth,10),s=parseInt(e.dataset.tuiCalendarCurrentYear,10);isNaN(r)&&(r=new Date().getMonth()),isNaN(s)&&(s=new Date().getFullYear()),r++,r>11&&(r=0,s++),e.dataset.tuiCalendarCurrentMonth=r,e.dataset.tuiCalendarCurrentYear=s,u(e),D(e);return}if(t.target.matches("[data-tui-calendar-day]")){let e=t.target.closest("[data-tui-calendar-container]");if(!e)return;let r=parseInt(t.target.dataset.tuiCalendarDay),s=parseInt(e.dataset.tuiCalendarCurrentMonth,10),i=parseInt(e.dataset.tuiCalendarCurrentYear,10);isNaN(s)&&(s=new Date().getMonth()),isNaN(i)&&(i=new Date().getFullYear());let o=new Date(Date.UTC(i,s,r));e.setAttribute("data-tui-calendar-selected-date",o.toISOString().split("T")[0]);let c=p(e);c&&(c.value=o.toISOString().split("T")[0],c.dispatchEvent(new Event("change",{bubbles:!0}))),e.dispatchEvent(new CustomEvent("calendar-date-selected",{bubbles:!0,detail:{date:o}})),u(e)}});function D(t){let a=parseInt(t.dataset.tuiCalendarCurrentMonth,10),n=parseInt(t.dataset.tuiCalendarCurrentYear,10);if(isNaN(a)||isNaN(n))return;let e=t.querySelector("[data-tui-calendar-month-select]");e&&(e.value=a.toString());let r=t.querySelector("[data-tui-calendar-year-select]");r&&(r.value=n.toString())}document.addEventListener("reset",t=>{t.target.matches("form")&&t.target.querySelectorAll("[data-tui-calendar-container]").forEach(a=>{let n=p(a);n&&(n.value=""),a.removeAttribute("data-tui-calendar-selected-date");let e=new Date;a.dataset.tuiCalendarCurrentMonth=e.getMonth(),a.dataset.tuiCalendarCurrentYear=e.getFullYear(),u(a)})}),new MutationObserver(()=>{document.querySelectorAll("[data-tui-calendar-container]").forEach(t=>{let a=t.querySelector("[data-tui-calendar-days]");a&&!a.children.length&&u(t)})}).observe(document.body,{childList:!0,subtree:!0});function N(){document.querySelectorAll("[data-tui-calendar-container]").forEach(t=>{let a=t.getAttribute("data-tui-calendar-locale-tag")||"en-US",n=y(a),e=t.querySelector("[data-tui-calendar-month-select]");e&&e.querySelectorAll("option").forEach((s,i)=>{n[i]&&(s.textContent=n[i])}),u(t)})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",N):N()})();})(); diff --git a/assets/js/carousel.min.js b/assets/js/carousel.min.js new file mode 100644 index 0000000..c6aba51 --- /dev/null +++ b/assets/js/carousel.min.js @@ -0,0 +1 @@ +(()=>{(function(){"use strict";let f=new Map,o=null;document.addEventListener("click",t=>{let e=t.target.closest("[data-tui-carousel-prev]");if(e){let s=e.closest("[data-tui-carousel]");s&&u(s,-1);return}let a=t.target.closest("[data-tui-carousel-next]");if(a){let s=a.closest("[data-tui-carousel]");s&&u(s,1);return}let r=t.target.closest("[data-tui-carousel-indicator]");if(r){let s=r.closest("[data-tui-carousel]"),n=parseInt(r.dataset.tuiCarouselIndicator);s&&!isNaN(n)&&c(s,n)}});function y(t){let e=t.target.closest("[data-tui-carousel-track]");if(!e)return;let a=e.closest("[data-tui-carousel]");if(!a)return;t.preventDefault();let r=t.touches?t.touches[0].clientX:t.clientX;o={carousel:a,track:e,startX:r,currentX:r,startTime:Date.now()},e.style.cursor="grabbing",e.style.transition="none",i(a)}function C(t){if(!o)return;let e=t.touches?t.touches[0].clientX:t.clientX;o.currentX=e;let a=e-o.startX,s=-parseInt(o.carousel.dataset.tuiCarouselCurrent||"0")*100+a/o.track.offsetWidth*100;o.track.style.transform=`translateX(${s}%)`}function m(t){if(!o)return;let{carousel:e,track:a,startX:r,startTime:s}=o,n=t.changedTouches?t.changedTouches[0].clientX:t.clientX||o.currentX;a.style.cursor="",a.style.transition="";let l=r-n,g=Math.abs(l)/(Date.now()-s);if(Math.abs(l)>50||g>.5)u(e,l>0?1:-1);else{let d=parseInt(e.dataset.tuiCarouselCurrent||"0");c(e,d)}o=null,e.dataset.tuiCarouselAutoplay==="true"&&!e.matches(":hover")&&b(e)}document.addEventListener("mousedown",y),document.addEventListener("mousemove",C),document.addEventListener("mouseup",m),document.addEventListener("mouseleave",t=>{t.target===document.documentElement&&m(t)}),document.addEventListener("touchstart",y,{passive:!1}),document.addEventListener("touchmove",C,{passive:!1}),document.addEventListener("touchend",m,{passive:!1});function u(t,e){let a=parseInt(t.dataset.tuiCarouselCurrent||"0"),s=t.querySelectorAll("[data-tui-carousel-item]").length;if(s===0)return;let n=a+e;t.dataset.tuiCarouselLoop==="true"?n=(n%s+s)%s:n=Math.max(0,Math.min(n,s-1)),c(t,n)}function c(t,e){let a=t.querySelector("[data-tui-carousel-track]"),r=t.querySelectorAll("[data-tui-carousel-indicator]"),s=t.querySelector("[data-tui-carousel-prev]"),n=t.querySelector("[data-tui-carousel-next]"),g=t.querySelectorAll("[data-tui-carousel-item]").length;t.dataset.tuiCarouselCurrent=e,a&&(a.style.transform=`translateX(-${e*100}%)`),r.forEach((p,h)=>{p.dataset.tuiCarouselActive=h===e?"true":"false",p.classList.toggle("bg-primary",h===e),p.classList.toggle("bg-foreground/30",h!==e)});let d=t.dataset.tuiCarouselLoop==="true";s&&(s.disabled=!d&&e===0,s.classList.toggle("opacity-50",s.disabled)),n&&(n.disabled=!d&&e===g-1,n.classList.toggle("opacity-50",n.disabled))}function b(t){if(t.dataset.tuiCarouselAutoplay!=="true")return;i(t);let e=parseInt(t.dataset.tuiCarouselInterval||"5000"),a=setInterval(()=>{if(!document.contains(t)){i(t);return}t.matches(":hover")||o?.carousel===t||u(t,1)},e);f.set(t,a)}function i(t){let e=f.get(t);e&&(clearInterval(e),f.delete(t))}let L=new WeakSet,X=new IntersectionObserver(t=>{t.forEach(e=>{let a=e.target;if(!a.hasAttribute("data-tui-carousel-initialized")){a.setAttribute("data-tui-carousel-initialized","true");let r=parseInt(a.dataset.tuiCarouselCurrent||"0");c(a,r)}a.dataset.tuiCarouselAutoplay==="true"&&(e.isIntersecting?b(a):i(a))})});function v(){document.querySelectorAll("[data-tui-carousel]").forEach(t=>{L.has(t)||(L.add(t),X.observe(t))})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",v):v(),new MutationObserver(v).observe(document.body,{childList:!0,subtree:!0})})();})(); diff --git a/assets/js/chart.min.js b/assets/js/chart.min.js new file mode 100644 index 0000000..978fe4c --- /dev/null +++ b/assets/js/chart.min.js @@ -0,0 +1,15 @@ +(()=>{var Er=Object.create;var qo=Object.defineProperty;var Rr=Object.getOwnPropertyDescriptor;var Ir=Object.getOwnPropertyNames;var zr=Object.getPrototypeOf,Fr=Object.prototype.hasOwnProperty;var Vr=(j,W)=>()=>(W||j((W={exports:{}}).exports,W),W.exports);var Br=(j,W,ht,I)=>{if(W&&typeof W=="object"||typeof W=="function")for(let F of Ir(W))!Fr.call(j,F)&&F!==ht&&qo(j,F,{get:()=>W[F],enumerable:!(I=Rr(W,F))||I.enumerable});return j};var Wr=(j,W,ht)=>(ht=j!=null?Er(zr(j)):{},Br(W||!j||!j.__esModule?qo(ht,"default",{value:j,enumerable:!0}):ht,j));var Ko=Vr((fs,gs)=>{(function(j,W){typeof fs=="object"&&typeof gs<"u"?gs.exports=W():typeof define=="function"&&define.amd?define(W):(j=typeof globalThis<"u"?globalThis:j||self).Chart=W()})(fs,function(){"use strict";var j=Object.freeze({__proto__:null,get Colors(){return xr},get Decimation(){return _r},get Filler(){return Pr},get Legend(){return Dr},get SubTitle(){return Or},get Title(){return Cr},get Tooltip(){return Lr}});function W(){}let ht=(()=>{let i=0;return()=>i++})();function I(i){return i==null}function F(i){if(Array.isArray&&Array.isArray(i))return!0;let t=Object.prototype.toString.call(i);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function z(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}function L(i){return(typeof i=="number"||i instanceof Number)&&isFinite(+i)}function q(i,t){return L(i)?i:t}function E(i,t){return i===void 0?t:i}let $=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100:+i/t,Z=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*t:+i;function N(i,t,e){if(i&&typeof i.call=="function")return i.apply(e,t)}function B(i,t,e,s){let n,o,a;if(F(i))if(o=i.length,s)for(n=o-1;n>=0;n--)t.call(e,i[n],n);else for(n=0;ni,x:i=>i.x,y:i=>i.y};function xs(i){let t=i.split("."),e=[],s="";for(let n of t)s+=n,s.endsWith("\\")?s=s.slice(0,-1)+".":(e.push(s),s="");return e}function St(i,t){return(bs[t]||(bs[t]=(function(s){let n=xs(s);return o=>{for(let a of n){if(a==="")break;o=o&&o[a]}return o}})(t)))(i)}function Oe(i){return i.charAt(0).toUpperCase()+i.slice(1)}let Qt=i=>i!==void 0,Pt=i=>typeof i=="function",ci=(i,t)=>{if(i.size!==t.size)return!1;for(let e of i)if(!t.has(e))return!1;return!0};function _s(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}let Y=Math.PI,U=2*Y,ys=U+Y,he=Number.POSITIVE_INFINITY,vs=Y/180,K=Y/2,Lt=Y/4,di=2*Y/3,Dt=Math.log10,ft=Math.sign;function te(i,t,e){return Math.abs(i-t)n-o).pop(),t}function $t(i){return!(function(t){return typeof t=="symbol"||typeof t=="object"&&t!==null&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)})(i)&&!isNaN(parseFloat(i))&&isFinite(i)}function ws(i,t){let e=Math.round(i);return e-t<=i&&e+t>=i}function fi(i,t,e){let s,n,o;for(s=0,n=i.length;sl&&h=Math.min(t,e)-s&&i<=Math.max(t,e)+s}function Le(i,t,e){e=e||(a=>i[a]1;)s=o+n>>1,e(s)?o=s:n=s;return{lo:o,hi:n}}let yt=(i,t,e,s)=>Le(i,e,s?n=>{let o=i[n][t];return oi[n][t]Le(i,e,s=>i[s][t]>=e);function Ds(i,t,e){let s=0,n=i.length;for(;ss&&i[n-1]>e;)n--;return s>0||n{let s="_onData"+Oe(e),n=i[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,value(...o){let a=n.apply(this,o);return i._chartjs.listeners.forEach(r=>{typeof r[s]=="function"&&r[s](...o)}),a}})}))}function mi(i,t){let e=i._chartjs;if(!e)return;let s=e.listeners,n=s.indexOf(t);n!==-1&&s.splice(n,1),s.length>0||(Cs.forEach(o=>{delete i[o]}),delete i._chartjs)}function bi(i){let t=new Set(i);return t.size===i.length?i:Array.from(t)}let xi=typeof window>"u"?function(i){return i()}:window.requestAnimationFrame;function _i(i,t){let e=[],s=!1;return function(...n){e=n,s||(s=!0,xi.call(window,()=>{s=!1,i.apply(t,e)}))}}function As(i,t){let e;return function(...s){return t?(clearTimeout(e),e=setTimeout(i,t,s)):i.apply(this,s),t}}let Ee=i=>i==="start"?"left":i==="end"?"right":"center",tt=(i,t,e)=>i==="start"?t:i==="end"?e:(t+e)/2,Ts=(i,t,e,s)=>i===(s?"left":"right")?e:i==="center"?(t+e)/2:t;function yi(i,t,e){let s=t.length,n=0,o=s;if(i._sorted){let{iScale:a,vScale:r,_parsed:l}=i,h=i.dataset&&i.dataset.options?i.dataset.options.spanGaps:null,d=a.axis,{min:c,max:u,minDefined:f,maxDefined:p}=a.getUserBounds();if(f){if(n=Math.min(yt(l,d,c).lo,e?s:yt(t,d,a.getPixelForValue(c)).lo),h){let g=l.slice(0,n+1).reverse().findIndex(m=>!I(m[r.axis]));n-=Math.max(0,g)}n=Q(n,0,s-1)}if(p){let g=Math.max(yt(l,a.axis,u,!0).hi+1,e?0:yt(t,d,a.getPixelForValue(u),!0).hi+1);if(h){let m=l.slice(g-1).findIndex(b=>!I(b[r.axis]));g+=Math.max(0,m)}o=Q(g,n,s)-n}else o=s-n}return{start:n,count:o}}function vi(i){let{xScale:t,yScale:e,_scaleRanges:s}=i,n={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!s)return i._scaleRanges=n,!0;let o=s.xmin!==t.min||s.xmax!==t.max||s.ymin!==e.min||s.ymax!==e.max;return Object.assign(s,n),o}class Go{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,s,n){let o=e.listeners[n],a=e.duration;o.forEach(r=>r({chart:t,initial:e.initial,numSteps:a,currentStep:Math.min(s-e.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=xi.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((s,n)=>{if(!s.running||!s.items.length)return;let o=s.items,a,r=o.length-1,l=!1;for(;r>=0;--r)a=o[r],a._active?(a._total>s.duration&&(s.duration=a._total),a.tick(t),l=!0):(o[r]=o[o.length-1],o.pop());l&&(n.draw(),this._notify(n,s,t,"progress")),o.length||(s.running=!1,this._notify(n,s,t,"complete"),s.initial=!1),e+=o.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){let e=this._charts,s=e.get(t);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,s)),s}listen(t,e,s){this._getAnims(t).listeners[e].push(s)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){let e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((s,n)=>Math.max(s,n._duration),0),this._refresh())}running(t){if(!this._running)return!1;let e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){let e=this._charts.get(t);if(!e||!e.items.length)return;let s=e.items,n=s.length-1;for(;n>=0;--n)s[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var vt=new Go;function ce(i){return i+.5|0}let Et=(i,t,e)=>Math.max(Math.min(i,e),t);function de(i){return Et(ce(2.55*i),0,255)}function Rt(i){return Et(ce(255*i),0,255)}function Ct(i){return Et(ce(i/2.55)/100,0,1)}function Ls(i){return Et(ce(100*i),0,100)}let dt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Mi=[..."0123456789ABCDEF"],Zo=i=>Mi[15&i],Jo=i=>Mi[(240&i)>>4]+Mi[15&i],Re=i=>(240&i)>>4==(15&i);function Qo(i){var t=(e=>Re(e.r)&&Re(e.g)&&Re(e.b)&&Re(e.a))(i)?Zo:Jo;return i?"#"+t(i.r)+t(i.g)+t(i.b)+((e,s)=>e<255?s(e):"")(i.a,t):void 0}let ta=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Es(i,t,e){let s=t*Math.min(e,1-e),n=(o,a=(o+i/30)%12)=>e-s*Math.max(Math.min(a-3,9-a,1),-1);return[n(0),n(8),n(4)]}function ea(i,t,e){let s=(n,o=(n+i/60)%6)=>e-e*t*Math.max(Math.min(o,4-o,1),0);return[s(5),s(3),s(1)]}function ia(i,t,e){let s=Es(i,1,.5),n;for(t+e>1&&(n=1/(t+e),t*=n,e*=n),n=0;n<3;n++)s[n]*=1-t-e,s[n]+=t;return s}function wi(i){let t=i.r/255,e=i.g/255,s=i.b/255,n=Math.max(t,e,s),o=Math.min(t,e,s),a=(n+o)/2,r,l,h;return n!==o&&(h=n-o,l=a>.5?h/(2-n-o):h/(n+o),r=(function(d,c,u,f,p){return d===p?(c-u)/f+(c>16&255,r>>8&255,255&r]}return e})(),Ie.transparent=[0,0,0,0]);let t=Ie[i.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}let oa=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,Pi=i=>i<=.0031308?12.92*i:1.055*Math.pow(i,1/2.4)-.055,ie=i=>i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4);function ze(i,t,e){if(i){let s=wi(i);s[t]=Math.max(0,Math.min(s[t]+s[t]*e,t===0?360:1)),s=Si(s),i.r=s[0],i.g=s[1],i.b=s[2]}}function Fs(i,t){return i&&Object.assign(t||{},i)}function Vs(i){var t={r:0,g:0,b:0,a:255};return Array.isArray(i)?i.length>=3&&(t={r:i[0],g:i[1],b:i[2],a:255},i.length>3&&(t.a=Rt(i[3]))):(t=Fs(i,{r:0,g:0,b:0,a:1})).a=Rt(t.a),t}function aa(i){return i.charAt(0)==="r"?(function(t){let e=oa.exec(t),s,n,o,a=255;if(e){if(e[7]!==s){let r=+e[7];a=e[8]?de(r):Et(255*r,0,255)}return s=+e[1],n=+e[3],o=+e[5],s=255&(e[2]?de(s):Et(s,0,255)),n=255&(e[4]?de(n):Et(n,0,255)),o=255&(e[6]?de(o):Et(o,0,255)),{r:s,g:n,b:o,a}}})(i):sa(i)}class ue{constructor(t){if(t instanceof ue)return t;let e=typeof t,s;var n,o,a;e==="object"?s=Vs(t):e==="string"&&(a=(n=t).length,n[0]==="#"&&(a===4||a===5?o={r:255&17*dt[n[1]],g:255&17*dt[n[2]],b:255&17*dt[n[3]],a:a===5?17*dt[n[4]]:255}:a!==7&&a!==9||(o={r:dt[n[1]]<<4|dt[n[2]],g:dt[n[3]]<<4|dt[n[4]],b:dt[n[5]]<<4|dt[n[6]],a:a===9?dt[n[7]]<<4|dt[n[8]]:255})),s=o||na(t)||aa(t)),this._rgb=s,this._valid=!!s}get valid(){return this._valid}get rgb(){var t=Fs(this._rgb);return t&&(t.a=Ct(t.a)),t}set rgb(t){this._rgb=Vs(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${Ct(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0;var t}hexString(){return this._valid?Qo(this._rgb):void 0}hslString(){return this._valid?(function(t){if(!t)return;let e=wi(t),s=e[0],n=Ls(e[1]),o=Ls(e[2]);return t.a<255?`hsla(${s}, ${n}%, ${o}%, ${Ct(t.a)})`:`hsl(${s}, ${n}%, ${o}%)`})(this._rgb):void 0}mix(t,e){if(t){let s=this.rgb,n=t.rgb,o,a=e===o?.5:e,r=2*a-1,l=s.a-n.a,h=((r*l==-1?r:(r+l)/(1+r*l))+1)/2;o=1-h,s.r=255&h*s.r+o*n.r+.5,s.g=255&h*s.g+o*n.g+.5,s.b=255&h*s.b+o*n.b+.5,s.a=a*s.a+(1-a)*n.a,this.rgb=s}return this}interpolate(t,e){return t&&(this._rgb=(function(s,n,o){let a=ie(Ct(s.r)),r=ie(Ct(s.g)),l=ie(Ct(s.b));return{r:Rt(Pi(a+o*(ie(Ct(n.r))-a))),g:Rt(Pi(r+o*(ie(Ct(n.g))-r))),b:Rt(Pi(l+o*(ie(Ct(n.b))-l))),a:s.a+o*(n.a-s.a)}})(this._rgb,t._rgb,e)),this}clone(){return new ue(this.rgb)}alpha(t){return this._rgb.a=Rt(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){let t=this._rgb,e=ce(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){let t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return ze(this._rgb,2,t),this}darken(t){return ze(this._rgb,2,-t),this}saturate(t){return ze(this._rgb,1,t),this}desaturate(t){return ze(this._rgb,1,-t),this}rotate(t){return(function(e,s){var n=wi(e);n[0]=Rs(n[0]+s),n=Si(n),e.r=n[0],e.g=n[1],e.b=n[2]})(this._rgb,t),this}}function Fe(i){if(i&&typeof i=="object"){let t=i.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Di(i){return Fe(i)?i:new ue(i)}function Ve(i){return Fe(i)?i:new ue(i).saturate(.5).darken(.1).hexString()}let ra=["x","y","borderWidth","radius","tension"],la=["color","borderColor","backgroundColor"],Bs=new Map;function se(i,t,e){return(function(s,n){n=n||{};let o=s+JSON.stringify(n),a=Bs.get(o);return a||(a=new Intl.NumberFormat(s,n),Bs.set(o,a)),a})(t,e).format(i)}let Ws={values:i=>F(i)?i:""+i,numeric(i,t,e){if(i===0)return"0";let s=this.chart.options.locale,n,o=i;if(e.length>1){let h=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(h<1e-4||h>1e15)&&(n="scientific"),o=(function(d,c){let u=c.length>3?c[2].value-c[1].value:c[1].value-c[0].value;return Math.abs(u)>=1&&d!==Math.floor(d)&&(u=d-Math.floor(d)),u})(i,e)}let a=Dt(Math.abs(o)),r=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:n,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),se(i,s,l)},logarithmic(i,t,e){if(i===0)return"0";let s=e[t].significand||i/Math.pow(10,Math.floor(Dt(i)));return[1,2,3,5,10,15].includes(s)||t>.8*e.length?Ws.numeric.call(this,i,t,e):""}};var fe={formatters:Ws};let Yt=Object.create(null),Ci=Object.create(null);function ge(i,t){if(!t)return i;let e=t.split(".");for(let s=0,n=e.length;ss.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(s,n)=>Ve(n.backgroundColor),this.hoverBorderColor=(s,n)=>Ve(n.borderColor),this.hoverColor=(s,n)=>Ve(n.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return Oi(this,t,e)}get(t){return ge(this,t)}describe(t,e){return Oi(Ci,t,e)}override(t,e){return Oi(Yt,t,e)}route(t,e,s,n){let o=ge(this,t),a=ge(this,s),r="_"+e;Object.defineProperties(o,{[r]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){let l=this[r],h=a[n];return z(l)?Object.assign({},h,l):E(l,h)},set(l){this[r]=l}}})}apply(t){t.forEach(e=>e(this))}}var X=new ha({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(i){i.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),i.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),i.set("animations",{colors:{type:"color",properties:la},numbers:{type:"number",properties:ra}}),i.describe("animations",{_fallback:"animation"}),i.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}})},function(i){i.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(i){i.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:fe.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),i.route("scale.ticks","color","","color"),i.route("scale.grid","color","","borderColor"),i.route("scale.border","color","","borderColor"),i.route("scale.title","color","","color"),i.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),i.describe("scales",{_fallback:"scale"}),i.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}]);function Be(){return typeof window<"u"&&typeof document<"u"}function We(i){let t=i.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Ne(i,t,e){let s;return typeof i=="string"?(s=parseInt(i,10),i.indexOf("%")!==-1&&(s=s/100*t.parentNode[e])):s=i,s}let He=i=>i.ownerDocument.defaultView.getComputedStyle(i,null);function Ns(i,t){return He(i).getPropertyValue(t)}let ca=["top","right","bottom","left"];function Ut(i,t,e){let s={};e=e?"-"+e:"";for(let n=0;n<4;n++){let o=ca[n];s[o]=parseFloat(i[t+"-"+o+e])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}let da=(i,t,e)=>(i>0||t>0)&&(!e||!e.shadowRoot);function It(i,t){if("native"in i)return i;let{canvas:e,currentDevicePixelRatio:s}=t,n=He(e),o=n.boxSizing==="border-box",a=Ut(n,"padding"),r=Ut(n,"border","width"),{x:l,y:h,box:d}=(function(g,m){let b=g.touches,y=b&&b.length?b[0]:g,{offsetX:_,offsetY:x}=y,v,M,w=!1;if(da(_,x,g.target))v=_,M=x;else{let k=m.getBoundingClientRect();v=y.clientX-k.left,M=y.clientY-k.top,w=!0}return{x:v,y:M,box:w}})(i,e),c=a.left+(d&&r.left),u=a.top+(d&&r.top),{width:f,height:p}=t;return o&&(f-=a.width+r.width,p-=a.height+r.height),{x:Math.round((l-c)/f*e.width/s),y:Math.round((h-u)/p*e.height/s)}}let je=i=>Math.round(10*i)/10;function Hs(i,t,e,s){let n=He(i),o=Ut(n,"margin"),a=Ne(n.maxWidth,i,"clientWidth")||he,r=Ne(n.maxHeight,i,"clientHeight")||he,l=(function(c,u,f){let p,g;if(u===void 0||f===void 0){let m=c&&We(c);if(m){let b=m.getBoundingClientRect(),y=He(m),_=Ut(y,"border","width"),x=Ut(y,"padding");u=b.width-x.width-_.width,f=b.height-x.height-_.height,p=Ne(y.maxWidth,m,"clientWidth"),g=Ne(y.maxHeight,m,"clientHeight")}else u=c.clientWidth,f=c.clientHeight}return{width:u,height:f,maxWidth:p||he,maxHeight:g||he}})(i,t,e),{width:h,height:d}=l;if(n.boxSizing==="content-box"){let c=Ut(n,"border","width"),u=Ut(n,"padding");h-=u.width+c.width,d-=u.height+c.height}return h=Math.max(0,h-o.width),d=Math.max(0,s?h/s:d-o.height),h=je(Math.min(h,a,l.maxWidth)),d=je(Math.min(d,r,l.maxHeight)),h&&!d&&(d=je(h/2)),(t!==void 0||e!==void 0)&&s&&l.height&&d>l.height&&(d=l.height,h=je(Math.floor(d*s))),{width:h,height:d}}function Ai(i,t,e){let s=t||1,n=Math.floor(i.height*s),o=Math.floor(i.width*s);i.height=Math.floor(i.height),i.width=Math.floor(i.width);let a=i.canvas;return a.style&&(e||!a.style.height&&!a.style.width)&&(a.style.height=`${i.height}px`,a.style.width=`${i.width}px`),(i.currentDevicePixelRatio!==s||a.height!==n||a.width!==o)&&(i.currentDevicePixelRatio=s,a.height=n,a.width=o,i.ctx.setTransform(s,0,0,s,0,0),!0)}let js=(function(){let i=!1;try{let t={get passive(){return i=!0,!1}};Be()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return i})();function Ti(i,t){let e=Ns(i,t),s=e&&e.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function $s(i){return!i||I(i.size)||I(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function pe(i,t,e,s,n){let o=t[n];return o||(o=t[n]=i.measureText(n).width,e.push(n)),o>s&&(s=o),s}function Ys(i,t,e,s){let n=(s=s||{}).data=s.data||{},o=s.garbageCollect=s.garbageCollect||[];s.font!==t&&(n=s.data={},o=s.garbageCollect=[],s.font=t),i.save(),i.font=t;let a=0,r=e.length,l,h,d,c,u;for(l=0;le.length){for(l=0;l0&&i.stroke()}}function Mt(i,t,e){return e=e||.5,!t||i&&i.x>t.left-e&&i.xt.top-e&&i.y0&&o.strokeColor!=="",l,h;for(i.save(),i.font=n.string,(function(d,c){c.translation&&d.translate(c.translation[0],c.translation[1]),I(c.rotation)||d.rotate(c.rotation),c.color&&(d.fillStyle=c.color),c.textAlign&&(d.textAlign=c.textAlign),c.textBaseline&&(d.textBaseline=c.textBaseline)})(i,o),l=0;li[0]){let o=e||i;s===void 0&&(s=Zs("_fallback",i));let a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:o,_fallback:s,_getTarget:n,override:r=>Ye([r,...i],t,o,s)};return new Proxy(a,{deleteProperty:(r,l)=>(delete r[l],delete r._keys,delete i[0][l],!0),get:(r,l)=>qs(r,l,()=>(function(h,d,c,u){let f;for(let p of d)if(f=Zs(ga(p,h),c),f!==void 0)return Ii(h,f)?zi(c,u,h,f):f})(l,t,i,r)),getOwnPropertyDescriptor:(r,l)=>Reflect.getOwnPropertyDescriptor(r._scopes[0],l),getPrototypeOf:()=>Reflect.getPrototypeOf(i[0]),has:(r,l)=>Js(r).includes(l),ownKeys:r=>Js(r),set(r,l,h){let d=r._storage||(r._storage=n());return r[l]=d[l]=h,delete r._keys,!0}})}function Xt(i,t,e,s){let n={_cacheable:!1,_proxy:i,_context:t,_subProxy:e,_stack:new Set,_descriptors:Ri(i,s),setContext:o=>Xt(i,o,e,s),override:o=>Xt(i.override(o),t,e,s)};return new Proxy(n,{deleteProperty:(o,a)=>(delete o[a],delete i[a],!0),get:(o,a,r)=>qs(o,a,()=>(function(l,h,d){let{_proxy:c,_context:u,_subProxy:f,_descriptors:p}=l,g=c[h];return Pt(g)&&p.isScriptable(h)&&(g=(function(m,b,y,_){let{_proxy:x,_context:v,_subProxy:M,_stack:w}=y;if(w.has(m))throw new Error("Recursion detected: "+Array.from(w).join("->")+"->"+m);w.add(m);let k=b(v,M||_);return w.delete(m),Ii(m,k)&&(k=zi(x._scopes,x,m,k)),k})(h,g,l,d)),F(g)&&g.length&&(g=(function(m,b,y,_){let{_proxy:x,_context:v,_subProxy:M,_descriptors:w}=y;if(v.index!==void 0&&_(m))return b[v.index%b.length];if(z(b[0])){let k=b,D=x._scopes.filter(S=>S!==k);b=[];for(let S of k){let T=zi(D,x,m,S);b.push(Xt(T,v,M&&M[m],w))}}return b})(h,g,l,p.isIndexable)),Ii(h,g)&&(g=Xt(g,u,f&&f[h],p)),g})(o,a,r)),getOwnPropertyDescriptor:(o,a)=>o._descriptors.allKeys?Reflect.has(i,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,a),getPrototypeOf:()=>Reflect.getPrototypeOf(i),has:(o,a)=>Reflect.has(i,a),ownKeys:()=>Reflect.ownKeys(i),set:(o,a,r)=>(i[a]=r,delete o[a],!0)})}function Ri(i,t={scriptable:!0,indexable:!0}){let{_scriptable:e=t.scriptable,_indexable:s=t.indexable,_allKeys:n=t.allKeys}=i;return{allKeys:n,scriptable:e,indexable:s,isScriptable:Pt(e)?e:()=>e,isIndexable:Pt(s)?s:()=>s}}let ga=(i,t)=>i?i+Oe(t):t,Ii=(i,t)=>z(t)&&i!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function qs(i,t,e){if(Object.prototype.hasOwnProperty.call(i,t)||t==="constructor")return i[t];let s=e();return i[t]=s,s}function Ks(i,t,e){return Pt(i)?i(t,e):i}let pa=(i,t)=>i===!0?t:typeof i=="string"?St(t,i):void 0;function ma(i,t,e,s,n){for(let o of t){let a=pa(e,o);if(a){i.add(a);let r=Ks(a._fallback,e,n);if(r!==void 0&&r!==e&&r!==s)return r}else if(a===!1&&s!==void 0&&e!==s)return null}return!1}function zi(i,t,e,s){let n=t._rootScopes,o=Ks(t._fallback,e,s),a=[...i,...n],r=new Set;r.add(s);let l=Gs(r,a,e,o||e,s);return l!==null&&(o===void 0||o===e||(l=Gs(r,a,o,l,s),l!==null))&&Ye(Array.from(r),[""],n,o,()=>(function(h,d,c){let u=h._getTarget();d in u||(u[d]={});let f=u[d];return F(f)&&z(c)?c:f||{}})(t,e,s))}function Gs(i,t,e,s,n){for(;e;)e=ma(i,t,e,s,n);return e}function Zs(i,t){for(let e of t){if(!e)continue;let s=e[i];if(s!==void 0)return s}}function Js(i){let t=i._keys;return t||(t=i._keys=(function(e){let s=new Set;for(let n of e)for(let o of Object.keys(n).filter(a=>!a.startsWith("_")))s.add(o);return Array.from(s)})(i._scopes)),t}function Fi(i,t,e,s){let{iScale:n}=i,{key:o="r"}=this._parsing,a=new Array(s),r,l,h,d;for(r=0,l=s;rti==="x"?"y":"x";function tn(i,t,e,s){let n=i.skip?t:i,o=t,a=e.skip?t:e,r=Te(o,n),l=Te(a,o),h=r/(r+l),d=l/(r+l);h=isNaN(h)?0:h,d=isNaN(d)?0:d;let c=s*h,u=s*d;return{previous:{x:o.x-c*(a.x-n.x),y:o.y-c*(a.y-n.y)},next:{x:o.x+u*(a.x-n.x),y:o.y+u*(a.y-n.y)}}}function en(i,t="x"){let e=Qs(t),s=i.length,n=Array(s).fill(0),o=Array(s),a,r,l,h=oe(i,0);for(a=0;a!h.skip)),t.cubicInterpolationMode==="monotone")en(i,n);else{let h=s?i[i.length-1]:i[0];for(o=0,a=i.length;oi===0||i===1,nn=(i,t,e)=>-Math.pow(2,10*(i-=1))*Math.sin((i-t)*U/e),on=(i,t,e)=>Math.pow(2,-10*i)*Math.sin((i-t)*U/e)+1,ae={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>1-Math.cos(i*K),easeOutSine:i=>Math.sin(i*K),easeInOutSine:i=>-.5*(Math.cos(Y*i)-1),easeInExpo:i=>i===0?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>i===1?1:1-Math.pow(2,-10*i),easeInOutExpo:i=>Xe(i)?i:i<.5?.5*Math.pow(2,10*(2*i-1)):.5*(2-Math.pow(2,-10*(2*i-1))),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>Xe(i)?i:nn(i,.075,.3),easeOutElastic:i=>Xe(i)?i:on(i,.075,.3),easeInOutElastic(i){return Xe(i)?i:i<.5?.5*nn(2*i,.1125,.45):.5+.5*on(2*i-1,.1125,.45)},easeInBack(i){return i*i*((1.70158+1)*i-1.70158)},easeOutBack(i){return(i-=1)*i*((1.70158+1)*i+1.70158)+1},easeInOutBack(i){let t=1.70158;return(i/=.5)<1?i*i*((1+(t*=1.525))*i-t)*.5:.5*((i-=2)*i*((1+(t*=1.525))*i+t)+2)},easeInBounce:i=>1-ae.easeOutBounce(1-i),easeOutBounce(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},easeInOutBounce:i=>i<.5?.5*ae.easeInBounce(2*i):.5*ae.easeOutBounce(2*i-1)+.5};function Vt(i,t,e,s){return{x:i.x+e*(t.x-i.x),y:i.y+e*(t.y-i.y)}}function an(i,t,e,s){return{x:i.x+e*(t.x-i.x),y:s==="middle"?e<.5?i.y:t.y:s==="after"?e<1?i.y:t.y:e>0?t.y:i.y}}function rn(i,t,e,s){let n={x:i.cp2x,y:i.cp2y},o={x:t.cp1x,y:t.cp1y},a=Vt(i,n,e),r=Vt(n,o,e),l=Vt(o,t,e),h=Vt(a,r,e),d=Vt(r,l,e);return Vt(h,d,e)}let xa=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,_a=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function ln(i,t){let e=(""+i).match(xa);if(!e||e[1]==="normal")return 1.2*t;switch(i=+e[2],e[3]){case"px":return i;case"%":i/=100}return t*i}let ya=i=>+i||0;function qe(i,t){let e={},s=z(t),n=s?Object.keys(t):t,o=z(i)?s?a=>E(i[a],i[t[a]]):a=>i[a]:()=>i;for(let a of n)e[a]=ya(o(a));return e}function Vi(i){return qe(i,{top:"y",right:"x",bottom:"y",left:"x"})}function Bt(i){return qe(i,["topLeft","topRight","bottomLeft","bottomRight"])}function et(i){let t=Vi(i);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function J(i,t){i=i||{},t=t||X.font;let e=E(i.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let s=E(i.style,t.style);s&&!(""+s).match(_a)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);let n={family:E(i.family,t.family),lineHeight:ln(E(i.lineHeight,t.lineHeight),e),size:e,style:s,weight:E(i.weight,t.weight),string:""};return n.string=$s(n),n}function re(i,t,e,s){let n,o,a,r=!0;for(n=0,o=i.length;ne&&r===0?0:r+l;return{min:a(s,-Math.abs(o)),max:a(n,o)}}function Ot(i,t){return Object.assign(Object.create(i),t)}function qt(i,t,e){return i?(function(s,n){return{x:o=>s+s+n-o,setWidth(o){n=o},textAlign:o=>o==="center"?o:o==="right"?"left":"right",xPlus:(o,a)=>o-a,leftForLtr:(o,a)=>o-a}})(t,e):{x:s=>s,setWidth(s){},textAlign:s=>s,xPlus:(s,n)=>s+n,leftForLtr:(s,n)=>s}}function Bi(i,t){let e,s;t!=="ltr"&&t!=="rtl"||(e=i.canvas.style,s=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),i.prevTextDirection=s)}function Wi(i,t){t!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",t[0],t[1]))}function cn(i){return i==="angle"?{between:ee,compare:ks,normalize:nt}:{between:_t,compare:(t,e)=>t-e,normalize:t=>t}}function dn({start:i,end:t,count:e,loop:s,style:n}){return{start:i%e,end:t%e,loop:s&&(t-i+1)%e==0,style:n}}function Ni(i,t,e){if(!e)return[i];let{property:s,start:n,end:o}=e,a=t.length,{compare:r,between:l,normalize:h}=cn(s),{start:d,end:c,loop:u,style:f}=(function(M,w,k){let{property:D,start:S,end:T}=k,{between:A,normalize:P}=cn(D),O=w.length,C,R,{start:H,end:V,loop:st}=M;if(st){for(H+=O,V+=O,C=0,R=O;Cy||l(n,b,g)&&r(n,b)!==0,v=()=>!y||r(o,g)===0||l(o,b,g);for(let M=d,w=d;M<=c;++M)m=t[M%a],m.skip||(g=h(m[s]),g!==b&&(y=l(g,n,o),_===null&&x()&&(_=r(g,n)===0?M:w),_!==null&&v()&&(p.push(dn({start:_,end:M,loop:u,count:a,style:f})),_=null),w=M,b=g));return _!==null&&p.push(dn({start:_,end:c,loop:u,count:a,style:f})),p}function Hi(i,t){let e=[],s=i.segments;for(let n=0;nu&&l[f%h].skip;)f--;return f%=h,{start:u,end:f}})(e,n,o,s);return s===!0?fn(i,[{start:a,end:r,loop:o}],e,t):fn(i,(function(l,h,d,c){let u=l.length,f=[],p,g=h,m=l[h];for(p=h+1;p<=d;++p){let b=l[p%u];b.skip||b.stop?m.skip||(c=!1,f.push({start:h%u,end:(p-1)%u,loop:c}),h=g=b.stop?p:null):(g=p,m.skip&&(h=p)),m=b}return g!==null&&f.push({start:h%u,end:g%u,loop:c}),f})(e,a,r!I(g[c.axis]));d.lo-=Math.max(0,f);let p=u.slice(d.hi).findIndex(g=>!I(g[c.axis]));d.hi+=Math.max(0,p)}return d}if(n._sharedOptions){let d=o[0],c=typeof d.getRange=="function"&&d.getRange(t);if(c){let u=h(o,t,e-c),f=h(o,t,e+c);return{lo:u.lo,hi:f.hi}}}}return{lo:0,hi:o.length-1}}function xe(i,t,e,s,n){let o=i.getSortedVisibleDatasetMetas(),a=e[t];for(let r=0,l=o.length;r{l[a]&&l[a](t[e],n)&&(o.push({element:l,datasetIndex:h,index:d}),r=r||l.inRange(t.x,t.y,n))}),s&&!r?[]:o}var mn={evaluateInteractionItems:xe,modes:{index(i,t,e,s){let n=It(t,i),o=e.axis||"x",a=e.includeInvisible||!1,r=e.intersect?ji(i,n,o,s,a):$i(i,n,o,!1,s,a),l=[];return r.length?(i.getSortedVisibleDatasetMetas().forEach(h=>{let d=r[0].index,c=h.data[d];c&&!c.skip&&l.push({element:c,datasetIndex:h.index,index:d})}),l):[]},dataset(i,t,e,s){let n=It(t,i),o=e.axis||"xy",a=e.includeInvisible||!1,r=e.intersect?ji(i,n,o,s,a):$i(i,n,o,!1,s,a);if(r.length>0){let l=r[0].datasetIndex,h=i.getDatasetMeta(l).data;r=[];for(let d=0;dji(i,It(t,i),e.axis||"xy",s,e.includeInvisible||!1),nearest(i,t,e,s){let n=It(t,i),o=e.axis||"xy",a=e.includeInvisible||!1;return $i(i,n,o,e.intersect,s,a)},x:(i,t,e,s)=>pn(i,It(t,i),"x",e.intersect,s),y:(i,t,e,s)=>pn(i,It(t,i),"y",e.intersect,s)}};let bn=["left","top","right","bottom"];function _e(i,t){return i.filter(e=>e.pos===t)}function xn(i,t){return i.filter(e=>bn.indexOf(e.pos)===-1&&e.box.axis===t)}function ye(i,t){return i.sort((e,s)=>{let n=t?s:e,o=t?e:s;return n.weight===o.weight?n.index-o.index:n.weight-o.weight})}function Sa(i,t){let e=(function(l){let h={};for(let d of l){let{stack:c,pos:u,stackWeight:f}=d;if(!c||!bn.includes(u))continue;let p=h[c]||(h[c]={count:0,placed:0,weight:0,size:0});p.count++,p.weight+=f}return h})(i),{vBoxMaxWidth:s,hBoxMaxHeight:n}=t,o,a,r;for(o=0,a=i.length;o{o[a]=Math.max(t[a],e[a])}),o}return s(i?["left","right"]:["top","bottom"])}function ve(i,t,e,s){let n=[],o,a,r,l,h,d;for(o=0,a=i.length,h=0;ok.box.fullSize),!0),y=ye(_e(m,"left"),!0),_=ye(_e(m,"right")),x=ye(_e(m,"top"),!0),v=ye(_e(m,"bottom")),M=xn(m,"x"),w=xn(m,"y");return{fullSize:b,leftAndTop:y.concat(x),rightAndBottom:_.concat(w).concat(v).concat(M),chartArea:_e(m,"chartArea"),vertical:y.concat(_).concat(w),horizontal:x.concat(v).concat(M)}})(i.boxes),l=r.vertical,h=r.horizontal;B(i.boxes,g=>{typeof g.beforeLayout=="function"&&g.beforeLayout()});let d=l.reduce((g,m)=>m.box.options&&m.box.options.display===!1?g:g+1,0)||1,c=Object.freeze({outerWidth:t,outerHeight:e,padding:n,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/d,hBoxMaxHeight:a/2}),u=Object.assign({},n);yn(u,et(s));let f=Object.assign({maxPadding:u,w:o,h:a,x:n.left,y:n.top},n),p=Sa(l.concat(h),c);ve(r.fullSize,f,c,p),ve(l,f,c,p),ve(h,f,c,p)&&ve(l,f,c,p),(function(g){let m=g.maxPadding;function b(y){let _=Math.max(m[y]-g[y],0);return g[y]+=_,_}g.y+=b("top"),g.x+=b("left"),b("right"),b("bottom")})(f),vn(r.leftAndTop,f,c,p),f.x+=f.w,f.y+=f.h,vn(r.rightAndBottom,f,c,p),i.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},B(r.chartArea,g=>{let m=g.box;Object.assign(m,i.chartArea),m.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class Yi{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,s){}removeEventListener(t,e,s){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,s,n){return e=Math.max(0,e||t.width),s=s||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):s)}}isAttached(t){return!0}updateConfig(t){}}class Mn extends Yi{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}let Ge="$chartjs",Ca={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},wn=i=>i===null||i==="",kn=!!js&&{passive:!0};function Oa(i,t,e){i&&i.canvas&&i.canvas.removeEventListener(t,e,kn)}function Ze(i,t){for(let e of i)if(e===t||e.contains(t))return!0}function Aa(i,t,e){let s=i.canvas,n=new MutationObserver(o=>{let a=!1;for(let r of o)a=a||Ze(r.addedNodes,s),a=a&&!Ze(r.removedNodes,s);a&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}function Ta(i,t,e){let s=i.canvas,n=new MutationObserver(o=>{let a=!1;for(let r of o)a=a||Ze(r.removedNodes,s),a=a&&!Ze(r.addedNodes,s);a&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}let Me=new Map,Sn=0;function Pn(){let i=window.devicePixelRatio;i!==Sn&&(Sn=i,Me.forEach((t,e)=>{e.currentDevicePixelRatio!==i&&t()}))}function La(i,t,e){let s=i.canvas,n=s&&We(s);if(!n)return;let o=_i((r,l)=>{let h=n.clientWidth;e(r,l),h{let l=r[0],h=l.contentRect.width,d=l.contentRect.height;h===0&&d===0||o(h,d)});return a.observe(n),(function(r,l){Me.size||window.addEventListener("resize",Pn),Me.set(r,l)})(i,o),a}function Ui(i,t,e){e&&e.disconnect(),t==="resize"&&(function(s){Me.delete(s),Me.size||window.removeEventListener("resize",Pn)})(i)}function Ea(i,t,e){let s=i.canvas,n=_i(o=>{i.ctx!==null&&e((function(a,r){let l=Ca[a.type]||a.type,{x:h,y:d}=It(a,r);return{type:l,chart:r,native:a,x:h!==void 0?h:null,y:d!==void 0?d:null}})(o,i))},i);return(function(o,a,r){o&&o.addEventListener(a,r,kn)})(s,t,n),n}class Dn extends Yi{acquireContext(t,e){let s=t&&t.getContext&&t.getContext("2d");return s&&s.canvas===t?((function(n,o){let a=n.style,r=n.getAttribute("height"),l=n.getAttribute("width");if(n[Ge]={initial:{height:r,width:l,style:{display:a.display,height:a.height,width:a.width}}},a.display=a.display||"block",a.boxSizing=a.boxSizing||"border-box",wn(l)){let h=Ti(n,"width");h!==void 0&&(n.width=h)}if(wn(r))if(n.style.height==="")n.height=n.width/(o||2);else{let h=Ti(n,"height");h!==void 0&&(n.height=h)}})(t,e),s):null}releaseContext(t){let e=t.canvas;if(!e[Ge])return!1;let s=e[Ge].initial;["height","width"].forEach(o=>{let a=s[o];I(a)?e.removeAttribute(o):e.setAttribute(o,a)});let n=s.style||{};return Object.keys(n).forEach(o=>{e.style[o]=n[o]}),e.width=e.width,delete e[Ge],!0}addEventListener(t,e,s){this.removeEventListener(t,e);let n=t.$proxies||(t.$proxies={}),o={attach:Aa,detach:Ta,resize:La}[e]||Ea;n[e]=o(t,e,s)}removeEventListener(t,e){let s=t.$proxies||(t.$proxies={}),n=s[e];n&&(({attach:Ui,detach:Ui,resize:Ui}[e]||Oa)(t,e,n),s[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,s,n){return Hs(t,e,s,n)}isAttached(t){let e=t&&We(t);return!(!e||!e.isConnected)}}function Cn(i){return!Be()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?Mn:Dn}var On=Object.freeze({__proto__:null,BasePlatform:Yi,BasicPlatform:Mn,DomPlatform:Dn,_detectPlatform:Cn});let An="transparent",Ra={boolean:(i,t,e)=>e>.5?t:i,color(i,t,e){let s=Di(i||An),n=s.valid&&Di(t||An);return n&&n.valid?n.mix(s,e).hexString():t},number:(i,t,e)=>i+(t-i)*e};class Tn{constructor(t,e,s,n){let o=e[s];n=re([t.to,n,o,t.from]);let a=re([t.from,o,n]);this._active=!0,this._fn=t.fn||Ra[t.type||typeof a],this._easing=ae[t.easing]||ae.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=s,this._from=a,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,s){if(this._active){this._notify(!1);let n=this._target[this._prop],o=s-this._start,a=this._duration-o;this._start=s,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=re([t.to,e,n,t.from]),this._from=re([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){let e=t-this._start,s=this._duration,n=this._prop,o=this._from,a=this._loop,r=this._to,l;if(this._active=o!==r&&(a||e1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[n]=this._fn(o,r,l))}wait(){let t=this._promises||(this._promises=[]);return new Promise((e,s)=>{t.push({res:e,rej:s})})}_notify(t){let e=t?"res":"rej",s=this._promises||[];for(let n=0;n{let o=t[n];if(!z(o))return;let a={};for(let r of e)a[r]=o[r];(F(o.properties)&&o.properties||[n]).forEach(r=>{r!==n&&s.has(r)||s.set(r,a)})})}_animateOptions(t,e){let s=e.options,n=(function(a,r){if(!r)return;let l=a.options;return l?(l.$shared&&(a.options=l=Object.assign({},l,{$shared:!1,$animations:{}})),l):void(a.options=r)})(t,s);if(!n)return[];let o=this._createAnimations(n,s);return s.$shared&&(function(a,r){let l=[],h=Object.keys(r);for(let d=0;d{t.options=s},()=>{}),o}_createAnimations(t,e){let s=this._properties,n=[],o=t.$animations||(t.$animations={}),a=Object.keys(e),r=Date.now(),l;for(l=a.length-1;l>=0;--l){let h=a[l];if(h.charAt(0)==="$")continue;if(h==="options"){n.push(...this._animateOptions(t,e));continue}let d=e[h],c=o[h],u=s.get(h);if(c){if(u&&c.active()){c.update(u,d,r);continue}c.cancel()}u&&u.duration?(o[h]=c=new Tn(u,t,h,d),n.push(c)):t[h]=d}return n}update(t,e){if(this._properties.size===0)return void Object.assign(t,e);let s=this._createAnimations(t,e);return s.length?(vt.add(this._chart,s),!0):void 0}}function Ln(i,t){let e=i&&i.options||{},s=e.reverse,n=e.min===void 0?t:0,o=e.max===void 0?t:0;return{start:s?o:n,end:s?n:o}}function En(i,t){let e=[],s=i._getSortedDatasetMetas(t),n,o;for(n=0,o=s.length;n0||!e&&o<0)return n.index}return null}function zn(i,t){let{chart:e,_cachedMeta:s}=i,n=e._stacks||(e._stacks={}),{iScale:o,vScale:a,index:r}=s,l=o.axis,h=a.axis,d=(function(f,p,g){return`${f.id}.${p.id}.${g.stack||g.type}`})(o,a,s),c=t.length,u;for(let f=0;fe[s].axis===t).shift()}function we(i,t){let e=i.controller.index,s=i.vScale&&i.vScale.axis;if(s){t=t||i._parsed;for(let n of t){let o=n._stacks;if(!o||o[s]===void 0||o[s][e]===void 0)return;delete o[s][e],o[s]._visualValues!==void 0&&o[s]._visualValues[e]!==void 0&&delete o[s]._visualValues[e]}}}let Gi=i=>i==="reset"||i==="none",Fn=(i,t)=>t?i:Object.assign({},i);class At{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){let t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=qi(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&we(this._cachedMeta),this.index=t}linkScales(){let t=this.chart,e=this._cachedMeta,s=this.getDataset(),n=(c,u,f,p)=>c==="x"?u:c==="r"?p:f,o=e.xAxisID=E(s.xAxisID,Ki(t,"x")),a=e.yAxisID=E(s.yAxisID,Ki(t,"y")),r=e.rAxisID=E(s.rAxisID,Ki(t,"r")),l=e.indexAxis,h=e.iAxisID=n(l,o,a,r),d=e.vAxisID=n(l,a,o,r);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(a),e.rScale=this.getScaleForId(r),e.iScale=this.getScaleForId(h),e.vScale=this.getScaleForId(d)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){let e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){let t=this._cachedMeta;this._data&&mi(this._data,this),t._stacked&&we(t)}_dataCheck(){let t=this.getDataset(),e=t.data||(t.data=[]),s=this._data;if(z(e)){let n=this._cachedMeta;this._data=(function(o,a){let{iScale:r,vScale:l}=a,h=r.axis==="x"?"x":"y",d=l.axis==="x"?"x":"y",c=Object.keys(o),u=new Array(c.length),f,p,g;for(f=0,p=c.length;f0&&s._parsed[t-1];if(this._parsing===!1)s._parsed=n,s._sorted=!0,d=n;else{d=F(n[t])?this.parseArrayData(s,n,t,e):z(n[t])?this.parseObjectData(s,n,t,e):this.parsePrimitiveData(s,n,t,e);let f=()=>h[r]===null||u&&h[r]g&&!m.hidden&&m._stacked&&{keys:En(b,!0),values:null})(e,s,this.chart),h={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:d,max:c}=(function(g){let{min:m,max:b,minDefined:y,maxDefined:_}=g.getUserBounds();return{min:y?m:Number.NEGATIVE_INFINITY,max:_?b:Number.POSITIVE_INFINITY}})(r),u,f;function p(){f=n[u];let g=f[r.axis];return!L(f[t.axis])||d>g||c=0;--u)if(!p()){this.updateRangeFromParsed(h,t,f,l);break}}return h}getAllParsedValues(t){let e=this._cachedMeta._parsed,s=[],n,o,a;for(n=0,o=e.length;n=0&&tthis.getContext(s,n,e),c);return p.$shared&&(p.$shared=l,o[a]=Object.freeze(Fn(p,l))),p}_resolveAnimations(t,e,s){let n=this.chart,o=this._cachedDataOpts,a=`animation-${e}`,r=o[a];if(r)return r;let l;if(n.options.animation!==!1){let d=this.chart.config,c=d.datasetAnimationScopeKeys(this._type,e),u=d.getOptionScopes(this.getDataset(),c);l=d.createResolver(u,this.getContext(t,s,e))}let h=new Xi(n,l&&l.animations);return l&&l._cacheable&&(o[a]=Object.freeze(h)),h}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Gi(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){let s=this.resolveDataElementOptions(t,e),n=this._sharedOptions,o=this.getSharedOptions(s),a=this.includeOptions(e,o)||o!==n;return this.updateSharedOptions(o,e,s),{sharedOptions:o,includeOptions:a}}updateElement(t,e,s,n){Gi(n)?Object.assign(t,s):this._resolveAnimations(e,n).update(t,s)}updateSharedOptions(t,e,s){t&&!Gi(e)&&this._resolveAnimations(void 0,e).update(t,s)}_setStyle(t,e,s,n){t.active=n;let o=this.getStyle(e,n);this._resolveAnimations(e,s,n).update(t,{options:!n&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,s){this._setStyle(t,s,"active",!1)}setHoverStyle(t,e,s){this._setStyle(t,s,"active",!0)}_removeDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){let e=this._data,s=this._cachedMeta.data;for(let[r,l,h]of this._syncList)this[r](l,h);this._syncList=[];let n=s.length,o=e.length,a=Math.min(o,n);a&&this.parse(0,a),o>n?this._insertElements(n,o-n,t):o{for(h.length+=e,r=h.length-1;r>=a;r--)h[r]=h[r-e]};for(l(o),r=t;r{n[o]=s[o]&&s[o].active()?s[o]._to:this[o]}),n}}function za(i,t){let e=i.options.ticks,s=(function(c){let u=c.options.offset,f=c._tickSize(),p=c._length/f+(u?0:1),g=c._maxLength/f;return Math.floor(Math.min(p,g))})(i),n=Math.min(e.maxTicksLimit||s,s),o=e.major.enabled?(function(c){let u=[],f,p;for(f=0,p=c.length;fn)return(function(c,u,f,p){let g,m=0,b=f[0];for(p=Math.ceil(p),g=0;gg)return _}return Math.max(g,1)})(o,t,n);if(a>0){let c,u,f=a>1?Math.round((l-r)/(a-1)):null;for(Je(t,h,d,I(f)?0:r-f,r),c=0,u=a-1;ct==="top"||t==="left"?i[t]+e:i[t]-e,Bn=(i,t)=>Math.min(t||i,i);function Wn(i,t){let e=[],s=i.length/t,n=i.length,o=0;for(;oa+r)))return h}function ke(i){return i.drawTicks?i.tickLength:0}function Nn(i,t){if(!i.display)return 0;let e=J(i.font,t),s=et(i.padding);return(F(i.text)?i.text.length:1)*e.lineHeight+s.height}function Va(i,t,e){let s=Ee(i);return(e&&t!=="right"||!e&&t==="right")&&(s=(n=>n==="left"?"right":n==="right"?"left":n)(s)),s}class Wt extends wt{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:s,_suggestedMax:n}=this;return t=q(t,Number.POSITIVE_INFINITY),e=q(e,Number.NEGATIVE_INFINITY),s=q(s,Number.POSITIVE_INFINITY),n=q(n,Number.NEGATIVE_INFINITY),{min:q(t,s),max:q(e,n),minDefined:L(t),maxDefined:L(e)}}getMinMax(t){let e,{min:s,max:n,minDefined:o,maxDefined:a}=this.getUserBounds();if(o&&a)return{min:s,max:n};let r=this.getMatchingVisibleMetas();for(let l=0,h=r.length;ln?n:s,n=o&&s>n?s:n,{min:q(s,q(n,s)),max:q(n,q(s,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){N(this.options.beforeUpdate,[this])}update(t,e,s){let{beginAtZero:n,grace:o,ticks:a}=this.options,r=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=s=Object.assign({left:0,right:0,top:0,bottom:0},s),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+s.left+s.right:this.height+s.top+s.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=hn(this,o,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let l=r=o||s<=1||!this.isHorizontal())return void(this.labelRotation=n);let d=this._getLabelSizes(),c=d.widest.width,u=d.highest.height,f=Q(this.chart.width-c,0,this.maxWidth);a=t.offset?this.maxWidth/s:f/(s-1),c+6>a&&(a=f/(s-(t.offset?.5:1)),r=this.maxHeight-ke(t.grid)-e.padding-Nn(t.title,this.chart.options.font),l=Math.sqrt(c*c+u*u),h=Ae(Math.min(Math.asin(Q((d.highest.height+6)/a,-1,1)),Math.asin(Q(r/l,-1,1))-Math.asin(Q(u/l,-1,1)))),h=Math.max(n,Math.min(o,h))),this.labelRotation=h}afterCalculateLabelRotation(){N(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){N(this.options.beforeFit,[this])}fit(){let t={width:0,height:0},{chart:e,options:{ticks:s,title:n,grid:o}}=this,a=this._isVisible(),r=this.isHorizontal();if(a){let l=Nn(n,e.options.font);if(r?(t.width=this.maxWidth,t.height=ke(o)+l):(t.height=this.maxHeight,t.width=ke(o)+l),s.display&&this.ticks.length){let{first:h,last:d,widest:c,highest:u}=this._getLabelSizes(),f=2*s.padding,p=ct(this.labelRotation),g=Math.cos(p),m=Math.sin(p);if(r){let b=s.mirror?0:m*c.width+g*u.height;t.height=Math.min(this.maxHeight,t.height+b+f)}else{let b=s.mirror?0:g*c.width+m*u.height;t.width=Math.min(this.maxWidth,t.width+b+f)}this._calculatePadding(h,d,m,g)}}this._handleMargins(),r?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,s,n){let{ticks:{align:o,padding:a},position:r}=this.options,l=this.labelRotation!==0,h=r!=="top"&&this.axis==="x";if(this.isHorizontal()){let d=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1),u=0,f=0;l?h?(u=n*t.width,f=s*e.height):(u=s*t.height,f=n*e.width):o==="start"?f=e.width:o==="end"?u=t.width:o!=="inner"&&(u=t.width/2,f=e.width/2),this.paddingLeft=Math.max((u-d+a)*this.width/(this.width-d),0),this.paddingRight=Math.max((f-c+a)*this.width/(this.width-c),0)}else{let d=e.height/2,c=t.height/2;o==="start"?(d=0,c=t.height):o==="end"&&(d=e.height,c=0),this.paddingTop=d+a,this.paddingBottom=c+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){N(this.options.afterFit,[this])}isHorizontal(){let{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,s;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,s=t.length;e{let A=T.gc,P=A.length/2,O;if(P>S){for(O=0;O({width:a[D]||0,height:r[D]||0});return{first:k(0),last:k(e-1),widest:k(M),highest:k(w),widths:a,heights:r}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){let e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);let e=this._startPixel+t*this._length;return Ss(this._alignToPixels?zt(this.chart,e,0):e)}getDecimalForPixel(t){let e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){let e=this.ticks||[];if(t>=0&&tr*n?r/s:l/n:l*n0}_computeGridLineItems(t){let e=this.axis,s=this.chart,n=this.options,{grid:o,position:a,border:r}=n,l=o.offset,h=this.isHorizontal(),d=this.ticks.length+(l?1:0),c=ke(o),u=[],f=r.setContext(this.getContext()),p=f.display?f.width:0,g=p/2,m=function(C){return zt(s,C,p)},b,y,_,x,v,M,w,k,D,S,T,A;if(a==="top")b=m(this.bottom),M=this.bottom-c,k=b-g,S=m(t.top)+g,A=t.bottom;else if(a==="bottom")b=m(this.top),S=t.top,A=m(t.bottom)-g,M=b+g,k=this.top+c;else if(a==="left")b=m(this.right),v=this.right-c,w=b-g,D=m(t.left)+g,T=t.right;else if(a==="right")b=m(this.left),D=t.left,T=m(t.right)-g,v=b+g,w=this.left+c;else if(e==="x"){if(a==="center")b=m((t.top+t.bottom)/2+.5);else if(z(a)){let C=Object.keys(a)[0],R=a[C];b=m(this.chart.scales[C].getPixelForValue(R))}S=t.top,A=t.bottom,M=b+g,k=M+c}else if(e==="y"){if(a==="center")b=m((t.left+t.right)/2);else if(z(a)){let C=Object.keys(a)[0],R=a[C];b=m(this.chart.scales[C].getPixelForValue(R))}v=b-g,w=v-c,D=t.left,T=t.right}let P=E(n.ticks.maxTicksLimit,d),O=Math.max(1,Math.ceil(d/P));for(y=0;y0&&(xt-=mt/2)}rt={left:xt,top:bt,width:mt+ut.width,height:pt+ut.height,color:C.backdropColor}}m.push({label:x,font:D,textOffset:A,options:{rotation:g,color:H,strokeColor:V,strokeWidth:st,textAlign:lt,textBaseline:P,translation:[v,M],backdrop:rt}})}return m}_getXAxisLabelAlignment(){let{position:t,ticks:e}=this.options;if(-ct(this.labelRotation))return t==="top"?"left":"right";let s="center";return e.align==="start"?s="left":e.align==="end"?s="right":e.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(t){let{position:e,ticks:{crossAlign:s,mirror:n,padding:o}}=this.options,a=t+o,r=this._getLabelSizes().widest.width,l,h;return e==="left"?n?(h=this.right+o,s==="near"?l="left":s==="center"?(l="center",h+=r/2):(l="right",h+=r)):(h=this.right-a,s==="near"?l="right":s==="center"?(l="center",h-=r/2):(l="left",h=this.left)):e==="right"?n?(h=this.left+o,s==="near"?l="right":s==="center"?(l="center",h-=r/2):(l="left",h-=r)):(h=this.left+a,s==="near"?l="left":s==="center"?(l="center",h+=r/2):(l="right",h=this.right)):l="right",{textAlign:l,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;let t=this.chart,e=this.options.position;return e==="left"||e==="right"?{top:0,left:this.left,bottom:t.height,right:this.right}:e==="top"||e==="bottom"?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){let{ctx:t,options:{backgroundColor:e},left:s,top:n,width:o,height:a}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(s,n,o,a),t.restore())}getLineWidthForValue(t){let e=this.options.grid;if(!this._isVisible()||!e.display)return 0;let s=this.ticks.findIndex(n=>n.value===t);return s>=0?e.setContext(this.getContext(s)).lineWidth:0}drawGrid(t){let e=this.options.grid,s=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t)),o,a,r=(l,h,d)=>{d.width&&d.color&&(s.save(),s.lineWidth=d.width,s.strokeStyle=d.color,s.setLineDash(d.borderDash||[]),s.lineDashOffset=d.borderDashOffset,s.beginPath(),s.moveTo(l.x,l.y),s.lineTo(h.x,h.y),s.stroke(),s.restore())};if(e.display)for(o=0,a=n.length;o{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:e,draw:o=>{this.drawLabels(o)}}]:[{z:e,draw:o=>{this.draw(o)}}]}getMatchingVisibleMetas(t){let e=this.chart.getSortedVisibleDatasetMetas(),s=this.axis+"AxisID",n=[],o,a;for(o=0,a=e.length;o{let p=f.split("."),g=p.pop(),m=[c].concat(p).join("."),b=u[f].split("."),y=b.pop(),_=b.join(".");X.route(m,g,_,y)})})(l,r.defaultRoutes),r.descriptors&&X.describe(l,r.descriptors)})(t,a,s),this.override&&X.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){let e=this.items,s=t.id,n=this.scope;s in e&&delete e[s],n&&s in X[n]&&(delete X[n][s],this.override&&delete Yt[s])}}class Ba{constructor(){this.controllers=new Qe(At,"datasets",!0),this.elements=new Qe(wt,"elements"),this.plugins=new Qe(Object,"plugins"),this.scales=new Qe(Wt,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,s){[...e].forEach(n=>{let o=s||this._getRegistryForType(n);s||o.isForType(n)||o===this.plugins&&n.id?this._exec(t,o,n):B(n,a=>{let r=s||this._getRegistryForType(a);this._exec(t,r,a)})})}_exec(t,e,s){let n=Oe(t);N(s["before"+n],[],s),e[t](s),N(s["after"+n],[],s)}_getRegistryForType(t){for(let e=0;eo.filter(r=>!a.some(l=>r.plugin.id===l.plugin.id));this._notify(n(e,s),t,"stop"),this._notify(n(s,e),t,"start")}}function Na(i,t){return t||i!==!1?i===!0?{}:i:null}function Ha(i,{plugin:t,local:e},s,n){let o=i.pluginScopeKeys(t),a=i.getOptionScopes(s,o);return e&&t.defaults&&a.push(t.defaults),i.createResolver(a,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Zi(i,t){let e=X.datasets[i]||{};return((t.datasets||{})[i]||{}).indexAxis||t.indexAxis||e.indexAxis||"x"}function Hn(i){if(i==="x"||i==="y"||i==="r")return i}function Ji(i,...t){if(Hn(i))return i;for(let s of t){let n=s.axis||((e=s.position)==="top"||e==="bottom"?"x":e==="left"||e==="right"?"y":void 0)||i.length>1&&Hn(i[0].toLowerCase());if(n)return n}var e;throw new Error(`Cannot determine type of '${i}' axis. Please provide 'axis' or 'position' option.`)}function jn(i,t,e){if(e[t+"AxisID"]===i)return{axis:t}}function ja(i,t){let e=Yt[i.type]||{scales:{}},s=t.scales||{},n=Zi(i.type,t),o=Object.create(null);return Object.keys(s).forEach(a=>{let r=s[a];if(!z(r))return console.error(`Invalid scale configuration for scale: ${a}`);if(r._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);let l=Ji(a,r,(function(c,u){if(u.data&&u.data.datasets){let f=u.data.datasets.filter(p=>p.xAxisID===c||p.yAxisID===c);if(f.length)return jn(c,"x",f[0])||jn(c,"y",f[0])}return{}})(a,i),X.scales[r.type]),h=(function(c,u){return c===u?"_index_":"_value_"})(l,n),d=e.scales||{};o[a]=Jt(Object.create(null),[{axis:l},r,d[l],d[h]])}),i.data.datasets.forEach(a=>{let r=a.type||i.type,l=a.indexAxis||Zi(r,t),h=(Yt[r]||{}).scales||{};Object.keys(h).forEach(d=>{let c=(function(f,p){let g=f;return f==="_index_"?g=p:f==="_value_"&&(g=p==="x"?"y":"x"),g})(d,l),u=a[c+"AxisID"]||c;o[u]=o[u]||Object.create(null),Jt(o[u],[{axis:c},s[u],h[d]])})}),Object.keys(o).forEach(a=>{let r=o[a];Jt(r,[X.scales[r.type],X.scale])}),o}function $n(i){let t=i.options||(i.options={});t.plugins=E(t.plugins,{}),t.scales=ja(i,t)}function Yn(i){return(i=i||{}).datasets=i.datasets||[],i.labels=i.labels||[],i}let Un=new Map,Xn=new Set;function ti(i,t){let e=Un.get(i);return e||(e=t(),Un.set(i,e),Xn.add(e)),e}let Se=(i,t,e)=>{let s=St(t,e);s!==void 0&&i.add(s)};class $a{constructor(t){this._config=(function(e){return(e=e||{}).data=Yn(e.data),$n(e),e})(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Yn(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){let t=this._config;this.clearCache(),$n(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return ti(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return ti(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return ti(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){let e=t.id;return ti(`${this.type}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){let s=this._scopeCache,n=s.get(t);return n&&!e||(n=new Map,s.set(t,n)),n}getOptionScopes(t,e,s){let{options:n,type:o}=this,a=this._cachedScopes(t,s),r=a.get(e);if(r)return r;let l=new Set;e.forEach(d=>{t&&(l.add(t),d.forEach(c=>Se(l,t,c))),d.forEach(c=>Se(l,n,c)),d.forEach(c=>Se(l,Yt[o]||{},c)),d.forEach(c=>Se(l,X,c)),d.forEach(c=>Se(l,Ci,c))});let h=Array.from(l);return h.length===0&&h.push(Object.create(null)),Xn.has(e)&&a.set(e,h),h}chartOptionScopes(){let{options:t,type:e}=this;return[t,Yt[e]||{},X.datasets[e]||{},{type:e},X,Ci]}resolveNamedOptions(t,e,s,n=[""]){let o={$shared:!0},{resolver:a,subPrefixes:r}=qn(this._resolverCache,t,n),l=a;(function(h,d){let{isScriptable:c,isIndexable:u}=Ri(h);for(let f of d){let p=c(f),g=u(f),m=(g||p)&&h[f];if(p&&(Pt(m)||Ya(m))||g&&F(m))return!0}return!1})(a,e)&&(o.$shared=!1,l=Xt(a,s=Pt(s)?s():s,this.createResolver(t,s,r)));for(let h of e)o[h]=l[h];return o}createResolver(t,e,s=[""],n){let{resolver:o}=qn(this._resolverCache,t,s);return z(e)?Xt(o,e,void 0,n):o}}function qn(i,t,e){let s=i.get(t);s||(s=new Map,i.set(t,s));let n=e.join(),o=s.get(n);return o||(o={resolver:Ye(t,e),subPrefixes:e.filter(a=>!a.toLowerCase().includes("hover"))},s.set(n,o)),o}let Ya=i=>z(i)&&Object.getOwnPropertyNames(i).some(t=>Pt(i[t])),Ua=["top","bottom","left","right","chartArea"];function Kn(i,t){return i==="top"||i==="bottom"||Ua.indexOf(i)===-1&&t==="x"}function Gn(i,t){return function(e,s){return e[i]===s[i]?e[t]-s[t]:e[i]-s[i]}}function Zn(i){let t=i.chart,e=t.options.animation;t.notifyPlugins("afterRender"),N(e&&e.onComplete,[i],t)}function Xa(i){let t=i.chart,e=t.options.animation;N(e&&e.onProgress,[i],t)}function Jn(i){return Be()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}let ei={},Qn=i=>{let t=Jn(i);return Object.values(ei).filter(e=>e.canvas===t).pop()};function qa(i,t,e){let s=Object.keys(i);for(let n of s){let o=+n;if(o>=t){let a=i[n];delete i[n],(e>0||o>t)&&(i[o+e]=a)}}}function ii(i,t,e){return i.options.clip?i[e]:t[e]}class G{static defaults=X;static instances=ei;static overrides=Yt;static registry=gt;static version="4.4.8";static getChart=Qn;static register(...t){gt.add(...t),to()}static unregister(...t){gt.remove(...t),to()}constructor(t,e){let s=this.config=new $a(e),n=Jn(t),o=Qn(n);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");let a=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||Cn(n)),this.platform.updateConfig(s);let r=this.platform.acquireContext(n,a.aspectRatio),l=r&&r.canvas,h=l&&l.height,d=l&&l.width;this.id=ht(),this.ctx=r,this.canvas=l,this.width=d,this.height=h,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Wa,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=As(c=>this.update(c),a.resizeDelay||0),this._dataChanges=[],ei[this.id]=this,r&&l?(vt.listen(this,"complete",Zn),vt.listen(this,"progress",Xa),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){let{options:{aspectRatio:t,maintainAspectRatio:e},width:s,height:n,_aspectRatio:o}=this;return I(t)?e&&o?o:n?s/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return gt}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Ai(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Li(this.canvas,this.ctx),this}stop(){return vt.stop(this),this}resize(t,e){vt.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){let s=this.options,n=this.canvas,o=s.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(n,t,e,o),r=s.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,Ai(this,r,!0)&&(this.notifyPlugins("resize",{size:a}),N(s.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){B(this.options.scales||{},(t,e)=>{t.id=e})}buildOrUpdateScales(){let t=this.options,e=t.scales,s=this.scales,n=Object.keys(s).reduce((a,r)=>(a[r]=!1,a),{}),o=[];e&&(o=o.concat(Object.keys(e).map(a=>{let r=e[a],l=Ji(a,r),h=l==="r",d=l==="x";return{options:r,dposition:h?"chartArea":d?"bottom":"left",dtype:h?"radialLinear":d?"category":"linear"}}))),B(o,a=>{let r=a.options,l=r.id,h=Ji(l,r),d=E(r.type,a.dtype);r.position!==void 0&&Kn(r.position,h)===Kn(a.dposition)||(r.position=a.dposition),n[l]=!0;let c=null;l in s&&s[l].type===d?c=s[l]:(c=new(gt.getScale(d))({id:l,type:d,ctx:this.ctx,chart:this}),s[c.id]=c),c.init(r,t)}),B(n,(a,r)=>{a||delete s[r]}),B(s,a=>{it.configure(this,a,a.options),it.addBox(this,a)})}_updateMetasets(){let t=this._metasets,e=this.data.datasets.length,s=t.length;if(t.sort((n,o)=>n.index-o.index),s>e){for(let n=e;ne.length&&delete this._stacks,t.forEach((s,n)=>{e.filter(o=>o===s._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){let t=[],e=this.data.datasets,s,n;for(this._removeUnreferencedMetasets(),s=0,n=e.length;s{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){let e=this.config;e.update();let s=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!s.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;let o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let h=0,d=this.data.datasets.length;h{h.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Gn("z","_idx"));let{_active:r,_lastEvent:l}=this;l?this._eventHandler(l,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){B(this.scales,t=>{it.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let t=this.options,e=new Set(Object.keys(this._listeners)),s=new Set(t.events);ci(e,s)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(let{method:s,start:n,count:o}of e)qa(t,n,s==="_removeElements"?-o:o)}_getUniformDataChanges(){let t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];let e=this.data.datasets.length,s=o=>new Set(t.filter(a=>a[0]===o).map((a,r)=>r+","+a.splice(1).join(","))),n=s(0);for(let o=1;oo.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;it.update(this,this.width,this.height,t);let e=this.chartArea,s=e.width<=0||e.height<=0;this._layers=[],B(this.boxes,n=>{s&&n.position==="chartArea"||(n.configure&&n.configure(),this._layers.push(...n._layers()))},this),this._layers.forEach((n,o)=>{n._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,s=this.data.datasets.length;e=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){let e=this.ctx,s=t._clip,n=!s.disabled,o=(function(r,l){let{xScale:h,yScale:d}=r;return h&&d?{left:ii(h,l,"left"),right:ii(h,l,"right"),top:ii(d,l,"top"),bottom:ii(d,l,"bottom")}:l})(t,this.chartArea),a={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",a)!==!1&&(n&&me(e,{left:s.left===!1?0:o.left-s.left,right:s.right===!1?this.width:o.right+s.right,top:s.top===!1?0:o.top-s.top,bottom:s.bottom===!1?this.height:o.bottom+s.bottom}),t.controller.draw(),n&&be(e),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(t){return Mt(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,s,n){let o=mn.modes[e];return typeof o=="function"?o(this,t,s,n):[]}getDatasetMeta(t){let e=this.data.datasets[t],s=this._metasets,n=s.filter(o=>o&&o._dataset===e).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},s.push(n)),n}getContext(){return this.$context||(this.$context=Ot(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){let e=this.data.datasets[t];if(!e)return!1;let s=this.getDatasetMeta(t);return typeof s.hidden=="boolean"?!s.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,s){let n=s?"show":"hide",o=this.getDatasetMeta(t),a=o.controller._resolveAnimations(void 0,n);Qt(e)?(o.data[e].hidden=!s,this.update()):(this.setDatasetVisibility(t,s),a.update(o,{visible:s}),this.update(r=>r.datasetIndex===t?n:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){let e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),vt.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,o,a),t[o]=a},n=(o,a,r)=>{o.offsetX=a,o.offsetY=r,this._eventHandler(o)};B(this.options.events,o=>s(o,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let t=this._responsiveListeners,e=this.platform,s=(l,h)=>{e.addEventListener(this,l,h),t[l]=h},n=(l,h)=>{t[l]&&(e.removeEventListener(this,l,h),delete t[l])},o=(l,h)=>{this.canvas&&this.resize(l,h)},a,r=()=>{n("attach",r),this.attached=!0,this.resize(),s("resize",o),s("detach",a)};a=()=>{this.attached=!1,n("resize",o),this._stop(),this._resize(0,0),s("attach",r)},e.isAttached(this.canvas)?r():a()}unbindEvents(){B(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},B(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,s){let n=s?"set":"remove",o,a,r,l;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+n+"DatasetHoverStyle"]()),r=0,l=t.length;r{let a=this.getDatasetMeta(n);if(!a)throw new Error("No dataset found at index "+n);return{datasetIndex:n,element:a.data[o],index:o}});!Ht(s,e)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,e))}notifyPlugins(t,e,s){return this._plugins.notify(this,t,e,s)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,s){let n=this.options.hover,o=(l,h)=>l.filter(d=>!h.some(c=>d.datasetIndex===c.datasetIndex&&d.index===c.index)),a=o(e,t),r=s?t:o(t,e);a.length&&this.updateHoverStyle(a,n.mode,!1),r.length&&n.mode&&this.updateHoverStyle(r,n.mode,!0)}_eventHandler(t,e){let s={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=a=>(a.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",s,n)===!1)return;let o=this._handleEvent(t,e,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,n),(o||s.changed)&&this.render(),this}_handleEvent(t,e,s){let{_active:n=[],options:o}=this,a=e,r=this._getActiveElements(t,n,s,a),l=_s(t),h=(function(c,u,f,p){return f&&c.type!=="mouseout"?p?u:c:null})(t,this._lastEvent,s,l);s&&(this._lastEvent=null,N(o.onHover,[t,r,this],this),l&&N(o.onClick,[t,r,this],this));let d=!Ht(r,n);return(d||e)&&(this._active=r,this._updateHoverStyles(r,n,e)),this._lastEvent=h,d}_getActiveElements(t,e,s,n){if(t.type==="mouseout")return[];if(!s)return e;let o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,n)}}function to(){return B(G.instances,i=>i._plugins.invalidate())}function Kt(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Qi{static override(t){Object.assign(Qi.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return Kt()}parse(){return Kt()}format(){return Kt()}add(){return Kt()}diff(){return Kt()}startOf(){return Kt()}endOf(){return Kt()}}var eo={_date:Qi};function Ka(i){let t=i.iScale,e=(function(h,d){if(!h._cache.$bar){let c=h.getMatchingVisibleMetas(d),u=[];for(let f=0,p=c.length;ff-p))}return h._cache.$bar})(t,i.type),s,n,o,a,r=t._length,l=()=>{o!==32767&&o!==-32768&&(Qt(a)&&(r=Math.min(r,Math.abs(o-a)||r)),a=o)};for(s=0,n=e.length;sMath.abs(c)&&(u=c,f=d),o[a.axis]=f,o._custom={barStart:u,barEnd:f,start:l,end:h,min:d,max:c}})(i,t,e,s):t[e.axis]=e.parse(i,s),t}function so(i,t,e,s){let n=i.iScale,o=i.vScale,a=n.getLabels(),r=n===o,l=[],h,d,c,u;for(h=e,d=e+s;hc.x,f="left",p="right"):(u=c.baset!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let e=t.data;if(e.labels.length&&e.datasets.length){let{labels:{pointStyle:s,color:n}}=t.legend.options;return e.labels.map((o,a)=>{let r=t.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,fontColor:n,lineWidth:r.borderWidth,pointStyle:s,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,e,s){s.chart.toggleDataVisibility(e.index),s.chart.update()}}}};constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){let s=this.getDataset().data,n=this._cachedMeta;if(this._parsing===!1)n._parsed=s;else{let o,a,r=l=>+s[l];if(z(s[t])){let{key:l="value"}=this._parsing;r=h=>+St(s[h],l)}for(o=t,a=t+e;oee(mt,A,P,!0)?1:Math.max(bt,bt*w,xt,xt*w),st=(mt,bt,xt)=>ee(mt,A,P,!0)?-1:Math.min(bt,bt*w,xt,xt*w),rt=V(0,O,R),lt=V(K,C,H),ut=st(Y,O,R),pt=st(Y+K,C,H);k=(rt-ut)/2,D=(lt-pt)/2,S=-(rt+ut)/2,T=-(lt+pt)/2}return{ratioX:k,ratioY:D,offsetX:S,offsetY:T}})(c,d,l),m=(s.width-a)/u,b=(s.height-a)/f,y=Math.max(Math.min(m,b)/2,0),_=Z(this.options.radius,y),x=(_-Math.max(_*l,0))/this._getVisibleDatasetWeightTotal();this.offsetX=p*_,this.offsetY=g*_,n.total=this.calculateTotal(),this.outerRadius=_-x*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-x*h,0),this.updateElements(o,0,o.length,t)}_circumference(t,e){let s=this.options,n=this._cachedMeta,o=this._getCircumference();return e&&s.animation.animateRotate||!this.chart.getDataVisibility(t)||n._parsed[t]===null||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*o/U)}updateElements(t,e,s,n){let o=n==="reset",a=this.chart,r=a.chartArea,l=a.options.animation,h=(r.left+r.right)/2,d=(r.top+r.bottom)/2,c=o&&l.animateScale,u=c?0:this.innerRadius,f=c?0:this.outerRadius,{sharedOptions:p,includeOptions:g}=this._getSharedOptions(e,n),m,b=this._getRotation();for(m=0;m0&&!isNaN(t)?U*(Math.abs(t)/e):0}getLabelAndValue(t){let e=this._cachedMeta,s=this.chart,n=s.data.labels||[],o=se(e._parsed[t],s.options.locale);return{label:n[t]||"",value:o}}getMaxBorderWidth(t){let e=0,s=this.chart,n,o,a,r,l;if(!t){for(n=0,o=s.data.datasets.length;n{let r=t.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,fontColor:n,lineWidth:r.borderWidth,pointStyle:s,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,e,s){s.chart.toggleDataVisibility(e.index),s.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){let e=this._cachedMeta,s=this.chart,n=s.data.labels||[],o=se(e._parsed[t].r,s.options.locale);return{label:n[t]||"",value:o}}parseObjectData(t,e,s,n){return Fi.bind(this)(t,e,s,n)}update(t){let e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){let t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((s,n)=>{let o=this.getParsed(n).r;!isNaN(o)&&this.chart.getDataVisibility(n)&&(oe.max&&(e.max=o))}),e}_updateRadius(){let t=this.chart,e=t.chartArea,s=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),o=Math.max(n/2,0),a=(o-Math.max(s.cutoutPercentage?o/100*s.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=o-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,e,s,n){let o=n==="reset",a=this.chart,r=a.options.animation,l=this._cachedMeta.rScale,h=l.xCenter,d=l.yCenter,c=l.getIndexAngle(0)-.5*Y,u,f=c,p=360/this.countVisibleElements();for(u=0;u{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&e++}),e}_computeAngle(t,e,s){return this.chart.getDataVisibility(t)?ct(this.resolveDataElementOptions(t,e).angle||s):0}}var ro=Object.freeze({__proto__:null,BarController:class extends At{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(i,t,e,s){return so(i,t,e,s)}parseArrayData(i,t,e,s){return so(i,t,e,s)}parseObjectData(i,t,e,s){let{iScale:n,vScale:o}=i,{xAxisKey:a="x",yAxisKey:r="y"}=this._parsing,l=n.axis==="x"?a:r,h=o.axis==="x"?a:r,d=[],c,u,f,p;for(c=e,u=e+s;ch.controller.options.grouped),n=e.options.stacked,o=[],a=this._cachedMeta.controller.getParsed(t),r=a&&a[e.axis],l=h=>{let d=h._parsed.find(u=>u[e.axis]===r),c=d&&d[h.vScale.axis];if(I(c)||isNaN(c))return!0};for(let h of s)if((t===void 0||!l(h))&&((n===!1||o.indexOf(h.stack)===-1||n===void 0&&h.stack===void 0)&&o.push(h.stack),h.index===i))break;return o.length||o.push(void 0),o}_getStackCount(i){return this._getStacks(void 0,i).length}_getStackIndex(i,t,e){let s=this._getStacks(i,e),n=t!==void 0?s.indexOf(t):-1;return n===-1?s.length-1:n}_getRuler(){let i=this.options,t=this._cachedMeta,e=t.iScale,s=[],n,o;for(n=0,o=t.data.length;n=w?1:-1)})(c,t,a)*o,u===a&&(m-=c/2);let b=t.getPixelForDecimal(0),y=t.getPixelForDecimal(1),_=Math.min(b,y),x=Math.max(b,y);m=Math.max(Math.min(m,x),_),d=m+c,e&&!h&&(r._stacks[t.axis]._visualValues[s]=t.getValueForPixel(d)-t.getValueForPixel(m))}if(m===t.getPixelForValue(a)){let b=ft(c)*t.getLineWidthForValue(a)/2;m+=b,c-=b}return{size:c,base:m,head:d,center:d+c/2}}_calculateBarIndexPixels(i,t){let e=t.scale,s=this.options,n=s.skipNull,o=E(s.maxBarThickness,1/0),a,r;if(t.grouped){let l=n?this._getStackCount(i):t.stackCount,h=s.barThickness==="flex"?(function(c,u,f,p){let g=u.pixels,m=g[c],b=c>0?g[c-1]:null,y=c=0;--e)t=Math.max(t,i[e].size(this.resolveDataElementOptions(e))/2);return t>0&&t}getLabelAndValue(i){let t=this._cachedMeta,e=this.chart.data.labels||[],{xScale:s,yScale:n}=t,o=this.getParsed(i),a=s.getLabelForValue(o.x),r=n.getLabelForValue(o.y),l=o._custom;return{label:e[i]||"",value:"("+a+", "+r+(l?", "+l:"")+")"}}update(i){let t=this._cachedMeta.data;this.updateElements(t,0,t.length,i)}updateElements(i,t,e,s){let n=s==="reset",{iScale:o,vScale:a}=this._cachedMeta,{sharedOptions:r,includeOptions:l}=this._getSharedOptions(t,s),h=o.axis,d=a.axis;for(let c=t;c0&&this.getParsed(t-1);for(let x=0;x=b){M.skip=!0;continue}let w=this.getParsed(x),k=I(w[u]),D=M[c]=o.getPixelForValue(w[c],x),S=M[u]=n||k?a.getBasePixel():a.getPixelForValue(r?this.applyStack(a,w,r):w[u],x);M.skip=isNaN(D)||isNaN(S)||k,M.stop=x>0&&Math.abs(w[c]-_[c])>g,p&&(M.parsed=w,M.raw=l.data[x]),d&&(M.options=h||this.resolveDataElementOptions(x,v.active?"active":s)),m||this.updateElement(v,x,M,s),_=w}}getMaxOverflow(){let i=this._cachedMeta,t=i.dataset,e=t.options&&t.options.borderWidth||0,s=i.data||[];if(!s.length)return e;let n=s[0].size(this.resolveDataElementOptions(0)),o=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(e,n,o)/2}draw(){let i=this._cachedMeta;i.dataset.updateControlPoints(this.chart.chartArea,i.iScale.axis),super.draw()}},PieController:class extends es{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}},PolarAreaController:ao,RadarController:class extends At{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(i){let t=this._cachedMeta.vScale,e=this.getParsed(i);return{label:t.getLabels()[i],value:""+t.getLabelForValue(e[t.axis])}}parseObjectData(i,t,e,s){return Fi.bind(this)(i,t,e,s)}update(i){let t=this._cachedMeta,e=t.dataset,s=t.data||[],n=t.iScale.getLabels();if(e.points=s,i!=="resize"){let o=this.resolveDatasetElementOptions(i);this.options.showLine||(o.borderWidth=0);let a={_loop:!0,_fullLoop:n.length===s.length,options:o};this.updateElement(e,void 0,a,i)}this.updateElements(s,0,s.length,i)}updateElements(i,t,e,s){let n=this._cachedMeta.rScale,o=s==="reset";for(let a=t;a0&&this.getParsed(t-1);for(let _=t;_0&&Math.abs(v[u]-y[u])>m,g&&(M.parsed=v,M.raw=l.data[_]),c&&(M.options=d||this.resolveDataElementOptions(_,x.active?"active":s)),b||this.updateElement(x,_,M,s),y=v}this.updateSharedOptions(d,s,h)}getMaxOverflow(){let i=this._cachedMeta,t=i.data||[];if(!this.options.showLine){let a=0;for(let r=t.length-1;r>=0;--r)a=Math.max(a,t[r].size(this.resolveDataElementOptions(r))/2);return a>0&&a}let e=i.dataset,s=e.options&&e.options.borderWidth||0;if(!t.length)return s;let n=t[0].size(this.resolveDataElementOptions(0)),o=t[t.length-1].size(this.resolveDataElementOptions(t.length-1));return Math.max(s,n,o)/2}}});function Ja(i,t,e,s){let n=qe(i.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]),o=(e-t)/2,a=Math.min(o,s*t/2),r=l=>{let h=(e-Math.min(o,l))*s/2;return Q(l,0,Math.min(o,h))};return{outerStart:r(n.outerStart),outerEnd:r(n.outerEnd),innerStart:Q(n.innerStart,0,a),innerEnd:Q(n.innerEnd,0,a)}}function le(i,t,e,s){return{x:e+i*Math.cos(t),y:s+i*Math.sin(t)}}function si(i,t,e,s,n,o){let{x:a,y:r,startAngle:l,pixelMargin:h,innerRadius:d}=t,c=Math.max(t.outerRadius+s+e-h,0),u=d>0?d+s+e+h:0,f=0,p=n-l;if(s){let O=((d>0?d-s:0)+(c>0?c-s:0))/2;f=(p-(O!==0?p*O/(O+s):p))/2}let g=(p-Math.max(.001,p*c-e/Y)/c)/2,m=l+g+f,b=n-g-f,{outerStart:y,outerEnd:_,innerStart:x,innerEnd:v}=Ja(t,u,c,b-m),M=c-y,w=c-_,k=m+y/M,D=b-_/w,S=u+x,T=u+v,A=m+x/S,P=b-v/T;if(i.beginPath(),o){let O=(k+D)/2;if(i.arc(a,r,c,k,O),i.arc(a,r,c,O,D),_>0){let V=le(w,D,a,r);i.arc(V.x,V.y,_,D,b+K)}let C=le(T,b,a,r);if(i.lineTo(C.x,C.y),v>0){let V=le(T,P,a,r);i.arc(V.x,V.y,v,b+K,P+Math.PI)}let R=(b-v/u+(m+x/u))/2;if(i.arc(a,r,u,b-v/u,R,!0),i.arc(a,r,u,R,m+x/u,!0),x>0){let V=le(S,A,a,r);i.arc(V.x,V.y,x,A+Math.PI,m-K)}let H=le(M,m,a,r);if(i.lineTo(H.x,H.y),y>0){let V=le(M,k,a,r);i.arc(V.x,V.y,y,m-K,k)}}else{i.moveTo(a,r);let O=Math.cos(k)*c+a,C=Math.sin(k)*c+r;i.lineTo(O,C);let R=Math.cos(D)*c+a,H=Math.sin(D)*c+r;i.lineTo(R,H)}i.closePath()}function Qa(i,t,e,s,n){let{fullCircles:o,startAngle:a,circumference:r,options:l}=t,{borderWidth:h,borderJoinStyle:d,borderDash:c,borderDashOffset:u}=l,f=l.borderAlign==="inner";if(!h)return;i.setLineDash(c||[]),i.lineDashOffset=u,f?(i.lineWidth=2*h,i.lineJoin=d||"round"):(i.lineWidth=h,i.lineJoin=d||"bevel");let p=t.endAngle;if(o){si(i,t,e,s,p,n);for(let g=0;g_?(k=_/w,g.arc(x,v,w,b+k,y-k,!0)):g.arc(x,v,_,b+K,y-K),g.closePath(),g.clip()})(i,t,p),o||(si(i,t,e,s,p,n),i.stroke())}function lo(i,t,e=t){i.lineCap=E(e.borderCapStyle,t.borderCapStyle),i.setLineDash(E(e.borderDash,t.borderDash)),i.lineDashOffset=E(e.borderDashOffset,t.borderDashOffset),i.lineJoin=E(e.borderJoinStyle,t.borderJoinStyle),i.lineWidth=E(e.borderWidth,t.borderWidth),i.strokeStyle=E(e.borderColor,t.borderColor)}function tr(i,t,e){i.lineTo(e.x,e.y)}function ho(i,t,e={}){let s=i.length,{start:n=0,end:o=s-1}=e,{start:a,end:r}=t,l=Math.max(n,a),h=Math.min(o,r),d=nr&&o>r;return{count:s,start:l,loop:t.loop,ilen:h(a+(h?r-x:x))%o,_=()=>{f!==p&&(i.lineTo(m,p),i.lineTo(m,f),i.lineTo(m,g))};for(l&&(c=n[y(0)],i.moveTo(c.x,c.y)),d=0;d<=r;++d){if(c=n[y(d)],c.skip)continue;let x=c.x,v=c.y,M=0|x;M===u?(vp&&(p=v),m=(b*m+x)/++b):(_(),i.lineTo(x,v),u=M,b=0,f=p=v),g=v}_()}function is(i){let t=i.options,e=t.borderDash&&t.borderDash.length;return i._decimated||i._loop||t.tension||t.cubicInterpolationMode==="monotone"||t.stepped||e?er:ir}let sr=typeof Path2D=="function";function nr(i,t,e,s){sr&&!t.options.segment?(function(n,o,a,r){let l=o._path;l||(l=o._path=new Path2D,o.path(l,a,r)&&l.closePath()),lo(n,o.options),n.stroke(l)})(i,t,e,s):(function(n,o,a,r){let{segments:l,options:h}=o,d=is(o);for(let c of l)lo(n,h,c.style),n.beginPath(),d(n,o,c,{start:a,end:a+r-1})&&n.closePath(),n.stroke()})(i,t,e,s)}class ni extends wt{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){let s=this.options;if((s.tension||s.cubicInterpolationMode==="monotone")&&!s.stepped&&!this._pointsUpdated){let n=s.spanGaps?this._loop:this._fullLoop;sn(this._points,s,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=un(this,this.options.segment))}first(){let t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){let t=this.segments,e=this.points,s=t.length;return s&&e[t[s-1].end]}interpolate(t,e){let s=this.options,n=t[e],o=this.points,a=Hi(this,{property:e,start:n,end:n});if(!a.length)return;let r=[],l=(function(c){return c.stepped?an:c.tension||c.cubicInterpolationMode==="monotone"?rn:Vt})(s),h,d;for(h=0,d=a.length;hi!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(i){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,i&&Object.assign(this,i)}inRange(i,t,e){let s=this.getProps(["x","y"],e),{angle:n,distance:o}=pi(s,{x:i,y:t}),{startAngle:a,endAngle:r,innerRadius:l,outerRadius:h,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],e),c=(this.options.spacing+this.options.borderWidth)/2,u=E(d,r-a),f=ee(n,a,r)&&a!==r,p=u>=U||f,g=_t(o,l+c,h+c);return p&&g}getCenterPoint(i){let{x:t,y:e,startAngle:s,endAngle:n,innerRadius:o,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],i),{offset:r,spacing:l}=this.options,h=(s+n)/2,d=(o+a+l+r)/2;return{x:t+Math.cos(h)*d,y:e+Math.sin(h)*d}}tooltipPosition(i){return this.getCenterPoint(i)}draw(i){let{options:t,circumference:e}=this,s=(t.offset||0)/4,n=(t.spacing||0)/2,o=t.circular;if(this.pixelMargin=t.borderAlign==="inner"?.33:0,this.fullCircles=e>U?Math.floor(e/U):0,e===0||this.innerRadius<0||this.outerRadius<0)return;i.save();let a=(this.startAngle+this.endAngle)/2;i.translate(Math.cos(a)*s,Math.sin(a)*s);let r=s*(1-Math.sin(Math.min(Y,e||0)));i.fillStyle=t.backgroundColor,i.strokeStyle=t.borderColor,(function(l,h,d,c,u){let{fullCircles:f,startAngle:p,circumference:g}=h,m=h.endAngle;if(f){si(l,h,d,c,m,u);for(let b=0;b(typeof a=="string"?(r=o.push(a)-1,l.unshift({index:r,label:a})):isNaN(a)&&(r=null),r))(i,t,e,s):n!==i.lastIndexOf(t)?e:n}function fo(i){let t=this.getLabels();return i>=0&&in=e?n:l,r=l=>o=s?o:l;if(t){let l=ft(n),h=ft(o);l<0&&h<0?r(0):l>0&&h>0&&a(0)}if(n===o){let l=o===0?1:Math.abs(.05*o);r(o+l),t||a(n-l)}this.min=n,this.max=o}getTickLimit(){let t=this.options.ticks,e,{maxTicksLimit:s,stepSize:n}=t;return n?(e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),s=s||11),s&&(e=Math.min(s,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let t=this.options,e=t.ticks,s=this.getTickLimit();s=Math.max(2,s);let n=(function(o,a){let r=[],{bounds:l,step:h,min:d,max:c,precision:u,count:f,maxTicks:p,maxDigits:g,includeBounds:m}=o,b=h||1,y=p-1,{min:_,max:x}=a,v=!I(d),M=!I(c),w=!I(f),k=(x-_)/(g+1),D,S,T,A,P=ui((x-_)/y/b)*b;if(P<1e-14&&!v&&!M)return[{value:_},{value:x}];A=Math.ceil(x/P)-Math.floor(_/P),A>y&&(P=ui(A*P/y/b)*b),I(u)||(D=Math.pow(10,u),P=Math.ceil(P*D)/D),l==="ticks"?(S=Math.floor(_/P)*P,T=Math.ceil(x/P)*P):(S=_,T=x),v&&M&&h&&ws((c-d)/h,P/1e3)?(A=Math.round(Math.min((c-d)/P,p)),P=(c-d)/A,S=d,T=c):w?(S=v?d:S,T=M?c:T,A=f-1,P=(T-S)/A):(A=(T-S)/P,A=te(A,Math.round(A),P/1e3)?Math.round(A):Math.ceil(A));let O=Math.max(gi(P),gi(S));D=Math.pow(10,I(u)?O:u),S=Math.round(S*D)/D,T=Math.round(T*D)/D;let C=0;for(v&&(m&&S!==d?(r.push({value:d}),Sc)break;r.push({value:R})}return M&&m&&T!==c?r.length&&te(r[r.length-1].value,c,go(c,k,o))?r[r.length-1].value=c:r.push({value:c}):M&&T!==c||r.push({value:T}),r})({maxTicks:s,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},this._range||this);return t.bounds==="ticks"&&fi(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}configure(){let t=this.ticks,e=this.min,s=this.max;if(super.configure(),this.options.offset&&t.length){let n=(s-e)/Math.max(t.length-1,1)/2;e-=n,s+=n}this._startValue=e,this._endValue=s,this._valueRange=s-e}getLabelForValue(t){return se(t,this.chart.options.locale,this.options.ticks.format)}}class lr extends oi{static id="linear";static defaults={ticks:{callback:fe.formatters.numeric}};determineDataLimits(){let{min:t,max:e}=this.getMinMax(!0);this.min=L(t)?t:0,this.max=L(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){let t=this.isHorizontal(),e=t?this.width:this.height,s=ct(this.options.ticks.minRotation),n=(t?Math.sin(s):Math.cos(s))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/n))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}let Pe=i=>Math.floor(Dt(i)),Gt=(i,t)=>Math.pow(10,Pe(i)+t);function po(i){return i/Math.pow(10,Pe(i))===1}function mo(i,t,e){let s=Math.pow(10,e),n=Math.floor(i/s);return Math.ceil(t/s)-n}function hr(i,{min:t,max:e}){t=q(i.min,t);let s=[],n=Pe(t),o=(function(p,g){let m=Pe(g-p);for(;mo(p,g,m)>10;)m++;for(;mo(p,g,m)<10;)m--;return Math.min(m,Pe(p))})(t,e),a=o<0?Math.pow(10,Math.abs(o)):1,r=Math.pow(10,o),l=n>o?Math.pow(10,n):0,h=Math.round((t-l)*a)/a,d=Math.floor((t-l)/r/10)*r*10,c=Math.floor((h-d)/Math.pow(10,o)),u=q(i.min,Math.round((l+d+c*Math.pow(10,o))*a)/a);for(;u=10?c=c<15?15:20:c++,c>=20&&(o++,c=2,a=o>=0?1:a),u=Math.round((l+d+c*Math.pow(10,o))*a)/a;let f=q(i.max,u);return s.push({value:f,major:po(f),significand:c}),s}class cr extends Wt{static id="logarithmic";static defaults={ticks:{callback:fe.formatters.logarithmic,major:{enabled:!0}}};constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){let s=oi.prototype.parse.apply(this,[t,e]);if(s!==0)return L(s)&&s>0?s:null;this._zero=!0}determineDataLimits(){let{min:t,max:e}=this.getMinMax(!0);this.min=L(t)?Math.max(0,t):null,this.max=L(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!L(this._userMin)&&(this.min=t===Gt(this.min,0)?Gt(this.min,-1):Gt(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:t,maxDefined:e}=this.getUserBounds(),s=this.min,n=this.max,o=r=>s=t?s:r,a=r=>n=e?n:r;s===n&&(s<=0?(o(1),a(10)):(o(Gt(s,-1)),a(Gt(n,1)))),s<=0&&o(Gt(n,-1)),n<=0&&a(Gt(s,1)),this.min=s,this.max=n}buildTicks(){let t=this.options,e=hr({min:this._userMin,max:this._userMax},this);return t.bounds==="ticks"&&fi(e,this,"value"),t.reverse?(e.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),e}getLabelForValue(t){return t===void 0?"0":se(t,this.chart.options.locale,this.options.ticks.format)}configure(){let t=this.min;super.configure(),this._startValue=Dt(t),this._valueRange=Dt(this.max)-Dt(t)}getPixelForValue(t){return t!==void 0&&t!==0||(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Dt(t)-this._startValue)/this._valueRange)}getValueForPixel(t){let e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function as(i){let t=i.ticks;if(t.display&&i.display){let e=et(t.backdropPadding);return E(t.font&&t.font.size,X.font.size)+e.height}return 0}function bo(i,t,e,s,n){return i===s||i===n?{start:t-e/2,end:t+e/2}:in?{start:t-e,end:t}:{start:t,end:t+e}}function dr(i){let t={l:i.left+i._padding.left,r:i.right-i._padding.right,t:i.top+i._padding.top,b:i.bottom-i._padding.bottom},e=Object.assign({},t),s=[],n=[],o=i._pointLabels.length,a=i.options.pointLabels,r=a.centerPointLabels?Y/o:0;for(let c=0;ct.r&&(r=(s.end-t.r)/o,i.r=Math.max(i.r,t.r+r)),n.startt.b&&(l=(n.end-t.b)/a,i.b=Math.max(i.b,t.b+l))}function fr(i,t,e){let s=i.drawingArea,{extra:n,additionalAngle:o,padding:a,size:r}=e,l=i.getPointPosition(t,s+n+a,o),h=Math.round(Ae(nt(l.angle+K))),d=(function(f,p,g){return g===90||g===270?f-=p/2:(g>270||g<90)&&(f-=p),f})(l.y,r.h,h),c=(function(f){return f===0||f===180?"center":f<180?"left":"right"})(h),u=(function(f,p,g){return g==="right"?f-=p:g==="center"&&(f-=p/2),f})(l.x,r.w,c);return{visible:!0,x:l.x,y:d,textAlign:c,left:u,top:d,right:u+r.w,bottom:d+r.h}}function gr(i,t){if(!t)return!0;let{left:e,top:s,right:n,bottom:o}=i;return!(Mt({x:e,y:s},t)||Mt({x:e,y:o},t)||Mt({x:n,y:s},t)||Mt({x:n,y:o},t))}function pr(i,t,e){let{left:s,top:n,right:o,bottom:a}=e,{backdropColor:r}=t;if(!I(r)){let l=Bt(t.borderRadius),h=et(t.backdropPadding);i.fillStyle=r;let d=s-h.left,c=n-h.top,u=o-s+h.width,f=a-n+h.height;Object.values(l).some(p=>p!==0)?(i.beginPath(),ne(i,{x:d,y:c,w:u,h:f,radius:l}),i.fill()):i.fillRect(d,c,u,f)}}function xo(i,t,e,s){let{ctx:n}=i;if(e)n.arc(i.xCenter,i.yCenter,t,0,U);else{let o=i.getPointPosition(0,t);n.moveTo(o.x,o.y);for(let a=1;at,padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){let t=this._padding=et(as(this.options)/2),e=this.width=this.maxWidth-t.width,s=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+s/2+t.top),this.drawingArea=Math.floor(Math.min(e,s)/2)}determineDataLimits(){let{min:t,max:e}=this.getMinMax(!1);this.min=L(t)&&!isNaN(t)?t:0,this.max=L(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/as(this.options))}generateTickLabels(t){oi.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((e,s)=>{let n=N(this.options.pointLabels.callback,[e,s],this);return n||n===0?n:""}).filter((e,s)=>this.chart.getDataVisibility(s))}fit(){let t=this.options;t.display&&t.pointLabels.display?dr(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,s,n){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((s-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,s,n))}getIndexAngle(t){return nt(t*(U/(this._pointLabels.length||1))+ct(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(I(t))return NaN;let e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(I(t))return NaN;let e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){let e=this._pointLabels||[];if(t>=0&&t=0;p--){let g=d._pointLabelItems[p];if(!g.visible)continue;let m=f.setContext(d.getPointLabelContext(p));pr(u,m,g);let b=J(m.font),{x:y,y:_,textAlign:x}=g;Ft(u,d._pointLabels[p],y,_+b.lineHeight/2,b,{color:m.color,textAlign:x,textBaseline:"middle"})}})(this,a),n.display&&this.ticks.forEach((d,c)=>{if(c!==0||c===0&&this.min<0){l=this.getDistanceFromCenterForValue(d.value);let u=this.getContext(c),f=n.setContext(u),p=o.setContext(u);(function(g,m,b,y,_){let x=g.ctx,v=m.circular,{color:M,lineWidth:w}=m;!v&&!y||!M||!w||b<0||(x.save(),x.strokeStyle=M,x.lineWidth=w,x.setLineDash(_.dash||[]),x.lineDashOffset=_.dashOffset,x.beginPath(),xo(g,b,v,y),x.closePath(),x.stroke(),x.restore())})(this,f,l,a,p)}}),s.display){for(t.save(),r=a-1;r>=0;r--){let d=s.setContext(this.getPointLabelContext(r)),{color:c,lineWidth:u}=d;u&&c&&(t.lineWidth=u,t.strokeStyle=c,t.setLineDash(d.borderDash),t.lineDashOffset=d.borderDashOffset,l=this.getDistanceFromCenterForValue(e.reverse?this.min:this.max),h=this.getPointPosition(r,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(h.x,h.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){let t=this.ctx,e=this.options,s=e.ticks;if(!s.display)return;let n=this.getIndexAngle(0),o,a;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((r,l)=>{if(l===0&&this.min>=0&&!e.reverse)return;let h=s.setContext(this.getContext(l)),d=J(h.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),h.showLabelBackdrop){t.font=d.string,a=t.measureText(r.label).width,t.fillStyle=h.backdropColor;let c=et(h.backdropPadding);t.fillRect(-a/2-c.left,-o-d.size/2-c.top,a+c.width,d.size+c.height)}Ft(t,r.label,0,-o,d,{color:h.color,strokeColor:h.textStrokeColor,strokeWidth:h.textStrokeWidth})}),t.restore()}drawTitle(){}}let ai={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},ot=Object.keys(ai);function _o(i,t){return i-t}function yo(i,t){if(I(t))return null;let e=i._adapter,{parser:s,round:n,isoWeekday:o}=i._parseOpts,a=t;return typeof s=="function"&&(a=s(a)),L(a)||(a=typeof s=="string"?e.parse(a,s):e.parse(a)),a===null?null:(n&&(a=n!=="week"||!$t(o)&&o!==!0?e.startOf(a,n):e.startOf(a,"isoWeek",o)),+a)}function vo(i,t,e,s){let n=ot.length;for(let o=ot.indexOf(i);o=t?e[s]:e[n]]=!0}}else i[t]=!0}function wo(i,t,e){let s=[],n={},o=t.length,a,r;for(a=0;a=0&&(h[m].major=!0);return h})(i,s,n,e):s}class rs extends Wt{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){let s=t.time||(t.time={}),n=this._adapter=new eo._date(t.adapters.date);n.init(e),Jt(s.displayFormats,n.formats()),this._parseOpts={parser:s.parser,round:s.round,isoWeekday:s.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return t===void 0?null:yo(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){let t=this.options,e=this._adapter,s=t.time.unit||"day",{min:n,max:o,minDefined:a,maxDefined:r}=this.getUserBounds();function l(h){a||isNaN(h.min)||(n=Math.min(n,h.min)),r||isNaN(h.max)||(o=Math.max(o,h.max))}a&&r||(l(this._getLabelBounds()),t.bounds==="ticks"&&t.ticks.source==="labels"||l(this.getMinMax(!1))),n=L(n)&&!isNaN(n)?n:+e.startOf(Date.now(),s),o=L(o)&&!isNaN(o)?o:+e.endOf(Date.now(),s)+1,this.min=Math.min(n,o-1),this.max=Math.max(n+1,o)}_getLabelBounds(){let t=this.getLabelTimestamps(),e=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],s=t[t.length-1]),{min:e,max:s}}buildTicks(){let t=this.options,e=t.time,s=t.ticks,n=s.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);let o=this.min,a=Ds(n,o,this.max);return this._unit=e.unit||(s.autoSkip?vo(e.minUnit,this.min,this.max,this._getLabelCapacity(o)):(function(r,l,h,d,c){for(let u=ot.length-1;u>=ot.indexOf(h);u--){let f=ot[u];if(ai[f].common&&r._adapter.diff(c,d,f)>=l-1)return f}return ot[h?ot.indexOf(h):0]})(this,a.length,e.minUnit,this.min,this.max)),this._majorUnit=s.major.enabled&&this._unit!=="year"?(function(r){for(let l=ot.indexOf(r)+1,h=ot.length;l+t.value))}initOffsets(t=[]){let e,s,n=0,o=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),n=t.length===1?1-e:(this.getDecimalForValue(t[1])-e)/2,s=this.getDecimalForValue(t[t.length-1]),o=t.length===1?s:(s-this.getDecimalForValue(t[t.length-2]))/2);let a=t.length<3?.5:.25;n=Q(n,0,a),o=Q(o,0,a),this._offsets={start:n,end:o,factor:1/(n+1+o)}}_generate(){let t=this._adapter,e=this.min,s=this.max,n=this.options,o=n.time,a=o.unit||vo(o.minUnit,e,s,this._getLabelCapacity(e)),r=E(n.ticks.stepSize,1),l=a==="week"&&o.isoWeekday,h=$t(l)||l===!0,d={},c,u,f=e;if(h&&(f=+t.startOf(f,"isoWeek",l)),f=+t.startOf(f,h?"day":a),t.diff(s,e,a)>1e5*r)throw new Error(e+" and "+s+" are too far apart with stepSize of "+r+" "+a);let p=n.ticks.source==="data"&&this.getDataTimestamps();for(c=f,u=0;c+g)}getLabelForValue(t){let e=this._adapter,s=this.options.time;return s.tooltipFormat?e.format(t,s.tooltipFormat):e.format(t,s.displayFormats.datetime)}format(t,e){let s=this.options.time.displayFormats,n=this._unit,o=e||s[n];return this._adapter.format(t,o)}_tickFormatFunction(t,e,s,n){let o=this.options,a=o.ticks.callback;if(a)return N(a,[t,e,s],this);let r=o.time.displayFormats,l=this._unit,h=this._majorUnit,d=l&&r[l],c=h&&r[h],u=s[e],f=h&&c&&u&&u.major;return this._adapter.format(t,n||(f?c:d))}generateTickLabels(t){let e,s,n;for(e=0,s=t.length;e0?r:1}getDataTimestamps(){let t,e,s=this._cache.data||[];if(s.length)return s;let n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(t=0,e=n.length;t=i[r].pos&&t<=i[l].pos&&({lo:r,hi:l}=yt(i,"pos",t)),{pos:s,time:o}=i[r],{pos:n,time:a}=i[l]):(t>=i[r].time&&t<=i[l].time&&({lo:r,hi:l}=yt(i,"time",t)),{time:s,pos:o}=i[r],{time:n,pos:a}=i[l]);let h=n-s;return h?o+(a-o)*(t-s)/h:o}var ko=Object.freeze({__proto__:null,CategoryScale:class extends Wt{static id="category";static defaults={ticks:{callback:fo}};constructor(i){super(i),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(i){let t=this._addedLabels;if(t.length){let e=this.getLabels();for(let{index:s,label:n}of t)e[s]===n&&e.splice(s,1);this._addedLabels=[]}super.init(i)}parse(i,t){if(I(i))return null;let e=this.getLabels();return((s,n)=>s===null?null:Q(Math.round(s),0,n))(t=isFinite(t)&&e[t]===i?t:rr(e,i,E(t,i),this._addedLabels),e.length-1)}determineDataLimits(){let{minDefined:i,maxDefined:t}=this.getUserBounds(),{min:e,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(i||(e=0),t||(s=this.getLabels().length-1)),this.min=e,this.max=s}buildTicks(){let i=this.min,t=this.max,e=this.options.offset,s=[],n=this.getLabels();n=i===0&&t===n.length-1?n:n.slice(i,t+1),this._valueRange=Math.max(n.length-(e?0:1),1),this._startValue=this.min-(e?.5:0);for(let o=i;o<=t;o++)s.push({value:o});return s}getLabelForValue(i){return fo.call(this,i)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(i){return typeof i!="number"&&(i=this.parse(i)),i===null?NaN:this.getPixelForDecimal((i-this._startValue)/this._valueRange)}getPixelForTick(i){let t=this.ticks;return i<0||i>t.length-1?null:this.getPixelForValue(t[i].value)}getValueForPixel(i){return Math.round(this._startValue+this.getDecimalForPixel(i)*this._valueRange)}getBasePixel(){return this.bottom}},LinearScale:lr,LogarithmicScale:cr,RadialLinearScale:mr,TimeScale:rs,TimeSeriesScale:class extends rs{static id="timeseries";static defaults=rs.defaults;constructor(i){super(i),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let i=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(i);this._minPos=ri(t,this.min),this._tableRange=ri(t,this.max)-this._minPos,super.initOffsets(i)}buildLookupTable(i){let{min:t,max:e}=this,s=[],n=[],o,a,r,l,h;for(o=0,a=i.length;o=t&&l<=e&&s.push(l);if(s.length<2)return[{time:t,pos:0},{time:e,pos:1}];for(o=0,a=s.length;os-n)}_getTimestampsForTable(){let i=this._cache.all||[];if(i.length)return i;let t=this.getDataTimestamps(),e=this.getLabelTimestamps();return i=t.length&&e.length?this.normalize(t.concat(e)):t.length?t:e,i=this._cache.all=i,i}getDecimalForValue(i){return(ri(this._table,i)-this._minPos)/this._tableRange}getValueForPixel(i){let t=this._offsets,e=this.getDecimalForPixel(i)/t.factor-t.end;return ri(this._table,e*this._tableRange+this._minPos,!0)}}});let ls=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],So=ls.map(i=>i.replace("rgb(","rgba(").replace(")",", 0.5)"));function Po(i){return ls[i%ls.length]}function Do(i){return So[i%So.length]}function br(i){let t=0;return(e,s)=>{let n=i.getDatasetMeta(s).controller;n instanceof es?t=(function(o,a){return o.backgroundColor=o.data.map(()=>Po(a++)),a})(e,t):n instanceof ao?t=(function(o,a){return o.backgroundColor=o.data.map(()=>Do(a++)),a})(e,t):n&&(t=(function(o,a){return o.borderColor=Po(a),o.backgroundColor=Do(a),++a})(e,t))}}function Co(i){let t;for(t in i)if(i[t].borderColor||i[t].backgroundColor)return!0;return!1}var xr={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(i,t,e){if(!e.enabled)return;let{data:{datasets:s},options:n}=i.config,{elements:o}=n,a=Co(s)||(r=n)&&(r.borderColor||r.backgroundColor)||o&&Co(o)||X.borderColor!=="rgba(0,0,0,0.1)"||X.backgroundColor!=="rgba(0,0,0,0.1)";var r;if(!e.forceOverride&&a)return;let l=br(i);s.forEach(l)}};function Oo(i){if(i._decimated){let t=i._data;delete i._decimated,delete i._data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function Ao(i){i.data.datasets.forEach(t=>{Oo(t)})}var _r={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(i,t,e)=>{if(!e.enabled)return void Ao(i);let s=i.width;i.data.datasets.forEach((n,o)=>{let{_data:a,indexAxis:r}=n,l=i.getDatasetMeta(o),h=a||n.data;if(re([r,i.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;let d=i.scales[l.xAxisID];if(d.type!=="linear"&&d.type!=="time"||i.options.parsing)return;let{start:c,count:u}=(function(p,g){let m=g.length,b,y=0,{iScale:_}=p,{min:x,max:v,minDefined:M,maxDefined:w}=_.getUserBounds();return M&&(y=Q(yt(g,_.axis,x).lo,0,m-1)),b=w?Q(yt(g,_.axis,v).hi+1,y,m)-y:m-y,{start:y,count:b}})(l,h);if(u<=(e.threshold||4*s))return void Oo(n);let f;switch(I(a)&&(n._data=h,delete n.data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(p){this._data=p}})),e.algorithm){case"lttb":f=(function(p,g,m,b,y){let _=y.samples||b;if(_>=m)return p.slice(g,g+m);let x=[],v=(m-2)/(_-2),M=0,w=g+m-1,k,D,S,T,A,P=g;for(x[M++]=p[P],k=0;k<_-2;k++){let O,C=0,R=0,H=Math.floor((k+1)*v)+1+g,V=Math.min(Math.floor((k+2)*v)+1,m)+g,st=V-H;for(O=H;OS&&(S=T,D=p[O],A=O);x[M++]=D,P=A}return x[M++]=p[w],x})(h,c,u,s,e);break;case"min-max":f=(function(p,g,m,b){let y,_,x,v,M,w,k,D,S,T,A=0,P=0,O=[],C=g+m-1,R=p[g].x,H=p[C].x-R;for(y=g;yT&&(T=v,k=y),A=(P*A+_.x)/++P;else{let st=y-1;if(!I(w)&&!I(k)){let rt=Math.min(w,k),lt=Math.max(w,k);rt!==D&&rt!==st&&O.push({...p[rt],x:A}),lt!==D&<!==st&&O.push({...p[lt],x:A})}y>0&&st!==D&&O.push(p[st]),O.push(_),M=V,P=0,S=T=v,w=k=D=y}}return O})(h,c,u,s);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}n._decimated=f})},destroy(i){Ao(i)}};function hs(i,t,e,s){if(s)return;let n=t[i],o=e[i];return i==="angle"&&(n=nt(n),o=nt(o)),{property:i,start:n,end:o}}function cs(i,t,e){for(;t>i;t--){let s=e[t];if(!isNaN(s.x)&&!isNaN(s.y))break}return t}function To(i,t,e,s){return i&&t?s(i[e],t[e]):i?i[e]:t?t[e]:0}function Lo(i,t){let e=[],s=!1;return F(i)?(s=!0,e=i):e=(function(n,o){let{x:a=null,y:r=null}=n||{},l=o.points,h=[];return o.segments.forEach(({start:d,end:c})=>{c=cs(d,c,l);let u=l[d],f=l[c];r!==null?(h.push({x:u.x,y:r}),h.push({x:f.x,y:r})):a!==null&&(h.push({x:a,y:u.y}),h.push({x:a,y:f.y}))}),h})(i,t),e.length?new ni({points:e,options:{tension:0},_loop:s,_fullLoop:s}):null}function Eo(i){return i&&i.fill!==!1}function yr(i,t,e){let s=i[t].fill,n=[t],o;if(!e)return s;for(;s!==!1&&n.indexOf(s)===-1;){if(!L(s))return s;if(o=i[s],!o)return!1;if(o.visible)return s;n.push(s),s=o.fill}return!1}function vr(i,t,e){let s=(function(o){let a=o.options,r=a.fill,l=E(r&&r.target,r);return l===void 0&&(l=!!a.backgroundColor),l===!1||l===null?!1:l===!0?"origin":l})(i);if(z(s))return!isNaN(s.value)&&s;let n=parseFloat(s);return L(n)&&Math.floor(n)===n?(function(o,a,r,l){return o!=="-"&&o!=="+"||(r=a+r),r===a||r<0||r>=l?!1:r})(s[0],t,n,e):["origin","start","end","stack","shape"].indexOf(s)>=0&&s}function Mr(i,t,e){let s=[];for(let n=0;n=0;--a){let r=n[a].$filler;r&&(r.line.updateControlPoints(o,r.axis),s&&r.fill&&ds(i.ctx,r,o))}},beforeDatasetsDraw(i,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;let s=i.getSortedVisibleDatasetMetas();for(let n=s.length-1;n>=0;--n){let o=s[n].$filler;Eo(o)&&ds(i.ctx,o,i.chartArea)}},beforeDatasetDraw(i,t,e){let s=t.meta.$filler;Eo(s)&&e.drawTime==="beforeDatasetDraw"&&ds(i.ctx,s,i.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};let Vo=(i,t)=>{let{boxHeight:e=t,boxWidth:s=t}=i;return i.usePointStyle&&(e=Math.min(e,t),s=i.pointStyleWidth||Math.min(s,t)),{boxWidth:s,boxHeight:e,itemHeight:Math.max(t,e)}};class Bo extends wt{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,s){this.maxWidth=t,this.maxHeight=e,this._margins=s,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){let t=this.options.labels||{},e=N(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(s=>t.filter(s,this.chart.data))),t.sort&&(e=e.sort((s,n)=>t.sort(s,n,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){let{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);let s=t.labels,n=J(s.font),o=n.size,a=this._computeTitleHeight(),{boxWidth:r,itemHeight:l}=Vo(s,o),h,d;e.font=n.string,this.isHorizontal()?(h=this.maxWidth,d=this._fitRows(a,o,r,l)+10):(d=this.maxHeight,h=this._fitCols(a,n,r,l)+10),this.width=Math.min(h,t.maxWidth||this.maxWidth),this.height=Math.min(d,t.maxHeight||this.maxHeight)}_fitRows(t,e,s,n){let{ctx:o,maxWidth:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],h=this.lineWidths=[0],d=n+r,c=t;o.textAlign="left",o.textBaseline="middle";let u=-1,f=-d;return this.legendItems.forEach((p,g)=>{let m=s+e/2+o.measureText(p.text).width;(g===0||h[h.length-1]+m+2*r>a)&&(c+=d,h[h.length-(g>0?0:1)]=0,f+=d,u++),l[g]={left:0,top:f,row:u,width:m,height:n},h[h.length-1]+=m+r}),c}_fitCols(t,e,s,n){let{ctx:o,maxHeight:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],h=this.columnSizes=[],d=a-t,c=r,u=0,f=0,p=0,g=0;return this.legendItems.forEach((m,b)=>{let{itemWidth:y,itemHeight:_}=(function(x,v,M,w,k){let D=(function(T,A,P,O){let C=T.text;return C&&typeof C!="string"&&(C=C.reduce((R,H)=>R.length>H.length?R:H)),A+P.size/2+O.measureText(C).width})(w,x,v,M),S=(function(T,A,P){let O=T;return typeof A.text!="string"&&(O=Wo(A,P)),O})(k,w,v.lineHeight);return{itemWidth:D,itemHeight:S}})(s,e,o,m,n);b>0&&f+_+2*r>d&&(c+=u+r,h.push({width:u,height:f}),p+=u+r,g++,u=f=0),l[b]={left:p,top:f,col:g,width:y,height:_},u=Math.max(u,y),f+=_+r}),c+=u,h.push({width:u,height:f}),c}adjustHitBoxes(){if(!this.options.display)return;let t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:s,labels:{padding:n},rtl:o}}=this,a=qt(o,this.left,this.width);if(this.isHorizontal()){let r=0,l=tt(s,this.left+n,this.right-this.lineWidths[r]);for(let h of e)r!==h.row&&(r=h.row,l=tt(s,this.left+n,this.right-this.lineWidths[r])),h.top+=this.top+t+n,h.left=a.leftForLtr(a.x(l),h.width),l+=h.width+n}else{let r=0,l=tt(s,this.top+t+n,this.bottom-this.columnSizes[r].height);for(let h of e)h.col!==r&&(r=h.col,l=tt(s,this.top+t+n,this.bottom-this.columnSizes[r].height)),h.top=l,h.left+=this.left+n,h.left=a.leftForLtr(a.x(h.left),h.width),l+=h.height+n}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){let t=this.ctx;me(t,this),this._draw(),be(t)}}_draw(){let{options:t,columnSizes:e,lineWidths:s,ctx:n}=this,{align:o,labels:a}=t,r=X.color,l=qt(t.rtl,this.left,this.width),h=J(a.font),{padding:d}=a,c=h.size,u=c/2,f;this.drawTitle(),n.textAlign=l.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=h.string;let{boxWidth:p,boxHeight:g,itemHeight:m}=Vo(a,c),b=this.isHorizontal(),y=this._computeTitleHeight();f=b?{x:tt(o,this.left+d,this.right-s[0]),y:this.top+d+y,line:0}:{x:this.left+d,y:tt(o,this.top+y+d,this.bottom-e[0].height),line:0},Bi(this.ctx,t.textDirection);let _=m+d;this.legendItems.forEach((x,v)=>{n.strokeStyle=x.fontColor,n.fillStyle=x.fontColor;let M=n.measureText(x.text).width,w=l.textAlign(x.textAlign||(x.textAlign=a.textAlign)),k=p+u+M,D=f.x,S=f.y;if(l.setWidth(this.width),b?v>0&&D+k+d>this.right&&(S=f.y+=_,f.line++,D=f.x=tt(o,this.left+d,this.right-s[f.line])):v>0&&S+_>this.bottom&&(D=f.x=D+e[f.line].width+d,f.line++,S=f.y=tt(o,this.top+y+d,this.bottom-e[f.line].height)),(function(T,A,P){if(isNaN(p)||p<=0||isNaN(g)||g<0)return;n.save();let O=E(P.lineWidth,1);if(n.fillStyle=E(P.fillStyle,r),n.lineCap=E(P.lineCap,"butt"),n.lineDashOffset=E(P.lineDashOffset,0),n.lineJoin=E(P.lineJoin,"miter"),n.lineWidth=O,n.strokeStyle=E(P.strokeStyle,r),n.setLineDash(E(P.lineDash,[])),a.usePointStyle){let C={radius:g*Math.SQRT2/2,pointStyle:P.pointStyle,rotation:P.rotation,borderWidth:O},R=l.xPlus(T,p/2);Ei(n,C,R,A+u,a.pointStyleWidth&&p)}else{let C=A+Math.max((c-g)/2,0),R=l.leftForLtr(T,p),H=Bt(P.borderRadius);n.beginPath(),Object.values(H).some(V=>V!==0)?ne(n,{x:R,y:C,w:p,h:g,radius:H}):n.rect(R,C,p,g),n.fill(),O!==0&&n.stroke()}n.restore()})(l.x(D),S,x),D=Ts(w,D+p+u,b?D+k:this.right,t.rtl),(function(T,A,P){Ft(n,P.text,T,A+m/2,h,{strikethrough:P.hidden,textAlign:l.textAlign(P.textAlign)})})(l.x(D),S,x),b)f.x+=k+d;else if(typeof x.text!="string"){let T=h.lineHeight;f.y+=Wo(x,T)+d}else f.y+=_}),Wi(this.ctx,t.textDirection)}drawTitle(){let t=this.options,e=t.title,s=J(e.font),n=et(e.padding);if(!e.display)return;let o=qt(t.rtl,this.left,this.width),a=this.ctx,r=e.position,l=s.size/2,h=n.top+l,d,c=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),d=this.top+h,c=tt(t.align,c,this.right-u);else{let p=this.columnSizes.reduce((g,m)=>Math.max(g,m.height),0);d=h+tt(t.align,this.top,this.bottom-p-t.labels.padding-this._computeTitleHeight())}let f=tt(r,c,c+u);a.textAlign=o.textAlign(Ee(r)),a.textBaseline="middle",a.strokeStyle=e.color,a.fillStyle=e.color,a.font=s.string,Ft(a,e.text,f,d,s)}_computeTitleHeight(){let t=this.options.title,e=J(t.font),s=et(t.padding);return t.display?e.lineHeight+s.height:0}_getLegendItemAt(t,e){let s,n,o;if(_t(t,this.left,this.right)&&_t(e,this.top,this.bottom)){for(o=this.legendHitBoxes,s=0;si.chart.options.color,boxWidth:40,padding:10,generateLabels(i){let t=i.data.datasets,{labels:{usePointStyle:e,pointStyle:s,textAlign:n,color:o,useBorderRadius:a,borderRadius:r}}=i.legend.options;return i._getSortedDatasetMetas().map(l=>{let h=l.controller.getStyle(e?0:void 0),d=et(h.borderWidth);return{text:t[l.index].label,fillStyle:h.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:h.borderCapStyle,lineDash:h.borderDash,lineDashOffset:h.borderDashOffset,lineJoin:h.borderJoinStyle,lineWidth:(d.width+d.height)/4,strokeStyle:h.borderColor,pointStyle:s||h.pointStyle,rotation:h.rotation,textAlign:n||h.textAlign,borderRadius:a&&(r||h.borderRadius),datasetIndex:l.index}},this)}},title:{color:i=>i.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:i=>!i.startsWith("on"),labels:{_scriptable:i=>!["generateLabels","filter","sort"].includes(i)}}};class us extends wt{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){let s=this.options;if(this.left=0,this.top=0,!s.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;let n=F(s.text)?s.text.length:1;this._padding=et(s.padding);let o=n*J(s.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){let t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){let{top:e,left:s,bottom:n,right:o,options:a}=this,r=a.align,l,h,d,c=0;return this.isHorizontal()?(h=tt(r,s,o),d=e+t,l=o-s):(a.position==="left"?(h=s+t,d=tt(r,n,e),c=-.5*Y):(h=o-t,d=tt(r,e,n),c=.5*Y),l=n-e),{titleX:h,titleY:d,maxWidth:l,rotation:c}}draw(){let t=this.ctx,e=this.options;if(!e.display)return;let s=J(e.font),n=s.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:r,rotation:l}=this._drawArgs(n);Ft(t,e.text,0,0,s,{color:e.color,maxWidth:r,rotation:l,textAlign:Ee(e.align),textBaseline:"middle",translation:[o,a]})}}var Cr={id:"title",_element:us,start(i,t,e){(function(s,n){let o=new us({ctx:s.ctx,options:n,chart:s});it.configure(s,o,n),it.addBox(s,o),s.titleBlock=o})(i,e)},stop(i){let t=i.titleBlock;it.removeBox(i,t),delete i.titleBlock},beforeUpdate(i,t,e){let s=i.titleBlock;it.configure(i,s,e),s.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};let li=new WeakMap;var Or={id:"subtitle",start(i,t,e){let s=new us({ctx:i.ctx,options:e,chart:i});it.configure(i,s,e),it.addBox(i,s),li.set(i,s)},stop(i){it.removeBox(i,li.get(i)),li.delete(i)},beforeUpdate(i,t,e){let s=li.get(i);it.configure(i,s,e),s.options=e},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};let De={average(i){if(!i.length)return!1;let t,e,s=new Set,n=0,o=0;for(t=0,e=i.length;ta+r)/s.size,y:n/o}},nearest(i,t){if(!i.length)return!1;let e,s,n,o=t.x,a=t.y,r=Number.POSITIVE_INFINITY;for(e=0,s=i.length;e-1?i.split(` +`):i}function Ar(i,t){let{element:e,datasetIndex:s,index:n}=t,o=i.getDatasetMeta(s).controller,{label:a,value:r}=o.getLabelAndValue(n);return{chart:i,label:a,parsed:o.getParsed(n),raw:i.data.datasets[s].data[n],formattedValue:r,dataset:o.getDataset(),dataIndex:n,datasetIndex:s,element:e}}function No(i,t){let e=i.chart.ctx,{body:s,footer:n,title:o}=i,{boxWidth:a,boxHeight:r}=t,l=J(t.bodyFont),h=J(t.titleFont),d=J(t.footerFont),c=o.length,u=n.length,f=s.length,p=et(t.padding),g=p.height,m=0,b=s.reduce((x,v)=>x+v.before.length+v.lines.length+v.after.length,0);b+=i.beforeBody.length+i.afterBody.length,c&&(g+=c*h.lineHeight+(c-1)*t.titleSpacing+t.titleMarginBottom),b&&(g+=f*(t.displayColors?Math.max(r,l.lineHeight):l.lineHeight)+(b-f)*l.lineHeight+(b-1)*t.bodySpacing),u&&(g+=t.footerMarginTop+u*d.lineHeight+(u-1)*t.footerSpacing);let y=0,_=function(x){m=Math.max(m,e.measureText(x).width+y)};return e.save(),e.font=h.string,B(i.title,_),e.font=l.string,B(i.beforeBody.concat(i.afterBody),_),y=t.displayColors?a+2+t.boxPadding:0,B(s,x=>{B(x.before,_),B(x.lines,_),B(x.after,_)}),y=0,e.font=d.string,B(i.footer,_),e.restore(),m+=p.width,{width:m,height:g}}function Tr(i,t,e,s){let{x:n,width:o}=e,{width:a,chartArea:{left:r,right:l}}=i,h="center";return s==="center"?h=n<=(r+l)/2?"left":"right":n<=o/2?h="left":n>=a-o/2&&(h="right"),(function(d,c,u,f){let{x:p,width:g}=f,m=u.caretSize+u.caretPadding;return d==="left"&&p+g+m>c.width||d==="right"&&p-g-m<0||void 0})(h,i,t,e)&&(h="center"),h}function Ho(i,t,e){let s=e.yAlign||t.yAlign||(function(n,o){let{y:a,height:r}=o;return an.height-r/2?"bottom":"center"})(i,e);return{xAlign:e.xAlign||t.xAlign||Tr(i,t,e,s),yAlign:s}}function jo(i,t,e,s){let{caretSize:n,caretPadding:o,cornerRadius:a}=i,{xAlign:r,yAlign:l}=e,h=n+o,{topLeft:d,topRight:c,bottomLeft:u,bottomRight:f}=Bt(a),p=(function(m,b){let{x:y,width:_}=m;return b==="right"?y-=_:b==="center"&&(y-=_/2),y})(t,r),g=(function(m,b,y){let{y:_,height:x}=m;return b==="top"?_+=y:_-=b==="bottom"?x+y:x/2,_})(t,l,h);return l==="center"?r==="left"?p+=h:r==="right"&&(p-=h):r==="left"?p-=Math.max(d,u)+n:r==="right"&&(p+=Math.max(c,f)+n),{x:Q(p,0,s.width-t.width),y:Q(g,0,s.height-t.height)}}function hi(i,t,e){let s=et(e.padding);return t==="center"?i.x+i.width/2:t==="right"?i.x+i.width-s.right:i.x+s.left}function $o(i){return kt([],Tt(i))}function Yo(i,t){let e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?i.override(e):i}let Uo={beforeTitle:W,title(i){if(i.length>0){let t=i[0],e=t.chart.data.labels,s=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(s>0&&t.dataIndex{let a={before:[],lines:[],after:[]},r=Yo(s,o);kt(a.before,Tt(at(r,"beforeLabel",this,o))),kt(a.lines,at(r,"label",this,o)),kt(a.after,Tt(at(r,"afterLabel",this,o))),n.push(a)}),n}getAfterBody(t,e){return $o(at(e.callbacks,"afterBody",this,t))}getFooter(t,e){let{callbacks:s}=e,n=at(s,"beforeFooter",this,t),o=at(s,"footer",this,t),a=at(s,"afterFooter",this,t),r=[];return r=kt(r,Tt(n)),r=kt(r,Tt(o)),r=kt(r,Tt(a)),r}_createItems(t){let e=this._active,s=this.chart.data,n=[],o=[],a=[],r,l,h=[];for(r=0,l=e.length;rt.filter(d,c,u,s))),t.itemSort&&(h=h.sort((d,c)=>t.itemSort(d,c,s))),B(h,d=>{let c=Yo(t.callbacks,d);n.push(at(c,"labelColor",this,d)),o.push(at(c,"labelPointStyle",this,d)),a.push(at(c,"labelTextColor",this,d))}),this.labelColors=n,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=h,h}update(t,e){let s=this.options.setContext(this.getContext()),n=this._active,o,a=[];if(n.length){let r=De[s.position].call(this,n,this._eventPosition);a=this._createItems(s),this.title=this.getTitle(a,s),this.beforeBody=this.getBeforeBody(a,s),this.body=this.getBody(a,s),this.afterBody=this.getAfterBody(a,s),this.footer=this.getFooter(a,s);let l=this._size=No(this,s),h=Object.assign({},r,l),d=Ho(this.chart,s,h),c=jo(s,h,d,this.chart);this.xAlign=d.xAlign,this.yAlign=d.yAlign,o={opacity:1,x:c.x,y:c.y,width:l.width,height:l.height,caretX:r.x,caretY:r.y}}else this.opacity!==0&&(o={opacity:0});this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,s,n){let o=this.getCaretPosition(t,s,n);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,s){let{xAlign:n,yAlign:o}=this,{caretSize:a,cornerRadius:r}=s,{topLeft:l,topRight:h,bottomLeft:d,bottomRight:c}=Bt(r),{x:u,y:f}=t,{width:p,height:g}=e,m,b,y,_,x,v;return o==="center"?(x=f+g/2,n==="left"?(m=u,b=m-a,_=x+a,v=x-a):(m=u+p,b=m+a,_=x-a,v=x+a),y=m):(b=n==="left"?u+Math.max(l,d)+a:n==="right"?u+p-Math.max(h,c)-a:this.caretX,o==="top"?(_=f,x=_-a,m=b-a,y=b+a):(_=f+g,x=_+a,m=b+a,y=b-a),v=_),{x1:m,x2:b,x3:y,y1:_,y2:x,y3:v}}drawTitle(t,e,s){let n=this.title,o=n.length,a,r,l;if(o){let h=qt(s.rtl,this.x,this.width);for(t.x=hi(this,s.titleAlign,s),e.textAlign=h.textAlign(s.titleAlign),e.textBaseline="middle",a=J(s.titleFont),r=s.titleSpacing,e.fillStyle=s.titleColor,e.font=a.string,l=0;ly!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,ne(t,{x:g,y:p,w:h,h:l,radius:b}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),ne(t,{x:m,y:p+1,w:h-2,h:l-2,radius:b}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(g,p,h,l),t.strokeRect(g,p,h,l),t.fillStyle=a.backgroundColor,t.fillRect(m,p+1,h-2,l-2))}t.fillStyle=this.labelTextColors[s]}drawBody(t,e,s){let{body:n}=this,{bodySpacing:o,bodyAlign:a,displayColors:r,boxHeight:l,boxWidth:h,boxPadding:d}=s,c=J(s.bodyFont),u=c.lineHeight,f=0,p=qt(s.rtl,this.x,this.width),g=function(k){e.fillText(k,p.x(t.x+f),t.y+u/2),t.y+=u+o},m=p.textAlign(a),b,y,_,x,v,M,w;for(e.textAlign=a,e.textBaseline="middle",e.font=c.string,t.x=hi(this,m,s),e.fillStyle=s.bodyColor,B(this.beforeBody,g),f=r&&m!=="right"?a==="center"?h/2+d:h+2+d:0,x=0,M=n.length;x0&&e.stroke()}_updateAnimationTarget(t){let e=this.chart,s=this.$animations,n=s&&s.x,o=s&&s.y;if(n||o){let a=De[t.position].call(this,this._active,this._eventPosition);if(!a)return;let r=this._size=No(this,t),l=Object.assign({},a,this._size),h=Ho(e,t,l),d=jo(t,l,h,e);n._to===d.x&&o._to===d.y||(this.xAlign=h.xAlign,this.yAlign=h.yAlign,this.width=r.width,this.height=r.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,d))}}_willRender(){return!!this.opacity}draw(t){let e=this.options.setContext(this.getContext()),s=this.opacity;if(!s)return;this._updateAnimationTarget(e);let n={width:this.width,height:this.height},o={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;let a=et(e.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&r&&(t.save(),t.globalAlpha=s,this.drawBackground(o,t,n,e),Bi(t,e.textDirection),o.y+=a.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),Wi(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){let s=this._active,n=t.map(({datasetIndex:r,index:l})=>{let h=this.chart.getDatasetMeta(r);if(!h)throw new Error("Cannot find a dataset at index "+r);return{datasetIndex:r,element:h.data[l],index:l}}),o=!Ht(s,n),a=this._positionChanged(n,e);(o||a)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,s=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let n=this.options,o=this._active||[],a=this._getActiveElements(t,o,e,s),r=this._positionChanged(a,t),l=e||!Ht(a,o)||r;return l&&(this._active=a,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,s,n){let o=this.options;if(t.type==="mouseout")return[];if(!n)return e.filter(r=>this.chart.data.datasets[r.datasetIndex]&&this.chart.getDatasetMeta(r.datasetIndex).controller.getParsed(r.index)!==void 0);let a=this.chart.getElementsAtEventForMode(t,o.mode,o,s);return o.reverse&&a.reverse(),a}_positionChanged(t,e){let{caretX:s,caretY:n,options:o}=this,a=De[o.position].call(this,t,e);return a!==!1&&(s!==a.x||n!==a.y)}}var Lr={id:"tooltip",_element:Xo,positioners:De,afterInit(i,t,e){e&&(i.tooltip=new Xo({chart:i,options:e}))},beforeUpdate(i,t,e){i.tooltip&&i.tooltip.initialize(e)},reset(i,t,e){i.tooltip&&i.tooltip.initialize(e)},afterDraw(i){let t=i.tooltip;if(t&&t._willRender()){let e={tooltip:t};if(i.notifyPlugins("beforeTooltipDraw",{...e,cancelable:!0})===!1)return;t.draw(i.ctx),i.notifyPlugins("afterTooltipDraw",e)}},afterEvent(i,t){if(i.tooltip){let e=t.replay;i.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(i,t)=>t.bodyFont.size,boxWidth:(i,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Uo},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:i=>i!=="filter"&&i!=="itemSort"&&i!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};return G.register(ro,ko,os,j),G.helpers={...Ma},G._adapters=eo,G.Animation=Tn,G.Animations=Xi,G.animator=vt,G.controllers=gt.controllers.items,G.DatasetController=At,G.Element=wt,G.elements=os,G.Interaction=mn,G.layouts=it,G.platforms=On,G.Scale=Wt,G.Ticks=fe,Object.assign(G,ro,ko,os,j,On),G.Chart=G,typeof window<"u"&&(window.Chart=G),G})});var Qr=Wr(Ko());(function(){"use strict";let j=new Map;function W(){let L=getComputedStyle(document.documentElement);return{foreground:L.getPropertyValue("--foreground").trim()||"#000",background:L.getPropertyValue("--background").trim()||"#fff",mutedForeground:L.getPropertyValue("--muted-foreground").trim()||"#666",border:L.getPropertyValue("--border").trim()||"#ccc"}}function ht(L){if(!L||!L.id||!L.hasAttribute("data-tui-chart-id"))return;j.has(L.id)&&I(L);let q=L.getAttribute("data-tui-chart-id"),E=document.getElementById(q);if(E)try{let $=JSON.parse(E.textContent),Z=W();Chart.defaults.elements.point.radius=0,Chart.defaults.elements.point.hoverRadius=5;let N=["pie","doughnut","bar","radar"].includes($.type),B={display:$.showLegend||!1,labels:{color:Z.foreground}},Ht={backgroundColor:Z.background,bodyColor:Z.mutedForeground,titleColor:Z.foreground,borderColor:Z.border,borderWidth:1},jt=$.type==="radar"?{r:{grid:{color:Z.border,display:$.showYGrid!==!1},ticks:{color:Z.mutedForeground,backdropColor:"transparent",display:$.showYLabels!==!1},angleLines:{color:Z.border,display:$.showXGrid!==!1},pointLabels:{color:Z.foreground,font:{size:12}},border:{display:$.showYAxis!==!1,color:Z.border},beginAtZero:!0}}:{x:{beginAtZero:!0,display:$.showXLabels!==!1||$.showXGrid!==!1||$.showXAxis!==!1,border:{display:$.showXAxis!==!1,color:Z.border},ticks:{display:$.showXLabels!==!1,color:Z.mutedForeground},grid:{display:$.showXGrid!==!1,color:Z.border},stacked:$.stacked||!1},y:{offset:!0,beginAtZero:!0,display:$.showYLabels!==!1||$.showYGrid!==!1||$.showYAxis!==!1,border:{display:$.showYAxis!==!1,color:Z.border},ticks:{display:$.showYLabels!==!1,color:Z.mutedForeground},grid:{display:$.showYGrid!==!1,color:Z.border},stacked:$.stacked||!1}},Ce={...$,options:{responsive:!0,maintainAspectRatio:!1,interaction:{intersect:!!N,axis:"xy",mode:N?"nearest":"index"},indexAxis:$.horizontal?"y":"x",plugins:{legend:B,tooltip:Ht},scales:jt}};j.set(L.id,new Chart(L,Ce))}catch{}}function I(L){if(!(!L||!L.id||!j.has(L.id)))try{j.get(L.id).destroy()}finally{j.delete(L.id)}}function F(){typeof Chart<"u"?(document.querySelectorAll("canvas[data-tui-chart-id]").forEach(ht),z()):setTimeout(F,100)}document.addEventListener("DOMContentLoaded",F);function z(){let L;new MutationObserver(()=>{clearTimeout(L),L=setTimeout(()=>{document.querySelectorAll("canvas[data-tui-chart-id]").forEach(q=>{j.has(q.id)&&(I(q),ht(q))})},50)}).observe(document.documentElement,{attributes:!0,attributeFilter:["class","style"]}),new MutationObserver(()=>{document.querySelectorAll("canvas[data-tui-chart-id]").forEach(q=>{j.has(q.id)||ht(q)})}).observe(document.body,{childList:!0,subtree:!0})}})();})(); +/*! + * Chart.js v4.4.8 + * https://www.chartjs.org + * (c) 2025 Chart.js Contributors + * Released under the MIT License + */ +/*! + * @kurkle/color v0.3.2 + * https://github.com/kurkle/color#readme + * (c) 2023 Jukka Kurkela + * Released under the MIT License + */ diff --git a/assets/js/code.min.js b/assets/js/code.min.js new file mode 100644 index 0000000..dcc5a13 --- /dev/null +++ b/assets/js/code.min.js @@ -0,0 +1 @@ +(()=>{(function(){"use strict";let e={light:"https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/atom-one-light.min.css",dark:"https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/atom-one-dark.min.css"};function s(){let t=document.documentElement.classList.contains("dark");document.querySelectorAll("#highlight-theme").forEach(l=>{l.href=t?e.dark:e.light})}function o(){window.hljs&&document.querySelectorAll("[data-tui-code-block]:not(.hljs)").forEach(t=>window.hljs.highlightElement(t))}function i(){s(),o()}function n(t){window.hljs?t():requestAnimationFrame(()=>n(t))}n(i),new MutationObserver(i).observe(document.documentElement,{attributes:!0,attributeFilter:["class"],childList:!0,subtree:!0})})();})(); diff --git a/assets/js/collapsible.min.js b/assets/js/collapsible.min.js new file mode 100644 index 0000000..0c7315d --- /dev/null +++ b/assets/js/collapsible.min.js @@ -0,0 +1 @@ +(()=>{(function(){"use strict";function i(t){let e=t.closest('[data-tui-collapsible="root"]');if(!e)return;let a=e.getAttribute("data-tui-collapsible-state")==="open",n=a?"closed":"open";e.setAttribute("data-tui-collapsible-state",n),t.setAttribute("aria-expanded",!a)}document.addEventListener("click",t=>{let e=t.target.closest('[data-tui-collapsible="trigger"]');e&&(t.preventDefault(),i(e))}),document.addEventListener("keydown",t=>{if(t.key!==" "&&t.key!=="Enter")return;let e=t.target.closest('[data-tui-collapsible="trigger"]');e&&(t.preventDefault(),i(e))})})();})(); diff --git a/assets/js/copybutton.min.js b/assets/js/copybutton.min.js new file mode 100644 index 0000000..fb6d8a9 --- /dev/null +++ b/assets/js/copybutton.min.js @@ -0,0 +1 @@ +(()=>{(function(){"use strict";document.addEventListener("click",i=>{let e=i.target.closest("[data-copy-button]");if(!e)return;let t=e.dataset.targetId;if(!t){console.error("CopyButton: No target-id specified");return}let o=document.getElementById(t);if(!o){console.error(`CopyButton: Element with id '${t}' not found`);return}let c="";o.value!==void 0?c=o.value:c=o.textContent||"";let l=e.querySelector("[data-copy-icon-clipboard]"),r=e.querySelector("[data-copy-icon-check]");if(!l||!r)return;let a=()=>{l.style.display="none",r.style.display="inline";let n=e.closest(".inline-block")?.parentElement?.parentElement?.querySelector("[data-copy-tooltip-text]"),d=n?.textContent;n&&(n.textContent="Copied!"),setTimeout(()=>{l.style.display="inline",r.style.display="none",n&&d&&(n.textContent=d)},2e3)};navigator.clipboard&&window.isSecureContext?navigator.clipboard.writeText(c.trim()).then(a).catch(n=>{console.error("CopyButton: Failed to copy text",n),s(c.trim(),a)}):s(c.trim(),a)});function s(i,e){let t=document.createElement("textarea");t.value=i,t.style.position="fixed",t.style.top="-9999px",t.style.left="-9999px",document.body.appendChild(t),t.focus(),t.select();try{document.execCommand("copy")?e():console.error("CopyButton: Fallback copy failed")}catch(o){console.error("CopyButton: Fallback copy error",o)}document.body.removeChild(t)}})();})(); diff --git a/assets/js/datepicker.min.js b/assets/js/datepicker.min.js new file mode 100644 index 0000000..50cda8c --- /dev/null +++ b/assets/js/datepicker.min.js @@ -0,0 +1 @@ +(()=>{(function(){"use strict";function s(t){if(!t)return null;let e=t.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!e)return null;let a=parseInt(e[1],10),n=parseInt(e[2],10)-1,d=parseInt(e[3],10),r=new Date(Date.UTC(a,n,d));return r.getUTCFullYear()===a&&r.getUTCMonth()===n&&r.getUTCDate()===d?r:null}function l(t,e,a){if(!t||isNaN(t.getTime()))return"";let n={timeZone:"UTC"},d={"locale-short":"short","locale-long":"long","locale-full":"full","locale-medium":"medium"};n.dateStyle=d[e]||"medium";try{return new Intl.DateTimeFormat(a,n).format(t)}catch{let i=t.getUTCFullYear(),c=(t.getUTCMonth()+1).toString().padStart(2,"0"),p=t.getUTCDate().toString().padStart(2,"0");return`${i}-${c}-${p}`}}function o(t){let e=t.id+"-calendar-instance",a=document.getElementById(e),n=document.getElementById(t.id+"-hidden")||t.parentElement?.querySelector("[data-tui-datepicker-hidden-input]"),d=t.querySelector("[data-tui-datepicker-display]");return{calendar:a,hiddenInput:n,display:d}}function u(t){let e=o(t);if(!e.display||!e.hiddenInput)return;let a=t.getAttribute("data-tui-datepicker-display-format")||"locale-medium",n=t.getAttribute("data-tui-datepicker-locale-tag")||"en-US",d=t.getAttribute("data-tui-datepicker-placeholder")||"Select a date";if(e.hiddenInput.value){let r=s(e.hiddenInput.value);if(r){e.display.textContent=l(r,a,n),e.display.classList.remove("text-muted-foreground");return}}e.display.textContent=d,e.display.classList.add("text-muted-foreground")}document.addEventListener("calendar-date-selected",t=>{let e=t.target;if(!e||!e.id.endsWith("-calendar-instance"))return;let a=e.id.replace("-calendar-instance",""),n=document.getElementById(a);if(!n||!n.hasAttribute("data-tui-datepicker"))return;let d=o(n);if(!d.display||!t.detail?.date)return;let r=n.getAttribute("data-tui-datepicker-display-format")||"locale-medium",i=n.getAttribute("data-tui-datepicker-locale-tag")||"en-US";if(d.display.textContent=l(t.detail.date,r,i),d.display.classList.remove("text-muted-foreground"),window.closePopover){let c=n.getAttribute("aria-controls")||n.id+"-content";window.closePopover(c)}}),document.addEventListener("reset",t=>{t.target.matches("form")&&t.target.querySelectorAll('[data-tui-datepicker="true"]').forEach(e=>{let a=o(e);a.hiddenInput&&(a.hiddenInput.value=""),u(e)})}),new MutationObserver(()=>{document.querySelectorAll('[data-tui-datepicker="true"]:not([data-rendered])').forEach(t=>{t.setAttribute("data-rendered","true"),u(t)})}).observe(document.body,{childList:!0,subtree:!0})})();})(); diff --git a/assets/js/dialog.min.js b/assets/js/dialog.min.js new file mode 100644 index 0000000..c6730a1 --- /dev/null +++ b/assets/js/dialog.min.js @@ -0,0 +1 @@ +(()=>{(function(){"use strict";function u(t){let a=document.querySelector(`[data-tui-dialog-backdrop][data-dialog-instance="${t}"]`),e=document.querySelector(`[data-tui-dialog-content][data-dialog-instance="${t}"]`);!a||!e||(a.removeAttribute("data-tui-dialog-hidden"),e.removeAttribute("data-tui-dialog-hidden"),requestAnimationFrame(()=>{a.setAttribute("data-tui-dialog-open","true"),e.setAttribute("data-tui-dialog-open","true"),document.body.style.overflow="hidden",document.querySelectorAll(`[data-tui-dialog-trigger][data-dialog-instance="${t}"]`).forEach(o=>{o.setAttribute("data-tui-dialog-trigger-open","true")}),e.hasAttribute("data-tui-dialog-disable-autofocus")||setTimeout(()=>{e.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')?.focus()},50)}))}function n(t){let a=document.querySelector(`[data-tui-dialog-backdrop][data-dialog-instance="${t}"]`),e=document.querySelector(`[data-tui-dialog-content][data-dialog-instance="${t}"]`);!a||!e||(a.setAttribute("data-tui-dialog-open","false"),e.setAttribute("data-tui-dialog-open","false"),document.querySelectorAll(`[data-tui-dialog-trigger][data-dialog-instance="${t}"]`).forEach(i=>{i.setAttribute("data-tui-dialog-trigger-open","false")}),setTimeout(()=>{a.setAttribute("data-tui-dialog-hidden","true"),e.setAttribute("data-tui-dialog-hidden","true"),document.querySelector('[data-tui-dialog-content][data-tui-dialog-open="true"]')||(document.body.style.overflow="")},300))}function l(t){let a=t.getAttribute("data-dialog-instance");if(a)return a;let e=t.closest("[data-tui-dialog]");return e?e.getAttribute("data-dialog-instance"):null}function r(t){return document.querySelector(`[data-tui-dialog-content][data-dialog-instance="${t}"]`)?.getAttribute("data-tui-dialog-open")==="true"||!1}function c(t){r(t)?n(t):u(t)}document.addEventListener("click",t=>{let a=t.target.closest("[data-tui-dialog-trigger]");if(a){let o=a.getAttribute("data-dialog-instance");if(!o)return;c(o);return}let e=t.target.closest("[data-tui-dialog-close]");if(e){let d=e.getAttribute("data-tui-dialog-close")||l(e);d&&n(d);return}let i=t.target.closest("[data-tui-dialog-backdrop]");if(i){let o=i.getAttribute("data-dialog-instance");if(!o)return;let d=document.querySelector(`[data-tui-dialog][data-dialog-instance="${o}"]`),s=document.querySelector(`[data-tui-dialog-content][data-dialog-instance="${o}"]`);d?.hasAttribute("data-tui-dialog-disable-click-away")||s?.hasAttribute("data-tui-dialog-disable-click-away")||n(o)}}),document.addEventListener("keydown",t=>{if(t.key==="Escape"){let a=document.querySelectorAll('[data-tui-dialog-content][data-tui-dialog-open="true"]');if(a.length===0)return;let e=a[a.length-1],i=e.getAttribute("data-dialog-instance");if(!i)return;document.querySelector(`[data-tui-dialog][data-dialog-instance="${i}"]`)?.hasAttribute("data-tui-dialog-disable-esc")||e?.hasAttribute("data-tui-dialog-disable-esc")||n(i)}}),document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll('[data-tui-dialog-content][data-tui-dialog-open="true"]').length>0&&(document.body.style.overflow="hidden")}),new MutationObserver(()=>{document.querySelector('[data-tui-dialog-content][data-tui-dialog-open="true"]')||(document.body.style.overflow="")}).observe(document.body,{childList:!0,subtree:!0}),window.tui=window.tui||{},window.tui.dialog={open:u,close:n,toggle:c,isOpen:r}})();})(); diff --git a/assets/js/dropdown.min.js b/assets/js/dropdown.min.js new file mode 100644 index 0000000..ced54f9 --- /dev/null +++ b/assets/js/dropdown.min.js @@ -0,0 +1 @@ +(()=>{(function(){"use strict";document.addEventListener("click",o=>{let t=o.target.closest("[data-tui-dropdown-item]");if(!t||t.hasAttribute("data-tui-dropdown-submenu-trigger")||t.getAttribute("data-tui-dropdown-prevent-close")==="true")return;let e=t.closest("[data-tui-popover-id]");if(!e)return;let i=e.getAttribute("data-tui-popover-id")||e.id;window.closePopover&&window.closePopover(i)})})();})(); diff --git a/assets/js/input.min.js b/assets/js/input.min.js new file mode 100644 index 0000000..bdc3a5f --- /dev/null +++ b/assets/js/input.min.js @@ -0,0 +1 @@ +(()=>{(function(){"use strict";document.addEventListener("click",n=>{let t=n.target.closest("[data-tui-input-toggle-password]");if(!t)return;let o=t.getAttribute("data-tui-input-toggle-password"),e=document.getElementById(o);if(!e)return;let s=t.querySelector(".icon-open"),i=t.querySelector(".icon-closed");e.type==="password"?(e.type="text",s&&s.classList.add("hidden"),i&&i.classList.remove("hidden")):(e.type="password",s&&s.classList.remove("hidden"),i&&i.classList.add("hidden"))})})();})(); diff --git a/assets/js/inputotp.min.js b/assets/js/inputotp.min.js new file mode 100644 index 0000000..d8e7ad5 --- /dev/null +++ b/assets/js/inputotp.min.js @@ -0,0 +1 @@ +(()=>{(function(){"use strict";function u(e){return Array.from(e.querySelectorAll("[data-tui-inputotp-slot]")).sort((t,n)=>parseInt(t.getAttribute("data-tui-inputotp-index"))-parseInt(n.getAttribute("data-tui-inputotp-index")))}function a(e){e&&(e.focus(),setTimeout(()=>e.select(),0))}function i(e){let t=e.querySelector("[data-tui-inputotp-value-target]"),n=u(e);t&&n.length&&(t.value=n.map(o=>o.value).join(""))}function d(e){let t=u(e);for(let n of t)if(!n.value)return n;return null}function f(e,t){let n=u(e),o=n.indexOf(t);return o>=0&&o0?n[o-1]:null}document.addEventListener("input",e=>{if(!e.target.matches("[data-tui-inputotp-slot]"))return;let t=e.target,n=t.closest("[data-tui-inputotp]");if(n){if(t.value===" "){t.value="";return}if(t.value.length>1&&(t.value=t.value.slice(-1)),t.value){let o=f(n,t);o&&a(o)}i(n)}}),document.addEventListener("keydown",e=>{if(!e.target.matches("[data-tui-inputotp-slot]"))return;let t=e.target,n=t.closest("[data-tui-inputotp]");if(n){if(e.key==="Backspace")if(e.preventDefault(),t.value)t.value="",i(n);else{let o=p(n,t);o&&(o.value="",i(n),a(o))}else if(e.key==="ArrowLeft"){e.preventDefault();let o=p(n,t);o&&a(o)}else if(e.key==="ArrowRight"){e.preventDefault();let o=f(n,t);o&&a(o)}}}),document.addEventListener("focus",e=>{if(!e.target.matches("[data-tui-inputotp-slot]"))return;let t=e.target,n=t.closest("[data-tui-inputotp]");if(!n)return;let o=d(n);if(o&&o!==t){a(o);return}setTimeout(()=>t.select(),0)},!0),document.addEventListener("paste",e=>{let t=e.target.closest("[data-tui-inputotp-slot]");if(!t)return;e.preventDefault();let n=t.closest("[data-tui-inputotp]");if(!n)return;let r=(e.clipboardData||window.clipboardData).getData("text").replace(/\s/g,"").split(""),s=u(n),c=s.indexOf(t);for(let l=0;l{if(!e.target.matches("label[for]"))return;let t=e.target.getAttribute("for"),n=document.getElementById(t);if(!n?.matches("[data-tui-inputotp-value-target]"))return;e.preventDefault();let o=n.closest("[data-tui-inputotp]"),r=u(o);r.length>0&&a(r[0])}),document.addEventListener("reset",e=>{e.target.matches("form")&&e.target.querySelectorAll("[data-tui-inputotp]").forEach(t=>{u(t).forEach(n=>{n.value=""}),i(t)})}),new MutationObserver(()=>{document.querySelectorAll("[data-tui-inputotp]").forEach(e=>{let t=u(e);if(t.length===0)return;let n=e.getAttribute("data-tui-inputotp-value");if(n&&!t[0].value){for(let o=0;oo===document.activeElement)&&requestAnimationFrame(()=>{t[0]&&!t.some(o=>o===document.activeElement)&&a(t[0])})})}).observe(document.body,{childList:!0,subtree:!0})})();})(); diff --git a/assets/js/label.min.js b/assets/js/label.min.js new file mode 100644 index 0000000..2d3d6e2 --- /dev/null +++ b/assets/js/label.min.js @@ -0,0 +1 @@ +(()=>{(function(){"use strict";function a(t){let s=t.getAttribute("for"),d=s?document.getElementById(s):null,r=t.getAttribute("data-tui-label-disabled-style");if(!d||!r)return;let e=r.split(" ").filter(Boolean);d.disabled?t.classList.add(...e):t.classList.remove(...e)}document.addEventListener("DOMContentLoaded",()=>{let t=new Set;function s(){document.querySelectorAll("label[for][data-tui-label-disabled-style]").forEach(r=>{a(r);let e=r.getAttribute("for");e&&t.add(e)})}s(),new MutationObserver(r=>{r.forEach(e=>{e.type==="attributes"&&e.attributeName==="disabled"&&e.target.id&&t.has(e.target.id)&&document.querySelectorAll(`label[for="${e.target.id}"][data-tui-label-disabled-style]`).forEach(a)})}).observe(document.body,{attributes:!0,attributeFilter:["disabled"],subtree:!0}),new MutationObserver(()=>{s()}).observe(document.body,{childList:!0,subtree:!0})})})();})(); diff --git a/assets/js/popover.min.js b/assets/js/popover.min.js new file mode 100644 index 0000000..4cc6fa3 --- /dev/null +++ b/assets/js/popover.min.js @@ -0,0 +1,6 @@ +(()=>{var Vt=Object.create;var qt=Object.defineProperty;var Nt=Object.getOwnPropertyDescriptor;var jt=Object.getOwnPropertyNames;var Xt=Object.getPrototypeOf,Yt=Object.prototype.hasOwnProperty;var It=(g,R)=>()=>(R||g((R={exports:{}}).exports,R),R.exports);var _t=(g,R,at,lt)=>{if(R&&typeof R=="object"||typeof R=="function")for(let Q of jt(R))!Yt.call(g,Q)&&Q!==at&&qt(g,Q,{get:()=>R[Q],enumerable:!(lt=Nt(R,Q))||lt.enumerable});return g};var Wt=(g,R,at)=>(at=g!=null?Vt(Xt(g)):{},_t(R||!g||!g.__esModule?qt(at,"default",{value:g,enumerable:!0}):at,g));var Et=It((Tt,zt)=>{(function(g,R){typeof Tt=="object"&&typeof zt<"u"?R(Tt):typeof define=="function"&&define.amd?define(["exports"],R):R((g=typeof globalThis<"u"?globalThis:g||self).FloatingUICore={})})(Tt,function(g){"use strict";let R=["top","right","bottom","left"],at=["start","end"],lt=R.reduce((n,i)=>n.concat(i,i+"-"+at[0],i+"-"+at[1]),[]),Q=Math.min,G=Math.max,st={left:"right",right:"left",bottom:"top",top:"bottom"},gt={start:"end",end:"start"};function mt(n,i,h){return G(n,Q(i,h))}function V(n,i){return typeof n=="function"?n(i):n}function N(n){return n.split("-")[0]}function it(n){return n.split("-")[1]}function l(n){return n==="x"?"y":"x"}function c(n){return n==="y"?"height":"width"}function A(n){return["top","bottom"].includes(N(n))?"y":"x"}function D(n){return l(A(n))}function I(n,i,h){h===void 0&&(h=!1);let s=it(n),y=D(n),u=c(y),w=y==="x"?s===(h?"end":"start")?"right":"left":s==="start"?"bottom":"top";return i.reference[u]>i.floating[u]&&(w=_(w)),[w,_(w)]}function j(n){return n.replace(/start|end/g,i=>gt[i])}function _(n){return n.replace(/left|right|bottom|top/g,i=>st[i])}function nt(n){return typeof n!="number"?(function(i){return{top:0,right:0,bottom:0,left:0,...i}})(n):{top:n,right:n,bottom:n,left:n}}function dt(n){let{x:i,y:h,width:s,height:y}=n;return{width:s,height:y,top:h,left:i,right:i+s,bottom:h+y,x:i,y:h}}function rt(n,i,h){let{reference:s,floating:y}=n,u=A(i),w=D(i),k=c(w),W=N(i),M=u==="y",L=s.x+s.width/2-y.width/2,p=s.y+s.height/2-y.height/2,E=s[k]/2-y[k]/2,m;switch(W){case"top":m={x:L,y:s.y-y.height};break;case"bottom":m={x:L,y:s.y+s.height};break;case"right":m={x:s.x+s.width,y:p};break;case"left":m={x:s.x-y.width,y:p};break;default:m={x:s.x,y:s.y}}switch(it(i)){case"start":m[w]-=E*(h&&M?-1:1);break;case"end":m[w]+=E*(h&&M?-1:1)}return m}async function ct(n,i){var h;i===void 0&&(i={});let{x:s,y,platform:u,rects:w,elements:k,strategy:W}=n,{boundary:M="clippingAncestors",rootBoundary:L="viewport",elementContext:p="floating",altBoundary:E=!1,padding:m=0}=V(i,n),T=nt(m),P=k[E?p==="floating"?"reference":"floating":p],O=dt(await u.getClippingRect({element:(h=await(u.isElement==null?void 0:u.isElement(P)))==null||h?P:P.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(k.floating)),boundary:M,rootBoundary:L,strategy:W})),H=p==="floating"?{x:s,y,width:w.floating.width,height:w.floating.height}:w.reference,B=await(u.getOffsetParent==null?void 0:u.getOffsetParent(k.floating)),C=await(u.isElement==null?void 0:u.isElement(B))&&await(u.getScale==null?void 0:u.getScale(B))||{x:1,y:1},S=dt(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:k,rect:H,offsetParent:B,strategy:W}):H);return{top:(O.top-S.top+T.top)/C.y,bottom:(S.bottom-O.bottom+T.bottom)/C.y,left:(O.left-S.left+T.left)/C.x,right:(S.right-O.right+T.right)/C.x}}function ut(n,i){return{top:n.top-i.height,right:n.right-i.width,bottom:n.bottom-i.height,left:n.left-i.width}}function ht(n){return R.some(i=>n[i]>=0)}function pt(n){let i=Q(...n.map(s=>s.left)),h=Q(...n.map(s=>s.top));return{x:i,y:h,width:G(...n.map(s=>s.right))-i,height:G(...n.map(s=>s.bottom))-h}}g.arrow=n=>({name:"arrow",options:n,async fn(i){let{x:h,y:s,placement:y,rects:u,platform:w,elements:k,middlewareData:W}=i,{element:M,padding:L=0}=V(n,i)||{};if(M==null)return{};let p=nt(L),E={x:h,y:s},m=D(y),T=c(m),P=await w.getDimensions(M),O=m==="y",H=O?"top":"left",B=O?"bottom":"right",C=O?"clientHeight":"clientWidth",S=u.reference[T]+u.reference[m]-E[m]-u.floating[T],F=E[m]-u.reference[m],J=await(w.getOffsetParent==null?void 0:w.getOffsetParent(M)),K=J?J[C]:0;K&&await(w.isElement==null?void 0:w.isElement(J))||(K=k.floating[C]||u.floating[T]);let ot=S/2-F/2,z=K/2-P[T]/2-1,X=Q(p[H],z),t=Q(p[B],z),e=X,o=K-P[T]-t,r=K/2-P[T]/2+ot,a=mt(e,r,o),f=!W.arrow&&it(y)!=null&&r!==a&&u.reference[T]/2-(rit(e)===z),...t.filter(e=>it(e)!==z)]:t.filter(e=>N(e)===e)).filter(e=>!z||it(e)===z||!!X&&j(e)!==e)})(p||null,m,E):E,O=await ct(i,T),H=((h=w.autoPlacement)==null?void 0:h.index)||0,B=P[H];if(B==null)return{};let C=I(B,u,await(W.isRTL==null?void 0:W.isRTL(M.floating)));if(k!==B)return{reset:{placement:P[0]}};let S=[O[N(B)],O[C[0]],O[C[1]]],F=[...((s=w.autoPlacement)==null?void 0:s.overflows)||[],{placement:B,overflows:S}],J=P[H+1];if(J)return{data:{index:H+1,overflows:F},reset:{placement:J}};let K=F.map(z=>{let X=it(z.placement);return[z.placement,X&&L?z.overflows.slice(0,2).reduce((t,e)=>t+e,0):z.overflows[0],z.overflows]}).sort((z,X)=>z[1]-X[1]),ot=((y=K.filter(z=>z[2].slice(0,it(z[0])?2:3).every(X=>X<=0))[0])==null?void 0:y[0])||K[0][0];return ot!==k?{data:{index:H+1,overflows:F},reset:{placement:ot}}:{}}}},g.computePosition=async(n,i,h)=>{let{placement:s="bottom",strategy:y="absolute",middleware:u=[],platform:w}=h,k=u.filter(Boolean),W=await(w.isRTL==null?void 0:w.isRTL(i)),M=await w.getElementRects({reference:n,floating:i,strategy:y}),{x:L,y:p}=rt(M,s,W),E=s,m={},T=0;for(let P=0;Pq+"-"+d),f&&(v=v.concat(v.map(j)))),v})(k,P,T,S));let K=[k,...F],ot=await ct(i,O),z=[],X=((s=u.flip)==null?void 0:s.overflows)||[];if(L&&z.push(ot[H]),p){let a=I(y,w,S);z.push(ot[a[0]],ot[a[1]])}if(X=[...X,{placement:y,overflows:z}],!z.every(a=>a<=0)){var t,e;let a=(((t=u.flip)==null?void 0:t.index)||0)+1,f=K[a];if(f){var o;let x=p==="alignment"&&B!==A(f),d=((o=X[0])==null?void 0:o.overflows[0])>0;if(!x||d)return{data:{index:a,overflows:X},reset:{placement:f}}}let b=(e=X.filter(x=>x.overflows[0]<=0).sort((x,d)=>x.overflows[1]-d.overflows[1])[0])==null?void 0:e.placement;if(!b)switch(m){case"bestFit":{var r;let x=(r=X.filter(d=>{if(J){let v=A(d.placement);return v===B||v==="y"}return!0}).map(d=>[d.placement,d.overflows.filter(v=>v>0).reduce((v,q)=>v+q,0)]).sort((d,v)=>d[1]-v[1])[0])==null?void 0:r[0];x&&(b=x);break}case"initialPlacement":b=k}if(y!==b)return{reset:{placement:b}}}return{}}}},g.hide=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(i){let{rects:h}=i,{strategy:s="referenceHidden",...y}=V(n,i);switch(s){case"referenceHidden":{let u=ut(await ct(i,{...y,elementContext:"reference"}),h.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:ht(u)}}}case"escaped":{let u=ut(await ct(i,{...y,altBoundary:!0}),h.floating);return{data:{escapedOffsets:u,escaped:ht(u)}}}default:return{}}}}},g.inline=function(n){return n===void 0&&(n={}),{name:"inline",options:n,async fn(i){let{placement:h,elements:s,rects:y,platform:u,strategy:w}=i,{padding:k=2,x:W,y:M}=V(n,i),L=Array.from(await(u.getClientRects==null?void 0:u.getClientRects(s.reference))||[]),p=(function(P){let O=P.slice().sort((C,S)=>C.y-S.y),H=[],B=null;for(let C=0;CB.height/2?H.push([S]):H[H.length-1].push(S),B=S}return H.map(C=>dt(pt(C)))})(L),E=dt(pt(L)),m=nt(k),T=await u.getElementRects({reference:{getBoundingClientRect:function(){if(p.length===2&&p[0].left>p[1].right&&W!=null&&M!=null)return p.find(P=>W>P.left-m.left&&WP.top-m.top&&M=2){if(A(h)==="y"){let F=p[0],J=p[p.length-1],K=N(h)==="top",ot=F.top,z=J.bottom,X=K?F.left:J.left,t=K?F.right:J.right;return{top:ot,bottom:z,left:X,right:t,width:t-X,height:z-ot,x:X,y:ot}}let P=N(h)==="left",O=G(...p.map(F=>F.right)),H=Q(...p.map(F=>F.left)),B=p.filter(F=>P?F.left===H:F.right===O),C=B[0].top,S=B[B.length-1].bottom;return{top:C,bottom:S,left:H,right:O,width:O-H,height:S-C,x:H,y:C}}return E}},floating:s.floating,strategy:w});return y.reference.x!==T.reference.x||y.reference.y!==T.reference.y||y.reference.width!==T.reference.width||y.reference.height!==T.reference.height?{reset:{rects:T}}:{}}}},g.limitShift=function(n){return n===void 0&&(n={}),{options:n,fn(i){let{x:h,y:s,placement:y,rects:u,middlewareData:w}=i,{offset:k=0,mainAxis:W=!0,crossAxis:M=!0}=V(n,i),L={x:h,y:s},p=A(y),E=l(p),m=L[E],T=L[p],P=V(k,i),O=typeof P=="number"?{mainAxis:P,crossAxis:0}:{mainAxis:0,crossAxis:0,...P};if(W){let C=E==="y"?"height":"width",S=u.reference[E]-u.floating[C]+O.mainAxis,F=u.reference[E]+u.reference[C]-O.mainAxis;mF&&(m=F)}if(M){var H,B;let C=E==="y"?"width":"height",S=["top","left"].includes(N(y)),F=u.reference[p]-u.floating[C]+(S&&((H=w.offset)==null?void 0:H[p])||0)+(S?0:O.crossAxis),J=u.reference[p]+u.reference[C]+(S?0:((B=w.offset)==null?void 0:B[p])||0)-(S?O.crossAxis:0);TJ&&(T=J)}return{[E]:m,[p]:T}}}},g.offset=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(i){var h,s;let{x:y,y:u,placement:w,middlewareData:k}=i,W=await(async function(M,L){let{placement:p,platform:E,elements:m}=M,T=await(E.isRTL==null?void 0:E.isRTL(m.floating)),P=N(p),O=it(p),H=A(p)==="y",B=["left","top"].includes(P)?-1:1,C=T&&H?-1:1,S=V(L,M),{mainAxis:F,crossAxis:J,alignmentAxis:K}=typeof S=="number"?{mainAxis:S,crossAxis:0,alignmentAxis:null}:{mainAxis:S.mainAxis||0,crossAxis:S.crossAxis||0,alignmentAxis:S.alignmentAxis};return O&&typeof K=="number"&&(J=O==="end"?-1*K:K),H?{x:J*C,y:F*B}:{x:F*B,y:J*C}})(i,n);return w===((h=k.offset)==null?void 0:h.placement)&&(s=k.arrow)!=null&&s.alignmentOffset?{}:{x:y+W.x,y:u+W.y,data:{...W,placement:w}}}}},g.rectToClientRect=dt,g.shift=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(i){let{x:h,y:s,placement:y}=i,{mainAxis:u=!0,crossAxis:w=!1,limiter:k={fn:O=>{let{x:H,y:B}=O;return{x:H,y:B}}},...W}=V(n,i),M={x:h,y:s},L=await ct(i,W),p=A(N(y)),E=l(p),m=M[E],T=M[p];if(u){let O=E==="y"?"bottom":"right";m=mt(m+L[E==="y"?"top":"left"],m,m-L[O])}if(w){let O=p==="y"?"bottom":"right";T=mt(T+L[p==="y"?"top":"left"],T,T-L[O])}let P=k.fn({...i,[E]:m,[p]:T});return{...P,data:{x:P.x-h,y:P.y-s,enabled:{[E]:u,[p]:w}}}}}},g.size=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(i){var h,s;let{placement:y,rects:u,platform:w,elements:k}=i,{apply:W=()=>{},...M}=V(n,i),L=await ct(i,M),p=N(y),E=it(y),m=A(y)==="y",{width:T,height:P}=u.floating,O,H;p==="top"||p==="bottom"?(O=p,H=E===(await(w.isRTL==null?void 0:w.isRTL(k.floating))?"start":"end")?"left":"right"):(H=p,O=E==="end"?"top":"bottom");let B=P-L.top-L.bottom,C=T-L.left-L.right,S=Q(P-L[O],B),F=Q(T-L[H],C),J=!i.middlewareData.shift,K=S,ot=F;if((h=i.middlewareData.shift)!=null&&h.enabled.x&&(ot=C),(s=i.middlewareData.shift)!=null&&s.enabled.y&&(K=B),J&&!E){let X=G(L.left,0),t=G(L.right,0),e=G(L.top,0),o=G(L.bottom,0);m?ot=T-2*(X!==0||t!==0?X+t:G(L.left,L.right)):K=P-2*(e!==0||o!==0?e+o:G(L.top,L.bottom))}await W({...i,availableWidth:ot,availableHeight:K});let z=await w.getDimensions(k.floating);return T!==z.width||P!==z.height?{reset:{rects:!0}}:{}}}}})});var Ut=It((Rt,$t)=>{(function(g,R){typeof Rt=="object"&&typeof $t<"u"?R(Rt,Et()):typeof define=="function"&&define.amd?define(["exports","./floatingUICore"],R):R((g=typeof globalThis<"u"?globalThis:g||self).FloatingUIDOM={},g.FloatingUICore)})(Rt,function(g,R){"use strict";let at=Math.min,lt=Math.max,Q=Math.round,G=Math.floor,st=t=>({x:t,y:t});function gt(){return typeof window<"u"}function mt(t){return it(t)?(t.nodeName||"").toLowerCase():"#document"}function V(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function N(t){var e;return(e=(it(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function it(t){return!!gt()&&(t instanceof Node||t instanceof V(t).Node)}function l(t){return!!gt()&&(t instanceof Element||t instanceof V(t).Element)}function c(t){return!!gt()&&(t instanceof HTMLElement||t instanceof V(t).HTMLElement)}function A(t){return!(!gt()||typeof ShadowRoot>"u")&&(t instanceof ShadowRoot||t instanceof V(t).ShadowRoot)}function D(t){let{overflow:e,overflowX:o,overflowY:r,display:a}=rt(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+o)&&!["inline","contents"].includes(a)}function I(t){return["table","td","th"].includes(mt(t))}function j(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function _(t){let e=nt(),o=l(t)?rt(t):t;return["transform","translate","scale","rotate","perspective"].some(r=>!!o[r]&&o[r]!=="none")||!!o.containerType&&o.containerType!=="normal"||!e&&!!o.backdropFilter&&o.backdropFilter!=="none"||!e&&!!o.filter&&o.filter!=="none"||["transform","translate","scale","rotate","perspective","filter"].some(r=>(o.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(o.contain||"").includes(r))}function nt(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function dt(t){return["html","body","#document"].includes(mt(t))}function rt(t){return V(t).getComputedStyle(t)}function ct(t){return l(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ut(t){if(mt(t)==="html")return t;let e=t.assignedSlot||t.parentNode||A(t)&&t.host||N(t);return A(e)?e.host:e}function ht(t){let e=ut(t);return dt(e)?t.ownerDocument?t.ownerDocument.body:t.body:c(e)&&D(e)?e:ht(e)}function pt(t,e,o){var r;e===void 0&&(e=[]),o===void 0&&(o=!0);let a=ht(t),f=a===((r=t.ownerDocument)==null?void 0:r.body),b=V(a);if(f){let x=n(b);return e.concat(b,b.visualViewport||[],D(a)?a:[],x&&o?pt(x):[])}return e.concat(a,pt(a,[],o))}function n(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function i(t){let e=rt(t),o=parseFloat(e.width)||0,r=parseFloat(e.height)||0,a=c(t),f=a?t.offsetWidth:o,b=a?t.offsetHeight:r,x=Q(o)!==f||Q(r)!==b;return x&&(o=f,r=b),{width:o,height:r,$:x}}function h(t){return l(t)?t:t.contextElement}function s(t){let e=h(t);if(!c(e))return st(1);let o=e.getBoundingClientRect(),{width:r,height:a,$:f}=i(e),b=(f?Q(o.width):o.width)/r,x=(f?Q(o.height):o.height)/a;return b&&Number.isFinite(b)||(b=1),x&&Number.isFinite(x)||(x=1),{x:b,y:x}}let y=st(0);function u(t){let e=V(t);return nt()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:y}function w(t,e,o,r){e===void 0&&(e=!1),o===void 0&&(o=!1);let a=t.getBoundingClientRect(),f=h(t),b=st(1);e&&(r?l(r)&&(b=s(r)):b=s(t));let x=(function(et,Z,$){return Z===void 0&&(Z=!1),!(!$||Z&&$!==V(et))&&Z})(f,o,r)?u(f):st(0),d=(a.left+x.x)/b.x,v=(a.top+x.y)/b.y,q=a.width/b.x,Y=a.height/b.y;if(f){let et=V(f),Z=r&&l(r)?V(r):r,$=et,tt=n($);for(;tt&&r&&Z!==$;){let U=s(tt),ft=tt.getBoundingClientRect(),yt=rt(tt),vt=ft.left+(tt.clientLeft+parseFloat(yt.paddingLeft))*U.x,bt=ft.top+(tt.clientTop+parseFloat(yt.paddingTop))*U.y;d*=U.x,v*=U.y,q*=U.x,Y*=U.y,d+=vt,v+=bt,$=V(tt),tt=n($)}}return R.rectToClientRect({width:q,height:Y,x:d,y:v})}function k(t,e){let o=ct(t).scrollLeft;return e?e.left+o:w(N(t)).left+o}function W(t,e,o){o===void 0&&(o=!1);let r=t.getBoundingClientRect();return{x:r.left+e.scrollLeft-(o?0:k(t,r)),y:r.top+e.scrollTop}}function M(t,e,o){let r;if(e==="viewport")r=(function(a,f){let b=V(a),x=N(a),d=b.visualViewport,v=x.clientWidth,q=x.clientHeight,Y=0,et=0;if(d){v=d.width,q=d.height;let Z=nt();(!Z||Z&&f==="fixed")&&(Y=d.offsetLeft,et=d.offsetTop)}return{width:v,height:q,x:Y,y:et}})(t,o);else if(e==="document")r=(function(a){let f=N(a),b=ct(a),x=a.ownerDocument.body,d=lt(f.scrollWidth,f.clientWidth,x.scrollWidth,x.clientWidth),v=lt(f.scrollHeight,f.clientHeight,x.scrollHeight,x.clientHeight),q=-b.scrollLeft+k(a),Y=-b.scrollTop;return rt(x).direction==="rtl"&&(q+=lt(f.clientWidth,x.clientWidth)-d),{width:d,height:v,x:q,y:Y}})(N(t));else if(l(e))r=(function(a,f){let b=w(a,!0,f==="fixed"),x=b.top+a.clientTop,d=b.left+a.clientLeft,v=c(a)?s(a):st(1);return{width:a.clientWidth*v.x,height:a.clientHeight*v.y,x:d*v.x,y:x*v.y}})(e,o);else{let a=u(t);r={x:e.x-a.x,y:e.y-a.y,width:e.width,height:e.height}}return R.rectToClientRect(r)}function L(t,e){let o=ut(t);return!(o===e||!l(o)||dt(o))&&(rt(o).position==="fixed"||L(o,e))}function p(t,e,o){let r=c(e),a=N(e),f=o==="fixed",b=w(t,!0,f,e),x={scrollLeft:0,scrollTop:0},d=st(0);function v(){d.x=k(a)}if(r||!r&&!f)if((mt(e)!=="body"||D(a))&&(x=ct(e)),r){let Y=w(e,!0,f,e);d.x=Y.x+e.clientLeft,d.y=Y.y+e.clientTop}else a&&v();f&&!r&&a&&v();let q=!a||r||f?st(0):W(a,x);return{x:b.left+x.scrollLeft-d.x-q.x,y:b.top+x.scrollTop-d.y-q.y,width:b.width,height:b.height}}function E(t){return rt(t).position==="static"}function m(t,e){if(!c(t)||rt(t).position==="fixed")return null;if(e)return e(t);let o=t.offsetParent;return N(t)===o&&(o=o.ownerDocument.body),o}function T(t,e){let o=V(t);if(j(t))return o;if(!c(t)){let a=ut(t);for(;a&&!dt(a);){if(l(a)&&!E(a))return a;a=ut(a)}return o}let r=m(t,e);for(;r&&I(r)&&E(r);)r=m(r,e);return r&&dt(r)&&E(r)&&!_(r)?o:r||(function(a){let f=ut(a);for(;c(f)&&!dt(f);){if(_(f))return f;if(j(f))return null;f=ut(f)}return null})(t)||o}let P={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:o,offsetParent:r,strategy:a}=t,f=a==="fixed",b=N(r),x=!!e&&j(e.floating);if(r===b||x&&f)return o;let d={scrollLeft:0,scrollTop:0},v=st(1),q=st(0),Y=c(r);if((Y||!Y&&!f)&&((mt(r)!=="body"||D(b))&&(d=ct(r)),c(r))){let Z=w(r);v=s(r),q.x=Z.x+r.clientLeft,q.y=Z.y+r.clientTop}let et=!b||Y||f?st(0):W(b,d,!0);return{width:o.width*v.x,height:o.height*v.y,x:o.x*v.x-d.scrollLeft*v.x+q.x+et.x,y:o.y*v.y-d.scrollTop*v.y+q.y+et.y}},getDocumentElement:N,getClippingRect:function(t){let{element:e,boundary:o,rootBoundary:r,strategy:a}=t,f=[...o==="clippingAncestors"?j(e)?[]:(function(d,v){let q=v.get(d);if(q)return q;let Y=pt(d,[],!1).filter(tt=>l(tt)&&mt(tt)!=="body"),et=null,Z=rt(d).position==="fixed",$=Z?ut(d):d;for(;l($)&&!dt($);){let tt=rt($),U=_($);U||tt.position!=="fixed"||(et=null),(Z?!U&&!et:!U&&tt.position==="static"&&et&&["absolute","fixed"].includes(et.position)||D($)&&!U&&L(d,$))?Y=Y.filter(ft=>ft!==$):et=tt,$=ut($)}return v.set(d,Y),Y})(e,this._c):[].concat(o),r],b=f[0],x=f.reduce((d,v)=>{let q=M(e,v,a);return d.top=lt(q.top,d.top),d.right=at(q.right,d.right),d.bottom=at(q.bottom,d.bottom),d.left=lt(q.left,d.left),d},M(e,b,a));return{width:x.right-x.left,height:x.bottom-x.top,x:x.left,y:x.top}},getOffsetParent:T,getElementRects:async function(t){let e=this.getOffsetParent||T,o=this.getDimensions,r=await o(t.floating);return{reference:p(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){let{width:e,height:o}=i(t);return{width:e,height:o}},getScale:s,isElement:l,isRTL:function(t){return rt(t).direction==="rtl"}};function O(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}let H=R.detectOverflow,B=R.offset,C=R.autoPlacement,S=R.shift,F=R.flip,J=R.size,K=R.hide,ot=R.arrow,z=R.inline,X=R.limitShift;return g.arrow=ot,g.autoPlacement=C,g.autoUpdate=function(t,e,o,r){r===void 0&&(r={});let{ancestorScroll:a=!0,ancestorResize:f=!0,elementResize:b=typeof ResizeObserver=="function",layoutShift:x=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,v=h(t),q=a||f?[...v?pt(v):[],...pt(e)]:[];q.forEach(U=>{a&&U.addEventListener("scroll",o,{passive:!0}),f&&U.addEventListener("resize",o)});let Y=v&&x?(function(U,ft){let yt,vt=null,bt=N(U);function Pt(){var wt;clearTimeout(yt),(wt=vt)==null||wt.disconnect(),vt=null}return(function wt(Lt,xt){Lt===void 0&&(Lt=!1),xt===void 0&&(xt=1),Pt();let Ot=U.getBoundingClientRect(),{left:Ct,top:St,width:Dt,height:kt}=Ot;if(Lt||ft(),!Dt||!kt)return;let Ft={rootMargin:-G(St)+"px "+-G(bt.clientWidth-(Ct+Dt))+"px "+-G(bt.clientHeight-(St+kt))+"px "+-G(Ct)+"px",threshold:lt(0,at(1,xt))||1},Bt=!0;function Ht(Mt){let At=Mt[0].intersectionRatio;if(At!==xt){if(!Bt)return wt();At?wt(!1,At):yt=setTimeout(()=>{wt(!1,1e-7)},1e3)}At!==1||O(Ot,U.getBoundingClientRect())||wt(),Bt=!1}try{vt=new IntersectionObserver(Ht,{...Ft,root:bt.ownerDocument})}catch{vt=new IntersectionObserver(Ht,Ft)}vt.observe(U)})(!0),Pt})(v,o):null,et,Z=-1,$=null;b&&($=new ResizeObserver(U=>{let[ft]=U;ft&&ft.target===v&&$&&($.unobserve(e),cancelAnimationFrame(Z),Z=requestAnimationFrame(()=>{var yt;(yt=$)==null||yt.observe(e)})),o()}),v&&!d&&$.observe(v),$.observe(e));let tt=d?w(t):null;return d&&(function U(){let ft=w(t);tt&&!O(tt,ft)&&o(),tt=ft,et=requestAnimationFrame(U)})(),o(),()=>{var U;q.forEach(ft=>{a&&ft.removeEventListener("scroll",o),f&&ft.removeEventListener("resize",o)}),Y?.(),(U=$)==null||U.disconnect(),$=null,d&&cancelAnimationFrame(et)}},g.computePosition=(t,e,o)=>{let r=new Map,a={platform:P,...o},f={...a.platform,_c:r};return R.computePosition(t,e,{...a,platform:f})},g.detectOverflow=H,g.flip=F,g.getOverflowAncestors=pt,g.hide=K,g.inline=z,g.limitShift=X,g.offset=B,g.platform=P,g.shift=S,g.size=J,window.FloatingUIDOM=g,g})});var Jt=Wt(Ut()),Kt=Wt(Et());(function(){"use strict";let g=new Map,R=new Map;if(!document.querySelector("[data-tui-popover-portal-container]")){let l=document.createElement("div");l.setAttribute("data-tui-popover-portal-container",""),l.className="fixed inset-0 z-[9999] pointer-events-none",document.body.appendChild(l)}if(!document.getElementById("popover-animations")){let l=document.createElement("style");l.id="popover-animations",l.textContent=` + @keyframes popover-in { 0% { opacity: 0; transform: scale(0.95); } 100% { opacity: 1; transform: scale(1); } } + @keyframes popover-out { 0% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(0.95); } } + [data-tui-popover-id].popover-animate-in { animation: popover-in 0.15s cubic-bezier(0.16, 1, 0.3, 1); } + [data-tui-popover-id].popover-animate-out { animation: popover-out 0.1s cubic-bezier(0.16, 1, 0.3, 1) forwards; } + `,document.head.appendChild(l)}function at(l,c){if(!window.FloatingUIDOM)return;let{computePosition:A,offset:D,flip:I,shift:j,arrow:_}=window.FloatingUIDOM,nt=c.querySelector("[data-tui-popover-arrow]"),dt=c.getAttribute("data-tui-popover-placement")||"bottom",rt=parseInt(c.getAttribute("data-tui-popover-offset"))||(nt?8:4),ct=[D(rt),I({padding:10}),j({padding:10})];nt&&ct.push(_({element:nt,padding:5}));let ut=l,ht=0;for(let pt of l.children){let n=pt.getBoundingClientRect?.();if(n){let i=n.width*n.height;i>ht&&(ht=i,ut=pt)}}A(ut,c,{placement:dt,middleware:ct}).then(({x:pt,y:n,placement:i,middlewareData:h})=>{if(Object.assign(c.style,{left:`${pt}px`,top:`${n}px`}),nt&&h.arrow){let{x:s,y}=h.arrow;nt.setAttribute("data-tui-popover-placement",i),Object.assign(nt.style,{left:s!=null?`${s}px`:"",top:y!=null?`${y}px`:""})}c.getAttribute("data-tui-popover-match-width")==="true"&&c.style.setProperty("--popover-trigger-width",`${ut.offsetWidth}px`)})}function lt(l){if(!window.FloatingUIDOM)return;let c=l.getAttribute("data-tui-popover-trigger");if(!c)return;let A=document.getElementById(c);if(!A)return;for(let j of document.querySelectorAll('[data-tui-popover-exclusive="true"][data-tui-popover-open="true"]')){let _=j.id;_&&_!==c&&!j.contains(l)&&G(_)}let D=document.querySelector("[data-tui-popover-portal-container]");D&&A.parentNode!==D&&D.appendChild(A),A.style.display="block",A.classList.remove("popover-animate-out"),A.classList.add("popover-animate-in"),A.setAttribute("data-tui-popover-open","true"),document.querySelectorAll(`[data-tui-popover-trigger="${c}"]`).forEach(j=>{j.setAttribute("data-tui-popover-open","true")}),at(l,A);let I=window.FloatingUIDOM.autoUpdate(l,A,()=>at(l,A),{animationFrame:!0});g.set(c,I)}function Q(l){let c=document.querySelector(`[data-tui-popover-trigger="${l}"]`);c&<(c)}function G(l,c=!1){let A=document.getElementById(l);if(!A)return;let D=g.get(l);D&&(D(),g.delete(l));let I=R.get(l);I&&(clearTimeout(I.enter),clearTimeout(I.leave),R.delete(l)),A.setAttribute("data-tui-popover-open","false"),document.querySelectorAll(`[data-tui-popover-trigger="${l}"]`).forEach(_=>{_.setAttribute("data-tui-popover-open","false")});function j(){A.style.display="none",A.classList.remove("popover-animate-in","popover-animate-out")}c?j():(A.classList.remove("popover-animate-in"),A.classList.add("popover-animate-out"),setTimeout(j,150))}function st(l){return document.getElementById(l)?.getAttribute("data-tui-popover-open")==="true"||!1}function gt(l){st(l)?G(l):Q(l)}function mt(l=null){document.querySelectorAll('[data-tui-popover-open="true"][data-tui-popover-id]').forEach(c=>{c.id&&c.id!==l&&G(c.id)})}document.addEventListener("click",l=>{let c=l.target.closest("[data-tui-popover-trigger]");if(c&&c.getAttribute("data-tui-popover-type")!=="hover"){if(c.querySelector(':disabled, [disabled], [aria-disabled="true"]'))return;l.stopPropagation();let I=c.getAttribute("data-tui-popover-trigger");I&>(I);return}let A=l.target.closest("[data-tui-popover-id]");document.querySelectorAll('[data-tui-popover-open="true"][data-tui-popover-id]').forEach(D=>{if(D!==A&&D.getAttribute("data-tui-popover-disable-clickaway")!=="true"){let I=D.id,j=document.querySelectorAll(`[data-tui-popover-trigger="${I}"]`),_=!1;for(let nt of j)if(nt.contains(l.target)){_=!0;break}_||G(I)}})});function V(l,c){let A=document.getElementById(c);if(!A)return;let D=parseInt(A.getAttribute("data-tui-popover-hover-delay"))||100,I=R.get(c)||{};clearTimeout(I.leave),I.enter=setTimeout(()=>lt(l),D),R.set(c,I)}function N(l,c){let A=document.getElementById(l);if(!A)return;let D=parseInt(A.getAttribute("data-tui-popover-hover-out-delay"))||200,I=R.get(l)||{};clearTimeout(I.enter),c||(I.leave=setTimeout(()=>G(l),D),R.set(l,I))}document.addEventListener("mouseover",l=>{let c=l.target.closest("[data-tui-popover-trigger]");if(c&&!c.contains(l.relatedTarget)&&c.getAttribute("data-tui-popover-type")==="hover"){let D=c.getAttribute("data-tui-popover-trigger");D&&V(c,D)}let A=l.target.closest("[data-tui-popover-id]");if(A&&!A.contains(l.relatedTarget)&&A.getAttribute("data-tui-popover-open")==="true"){let D=A.id,I=document.querySelectorAll(`[data-tui-popover-trigger="${D}"]`);for(let j of I)if(j.getAttribute("data-tui-popover-type")==="hover"){let _=R.get(D)||{};clearTimeout(_.leave),R.set(D,_);break}}}),document.addEventListener("mouseout",l=>{let c=l.target.closest("[data-tui-popover-trigger]");if(c&&!c.contains(l.relatedTarget)&&c.getAttribute("data-tui-popover-type")==="hover"){let D=c.getAttribute("data-tui-popover-trigger"),I=document.getElementById(D);N(D,I?.contains(l.relatedTarget))}let A=l.target.closest("[data-tui-popover-id]");if(A&&!A.contains(l.relatedTarget)&&A.getAttribute("data-tui-popover-open")==="true"){let D=A.id,I=document.querySelectorAll(`[data-tui-popover-trigger="${D}"]`),j=!1,_=!1;for(let nt of I)nt.getAttribute("data-tui-popover-type")==="hover"&&(j=!0,nt.contains(l.relatedTarget)&&(_=!0));j&&!_&&N(D,!1)}}),document.addEventListener("keydown",l=>{l.key==="Escape"&&document.querySelectorAll('[data-tui-popover-open="true"][data-tui-popover-id]').forEach(c=>{c.getAttribute("data-tui-popover-disable-esc")!=="true"&&G(c.id)})});function it(){document.querySelectorAll("[data-tui-popover-trigger]").forEach(l=>{l.querySelector(':disabled, [disabled], [aria-disabled="true"]')?(l.classList.add("cursor-not-allowed","opacity-50"),l.classList.remove("cursor-pointer")):(l.classList.remove("cursor-not-allowed","opacity-50"),l.classList.add("cursor-pointer"))})}document.addEventListener("DOMContentLoaded",it),new MutationObserver(it).observe(document.body,{subtree:!0,attributes:!0,attributeFilter:["disabled","aria-disabled"],childList:!0}),window.closePopover=G,window.tui=window.tui||{},window.tui.popover={open:Q,close:G,closeAll:mt,toggle:gt,isOpen:st}})();})(); diff --git a/assets/js/progress.min.js b/assets/js/progress.min.js new file mode 100644 index 0000000..c9f0601 --- /dev/null +++ b/assets/js/progress.min.js @@ -0,0 +1 @@ +(()=>{(function(){"use strict";function a(r){let e=r.querySelector("[data-tui-progress-indicator]");if(!e)return;let t=parseFloat(r.getAttribute("aria-valuenow")||"0"),u=parseFloat(r.getAttribute("aria-valuemax")||"100")||100,i=Math.max(0,Math.min(100,t/u*100));e.style.width=i+"%"}function o(){document.querySelectorAll('[role="progressbar"]').forEach(a)}document.addEventListener("DOMContentLoaded",()=>{o();let r=new MutationObserver(e=>{e.forEach(t=>{t.type==="attributes"&&(t.attributeName==="aria-valuenow"||t.attributeName==="aria-valuemax")&&a(t.target)})});new MutationObserver(()=>{document.querySelectorAll('[role="progressbar"]').forEach(e=>{e.hasAttribute("data-tui-progress-observed")||(e.setAttribute("data-tui-progress-observed","true"),a(e),r.observe(e,{attributes:!0,attributeFilter:["aria-valuenow","aria-valuemax"]}))})}).observe(document.body,{childList:!0,subtree:!0})})})();})(); diff --git a/assets/js/rating.min.js b/assets/js/rating.min.js new file mode 100644 index 0000000..1251983 --- /dev/null +++ b/assets/js/rating.min.js @@ -0,0 +1 @@ +(()=>{(function(){"use strict";function u(t){return{value:parseFloat(t.getAttribute("data-tui-rating-initial-value"))||0,precision:parseFloat(t.getAttribute("data-tui-rating-precision"))||1,readonly:t.getAttribute("data-tui-rating-readonly")==="true",name:t.getAttribute("data-tui-rating-name")||"",onlyInteger:t.getAttribute("data-tui-rating-onlyinteger")==="true"}}function d(t){return parseFloat(t.getAttribute("data-tui-rating-current"))||parseFloat(t.getAttribute("data-tui-rating-initial-value"))||0}function l(t,a){t.setAttribute("data-tui-rating-current",a);let e=t.querySelector("[data-tui-rating-input]");e&&(e.value=a.toFixed(2),e.dispatchEvent(new Event("input",{bubbles:!0})),e.dispatchEvent(new Event("change",{bubbles:!0})))}function c(t,a){let e=d(t),r=a>0?a:e;t.querySelectorAll("[data-tui-rating-item]").forEach(i=>{let o=parseInt(i.getAttribute("data-tui-rating-value"),10);if(isNaN(o))return;let s=i.querySelector("[data-tui-rating-item-foreground]");if(!s)return;let n=o<=Math.floor(r),f=!n&&o-1{let r=parseInt(e.getAttribute("data-tui-rating-value"),10);!isNaN(r)&&r>a&&(a=r)}),Math.max(1,a)}document.addEventListener("click",t=>{let a=t.target.closest("[data-tui-rating-item]");if(!a)return;let e=a.closest("[data-tui-rating-component]");if(!e)return;let r=u(e);if(r.readonly)return;let i=parseInt(a.getAttribute("data-tui-rating-value"),10);if(isNaN(i))return;let o=d(e),s=g(e),n=i;r.onlyInteger?n=Math.round(n):o===n&&n%1===0?n=Math.max(0,n-r.precision):n=Math.round(n/r.precision)*r.precision,n=Math.max(0,Math.min(s,n)),l(e,n),c(e,0),e.dispatchEvent(new CustomEvent("rating-change",{bubbles:!0,detail:{name:r.name,value:n,maxValue:s}}))}),document.addEventListener("mouseover",t=>{let a=t.target.closest("[data-tui-rating-item]");if(!a)return;let e=a.closest("[data-tui-rating-component]");if(!e||u(e).readonly)return;let r=parseInt(a.getAttribute("data-tui-rating-value"),10);isNaN(r)||c(e,r)}),document.addEventListener("mouseout",t=>{let a=t.target.closest("[data-tui-rating-component]");!a||u(a).readonly||a.contains(t.relatedTarget)||c(a,0)}),document.addEventListener("reset",t=>{t.target.matches("form")&&t.target.querySelectorAll("[data-tui-rating-component]").forEach(a=>{let e=u(a);l(a,e.value),c(a,0)})}),new MutationObserver(()=>{document.querySelectorAll("[data-tui-rating-component]").forEach(t=>{if(!t.hasAttribute("data-tui-rating-current")){let e=u(t),r=g(t),i=Math.max(0,Math.min(r,e.value));l(t,Math.round(i/e.precision)*e.precision)}c(t,0),u(t).readonly&&(t.style.cursor="default",t.querySelectorAll("[data-tui-rating-item]").forEach(e=>{e.style.cursor="default"}))})}).observe(document.body,{childList:!0,subtree:!0})})();})(); diff --git a/assets/js/selectbox.min.js b/assets/js/selectbox.min.js new file mode 100644 index 0000000..7ff06b2 --- /dev/null +++ b/assets/js/selectbox.min.js @@ -0,0 +1 @@ +(()=>{(function(){"use strict";function x(e){let t=e.querySelector('input[type="hidden"]'),c=e.getAttribute("data-tui-selectbox-content-id"),o=document.getElementById(c);if(!t||!o)return;let n=e.getAttribute("data-tui-selectbox-multiple")==="true",s=t.value?n?t.value.split(","):[t.value]:[];o.querySelectorAll(".select-item").forEach(i=>{let r=i.getAttribute("data-tui-selectbox-value")||"",a=s.includes(r),d=i.getAttribute("data-tui-selectbox-selected")==="true";if(a!==d)if(i.setAttribute("data-tui-selectbox-selected",a.toString()),a){i.classList.add("bg-accent","text-accent-foreground");let l=i.querySelector(".select-check");l&&l.classList.replace("opacity-0","opacity-100")}else{i.classList.remove("bg-accent","text-accent-foreground");let l=i.querySelector(".select-check");l&&l.classList.replace("opacity-100","opacity-0")}})}function u(e){let t=e.querySelector(".select-value"),c=e.querySelector('input[type="hidden"]'),o=e.getAttribute("data-tui-selectbox-content-id"),n=document.getElementById(o);if(!n&&c&&c.value){t.textContent=c.value,t.classList.remove("text-muted-foreground");return}if(!t||!n)return;let s=e.getAttribute("data-tui-selectbox-multiple")==="true",i=e.getAttribute("data-tui-selectbox-show-pills")==="true",r=t.getAttribute("data-tui-selectbox-placeholder")||"Select...",a=n.querySelectorAll('.select-item[data-tui-selectbox-selected="true"]');if(a.length===0){t.textContent=r,t.classList.add("text-muted-foreground"),c&&(c.value="");return}if(t.classList.remove("text-muted-foreground"),s){if(i){t.innerHTML="";let l=document.createElement("div");l.className="flex flex-wrap gap-1 items-center min-h-[1.5rem]";let v=[];Array.from(a).forEach(f=>{let g=document.createElement("span");g.className="inline-flex items-center gap-1 px-2 py-0.5 text-xs rounded-md bg-primary text-primary-foreground";let p=document.createElement("span");p.textContent=f.querySelector(".select-item-text")?.textContent||"",g.appendChild(p);let b=document.createElement("button");b.className="ml-0.5 hover:text-destructive focus:outline-none",b.type="button",b.innerHTML="\xD7",b.setAttribute("data-tui-selectbox-pill-remove",""),b.setAttribute("data-tui-selectbox-value",f.getAttribute("data-tui-selectbox-value")),g.appendChild(b),v.push(g)}),v.forEach(f=>l.appendChild(f)),t.appendChild(l),requestAnimationFrame(()=>{let f=t.offsetWidth;if(l.scrollWidth>f-10&&a.length>3){let p=e.getAttribute("data-tui-selectbox-selected-count-text")||"{n} items selected";t.textContent=p.replace("{n}",a.length)}})}else{let l=e.getAttribute("data-tui-selectbox-selected-count-text")||"{n} items selected";t.textContent=l.replace("{n}",a.length)}let d=Array.from(a).map(l=>l.getAttribute("data-tui-selectbox-value")||"");c&&(c.value=d.join(","))}else{let d=a[0],l=d.querySelector(".select-item-text")?.textContent||"";t.textContent=l,c&&(c.value=d.getAttribute("data-tui-selectbox-value")||"")}}function h(e){let t=e.value.toLowerCase().trim(),c=e.closest("[data-tui-popover-id]");c&&c.querySelectorAll(".select-item").forEach(o=>{let n=o.querySelector(".select-item-text")?.textContent.toLowerCase()||"",s=o.getAttribute("data-tui-selectbox-value")?.toLowerCase()||"",i=!t||n.includes(t)||s.includes(t);o.style.display=i?"":"none"})}function m(e){if(e.getAttribute("data-tui-selectbox-disabled")==="true")return;let t=e.closest("[data-tui-popover-id]"),c=t?.id,o=document.querySelector(`[data-tui-selectbox-content-id="${c}"]`);if(!o)return;let n=o.getAttribute("data-tui-selectbox-multiple")==="true",s=e.getAttribute("data-tui-selectbox-selected")==="true";if(n||t.querySelectorAll(".select-item").forEach(r=>{r.setAttribute("data-tui-selectbox-selected","false"),r.classList.remove("bg-accent","text-accent-foreground");let a=r.querySelector(".select-check");a&&a.classList.replace("opacity-100","opacity-0")}),e.setAttribute("data-tui-selectbox-selected",(!s).toString()),s){e.classList.remove("bg-accent","text-accent-foreground");let r=e.querySelector(".select-check");r&&r.classList.replace("opacity-100","opacity-0")}else{e.classList.add("bg-accent","text-accent-foreground");let r=e.querySelector(".select-check");r&&r.classList.replace("opacity-0","opacity-100")}u(o);let i=o.querySelector('input[type="hidden"]');i&&i.dispatchEvent(new Event("change",{bubbles:!0})),!n&&window.closePopover&&(window.closePopover(c),setTimeout(()=>o.focus(),50))}function S(){document.querySelectorAll(".select-container").forEach(e=>{let t=e.querySelector("button.select-trigger");t&&u(t)})}document.addEventListener("click",e=>{if(e.target.matches("[data-tui-selectbox-pill-remove]")){e.stopPropagation();let o=e.target.getAttribute("data-tui-selectbox-value"),s=e.target.closest("button.select-trigger")?.getAttribute("data-tui-selectbox-content-id"),r=document.getElementById(s)?.querySelector(`.select-item[data-tui-selectbox-value="${o}"]`);r&&m(r);return}let t=e.target.closest(".select-item");if(t){e.preventDefault(),m(t);return}let c=e.target.closest("button.select-trigger");if(c){let o=c.getAttribute("data-tui-selectbox-content-id"),n=document.getElementById(o),s=n?.querySelector("[data-tui-selectbox-search]");s&&setTimeout(()=>{n.style.display!=="none"&&s.focus()},50)}}),document.addEventListener("input",e=>{if(e.target.matches("[data-tui-selectbox-search]")){h(e.target);return}if(e.target.matches('.select-trigger input[type="hidden"]')){let t=e.target.closest(".select-trigger");t&&(x(t),u(t))}}),document.addEventListener("keydown",e=>{let t=document.activeElement;if(t?.matches("button.select-trigger")&&(e.key.length===1||e.key==="Backspace")){e.preventDefault();let o=t.getAttribute("data-tui-selectbox-content-id");t.click(),setTimeout(()=>{let n=document.getElementById(o)?.querySelector("[data-tui-selectbox-search]");n&&(n.focus(),e.key!=="Backspace"&&(n.value=e.key))},50)}let c=t?.closest("[data-tui-popover-id]");if(c?.querySelector(".select-item")){if(e.key==="ArrowDown"||e.key==="ArrowUp"){e.preventDefault();let o=Array.from(c.querySelectorAll(".select-item")).filter(i=>i.style.display!=="none");if(o.length===0)return;let n=c.querySelector(".select-item:focus"),s=0;if(n){let i=o.indexOf(n);s=e.key==="ArrowDown"?(i+1)%o.length:(i-1+o.length)%o.length}o[s].focus()}else if(e.key==="Enter"&&t?.matches(".select-item"))e.preventDefault(),m(t);else if(e.key==="Escape"){let o=c.querySelector("[data-tui-selectbox-search]");if(t?.matches(".select-item"))o?.focus();else if(t===o&&window.closePopover){window.closePopover(c.id);let n=document.querySelector(`[data-tui-selectbox-content-id="${c.id}"]`);setTimeout(()=>n?.focus(),50)}}}}),document.addEventListener("mouseover",e=>{let t=e.target.closest(".select-item");if(!t||t.getAttribute("data-tui-selectbox-disabled")==="true")return;let c=t.closest("[data-tui-popover-id]");c&&(c.querySelectorAll(".select-item").forEach(o=>{o.getAttribute("data-tui-selectbox-selected")!=="true"&&o.classList.remove("bg-accent","text-accent-foreground")}),t.getAttribute("data-tui-selectbox-selected")!=="true"&&t.classList.add("bg-accent","text-accent-foreground"))}),document.addEventListener("reset",e=>{e.target.matches("form")&&e.target.querySelectorAll(".select-container").forEach(t=>{let c=t.querySelector("button.select-trigger"),o=c?.getAttribute("data-tui-selectbox-content-id"),n=document.getElementById(o);if(n){n.querySelectorAll(".select-item").forEach(i=>{i.setAttribute("data-tui-selectbox-selected","false"),i.classList.remove("bg-accent","text-accent-foreground");let r=i.querySelector(".select-check");r&&r.classList.replace("opacity-100","opacity-0")});let s=n.querySelector("[data-tui-selectbox-search]");s&&(s.value="",h(s))}c&&u(c)})});function A(e){if(e.hasAttribute("data-tui-reactive-bound"))return;e.setAttribute("data-tui-reactive-bound","true");let t=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value");if(!t||!t.set)return;let c=t.set;Object.defineProperty(e,"value",{get:t.get,set:function(o){let n=this.value;if(c.call(this,o),n!==o){let s=this.closest(".select-trigger");s&&(x(s),u(s))}},configurable:!0})}function y(){document.querySelectorAll(".select-container").forEach(e=>{let t=e.querySelector("button.select-trigger");if(t&&!t.hasAttribute("data-initialized")){t.setAttribute("data-initialized","true");let c=t.querySelector('input[type="hidden"]');c&&A(c),u(t)}})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",y):y(),new MutationObserver(y).observe(document.body,{childList:!0,subtree:!0})})();})(); diff --git a/assets/js/sidebar.min.js b/assets/js/sidebar.min.js new file mode 100644 index 0000000..212d118 --- /dev/null +++ b/assets/js/sidebar.min.js @@ -0,0 +1 @@ +(()=>{(function(){"use strict";let n="sidebar_state";function d(){document.querySelectorAll("[data-tui-sidebar-content]").forEach(e=>{let a=e.getAttribute("data-tui-sidebar-content"),r=document.querySelector(`[data-tui-sidebar-mobile-portal="${a}"]`);if(!r)return;let i=window.matchMedia("(max-width: 767px)").matches;if(i&&e.parentElement!==r)r.appendChild(e);else if(!i&&e.parentElement===r){let s=document.querySelector(`[data-tui-sidebar-wrapper][data-tui-sidebar-id="${a}"] [data-sidebar="sidebar"] > div`);s&&s.appendChild(e)}})}d(),window.addEventListener("resize",d),new MutationObserver(d).observe(document.body,{childList:!0,subtree:!0}),document.addEventListener("click",t=>{let e=t.target.closest("[data-tui-sidebar-trigger]");if(e){t.preventDefault();let a=e.getAttribute("data-tui-sidebar-target");a&&o(a)}}),document.addEventListener("keydown",t=>{if((t.ctrlKey||t.metaKey)&&t.key.length===1){let e=document.querySelector("[data-tui-sidebar-wrapper]");if(!e)return;let a=e.getAttribute("data-tui-sidebar-keyboard-shortcut");if(!a||a.toLowerCase()!==t.key.toLowerCase())return;t.preventDefault();let r=e.querySelector('[data-sidebar="sidebar"]');r&&r.id&&o(r.id)}});function o(t){let e=document.querySelector(`[data-tui-sidebar-wrapper][data-tui-sidebar-id="${t}"]`);if(!e||e.getAttribute("data-tui-sidebar-collapsible")==="none")return;let i=e.getAttribute("data-tui-sidebar-state")==="expanded"?"collapsed":"expanded";u(t,i)}function u(t,e){let a=document.querySelector(`[data-tui-sidebar-wrapper][data-tui-sidebar-id="${t}"]`);if(!a)return;let r=a.getAttribute("data-tui-sidebar-collapsible");if(r==="none")return;a.setAttribute("data-tui-sidebar-state",e),e==="collapsed"&&r&&a.setAttribute("data-tui-sidebar-collapsible",r),c(t,e==="expanded"?"true":"false")}function c(t,e){document.cookie=`${n}=${e}; path=/; max-age=604800`}})();})(); diff --git a/assets/js/slider.min.js b/assets/js/slider.min.js new file mode 100644 index 0000000..0a25726 --- /dev/null +++ b/assets/js/slider.min.js @@ -0,0 +1 @@ +(()=>{(function(){"use strict";document.addEventListener("input",e=>{let t=e.target.closest('input[type="range"][data-tui-slider-input]');!t||!t.id||document.querySelectorAll(`[data-tui-slider-value][data-tui-slider-value-for="${t.id}"]`).forEach(u=>{u.textContent=t.value})}),new MutationObserver(()=>{document.querySelectorAll('input[type="range"][data-tui-slider-input]').forEach(e=>{e.id&&document.querySelectorAll(`[data-tui-slider-value][data-tui-slider-value-for="${e.id}"]`).forEach(t=>{(!t.textContent||t.textContent==="")&&(t.textContent=e.value)})})}).observe(document.body,{childList:!0,subtree:!0})})();})(); diff --git a/assets/js/tabs.min.js b/assets/js/tabs.min.js new file mode 100644 index 0000000..13a9fe4 --- /dev/null +++ b/assets/js/tabs.min.js @@ -0,0 +1 @@ +(()=>{(function(){"use strict";function u(a,e){document.querySelectorAll(`[data-tui-tabs-trigger][data-tui-tabs-id="${a}"]`).forEach(t=>{let i=t.getAttribute("data-tui-tabs-value")===e;t.setAttribute("data-tui-tabs-state",i?"active":"inactive")}),document.querySelectorAll(`[data-tui-tabs-content][data-tui-tabs-id="${a}"]`).forEach(t=>{let i=t.getAttribute("data-tui-tabs-value")===e;t.setAttribute("data-tui-tabs-state",i?"active":"inactive"),t.classList.toggle("hidden",!i)})}document.addEventListener("click",a=>{let e=a.target.closest("[data-tui-tabs-trigger]");if(!e)return;let t=e.getAttribute("data-tui-tabs-id"),i=e.getAttribute("data-tui-tabs-value");t&&i&&u(t,i)});function s(){document.querySelectorAll("[data-tui-tabs]").forEach(a=>{let e=a.getAttribute("data-tui-tabs-id");if(!e)return;let t=a.querySelector('[data-tui-tabs-trigger][data-tui-tabs-state="active"]')||a.querySelector("[data-tui-tabs-trigger]");t&&u(e,t.getAttribute("data-tui-tabs-value"))})}document.addEventListener("DOMContentLoaded",s),new MutationObserver(s).observe(document.body,{childList:!0,subtree:!0}),window.tui=window.tui||{},window.tui.tabs={setActive:u}})();})(); diff --git a/assets/js/tagsinput.min.js b/assets/js/tagsinput.min.js new file mode 100644 index 0000000..cb4d202 --- /dev/null +++ b/assets/js/tagsinput.min.js @@ -0,0 +1,11 @@ +(()=>{(function(){"use strict";function d(t,e){let n=document.createElement("div");return n.setAttribute("data-tui-tagsinput-chip",""),n.className="inline-flex items-center gap-2 rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent bg-primary text-primary-foreground",n.innerHTML=` + ${t} + + `,n}function c(t,e){let n=t.querySelector("[data-tui-tagsinput-text-input]");if(n?.hasAttribute("disabled"))return;let i=e.trim();if(!i)return;let a=t.querySelector("[data-tui-tagsinput-hidden-inputs]"),u=t.querySelector("[data-tui-tagsinput-container]"),p=t.getAttribute("data-tui-tagsinput-name"),o=t.getAttribute("data-tui-tagsinput-form"),l=a.querySelectorAll('input[type="hidden"]');for(let f of l)if(f.value.toLowerCase()===i.toLowerCase()){n.value="";return}let g=d(i,n?.hasAttribute("disabled"));u.appendChild(g);let r=document.createElement("input");r.type="hidden",r.name=p,r.value=i,o!==null&&o!==""&&r.setAttribute("form",o),a.appendChild(r),n.value=""}function s(t){let e=t.closest("[data-tui-tagsinput-chip]");if(!e)return;let n=e.closest("[data-tui-tagsinput]"),i=e.querySelector("span").textContent.trim(),u=n.querySelector("[data-tui-tagsinput-hidden-inputs]").querySelector(`input[type="hidden"][value="${i}"]`);u&&u.remove(),e.remove()}document.addEventListener("keydown",t=>{let e=t.target.closest("[data-tui-tagsinput-text-input]");if(!e)return;let n=e.closest("[data-tui-tagsinput]");if(n){if(t.key==="Enter"||t.key===",")t.preventDefault(),c(n,e.value);else if(t.key==="Backspace"&&e.value===""){t.preventDefault();let a=n.querySelector("[data-tui-tagsinput-chip]:last-child")?.querySelector("[data-tui-tagsinput-remove]");a&&!a.disabled&&s(a)}}}),document.addEventListener("click",t=>{let e=t.target.closest("[data-tui-tagsinput-remove]");if(e&&!e.disabled){t.preventDefault(),t.stopPropagation(),s(e);return}let n=t.target.closest("[data-tui-tagsinput]");if(n&&!t.target.closest("input")){let i=n.querySelector("[data-tui-tagsinput-text-input]");i&&i.focus()}}),document.addEventListener("reset",t=>{t.target.matches("form")&&t.target.querySelectorAll("[data-tui-tagsinput]").forEach(e=>{e.querySelectorAll("[data-tui-tagsinput-chip]").forEach(i=>i.remove()),e.querySelectorAll('[data-tui-tagsinput-hidden-inputs] input[type="hidden"]').forEach(i=>i.remove());let n=e.querySelector("[data-tui-tagsinput-text-input]");n&&(n.value="")})})})();})(); diff --git a/assets/js/textarea.min.js b/assets/js/textarea.min.js new file mode 100644 index 0000000..ecc538d --- /dev/null +++ b/assets/js/textarea.min.js @@ -0,0 +1 @@ +(()=>{(function(){"use strict";document.addEventListener("input",t=>{let e=t.target.closest("textarea[data-tui-textarea]");if(!e||e.getAttribute("data-tui-textarea-auto-resize")!=="true")return;let i=e.style.minHeight||window.getComputedStyle(e).minHeight;e.style.height=i,e.style.height=`${e.scrollHeight}px`}),new MutationObserver(()=>{document.querySelectorAll('textarea[data-tui-textarea][data-tui-textarea-auto-resize="true"]').forEach(t=>{(!t.style.height||t.style.height===t.style.minHeight)&&(t.style.height=`${t.scrollHeight}px`)})}).observe(document.body,{childList:!0,subtree:!0})})();})(); diff --git a/assets/js/timepicker.min.js b/assets/js/timepicker.min.js new file mode 100644 index 0000000..c1b1416 --- /dev/null +++ b/assets/js/timepicker.min.js @@ -0,0 +1 @@ +(()=>{(function(){"use strict";function m(i){let t=i?.match(/^(\d{1,2}):(\d{2})$/);if(!t)return null;let[u,e,r]=t.map(Number);return e>=0&&e<=23&&r>=0&&r<=59?{hour:e,minute:r}:null}function h(i,t,u){if(i===null||t===null)return null;let e=r=>r.toString().padStart(2,"0");if(u){let r=i===0?12:i>12?i-12:i;return`${e(r)}:${e(t)} ${i>=12?"PM":"AM"}`}return`${e(i)}:${e(t)}`}function c(i,t,u,e){if(!u&&!e)return!0;let r=i*60+t;if(u){let n=u.hour*60+u.minute;if(rn)return!1}return!0}function s(i){let t=i.closest("[data-tui-timepicker-popup]");if(!t)return null;let u=t.closest("[id]")?.id;return u?document.getElementById(u.replace("-content","")):null}function p(i){let t=i.id+"-content",u=document.getElementById(t)?.querySelector("[data-tui-timepicker-popup]");return u?{popup:u,hourList:u.querySelector("[data-tui-timepicker-hour-list]"),minuteList:u.querySelector("[data-tui-timepicker-minute-list]"),hiddenInput:document.getElementById(i.id+"-hidden")||i.parentElement?.querySelector("[data-tui-timepicker-hidden-input]")}:null}function d(i){return{hour:i.dataset.tuiTimepickerCurrentHour?parseInt(i.dataset.tuiTimepickerCurrentHour):null,minute:i.dataset.tuiTimepickerCurrentMinute?parseInt(i.dataset.tuiTimepickerCurrentMinute):null,use12Hours:i.getAttribute("data-tui-timepicker-use12hours")==="true",step:parseInt(i.getAttribute("data-tui-timepicker-step")||"1"),minTime:m(i.getAttribute("data-tui-timepicker-min-time")),maxTime:m(i.getAttribute("data-tui-timepicker-max-time")),placeholder:i.getAttribute("data-tui-timepicker-placeholder")||"Select time"}}function l(i,t,u){t!==null?i.dataset.tuiTimepickerCurrentHour=t:delete i.dataset.tuiTimepickerCurrentHour,u!==null?i.dataset.tuiTimepickerCurrentMinute=u:delete i.dataset.tuiTimepickerCurrentMinute,k(i)}function k(i){let t=d(i),u=p(i),e=i.querySelector("[data-tui-timepicker-display]");if(e){let r=h(t.hour,t.minute,t.use12Hours);e.textContent=r||t.placeholder,e.classList.toggle("text-muted-foreground",!r)}u?.hiddenInput&&(u.hiddenInput.value=t.hour!==null&&t.minute!==null?h(t.hour,t.minute,!1):""),u?.hourList&&u?.minuteList&&A(u,t)}function A(i,t){i.hourList.querySelectorAll("[data-tui-timepicker-hour]").forEach(r=>{let n=parseInt(r.getAttribute("data-tui-timepicker-hour")),o=!1;t.hour!==null&&(t.use12Hours?o=n===t.hour||n===0&&t.hour===12||n===t.hour-12&&t.hour>12:o=n===t.hour),r.setAttribute("data-tui-timepicker-selected",o);let a=!1;for(let f=0;f<60;f++)if(c(n,f,t.minTime,t.maxTime)){a=!0;break}r.disabled=!a,r.classList.toggle("opacity-50",!a),r.classList.toggle("cursor-not-allowed",!a)}),i.minuteList.querySelectorAll("[data-tui-timepicker-minute]").forEach(r=>{let n=parseInt(r.getAttribute("data-tui-timepicker-minute")),o=n===t.minute,a=t.hour===null||c(t.hour,n,t.minTime,t.maxTime);r.setAttribute("data-tui-timepicker-selected",o),r.disabled=!a,r.classList.toggle("opacity-50",!a),r.classList.toggle("cursor-not-allowed",!a)});let u=i.popup.querySelector('[data-tui-timepicker-period="AM"]'),e=i.popup.querySelector('[data-tui-timepicker-period="PM"]');if(u&&e){let r=t.hour===null||t.hour<12;u.setAttribute("data-tui-timepicker-active",r),e.setAttribute("data-tui-timepicker-active",!r)}}document.addEventListener("click",i=>{let t=i.target;if(t.matches("[data-tui-timepicker-hour]")&&!t.disabled){let u=s(t);if(!u)return;let e=d(u),r=parseInt(t.getAttribute("data-tui-timepicker-hour"));if(e.use12Hours){let n=e.hour!==null&&e.hour>=12;r=r===0?n?12:0:n?r+12:r}if(c(r,e.minute,e.minTime,e.maxTime))l(u,r,e.minute);else for(let n=0;n<60;n+=e.step)if(c(r,n,e.minTime,e.maxTime)){l(u,r,n);return}return}if(t.matches("[data-tui-timepicker-minute]")&&!t.disabled){let u=s(t);if(!u)return;let e=d(u),r=parseInt(t.getAttribute("data-tui-timepicker-minute"));(e.hour===null||c(e.hour,r,e.minTime,e.maxTime))&&l(u,e.hour,r);return}if(t.matches("[data-tui-timepicker-period]")){let u=s(t);if(!u)return;let e=d(u);if(e.hour===null)return;let r=t.getAttribute("data-tui-timepicker-period"),n=e.hour;if(r==="AM"&&e.hour>=12?n=e.hour===12?0:e.hour-12:r==="PM"&&e.hour<12&&(n=e.hour===0?12:e.hour+12),n!==e.hour){if(c(n,e.minute,e.minTime,e.maxTime))l(u,n,e.minute);else for(let o=0;o<60;o+=e.step)if(c(n,o,e.minTime,e.maxTime)){l(u,n,o);return}}return}if(t.matches("[data-tui-timepicker-done]")){let u=s(t);u&&window.closePopover&&window.closePopover(u.id+"-content");return}}),document.addEventListener("reset",i=>{i.target.matches("form")&&i.target.querySelectorAll('[data-tui-timepicker="true"]').forEach(t=>{l(t,null,null);let u=p(t);u?.hiddenInput&&(u.hiddenInput.value="")})}),new MutationObserver(()=>{document.querySelectorAll('[data-tui-timepicker="true"]:not([data-rendered])').forEach(i=>{i.setAttribute("data-rendered","true");let t=p(i),u=t?.hiddenInput?.value||t?.popup?.getAttribute("data-tui-timepicker-value");if(u){let e=m(u);e&&l(i,e.hour,e.minute)}k(i)})}).observe(document.body,{childList:!0,subtree:!0})})();})(); diff --git a/assets/js/toast.min.js b/assets/js/toast.min.js new file mode 100644 index 0000000..1fb13d3 --- /dev/null +++ b/assets/js/toast.min.js @@ -0,0 +1 @@ +(()=>{(function(){"use strict";let n=new Map;function o(e){let i=parseInt(e.dataset.tuiToastDuration||"3000"),t=e.querySelector(".toast-progress"),a={timer:null,startTime:Date.now(),remaining:i,paused:!1};n.set(e,a),t&&i>0&&(t.style.transitionDuration=i+"ms",requestAnimationFrame(()=>{requestAnimationFrame(()=>{t.style.transform="scaleX(0)"})})),i>0&&(a.timer=setTimeout(()=>r(e),i)),e.addEventListener("mouseenter",()=>{let s=n.get(e);if(!(!s||s.paused)&&(clearTimeout(s.timer),s.remaining=s.remaining-(Date.now()-s.startTime),s.paused=!0,t)){let m=getComputedStyle(t);t.style.transitionDuration="0ms",t.style.transform=m.transform}}),e.addEventListener("mouseleave",()=>{let s=n.get(e);!s||!s.paused||s.remaining<=0||(s.startTime=Date.now(),s.paused=!1,s.timer=setTimeout(()=>r(e),s.remaining),t&&(t.style.transitionDuration=s.remaining+"ms",requestAnimationFrame(()=>{requestAnimationFrame(()=>{t.style.transform="scaleX(0)"})})))})}function r(e){n.delete(e),e.style.transition="opacity 300ms, transform 300ms",e.style.opacity="0",e.style.transform="translateY(1rem)",setTimeout(()=>e.remove(),300)}document.addEventListener("click",e=>{let i=e.target.closest("[data-tui-toast-dismiss]");if(i){let t=i.closest("[data-tui-toast]");t&&r(t)}}),new MutationObserver(e=>{e.forEach(i=>{i.addedNodes.forEach(t=>{t.nodeType===1&&t.matches?.("[data-tui-toast]")&&o(t)})})}).observe(document.body,{childList:!0,subtree:!0})})();})(); diff --git a/cmd/server/main.go b/cmd/server/main.go new file mode 100644 index 0000000..7a15c4c --- /dev/null +++ b/cmd/server/main.go @@ -0,0 +1,36 @@ +package main + +import ( + "fmt" + "log/slog" + "net/http" + + "git.juancwu.dev/juancwu/budgething/internal/app" + "git.juancwu.dev/juancwu/budgething/internal/config" + "git.juancwu.dev/juancwu/budgething/internal/routes" +) + +func main() { + cfg := config.Load() + + a, err := app.New(cfg) + if err != nil { + slog.Error("failed to initialize app", "error", err) + panic(err) + } + defer func() { + err := a.Close() + if err != nil { + slog.Error("failed to close app", "error", err) + } + }() + + handler := routes.SetupRoutes(a) + slog.Info("server starting", "host", cfg.Host, "port", cfg.Port, "env", cfg.AppEnv, "url", fmt.Sprintf("http://%s:%s", cfg.Host, cfg.Port)) + + err = http.ListenAndServe(":"+cfg.Port, handler) + if err != nil { + slog.Error("server failed", "error", err) + panic(err) + } +} diff --git a/go.mod b/go.mod index 0cbd419..c570434 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,33 @@ module git.juancwu.dev/juancwu/budgething go 1.25.1 + +require ( + github.com/Oudwins/tailwind-merge-go v0.2.1 + github.com/a-h/templ v0.3.960 + github.com/jackc/pgx/v5 v5.7.6 + github.com/jmoiron/sqlx v1.4.0 + github.com/joho/godotenv v1.5.1 + modernc.org/sqlite v1.40.1 +) + +require ( + github.com/dustin/go-humanize v1.0.1 // indirect + github.com/go-sql-driver/mysql v1.9.3 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/jackc/pgpassfile v1.0.0 // indirect + github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect + github.com/jackc/puddle/v2 v2.2.2 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/ncruces/go-strftime v0.1.9 // indirect + github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect + github.com/stretchr/testify v1.11.0 // indirect + golang.org/x/crypto v0.40.0 // indirect + golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b // indirect + golang.org/x/sync v0.16.0 // indirect + golang.org/x/sys v0.36.0 // indirect + golang.org/x/text v0.27.0 // indirect + modernc.org/libc v1.66.10 // indirect + modernc.org/mathutil v1.7.1 // indirect + modernc.org/memory v1.11.0 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..fb0d200 --- /dev/null +++ b/go.sum @@ -0,0 +1,94 @@ +filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= +filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= +github.com/Oudwins/tailwind-merge-go v0.2.1 h1:jxRaEqGtwwwF48UuFIQ8g8XT7YSualNuGzCvQ89nPFE= +github.com/Oudwins/tailwind-merge-go v0.2.1/go.mod h1:kkZodgOPvZQ8f7SIrlWkG/w1g9JTbtnptnePIh3V72U= +github.com/a-h/templ v0.3.960 h1:trshEpGa8clF5cdI39iY4ZrZG8Z/QixyzEyUnA7feTM= +github.com/a-h/templ v0.3.960/go.mod h1:oCZcnKRf5jjsGpf2yELzQfodLphd2mwecwG4Crk5HBo= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= +github.com/go-sql-driver/mysql v1.9.3 h1:U/N249h2WzJ3Ukj8SowVFjdtZKfu9vlLZxjPXV1aweo= +github.com/go-sql-driver/mysql v1.9.3/go.mod h1:qn46aNg1333BRMNU69Lq93t8du/dwxI64Gl8i5p1WMU= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/pprof v0.0.0-20250317173921-a4b03ec1a45e h1:ijClszYn+mADRFY17kjQEVQ1XRhq2/JR1M3sGqeJoxs= +github.com/google/pprof v0.0.0-20250317173921-a4b03ec1a45e/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= +github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= +github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo= +github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= +github.com/jackc/pgx/v5 v5.7.6 h1:rWQc5FwZSPX58r1OQmkuaNicxdmExaEz5A2DO2hUuTk= +github.com/jackc/pgx/v5 v5.7.6/go.mod h1:aruU7o91Tc2q2cFp5h4uP3f6ztExVpyVv88Xl/8Vl8M= +github.com/jackc/puddle/v2 v2.2.2 h1:PR8nw+E/1w0GLuRFSmiioY6UooMp6KJv0/61nB7icHo= +github.com/jackc/puddle/v2 v2.2.2/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= +github.com/jmoiron/sqlx v1.4.0 h1:1PLqN7S1UYp5t4SrVVnt4nUVNemrDAtxlulVe+Qgm3o= +github.com/jmoiron/sqlx v1.4.0/go.mod h1:ZrZ7UsYB/weZdl2Bxg6jCRO9c3YHl8r3ahlKmRT4JLY= +github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= +github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= +github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= +github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU= +github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= +github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4= +github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= +github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.11.0 h1:ib4sjIrwZKxE5u/Japgo/7SJV3PvgjGiRNAvTVGqQl8= +github.com/stretchr/testify v1.11.0/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM= +golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY= +golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b h1:M2rDM6z3Fhozi9O7NWsxAkg/yqS/lQJ6PmkyIV3YP+o= +golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b/go.mod h1:3//PLf8L/X+8b4vuAfHzxeRUl04Adcb341+IGKfnqS8= +golang.org/x/mod v0.27.0 h1:kb+q2PyFnEADO2IEF935ehFUXlWiNjJWtRNgBLSfbxQ= +golang.org/x/mod v0.27.0/go.mod h1:rWI627Fq0DEoudcK+MBkNkCe0EetEaDSwJJkCcjpazc= +golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw= +golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.36.0 h1:KVRy2GtZBrk1cBYA7MKu5bEZFxQk4NIDV6RLVcC8o0k= +golang.org/x/sys v0.36.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4= +golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU= +golang.org/x/tools v0.36.0 h1:kWS0uv/zsvHEle1LbV5LE8QujrxB3wfQyxHfhOk0Qkg= +golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +modernc.org/cc/v4 v4.26.5 h1:xM3bX7Mve6G8K8b+T11ReenJOT+BmVqQj0FY5T4+5Y4= +modernc.org/cc/v4 v4.26.5/go.mod h1:uVtb5OGqUKpoLWhqwNQo/8LwvoiEBLvZXIQ/SmO6mL0= +modernc.org/ccgo/v4 v4.28.1 h1:wPKYn5EC/mYTqBO373jKjvX2n+3+aK7+sICCv4Fjy1A= +modernc.org/ccgo/v4 v4.28.1/go.mod h1:uD+4RnfrVgE6ec9NGguUNdhqzNIeeomeXf6CL0GTE5Q= +modernc.org/fileutil v1.3.40 h1:ZGMswMNc9JOCrcrakF1HrvmergNLAmxOPjizirpfqBA= +modernc.org/fileutil v1.3.40/go.mod h1:HxmghZSZVAz/LXcMNwZPA/DRrQZEVP9VX0V4LQGQFOc= +modernc.org/gc/v2 v2.6.5 h1:nyqdV8q46KvTpZlsw66kWqwXRHdjIlJOhG6kxiV/9xI= +modernc.org/gc/v2 v2.6.5/go.mod h1:YgIahr1ypgfe7chRuJi2gD7DBQiKSLMPgBQe9oIiito= +modernc.org/goabi0 v0.2.0 h1:HvEowk7LxcPd0eq6mVOAEMai46V+i7Jrj13t4AzuNks= +modernc.org/goabi0 v0.2.0/go.mod h1:CEFRnnJhKvWT1c1JTI3Avm+tgOWbkOu5oPA8eH8LnMI= +modernc.org/libc v1.66.10 h1:yZkb3YeLx4oynyR+iUsXsybsX4Ubx7MQlSYEw4yj59A= +modernc.org/libc v1.66.10/go.mod h1:8vGSEwvoUoltr4dlywvHqjtAqHBaw0j1jI7iFBTAr2I= +modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU= +modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg= +modernc.org/memory v1.11.0 h1:o4QC8aMQzmcwCK3t3Ux/ZHmwFPzE6hf2Y5LbkRs+hbI= +modernc.org/memory v1.11.0/go.mod h1:/JP4VbVC+K5sU2wZi9bHoq2MAkCnrt2r98UGeSK7Mjw= +modernc.org/opt v0.1.4 h1:2kNGMRiUjrp4LcaPuLY2PzUfqM/w9N23quVwhKt5Qm8= +modernc.org/opt v0.1.4/go.mod h1:03fq9lsNfvkYSfxrfUhZCWPk1lm4cq4N+Bh//bEtgns= +modernc.org/sortutil v1.2.1 h1:+xyoGf15mM3NMlPDnFqrteY07klSFxLElE2PVuWIJ7w= +modernc.org/sortutil v1.2.1/go.mod h1:7ZI3a3REbai7gzCLcotuw9AC4VZVpYMjDzETGsSMqJE= +modernc.org/sqlite v1.40.1 h1:VfuXcxcUWWKRBuP8+BR9L7VnmusMgBNNnBYGEe9w/iY= +modernc.org/sqlite v1.40.1/go.mod h1:9fjQZ0mB1LLP0GYrp39oOJXx/I2sxEnZtzCmEQIKvGE= +modernc.org/strutil v1.2.1 h1:UneZBkQA+DX2Rp35KcM69cSsNES9ly8mQWD71HKlOA0= +modernc.org/strutil v1.2.1/go.mod h1:EHkiggD70koQxjVdSBM3JKM7k6L0FbGE5eymy9i3B9A= +modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y= +modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= diff --git a/internal/app/app.go b/internal/app/app.go new file mode 100644 index 0000000..7f6726f --- /dev/null +++ b/internal/app/app.go @@ -0,0 +1,33 @@ +package app + +import ( + "fmt" + + "git.juancwu.dev/juancwu/budgething/internal/config" + "git.juancwu.dev/juancwu/budgething/internal/db" + "github.com/jmoiron/sqlx" +) + +type App struct { + Cfg *config.Config + DB *sqlx.DB +} + +func New(cfg *config.Config) (*App, error) { + database, err := db.Init(cfg.DBDriver, cfg.DBConnection) + if err != nil { + return nil, fmt.Errorf("failed to initialize database: %w", err) + } + + return &App{ + Cfg: cfg, + DB: database, + }, nil +} + +func (a *App) Close() error { + if a.DB != nil { + return a.DB.Close() + } + return nil +} diff --git a/internal/config/config.go b/internal/config/config.go new file mode 100644 index 0000000..82d7e56 --- /dev/null +++ b/internal/config/config.go @@ -0,0 +1,76 @@ +package config + +import ( + "log/slog" + "os" + "time" + + "github.com/joho/godotenv" +) + +type Config struct { + AppName string + AppEnv string + AppURL string + Host string + Port string + + DBDriver string + DBConnection string + + JWTSecret string + JWTExpiry time.Duration +} + +func Load() *Config { + + if err := godotenv.Load(); err != nil { + slog.Info("no .env file found, using environment variables") + } + + cfg := &Config{ + AppName: envString("APP_NAME", "Budgething"), + AppEnv: envRequired("APP_ENV"), + AppURL: envRequired("APP_URL"), + Host: envString("HOST", "127.0.0.1"), + Port: envString("PORT", "9000"), + + DBDriver: envString("DB_DRIVER", "sqlite"), + DBConnection: envString("DB_CONNECTION", "./data/local.db?_pragma=foreign_keys(1)&_pragma=journal_mode(WAL)"), + + JWTSecret: envRequired("JWT_SECRET"), + JWTExpiry: envDuration("JWT_EXPIRY", 168*time.Hour), // 7 days default + } + + return cfg +} + +func envString(key, def string) string { + value := os.Getenv(key) + if value == "" { + value = def + } + return value +} + +func envDuration(key string, def time.Duration) time.Duration { + value, ok := os.LookupEnv(key) + if !ok || value == "" { + return def + } + duration, err := time.ParseDuration(value) + if err != nil { + slog.Warn("config invalid duration, using default", "key", key, "value", value, "default", def) + return def + } + return duration +} + +func envRequired(key string) string { + if value := os.Getenv(key); value != "" { + return value + } + slog.Error("config required env var missing", "key", key) + os.Exit(1) + return "" +} diff --git a/internal/db/db.go b/internal/db/db.go new file mode 100644 index 0000000..d79e732 --- /dev/null +++ b/internal/db/db.go @@ -0,0 +1,48 @@ +package db + +import ( + "fmt" + "log/slog" + "os" + "path/filepath" + "time" + + _ "github.com/jackc/pgx/v5/stdlib" + "github.com/jmoiron/sqlx" + _ "modernc.org/sqlite" +) + +func Init(driver, connection string) (*sqlx.DB, error) { + if driver == "sqlite" { + dir := filepath.Dir(connection) + err := os.MkdirAll(dir, 0755) + if err != nil { + return nil, fmt.Errorf("failed to create data directory: %w", err) + } + } + + db, err := sqlx.Connect(driver, connection) + if err != nil { + return nil, fmt.Errorf("failed to connect: %w", err) + } + + db.SetMaxOpenConns(25) + db.SetMaxIdleConns(5) + db.SetConnMaxLifetime(5 * time.Minute) + + slog.Info("database connected", "driver", driver) + + err = db.Ping() + if err != nil { + return nil, fmt.Errorf("failed to ping database: %w", err) + } + + return db, nil +} + +func Close(db *sqlx.DB) error { + if db != nil { + return db.Close() + } + return nil +} diff --git a/internal/routes/routes.go b/internal/routes/routes.go new file mode 100644 index 0000000..035df7e --- /dev/null +++ b/internal/routes/routes.go @@ -0,0 +1,19 @@ +package routes + +import ( + "io/fs" + "net/http" + + "git.juancwu.dev/juancwu/budgething/assets" + "git.juancwu.dev/juancwu/budgething/internal/app" +) + +func SetupRoutes(a *app.App) http.Handler { + mux := http.NewServeMux() + + // Static + sub, _ := fs.Sub(assets.AssetsFS, ".") + mux.Handle("GET /assets/", http.StripPrefix("/assets/", http.FileServer(http.FS(sub)))) + + return mux +} diff --git a/internal/ui/components/accordion/accordion.templ b/internal/ui/components/accordion/accordion.templ new file mode 100644 index 0000000..276907e --- /dev/null +++ b/internal/ui/components/accordion/accordion.templ @@ -0,0 +1,126 @@ +// templui component accordion - version: v0.101.0 installed by templui v0.101.0 +// 📚 Documentation: https://templui.io/docs/components/accordion +package accordion + +import ( + "git.juancwu.dev/juancwu/budgething/internal/ui/components/icon" + "git.juancwu.dev/juancwu/budgething/internal/utils" +) + +type Props struct { + ID string + Class string + Attributes templ.Attributes +} + +type ItemProps struct { + ID string + Class string + Attributes templ.Attributes +} + +type TriggerProps struct { + ID string + Class string + Attributes templ.Attributes +} + +type ContentProps struct { + ID string + Class string + Attributes templ.Attributes +} + +templ Accordion(props ...Props) { + {{ var p Props }} + if len(props) > 0 { + {{ p = props[0] }} + } +
+ { children... } +
+} + +templ Item(props ...ItemProps) { + {{ var p ItemProps }} + if len(props) > 0 { + {{ p = props[0] }} + } +
summary>svg]:rotate-180", + p.Class, + ), + } + { p.Attributes... } + > + { children... } +
+} + +templ Trigger(props ...TriggerProps) { + {{ var p TriggerProps }} + if len(props) > 0 { + {{ p = props[0] }} + } + + { children... } + @icon.ChevronDown(icon.Props{ + Size: 16, + Class: "size-4 shrink-0 translate-y-0.5 transition-transform duration-200 text-muted-foreground pointer-events-none", + }) + +} + +templ Content(props ...ContentProps) { + {{ var p ContentProps }} + if len(props) > 0 { + {{ p = props[0] }} + } +
+ { children... } +
+} diff --git a/internal/ui/components/alert/alert.templ b/internal/ui/components/alert/alert.templ new file mode 100644 index 0000000..34b5926 --- /dev/null +++ b/internal/ui/components/alert/alert.templ @@ -0,0 +1,110 @@ +// templui component alert - version: v0.101.0 installed by templui v0.101.0 +// 📚 Documentation: https://templui.io/docs/components/alert +package alert + +import "git.juancwu.dev/juancwu/budgething/internal/utils" + +type Variant string + +const ( + VariantDefault Variant = "default" + VariantDestructive Variant = "destructive" +) + +type Props struct { + ID string + Class string + Attributes templ.Attributes + Variant Variant +} + +type TitleProps struct { + ID string + Class string + Attributes templ.Attributes +} + +type DescriptionProps struct { + ID string + Class string + Attributes templ.Attributes +} + +templ Alert(props ...Props) { + {{ var p Props }} + if len(props) > 0 { + {{ p = props[0] }} + } +
svg]:grid-cols-[1rem_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start", + "[&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current", + variantClasses(p.Variant), + p.Class, + ), + } + role="alert" + { p.Attributes... } + > + { children... } +
+} + +templ Title(props ...TitleProps) { + {{ var p TitleProps }} + if len(props) > 0 { + {{ p = props[0] }} + } +
+ { children... } +
+} + +templ Description(props ...DescriptionProps) { + {{ var p DescriptionProps }} + if len(props) > 0 { + {{ p = props[0] }} + } +
+ { children... } +
+} + +func variantClasses(variant Variant) string { + switch variant { + case VariantDestructive: + return "text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90" + default: + return "bg-card text-card-foreground" + } +} diff --git a/internal/ui/components/aspectratio/aspectratio.templ b/internal/ui/components/aspectratio/aspectratio.templ new file mode 100644 index 0000000..60734c7 --- /dev/null +++ b/internal/ui/components/aspectratio/aspectratio.templ @@ -0,0 +1,63 @@ +// templui component aspectratio - version: v0.101.0 installed by templui v0.101.0 +// 📚 Documentation: https://templui.io/docs/components/aspect-ratio +package aspectratio + +import "git.juancwu.dev/juancwu/budgething/internal/utils" + +type Ratio string + +const ( + RatioAuto Ratio = "auto" + RatioSquare Ratio = "square" + RatioVideo Ratio = "video" + RatioPortrait Ratio = "portrait" + RatioWide Ratio = "wide" +) + +type Props struct { + ID string + Class string + Attributes templ.Attributes + Ratio Ratio +} + +templ AspectRatio(props ...Props) { + {{ var p Props }} + if len(props) > 0 { + {{ p = props[0] }} + } +
+
+ { children... } +
+
+} + +func ratioClass(ratio Ratio) string { + switch ratio { + case RatioSquare: + return "aspect-square" + case RatioVideo: + return "aspect-video" + case RatioPortrait: + return "aspect-[3/4]" + case RatioWide: + return "aspect-[2/1]" + case RatioAuto: + return "aspect-auto" + default: + return "aspect-auto" + } +} diff --git a/internal/ui/components/avatar/avatar.templ b/internal/ui/components/avatar/avatar.templ new file mode 100644 index 0000000..3a4128b --- /dev/null +++ b/internal/ui/components/avatar/avatar.templ @@ -0,0 +1,97 @@ +// templui component avatar - version: v0.101.0 installed by templui v0.101.0 +// 📚 Documentation: https://templui.io/docs/components/avatar +package avatar + +import "git.juancwu.dev/juancwu/budgething/internal/utils" + +type Props struct { + ID string + Class string + Attributes templ.Attributes +} + +type ImageProps struct { + ID string + Class string + Attributes templ.Attributes + Alt string + Src string +} + +type FallbackProps struct { + ID string + Class string + Attributes templ.Attributes +} + +templ Avatar(props ...Props) { + {{ var p Props }} + if len(props) > 0 { + {{ p = props[0] }} + } +
+ { children... } +
+} + +templ Image(props ...ImageProps) { + {{ var p ImageProps }} + if len(props) > 0 { + {{ p = props[0] }} + } + { +} + +templ Fallback(props ...FallbackProps) { + {{ var p FallbackProps }} + if len(props) > 0 { + {{ p = props[0] }} + } + + { children... } + +} + +templ Script() { + +} diff --git a/internal/ui/components/card/card.templ b/internal/ui/components/card/card.templ new file mode 100644 index 0000000..523c8fe --- /dev/null +++ b/internal/ui/components/card/card.templ @@ -0,0 +1,167 @@ +// templui component card - version: v0.101.0 installed by templui v0.101.0 +// 📚 Documentation: https://templui.io/docs/components/card +package card + +import "git.juancwu.dev/juancwu/budgething/internal/utils" + +type Props struct { + ID string + Class string + Attributes templ.Attributes +} + +type HeaderProps struct { + ID string + Class string + Attributes templ.Attributes +} + +type TitleProps struct { + ID string + Class string + Attributes templ.Attributes +} + +type DescriptionProps struct { + ID string + Class string + Attributes templ.Attributes +} + +type ContentProps struct { + ID string + Class string + Attributes templ.Attributes +} + +type FooterProps struct { + ID string + Class string + Attributes templ.Attributes +} + +templ Card(props ...Props) { + {{ var p Props }} + if len(props) > 0 { + {{ p = props[0] }} + } +
+ { children... } +
+} + +templ Header(props ...HeaderProps) { + {{ var p HeaderProps }} + if len(props) > 0 { + {{ p = props[0] }} + } +
+ { children... } +
+} + +templ Title(props ...TitleProps) { + {{ var p TitleProps }} + if len(props) > 0 { + {{ p = props[0] }} + } +

+ { children... } +

+} + +templ Description(props ...DescriptionProps) { + {{ var p DescriptionProps }} + if len(props) > 0 { + {{ p = props[0] }} + } +

+ { children... } +

+} + +templ Content(props ...ContentProps) { + {{ var p ContentProps }} + if len(props) > 0 { + {{ p = props[0] }} + } +
+ { children... } +
+} + +templ Footer(props ...FooterProps) { + {{ var p FooterProps }} + if len(props) > 0 { + {{ p = props[0] }} + } +
+ { children... } +
+} diff --git a/internal/ui/components/carousel/carousel.templ b/internal/ui/components/carousel/carousel.templ new file mode 100644 index 0000000..383a510 --- /dev/null +++ b/internal/ui/components/carousel/carousel.templ @@ -0,0 +1,211 @@ +// templui component carousel - version: v0.101.0 installed by templui v0.101.0 +// 📚 Documentation: https://templui.io/docs/components/carousel +package carousel + +import ( + "fmt" + "git.juancwu.dev/juancwu/budgething/internal/ui/components/icon" + "git.juancwu.dev/juancwu/budgething/internal/utils" + "strconv" +) + +type Props struct { + ID string + Class string + Attributes templ.Attributes + Autoplay bool + Interval int + Loop bool +} + +type ContentProps struct { + ID string + Class string + Attributes templ.Attributes +} + +type ItemProps struct { + ID string + Class string + Attributes templ.Attributes +} + +type PreviousProps struct { + ID string + Class string + Attributes templ.Attributes +} + +type NextProps struct { + ID string + Class string + Attributes templ.Attributes +} + +type IndicatorsProps struct { + ID string + Class string + Attributes templ.Attributes + Count int +} + +templ Carousel(props ...Props) { + {{ var p Props }} + if len(props) > 0 { + {{ p = props[0] }} + } +
+ { children... } +
+} + +templ Content(props ...ContentProps) { + {{ var p ContentProps }} + if len(props) > 0 { + {{ p = props[0] }} + } +
+ { children... } +
+} + +templ Item(props ...ItemProps) { + {{ var p ItemProps }} + if len(props) > 0 { + {{ p = props[0] }} + } +
+ { children... } +
+} + +templ Previous(props ...PreviousProps) { + {{ var p PreviousProps }} + if len(props) > 0 { + {{ p = props[0] }} + } + +} + +templ Next(props ...NextProps) { + {{ var p NextProps }} + if len(props) > 0 { + {{ p = props[0] }} + } + +} + +templ Indicators(props ...IndicatorsProps) { + {{ var p IndicatorsProps }} + if len(props) > 0 { + {{ p = props[0] }} + } +
+ for i := 0; i < p.Count; i++ { + + } +
+} + +templ Script() { + +} diff --git a/internal/ui/components/checkbox/checkbox.templ b/internal/ui/components/checkbox/checkbox.templ new file mode 100644 index 0000000..6a5c85b --- /dev/null +++ b/internal/ui/components/checkbox/checkbox.templ @@ -0,0 +1,69 @@ +// templui component checkbox - version: v0.101.0 installed by templui v0.101.0 +// 📚 Documentation: https://templui.io/docs/components/checkbox +package checkbox + +import ( + "git.juancwu.dev/juancwu/budgething/internal/ui/components/icon" + "git.juancwu.dev/juancwu/budgething/internal/utils" +) + +type Props struct { + ID string + Class string + Attributes templ.Attributes + Name string + Value string + Disabled bool + Checked bool + Form string + Icon templ.Component +} + +templ Checkbox(props ...Props) { + {{ var p Props }} + if len(props) > 0 { + {{ p = props[0] }} + } +
+ +
+ if p.Icon != nil { + @p.Icon + } else { + @icon.Check(icon.Props{Size: 14}) + } +
+
+} diff --git a/internal/ui/components/code/code.templ b/internal/ui/components/code/code.templ new file mode 100644 index 0000000..b5e406b --- /dev/null +++ b/internal/ui/components/code/code.templ @@ -0,0 +1,56 @@ +// templui component code - version: v0.101.0 installed by templui v0.101.0 +// 📚 Documentation: https://templui.io/docs/components/code +package code + +import "git.juancwu.dev/juancwu/budgething/internal/utils" + +type Props struct { + ID string + Class string + Attrs templ.Attributes + Language string + CodeClass string +} + +templ Code(props ...Props) { + // Highlight.js with theme switching + + + {{ var p Props }} + if len(props) > 0 { + {{ p = props[0] }} + } + if p.ID == "" { + {{ p.ID = "code-" + utils.RandomID() }} + } +
+
+			
+				{ children... }
+			
+		
+
+} + +templ Script() { + +} diff --git a/internal/ui/components/copybutton/copybutton.templ b/internal/ui/components/copybutton/copybutton.templ new file mode 100644 index 0000000..3877450 --- /dev/null +++ b/internal/ui/components/copybutton/copybutton.templ @@ -0,0 +1,48 @@ +// templui component copybutton - version: v0.101.0 installed by templui v0.101.0 +// 📚 Documentation: https://templui.io/docs/components/copy-button +package copybutton + +import ( + "git.juancwu.dev/juancwu/budgething/internal/ui/components/button" + "git.juancwu.dev/juancwu/budgething/internal/ui/components/icon" + "git.juancwu.dev/juancwu/budgething/internal/utils" +) + +type Props struct { + ID string // Optional button ID + Class string // Custom CSS classes + Attrs templ.Attributes // Additional HTML attributes + TargetID string // Required - ID of element to copy from +} + +templ CopyButton(props Props) { + {{ var p = props }} + if p.ID == "" { + {{ p.ID = "copybutton-" + utils.RandomID() }} + } +
+ @button.Button(button.Props{ + ID: p.ID, + Class: utils.TwMerge("h-7 w-7 text-muted-foreground hover:text-accent-foreground", p.Class), + Attributes: p.Attrs, + Size: button.SizeIcon, + Variant: button.VariantGhost, + Type: button.TypeButton, + }) { + + @icon.Clipboard(icon.Props{Size: 16}) + + + } +
+} + +templ Script() { + +} diff --git a/internal/ui/components/dialog/dialog.templ b/internal/ui/components/dialog/dialog.templ new file mode 100644 index 0000000..5eb6f06 --- /dev/null +++ b/internal/ui/components/dialog/dialog.templ @@ -0,0 +1,332 @@ +// templui component dialog - version: v0.101.0 installed by templui v0.101.0 +// 📚 Documentation: https://templui.io/docs/components/dialog +package dialog + +import ( + "context" + "git.juancwu.dev/juancwu/budgething/internal/ui/components/icon" + "git.juancwu.dev/juancwu/budgething/internal/utils" +) + +type contextKey string + +const ( + instanceKey contextKey = "dialogInstance" + openKey contextKey = "dialogOpen" +) + +type Props struct { + ID string + Class string + Attributes templ.Attributes + DisableClickAway bool + DisableESC bool + Open bool +} + +type TriggerProps struct { + ID string + Class string + Attributes templ.Attributes + For string // Reference to a specific dialog ID (for external triggers) +} + +type ContentProps struct { + ID string + Class string + Attributes templ.Attributes + HideCloseButton bool + Open bool // Initial open state for standalone usage (when no context) + DisableAutoFocus bool +} + +type CloseProps struct { + ID string + Class string + Attributes templ.Attributes + For string // ID of the dialog to close (optional, defaults to closest dialog) +} + +type HeaderProps struct { + ID string + Class string + Attributes templ.Attributes +} + +type FooterProps struct { + ID string + Class string + Attributes templ.Attributes +} + +type TitleProps struct { + ID string + Class string + Attributes templ.Attributes +} + +type DescriptionProps struct { + ID string + Class string + Attributes templ.Attributes +} + +templ Dialog(props ...Props) { + {{ var p Props }} + if len(props) > 0 { + {{ p = props[0] }} + } + {{ instanceID := p.ID }} + if instanceID == "" { + {{ instanceID = utils.RandomID() }} + } + {{ ctx = context.WithValue(ctx, instanceKey, instanceID) }} + {{ ctx = context.WithValue(ctx, openKey, p.Open) }} +
+ { children... } +
+} + +templ Trigger(props ...TriggerProps) { + {{ var p TriggerProps }} + if len(props) > 0 { + {{ p = props[0] }} + } + {{ instanceID := "" }} + // Explicit For prop takes priority over inherited context + if p.For != "" { + {{ instanceID = p.For }} + } else if val := ctx.Value(instanceKey); val != nil { + {{ instanceID = val.(string) }} + } + + { children... } + +} + +templ Content(props ...ContentProps) { + {{ var p ContentProps }} + if len(props) > 0 { + {{ p = props[0] }} + } + // Start with prop values as defaults + {{ instanceID := p.ID }} + {{ open := p.Open }} + // Override with context values if available + if val := ctx.Value(instanceKey); val != nil { + {{ instanceID = val.(string) }} + } + if val := ctx.Value(openKey); val != nil { + {{ open = val.(bool) }} + } + // Apply defaults if still empty + if instanceID == "" { + {{ instanceID = utils.RandomID() }} + } + +
+ + +} + +templ Close(props ...CloseProps) { + {{ var p CloseProps }} + if len(props) > 0 { + {{ p = props[0] }} + } + + { children... } + +} + +templ Header(props ...HeaderProps) { + {{ var p HeaderProps }} + if len(props) > 0 { + {{ p = props[0] }} + } +
+ { children... } +
+} + +templ Footer(props ...FooterProps) { + {{ var p FooterProps }} + if len(props) > 0 { + {{ p = props[0] }} + } +
+ { children... } +
+} + +templ Title(props ...TitleProps) { + {{ var p TitleProps }} + if len(props) > 0 { + {{ p = props[0] }} + } +

+ { children... } +

+} + +templ Description(props ...DescriptionProps) { + {{ var p DescriptionProps }} + if len(props) > 0 { + {{ p = props[0] }} + } +

+ { children... } +

+} + +templ Script() { + +} diff --git a/internal/ui/components/form/form.templ b/internal/ui/components/form/form.templ new file mode 100644 index 0000000..2655b92 --- /dev/null +++ b/internal/ui/components/form/form.templ @@ -0,0 +1,138 @@ +// templui component form - version: v0.101.0 installed by templui v0.101.0 +// 📚 Documentation: https://templui.io/docs/components/form +package form + +import ( + "git.juancwu.dev/juancwu/budgething/internal/ui/components/label" + "git.juancwu.dev/juancwu/budgething/internal/utils" +) + +type MessageVariant string + +const ( + MessageVariantError MessageVariant = "error" + MessageVariantInfo MessageVariant = "info" +) + +type ItemProps struct { + ID string + Class string + Attributes templ.Attributes +} + +type LabelProps struct { + ID string + Class string + Attributes templ.Attributes + For string + DisabledClass string +} + +type DescriptionProps struct { + ID string + Class string + Attributes templ.Attributes +} + +type MessageProps struct { + ID string + Class string + Attributes templ.Attributes + Variant MessageVariant +} + +templ Item(props ...ItemProps) { + {{ var p ItemProps }} + if len(props) > 0 { + {{ p = props[0] }} + } +
+ { children... } +
+} + +templ ItemFlex(props ...ItemProps) { + {{ var p ItemProps }} + if len(props) > 0 { + {{ p = props[0] }} + } +
+ { children... } +
+} + +templ Label(props ...LabelProps) { + {{ var p LabelProps }} + if len(props) > 0 { + {{ p = props[0] }} + } + @label.Label(label.Props{ + ID: p.ID, + Class: p.Class, + Attributes: p.Attributes, + For: p.For, + }) { + { children... } + } +} + +templ Description(props ...DescriptionProps) { + {{ var p DescriptionProps }} + if len(props) > 0 { + {{ p = props[0] }} + } +

+ { children... } +

+} + +templ Message(props ...MessageProps) { + {{ var p MessageProps }} + if len(props) > 0 { + {{ p = props[0] }} + } +

+ { children... } +

+} + +func messageVariantClass(variant MessageVariant) string { + switch variant { + case MessageVariantError: + return "text-red-500" + case MessageVariantInfo: + return "text-blue-500" + default: + return "" + } +} diff --git a/internal/ui/components/icon/icon.go b/internal/ui/components/icon/icon.go new file mode 100644 index 0000000..b955f95 --- /dev/null +++ b/internal/ui/components/icon/icon.go @@ -0,0 +1,118 @@ +// templui component icon - version: v0.101.0 installed by templui v0.101.0 +// 📚 Documentation: https://templui.io/docs/components/icon +package icon + +import ( + "context" + "fmt" + "io" + "sync" + + "github.com/a-h/templ" +) + +// iconContents caches the fully generated SVG strings for icons that have been used, +// keyed by a composite key of name and props to handle different stylings. +var ( + iconContents = make(map[string]string) + iconMutex sync.RWMutex +) + +// Props defines the properties that can be set for an icon. +type Props struct { + Size int + Color string + Fill string + Stroke string + StrokeWidth string // Stroke Width of Icon, Usage: "2.5" + Class string +} + +// Icon returns a function that generates a templ.Component for the specified icon name. +func Icon(name string) func(...Props) templ.Component { + return func(props ...Props) templ.Component { + var p Props + if len(props) > 0 { + p = props[0] + } + + // Create a unique key for the cache based on icon name and all relevant props. + // This ensures different stylings of the same icon are cached separately. + cacheKey := fmt.Sprintf("%s|s:%d|c:%s|f:%s|sk:%s|sw:%s|cl:%s", + name, p.Size, p.Color, p.Fill, p.Stroke, p.StrokeWidth, p.Class) + + return templ.ComponentFunc(func(ctx context.Context, w io.Writer) (err error) { + iconMutex.RLock() + svg, cached := iconContents[cacheKey] + iconMutex.RUnlock() + + if cached { + _, err = w.Write([]byte(svg)) + return err + } + + // Not cached, generate it + // The actual generation now happens once and is cached. + generatedSvg, err := generateSVG(name, p) // p (Props) is passed to generateSVG + if err != nil { + // Provide more context in the error message + return fmt.Errorf("failed to generate svg for icon '%s' with props %+v: %w", name, p, err) + } + + iconMutex.Lock() + iconContents[cacheKey] = generatedSvg + iconMutex.Unlock() + + _, err = w.Write([]byte(generatedSvg)) + return err + }) + } +} + +// generateSVG creates an SVG string for the specified icon with the given properties. +// This function is called when an icon-prop combination is not yet in the cache. +func generateSVG(name string, props Props) (string, error) { + // Get the raw, inner SVG content for the icon name from our internal data map. + content, err := getIconContent(name) // This now reads from internalSvgData + if err != nil { + return "", err // Error from getIconContent already includes icon name + } + + size := props.Size + if size <= 0 { + size = 24 // Default size + } + + fill := props.Fill + if fill == "" { + fill = "none" // Default fill + } + + stroke := props.Stroke + if stroke == "" { + stroke = props.Color // Fallback to Color if Stroke is not set + } + if stroke == "" { + stroke = "currentColor" // Default stroke color + } + + strokeWidth := props.StrokeWidth + if strokeWidth == "" { + strokeWidth = "2" // Default stroke width + } + + // Construct the final SVG string. + // The data-lucide attribute helps identify these as Lucide icons if needed. + return fmt.Sprintf("%s", + size, size, fill, stroke, strokeWidth, props.Class, content), nil +} + +// getIconContent retrieves the raw inner SVG content for a given icon name. +// It reads from the pre-generated internalSvgData map from icon_data.go. +func getIconContent(name string) (string, error) { + content, exists := internalSvgData[name] + if !exists { + return "", fmt.Errorf("icon '%s' not found in internalSvgData map", name) + } + return content, nil +} diff --git a/internal/ui/components/icon/icon_data.go b/internal/ui/components/icon/icon_data.go new file mode 100644 index 0000000..4cddf21 --- /dev/null +++ b/internal/ui/components/icon/icon_data.go @@ -0,0 +1,6494 @@ +// templui component icon - version: v0.101.0 installed by templui v0.101.0 +// 📚 Documentation: https://templui.io/docs/components/icon +package icon + +// This file is auto generated +// Using Lucide icons version 0.544.0 + +const LucideVersion = "0.544.0" + +var internalSvgData = map[string]string{ + "vegan": ` + + `, + "wifi-off": ` + + + + + + `, + "crosshair": ` + + + + `, + "gallery-horizontal-end": ` + + `, + "image-down": ` + + + `, + "mail-warning": ` + + + `, + "spline-pointer": ` + + + `, + "vote": ` + + `, + "badge-indian-rupee": ` + + + `, + "calendar-check-2": ` + + + + `, + "eclipse": ` + `, + "file-input": ` + + + `, + "file-minus": ` + + `, + "graduation-cap": ` + + `, + "hand-fist": ` + + + `, + "square-check": ` + `, + "arrow-right-left": ` + + + `, + "bug": ` + + + + + + + + + + `, + "cloud-drizzle": ` + + + + + + `, + "cloud-rain": ` + + + `, + "message-circle-plus": ` + + `, + "panel-left-close": ` + + `, + "table-columns-split": ` + + + + + + + + + + `, + "touchpad-off": ` + + + + + `, + "align-horizontal-justify-start": ` + + `, + "chevron-down": ``, + "circle-small": ``, + "command": ``, + "id-card": ` + + + + `, + "list-todo": ` + + + + `, + "clock-2": ` + `, + "file-chart-column": ` + + + + `, + "key-round": ` + `, + "phone-outgoing": ` + + `, + "receipt-russian-ruble": ` + + `, + "signpost-big": ` + + + `, + "tent": ` + + + `, + "play": ``, + "arrow-up-from-line": ` + + `, + "move-diagonal": ` + + `, + "square-equal": ` + + `, + "step-back": ` + `, + "users": ` + + + `, + "squircle-dashed": ` + + + + + + + `, + "cloud-sun-rain": ` + + + + + + + `, + "file-output": ` + + + + `, + "move-right": ` + `, + "align-start-vertical": ` + + `, + "clock-9": ` + `, + "ear": ` + `, + "cloud": ``, + "mountain-snow": ` + `, + "refresh-cw-off": ` + + + + + + `, + "brain-cog": ` + + + + + + + + + + + + + + `, + "caravan": ` + + + `, + "clover": ` + + `, + "fold-horizontal": ` + + + + + + + `, + "git-pull-request-draft": ` + + + + `, + "monitor-up": ` + + + + `, + "moon-star": ` + + `, + "snowflake": ` + + + + + + + + + + + `, + "badge-swiss-franc": ` + + + `, + "cross": ``, + "folder-archive": ` + + + `, + "folder-x": ` + + `, + "scan-qr-code": ` + + + + + + + `, + "shield-check": ` + `, + "squirrel": ` + + + `, + "user-x": ` + + + `, + "audio-lines": ` + + + + + `, + "book-type": ` + + + `, + "copy-plus": ` + + + `, + "earth": ` + + + `, + "disc-3": ` + + + `, + "glass-water": ` + `, + "speech": ` + + `, + "square-user": ` + + `, + "cookie": ` + + + + + `, + "corner-up-left": ` + `, + "footprints": ` + + + `, + "linkedin": ` + + `, + "panel-right": ` + `, + "pocket-knife": ` + + + + `, + "refresh-ccw-dot": ` + + + + `, + "square-arrow-left": ` + + `, + "cup-soda": ` + + + `, + "map-pin-minus-inside": ` + `, + "mic-vocal": ` + + `, + "phone-call": ` + + `, + "replace-all": ` + + + + + + + + `, + "vector-square": ` + + + + + + + `, + "panels-left-bottom": ` + + `, + "sun": ` + + + + + + + + `, + "tool-case": ` + + + `, + "trash": ` + + `, + "wallet-cards": ` + + `, + "webhook-off": ` + + + + + + `, + "columns-3-cog": ` + + + + + + + + + + + `, + "ear-off": ` + + + + `, + "pause": ` + `, + "signal-medium": ` + + `, + "square-function": ` + + `, + "vibrate-off": ` + + + + `, + "wifi-pen": ` + + + `, + "whole-word": ` + + + + `, + "paint-bucket": ` + + + `, + "align-horizontal-space-around": ` + + `, + "calendar-cog": ` + + + + + + + + + + + + `, + "search-slash": ` + + `, + "ship-wheel": ` + + + + + + + + + `, + "square-arrow-out-down-left": ` + + `, + "timer-reset": ` + + + `, + "turntable": ` + + + `, + "users-round": ` + + `, + "cigarette-off": ` + + + + + `, + "currency": ` + + + + `, + "flashlight": ` + + `, + "lightbulb": ` + + `, + "minimize": ` + + + `, + "monitor-smartphone": ` + + + `, + "move-up-left": ` + `, + "package-2": ` + + `, + "arrow-up-z-a": ` + + + + `, + "badge-pound-sterling": ` + + + `, + "monitor-check": ` + + + `, + "wind-arrow-down": ` + + + `, + "calendar-minus": ` + + + + `, + "file-chart-line": ` + + `, + "shredder": ` + + + + + + `, + "view": ` + + + `, + "arrow-up-a-z": ` + + + + `, + "annoyed": ` + + + `, + "cherry": ` + + + `, + "briefcase-medical": ` + + + + + `, + "flag-off": ` + + + `, + "gamepad": ` + + + + `, + "milestone": ` + + `, + "radiation": ` + + + `, + "chevron-up": ``, + "arrow-down-narrow-wide": ` + + + + `, + "circle-parking-off": ` + + + + + `, + "circle-stop": ` + `, + "pen-tool": ` + + + `, + "plane": ``, + "rss": ` + + `, + "share": ` + + `, + "badge-dollar-sign": ` + + `, + "folder-symlink": ` + `, + "stethoscope": ` + + + + `, + "brick-wall-shield": ` + + + + + + + `, + "circle-chevron-left": ` + `, + "flower": ` + + + + + + + + + `, + "landmark": ` + + + + + `, + "list-music": ` + + + + `, + "reply": ` + `, + "save-off": ` + + + + + + `, + "square-split-vertical": ` + + `, + "arrow-up-down": ` + + + `, + "circle-percent": ` + + + `, + "bus-front": ` + + + + + + + + `, + "eye": ` + `, + "route-off": ` + + + + + + `, + "alarm-clock": ` + + + + + `, + "cable": ` + + + + + + `, + "corner-down-left": ` + `, + "grid-2x2-plus": ` + + `, + "hand-metal": ` + + + `, + "badge-info": ` + + `, + "bath": ` + + + + `, + "bug-play": ` + + + + + + + + `, + "egg-fried": ` + `, + "rainbow": ` + + `, + "text-cursor-input": ` + + + + `, + "tree-pine": ` + `, + "user-lock": ` + + + `, + "bitcoin": ``, + "book-x": ` + + `, + "circle-chevron-up": ` + `, + "git-pull-request-closed": ` + + + + + `, + "globe-lock": ` + + + `, + "heart-off": ` + + `, + "moon": ``, + "spray-can": ` + + + + + + + + + `, + "bell": ` + `, + "file-badge": ` + + + `, + "lock-keyhole-open": ` + + `, + "mail-check": ` + + `, + "shield-question-mark": ` + + `, + "voicemail": ` + + `, + "blocks": ` + `, + "case-upper": ` + + `, + "focus": ` + + + + `, + "megaphone-off": ` + + + + `, + "repeat": ` + + + `, + "signal-high": ` + + + `, + "square-star": ` + `, + "barcode": ` + + + + `, + "book-text": ` + + `, + "clipboard-check": ` + + `, + "chart-bar-big": ` + + `, + "gitlab": ``, + "receipt-japanese-yen": ` + + + + `, + "book-alert": ` + + `, + "arrow-up-0-1": ` + + + + `, + "clock-plus": ` + + + `, + "presentation": ` + + `, + "apple": ` + `, + "bean-off": ` + + + `, + "building": ` + + + + + + + + + + `, + "rotate-3d": ` + + `, + "ferris-wheel": ` + + + + + + + + `, + "file-code": ` + + + `, + "file-pen": ` + + `, + "gem": ` + + `, + "case-lower": ` + + + `, + "origami": ` + + `, + "qr-code": ` + + + + + + + + + + + `, + "skip-back": ` + `, + "clock": ` + `, + "file-video-camera": ` + + + `, + "hard-drive": ` + + + `, + "user-round": ` + `, + "book": ``, + "cloud-off": ` + + `, + "file-type": ` + + + + `, + "file-up": ` + + + `, + "grip-vertical": ` + + + + + `, + "land-plot": ` + + + `, + "calendar-clock": ` + + + + + `, + "drumstick": ` + `, + "file-check": ` + + `, + "handbag": ` + `, + "grip": ` + + + + + + + + `, + "panel-bottom-close": ` + + `, + "panel-top-close": ` + + `, + "search-check": ` + + `, + "chevrons-left-right-ellipsis": ` + + + + `, + "camera": ` + `, + "cloud-download": ` + + `, + "database-zap": ` + + + + `, + "diamond": ``, + "laptop-minimal": ` + `, + "monitor-play": ` + + + `, + "squares-intersect": ` + + + + + + + + + + `, + "dice-6": ` + + + + + + `, + "expand": ` + + + + + + + `, + "merge": ` + + `, + "map-pin": ` + `, + "picture-in-picture-2": ` + `, + "send": ` + `, + "table-rows-split": ` + + + + + + + + + + `, + "volume-2": ` + + `, + "align-horizontal-distribute-center": ` + + + + + `, + "house-plus": ` + + + `, + "list-collapse": ` + + + + `, + "scissors": ` + + + + `, + "banknote-arrow-up": ` + + + + + `, + "circle-dollar-sign": ` + + `, + "folder-git-2": ` + + + `, + "layout-panel-top": ` + + `, + "square-terminal": ` + + `, + "cigarette": ` + + + + `, + "book-user": ` + + `, + "octagon-pause": ` + + `, + "user-plus": ` + + + `, + "volume-off": ` + + + + `, + "beer-off": ` + + + + + + + `, + "captions": ` + `, + "folder-lock": ` + + `, + "hash": ` + + + `, + "percent": ` + + `, + "radar": ` + + + + + + + `, + "scissors-line-dashed": ` + + + + + + `, + "ticket-slash": ` + `, + "clock-arrow-up": ` + + + `, + "flask-round": ` + + `, + "frown": ` + + + `, + "git-pull-request-arrow": ` + + + + `, + "video": ` + `, + "circle-arrow-out-up-right": ` + + `, + "clock-6": ` + `, + "contact-round": ` + + + + `, + "mic-off": ` + + + + + `, + "package-plus": ` + + + + + `, + "sliders-horizontal": ` + + + + + + + + `, + "text-align-end": ` + + `, + "egg-off": ` + + `, + "ethernet-port": ` + + + + `, + "microscope": ` + + + + + `, + "scan-text": ` + + + + + + `, + "square-divide": ` + + + `, + "chart-column-stacked": ` + + + + `, + "eye-closed": ` + + + + `, + "file-user": ` + + + `, + "monitor-speaker": ` + + + + `, + "plug-2": ` + + + + `, + "align-horizontal-justify-end": ` + + `, + "chart-column-decreasing": ` + + + `, + "crop": ` + `, + "flip-vertical": ` + + + + + `, + "message-square": ``, + "panel-top-bottom-dashed": ` + + + + + + + + `, + "arrow-down-1-0": ` + + + + `, + "calendar-plus-2": ` + + + + + `, + "folder-heart": ` + `, + "git-branch": ` + + + `, + "globe": ` + + `, + "mouse-pointer-2": ``, + "move": ` + + + + + `, + "panel-bottom-dashed": ` + + + + `, + "badge-check": ` + `, + "check": ``, + "columns-4": ` + + + `, + "folder-plus": ` + + `, + "folder-search": ` + + `, + "lectern": ` + + `, + "move-vertical": ` + + `, + "projector": ` + + + + + `, + "arrow-up-to-line": ` + + `, + "file-x-2": ` + + + `, + "folder-open-dot": ` + `, + "octagon-minus": ` + `, + "phone": ``, + "square-arrow-out-down-right": ` + + `, + "signature": ` + `, + "underline": ` + `, + "battery": ` + `, + "bomb": ` + + `, + "import": ` + + `, + "power-off": ` + + + `, + "refrigerator": ` + + `, + "shield-half": ` + `, + "test-tubes": ` + + + + + `, + "audio-waveform": ``, + "book-heart": ` + `, + "columns-2": ` + `, + "diff": ` + + `, + "leafy-green": ` + `, + "log-in": ` + + `, + "mails": ` + + `, + "octagon": ``, + "award": ` + `, + "chart-column": ` + + + `, + "file-type-2": ` + + + + `, + "message-circle-question-mark": ` + + `, + "pi": ` + + `, + "siren": ` + + + + + + + `, + "tractor": ` + + + + + + + + `, + "twitch": ``, + "album": ` + `, + "crown": ` + `, + "droplet": ``, + "ellipsis-vertical": ` + + `, + "maximize": ` + + + `, + "popsicle": ` + `, + "refresh-ccw": ` + + + `, + "sofa": ` + + + + `, + "axe": ` + `, + "beaker": ` + + `, + "boxes": ` + + + + + + + + + + + `, + "clock-5": ` + `, + "file-json-2": ` + + + `, + "italic": ` + + `, + "library": ` + + + `, + "monitor-x": ` + + + + `, + "arrow-left": ` + `, + "chevrons-down": ` + `, + "cable-car": ` + + + + + + + `, + "decimals-arrow-right": ` + + + + `, + "arrow-down-z-a": ` + + + + `, + "philippine-peso": ` + + `, + "rotate-cw": ` + `, + "saudi-riyal": ` + + + `, + "book-key": ` + + + + `, + "ampersands": ` + `, + "align-vertical-justify-end": ` + + `, + "file-x": ` + + + `, + "folder-input": ` + + `, + "hop": ` + + + + + + + `, + "square-chevron-left": ` + `, + "user-round-cog": ` + + + + + + + + + + `, + "ampersand": ` + `, + "ban": ` + `, + "cone": ` + `, + "handshake": ` + + + + `, + "lasso-select": ` + + + + `, + "shovel": ` + + `, + "spell-check-2": ` + + `, + "stretch-horizontal": ` + `, + "battery-charging": ` + + + `, + "calendar-fold": ` + + + + `, + "plane-landing": ` + `, + "user-star": ` + + `, + "videotape": ` + + + + `, + "wifi": ` + + + `, + "archive-x": ` + + + `, + "flower-2": ` + + + + `, + "hard-hat": ` + + + `, + "notebook-pen": ` + + + + + `, + "phone-forwarded": ` + + `, + "square-arrow-out-up-left": ` + + `, + "worm": ` + + `, + "ambulance": ` + + + + + + `, + "pill": ` + `, + "spade": ` + `, + "user-round-pen": ` + + `, + "volume-x": ` + + `, + "baseline": ` + + `, + "closed-caption": ` + + `, + "github": ` + `, + "car-front": ` + + + + + `, + "cloud-hail": ` + + + + + + `, + "copy-x": ` + + + `, + "contact": ` + + + + `, + "chart-no-axes-combined": ` + + + + + `, + "delete": ` + + `, + "donut": ` + `, + "pizza": ` + + + + `, + "bird": ` + + + + + `, + "circle-dashed": ` + + + + + + + `, + "hand-grab": ` + + + + `, + "layers-2": ` + `, + "lightbulb-off": ` + + + + `, + "paintbrush-vertical": ` + + + `, + "smile": ` + + + `, + "square-check-big": ` + `, + "chart-scatter": ` + + + + + `, + "file-cog": ` + + + + + + + + + + `, + "folder-closed": ` + `, + "flag-triangle-right": ``, + "funnel": ``, + "phone-missed": ` + + `, + "square-dashed-bottom": ` + + `, + "square-chevron-right": ` + `, + "switch-camera": ` + + + + `, + "fan": ` + `, + "file-chart-column-increasing": ` + + + + `, + "keyboard-off": ` + + + + + + + + + `, + "panda": ` + + + + + `, + "russian-ruble": ` + `, + "square-m": ` + `, + "app-window-mac": ` + + + `, + "arrow-big-left-dash": ` + `, + "arrow-up-right": ` + `, + "circle-pause": ` + + `, + "cloud-alert": ` + + `, + "file-archive": ` + + + + + `, + "list-checks": ` + + + + `, + "message-circle-off": ` + + `, + "axis-3d": ` + + + `, + "list-video": ` + + + `, + "message-square-lock": ` + + `, + "move-up": ` + `, + "notebook-text": ` + + + + + + + `, + "pin": ` + `, + "turtle": ` + + + `, + "cloud-check": ` + `, + "ham": ` + + + `, + "pentagon": ``, + "badge-euro": ` + + `, + "between-horizontal-end": ` + + `, + "code": ` + `, + "creative-commons": ` + + `, + "database": ` + + `, + "grid-3x3": ` + + + + `, + "layout-list": ` + + + + + `, + "mail-x": ` + + + `, + "arrow-big-down": ``, + "compass": ` + `, + "heart-handshake": ``, + "nut": ` + + `, + "panel-left-open": ` + + `, + "shrimp": ` + + + + `, + "x": ` + `, + "binary": ` + + + + + `, + "dna": ` + + + + + + + + + + `, + "dot": ``, + "gallery-horizontal": ` + + `, + "library-big": ` + + `, + "line-squiggle": ``, + "monitor-down": ` + + + + `, + "panels-top-left": ` + + `, + "grid-2x2": ` + + `, + "mouse-pointer-ban": ` + + `, + "move-up-right": ` + `, + "panel-right-open": ` + + `, + "panel-top": ` + `, + "radio-tower": ` + + + + + + `, + "soap-dispenser-droplet": ` + + + `, + "square-pilcrow": ` + + + `, + "circle-equal": ` + + `, + "calendar-search": ` + + + + + `, + "flame": ``, + "file-scan": ` + + + + + `, + "send-to-back": ` + + + `, + "squares-subtract": ` + + + + + `, + "tally-1": ``, + "tornado": ` + + + + `, + "arrow-down-right": ` + `, + "skip-forward": ` + `, + "squircle": ``, + "arrow-up-wide-narrow": ` + + + + `, + "codesandbox": ` + + + + + `, + "lasso": ` + + `, + "music-4": ` + + + `, + "notebook-tabs": ` + + + + + + + + `, + "pen": ``, + "plug-zap": ` + + + + `, + "server-cog": ` + + + + + + + + + + + `, + "book-dashed": ` + + + + + + + + + + `, + "chef-hat": ` + `, + "chart-bar-decreasing": ` + + + `, + "file-json": ` + + + `, + "panel-left-dashed": ` + + + + `, + "smartphone-nfc": ` + + + `, + "tv-minimal-play": ` + + `, + "volume": ``, + "boom-box": ` + + + + + + `, + "diameter": ` + + + + `, + "eye-off": ` + + + `, + "file-lock-2": ` + + + `, + "map-pin-plus": ` + + + `, + "pilcrow-right": ` + + + + `, + "wind": ` + + `, + "align-vertical-space-around": ` + + `, + "activity": ``, + "circle-alert": ` + + `, + "bookmark-x": ` + + `, + "circle-parking": ` + `, + "cloud-cog": ` + + + + + + + + `, + "list-minus": ` + + + `, + "sailboat": ` + + `, + "bike": ` + + + `, + "chevrons-down-up": ` + `, + "shield-x": ` + + `, + "shrub": ` + + `, + "square-arrow-right": ` + + `, + "square-dot": ` + `, + "subscript": ` + + `, + "spool": ` + `, + "circle-x": ` + + `, + "cloud-sun": ` + + + + + `, + "highlighter": ` + `, + "milk-off": ` + + + `, + "ruler": ` + + + + `, + "youtube": ` + `, + "chart-spline": ` + `, + "locate": ` + + + + `, + "pen-off": ` + + `, + "battery-low": ` + + `, + "brush": ` + + `, + "clock-alert": ` + + + `, + "check-check": ` + `, + "link-2": ` + + `, + "replace": ` + + + + + + `, + "square-arrow-down": ` + + `, + "tags": ` + + `, + "brick-wall": ` + + + + + + + `, + "columns-3": ` + + `, + "file-pen-line": ` + + `, + "folder-clock": ` + + `, + "text-align-start": ` + + `, + "bell-ring": ` + + + `, + "bookmark": ``, + "cuboid": ` + + `, + "dumbbell": ` + + + + `, + "regex": ` + + + `, + "camera-off": ` + + + `, + "captions-off": ` + + + + + `, + "copyleft": ` + `, + "square-x": ` + + `, + "circle-question-mark": ` + + `, + "bed-single": ` + + `, + "arrow-left-from-line": ` + + `, + "grip-horizontal": ` + + + + + `, + "text-select": ` + + + + + + + + + + + + + + `, + "turkish-lira": ` + + `, + "vibrate": ` + + `, + "person-standing": ` + + + `, + "radical": ``, + "redo": ` + `, + "user-round-search": ` + + + `, + "weight": ` + `, + "layout-dashboard": ` + + + `, + "omega": ``, + "user-round-check": ` + + `, + "bottle-wine": ` + `, + "chart-gantt": ` + + + `, + "chart-no-axes-column": ` + + `, + "list-filter": ` + + `, + "map-pin-check-inside": ` + `, + "shopping-cart": ` + + `, + "battery-warning": ` + + + + `, + "clock-7": ` + `, + "hop-off": ` + + + + + + + + `, + "mouse-off": ` + + + `, + "paint-roller": ` + + `, + "pound-sterling": ` + + + `, + "washing-machine": ` + + + + `, + "wifi-sync": ` + + + + + + `, + "alarm-clock-minus": ` + + + + + `, + "banknote": ` + + `, + "dna-off": ` + + + + + + + + + `, + "grape": ` + + + + + + + + `, + "iteration-cw": ` + `, + "lamp-floor": ` + + `, + "radius": ` + + + `, + "square-mouse-pointer": ` + `, + "arrow-down-from-line": ` + + `, + "cannabis": ` + `, + "car": ` + + + `, + "coins": ` + + + `, + "corner-down-right": ` + `, + "sliders-vertical": ` + + + + + + + + `, + "wand": ` + + + + + + + + `, + "wifi-zero": ``, + "arrow-big-right": ``, + "bell-electric": ` + + + + + `, + "circle-ellipsis": ` + + + `, + "calendar-sync": ` + + + + + + + `, + "clock-8": ` + `, + "concierge-bell": ` + + + `, + "cloud-rain-wind": ` + + + `, + "git-pull-request-create-arrow": ` + + + + + `, + "bluetooth-connected": ` + + `, + "clock-1": ` + `, + "circle-arrow-up": ` + + `, + "cloud-lightning": ` + `, + "flask-conical-off": ` + + + + + `, + "grid-2x2-x": ` + + `, + "package": ` + + + `, + "repeat-1": ` + + + + `, + "banana": ` + `, + "circle-pound-sterling": ` + + + `, + "glasses": ` + + + + `, + "screen-share-off": ` + + + + `, + "skull": ` + + + `, + "square-kanban": ` + + + `, + "tangent": ` + + + `, + "ticket-plus": ` + + `, + "fish": ` + + + + + `, + "file-play": ` + + `, + "rectangle-vertical": ``, + "usb": ` + + + + + + `, + "wifi-low": ` + `, + "unfold-vertical": ` + + + + + + + `, + "popcorn": ` + + + `, + "folder-kanban": ` + + + `, + "picture-in-picture": ` + + + + `, + "satellite-dish": ` + + + `, + "rows-2": ` + `, + "signal-low": ` + `, + "briefcase-business": ` + + + `, + "database-backup": ` + + + + + `, + "reply-all": ` + + `, + "shopping-bag": ` + + `, + "snail": ` + + + + `, + "sunset": ` + + + + + + + `, + "waves-ladder": ` + + + + `, + "briefcase": ` + `, + "clipboard-pen": ` + + + `, + "router": ` + + + + + `, + "square-plus": ` + + `, + "ticket": ` + + + `, + "align-vertical-distribute-end": ` + + + `, + "church": ` + + + + `, + "circle-dot": ` + `, + "lamp-ceiling": ` + + `, + "lock": ` + `, + "panel-bottom-open": ` + + `, + "zoom-in": ` + + + `, + "battery-plus": ` + + + + `, + "chromium": ` + + + + `, + "clipboard-type": ` + + + + `, + "file-heart": ` + + `, + "folder-up": ` + + `, + "ribbon": ` + + + + `, + "arrow-down-to-dot": ` + + `, + "align-horizontal-space-between": ` + + + `, + "arrow-left-to-line": ` + + `, + "pencil-ruler": ` + + + + + `, + "amphora": ` + + + + + `, + "clapperboard": ` + + + `, + "chart-candlestick": ` + + + + + + `, + "droplets": ` + `, + "japanese-yen": ` + + `, + "minimize-2": ` + + + `, + "paintbrush": ` + + `, + "slice": ``, + "bot-off": ` + + + + + + `, + "circle-arrow-right": ` + + `, + "drone": ` + + + + + + + + `, + "receipt-cent": ` + + `, + "sword": ` + + + `, + "tv-minimal": ` + `, + "circle-fading-arrow-up": ` + + + + + + `, + "image-plus": ` + + + + `, + "kayak": ` + + + `, + "train-track": ` + + + + + + `, + "user-minus": ` + + `, + "anvil": ` + + + + `, + "shield-alert": ` + + `, + "tram-front": ` + + + + + + `, + "aperture": ` + + + + + + `, + "folder-output": ` + + `, + "hourglass": ` + + + `, + "meh": ` + + + `, + "quote": ` + `, + "square-slash": ` + `, + "alarm-clock-off": ` + + + + + `, + "angry": ` + + + + + `, + "box": ` + + `, + "locate-fixed": ` + + + + + `, + "clipboard-plus": ` + + + `, + "folder-git": ` + + + `, + "folder-root": ` + + `, + "ice-cream-bowl": ` + + `, + "tally-4": ` + + + `, + "bluetooth-off": ` + + `, + "clock-10": ` + `, + "hotel": ` + + + + + + + + + `, + "square-arrow-out-up-right": ` + + `, + "file-code-2": ` + + + `, + "folder-tree": ` + + + `, + "hdmi-port": ` + `, + "panel-left-right-dashed": ` + + + + + + + + `, + "satellite": ` + + + + `, + "thermometer": ``, + "align-horizontal-justify-center": ` + + `, + "archive-restore": ` + + + + `, + "heart-crack": ` + `, + "monitor-pause": ` + + + + `, + "tag": ` + `, + "at-sign": ` + `, + "circle-arrow-out-up-left": ` + + `, + "candy-cane": ` + + + + `, + "copy-check": ` + + `, + "file-lock": ` + + `, + "message-square-plus": ` + + `, + "message-square-warning": ` + + `, + "scan-line": ` + + + + `, + "star": ``, + "timer-off": ` + + + + `, + "undo-dot": ` + + `, + "dice-3": ` + + + `, + "package-minus": ` + + + + `, + "type-outline": ``, + "map-pinned": ` + + `, + "phone-off": ` + + `, + "square-pause": ` + + `, + "syringe": ` + + + + + `, + "text-wrap": ` + + + `, + "venetian-mask": ` + + `, + "dam": ` + + + + + + `, + "disc-album": ` + + `, + "file-check-2": ` + + `, + "heading-5": ` + + + + `, + "square-code": ` + + `, + "toggle-right": ` + `, + "vault": ` + + + + + + + + + `, + "align-horizontal-distribute-start": ` + + + `, + "spline": ` + + `, + "chevrons-left-right": ` + `, + "heading-4": ` + + + + `, + "rocket": ` + + + `, + "section": ` + `, + "upload": ` + + `, + "badge-turkish-lira": ` + + `, + "circle-arrow-down": ` + + `, + "chart-network": ` + + + + + + `, + "funnel-plus": ` + + `, + "key": ` + + `, + "receipt-euro": ` + + `, + "shield": ``, + "text-initial": ` + + + + `, + "clipboard-list": ` + + + + + `, + "clock-3": ` + `, + "image-minus": ` + + + `, + "lamp-wall-down": ` + + `, + "panel-bottom": ` + `, + "mountain": ``, + "spell-check": ` + + `, + "triangle-alert": ` + + `, + "circle-arrow-left": ` + + `, + "file-search-2": ` + + + `, + "panel-left": ` + `, + "cloud-moon": ` + `, + "divide": ` + + `, + "gift": ` + + + `, + "rotate-ccw-key": ` + + + + `, + "pc-case": ` + + + `, + "airplay": ` + `, + "calendar-arrow-up": ` + + + + + `, + "grid-2x2-check": ` + `, + "info": ` + + `, + "map-plus": ` + + + + `, + "microwave": ` + + + + `, + "redo-dot": ` + + `, + "circle-plus": ` + + `, + "equal-approximately": ` + `, + "file-symlink": ` + + `, + "tree-palm": ` + + + `, + "chevron-first": ` + `, + "egg": ``, + "file-plus-2": ` + + + `, + "heart-plus": ` + + `, + "music": ` + + `, + "sun-medium": ` + + + + + + + + `, + "tally-2": ` + `, + "backpack": ` + + + + `, + "layout-grid": ` + + + `, + "list-end": ` + + + + `, + "map-pin-house": ` + + + `, + "arrow-up-from-dot": ` + + `, + "calendar-check": ` + + + + `, + "git-branch-plus": ` + + + + + `, + "tv": ` + `, + "cake-slice": ` + + + `, + "file-digit": ` + + + + `, + "fire-extinguisher": ` + + + + + `, + "map-pin-x": ` + + + `, + "microchip": ` + + + + + + + + + + `, + "monitor-dot": ` + + + `, + "plus": ` + `, + "receipt-turkish-lira": ` + + `, + "book-audio": ` + + + `, + "bring-to-front": ` + + `, + "calendar-days": ` + + + + + + + + + `, + "component": ` + + + `, + "file-spreadsheet": ` + + + + + `, + "rewind": ` + `, + "screen-share": ` + + + + `, + "search-code": ` + + + `, + "list-filter-plus": ` + + + + `, + "tablets": ` + + + `, + "torus": ` + `, + "chart-no-axes-gantt": ` + + `, + "drill": ` + + + + + `, + "file-minus-2": ` + + `, + "mail-open": ` + `, + "map": ` + + `, + "scan-search": ` + + + + + `, + "square-percent": ` + + + `, + "test-tube-diagonal": ` + + `, + "calendar": ` + + + `, + "calendar-1": ` + + + + `, + "decimals-arrow-left": ` + + + `, + "gavel": ` + + + + `, + "mail-plus": ` + + + `, + "wine-off": ` + + + + `, + "disc-2": ` + + `, + "file-plus": ` + + + `, + "save": ` + + `, + "split": ` + + + `, + "clipboard-minus": ` + + `, + "chart-no-axes-column-increasing": ` + + `, + "gauge": ` + `, + "inspection-panel": ` + + + + `, + "arrow-big-up": ``, + "headphones": ``, + "medal": ` + + + + + `, + "server-crash": ` + + + + `, + "squares-exclude": ` + `, + "sun-snow": ` + + + + + + + + + + `, + "banknote-x": ` + + + + + `, + "clock-4": ` + `, + "fold-vertical": ` + + + + + + + `, + "puzzle": ``, + "ticket-percent": ` + + + `, + "lamp-desk": ` + + + `, + "scroll": ` + `, + "square-bottom-dashed-scissors": ` + + + + + + + `, + "square-arrow-down-right": ` + + `, + "app-window": ` + + + `, + "chevron-last": ` + `, + "chart-bar-stacked": ` + + + + `, + "eraser": ` + `, + "folder-search-2": ` + + `, + "slack": ` + + + + + + + `, + "square-stack": ` + + `, + "badge-percent": ` + + + `, + "brush-cleaning": ` + + + `, + "copyright": ` + `, + "headphone-off": ` + + + + `, + "scaling": ` + + + `, + "shuffle": ` + + + + `, + "thumbs-down": ` + `, + "venus-and-mars": ` + + + + `, + "copy-slash": ` + + `, + "file-volume": ` + + + `, + "keyboard-music": ` + + + + + + + + `, + "megaphone": ` + + `, + "volleyball": ` + + + + + `, + "alarm-smoke": ` + + + + `, + "battery-medium": ` + + + `, + "bubbles": ` + + + `, + "bug-off": ` + + + + + + + + + `, + "monitor-stop": ` + + + `, + "align-center-vertical": ` + + + + `, + "bookmark-plus": ` + + `, + "cpu": ` + + + + + + + + + + + + + `, + "type": ` + + `, + "clipboard-pen-line": ` + + + + `, + "user-round-plus": ` + + + `, + "arrow-up-narrow-wide": ` + + + + `, + "blend": ` + `, + "dock": ` + + `, + "flag": ``, + "utility-pole": ` + + + + + + `, + "calendar-x": ` + + + + + `, + "car-taxi-front": ` + + + + + + `, + "folder-check": ` + `, + "git-commit-horizontal": ` + + `, + "grid-3x2": ` + + + `, + "magnet": ` + + `, + "save-all": ` + + + `, + "square-parking-off": ` + + + + `, + "ligature": ` + + + + `, + "phone-incoming": ` + + `, + "receipt-indian-rupee": ` + + + `, + "scan-face": ` + + + + + + `, + "touchpad": ` + + `, + "biceps-flexed": ` + + `, + "book-down": ` + + `, + "bookmark-minus": ` + `, + "cake": ` + + + + + + + + `, + "mailbox": ` + + + `, + "wallet": ` + `, + "chart-column-big": ` + + `, + "message-circle-x": ` + + `, + "pencil-off": ` + + + `, + "receipt-swiss-franc": ` + + + `, + "notepad-text-dashed": ` + + + + + + + + + + + + `, + "tower-control": ` + + + + + + `, + "chart-column-increasing": ` + + + `, + "book-a": ` + + `, + "arrow-big-left": ``, + "align-vertical-justify-center": ` + + `, + "battery-full": ` + + + + `, + "message-square-dashed": ` + + + + + + + + + + + + `, + "share-2": ` + + + + `, + "file-question-mark": ` + + `, + "folder-pen": ` + `, + "list": ` + + + + + `, + "navigation": ``, + "option": ` + `, + "pipette": ` + + `, + "square-dashed-kanban": ` + + + + + + + + + + + + + + `, + "table-properties": ` + + + `, + "bean": ` + `, + "circle-check": ` + `, + "group": ` + + + + + `, + "memory-stick": ` + + + + + + + + `, + "message-circle-dashed": ` + + + + + + + `, + "utensils-crossed": ` + + + `, + "webcam": ` + + + `, + "arrow-big-down-dash": ` + `, + "book-open-text": ` + + + + + `, + "feather": ` + + `, + "heart": ``, + "mail": ` + `, + "text-quote": ` + + + `, + "chart-bar-increasing": ` + + + `, + "clock-fading": ` + + + + + `, + "nut-off": ` + + + + `, + "panel-right-close": ` + + `, + "receipt": ` + + `, + "cat": ` + + + `, + "arrow-big-up-dash": ` + `, + "folder": ``, + "instagram": ` + + `, + "shapes": ` + + `, + "shirt": ``, + "arrow-down-to-line": ` + + `, + "chevrons-right-left": ` + `, + "flip-horizontal": ` + + + + + `, + "image": ` + + `, + "list-tree": ` + + + + `, + "luggage": ` + + + + `, + "university": ` + + + + + + `, + "wheat": ` + + + + + + + `, + "dice-5": ` + + + + + `, + "git-graph": ` + + + + + `, + "image-up": ` + + + `, + "shell": ``, + "arrow-right-to-line": ` + + `, + "gallery-vertical": ` + + `, + "list-chevrons-up-down": ` + + + + `, + "menu": ` + + `, + "panel-right-dashed": ` + + + + `, + "party-popper": ` + + + + + + + + `, + "scan-heart": ` + + + + `, + "settings": ` + `, + "badge-plus": ` + + `, + "bell-plus": ` + + + `, + "film": ` + + + + + + + `, + "file-search": ` + + + `, + "forklift": ` + + + `, + "heading-3": ` + + + + `, + "iteration-ccw": ` + `, + "list-chevrons-down-up": ` + + + + `, + "a-large-small": ` + + + `, + "badge": ``, + "book-image": ` + + `, + "drum": ` + + + + + + `, + "equal-not": ` + + `, + "hand-platter": ` + + + + + `, + "message-square-quote": ` + + `, + "remove-formatting": ` + + + + `, + "hammer": ` + + `, + "heading-1": ` + + + `, + "layout-panel-left": ` + + `, + "notebook": ` + + + + + `, + "panels-right-bottom": ` + + `, + "square-dashed": ` + + + + + + + + + + + `, + "trello": ` + + `, + "truck": ` + + + + `, + "hand": ` + + + `, + "rectangle-ellipsis": ` + + + `, + "search": ` + `, + "square-chart-gantt": ` + + + `, + "tablet": ` + `, + "tent-tree": ` + + + + + + `, + "video-off": ` + + `, + "rose": ` + + + + `, + "search-x": ` + + + `, + "speaker": ` + + + `, + "square-arrow-down-left": ` + + `, + "square-dashed-mouse-pointer": ` + + + + + + + + + `, + "text-cursor": ` + + `, + "volume-1": ` + `, + "arrow-up": ` + `, + "chevrons-right": ` + `, + "calendar-arrow-down": ` + + + + + `, + "cylinder": ` + `, + "flashlight-off": ` + + + `, + "list-plus": ` + + + + `, + "lollipop": ` + + `, + "proportions": ` + + `, + "bow-arrow": ` + + + + `, + "cassette-tape": ` + + + + `, + "door-closed-locked": ` + + + + `, + "drama": ` + + + + + + + `, + "gpu": ` + + + + `, + "list-check": ` + + + `, + "nfc": ` + + + `, + "square-chevron-down": ` + `, + "atom": ` + + `, + "air-vent": ` + + + `, + "arrow-down-0-1": ` + + + + `, + "citrus": ` + + + `, + "folder-code": ` + + `, + "hat-glasses": ` + + + + `, + "message-circle-heart": ` + `, + "message-square-reply": ` + + `, + "a-arrow-down": ` + + + `, + "align-vertical-justify-start": ` + + `, + "droplet-off": ` + + `, + "mouse": ` + `, + "move-left": ` + `, + "rabbit": ` + + + + `, + "shield-ellipsis": ` + + + `, + "tablet-smartphone": ` + + `, + "armchair": ` + + + `, + "chart-line": ` + `, + "calendar-heart": ` + + + + `, + "key-square": ` + + `, + "pencil-line": ` + + `, + "piggy-bank": ` + + `, + "user-check": ` + + `, + "sun-dim": ` + + + + + + + + `, + "bell-off": ` + + + `, + "briefcase-conveyor-belt": ` + + + + + + `, + "computer": ` + + + `, + "history": ` + + `, + "pickaxe": ` + + + `, + "pointer": ` + + + + `, + "rail-symbol": ` + + `, + "signpost": ` + + `, + "align-center-horizontal": ` + + + + `, + "baby": ` + + + `, + "chevron-right": ``, + "case-sensitive": ` + + + `, + "list-indent-decrease": ` + + + `, + "octagon-alert": ` + + `, + "rows-4": ` + + + `, + "sparkle": ``, + "arrow-up-left": ` + `, + "badge-minus": ` + `, + "bluetooth-searching": ` + + `, + "book-marked": ` + `, + "building-2": ` + + + + + + `, + "git-compare-arrows": ` + + + + + `, + "plug": ` + + + `, + "redo-2": ` + `, + "between-vertical-start": ` + + `, + "clipboard-copy": ` + + + + `, + "files": ` + + `, + "fullscreen": ` + + + + `, + "heart-pulse": ` + `, + "square-scissors": ` + + + + + `, + "swords": ` + + + + + + + `, + "timer": ` + + `, + "badge-x": ` + + `, + "chevron-left": ``, + "brain-circuit": ` + + + + + + + + + + + + `, + "corner-left-up": ` + `, + "fish-symbol": ``, + "list-start": ` + + + + `, + "square-arrow-up-left": ` + + `, + "umbrella-off": ` + + + + `, + "biohazard": ` + + + + + + + + + `, + "calculator": ` + + + + + + + + + `, + "combine": ` + + + + + `, + "dribbble": ` + + + `, + "earth-lock": ` + + + + + `, + "folder-sync": ` + + + + `, + "house-plug": ` + + + `, + "slash": ``, + "square-library": ` + + + `, + "square-menu": ` + + + `, + "square-power": ` + + `, + "arrow-big-right-dash": ` + `, + "roller-coaster": ` + + + + + + `, + "square-radical": ` + `, + "square-square": ` + `, + "tickets": ` + + + + `, + "wallpaper": ` + + + + `, + "message-square-code": ` + + `, + "move-horizontal": ` + + `, + "non-binary": ` + + + `, + "receipt-text": ` + + + `, + "square-arrow-up-right": ` + + `, + "bone": ``, + "heading-6": ` + + + + `, + "map-pin-x-inside": ` + + `, + "move-down-right": ` + `, + "square-arrow-up": ` + + `, + "square-chevron-up": ` + `, + "clipboard": ` + `, + "diamond-plus": ` + + `, + "folder-down": ` + + `, + "file-terminal": ` + + + `, + "git-compare": ` + + + `, + "hamburger": ` + + + `, + "list-ordered": ` + + + + + `, + "salad": ` + + + + `, + "file-down": ` + + + `, + "list-restart": ` + + + + `, + "message-square-heart": ` + `, + "circle-power": ` + + `, + "shield-ban": ` + `, + "user-pen": ` + + `, + "brick-wall-fire": ` + + + + + + `, + "circle-chevron-down": ` + `, + "calendar-x-2": ` + + + + + `, + "cast": ` + + + `, + "croissant": ` + + + + `, + "list-indent-increase": ` + + + `, + "mars-stroke": ` + + + `, + "rectangle-goggles": ``, + "bed-double": ` + + + `, + "arrow-up-1-0": ` + + + + `, + "circle-arrow-out-down-right": ` + + `, + "cooking-pot": ` + + + `, + "equal": ` + `, + "heading": ` + + `, + "map-pin-off": ` + + + + `, + "message-square-more": ` + + + `, + "card-sim": ` + + + `, + "castle": ` + + + + + + + `, + "mouse-pointer-click": ` + + + + `, + "move-down": ` + `, + "package-check": ` + + + + `, + "tickets-plane": ` + + + + + + `, + "webhook": ` + + `, + "bed": ` + + + `, + "bold": ``, + "file-key": ` + + + `, + "server": ` + + + `, + "parentheses": ` + `, + "signal-zero": ``, + "tally-5": ` + + + + `, + "ungroup": ` + `, + "align-vertical-distribute-center": ` + + + + + `, + "circle-divide": ` + + + `, + "copy-minus": ` + + `, + "corner-left-down": ` + `, + "frame": ` + + + `, + "georgian-lari": ` + + + `, + "hexagon": ``, + "laptop-minimal-check": ` + + `, + "arrows-up-from-line": ` + + + + `, + "cog": ` + + + + + + + + + + + + + `, + "file-sliders": ` + + + + + `, + "hospital": ` + + + + `, + "logs": ` + + + + + + + + `, + "message-circle-code": ` + + `, + "palette": ` + + + + `, + "rotate-ccw-square": ` + + `, + "book-open-check": ` + + `, + "club": ` + `, + "external-link": ` + + `, + "list-x": ` + + + + `, + "map-pin-plus-inside": ` + + `, + "message-square-dot": ` + `, + "rotate-ccw": ` + `, + "shield-off": ` + + `, + "chevrons-up-down": ` + `, + "disc": ` + `, + "ellipsis": ` + + `, + "monitor-cog": ` + + + + + + + + + + + `, + "monitor-off": ` + + + + `, + "rectangle-horizontal": ``, + "school": ` + + + + + `, + "shopping-basket": ` + + + + + + `, + "images": ` + + + `, + "pointer-off": ` + + + + + `, + "scale": ` + + + + `, + "wand-sparkles": ` + + + + + + + `, + "waypoints": ` + + + + + + `, + "badge-alert": ` + + `, + "chart-area": ` + `, + "folder-cog": ` + + + + + + + + + `, + "message-square-share": ` + + `, + "music-2": ` + `, + "panel-top-dashed": ` + + + + `, + "pyramid": ` + `, + "stretch-vertical": ` + `, + "chart-pie": ` + `, + "file-diff": ` + + + `, + "flip-horizontal-2": ` + + + + + `, + "text-align-justify": ` + + `, + "wifi-high": ` + + `, + "zap": ``, + "swatch-book": ` + + + `, + "undo": ` + `, + "flame-kindling": ` + + `, + "message-circle-warning": ` + + `, + "minus": ``, + "strikethrough": ` + + `, + "zoom-out": ` + + `, + "badge-japanese-yen": ` + + + + `, + "bookmark-check": ` + `, + "repeat-2": ` + + + `, + "terminal": ` + `, + "tree-deciduous": ` + `, + "book-open": ` + `, + "clock-12": ` + `, + "corner-right-up": ` + `, + "calendar-minus-2": ` + + + + `, + "ev-charger": ` + + + + `, + "folder-minus": ` + `, + "infinity": ``, + "move-diagonal-2": ` + + `, + "book-up": ` + + `, + "file-text": ` + + + + `, + "loader-pinwheel": ` + + + `, + "parking-meter": ` + + + + `, + "smartphone": ` + `, + "unfold-horizontal": ` + + + + + + + `, + "unlink": ` + + + + + `, + "user": ` + `, + "book-minus": ` + `, + "printer-check": ` + + + `, + "text-search": ` + + + + `, + "traffic-cone": ` + + + `, + "variable": ` + + + `, + "watch": ` + + + `, + "file-key-2": ` + + + + `, + "joystick": ` + + + `, + "square-sigma": ` + `, + "table-cells-split": ` + + + `, + "table": ` + + + `, + "barrel": ` + + + + `, + "bluetooth": ``, + "clock-arrow-down": ` + + + `, + "gallery-thumbnails": ` + + + + `, + "music-3": ` + `, + "shrink": ` + + + `, + "thumbs-up": ` + `, + "braces": ` + `, + "brain": ` + + + + + + + `, + "link": ` + `, + "paw-print": ` + + + `, + "workflow": ` + + `, + "circle": ``, + "circle-slash": ` + `, + "flask-conical": ` + + `, + "hand-helping": ` + + `, + "loader-circle": ``, + "smile-plus": ` + + + + + `, + "sparkles": ` + + + `, + "square-stop": ` + `, + "triangle-right": ``, + "triangle": ``, + "wallet-minimal": ` + `, + "dessert": ` + + `, + "calendar-plus": ` + + + + + `, + "mail-question-mark": ` + + + `, + "map-pin-minus": ` + + `, + "beef": ` + + `, + "languages": ` + + + + + `, + "mail-search": ` + + + + `, + "maximize-2": ` + + + `, + "message-circle-more": ` + + + `, + "pin-off": ` + + + `, + "arrow-down-wide-narrow": ` + + + + `, + "archive": ` + + `, + "carrot": ` + + `, + "fingerprint": ` + + + + + + + + `, + "panel-top-open": ` + + `, + "receipt-pound-sterling": ` + + + `, + "square-activity": ` + `, + "door-closed": ` + + `, + "facebook": ``, + "goal": ` + + `, + "network": ` + + + + `, + "toilet": ` + `, + "cloud-snow": ` + + + + + + `, + "notepad-text": ` + + + + + + `, + "refresh-cw": ` + + + `, + "alarm-clock-check": ` + + + + + `, + "arrow-down": ` + `, + "lamp": ` + + `, + "theater": ` + + + + + + + + `, + "truck-electric": ` + + + + + + `, + "user-round-minus": ` + + `, + "anchor": ` + + `, + "circle-off": ` + + `, + "dog": ` + + + + `, + "laugh": ` + + + `, + "lock-keyhole": ` + + `, + "map-pin-check": ` + + `, + "mouse-pointer": ` + `, + "package-search": ` + + + + + `, + "align-end-horizontal": ` + + `, + "badge-cent": ` + + `, + "book-copy": ` + + `, + "bot": ` + + + + + `, + "clipboard-clock": ` + + + + `, + "cloud-moon-rain": ` + + + `, + "factory": ` + + + `, + "settings-2": ` + + + `, + "git-pull-request-create": ` + + + + `, + "piano": ` + + + + + `, + "power": ` + `, + "scroll-text": ` + + + `, + "square-play": ` + `, + "text-align-center": ` + + `, + "ticket-check": ` + `, + "thermometer-sun": ` + + + + + `, + "container": ` + + + + `, + "git-pull-request": ` + + + `, + "house-heart": ` + `, + "separator-horizontal": ` + + `, + "shield-minus": ` + `, + "shower-head": ` + + + + + + + + + `, + "signal": ` + + + + `, + "sunrise": ` + + + + + + + `, + "arrow-right": ` + `, + "file-badge-2": ` + + `, + "house-wifi": ` + + + `, + "square-dashed-bottom-code": ` + + + + `, + "user-cog": ` + + + + + + + + + + `, + "chevrons-left": ` + `, + "arrow-left-right": ` + + + `, + "brackets": ` + `, + "flip-vertical-2": ` + + + + + `, + "file-stack": ` + + `, + "folder-key": ` + + + `, + "locate-off": ` + + + + + + `, + "move-3d": ` + + + `, + "arrow-down-a-z": ` + + + + `, + "file-image": ` + + + `, + "fish-off": ` + + `, + "heading-2": ` + + + `, + "headset": ` + `, + "navigation-2-off": ` + + `, + "package-x": ` + + + + `, + "pilcrow-left": ` + + + + `, + "circle-play": ` + `, + "git-fork": ` + + + + `, + "guitar": ` + + + `, + "heart-minus": ` + `, + "house": ` + `, + "target": ` + + `, + "test-tube": ` + + `, + "trash-2": ` + + + + `, + "arrow-right-from-line": ` + + `, + "candy-off": ` + + + + + + `, + "clipboard-x": ` + + + `, + "dice-1": ` + `, + "file-warning": ` + + `, + "fuel": ` + + + `, + "git-merge": ` + + `, + "mic": ` + + `, + "file-volume-2": ` + + + + `, + "sandwich": ` + + + + `, + "ship": ` + + + + `, + "step-forward": ` + `, + "telescope": ` + + + + + + `, + "train-front": ` + + + + + `, + "umbrella": ` + + `, + "undo-2": ` + `, + "circle-user": ` + + `, + "scan-eye": ` + + + + + `, + "server-off": ` + + + + + `, + "superscript": ` + + `, + "toggle-left": ` + `, + "triangle-dashed": ` + + + + + + + + `, + "user-round-x": ` + + + `, + "user-search": ` + + + `, + "calendar-range": ` + + + + + + + `, + "blinds": ` + + + + + + `, + "circle-user-round": ` + + `, + "framer": ``, + "image-upscale": ` + + + + + + + `, + "kanban": ` + + `, + "map-pin-pen": ` + + `, + "mars": ` + + `, + "asterisk": ` + + `, + "codepen": ` + + + + `, + "file-box": ` + + + + `, + "loader": ` + + + + + + + `, + "orbit": ` + + + + `, + "ruler-dimension-line": ` + + + + + + `, + "square-split-horizontal": ` + + `, + "sun-moon": ` + + + + `, + "align-vertical-distribute-start": ` + + + `, + "bot-message-square": ` + + + + + `, + "circle-dot-dashed": ` + + + + + + + + `, + "life-buoy": ` + + + + + `, + "message-square-x": ` + + `, + "printer": ` + + `, + "route": ` + + `, + "stamp": ` + + `, + "dice-2": ` + + `, + "fence": ` + + + + + + `, + "file-chart-pie": ` + + + `, + "layout-template": ` + + `, + "pill-bottle": ` + + `, + "ticket-minus": ` + `, + "trending-down": ` + `, + "unplug": ` + + + + + `, + "baggage-claim": ` + + + + `, + "clipboard-paste": ` + + + + `, + "calendar-off": ` + + + + + `, + "heater": ` + + + + + + + + + `, + "mail-minus": ` + + `, + "plane-takeoff": ` + `, + "recycle": ` + + + + + `, + "scan-barcode": ` + + + + + + `, + "drafting-compass": ` + + + + `, + "scale-3d": ` + + + `, + "square-pi": ` + + + `, + "squares-unite": ``, + "wifi-cog": ` + + + + + + + + + + + `, + "wrench": ``, + "arrow-down-left": ` + `, + "forward": ` + `, + "pencil": ` + `, + "pilcrow": ` + + `, + "rows-3": ` + + `, + "shield-plus": ` + + `, + "smartphone-charging": ` + `, + "sticker": ` + + + + `, + "bell-minus": ` + + `, + "circle-gauge": ` + + `, + "clock-11": ` + `, + "lock-open": ` + `, + "rocking-chair": ` + + + `, + "zap-off": ` + + + `, + "wheat-off": ` + + + + + + + + + `, + "beer": ` + + + + `, + "bus": ` + + + + + + `, + "corner-up-right": ` + `, + "euro": ` + + `, + "file-audio-2": ` + + + + `, + "flag-triangle-left": ``, + "message-square-text": ` + + + `, + "milk": ` + + `, + "book-check": ` + `, + "cloud-fog": ` + + `, + "download": ` + + `, + "file": ` + `, + "folders": ` + `, + "gallery-vertical-end": ` + + `, + "hard-drive-upload": ` + + + + `, + "lamp-wall-up": ` + + `, + "badge-russian-ruble": ` + + `, + "circuit-board": ` + + + + `, + "contrast": ` + `, + "book-up-2": ` + + + + `, + "git-commit-vertical": ` + + `, + "ice-cream-cone": ` + + `, + "image-play": ` + + + `, + "paperclip": ``, + "circle-minus": ` + `, + "fast-forward": ` + `, + "inbox": ` + `, + "podcast": ` + + + `, + "radio-receiver": ` + + + `, + "ratio": ` + `, + "sigma": ``, + "sprout": ` + + `, + "alarm-clock-plus": ` + + + + + + `, + "message-circle": ``, + "square-asterisk": ` + + + `, + "square-round-corner": ` + `, + "square-user-round": ` + + `, + "trees": ` + + + `, + "venus": ` + + `, + "bell-dot": ` + + `, + "binoculars": ` + + + + + `, + "file-axis-3d": ` + + + `, + "message-square-diff": ` + + + `, + "star-half": ``, + "table-cells-merge": ` + + + + `, + "table-of-contents": ` + + + + + `, + "align-start-horizontal": ` + + `, + "train-front-tunnel": ` + + + + + + `, + "trending-up": ` + `, + "accessibility": ` + + + + `, + "bolt": ` + `, + "chart-bar": ` + + + `, + "hand-heart": ` + + + `, + "image-off": ` + + + + + `, + "octagon-x": ` + + `, + "soup": ` + + + + + `, + "square-minus": ` + `, + "align-vertical-space-between": ` + + + `, + "candy": ` + + + + `, + "link-2-off": ` + + + `, + "monitor": ` + + `, + "radio": ` + + + + `, + "scan": ` + + + `, + "sheet": ` + + + + `, + "spotlight": ` + + + + `, + "coffee": ` + + + `, + "ghost": ` + + `, + "laptop": ` + `, + "navigation-2": ``, + "twitter": ``, + "wine": ` + + + `, + "badge-question-mark": ` + + `, + "check-line": ` + + `, + "door-open": ` + + + + `, + "pocket": ` + `, + "separator-vertical": ` + + `, + "square": ``, + "store": ` + + `, + "toy-brick": ` + + `, + "align-horizontal-distribute-end": ` + + + `, + "book-plus": ` + + `, + "circle-fading-plus": ` + + + + + + `, + "credit-card": ` + `, + "cloudy": ` + `, + "folder-open": ``, + "hand-coins": ` + + + + `, + "rat": ` + + + + `, + "between-vertical-end": ` + + `, + "book-headphones": ` + + + `, + "chart-no-axes-column-decreasing": ` + + `, + "code-xml": ` + + `, + "copy": ` + `, + "dices": ` + + + + + `, + "haze": ` + + + + + + + `, + "package-open": ` + + + `, + "hard-drive-download": ` + + + + `, + "map-minus": ` + + + `, + "rectangle-circle": ` + `, + "square-parking": ` + `, + "table-2": ``, + "tally-3": ` + + `, + "trending-up-down": ` + + + `, + "waves": ` + + `, + "chevrons-up": ` + `, + "circle-chevron-right": ` + `, + "file-clock": ` + + + `, + "pen-line": ` + `, + "send-horizontal": ` + `, + "square-dashed-top-solid": ` + + + + + + + + `, + "star-off": ` + + `, + "circle-star": ` + `, + "file-music": ` + + + `, + "message-circle-reply": ` + + `, + "messages-square": ` + `, + "navigation-off": ` + + `, + "utensils": ` + + `, + "a-arrow-up": ` + + + `, + "circle-arrow-out-down-left": ` + + `, + "folder-dot": ` + `, + "log-out": ` + + `, + "message-square-off": ` + + `, + "transgender": ` + + + + + + + `, + "warehouse": ` + + + `, + "diamond-percent": ` + + + `, + "diamond-minus": ` + `, + "keyboard": ` + + + + + + + + `, + "thermometer-snowflake": ` + + + + + + + `, + "between-horizontal-start": ` + + `, + "align-end-vertical": ` + + `, + "figma": ` + + + + `, + "layers": ` + + `, + "martini": ` + + `, + "rotate-cw-square": ` + + `, + "square-pen": ` + `, + "ticket-x": ` + + `, + "antenna": ` + + + + + `, + "cloud-upload": ` + + `, + "indian-rupee": ` + + + + `, + "leaf": ` + `, + "cctv": ` + + + + `, + "space": ``, + "sticky-note": ` + `, + "dice-4": ` + + + + `, + "file-audio": ` + + `, + "id-card-lanyard": ` + + + + `, + "move-down-left": ` + `, + "swiss-franc": ` + + `, + "banknote-arrow-down": ` + + + + + `, + "bandage": ` + + + + + + `, + "circle-slash-2": ` + `, + "corner-right-down": ` + `, + "dollar-sign": ` + `, + "gamepad-2": ` + + + + `, + "construction": ` + + + + + + + `, + "funnel-x": ` + + `, + "newspaper": ` + + + `, + "shield-user": ` + + `, + "trophy": ` + + + + + `, + "unlink-2": ``, + "arrow-down-up": ` + + + `, + "book-lock": ` + + + `, + "circle-check-big": ` + `, +} diff --git a/internal/ui/components/icon/icon_defs.go b/internal/ui/components/icon/icon_defs.go new file mode 100644 index 0000000..f6c82d9 --- /dev/null +++ b/internal/ui/components/icon/icon_defs.go @@ -0,0 +1,1641 @@ +// templui component icon - version: v0.101.0 installed by templui v0.101.0 +// 📚 Documentation: https://templui.io/docs/components/icon +package icon +// This file is auto generated +// Using Lucide icons version 0.544.0 +var AlarmClockOff = Icon("alarm-clock-off") +var AArrowDown = Icon("a-arrow-down") +var ALargeSmall = Icon("a-large-small") +var AArrowUp = Icon("a-arrow-up") +var AlarmClock = Icon("alarm-clock") +var AirVent = Icon("air-vent") +var Activity = Icon("activity") +var AlarmClockCheck = Icon("alarm-clock-check") +var Airplay = Icon("airplay") +var AlarmClockMinus = Icon("alarm-clock-minus") +var Accessibility = Icon("accessibility") +var ArrowUp = Icon("arrow-up") +var ArrowDownNarrowWide = Icon("arrow-down-narrow-wide") +var ArrowDownRight = Icon("arrow-down-right") +var ArrowDownToDot = Icon("arrow-down-to-dot") +var ArrowDownToLine = Icon("arrow-down-to-line") +var Ampersands = Icon("ampersands") +var AlarmSmoke = Icon("alarm-smoke") +var Album = Icon("album") +var AlignCenterHorizontal = Icon("align-center-horizontal") +var AlignCenterVertical = Icon("align-center-vertical") +var AlignEndHorizontal = Icon("align-end-horizontal") +var ArrowDownLeft = Icon("arrow-down-left") +var AlignEndVertical = Icon("align-end-vertical") +var AlignHorizontalDistributeCenter = Icon("align-horizontal-distribute-center") +var AlignHorizontalDistributeEnd = Icon("align-horizontal-distribute-end") +var AlignHorizontalDistributeStart = Icon("align-horizontal-distribute-start") +var AlignHorizontalJustifyCenter = Icon("align-horizontal-justify-center") +var AlignHorizontalJustifyEnd = Icon("align-horizontal-justify-end") +var AlignHorizontalJustifyStart = Icon("align-horizontal-justify-start") +var AlignHorizontalSpaceAround = Icon("align-horizontal-space-around") +var AlignHorizontalSpaceBetween = Icon("align-horizontal-space-between") +var AlignStartHorizontal = Icon("align-start-horizontal") +var AlignStartVertical = Icon("align-start-vertical") +var AlignVerticalDistributeCenter = Icon("align-vertical-distribute-center") +var AlignVerticalDistributeEnd = Icon("align-vertical-distribute-end") +var AlignVerticalDistributeStart = Icon("align-vertical-distribute-start") +var AlignVerticalJustifyCenter = Icon("align-vertical-justify-center") +var AlignVerticalJustifyEnd = Icon("align-vertical-justify-end") +var AlignVerticalJustifyStart = Icon("align-vertical-justify-start") +var Amphora = Icon("amphora") +var Anchor = Icon("anchor") +var AlignVerticalSpaceAround = Icon("align-vertical-space-around") +var AlignVerticalSpaceBetween = Icon("align-vertical-space-between") +var Ambulance = Icon("ambulance") +var Ampersand = Icon("ampersand") +var ArrowDownUp = Icon("arrow-down-up") +var AlarmClockPlus = Icon("alarm-clock-plus") +var ArrowUp10 = Icon("arrow-up-1-0") +var ArrowLeftToLine = Icon("arrow-left-to-line") +var Angry = Icon("angry") +var ArrowDownWideNarrow = Icon("arrow-down-wide-narrow") +var ArrowUpAZ = Icon("arrow-up-a-z") +var ArrowUpDown = Icon("arrow-up-down") +var ArrowUpFromDot = Icon("arrow-up-from-dot") +var ArrowUpFromLine = Icon("arrow-up-from-line") +var ArrowBigDownDash = Icon("arrow-big-down-dash") +var Annoyed = Icon("annoyed") +var Antenna = Icon("antenna") +var Anvil = Icon("anvil") +var Aperture = Icon("aperture") +var AppWindowMac = Icon("app-window-mac") +var AppWindow = Icon("app-window") +var Apple = Icon("apple") +var ArchiveRestore = Icon("archive-restore") +var ArchiveX = Icon("archive-x") +var Archive = Icon("archive") +var Armchair = Icon("armchair") +var ArrowRightLeft = Icon("arrow-right-left") +var ArrowLeft = Icon("arrow-left") +var ArrowRightFromLine = Icon("arrow-right-from-line") +var ArrowBigDown = Icon("arrow-big-down") +var ArrowBigUp = Icon("arrow-big-up") +var ArrowDown01 = Icon("arrow-down-0-1") +var ArrowDown10 = Icon("arrow-down-1-0") +var ArrowDownAZ = Icon("arrow-down-a-z") +var ArrowDownFromLine = Icon("arrow-down-from-line") +var ArrowBigLeft = Icon("arrow-big-left") +var ArrowBigLeftDash = Icon("arrow-big-left-dash") +var ArrowUpLeft = Icon("arrow-up-left") +var ArrowUpNarrowWide = Icon("arrow-up-narrow-wide") +var ArrowUpRight = Icon("arrow-up-right") +var ArrowUpToLine = Icon("arrow-up-to-line") +var ArrowUpWideNarrow = Icon("arrow-up-wide-narrow") +var ArrowUpZA = Icon("arrow-up-z-a") +var ArrowBigRightDash = Icon("arrow-big-right-dash") +var ArrowLeftFromLine = Icon("arrow-left-from-line") +var ArrowDown = Icon("arrow-down") +var ArrowBigRight = Icon("arrow-big-right") +var ArrowLeftRight = Icon("arrow-left-right") +var BookOpenCheck = Icon("book-open-check") +var ArrowsUpFromLine = Icon("arrows-up-from-line") +var Asterisk = Icon("asterisk") +var AtSign = Icon("at-sign") +var Atom = Icon("atom") +var AudioLines = Icon("audio-lines") +var AudioWaveform = Icon("audio-waveform") +var Award = Icon("award") +var Axe = Icon("axe") +var Axis3d = Icon("axis-3d") +var Baby = Icon("baby") +var Beef = Icon("beef") +var Backpack = Icon("backpack") +var BadgeAlert = Icon("badge-alert") +var BadgeCent = Icon("badge-cent") +var BadgeCheck = Icon("badge-check") +var BadgeDollarSign = Icon("badge-dollar-sign") +var BadgeEuro = Icon("badge-euro") +var BadgeIndianRupee = Icon("badge-indian-rupee") +var BadgeInfo = Icon("badge-info") +var BadgeJapaneseYen = Icon("badge-japanese-yen") +var BadgeMinus = Icon("badge-minus") +var BadgePercent = Icon("badge-percent") +var BadgePlus = Icon("badge-plus") +var BadgePoundSterling = Icon("badge-pound-sterling") +var BadgeQuestionMark = Icon("badge-question-mark") +var BadgeRussianRuble = Icon("badge-russian-ruble") +var BadgeSwissFranc = Icon("badge-swiss-franc") +var BadgeTurkishLira = Icon("badge-turkish-lira") +var BadgeX = Icon("badge-x") +var Badge = Icon("badge") +var BaggageClaim = Icon("baggage-claim") +var Ban = Icon("ban") +var Banana = Icon("banana") +var Bandage = Icon("bandage") +var BanknoteArrowDown = Icon("banknote-arrow-down") +var BanknoteArrowUp = Icon("banknote-arrow-up") +var BanknoteX = Icon("banknote-x") +var Banknote = Icon("banknote") +var Barcode = Icon("barcode") +var Barrel = Icon("barrel") +var Baseline = Icon("baseline") +var Bath = Icon("bath") +var BatteryCharging = Icon("battery-charging") +var BatteryFull = Icon("battery-full") +var BatteryLow = Icon("battery-low") +var BatteryMedium = Icon("battery-medium") +var BatteryPlus = Icon("battery-plus") +var BatteryWarning = Icon("battery-warning") +var Battery = Icon("battery") +var Beaker = Icon("beaker") +var BeanOff = Icon("bean-off") +var Bean = Icon("bean") +var BedDouble = Icon("bed-double") +var BedSingle = Icon("bed-single") +var Bed = Icon("bed") +var CalendarRange = Icon("calendar-range") +var BookOpenText = Icon("book-open-text") +var BookOpen = Icon("book-open") +var BookPlus = Icon("book-plus") +var BookText = Icon("book-text") +var BookType = Icon("book-type") +var BeerOff = Icon("beer-off") +var Beer = Icon("beer") +var BellDot = Icon("bell-dot") +var BellElectric = Icon("bell-electric") +var BellMinus = Icon("bell-minus") +var BellOff = Icon("bell-off") +var BellPlus = Icon("bell-plus") +var BellRing = Icon("bell-ring") +var Bell = Icon("bell") +var BetweenHorizontalEnd = Icon("between-horizontal-end") +var BetweenHorizontalStart = Icon("between-horizontal-start") +var BetweenVerticalEnd = Icon("between-vertical-end") +var BetweenVerticalStart = Icon("between-vertical-start") +var BicepsFlexed = Icon("biceps-flexed") +var Bike = Icon("bike") +var Binary = Icon("binary") +var Binoculars = Icon("binoculars") +var Biohazard = Icon("biohazard") +var Bird = Icon("bird") +var Bitcoin = Icon("bitcoin") +var Blend = Icon("blend") +var Blinds = Icon("blinds") +var Blocks = Icon("blocks") +var BluetoothConnected = Icon("bluetooth-connected") +var BluetoothOff = Icon("bluetooth-off") +var BluetoothSearching = Icon("bluetooth-searching") +var Bluetooth = Icon("bluetooth") +var Bold = Icon("bold") +var Bolt = Icon("bolt") +var Bomb = Icon("bomb") +var Bone = Icon("bone") +var BookA = Icon("book-a") +var BookAlert = Icon("book-alert") +var BookAudio = Icon("book-audio") +var BookCheck = Icon("book-check") +var BookCopy = Icon("book-copy") +var BookDashed = Icon("book-dashed") +var BookDown = Icon("book-down") +var BookHeadphones = Icon("book-headphones") +var BookHeart = Icon("book-heart") +var BookImage = Icon("book-image") +var BookKey = Icon("book-key") +var BookLock = Icon("book-lock") +var BookMarked = Icon("book-marked") +var BookMinus = Icon("book-minus") +var BringToFront = Icon("bring-to-front") +var BookUp = Icon("book-up") +var ArrowUp01 = Icon("arrow-up-0-1") +var ArrowRightToLine = Icon("arrow-right-to-line") +var ArrowRight = Icon("arrow-right") +var CircleDivide = Icon("circle-divide") +var Check = Icon("check") +var ChefHat = Icon("chef-hat") +var Cherry = Icon("cherry") +var ChevronDown = Icon("chevron-down") +var ChevronFirst = Icon("chevron-first") +var ChevronLast = Icon("chevron-last") +var ChevronLeft = Icon("chevron-left") +var ChevronRight = Icon("chevron-right") +var ChevronUp = Icon("chevron-up") +var ChevronsDownUp = Icon("chevrons-down-up") +var ChevronsDown = Icon("chevrons-down") +var ChevronsLeftRightEllipsis = Icon("chevrons-left-right-ellipsis") +var ChevronsLeftRight = Icon("chevrons-left-right") +var ChevronsLeft = Icon("chevrons-left") +var ChevronsRightLeft = Icon("chevrons-right-left") +var ChevronsRight = Icon("chevrons-right") +var ChevronsUpDown = Icon("chevrons-up-down") +var ChevronsUp = Icon("chevrons-up") +var Chromium = Icon("chromium") +var Church = Icon("church") +var CigaretteOff = Icon("cigarette-off") +var Cigarette = Icon("cigarette") +var CircleAlert = Icon("circle-alert") +var CircleArrowDown = Icon("circle-arrow-down") +var CircleArrowLeft = Icon("circle-arrow-left") +var CircleArrowOutDownLeft = Icon("circle-arrow-out-down-left") +var BookUser = Icon("book-user") +var BookX = Icon("book-x") +var Book = Icon("book") +var BookmarkCheck = Icon("bookmark-check") +var BookmarkMinus = Icon("bookmark-minus") +var BookmarkPlus = Icon("bookmark-plus") +var BookmarkX = Icon("bookmark-x") +var Bookmark = Icon("bookmark") +var BoomBox = Icon("boom-box") +var BotMessageSquare = Icon("bot-message-square") +var BotOff = Icon("bot-off") +var Bot = Icon("bot") +var BottleWine = Icon("bottle-wine") +var BowArrow = Icon("bow-arrow") +var Box = Icon("box") +var Boxes = Icon("boxes") +var Braces = Icon("braces") +var Brackets = Icon("brackets") +var BrainCircuit = Icon("brain-circuit") +var BrainCog = Icon("brain-cog") +var Brain = Icon("brain") +var BrickWallFire = Icon("brick-wall-fire") +var BrickWallShield = Icon("brick-wall-shield") +var BrickWall = Icon("brick-wall") +var BriefcaseBusiness = Icon("briefcase-business") +var BriefcaseConveyorBelt = Icon("briefcase-conveyor-belt") +var BriefcaseMedical = Icon("briefcase-medical") +var Briefcase = Icon("briefcase") +var Clock1 = Icon("clock-1") +var CircleArrowOutDownRight = Icon("circle-arrow-out-down-right") +var CircleArrowOutUpLeft = Icon("circle-arrow-out-up-left") +var CircleArrowOutUpRight = Icon("circle-arrow-out-up-right") +var CircleArrowRight = Icon("circle-arrow-right") +var CircleArrowUp = Icon("circle-arrow-up") +var CircleCheckBig = Icon("circle-check-big") +var CircleCheck = Icon("circle-check") +var CircleChevronDown = Icon("circle-chevron-down") +var CircleChevronLeft = Icon("circle-chevron-left") +var CircleChevronRight = Icon("circle-chevron-right") +var CircleChevronUp = Icon("circle-chevron-up") +var CircleDashed = Icon("circle-dashed") +var CircleSmall = Icon("circle-small") +var CircleDotDashed = Icon("circle-dot-dashed") +var CircleDot = Icon("circle-dot") +var CircleEllipsis = Icon("circle-ellipsis") +var CircleEqual = Icon("circle-equal") +var CircleFadingArrowUp = Icon("circle-fading-arrow-up") +var CircleFadingPlus = Icon("circle-fading-plus") +var CircleGauge = Icon("circle-gauge") +var CircleMinus = Icon("circle-minus") +var CircleOff = Icon("circle-off") +var CircleParkingOff = Icon("circle-parking-off") +var CircleParking = Icon("circle-parking") +var CirclePause = Icon("circle-pause") +var CirclePercent = Icon("circle-percent") +var CirclePlay = Icon("circle-play") +var CirclePlus = Icon("circle-plus") +var CirclePoundSterling = Icon("circle-pound-sterling") +var CheckLine = Icon("check-line") +var CalendarSearch = Icon("calendar-search") +var CalendarSync = Icon("calendar-sync") +var CalendarX2 = Icon("calendar-x-2") +var CalendarX = Icon("calendar-x") +var Calendar = Icon("calendar") +var CameraOff = Icon("camera-off") +var Camera = Icon("camera") +var CandyCane = Icon("candy-cane") +var CandyOff = Icon("candy-off") +var Candy = Icon("candy") +var Cannabis = Icon("cannabis") +var CaptionsOff = Icon("captions-off") +var Captions = Icon("captions") +var CarFront = Icon("car-front") +var CarTaxiFront = Icon("car-taxi-front") +var Car = Icon("car") +var Caravan = Icon("caravan") +var CardSim = Icon("card-sim") +var Calculator = Icon("calculator") +var BrushCleaning = Icon("brush-cleaning") +var Brush = Icon("brush") +var Bubbles = Icon("bubbles") +var BugOff = Icon("bug-off") +var BugPlay = Icon("bug-play") +var Bug = Icon("bug") +var Bus = Icon("bus") +var Building2 = Icon("building-2") +var Building = Icon("building") +var CableCar = Icon("cable-car") +var BusFront = Icon("bus-front") +var Cable = Icon("cable") +var CakeSlice = Icon("cake-slice") +var Club = Icon("club") +var Clock10 = Icon("clock-10") +var Carrot = Icon("carrot") +var CaseLower = Icon("case-lower") +var CaseSensitive = Icon("case-sensitive") +var CaseUpper = Icon("case-upper") +var CassetteTape = Icon("cassette-tape") +var Cake = Icon("cake") +var ChartColumnStacked = Icon("chart-column-stacked") +var Castle = Icon("castle") +var Cast = Icon("cast") +var Cat = Icon("cat") +var ChartColumn = Icon("chart-column") +var ChartGantt = Icon("chart-gantt") +var ChartLine = Icon("chart-line") +var ChartNetwork = Icon("chart-network") +var ChartNoAxesColumnDecreasing = Icon("chart-no-axes-column-decreasing") +var CircleDollarSign = Icon("circle-dollar-sign") +var CircleStar = Icon("circle-star") +var CircleStop = Icon("circle-stop") +var CircleUserRound = Icon("circle-user-round") +var CircleUser = Icon("circle-user") +var CircleX = Icon("circle-x") +var Circle = Icon("circle") +var CircuitBoard = Icon("circuit-board") +var Citrus = Icon("citrus") +var Clapperboard = Icon("clapperboard") +var ClipboardCheck = Icon("clipboard-check") +var ClipboardClock = Icon("clipboard-clock") +var ClipboardCopy = Icon("clipboard-copy") +var ClipboardList = Icon("clipboard-list") +var ClipboardMinus = Icon("clipboard-minus") +var ClipboardPaste = Icon("clipboard-paste") +var ClipboardPenLine = Icon("clipboard-pen-line") +var ClipboardPen = Icon("clipboard-pen") +var ClipboardPlus = Icon("clipboard-plus") +var ClipboardType = Icon("clipboard-type") +var ClipboardX = Icon("clipboard-x") +var Clipboard = Icon("clipboard") +var ChartBarStacked = Icon("chart-bar-stacked") +var ChartArea = Icon("chart-area") +var ChartBarBig = Icon("chart-bar-big") +var ChartBarDecreasing = Icon("chart-bar-decreasing") +var ChartBarIncreasing = Icon("chart-bar-increasing") +var ChartColumnBig = Icon("chart-column-big") +var ChartBar = Icon("chart-bar") +var ChartCandlestick = Icon("chart-candlestick") +var ChartColumnDecreasing = Icon("chart-column-decreasing") +var CloudCheck = Icon("cloud-check") +var Clock12 = Icon("clock-12") +var Clock2 = Icon("clock-2") +var Clock3 = Icon("clock-3") +var Clock4 = Icon("clock-4") +var Clock5 = Icon("clock-5") +var Clock6 = Icon("clock-6") +var Clock7 = Icon("clock-7") +var Clock8 = Icon("clock-8") +var Clock9 = Icon("clock-9") +var ClockAlert = Icon("clock-alert") +var ClockArrowDown = Icon("clock-arrow-down") +var ClockArrowUp = Icon("clock-arrow-up") +var ClockFading = Icon("clock-fading") +var ClockPlus = Icon("clock-plus") +var Clock = Icon("clock") +var ClosedCaption = Icon("closed-caption") +var CloudAlert = Icon("cloud-alert") +var CalendarDays = Icon("calendar-days") +var Calendar1 = Icon("calendar-1") +var CalendarArrowDown = Icon("calendar-arrow-down") +var CalendarArrowUp = Icon("calendar-arrow-up") +var CalendarCheck2 = Icon("calendar-check-2") +var CalendarCheck = Icon("calendar-check") +var CalendarClock = Icon("calendar-clock") +var CalendarCog = Icon("calendar-cog") +var CircleSlash2 = Icon("circle-slash-2") +var CircleQuestionMark = Icon("circle-question-mark") +var ChartColumnIncreasing = Icon("chart-column-increasing") +var CloudOff = Icon("cloud-off") +var CloudCog = Icon("cloud-cog") +var CloudDownload = Icon("cloud-download") +var CloudDrizzle = Icon("cloud-drizzle") +var CloudFog = Icon("cloud-fog") +var CloudHail = Icon("cloud-hail") +var CloudLightning = Icon("cloud-lightning") +var CloudMoonRain = Icon("cloud-moon-rain") +var CloudMoon = Icon("cloud-moon") +var DatabaseBackup = Icon("database-backup") +var CodeXml = Icon("code-xml") +var Code = Icon("code") +var Codepen = Icon("codepen") +var Codesandbox = Icon("codesandbox") +var Coffee = Icon("coffee") +var Cog = Icon("cog") +var Coins = Icon("coins") +var Columns2 = Icon("columns-2") +var Columns3Cog = Icon("columns-3-cog") +var Columns3 = Icon("columns-3") +var Columns4 = Icon("columns-4") +var Combine = Icon("combine") +var Command = Icon("command") +var Compass = Icon("compass") +var Component = Icon("component") +var Computer = Icon("computer") +var ConciergeBell = Icon("concierge-bell") +var Cone = Icon("cone") +var Construction = Icon("construction") +var ContactRound = Icon("contact-round") +var Contact = Icon("contact") +var Container = Icon("container") +var Contrast = Icon("contrast") +var Cookie = Icon("cookie") +var CookingPot = Icon("cooking-pot") +var CopyCheck = Icon("copy-check") +var CopyMinus = Icon("copy-minus") +var CopyPlus = Icon("copy-plus") +var CopySlash = Icon("copy-slash") +var CopyX = Icon("copy-x") +var Copy = Icon("copy") +var Copyleft = Icon("copyleft") +var Copyright = Icon("copyright") +var CornerDownLeft = Icon("corner-down-left") +var CornerDownRight = Icon("corner-down-right") +var CornerLeftDown = Icon("corner-left-down") +var CornerLeftUp = Icon("corner-left-up") +var CornerRightDown = Icon("corner-right-down") +var CornerRightUp = Icon("corner-right-up") +var CornerUpLeft = Icon("corner-up-left") +var CornerUpRight = Icon("corner-up-right") +var Cpu = Icon("cpu") +var CreativeCommons = Icon("creative-commons") +var CreditCard = Icon("credit-card") +var Croissant = Icon("croissant") +var Crop = Icon("crop") +var Cross = Icon("cross") +var Crosshair = Icon("crosshair") +var Crown = Icon("crown") +var Cuboid = Icon("cuboid") +var CupSoda = Icon("cup-soda") +var Currency = Icon("currency") +var Cylinder = Icon("cylinder") +var Dam = Icon("dam") +var CloudSun = Icon("cloud-sun") +var CloudRainWind = Icon("cloud-rain-wind") +var CloudRain = Icon("cloud-rain") +var CloudSnow = Icon("cloud-snow") +var CloudSunRain = Icon("cloud-sun-rain") +var ChartPie = Icon("chart-pie") +var ChartNoAxesColumn = Icon("chart-no-axes-column") +var ChartNoAxesCombined = Icon("chart-no-axes-combined") +var ChartNoAxesGantt = Icon("chart-no-axes-gantt") +var CalendarMinus = Icon("calendar-minus") +var CalendarFold = Icon("calendar-fold") +var CalendarHeart = Icon("calendar-heart") +var CalendarMinus2 = Icon("calendar-minus-2") +var CircleSlash = Icon("circle-slash") +var ChartSpline = Icon("chart-spline") +var ChartScatter = Icon("chart-scatter") +var CheckCheck = Icon("check-check") +var Earth = Icon("earth") +var DatabaseZap = Icon("database-zap") +var Database = Icon("database") +var DecimalsArrowLeft = Icon("decimals-arrow-left") +var DecimalsArrowRight = Icon("decimals-arrow-right") +var Delete = Icon("delete") +var Dessert = Icon("dessert") +var Diameter = Icon("diameter") +var DiamondMinus = Icon("diamond-minus") +var DiamondPercent = Icon("diamond-percent") +var DiamondPlus = Icon("diamond-plus") +var Diamond = Icon("diamond") +var Dice1 = Icon("dice-1") +var Dice2 = Icon("dice-2") +var Dice3 = Icon("dice-3") +var Dice4 = Icon("dice-4") +var Dice5 = Icon("dice-5") +var Dice6 = Icon("dice-6") +var Dices = Icon("dices") +var Diff = Icon("diff") +var Disc2 = Icon("disc-2") +var Disc3 = Icon("disc-3") +var DiscAlbum = Icon("disc-album") +var Disc = Icon("disc") +var Divide = Icon("divide") +var DnaOff = Icon("dna-off") +var Dna = Icon("dna") +var Dock = Icon("dock") +var Dog = Icon("dog") +var DollarSign = Icon("dollar-sign") +var Donut = Icon("donut") +var DoorClosedLocked = Icon("door-closed-locked") +var DoorClosed = Icon("door-closed") +var DoorOpen = Icon("door-open") +var Dot = Icon("dot") +var Download = Icon("download") +var DraftingCompass = Icon("drafting-compass") +var Drama = Icon("drama") +var Dribbble = Icon("dribbble") +var Drill = Icon("drill") +var Drone = Icon("drone") +var DropletOff = Icon("droplet-off") +var Droplet = Icon("droplet") +var Droplets = Icon("droplets") +var Drum = Icon("drum") +var Drumstick = Icon("drumstick") +var Dumbbell = Icon("dumbbell") +var EarOff = Icon("ear-off") +var Ear = Icon("ear") +var EarthLock = Icon("earth-lock") +var CalendarPlus2 = Icon("calendar-plus-2") +var CalendarOff = Icon("calendar-off") +var FileCheck2 = Icon("file-check-2") +var Eclipse = Icon("eclipse") +var EggFried = Icon("egg-fried") +var EggOff = Icon("egg-off") +var Egg = Icon("egg") +var EllipsisVertical = Icon("ellipsis-vertical") +var Ellipsis = Icon("ellipsis") +var EqualApproximately = Icon("equal-approximately") +var EqualNot = Icon("equal-not") +var Equal = Icon("equal") +var Eraser = Icon("eraser") +var EthernetPort = Icon("ethernet-port") +var Euro = Icon("euro") +var EvCharger = Icon("ev-charger") +var Expand = Icon("expand") +var ExternalLink = Icon("external-link") +var EyeClosed = Icon("eye-closed") +var EyeOff = Icon("eye-off") +var Eye = Icon("eye") +var Facebook = Icon("facebook") +var Factory = Icon("factory") +var Fan = Icon("fan") +var FastForward = Icon("fast-forward") +var Feather = Icon("feather") +var Fence = Icon("fence") +var FerrisWheel = Icon("ferris-wheel") +var Figma = Icon("figma") +var FileArchive = Icon("file-archive") +var FileAudio2 = Icon("file-audio-2") +var FileAudio = Icon("file-audio") +var FileAxis3d = Icon("file-axis-3d") +var FileBadge2 = Icon("file-badge-2") +var FileBadge = Icon("file-badge") +var FileBox = Icon("file-box") +var FileChartColumnIncreasing = Icon("file-chart-column-increasing") +var FileChartColumn = Icon("file-chart-column") +var FileChartLine = Icon("file-chart-line") +var FileChartPie = Icon("file-chart-pie") +var Cloud = Icon("cloud") +var CloudUpload = Icon("cloud-upload") +var Cloudy = Icon("cloudy") +var FileText = Icon("file-text") +var FileCheck = Icon("file-check") +var FileClock = Icon("file-clock") +var FileCode2 = Icon("file-code-2") +var FileCode = Icon("file-code") +var FileCog = Icon("file-cog") +var FileDiff = Icon("file-diff") +var FileDigit = Icon("file-digit") +var FileDown = Icon("file-down") +var FileHeart = Icon("file-heart") +var FileImage = Icon("file-image") +var FileInput = Icon("file-input") +var FileJson2 = Icon("file-json-2") +var FileJson = Icon("file-json") +var Clock11 = Icon("clock-11") +var Clover = Icon("clover") +var FlashlightOff = Icon("flashlight-off") +var FileType2 = Icon("file-type-2") +var FileType = Icon("file-type") +var FileUp = Icon("file-up") +var FileUser = Icon("file-user") +var FileVideoCamera = Icon("file-video-camera") +var FileVolume2 = Icon("file-volume-2") +var FileVolume = Icon("file-volume") +var FileWarning = Icon("file-warning") +var FileX2 = Icon("file-x-2") +var FileX = Icon("file-x") +var File = Icon("file") +var Files = Icon("files") +var Film = Icon("film") +var Fingerprint = Icon("fingerprint") +var FireExtinguisher = Icon("fire-extinguisher") +var FishOff = Icon("fish-off") +var FishSymbol = Icon("fish-symbol") +var Fish = Icon("fish") +var FlagOff = Icon("flag-off") +var FlagTriangleLeft = Icon("flag-triangle-left") +var FlagTriangleRight = Icon("flag-triangle-right") +var Flag = Icon("flag") +var FlameKindling = Icon("flame-kindling") +var Flame = Icon("flame") +var FoldHorizontal = Icon("fold-horizontal") +var Flashlight = Icon("flashlight") +var FlaskConicalOff = Icon("flask-conical-off") +var FlaskConical = Icon("flask-conical") +var FlaskRound = Icon("flask-round") +var FlipHorizontal2 = Icon("flip-horizontal-2") +var FlipHorizontal = Icon("flip-horizontal") +var FlipVertical2 = Icon("flip-vertical-2") +var FlipVertical = Icon("flip-vertical") +var Flower2 = Icon("flower-2") +var Flower = Icon("flower") +var Focus = Icon("focus") +var FilePlus2 = Icon("file-plus-2") +var FileKey = Icon("file-key") +var FileLock2 = Icon("file-lock-2") +var FileLock = Icon("file-lock") +var FileMinus2 = Icon("file-minus-2") +var FileMinus = Icon("file-minus") +var FileMusic = Icon("file-music") +var FileOutput = Icon("file-output") +var FilePenLine = Icon("file-pen-line") +var FilePen = Icon("file-pen") +var FilePlay = Icon("file-play") +var FolderCode = Icon("folder-code") +var FoldVertical = Icon("fold-vertical") +var FolderArchive = Icon("folder-archive") +var FolderCheck = Icon("folder-check") +var FolderClock = Icon("folder-clock") +var FolderClosed = Icon("folder-closed") +var FileSearch = Icon("file-search") +var FilePlus = Icon("file-plus") +var FileQuestionMark = Icon("file-question-mark") +var FileScan = Icon("file-scan") +var FileSearch2 = Icon("file-search-2") +var FolderDown = Icon("folder-down") +var FolderCog = Icon("folder-cog") +var FolderDot = Icon("folder-dot") +var FileKey2 = Icon("file-key-2") +var FileSliders = Icon("file-sliders") +var FileSpreadsheet = Icon("file-spreadsheet") +var FileStack = Icon("file-stack") +var FileSymlink = Icon("file-symlink") +var FileTerminal = Icon("file-terminal") +var CalendarPlus = Icon("calendar-plus") +var FolderHeart = Icon("folder-heart") +var FolderGit2 = Icon("folder-git-2") +var FolderGit = Icon("folder-git") +var ArrowDownZA = Icon("arrow-down-z-a") +var FolderInput = Icon("folder-input") +var ChartNoAxesColumnIncreasing = Icon("chart-no-axes-column-increasing") +var ArrowBigUpDash = Icon("arrow-big-up-dash") +var BookUp2 = Icon("book-up-2") +var FolderMinus = Icon("folder-minus") +var FolderKanban = Icon("folder-kanban") +var FolderKey = Icon("folder-key") +var FolderLock = Icon("folder-lock") +var FolderPlus = Icon("folder-plus") +var FolderOpenDot = Icon("folder-open-dot") +var FolderSearch2 = Icon("folder-search-2") +var FolderOpen = Icon("folder-open") +var FolderOutput = Icon("folder-output") +var FolderPen = Icon("folder-pen") +var FolderTree = Icon("folder-tree") +var FolderSync = Icon("folder-sync") +var FolderUp = Icon("folder-up") +var FolderSymlink = Icon("folder-symlink") +var FolderSearch = Icon("folder-search") +var Folder = Icon("folder") +var Footprints = Icon("footprints") +var Folders = Icon("folders") +var Forklift = Icon("forklift") +var FolderRoot = Icon("folder-root") +var Framer = Icon("framer") +var FunnelPlus = Icon("funnel-plus") +var Frame = Icon("frame") +var Fuel = Icon("fuel") +var Fullscreen = Icon("fullscreen") +var Funnel = Icon("funnel") +var FunnelX = Icon("funnel-x") +var GalleryHorizontalEnd = Icon("gallery-horizontal-end") +var GalleryThumbnails = Icon("gallery-thumbnails") +var GalleryHorizontal = Icon("gallery-horizontal") +var Frown = Icon("frown") +var GalleryVertical = Icon("gallery-vertical") +var GalleryVerticalEnd = Icon("gallery-vertical-end") +var GeorgianLari = Icon("georgian-lari") +var Gavel = Icon("gavel") +var Gem = Icon("gem") +var Ghost = Icon("ghost") +var Gamepad2 = Icon("gamepad-2") +var GitBranch = Icon("git-branch") +var GitBranchPlus = Icon("git-branch-plus") +var Gift = Icon("gift") +var GitCommitHorizontal = Icon("git-commit-horizontal") +var GitCommitVertical = Icon("git-commit-vertical") +var Gauge = Icon("gauge") +var GitCompare = Icon("git-compare") +var GitCompareArrows = Icon("git-compare-arrows") +var GitMerge = Icon("git-merge") +var GitFork = Icon("git-fork") +var GitGraph = Icon("git-graph") +var GitPullRequestCreateArrow = Icon("git-pull-request-create-arrow") +var GitPullRequestArrow = Icon("git-pull-request-arrow") +var GitPullRequestClosed = Icon("git-pull-request-closed") +var GitPullRequestCreate = Icon("git-pull-request-create") +var Gitlab = Icon("gitlab") +var GitPullRequest = Icon("git-pull-request") +var Github = Icon("github") +var Glasses = Icon("glasses") +var GlassWater = Icon("glass-water") +var GlobeLock = Icon("globe-lock") +var Globe = Icon("globe") +var GitPullRequestDraft = Icon("git-pull-request-draft") +var GraduationCap = Icon("graduation-cap") +var Gpu = Icon("gpu") +var Grid2x2X = Icon("grid-2x2-x") +var Grape = Icon("grape") +var Grid2x2Check = Icon("grid-2x2-check") +var Grid2x2Plus = Icon("grid-2x2-plus") +var GripHorizontal = Icon("grip-horizontal") +var Grid2x2 = Icon("grid-2x2") +var Grid3x2 = Icon("grid-3x2") +var Grid3x3 = Icon("grid-3x3") +var GripVertical = Icon("grip-vertical") +var Group = Icon("group") +var Guitar = Icon("guitar") +var Hamburger = Icon("hamburger") +var Ham = Icon("ham") +var Goal = Icon("goal") +var HandFist = Icon("hand-fist") +var Hammer = Icon("hammer") +var HandCoins = Icon("hand-coins") +var HandPlatter = Icon("hand-platter") +var HandGrab = Icon("hand-grab") +var HandMetal = Icon("hand-metal") +var HandHeart = Icon("hand-heart") +var Handshake = Icon("handshake") +var Hand = Icon("hand") +var Handbag = Icon("handbag") +var HardDriveUpload = Icon("hard-drive-upload") +var HardDriveDownload = Icon("hard-drive-download") +var Grip = Icon("grip") +var HardHat = Icon("hard-hat") +var Hash = Icon("hash") +var HandHelping = Icon("hand-helping") +var Heading4 = Icon("heading-4") +var HatGlasses = Icon("hat-glasses") +var Haze = Icon("haze") +var HdmiPort = Icon("hdmi-port") +var Heading1 = Icon("heading-1") +var Heading2 = Icon("heading-2") +var HeadphoneOff = Icon("headphone-off") +var Heading5 = Icon("heading-5") +var Heading6 = Icon("heading-6") +var Heading = Icon("heading") +var History = Icon("history") +var Headphones = Icon("headphones") +var Headset = Icon("headset") +var Heading3 = Icon("heading-3") +var IceCreamBowl = Icon("ice-cream-bowl") +var HopOff = Icon("hop-off") +var Hop = Icon("hop") +var Hospital = Icon("hospital") +var Hotel = Icon("hotel") +var Hourglass = Icon("hourglass") +var HouseHeart = Icon("house-heart") +var HousePlug = Icon("house-plug") +var HeartCrack = Icon("heart-crack") +var HousePlus = Icon("house-plus") +var HeartHandshake = Icon("heart-handshake") +var HeartMinus = Icon("heart-minus") +var HeartOff = Icon("heart-off") +var HeartPlus = Icon("heart-plus") +var HeartPulse = Icon("heart-pulse") +var HouseWifi = Icon("house-wifi") +var House = Icon("house") +var ImageUpscale = Icon("image-upscale") +var IceCreamCone = Icon("ice-cream-cone") +var IdCardLanyard = Icon("id-card-lanyard") +var IdCard = Icon("id-card") +var ImageDown = Icon("image-down") +var ImageMinus = Icon("image-minus") +var ImageOff = Icon("image-off") +var ImagePlay = Icon("image-play") +var ImagePlus = Icon("image-plus") +var ImageUp = Icon("image-up") +var Heart = Icon("heart") +var Instagram = Icon("instagram") +var Image = Icon("image") +var Images = Icon("images") +var Import = Icon("import") +var Inbox = Icon("inbox") +var IndianRupee = Icon("indian-rupee") +var Infinity = Icon("infinity") +var Info = Icon("info") +var InspectionPanel = Icon("inspection-panel") +var JapaneseYen = Icon("japanese-yen") +var Italic = Icon("italic") +var IterationCcw = Icon("iteration-ccw") +var IterationCw = Icon("iteration-cw") +var HardDrive = Icon("hard-drive") +var Kayak = Icon("kayak") +var Joystick = Icon("joystick") +var Kanban = Icon("kanban") +var Heater = Icon("heater") +var Hexagon = Icon("hexagon") +var KeyboardMusic = Icon("keyboard-music") +var KeySquare = Icon("key-square") +var Key = Icon("key") +var LampWallUp = Icon("lamp-wall-up") +var KeyboardOff = Icon("keyboard-off") +var Keyboard = Icon("keyboard") +var LampCeiling = Icon("lamp-ceiling") +var LampDesk = Icon("lamp-desk") +var LampFloor = Icon("lamp-floor") +var KeyRound = Icon("key-round") +var LampWallDown = Icon("lamp-wall-down") +var LassoSelect = Icon("lasso-select") +var Lamp = Icon("lamp") +var LandPlot = Icon("land-plot") +var Landmark = Icon("landmark") +var Languages = Icon("languages") +var LaptopMinimalCheck = Icon("laptop-minimal-check") +var LaptopMinimal = Icon("laptop-minimal") +var Laptop = Icon("laptop") +var Laugh = Icon("laugh") +var Lasso = Icon("lasso") +var Highlighter = Icon("highlighter") +var LayoutGrid = Icon("layout-grid") +var LayoutPanelLeft = Icon("layout-panel-left") +var LayoutList = Icon("layout-list") +var Layers2 = Icon("layers-2") +var Layers = Icon("layers") +var Leaf = Icon("leaf") +var Lectern = Icon("lectern") +var LeafyGreen = Icon("leafy-green") +var LifeBuoy = Icon("life-buoy") +var LibraryBig = Icon("library-big") +var LayoutDashboard = Icon("layout-dashboard") +var LayoutTemplate = Icon("layout-template") +var Link2Off = Icon("link-2-off") +var Ligature = Icon("ligature") +var LightbulbOff = Icon("lightbulb-off") +var Lightbulb = Icon("lightbulb") +var Library = Icon("library") +var LineSquiggle = Icon("line-squiggle") +var ListCheck = Icon("list-check") +var Link2 = Icon("link-2") +var Link = Icon("link") +var Linkedin = Icon("linkedin") +var ListChevronsDownUp = Icon("list-chevrons-down-up") +var ListChecks = Icon("list-checks") +var ListChevronsUpDown = Icon("list-chevrons-up-down") +var LayoutPanelTop = Icon("layout-panel-top") +var ListFilter = Icon("list-filter") +var ListCollapse = Icon("list-collapse") +var ListEnd = Icon("list-end") +var ListMusic = Icon("list-music") +var ListIndentDecrease = Icon("list-indent-decrease") +var ListIndentIncrease = Icon("list-indent-increase") +var ListMinus = Icon("list-minus") +var ListRestart = Icon("list-restart") +var ListOrdered = Icon("list-ordered") +var ListTree = Icon("list-tree") +var ListPlus = Icon("list-plus") +var ListStart = Icon("list-start") +var ListTodo = Icon("list-todo") +var ListX = Icon("list-x") +var ListVideo = Icon("list-video") +var LoaderCircle = Icon("loader-circle") +var ListFilterPlus = Icon("list-filter-plus") +var LoaderPinwheel = Icon("loader-pinwheel") +var Loader = Icon("loader") +var LocateFixed = Icon("locate-fixed") +var LocateOff = Icon("locate-off") +var Locate = Icon("locate") +var LockKeyhole = Icon("lock-keyhole") +var LockKeyholeOpen = Icon("lock-keyhole-open") +var Lock = Icon("lock") +var LockOpen = Icon("lock-open") +var Lollipop = Icon("lollipop") +var LogIn = Icon("log-in") +var LogOut = Icon("log-out") +var Logs = Icon("logs") +var MailCheck = Icon("mail-check") +var Luggage = Icon("luggage") +var Magnet = Icon("magnet") +var MailMinus = Icon("mail-minus") +var MailOpen = Icon("mail-open") +var List = Icon("list") +var Mail = Icon("mail") +var MailPlus = Icon("mail-plus") +var MailQuestionMark = Icon("mail-question-mark") +var MailSearch = Icon("mail-search") +var MailWarning = Icon("mail-warning") +var MailX = Icon("mail-x") +var Mails = Icon("mails") +var Mailbox = Icon("mailbox") +var Gamepad = Icon("gamepad") +var MapPinHouse = Icon("map-pin-house") +var MapPinCheck = Icon("map-pin-check") +var MapPinMinusInside = Icon("map-pin-minus-inside") +var MapPinMinus = Icon("map-pin-minus") +var MapPinPen = Icon("map-pin-pen") +var MapPinOff = Icon("map-pin-off") +var MapPinPlus = Icon("map-pin-plus") +var MapPinPlusInside = Icon("map-pin-plus-inside") +var MapPinX = Icon("map-pin-x") +var MapPinned = Icon("map-pinned") +var MapPinXInside = Icon("map-pin-x-inside") +var MapPinCheckInside = Icon("map-pin-check-inside") +var MapPlus = Icon("map-plus") +var Map = Icon("map") +var Maximize2 = Icon("maximize-2") +var Mars = Icon("mars") +var Martini = Icon("martini") +var Maximize = Icon("maximize") +var Medal = Icon("medal") +var MarsStroke = Icon("mars-stroke") +var MessageCircleHeart = Icon("message-circle-heart") +var MegaphoneOff = Icon("megaphone-off") +var Megaphone = Icon("megaphone") +var Meh = Icon("meh") +var MemoryStick = Icon("memory-stick") +var Menu = Icon("menu") +var Merge = Icon("merge") +var MessageCircleCode = Icon("message-circle-code") +var MessageCircleDashed = Icon("message-circle-dashed") +var MessageSquareDiff = Icon("message-square-diff") +var MessageCircleMore = Icon("message-circle-more") +var MessageCircleOff = Icon("message-circle-off") +var MessageCirclePlus = Icon("message-circle-plus") +var MessageCircleQuestionMark = Icon("message-circle-question-mark") +var MessageCircleReply = Icon("message-circle-reply") +var MessageCircleWarning = Icon("message-circle-warning") +var MessageCircleX = Icon("message-circle-x") +var MessageCircle = Icon("message-circle") +var MessageSquareCode = Icon("message-square-code") +var MessageSquareDashed = Icon("message-square-dashed") +var MessageSquareQuote = Icon("message-square-quote") +var MessageSquareDot = Icon("message-square-dot") +var MessageSquareHeart = Icon("message-square-heart") +var MessageSquareLock = Icon("message-square-lock") +var MessageSquareMore = Icon("message-square-more") +var MessageSquareOff = Icon("message-square-off") +var MessageSquarePlus = Icon("message-square-plus") +var MessagesSquare = Icon("messages-square") +var CirclePower = Icon("circle-power") +var Microchip = Icon("microchip") +var MicOff = Icon("mic-off") +var Mic = Icon("mic") +var MicVocal = Icon("mic-vocal") +var MessageSquareWarning = Icon("message-square-warning") +var Milestone = Icon("milestone") +var MessageSquareShare = Icon("message-square-share") +var MessageSquareText = Icon("message-square-text") +var Microscope = Icon("microscope") +var Microwave = Icon("microwave") +var MessageSquare = Icon("message-square") +var MessageSquareReply = Icon("message-square-reply") +var Minimize = Icon("minimize") +var MilkOff = Icon("milk-off") +var Milk = Icon("milk") +var Minimize2 = Icon("minimize-2") +var MonitorCheck = Icon("monitor-check") +var MonitorCog = Icon("monitor-cog") +var Minus = Icon("minus") +var MonitorDot = Icon("monitor-dot") +var MessageSquareX = Icon("message-square-x") +var MonitorDown = Icon("monitor-down") +var MonitorOff = Icon("monitor-off") +var MonitorPause = Icon("monitor-pause") +var MonitorPlay = Icon("monitor-play") +var MonitorSmartphone = Icon("monitor-smartphone") +var MonitorSpeaker = Icon("monitor-speaker") +var MapPin = Icon("map-pin") +var MapMinus = Icon("map-minus") +var MonitorX = Icon("monitor-x") +var Forward = Icon("forward") +var Monitor = Icon("monitor") +var MoonStar = Icon("moon-star") +var MonitorUp = Icon("monitor-up") +var MountainSnow = Icon("mountain-snow") +var Moon = Icon("moon") +var FolderX = Icon("folder-x") +var MouseOff = Icon("mouse-off") +var MousePointer2 = Icon("mouse-pointer-2") +var MousePointerClick = Icon("mouse-pointer-click") +var MousePointerBan = Icon("mouse-pointer-ban") +var MoveDiagonal2 = Icon("move-diagonal-2") +var MousePointer = Icon("mouse-pointer") +var Mouse = Icon("mouse") +var Move3d = Icon("move-3d") +var MoveDown = Icon("move-down") +var MoveDiagonal = Icon("move-diagonal") +var MoveDownLeft = Icon("move-down-left") +var MoveLeft = Icon("move-left") +var MoveHorizontal = Icon("move-horizontal") +var MoveUpLeft = Icon("move-up-left") +var MoveRight = Icon("move-right") +var MoveUpRight = Icon("move-up-right") +var Music3 = Icon("music-3") +var MonitorStop = Icon("monitor-stop") +var MoveUp = Icon("move-up") +var Move = Icon("move") +var MoveVertical = Icon("move-vertical") +var Music2 = Icon("music-2") +var Navigation = Icon("navigation") +var Music4 = Icon("music-4") +var Music = Icon("music") +var Navigation2Off = Icon("navigation-2-off") +var Navigation2 = Icon("navigation-2") +var NavigationOff = Icon("navigation-off") +var Cctv = Icon("cctv") +var NotebookPen = Icon("notebook-pen") +var NotebookText = Icon("notebook-text") +var NotebookTabs = Icon("notebook-tabs") +var Network = Icon("network") +var OctagonAlert = Icon("octagon-alert") +var Notebook = Icon("notebook") +var Octagon = Icon("octagon") +var MoveDownRight = Icon("move-down-right") +var OctagonMinus = Icon("octagon-minus") +var NutOff = Icon("nut-off") +var Option = Icon("option") +var NotepadText = Icon("notepad-text") +var Omega = Icon("omega") +var Nut = Icon("nut") +var Newspaper = Icon("newspaper") +var OctagonX = Icon("octagon-x") +var Nfc = Icon("nfc") +var Origami = Icon("origami") +var PackageSearch = Icon("package-search") +var PaintBucket = Icon("paint-bucket") +var PackageX = Icon("package-x") +var Package = Icon("package") +var PackageOpen = Icon("package-open") +var PackageMinus = Icon("package-minus") +var PaintRoller = Icon("paint-roller") +var PaintbrushVertical = Icon("paintbrush-vertical") +var PackagePlus = Icon("package-plus") +var Package2 = Icon("package-2") +var Paintbrush = Icon("paintbrush") +var PackageCheck = Icon("package-check") +var Panda = Icon("panda") +var Palette = Icon("palette") +var PanelBottomDashed = Icon("panel-bottom-dashed") +var Orbit = Icon("orbit") +var PanelBottom = Icon("panel-bottom") +var PanelBottomOpen = Icon("panel-bottom-open") +var PanelLeftRightDashed = Icon("panel-left-right-dashed") +var PanelLeftClose = Icon("panel-left-close") +var PanelLeftDashed = Icon("panel-left-dashed") +var PanelLeftOpen = Icon("panel-left-open") +var PanelRight = Icon("panel-right") +var PanelLeft = Icon("panel-left") +var PanelRightClose = Icon("panel-right-close") +var PanelRightDashed = Icon("panel-right-dashed") +var PanelRightOpen = Icon("panel-right-open") +var PanelTopOpen = Icon("panel-top-open") +var PanelBottomClose = Icon("panel-bottom-close") +var PanelTopBottomDashed = Icon("panel-top-bottom-dashed") +var PanelTop = Icon("panel-top") +var PanelsLeftBottom = Icon("panels-left-bottom") +var PanelsRightBottom = Icon("panels-right-bottom") +var PanelTopClose = Icon("panel-top-close") +var Paperclip = Icon("paperclip") +var PanelsTopLeft = Icon("panels-top-left") +var PenTool = Icon("pen-tool") +var PanelTopDashed = Icon("panel-top-dashed") +var PencilLine = Icon("pencil-line") +var Pen = Icon("pen") +var PenOff = Icon("pen-off") +var PartyPopper = Icon("party-popper") +var ParkingMeter = Icon("parking-meter") +var Pause = Icon("pause") +var PawPrint = Icon("paw-print") +var Percent = Icon("percent") +var PencilOff = Icon("pencil-off") +var PencilRuler = Icon("pencil-ruler") +var Pencil = Icon("pencil") +var Pentagon = Icon("pentagon") +var PhoneIncoming = Icon("phone-incoming") +var PersonStanding = Icon("person-standing") +var PhilippinePeso = Icon("philippine-peso") +var PhoneCall = Icon("phone-call") +var PhoneForwarded = Icon("phone-forwarded") +var Phone = Icon("phone") +var PhoneMissed = Icon("phone-missed") +var PhoneOff = Icon("phone-off") +var PhoneOutgoing = Icon("phone-outgoing") +var Piano = Icon("piano") +var Pi = Icon("pi") +var Pickaxe = Icon("pickaxe") +var PictureInPicture2 = Icon("picture-in-picture-2") +var PiggyBank = Icon("piggy-bank") +var PictureInPicture = Icon("picture-in-picture") +var Pilcrow = Icon("pilcrow") +var PilcrowLeft = Icon("pilcrow-left") +var PilcrowRight = Icon("pilcrow-right") +var Pill = Icon("pill") +var PillBottle = Icon("pill-bottle") +var PinOff = Icon("pin-off") +var Pin = Icon("pin") +var PenLine = Icon("pen-line") +var PlugZap = Icon("plug-zap") +var Pipette = Icon("pipette") +var Pizza = Icon("pizza") +var PlaneLanding = Icon("plane-landing") +var PlaneTakeoff = Icon("plane-takeoff") +var Plane = Icon("plane") +var OctagonPause = Icon("octagon-pause") +var Pocket = Icon("pocket") +var PocketKnife = Icon("pocket-knife") +var Plug2 = Icon("plug-2") +var Mountain = Icon("mountain") +var PrinterCheck = Icon("printer-check") +var Plus = Icon("plus") +var PowerOff = Icon("power-off") +var Power = Icon("power") +var Presentation = Icon("presentation") +var Plug = Icon("plug") +var Rabbit = Icon("rabbit") +var QrCode = Icon("qr-code") +var Quote = Icon("quote") +var PoundSterling = Icon("pound-sterling") +var Pointer = Icon("pointer") +var Popcorn = Icon("popcorn") +var Podcast = Icon("podcast") +var PointerOff = Icon("pointer-off") +var Projector = Icon("projector") +var Printer = Icon("printer") +var Pyramid = Icon("pyramid") +var Proportions = Icon("proportions") +var RadioReceiver = Icon("radio-receiver") +var Radar = Icon("radar") +var Radiation = Icon("radiation") +var Radical = Icon("radical") +var Puzzle = Icon("puzzle") +var RailSymbol = Icon("rail-symbol") +var Radius = Icon("radius") +var NonBinary = Icon("non-binary") +var RadioTower = Icon("radio-tower") +var Rat = Icon("rat") +var Radio = Icon("radio") +var ReceiptEuro = Icon("receipt-euro") +var ReceiptCent = Icon("receipt-cent") +var ReceiptJapaneseYen = Icon("receipt-japanese-yen") +var ReceiptIndianRupee = Icon("receipt-indian-rupee") +var ReceiptRussianRuble = Icon("receipt-russian-ruble") +var ReceiptPoundSterling = Icon("receipt-pound-sterling") +var Rainbow = Icon("rainbow") +var ReceiptTurkishLira = Icon("receipt-turkish-lira") +var ReceiptSwissFranc = Icon("receipt-swiss-franc") +var ReceiptText = Icon("receipt-text") +var RectangleCircle = Icon("rectangle-circle") +var RectangleEllipsis = Icon("rectangle-ellipsis") +var Receipt = Icon("receipt") +var RectangleGoggles = Icon("rectangle-goggles") +var Ratio = Icon("ratio") +var Popsicle = Icon("popsicle") +var RefreshCcw = Icon("refresh-ccw") +var RectangleHorizontal = Icon("rectangle-horizontal") +var Repeat1 = Icon("repeat-1") +var RemoveFormatting = Icon("remove-formatting") +var RefreshCw = Icon("refresh-cw") +var RefreshCwOff = Icon("refresh-cw-off") +var RedoDot = Icon("redo-dot") +var Recycle = Icon("recycle") +var Redo2 = Icon("redo-2") +var Repeat2 = Icon("repeat-2") +var Repeat = Icon("repeat") +var Redo = Icon("redo") +var ReplaceAll = Icon("replace-all") +var RollerCoaster = Icon("roller-coaster") +var ReplyAll = Icon("reply-all") +var Reply = Icon("reply") +var Rewind = Icon("rewind") +var Ribbon = Icon("ribbon") +var Rocket = Icon("rocket") +var RockingChair = Icon("rocking-chair") +var Refrigerator = Icon("refrigerator") +var RotateCcwSquare = Icon("rotate-ccw-square") +var Rose = Icon("rose") +var Rotate3d = Icon("rotate-3d") +var RotateCcwKey = Icon("rotate-ccw-key") +var RefreshCcwDot = Icon("refresh-ccw-dot") +var Router = Icon("router") +var RotateCcw = Icon("rotate-ccw") +var RotateCwSquare = Icon("rotate-cw-square") +var RotateCw = Icon("rotate-cw") +var RouteOff = Icon("route-off") +var NotepadTextDashed = Icon("notepad-text-dashed") +var RussianRuble = Icon("russian-ruble") +var Replace = Icon("replace") +var SaudiRiyal = Icon("saudi-riyal") +var Sailboat = Icon("sailboat") +var Salad = Icon("salad") +var Sandwich = Icon("sandwich") +var SatelliteDish = Icon("satellite-dish") +var Satellite = Icon("satellite") +var Rss = Icon("rss") +var Rows3 = Icon("rows-3") +var Rows4 = Icon("rows-4") +var Ruler = Icon("ruler") +var RulerDimensionLine = Icon("ruler-dimension-line") +var ScanBarcode = Icon("scan-barcode") +var SaveAll = Icon("save-all") +var SaveOff = Icon("save-off") +var Route = Icon("route") +var Scale = Icon("scale") +var Scale3d = Icon("scale-3d") +var ScanQrCode = Icon("scan-qr-code") +var ScanEye = Icon("scan-eye") +var ScanFace = Icon("scan-face") +var ScanHeart = Icon("scan-heart") +var ScanLine = Icon("scan-line") +var Scaling = Icon("scaling") +var ScanText = Icon("scan-text") +var ScanSearch = Icon("scan-search") +var ScissorsLineDashed = Icon("scissors-line-dashed") +var Scan = Icon("scan") +var School = Icon("school") +var Save = Icon("save") +var ScreenShare = Icon("screen-share") +var Scissors = Icon("scissors") +var ScreenShareOff = Icon("screen-share-off") +var ScrollText = Icon("scroll-text") +var SearchCheck = Icon("search-check") +var SearchCode = Icon("search-code") +var Rows2 = Icon("rows-2") +var Section = Icon("section") +var SearchSlash = Icon("search-slash") +var SearchX = Icon("search-x") +var Scroll = Icon("scroll") +var SendToBack = Icon("send-to-back") +var SendHorizontal = Icon("send-horizontal") +var Send = Icon("send") +var SeparatorHorizontal = Icon("separator-horizontal") +var SeparatorVertical = Icon("separator-vertical") +var ServerCog = Icon("server-cog") +var ServerCrash = Icon("server-crash") +var ServerOff = Icon("server-off") +var Server = Icon("server") +var Settings2 = Icon("settings-2") +var Settings = Icon("settings") +var Shapes = Icon("shapes") +var Share2 = Icon("share-2") +var Parentheses = Icon("parentheses") +var Share = Icon("share") +var Sheet = Icon("sheet") +var Shell = Icon("shell") +var ShieldCheck = Icon("shield-check") +var ShieldBan = Icon("shield-ban") +var ShieldMinus = Icon("shield-minus") +var ShieldAlert = Icon("shield-alert") +var ShieldPlus = Icon("shield-plus") +var ShieldOff = Icon("shield-off") +var ShieldUser = Icon("shield-user") +var ShieldQuestionMark = Icon("shield-question-mark") +var Shield = Icon("shield") +var ShieldX = Icon("shield-x") +var Shirt = Icon("shirt") +var ShipWheel = Icon("ship-wheel") +var Ship = Icon("ship") +var ShoppingBag = Icon("shopping-bag") +var ShieldEllipsis = Icon("shield-ellipsis") +var Shovel = Icon("shovel") +var ShoppingBasket = Icon("shopping-basket") +var ShoppingCart = Icon("shopping-cart") +var ShowerHead = Icon("shower-head") +var ShieldHalf = Icon("shield-half") +var Shredder = Icon("shredder") +var Shrink = Icon("shrink") +var Shrimp = Icon("shrimp") +var Shrub = Icon("shrub") +var Shuffle = Icon("shuffle") +var Sigma = Icon("sigma") +var SignalLow = Icon("signal-low") +var SignalHigh = Icon("signal-high") +var SignalZero = Icon("signal-zero") +var SignalMedium = Icon("signal-medium") +var Signpost = Icon("signpost") +var SignpostBig = Icon("signpost-big") +var Signal = Icon("signal") +var SkipBack = Icon("skip-back") +var SkipForward = Icon("skip-forward") +var Regex = Icon("regex") +var Slack = Icon("slack") +var Skull = Icon("skull") +var Slice = Icon("slice") +var Slash = Icon("slash") +var SlidersHorizontal = Icon("sliders-horizontal") +var SlidersVertical = Icon("sliders-vertical") +var SmartphoneCharging = Icon("smartphone-charging") +var Smartphone = Icon("smartphone") +var SmartphoneNfc = Icon("smartphone-nfc") +var Snail = Icon("snail") +var SmilePlus = Icon("smile-plus") +var Smile = Icon("smile") +var SoapDispenserDroplet = Icon("soap-dispenser-droplet") +var Snowflake = Icon("snowflake") +var Sofa = Icon("sofa") +var Search = Icon("search") +var Space = Icon("space") +var Soup = Icon("soup") +var Sparkles = Icon("sparkles") +var Speech = Icon("speech") +var Speaker = Icon("speaker") +var Spade = Icon("spade") +var Sparkle = Icon("sparkle") +var Split = Icon("split") +var SpellCheck2 = Icon("spell-check-2") +var SpellCheck = Icon("spell-check") +var Siren = Icon("siren") +var Spotlight = Icon("spotlight") +var Spline = Icon("spline") +var Sprout = Icon("sprout") +var SprayCan = Icon("spray-can") +var SquareActivity = Icon("square-activity") +var SquareArrowDownLeft = Icon("square-arrow-down-left") +var Signature = Icon("signature") +var SquareArrowDown = Icon("square-arrow-down") +var SquareArrowOutDownLeft = Icon("square-arrow-out-down-left") +var SquareArrowLeft = Icon("square-arrow-left") +var SquareArrowRight = Icon("square-arrow-right") +var SquareArrowOutDownRight = Icon("square-arrow-out-down-right") +var SquareBottomDashedScissors = Icon("square-bottom-dashed-scissors") +var SquareArrowUpLeft = Icon("square-arrow-up-left") +var SquareArrowUpRight = Icon("square-arrow-up-right") +var SquareArrowUp = Icon("square-arrow-up") +var SquareAsterisk = Icon("square-asterisk") +var SquareArrowOutUpLeft = Icon("square-arrow-out-up-left") +var SquareArrowOutUpRight = Icon("square-arrow-out-up-right") +var SquareDashedMousePointer = Icon("square-dashed-mouse-pointer") +var SquareCode = Icon("square-code") +var SquareDashedBottomCode = Icon("square-dashed-bottom-code") +var SquareDashedBottom = Icon("square-dashed-bottom") +var SquareDashedKanban = Icon("square-dashed-kanban") +var SquareDivide = Icon("square-divide") +var SquareDashedTopSolid = Icon("square-dashed-top-solid") +var SquareDashed = Icon("square-dashed") +var SquareDot = Icon("square-dot") +var SplinePointer = Icon("spline-pointer") +var SquareCheck = Icon("square-check") +var SquareChevronLeft = Icon("square-chevron-left") +var SquareChartGantt = Icon("square-chart-gantt") +var SquareChevronUp = Icon("square-chevron-up") +var SquareChevronRight = Icon("square-chevron-right") +var SquareM = Icon("square-m") +var SquareEqual = Icon("square-equal") +var SquareKanban = Icon("square-kanban") +var SquareLibrary = Icon("square-library") +var SquareParking = Icon("square-parking") +var SquareMenu = Icon("square-menu") +var SquareFunction = Icon("square-function") +var SquareMinus = Icon("square-minus") +var SquareMousePointer = Icon("square-mouse-pointer") +var SquareParkingOff = Icon("square-parking-off") +var SquarePi = Icon("square-pi") +var SquarePause = Icon("square-pause") +var SquarePen = Icon("square-pen") +var SquareCheckBig = Icon("square-check-big") +var SquarePercent = Icon("square-percent") +var SquarePlay = Icon("square-play") +var SquarePilcrow = Icon("square-pilcrow") +var SquarePower = Icon("square-power") +var SquarePlus = Icon("square-plus") +var SquareScissors = Icon("square-scissors") +var SquareRadical = Icon("square-radical") +var SquareRoundCorner = Icon("square-round-corner") +var SquareSplitHorizontal = Icon("square-split-horizontal") +var SquareSlash = Icon("square-slash") +var SquareSplitVertical = Icon("square-split-vertical") +var SquareChevronDown = Icon("square-chevron-down") +var SquareSquare = Icon("square-square") +var SquareStack = Icon("square-stack") +var SquareSigma = Icon("square-sigma") +var SquareStop = Icon("square-stop") +var SquareStar = Icon("square-star") +var SquareUserRound = Icon("square-user-round") +var SquareTerminal = Icon("square-terminal") +var SquareUser = Icon("square-user") +var SquareX = Icon("square-x") +var SquareArrowDownRight = Icon("square-arrow-down-right") +var Squirrel = Icon("squirrel") +var Square = Icon("square") +var SquaresExclude = Icon("squares-exclude") +var StretchVertical = Icon("stretch-vertical") +var SquaresIntersect = Icon("squares-intersect") +var Sticker = Icon("sticker") +var SquaresSubtract = Icon("squares-subtract") +var StickyNote = Icon("sticky-note") +var SquaresUnite = Icon("squares-unite") +var Store = Icon("store") +var StretchHorizontal = Icon("stretch-horizontal") +var SunMedium = Icon("sun-medium") +var Strikethrough = Icon("strikethrough") +var Subscript = Icon("subscript") +var SunSnow = Icon("sun-snow") +var SunMoon = Icon("sun-moon") +var Squircle = Icon("squircle") +var StarOff = Icon("star-off") +var Stamp = Icon("stamp") +var StarHalf = Icon("star-half") +var SwissFranc = Icon("swiss-franc") +var Sun = Icon("sun") +var Sunrise = Icon("sunrise") +var Sunset = Icon("sunset") +var Superscript = Icon("superscript") +var SwatchBook = Icon("swatch-book") +var StepBack = Icon("step-back") +var Star = Icon("star") +var TableCellsSplit = Icon("table-cells-split") +var SwitchCamera = Icon("switch-camera") +var Sword = Icon("sword") +var Swords = Icon("swords") +var Syringe = Icon("syringe") +var Table2 = Icon("table-2") +var TableCellsMerge = Icon("table-cells-merge") +var StepForward = Icon("step-forward") +var Table = Icon("table") +var TableColumnsSplit = Icon("table-columns-split") +var Stethoscope = Icon("stethoscope") +var TableProperties = Icon("table-properties") +var TableRowsSplit = Icon("table-rows-split") +var Tablet = Icon("tablet") +var TabletSmartphone = Icon("tablet-smartphone") +var Tags = Icon("tags") +var Tablets = Icon("tablets") +var Tag = Icon("tag") +var Tally3 = Icon("tally-3") +var Tally1 = Icon("tally-1") +var Tally2 = Icon("tally-2") +var Target = Icon("target") +var Tally4 = Icon("tally-4") +var Tally5 = Icon("tally-5") +var Tangent = Icon("tangent") +var Terminal = Icon("terminal") +var Telescope = Icon("telescope") +var Tent = Icon("tent") +var TentTree = Icon("tent-tree") +var TestTube = Icon("test-tube") +var TestTubeDiagonal = Icon("test-tube-diagonal") +var TestTubes = Icon("test-tubes") +var TextAlignCenter = Icon("text-align-center") +var TextAlignEnd = Icon("text-align-end") +var TextAlignJustify = Icon("text-align-justify") +var TextAlignStart = Icon("text-align-start") +var TextQuote = Icon("text-quote") +var TextCursorInput = Icon("text-cursor-input") +var TextCursor = Icon("text-cursor") +var TextInitial = Icon("text-initial") +var ThermometerSnowflake = Icon("thermometer-snowflake") +var TextSearch = Icon("text-search") +var TextSelect = Icon("text-select") +var TextWrap = Icon("text-wrap") +var Theater = Icon("theater") +var Thermometer = Icon("thermometer") +var ThermometerSun = Icon("thermometer-sun") +var TableOfContents = Icon("table-of-contents") +var ThumbsUp = Icon("thumbs-up") +var TicketCheck = Icon("ticket-check") +var TicketMinus = Icon("ticket-minus") +var ThumbsDown = Icon("thumbs-down") +var TicketSlash = Icon("ticket-slash") +var TicketPercent = Icon("ticket-percent") +var TicketPlus = Icon("ticket-plus") +var TimerOff = Icon("timer-off") +var TicketX = Icon("ticket-x") +var Ticket = Icon("ticket") +var RectangleVertical = Icon("rectangle-vertical") +var ToggleLeft = Icon("toggle-left") +var TimerReset = Icon("timer-reset") +var Timer = Icon("timer") +var Toilet = Icon("toilet") +var ToggleRight = Icon("toggle-right") +var Tickets = Icon("tickets") +var ToolCase = Icon("tool-case") +var Tornado = Icon("tornado") +var Torus = Icon("torus") +var TouchpadOff = Icon("touchpad-off") +var Touchpad = Icon("touchpad") +var TowerControl = Icon("tower-control") +var ToyBrick = Icon("toy-brick") +var Tractor = Icon("tractor") +var TicketsPlane = Icon("tickets-plane") +var TrainFront = Icon("train-front") +var TrafficCone = Icon("traffic-cone") +var TrainFrontTunnel = Icon("train-front-tunnel") +var Transgender = Icon("transgender") +var TrainTrack = Icon("train-track") +var Trash = Icon("trash") +var TramFront = Icon("tram-front") +var Trash2 = Icon("trash-2") +var Trees = Icon("trees") +var TreePalm = Icon("tree-palm") +var TreePine = Icon("tree-pine") +var TrendingUp = Icon("trending-up") +var Trello = Icon("trello") +var TrendingDown = Icon("trending-down") +var TrendingUpDown = Icon("trending-up-down") +var TriangleRight = Icon("triangle-right") +var Trophy = Icon("trophy") +var TriangleAlert = Icon("triangle-alert") +var Triangle = Icon("triangle") +var TriangleDashed = Icon("triangle-dashed") +var Turntable = Icon("turntable") +var TruckElectric = Icon("truck-electric") +var Truck = Icon("truck") +var TurkishLira = Icon("turkish-lira") +var Tv = Icon("tv") +var Turtle = Icon("turtle") +var TvMinimal = Icon("tv-minimal") +var UmbrellaOff = Icon("umbrella-off") +var Twitch = Icon("twitch") +var Twitter = Icon("twitter") +var TypeOutline = Icon("type-outline") +var Type = Icon("type") +var UndoDot = Icon("undo-dot") +var Umbrella = Icon("umbrella") +var Underline = Icon("underline") +var Undo2 = Icon("undo-2") +var UnfoldHorizontal = Icon("unfold-horizontal") +var Undo = Icon("undo") +var TreeDeciduous = Icon("tree-deciduous") +var Ungroup = Icon("ungroup") +var University = Icon("university") +var Unlink2 = Icon("unlink-2") +var Unlink = Icon("unlink") +var Unplug = Icon("unplug") +var UserCheck = Icon("user-check") +var Play = Icon("play") +var UserCog = Icon("user-cog") +var Usb = Icon("usb") +var TvMinimalPlay = Icon("tv-minimal-play") +var UserRoundCog = Icon("user-round-cog") +var UserRoundCheck = Icon("user-round-check") +var UserRoundPen = Icon("user-round-pen") +var UserRoundMinus = Icon("user-round-minus") +var UserRoundSearch = Icon("user-round-search") +var UserRoundPlus = Icon("user-round-plus") +var UserMinus = Icon("user-minus") +var UserLock = Icon("user-lock") +var UserPen = Icon("user-pen") +var UserX = Icon("user-x") +var UserRoundX = Icon("user-round-x") +var UserRound = Icon("user-round") +var UserSearch = Icon("user-search") +var UserStar = Icon("user-star") +var UsersRound = Icon("users-round") +var User = Icon("user") +var UtensilsCrossed = Icon("utensils-crossed") +var Users = Icon("users") +var Utensils = Icon("utensils") +var UtilityPole = Icon("utility-pole") +var Variable = Icon("variable") +var Vault = Icon("vault") +var UserPlus = Icon("user-plus") +var VolumeOff = Icon("volume-off") +var VectorSquare = Icon("vector-square") +var Vegan = Icon("vegan") +var VenetianMask = Icon("venetian-mask") +var VenusAndMars = Icon("venus-and-mars") +var Venus = Icon("venus") +var VibrateOff = Icon("vibrate-off") +var Vibrate = Icon("vibrate") +var VideoOff = Icon("video-off") +var Video = Icon("video") +var Videotape = Icon("videotape") +var View = Icon("view") +var Voicemail = Icon("voicemail") +var Volleyball = Icon("volleyball") +var Volume1 = Icon("volume-1") +var Volume2 = Icon("volume-2") +var Wheat = Icon("wheat") +var Upload = Icon("upload") +var WifiPen = Icon("wifi-pen") +var WashingMachine = Icon("washing-machine") +var VolumeX = Icon("volume-x") +var Volume = Icon("volume") +var Vote = Icon("vote") +var WalletCards = Icon("wallet-cards") +var WalletMinimal = Icon("wallet-minimal") +var Wallet = Icon("wallet") +var Wallpaper = Icon("wallpaper") +var WandSparkles = Icon("wand-sparkles") +var Wand = Icon("wand") +var Warehouse = Icon("warehouse") +var Webcam = Icon("webcam") +var WavesLadder = Icon("waves-ladder") +var Waves = Icon("waves") +var Waypoints = Icon("waypoints") +var WifiHigh = Icon("wifi-high") +var WifiCog = Icon("wifi-cog") +var WifiLow = Icon("wifi-low") +var ZoomOut = Icon("zoom-out") +var Worm = Icon("worm") +var Wrench = Icon("wrench") +var X = Icon("x") +var Youtube = Icon("youtube") +var ZapOff = Icon("zap-off") +var Zap = Icon("zap") +var ZoomIn = Icon("zoom-in") +var Webhook = Icon("webhook") +var WebhookOff = Icon("webhook-off") +var WindArrowDown = Icon("wind-arrow-down") +var WifiSync = Icon("wifi-sync") +var WifiZero = Icon("wifi-zero") +var Wifi = Icon("wifi") +var Weight = Icon("weight") +var WineOff = Icon("wine-off") +var Wind = Icon("wind") +var Wine = Icon("wine") +var WifiOff = Icon("wifi-off") +var WheatOff = Icon("wheat-off") +var WholeWord = Icon("whole-word") +var Workflow = Icon("workflow") +var Watch = Icon("watch") +var SunDim = Icon("sun-dim") +var SquircleDashed = Icon("squircle-dashed") +var Spool = Icon("spool") +var UnfoldVertical = Icon("unfold-vertical") +var PcCase = Icon("pc-case") diff --git a/internal/ui/components/input/input.templ b/internal/ui/components/input/input.templ new file mode 100644 index 0000000..adae3e4 --- /dev/null +++ b/internal/ui/components/input/input.templ @@ -0,0 +1,130 @@ +// templui component input - version: v0.101.0 installed by templui v0.101.0 +// 📚 Documentation: https://templui.io/docs/components/input +package input + +import ( + "git.juancwu.dev/juancwu/budgething/internal/ui/components/button" + "git.juancwu.dev/juancwu/budgething/internal/ui/components/icon" + "git.juancwu.dev/juancwu/budgething/internal/utils" +) + +type Type string + +const ( + TypeText Type = "text" + TypePassword Type = "password" + TypeEmail Type = "email" + TypeNumber Type = "number" + TypeTel Type = "tel" + TypeURL Type = "url" + TypeSearch Type = "search" + TypeDate Type = "date" + TypeDateTime Type = "datetime-local" + TypeTime Type = "time" + TypeFile Type = "file" + TypeColor Type = "color" + TypeWeek Type = "week" + TypeMonth Type = "month" +) + +type Props struct { + ID string + Class string + Attributes templ.Attributes + Name string + Type Type + Form string + Placeholder string + Value string + Disabled bool + Readonly bool + FileAccept string + HasError bool + NoTogglePassword bool +} + +templ Input(props ...Props) { + {{ var p Props }} + if len(props) > 0 { + {{ p = props[0] }} + } + if p.Type == "" { + {{ p.Type = TypeText }} + } + if p.ID == "" { + {{ p.ID = utils.RandomID() }} + } +
+ + if p.Type == TypePassword && !p.NoTogglePassword { + @button.Button(button.Props{ + Size: button.SizeIcon, + Variant: button.VariantGhost, + Class: "absolute right-0 top-1/2 -translate-y-1/2 opacity-50 cursor-pointer", + Attributes: templ.Attributes{"data-tui-input-toggle-password": p.ID}, + }) { + + @icon.Eye(icon.Props{ + Size: 18, + }) + + + } + } +
+} + +templ Script() { + +} diff --git a/internal/ui/components/label/label.templ b/internal/ui/components/label/label.templ new file mode 100644 index 0000000..5a87dbe --- /dev/null +++ b/internal/ui/components/label/label.templ @@ -0,0 +1,43 @@ +// templui component label - version: v0.101.0 installed by templui v0.101.0 +// 📚 Documentation: https://templui.io/docs/components/label +package label + +import "git.juancwu.dev/juancwu/budgething/internal/utils" + +type Props struct { + ID string + Class string + Attributes templ.Attributes + For string + Error string +} + +templ Label(props ...Props) { + {{ var p Props }} + if len(props) > 0 { + {{ p = props[0] }} + } + +} + +templ Script() { + +} diff --git a/internal/ui/components/progress/progress.templ b/internal/ui/components/progress/progress.templ new file mode 100644 index 0000000..0ef10c7 --- /dev/null +++ b/internal/ui/components/progress/progress.templ @@ -0,0 +1,127 @@ +// templui component progress - version: v0.101.0 installed by templui v0.101.0 +// 📚 Documentation: https://templui.io/docs/components/progress +package progress + +import ( + "fmt" + "git.juancwu.dev/juancwu/budgething/internal/utils" +) + +type Size string +type Variant string + +const ( + SizeSm Size = "sm" + SizeLg Size = "lg" +) + +const ( + VariantDefault Variant = "default" + VariantSuccess Variant = "success" + VariantDanger Variant = "danger" + VariantWarning Variant = "warning" +) + +type Props struct { + ID string + Class string + Attributes templ.Attributes + Max int + Value int + Label string + ShowValue bool + Size Size + Variant Variant + BarClass string +} + +templ Progress(props ...Props) { + {{ var p Props }} + if len(props) > 0 { + {{ p = props[0] }} + } + if p.ID == "" { + {{ p.ID = utils.RandomID() }} + } +
+ if p.Label != "" || p.ShowValue { +
+ if p.Label != "" { + { p.Label } + } + if p.ShowValue { + + { fmt.Sprintf("%d%%", percentage(p.Value, p)) } + + } +
+ } +
+
+
+
+} + +func maxValue(max int) int { + if max <= 0 { + return 100 + } + return max +} + +func percentage(value int, props Props) int { + max := maxValue(props.Max) + if value < 0 { + value = 0 + } + if value > max { + value = max + } + return (value * 100) / max +} + +func sizeClasses(size Size) string { + switch size { + case SizeSm: + return "h-1" + case SizeLg: + return "h-4" + default: + return "h-2.5" + } +} + +func variantClasses(variant Variant) string { + switch variant { + case VariantSuccess: + return "bg-green-500" + case VariantDanger: + return "bg-destructive" + case VariantWarning: + return "bg-yellow-500" + default: + return "bg-primary" + } +} + +templ Script() { + +} diff --git a/internal/ui/components/selectbox/selectbox.templ b/internal/ui/components/selectbox/selectbox.templ new file mode 100644 index 0000000..82b7079 --- /dev/null +++ b/internal/ui/components/selectbox/selectbox.templ @@ -0,0 +1,325 @@ +// templui component selectbox - version: v0.101.0 installed by templui v0.101.0 +// 📚 Documentation: https://templui.io/docs/components/select-box +package selectbox + +import ( + "context" + "fmt" + "git.juancwu.dev/juancwu/budgething/internal/ui/components/button" + "git.juancwu.dev/juancwu/budgething/internal/ui/components/icon" + "git.juancwu.dev/juancwu/budgething/internal/ui/components/input" + "git.juancwu.dev/juancwu/budgething/internal/ui/components/popover" + "git.juancwu.dev/juancwu/budgething/internal/utils" + "strconv" +) + +type contextKey string + +var contentIDKey contextKey = "contentID" + +type Props struct { + ID string + Class string + Attributes templ.Attributes + Multiple bool +} + +type TriggerProps struct { + ID string + Class string + Attributes templ.Attributes + Name string + Form string + Disabled bool + HasError bool + Multiple bool + ShowPills bool + SelectedCountText string +} + +type ValueProps struct { + ID string + Class string + Attributes templ.Attributes + Placeholder string + Multiple bool +} + +type ContentProps struct { + ID string + Class string + Attributes templ.Attributes + NoSearch bool + SearchPlaceholder string +} + +type GroupProps struct { + ID string + Class string + Attributes templ.Attributes +} + +type LabelProps struct { + ID string + Class string + Attributes templ.Attributes +} + +type ItemProps struct { + ID string + Class string + Attributes templ.Attributes + Value string + Selected bool + Disabled bool +} + +templ SelectBox(props ...Props) { + {{ + var p Props + if len(props) > 0 { + p = props[0] + } + wrapperID := p.ID + if wrapperID == "" { + wrapperID = utils.RandomID() + } + contentID := fmt.Sprintf("%s-content", wrapperID) + ctx = context.WithValue(ctx, contentIDKey, contentID) + }} +
+ { children... } +
+} + +templ Trigger(props ...TriggerProps) { + {{ + var p TriggerProps + if len(props) > 0 { + p = props[0] + } + contentID, ok := ctx.Value(contentIDKey).(string) + if !ok { + contentID = "fallback-select-content-id" + } + if p.ShowPills { + p.Multiple = true + } + }} + @popover.Trigger(popover.TriggerProps{ + For: contentID, + TriggerType: popover.TriggerTypeClick, + }) { + @button.Button(button.Props{ + ID: p.ID, + Type: "button", + Variant: button.VariantOutline, + Class: utils.TwMerge( + // Required class for JavaScript + "select-trigger", + // Base styles matching input + "w-full h-9 px-3 py-1 text-base md:text-sm", + "flex items-center justify-between", + "rounded-md border border-input bg-transparent shadow-xs transition-[color,box-shadow] outline-none", + // Dark mode background + "dark:bg-input/30", + // Selection styles + "selection:bg-primary selection:text-primary-foreground", + // Focus styles + "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", + // Error/Invalid styles + "aria-invalid:ring-destructive/20 aria-invalid:border-destructive dark:aria-invalid:ring-destructive/40", + utils.If(p.HasError, "border-destructive ring-destructive/20 dark:ring-destructive/40"), + p.Class, + ), + Disabled: p.Disabled, + Attributes: utils.MergeAttributes( + templ.Attributes{ + "data-tui-selectbox-content-id": contentID, + "data-tui-selectbox-multiple": strconv.FormatBool(p.Multiple), + "data-tui-selectbox-show-pills": strconv.FormatBool(p.ShowPills), + "data-tui-selectbox-selected-count-text": p.SelectedCountText, + "tabindex": "0", + "aria-invalid": utils.If(p.HasError, "true"), + }, + ), + }) { + + { children... } + + @icon.ChevronDown(icon.Props{ + Size: 16, + Class: "text-muted-foreground", + }) + + } + } +} + +templ Value(props ...ValueProps) { + {{ var p ValueProps }} + if len(props) > 0 { + {{ p = props[0] }} + } + + if p.Placeholder != "" { + { p.Placeholder } + } + { children... } + +} + +templ Content(props ...ContentProps) { + {{ + var p ContentProps + if len(props) > 0 { + p = props[0] + } + contentID, ok := ctx.Value(contentIDKey).(string) + if !ok { + contentID = "fallback-select-content-id" + } + }} + @popover.Content(popover.ContentProps{ + ID: contentID, + Placement: popover.PlacementBottomStart, + Offset: 4, + MatchWidth: true, + DisableESC: !p.NoSearch, + Class: utils.TwMerge( + "p-1 select-content z-50 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md", + "min-w-[var(--popover-trigger-width)] w-[var(--popover-trigger-width)]", + p.Class, + ), + Attributes: utils.MergeAttributes( + templ.Attributes{ + "role": "listbox", + "tabindex": "-1", + }, + p.Attributes, + ), + Exclusive: true, + }) { + if !p.NoSearch { +
+
+ + @icon.Search(icon.Props{Size: 16}) + + @input.Input(input.Props{ + Type: input.TypeSearch, + Class: "pl-8", + Placeholder: utils.IfElse(p.SearchPlaceholder != "", p.SearchPlaceholder, "Search..."), + Attributes: templ.Attributes{ + "data-tui-selectbox-search": "", + }, + }) +
+
+ } +
+ { children... } +
+ } +} + +templ Group(props ...GroupProps) { + {{ var p GroupProps }} + if len(props) > 0 { + {{ p = props[0] }} + } +
+ { children... } +
+} + +templ Label(props ...LabelProps) { + {{ var p LabelProps }} + if len(props) > 0 { + {{ p = props[0] }} + } + + { children... } + +} + +templ Item(props ...ItemProps) { + {{ var p ItemProps }} + if len(props) > 0 { + {{ p = props[0] }} + } +
+ + { children... } + + + @icon.Check(icon.Props{Size: 16}) + +
+} + +templ Script() { + +} diff --git a/internal/ui/components/skeleton/skeleton.templ b/internal/ui/components/skeleton/skeleton.templ new file mode 100644 index 0000000..cf5803d --- /dev/null +++ b/internal/ui/components/skeleton/skeleton.templ @@ -0,0 +1,30 @@ +// templui component skeleton - version: v0.101.0 installed by templui v0.101.0 +// 📚 Documentation: https://templui.io/docs/components/skeleton +package skeleton + +import "git.juancwu.dev/juancwu/budgething/internal/utils" + +type Props struct { + ID string + Class string + Attributes templ.Attributes +} + +templ Skeleton(props ...Props) { + {{ var p Props }} + if len(props) > 0 { + {{ p = props[0] }} + } +
+} diff --git a/internal/ui/components/slider/slider.templ b/internal/ui/components/slider/slider.templ new file mode 100644 index 0000000..5c7db5b --- /dev/null +++ b/internal/ui/components/slider/slider.templ @@ -0,0 +1,121 @@ +// templui component slider - version: v0.101.0 installed by templui v0.101.0 +// 📚 Documentation: https://templui.io/docs/components/slider +package slider + +import ( + "fmt" + "git.juancwu.dev/juancwu/budgething/internal/utils" +) + +type Props struct { + ID string + Class string + Attributes templ.Attributes +} + +type InputProps struct { + ID string + Class string + Attributes templ.Attributes + Name string + Min int + Max int + Step int + Value int + Disabled bool +} + +type ValueProps struct { + ID string + Class string + Attributes templ.Attributes + For string // Corresponds to the ID of the Slider Input +} + +templ Slider(props ...Props) { + {{ var p Props }} + if len(props) > 0 { + {{ p = props[0] }} + } +
+ { children... } +
+} + +templ Input(props ...InputProps) { + {{ var p InputProps }} + if len(props) > 0 { + {{ p = props[0] }} + } + if p.ID == "" { + {{ p.ID = utils.RandomID() }} + } + +} + +templ Value(props ...ValueProps) { + {{ var p ValueProps }} + if len(props) > 0 { + {{ p = props[0] }} + } + if p.For == "" { + Error: SliderValue missing 'For' attribute. + } + + + +} + +templ Script() { + +} diff --git a/internal/ui/components/tagsinput/tagsinput.templ b/internal/ui/components/tagsinput/tagsinput.templ new file mode 100644 index 0000000..5d85274 --- /dev/null +++ b/internal/ui/components/tagsinput/tagsinput.templ @@ -0,0 +1,94 @@ +// templui component tagsinput - version: v0.101.0 installed by templui v0.101.0 +// 📚 Documentation: https://templui.io/docs/components/tags-input +package tagsinput + +import ( + "git.juancwu.dev/juancwu/budgething/internal/ui/components/badge" + "git.juancwu.dev/juancwu/budgething/internal/ui/components/input" + "git.juancwu.dev/juancwu/budgething/internal/utils" +) + +type Props struct { + ID string + Name string + Value []string + Form string + Placeholder string + Class string + HasError bool + Attributes templ.Attributes + Disabled bool + Readonly bool +} + +templ TagsInput(props ...Props) { + {{ var p Props }} + if len(props) > 0 { + {{ p = props[0] }} + } +
+
+ for _, tag := range p.Value { + @badge.Badge(badge.Props{ + Attributes: templ.Attributes{"data-tui-tagsinput-chip": ""}, + }) { + { tag } + + } + } +
+ @input.Input(input.Props{ + ID: p.ID, + Class: "border-0 shadow-none focus-visible:ring-0 h-auto py-0 px-0 bg-transparent rounded-none min-h-0 disabled:opacity-100 dark:bg-transparent", + Type: input.TypeText, + Placeholder: p.Placeholder, + Disabled: p.Disabled, + Readonly: p.Readonly, + Attributes: utils.MergeAttributes( + templ.Attributes{"data-tui-tagsinput-text-input": ""}, + p.Attributes, + ), + }) +
+ for _, tag := range p.Value { + + } +
+
+} + +templ Script() { + +} diff --git a/internal/ui/components/timepicker/timepicker.templ b/internal/ui/components/timepicker/timepicker.templ new file mode 100644 index 0000000..10c1ea2 --- /dev/null +++ b/internal/ui/components/timepicker/timepicker.templ @@ -0,0 +1,250 @@ +// templui component timepicker - version: v0.101.0 installed by templui v0.101.0 +// 📚 Documentation: https://templui.io/docs/components/time-picker +package timepicker + +import ( + "fmt" + "git.juancwu.dev/juancwu/budgething/internal/ui/components/button" + "git.juancwu.dev/juancwu/budgething/internal/ui/components/card" + "git.juancwu.dev/juancwu/budgething/internal/ui/components/icon" + "git.juancwu.dev/juancwu/budgething/internal/ui/components/popover" + "git.juancwu.dev/juancwu/budgething/internal/utils" + "strconv" + "time" +) + +type Props struct { + ID string + Class string + Attributes templ.Attributes + Name string + Form string + Value time.Time + MinTime time.Time + MaxTime time.Time + Step int + Use12Hours bool + AMLabel string + PMLabel string + Placeholder string + Disabled bool + HasError bool +} + +templ TimePicker(props ...Props) { + {{ + var p Props + if len(props) > 0 { + p = props[0] + } + if p.ID == "" { + p.ID = utils.RandomID() + } + if p.Name == "" { + p.Name = p.ID + } + if p.Placeholder == "" { + p.Placeholder = "Select time" + } + if p.AMLabel == "" { + p.AMLabel = "AM" + } + if p.PMLabel == "" { + p.PMLabel = "PM" + } + if p.Step <= 0 { + p.Step = 1 + } + + var contentID = p.ID + "-content" + var valueString string + if p.Value != (time.Time{}) { + valueString = p.Value.Format("15:04") + } + var minTimeString string + if p.MinTime != (time.Time{}) { + minTimeString = p.MinTime.Format("15:04") + } + var maxTimeString string + if p.MaxTime != (time.Time{}) { + maxTimeString = p.MaxTime.Format("15:04") + } + }} +
+ + @popover.Trigger(popover.TriggerProps{For: contentID}) { + @button.Button(button.Props{ + ID: p.ID, + Variant: button.VariantOutline, + Class: utils.TwMerge( + // Base styles matching input + "w-full h-9 px-3 py-1 text-base md:text-sm", + "flex items-center justify-between", + "rounded-md border border-input bg-transparent shadow-xs transition-[color,box-shadow] outline-none", + // Dark mode background + "dark:bg-input/30", + // Selection styles + "selection:bg-primary selection:text-primary-foreground", + // Focus styles + "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", + // Error/Invalid styles + "aria-invalid:ring-destructive/20 aria-invalid:border-destructive dark:aria-invalid:ring-destructive/40", + utils.If(p.HasError, "border-destructive ring-destructive/20 dark:ring-destructive/40"), + p.Class, + ), + Disabled: p.Disabled, + Attributes: utils.MergeAttributes(p.Attributes, templ.Attributes{ + "data-tui-timepicker": "true", + "data-tui-timepicker-use12hours": fmt.Sprintf("%t", p.Use12Hours), + "data-tui-timepicker-am-label": p.AMLabel, + "data-tui-timepicker-pm-label": p.PMLabel, + "data-tui-timepicker-placeholder": p.Placeholder, + "data-tui-timepicker-step": fmt.Sprintf("%d", p.Step), + "data-tui-timepicker-min-time": minTimeString, + "data-tui-timepicker-max-time": maxTimeString, + "aria-invalid": utils.If(p.HasError, "true"), + }), + }) { + + { p.Placeholder } + + + @icon.Clock(icon.Props{Size: 16}) + + } + } + @popover.Content(popover.ContentProps{ + ID: contentID, + Placement: popover.PlacementBottomStart, + Class: "p-0 w-80", + }) { + @card.Card(card.Props{ + Class: "border-0 shadow-none", + }) { + @card.Content(card.ContentProps{ + Class: "p-4", + }) { +
+ // Time selection grid +
+ // Hour selection +
+ +
+
+ if p.Use12Hours { + // 12-hour format: 12, 01-11 + + for hour := 1; hour <= 11; hour++ { + + } + } else { + // 24-hour format: 00-23 + for hour := 0; hour < 24; hour++ { + + } + } +
+
+
+ // Minute selection +
+ +
+
+ for minute := 0; minute < 60; minute += p.Step { + + } +
+
+
+
+ // AM/PM selector and action buttons +
+ if p.Use12Hours { +
+ + +
+ } else { +
+ } + @button.Button(button.Props{ + Type: "button", + Variant: button.VariantSecondary, + Size: button.SizeSm, + Attributes: templ.Attributes{ + "data-tui-timepicker-done": "true", + }, + }) { + Done + } +
+
+ } + } + } +
+} + +templ Script() { + +} diff --git a/internal/ui/components/tooltip/tooltip.templ b/internal/ui/components/tooltip/tooltip.templ new file mode 100644 index 0000000..53c5b81 --- /dev/null +++ b/internal/ui/components/tooltip/tooltip.templ @@ -0,0 +1,94 @@ +// templui component tooltip - version: v0.101.0 installed by templui v0.101.0 +// 📚 Documentation: https://templui.io/docs/components/tooltip +package tooltip + +import ( + "git.juancwu.dev/juancwu/budgething/internal/ui/components/popover" + "git.juancwu.dev/juancwu/budgething/internal/utils" +) + +type Position string + +const ( + PositionTop Position = "top" + PositionRight Position = "right" + PositionBottom Position = "bottom" + PositionLeft Position = "left" +) + +// Map tooltip positions to popover positions +func mapTooltipPositionToPopover(position Position) popover.Placement { + switch position { + case PositionTop: + return popover.PlacementTop + case PositionRight: + return popover.PlacementRight + case PositionBottom: + return popover.PlacementBottom + case PositionLeft: + return popover.PlacementLeft + default: + return popover.PlacementTop + } +} + +type Props struct { + ID string + Class string + Attributes templ.Attributes +} + +type TriggerProps struct { + ID string + Class string + Attributes templ.Attributes + For string +} + +type ContentProps struct { + ID string + Class string + Attributes templ.Attributes + ShowArrow bool + Position Position + HoverDelay int + HoverOutDelay int +} + +templ Tooltip(props ...Props) { + { children... } +} + +templ Trigger(props ...TriggerProps) { + {{ var p TriggerProps }} + if len(props) > 0 { + {{ p = props[0] }} + } + @popover.Trigger(popover.TriggerProps{ + ID: p.ID, + Class: p.Class, + Attributes: p.Attributes, + TriggerType: popover.TriggerTypeHover, + For: p.For, + }) { + { children... } + } +} + +templ Content(props ...ContentProps) { + {{ var p ContentProps }} + if len(props) > 0 { + {{ p = props[0] }} + } + @popover.Content(popover.ContentProps{ + ID: p.ID, + Class: utils.TwMerge("px-4 py-1 bg-foreground text-background [&_[data-tui-popover-arrow]]:!bg-foreground [&_[data-tui-popover-arrow]]:!border-0", p.Class), + Attributes: p.Attributes, + Placement: mapTooltipPositionToPopover(p.Position), + ShowArrow: p.ShowArrow, + HoverDelay: p.HoverDelay, + HoverOutDelay: p.HoverOutDelay, + }) { + { children... } + } +} diff --git a/internal/utils/templui.go b/internal/utils/templui.go new file mode 100644 index 0000000..93e0c9d --- /dev/null +++ b/internal/utils/templui.go @@ -0,0 +1,60 @@ +// templui util templui.go - version: v0.101.0 installed by templui v0.101.0 +package utils + +import ( + "fmt" + "time" + + "crypto/rand" + + "github.com/a-h/templ" + + twmerge "github.com/Oudwins/tailwind-merge-go" +) + +// TwMerge combines Tailwind classes and resolves conflicts. +// Example: "bg-red-500 hover:bg-blue-500", "bg-green-500" → "hover:bg-blue-500 bg-green-500" +func TwMerge(classes ...string) string { + return twmerge.Merge(classes...) +} + +// TwIf returns value if condition is true, otherwise an empty value of type T. +// Example: true, "bg-red-500" → "bg-red-500" +func If[T comparable](condition bool, value T) T { + var empty T + if condition { + return value + } + return empty +} + +// TwIfElse returns trueValue if condition is true, otherwise falseValue. +// Example: true, "bg-red-500", "bg-gray-300" → "bg-red-500" +func IfElse[T any](condition bool, trueValue T, falseValue T) T { + if condition { + return trueValue + } + return falseValue +} + +// MergeAttributes combines multiple Attributes into one. +// Example: MergeAttributes(attr1, attr2) → combined attributes +func MergeAttributes(attrs ...templ.Attributes) templ.Attributes { + merged := templ.Attributes{} + for _, attr := range attrs { + for k, v := range attr { + merged[k] = v + } + } + return merged +} + +// RandomID generates a random ID string. +// Example: RandomID() → "id-1a2b3c" +func RandomID() string { + return fmt.Sprintf("id-%s", rand.Text()) +} + +// ScriptVersion is a timestamp generated at app start for cache busting. +// Used in Script() templates to append ?v= to script URLs. +var ScriptVersion = fmt.Sprintf("%d", time.Now().Unix()) diff --git a/main.go b/main.go deleted file mode 100644 index 67d7299..0000000 --- a/main.go +++ /dev/null @@ -1,7 +0,0 @@ -package main - -import "fmt" - -func main() { - fmt.Println("BUDGETHING!!") -}