blue-chestnut-solar-expert 0.0.7 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/dist/cjs/eraser-icon.house-icon.icon-selector.map-draw.move-icon.octagon-minus-icon.search-icon.solar-expert.solar-system-form.entry.cjs.js.map +1 -1
  2. package/dist/cjs/eraser-icon_9.cjs.entry.js +28 -22
  3. package/dist/cjs/eraser-icon_9.cjs.entry.js.map +1 -1
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/solar-calculator.cjs.entry.js +1 -1
  6. package/dist/cjs/solar-calculator.cjs.entry.js.map +1 -1
  7. package/dist/cjs/solar-calculator.entry.cjs.js.map +1 -1
  8. package/dist/cjs/stencil-library.cjs.js +1 -1
  9. package/dist/collection/components/map-draw/map-draw.js +16 -11
  10. package/dist/collection/components/map-draw/map-draw.js.map +1 -1
  11. package/dist/collection/components/solar-expert/solar-expert.js +1 -1
  12. package/dist/collection/components/solar-expert/solar-expert.js.map +1 -1
  13. package/dist/collection/components/solar-system-form/solar-system-form.js +2 -2
  14. package/dist/collection/components/solar-system-form/solar-system-form.js.map +1 -1
  15. package/dist/collection/output.css +3 -295
  16. package/dist/components/eraser-icon.js +1 -1
  17. package/dist/components/house-icon.js +1 -1
  18. package/dist/components/icon-selector.js +1 -1
  19. package/dist/components/map-draw.js +1 -1
  20. package/dist/components/move-icon.js +1 -1
  21. package/dist/components/octagon-minus-icon.js +1 -1
  22. package/dist/components/p-BL_DlPdu.js +33 -0
  23. package/dist/components/p-BL_DlPdu.js.map +1 -0
  24. package/dist/components/{p-CzP6SYTZ.js → p-BcT1n-3A.js} +5 -5
  25. package/dist/components/{p-CzP6SYTZ.js.map → p-BcT1n-3A.js.map} +1 -1
  26. package/dist/components/p-CC3tp0bK.js +33 -0
  27. package/dist/components/p-CC3tp0bK.js.map +1 -0
  28. package/dist/components/{p-Cl0_Wuys.js → p-CtPeF0hC.js} +27 -22
  29. package/dist/components/p-CtPeF0hC.js.map +1 -0
  30. package/dist/components/p-D064AshY.js +33 -0
  31. package/dist/components/p-D064AshY.js.map +1 -0
  32. package/dist/components/p-DQwOnYzQ.js +33 -0
  33. package/dist/components/p-DQwOnYzQ.js.map +1 -0
  34. package/dist/components/p-DbEU_5GR.js +33 -0
  35. package/dist/components/p-DbEU_5GR.js.map +1 -0
  36. package/dist/components/p-Dv86mKXd.js +81 -0
  37. package/dist/components/p-Dv86mKXd.js.map +1 -0
  38. package/dist/components/search-icon.js +1 -1
  39. package/dist/components/solar-calculator.js +1 -1
  40. package/dist/components/solar-calculator.js.map +1 -1
  41. package/dist/components/solar-expert.js +10 -10
  42. package/dist/components/solar-expert.js.map +1 -1
  43. package/dist/components/solar-system-form.js +1 -1
  44. package/dist/esm/eraser-icon.house-icon.icon-selector.map-draw.move-icon.octagon-minus-icon.search-icon.solar-expert.solar-system-form.entry.js.map +1 -1
  45. package/dist/esm/eraser-icon_9.entry.js +28 -22
  46. package/dist/esm/eraser-icon_9.entry.js.map +1 -1
  47. package/dist/esm/loader.js +1 -1
  48. package/dist/esm/solar-calculator.entry.js +1 -1
  49. package/dist/esm/solar-calculator.entry.js.map +1 -1
  50. package/dist/esm/stencil-library.js +1 -1
  51. package/dist/stencil-library/eraser-icon.house-icon.icon-selector.map-draw.move-icon.octagon-minus-icon.search-icon.solar-expert.solar-system-form.entry.esm.js.map +1 -1
  52. package/dist/stencil-library/p-7512b392.entry.js +20 -0
  53. package/dist/stencil-library/p-7512b392.entry.js.map +1 -0
  54. package/dist/stencil-library/p-ded21f18.entry.js +32 -0
  55. package/dist/stencil-library/{p-114136e0.entry.js.map → p-ded21f18.entry.js.map} +1 -1
  56. package/dist/stencil-library/solar-calculator.entry.esm.js.map +1 -1
  57. package/dist/stencil-library/stencil-library.esm.js +1 -1
  58. package/package.json +1 -1
  59. package/dist/components/p-C1W188Ni.js +0 -81
  60. package/dist/components/p-C1W188Ni.js.map +0 -1
  61. package/dist/components/p-CPzvPKKZ.js +0 -33
  62. package/dist/components/p-CPzvPKKZ.js.map +0 -1
  63. package/dist/components/p-Ca4aCGPQ.js +0 -33
  64. package/dist/components/p-Ca4aCGPQ.js.map +0 -1
  65. package/dist/components/p-Cl0_Wuys.js.map +0 -1
  66. package/dist/components/p-DFkHeRrz.js +0 -33
  67. package/dist/components/p-DFkHeRrz.js.map +0 -1
  68. package/dist/components/p-Dpqxsv0f.js +0 -33
  69. package/dist/components/p-Dpqxsv0f.js.map +0 -1
  70. package/dist/components/p-KbJZx_Vg.js +0 -33
  71. package/dist/components/p-KbJZx_Vg.js.map +0 -1
  72. package/dist/stencil-library/p-114136e0.entry.js +0 -32
  73. package/dist/stencil-library/p-d3bbe397.entry.js +0 -20
  74. package/dist/stencil-library/p-d3bbe397.entry.js.map +0 -1
@@ -0,0 +1,20 @@
1
+ import{r as t,h as n,g as e,E as i}from"./p-D0YnIAAN.js";import{f as o,c as s,L as r}from"./p-DV0Qsxyh.js";const a='/*! tailwindcss v4.1.7 | MIT License | https://tailwindcss.com */\n@layer properties;\n@layer theme, base, components, utilities;\n@layer theme {\n :root, :host {\n --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",\n "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";\n --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",\n "Courier New", monospace;\n --color-red-500: oklch(63.7% 0.237 25.331);\n --color-green-600: oklch(62.7% 0.194 149.214);\n --color-blue-500: oklch(62.3% 0.214 259.815);\n --color-gray-50: oklch(98.5% 0.002 247.839);\n --color-gray-200: oklch(92.8% 0.006 264.531);\n --color-gray-300: oklch(87.2% 0.01 258.338);\n --color-gray-400: oklch(70.7% 0.022 261.325);\n --color-gray-500: oklch(55.1% 0.027 264.364);\n --color-gray-600: oklch(44.6% 0.03 256.802);\n --color-gray-700: oklch(37.3% 0.034 259.733);\n --color-gray-800: oklch(27.8% 0.033 256.848);\n --color-white: #fff;\n --spacing: 0.25rem;\n --container-2xl: 42rem;\n --container-3xl: 48rem;\n --text-sm: 0.875rem;\n --text-sm--line-height: calc(1.25 / 0.875);\n --text-lg: 1.125rem;\n --text-lg--line-height: calc(1.75 / 1.125);\n --text-xl: 1.25rem;\n --text-xl--line-height: calc(1.75 / 1.25);\n --text-2xl: 1.5rem;\n --text-2xl--line-height: calc(2 / 1.5);\n --text-3xl: 1.875rem;\n --text-3xl--line-height: calc(2.25 / 1.875);\n --font-weight-medium: 500;\n --font-weight-semibold: 600;\n --font-weight-bold: 700;\n --radius-lg: 0.5rem;\n --radius-xl: 0.75rem;\n --radius-2xl: 1rem;\n --radius-4xl: 2rem;\n --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);\n --animate-spin: spin 1s linear infinite;\n --default-transition-duration: 150ms;\n --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n --default-font-family: var(--font-sans);\n --default-mono-font-family: var(--font-mono);\n }\n}\n@layer base {\n *, ::after, ::before, ::backdrop, ::file-selector-button {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: 0 solid;\n }\n html, :host {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n tab-size: 4;\n font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");\n font-feature-settings: var(--default-font-feature-settings, normal);\n font-variation-settings: var(--default-font-variation-settings, normal);\n -webkit-tap-highlight-color: transparent;\n }\n hr {\n height: 0;\n color: inherit;\n border-top-width: 1px;\n }\n abbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n h1, h2, h3, h4, h5, h6 {\n font-size: inherit;\n font-weight: inherit;\n }\n a {\n color: inherit;\n -webkit-text-decoration: inherit;\n text-decoration: inherit;\n }\n b, strong {\n font-weight: bolder;\n }\n code, kbd, samp, pre {\n font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);\n font-feature-settings: var(--default-mono-font-feature-settings, normal);\n font-variation-settings: var(--default-mono-font-variation-settings, normal);\n font-size: 1em;\n }\n small {\n font-size: 80%;\n }\n sub, sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n sub {\n bottom: -0.25em;\n }\n sup {\n top: -0.5em;\n }\n table {\n text-indent: 0;\n border-color: inherit;\n border-collapse: collapse;\n }\n :-moz-focusring {\n outline: auto;\n }\n progress {\n vertical-align: baseline;\n }\n summary {\n display: list-item;\n }\n ol, ul, menu {\n list-style: none;\n }\n img, svg, video, canvas, audio, iframe, embed, object {\n display: block;\n vertical-align: middle;\n }\n img, video {\n max-width: 100%;\n height: auto;\n }\n button, input, select, optgroup, textarea, ::file-selector-button {\n font: inherit;\n font-feature-settings: inherit;\n font-variation-settings: inherit;\n letter-spacing: inherit;\n color: inherit;\n border-radius: 0;\n background-color: transparent;\n opacity: 1;\n }\n :where(select:is([multiple], [size])) optgroup {\n font-weight: bolder;\n }\n :where(select:is([multiple], [size])) optgroup option {\n padding-inline-start: 20px;\n }\n ::file-selector-button {\n margin-inline-end: 4px;\n }\n ::placeholder {\n opacity: 1;\n }\n @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {\n ::placeholder {\n color: currentcolor;\n @supports (color: color-mix(in lab, red, red)) {\n color: color-mix(in oklab, currentcolor 50%, transparent);\n }\n }\n }\n textarea {\n resize: vertical;\n }\n ::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n ::-webkit-date-and-time-value {\n min-height: 1lh;\n text-align: inherit;\n }\n ::-webkit-datetime-edit {\n display: inline-flex;\n }\n ::-webkit-datetime-edit-fields-wrapper {\n padding: 0;\n }\n ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {\n padding-block: 0;\n }\n :-moz-ui-invalid {\n box-shadow: none;\n }\n button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button {\n appearance: button;\n }\n ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {\n height: auto;\n }\n [hidden]:where(:not([hidden="until-found"])) {\n display: none !important;\n }\n}\n@layer utilities {\n .pointer-events-none {\n pointer-events: none;\n }\n .absolute {\n position: absolute;\n }\n .relative {\n position: relative;\n }\n .top-0 {\n top: calc(var(--spacing) * 0);\n }\n .top-1 {\n top: calc(var(--spacing) * 1);\n }\n .top-1\\/2 {\n top: calc(1/2 * 100%);\n }\n .bottom-full {\n bottom: 100%;\n }\n .left-0 {\n left: calc(var(--spacing) * 0);\n }\n .left-1 {\n left: calc(var(--spacing) * 1);\n }\n .left-1\\/2 {\n left: calc(1/2 * 100%);\n }\n .left-3 {\n left: calc(var(--spacing) * 3);\n }\n .z-1 {\n z-index: 1;\n }\n .z-10 {\n z-index: 10;\n }\n .z-20 {\n z-index: 20;\n }\n .m-auto {\n margin: auto;\n }\n .mt-1 {\n margin-top: calc(var(--spacing) * 1);\n }\n .mt-4 {\n margin-top: calc(var(--spacing) * 4);\n }\n .mb-1 {\n margin-bottom: calc(var(--spacing) * 1);\n }\n .mb-2 {\n margin-bottom: calc(var(--spacing) * 2);\n }\n .mb-4 {\n margin-bottom: calc(var(--spacing) * 4);\n }\n .block {\n display: block;\n }\n .flex {\n display: flex;\n }\n .grid {\n display: grid;\n }\n .table {\n display: table;\n }\n .h-5 {\n height: calc(var(--spacing) * 5);\n }\n .h-16 {\n height: calc(var(--spacing) * 16);\n }\n .h-48 {\n height: calc(var(--spacing) * 48);\n }\n .h-full {\n height: 100%;\n }\n .w-5 {\n width: calc(var(--spacing) * 5);\n }\n .w-16 {\n width: calc(var(--spacing) * 16);\n }\n .w-52 {\n width: calc(var(--spacing) * 52);\n }\n .w-64 {\n width: calc(var(--spacing) * 64);\n }\n .w-full {\n width: 100%;\n }\n .max-w-2xl {\n max-width: var(--container-2xl);\n }\n .flex-1 {\n flex: 1;\n }\n .border-collapse {\n border-collapse: collapse;\n }\n .-translate-x-1 {\n --tw-translate-x: calc(var(--spacing) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-x-1\\/2 {\n --tw-translate-x: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-y-1 {\n --tw-translate-y: calc(var(--spacing) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-y-1\\/2 {\n --tw-translate-y: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .transform {\n transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);\n }\n .animate-spin {\n animation: var(--animate-spin);\n }\n .cursor-help {\n cursor: help;\n }\n .resize {\n resize: both;\n }\n .grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n .flex-col {\n flex-direction: column;\n }\n .flex-row {\n flex-direction: row;\n }\n .items-center {\n align-items: center;\n }\n .items-start {\n align-items: flex-start;\n }\n .justify-between {\n justify-content: space-between;\n }\n .justify-center {\n justify-content: center;\n }\n .justify-start {\n justify-content: flex-start;\n }\n .gap-1 {\n gap: calc(var(--spacing) * 1);\n }\n .gap-2 {\n gap: calc(var(--spacing) * 2);\n }\n .gap-4 {\n gap: calc(var(--spacing) * 4);\n }\n .space-y-4 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .space-y-6 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .rounded-4xl {\n border-radius: var(--radius-4xl);\n }\n .rounded-full {\n border-radius: calc(infinity * 1px);\n }\n .rounded-lg {\n border-radius: var(--radius-lg);\n }\n .border {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n .border-t {\n border-top-style: var(--tw-border-style);\n border-top-width: 1px;\n }\n .border-t-2 {\n border-top-style: var(--tw-border-style);\n border-top-width: 2px;\n }\n .border-b-2 {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 2px;\n }\n .border-\\[\\#271200\\] {\n border-color: #271200;\n }\n .border-gray-200 {\n border-color: var(--color-gray-200);\n }\n .border-gray-300 {\n border-color: var(--color-gray-300);\n }\n .border-red-500 {\n border-color: var(--color-red-500);\n }\n .bg-\\[\\#271200\\] {\n background-color: #271200;\n }\n .bg-\\[\\#f3ebda\\] {\n background-color: #f3ebda;\n }\n .bg-gray-800 {\n background-color: var(--color-gray-800);\n }\n .bg-white {\n background-color: var(--color-white);\n }\n .p-2 {\n padding: calc(var(--spacing) * 2);\n }\n .p-3 {\n padding: calc(var(--spacing) * 3);\n }\n .p-4 {\n padding: calc(var(--spacing) * 4);\n }\n .p-6 {\n padding: calc(var(--spacing) * 6);\n }\n .px-4 {\n padding-inline: calc(var(--spacing) * 4);\n }\n .py-2 {\n padding-block: calc(var(--spacing) * 2);\n }\n .pt-4 {\n padding-top: calc(var(--spacing) * 4);\n }\n .pt-7 {\n padding-top: calc(var(--spacing) * 7);\n }\n .pr-4 {\n padding-right: calc(var(--spacing) * 4);\n }\n .pb-3 {\n padding-bottom: calc(var(--spacing) * 3);\n }\n .pl-10 {\n padding-left: calc(var(--spacing) * 10);\n }\n .text-center {\n text-align: center;\n }\n .text-2xl {\n font-size: var(--text-2xl);\n line-height: var(--tw-leading, var(--text-2xl--line-height));\n }\n .text-lg {\n font-size: var(--text-lg);\n line-height: var(--tw-leading, var(--text-lg--line-height));\n }\n .text-sm {\n font-size: var(--text-sm);\n line-height: var(--tw-leading, var(--text-sm--line-height));\n }\n .text-xl {\n font-size: var(--text-xl);\n line-height: var(--tw-leading, var(--text-xl--line-height));\n }\n .font-bold {\n --tw-font-weight: var(--font-weight-bold);\n font-weight: var(--font-weight-bold);\n }\n .font-medium {\n --tw-font-weight: var(--font-weight-medium);\n font-weight: var(--font-weight-medium);\n }\n .font-semibold {\n --tw-font-weight: var(--font-weight-semibold);\n font-weight: var(--font-weight-semibold);\n }\n .text-\\[\\#271200\\] {\n color: #271200;\n }\n .text-gray-400 {\n color: var(--color-gray-400);\n }\n .text-gray-500 {\n color: var(--color-gray-500);\n }\n .text-gray-600 {\n color: var(--color-gray-600);\n }\n .text-green-600 {\n color: var(--color-green-600);\n }\n .text-red-500 {\n color: var(--color-red-500);\n }\n .text-white {\n color: var(--color-white);\n }\n .underline {\n text-decoration-line: underline;\n }\n .opacity-0 {\n opacity: 0%;\n }\n .shadow {\n --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .outline {\n outline-style: var(--tw-outline-style);\n outline-width: 1px;\n }\n .transition-colors {\n transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-opacity {\n transition-property: opacity;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .duration-200 {\n --tw-duration: 200ms;\n transition-duration: 200ms;\n }\n .group-hover\\:opacity-100 {\n &:is(:where(.group):hover *) {\n @media (hover: hover) {\n opacity: 100%;\n }\n }\n }\n .hover\\:bg-\\[\\#964500\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #964500;\n }\n }\n }\n .focus\\:border-transparent {\n &:focus {\n border-color: transparent;\n }\n }\n .focus\\:ring-2 {\n &:focus {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n }\n .focus\\:ring-\\[\\#964500\\] {\n &:focus {\n --tw-ring-color: #964500;\n }\n }\n .focus\\:ring-blue-500 {\n &:focus {\n --tw-ring-color: var(--color-blue-500);\n }\n }\n .focus\\:outline-none {\n &:focus {\n --tw-outline-style: none;\n outline-style: none;\n }\n }\n .lg\\:gap-4 {\n @media (width >= 64rem) {\n gap: calc(var(--spacing) * 4);\n }\n }\n}\n@property --tw-translate-x {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-y {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-z {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-rotate-x {\n syntax: "*";\n inherits: false;\n}\n@property --tw-rotate-y {\n syntax: "*";\n inherits: false;\n}\n@property --tw-rotate-z {\n syntax: "*";\n inherits: false;\n}\n@property --tw-skew-x {\n syntax: "*";\n inherits: false;\n}\n@property --tw-skew-y {\n syntax: "*";\n inherits: false;\n}\n@property --tw-space-y-reverse {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-border-style {\n syntax: "*";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-font-weight {\n syntax: "*";\n inherits: false;\n}\n@property --tw-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-shadow-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-shadow-alpha {\n syntax: "<percentage>";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-inset-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-shadow-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-inset-shadow-alpha {\n syntax: "<percentage>";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-ring-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-ring-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-ring-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-inset-ring-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-ring-inset {\n syntax: "*";\n inherits: false;\n}\n@property --tw-ring-offset-width {\n syntax: "<length>";\n inherits: false;\n initial-value: 0px;\n}\n@property --tw-ring-offset-color {\n syntax: "*";\n inherits: false;\n initial-value: #fff;\n}\n@property --tw-ring-offset-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-outline-style {\n syntax: "*";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-duration {\n syntax: "*";\n inherits: false;\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n@layer properties {\n @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {\n *, ::before, ::after, ::backdrop {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-translate-z: 0;\n --tw-rotate-x: initial;\n --tw-rotate-y: initial;\n --tw-rotate-z: initial;\n --tw-skew-x: initial;\n --tw-skew-y: initial;\n --tw-space-y-reverse: 0;\n --tw-border-style: solid;\n --tw-font-weight: initial;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-color: initial;\n --tw-shadow-alpha: 100%;\n --tw-inset-shadow: 0 0 #0000;\n --tw-inset-shadow-color: initial;\n --tw-inset-shadow-alpha: 100%;\n --tw-ring-color: initial;\n --tw-ring-shadow: 0 0 #0000;\n --tw-inset-ring-color: initial;\n --tw-inset-ring-shadow: 0 0 #0000;\n --tw-ring-inset: initial;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-outline-style: solid;\n --tw-duration: initial;\n }\n }\n}\n';const l=class{constructor(n){t(this,n)}render(){return n("svg",{key:"0ee60a12625e2827dcbdad1b8756c9402da84954",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-eraser-icon lucide-eraser"},n("path",{key:"98080b66fe105b29ecb14d82bc8b18b296dab09f",d:"m7 21-4.3-4.3c-1-1-1-2.5 0-3.4l9.6-9.6c1-1 2.5-1 3.4 0l5.6 5.6c1 1 1 2.5 0 3.4L13 21"}),n("path",{key:"dd52fc8bc1f6f4bcea487a5509601c2add99d151",d:"M22 21H7"}),n("path",{key:"94fd0f7a4b8152101d5b6a613cca039497024de0",d:"m5 11 9 9"}))}};l.style=a;const c='/*! tailwindcss v4.1.7 | MIT License | https://tailwindcss.com */\n@layer properties;\n@layer theme, base, components, utilities;\n@layer theme {\n :root, :host {\n --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",\n "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";\n --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",\n "Courier New", monospace;\n --color-red-500: oklch(63.7% 0.237 25.331);\n --color-green-600: oklch(62.7% 0.194 149.214);\n --color-blue-500: oklch(62.3% 0.214 259.815);\n --color-gray-50: oklch(98.5% 0.002 247.839);\n --color-gray-200: oklch(92.8% 0.006 264.531);\n --color-gray-300: oklch(87.2% 0.01 258.338);\n --color-gray-400: oklch(70.7% 0.022 261.325);\n --color-gray-500: oklch(55.1% 0.027 264.364);\n --color-gray-600: oklch(44.6% 0.03 256.802);\n --color-gray-700: oklch(37.3% 0.034 259.733);\n --color-gray-800: oklch(27.8% 0.033 256.848);\n --color-white: #fff;\n --spacing: 0.25rem;\n --container-2xl: 42rem;\n --container-3xl: 48rem;\n --text-sm: 0.875rem;\n --text-sm--line-height: calc(1.25 / 0.875);\n --text-lg: 1.125rem;\n --text-lg--line-height: calc(1.75 / 1.125);\n --text-xl: 1.25rem;\n --text-xl--line-height: calc(1.75 / 1.25);\n --text-2xl: 1.5rem;\n --text-2xl--line-height: calc(2 / 1.5);\n --text-3xl: 1.875rem;\n --text-3xl--line-height: calc(2.25 / 1.875);\n --font-weight-medium: 500;\n --font-weight-semibold: 600;\n --font-weight-bold: 700;\n --radius-lg: 0.5rem;\n --radius-xl: 0.75rem;\n --radius-2xl: 1rem;\n --radius-4xl: 2rem;\n --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);\n --animate-spin: spin 1s linear infinite;\n --default-transition-duration: 150ms;\n --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n --default-font-family: var(--font-sans);\n --default-mono-font-family: var(--font-mono);\n }\n}\n@layer base {\n *, ::after, ::before, ::backdrop, ::file-selector-button {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: 0 solid;\n }\n html, :host {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n tab-size: 4;\n font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");\n font-feature-settings: var(--default-font-feature-settings, normal);\n font-variation-settings: var(--default-font-variation-settings, normal);\n -webkit-tap-highlight-color: transparent;\n }\n hr {\n height: 0;\n color: inherit;\n border-top-width: 1px;\n }\n abbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n h1, h2, h3, h4, h5, h6 {\n font-size: inherit;\n font-weight: inherit;\n }\n a {\n color: inherit;\n -webkit-text-decoration: inherit;\n text-decoration: inherit;\n }\n b, strong {\n font-weight: bolder;\n }\n code, kbd, samp, pre {\n font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);\n font-feature-settings: var(--default-mono-font-feature-settings, normal);\n font-variation-settings: var(--default-mono-font-variation-settings, normal);\n font-size: 1em;\n }\n small {\n font-size: 80%;\n }\n sub, sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n sub {\n bottom: -0.25em;\n }\n sup {\n top: -0.5em;\n }\n table {\n text-indent: 0;\n border-color: inherit;\n border-collapse: collapse;\n }\n :-moz-focusring {\n outline: auto;\n }\n progress {\n vertical-align: baseline;\n }\n summary {\n display: list-item;\n }\n ol, ul, menu {\n list-style: none;\n }\n img, svg, video, canvas, audio, iframe, embed, object {\n display: block;\n vertical-align: middle;\n }\n img, video {\n max-width: 100%;\n height: auto;\n }\n button, input, select, optgroup, textarea, ::file-selector-button {\n font: inherit;\n font-feature-settings: inherit;\n font-variation-settings: inherit;\n letter-spacing: inherit;\n color: inherit;\n border-radius: 0;\n background-color: transparent;\n opacity: 1;\n }\n :where(select:is([multiple], [size])) optgroup {\n font-weight: bolder;\n }\n :where(select:is([multiple], [size])) optgroup option {\n padding-inline-start: 20px;\n }\n ::file-selector-button {\n margin-inline-end: 4px;\n }\n ::placeholder {\n opacity: 1;\n }\n @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {\n ::placeholder {\n color: currentcolor;\n @supports (color: color-mix(in lab, red, red)) {\n color: color-mix(in oklab, currentcolor 50%, transparent);\n }\n }\n }\n textarea {\n resize: vertical;\n }\n ::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n ::-webkit-date-and-time-value {\n min-height: 1lh;\n text-align: inherit;\n }\n ::-webkit-datetime-edit {\n display: inline-flex;\n }\n ::-webkit-datetime-edit-fields-wrapper {\n padding: 0;\n }\n ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {\n padding-block: 0;\n }\n :-moz-ui-invalid {\n box-shadow: none;\n }\n button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button {\n appearance: button;\n }\n ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {\n height: auto;\n }\n [hidden]:where(:not([hidden="until-found"])) {\n display: none !important;\n }\n}\n@layer utilities {\n .pointer-events-none {\n pointer-events: none;\n }\n .absolute {\n position: absolute;\n }\n .relative {\n position: relative;\n }\n .top-0 {\n top: calc(var(--spacing) * 0);\n }\n .top-1 {\n top: calc(var(--spacing) * 1);\n }\n .top-1\\/2 {\n top: calc(1/2 * 100%);\n }\n .bottom-full {\n bottom: 100%;\n }\n .left-0 {\n left: calc(var(--spacing) * 0);\n }\n .left-1 {\n left: calc(var(--spacing) * 1);\n }\n .left-1\\/2 {\n left: calc(1/2 * 100%);\n }\n .left-3 {\n left: calc(var(--spacing) * 3);\n }\n .z-1 {\n z-index: 1;\n }\n .z-10 {\n z-index: 10;\n }\n .z-20 {\n z-index: 20;\n }\n .m-auto {\n margin: auto;\n }\n .mt-1 {\n margin-top: calc(var(--spacing) * 1);\n }\n .mt-4 {\n margin-top: calc(var(--spacing) * 4);\n }\n .mb-1 {\n margin-bottom: calc(var(--spacing) * 1);\n }\n .mb-2 {\n margin-bottom: calc(var(--spacing) * 2);\n }\n .mb-4 {\n margin-bottom: calc(var(--spacing) * 4);\n }\n .block {\n display: block;\n }\n .flex {\n display: flex;\n }\n .grid {\n display: grid;\n }\n .table {\n display: table;\n }\n .h-5 {\n height: calc(var(--spacing) * 5);\n }\n .h-16 {\n height: calc(var(--spacing) * 16);\n }\n .h-48 {\n height: calc(var(--spacing) * 48);\n }\n .h-full {\n height: 100%;\n }\n .w-5 {\n width: calc(var(--spacing) * 5);\n }\n .w-16 {\n width: calc(var(--spacing) * 16);\n }\n .w-52 {\n width: calc(var(--spacing) * 52);\n }\n .w-64 {\n width: calc(var(--spacing) * 64);\n }\n .w-full {\n width: 100%;\n }\n .max-w-2xl {\n max-width: var(--container-2xl);\n }\n .flex-1 {\n flex: 1;\n }\n .border-collapse {\n border-collapse: collapse;\n }\n .-translate-x-1 {\n --tw-translate-x: calc(var(--spacing) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-x-1\\/2 {\n --tw-translate-x: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-y-1 {\n --tw-translate-y: calc(var(--spacing) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-y-1\\/2 {\n --tw-translate-y: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .transform {\n transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);\n }\n .animate-spin {\n animation: var(--animate-spin);\n }\n .cursor-help {\n cursor: help;\n }\n .resize {\n resize: both;\n }\n .grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n .flex-col {\n flex-direction: column;\n }\n .flex-row {\n flex-direction: row;\n }\n .items-center {\n align-items: center;\n }\n .items-start {\n align-items: flex-start;\n }\n .justify-between {\n justify-content: space-between;\n }\n .justify-center {\n justify-content: center;\n }\n .justify-start {\n justify-content: flex-start;\n }\n .gap-1 {\n gap: calc(var(--spacing) * 1);\n }\n .gap-2 {\n gap: calc(var(--spacing) * 2);\n }\n .gap-4 {\n gap: calc(var(--spacing) * 4);\n }\n .space-y-4 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .space-y-6 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .rounded-4xl {\n border-radius: var(--radius-4xl);\n }\n .rounded-full {\n border-radius: calc(infinity * 1px);\n }\n .rounded-lg {\n border-radius: var(--radius-lg);\n }\n .border {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n .border-t {\n border-top-style: var(--tw-border-style);\n border-top-width: 1px;\n }\n .border-t-2 {\n border-top-style: var(--tw-border-style);\n border-top-width: 2px;\n }\n .border-b-2 {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 2px;\n }\n .border-\\[\\#271200\\] {\n border-color: #271200;\n }\n .border-gray-200 {\n border-color: var(--color-gray-200);\n }\n .border-gray-300 {\n border-color: var(--color-gray-300);\n }\n .border-red-500 {\n border-color: var(--color-red-500);\n }\n .bg-\\[\\#271200\\] {\n background-color: #271200;\n }\n .bg-\\[\\#f3ebda\\] {\n background-color: #f3ebda;\n }\n .bg-gray-800 {\n background-color: var(--color-gray-800);\n }\n .bg-white {\n background-color: var(--color-white);\n }\n .p-2 {\n padding: calc(var(--spacing) * 2);\n }\n .p-3 {\n padding: calc(var(--spacing) * 3);\n }\n .p-4 {\n padding: calc(var(--spacing) * 4);\n }\n .p-6 {\n padding: calc(var(--spacing) * 6);\n }\n .px-4 {\n padding-inline: calc(var(--spacing) * 4);\n }\n .py-2 {\n padding-block: calc(var(--spacing) * 2);\n }\n .pt-4 {\n padding-top: calc(var(--spacing) * 4);\n }\n .pt-7 {\n padding-top: calc(var(--spacing) * 7);\n }\n .pr-4 {\n padding-right: calc(var(--spacing) * 4);\n }\n .pb-3 {\n padding-bottom: calc(var(--spacing) * 3);\n }\n .pl-10 {\n padding-left: calc(var(--spacing) * 10);\n }\n .text-center {\n text-align: center;\n }\n .text-2xl {\n font-size: var(--text-2xl);\n line-height: var(--tw-leading, var(--text-2xl--line-height));\n }\n .text-lg {\n font-size: var(--text-lg);\n line-height: var(--tw-leading, var(--text-lg--line-height));\n }\n .text-sm {\n font-size: var(--text-sm);\n line-height: var(--tw-leading, var(--text-sm--line-height));\n }\n .text-xl {\n font-size: var(--text-xl);\n line-height: var(--tw-leading, var(--text-xl--line-height));\n }\n .font-bold {\n --tw-font-weight: var(--font-weight-bold);\n font-weight: var(--font-weight-bold);\n }\n .font-medium {\n --tw-font-weight: var(--font-weight-medium);\n font-weight: var(--font-weight-medium);\n }\n .font-semibold {\n --tw-font-weight: var(--font-weight-semibold);\n font-weight: var(--font-weight-semibold);\n }\n .text-\\[\\#271200\\] {\n color: #271200;\n }\n .text-gray-400 {\n color: var(--color-gray-400);\n }\n .text-gray-500 {\n color: var(--color-gray-500);\n }\n .text-gray-600 {\n color: var(--color-gray-600);\n }\n .text-green-600 {\n color: var(--color-green-600);\n }\n .text-red-500 {\n color: var(--color-red-500);\n }\n .text-white {\n color: var(--color-white);\n }\n .underline {\n text-decoration-line: underline;\n }\n .opacity-0 {\n opacity: 0%;\n }\n .shadow {\n --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .outline {\n outline-style: var(--tw-outline-style);\n outline-width: 1px;\n }\n .transition-colors {\n transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-opacity {\n transition-property: opacity;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .duration-200 {\n --tw-duration: 200ms;\n transition-duration: 200ms;\n }\n .group-hover\\:opacity-100 {\n &:is(:where(.group):hover *) {\n @media (hover: hover) {\n opacity: 100%;\n }\n }\n }\n .hover\\:bg-\\[\\#964500\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #964500;\n }\n }\n }\n .focus\\:border-transparent {\n &:focus {\n border-color: transparent;\n }\n }\n .focus\\:ring-2 {\n &:focus {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n }\n .focus\\:ring-\\[\\#964500\\] {\n &:focus {\n --tw-ring-color: #964500;\n }\n }\n .focus\\:ring-blue-500 {\n &:focus {\n --tw-ring-color: var(--color-blue-500);\n }\n }\n .focus\\:outline-none {\n &:focus {\n --tw-outline-style: none;\n outline-style: none;\n }\n }\n .lg\\:gap-4 {\n @media (width >= 64rem) {\n gap: calc(var(--spacing) * 4);\n }\n }\n}\n@property --tw-translate-x {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-y {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-z {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-rotate-x {\n syntax: "*";\n inherits: false;\n}\n@property --tw-rotate-y {\n syntax: "*";\n inherits: false;\n}\n@property --tw-rotate-z {\n syntax: "*";\n inherits: false;\n}\n@property --tw-skew-x {\n syntax: "*";\n inherits: false;\n}\n@property --tw-skew-y {\n syntax: "*";\n inherits: false;\n}\n@property --tw-space-y-reverse {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-border-style {\n syntax: "*";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-font-weight {\n syntax: "*";\n inherits: false;\n}\n@property --tw-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-shadow-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-shadow-alpha {\n syntax: "<percentage>";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-inset-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-shadow-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-inset-shadow-alpha {\n syntax: "<percentage>";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-ring-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-ring-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-ring-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-inset-ring-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-ring-inset {\n syntax: "*";\n inherits: false;\n}\n@property --tw-ring-offset-width {\n syntax: "<length>";\n inherits: false;\n initial-value: 0px;\n}\n@property --tw-ring-offset-color {\n syntax: "*";\n inherits: false;\n initial-value: #fff;\n}\n@property --tw-ring-offset-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-outline-style {\n syntax: "*";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-duration {\n syntax: "*";\n inherits: false;\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n@layer properties {\n @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {\n *, ::before, ::after, ::backdrop {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-translate-z: 0;\n --tw-rotate-x: initial;\n --tw-rotate-y: initial;\n --tw-rotate-z: initial;\n --tw-skew-x: initial;\n --tw-skew-y: initial;\n --tw-space-y-reverse: 0;\n --tw-border-style: solid;\n --tw-font-weight: initial;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-color: initial;\n --tw-shadow-alpha: 100%;\n --tw-inset-shadow: 0 0 #0000;\n --tw-inset-shadow-color: initial;\n --tw-inset-shadow-alpha: 100%;\n --tw-ring-color: initial;\n --tw-ring-shadow: 0 0 #0000;\n --tw-inset-ring-color: initial;\n --tw-inset-ring-shadow: 0 0 #0000;\n --tw-ring-inset: initial;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-outline-style: solid;\n --tw-duration: initial;\n }\n }\n}\n';const h=class{constructor(n){t(this,n)}render(){return n("svg",{key:"d0b1e07fb7b1a1da92b5d48004ac151abfd44677",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-house-icon lucide-house"},n("path",{key:"58ed725ac3227272ec36bc52b41c9e207af23073",d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"}),n("path",{key:"7bd219ffb3c88c8ec1433cec54744b76c02cfd01",d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}))}};h.style=c;const f='/*! tailwindcss v4.1.7 | MIT License | https://tailwindcss.com */\n@layer properties;\n@layer theme, base, components, utilities;\n@layer theme {\n :root, :host {\n --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",\n "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";\n --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",\n "Courier New", monospace;\n --color-red-500: oklch(63.7% 0.237 25.331);\n --color-green-600: oklch(62.7% 0.194 149.214);\n --color-blue-500: oklch(62.3% 0.214 259.815);\n --color-gray-50: oklch(98.5% 0.002 247.839);\n --color-gray-200: oklch(92.8% 0.006 264.531);\n --color-gray-300: oklch(87.2% 0.01 258.338);\n --color-gray-400: oklch(70.7% 0.022 261.325);\n --color-gray-500: oklch(55.1% 0.027 264.364);\n --color-gray-600: oklch(44.6% 0.03 256.802);\n --color-gray-700: oklch(37.3% 0.034 259.733);\n --color-gray-800: oklch(27.8% 0.033 256.848);\n --color-white: #fff;\n --spacing: 0.25rem;\n --container-2xl: 42rem;\n --container-3xl: 48rem;\n --text-sm: 0.875rem;\n --text-sm--line-height: calc(1.25 / 0.875);\n --text-lg: 1.125rem;\n --text-lg--line-height: calc(1.75 / 1.125);\n --text-xl: 1.25rem;\n --text-xl--line-height: calc(1.75 / 1.25);\n --text-2xl: 1.5rem;\n --text-2xl--line-height: calc(2 / 1.5);\n --text-3xl: 1.875rem;\n --text-3xl--line-height: calc(2.25 / 1.875);\n --font-weight-medium: 500;\n --font-weight-semibold: 600;\n --font-weight-bold: 700;\n --radius-lg: 0.5rem;\n --radius-xl: 0.75rem;\n --radius-2xl: 1rem;\n --radius-4xl: 2rem;\n --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);\n --animate-spin: spin 1s linear infinite;\n --default-transition-duration: 150ms;\n --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n --default-font-family: var(--font-sans);\n --default-mono-font-family: var(--font-mono);\n }\n}\n@layer base {\n *, ::after, ::before, ::backdrop, ::file-selector-button {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: 0 solid;\n }\n html, :host {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n tab-size: 4;\n font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");\n font-feature-settings: var(--default-font-feature-settings, normal);\n font-variation-settings: var(--default-font-variation-settings, normal);\n -webkit-tap-highlight-color: transparent;\n }\n hr {\n height: 0;\n color: inherit;\n border-top-width: 1px;\n }\n abbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n h1, h2, h3, h4, h5, h6 {\n font-size: inherit;\n font-weight: inherit;\n }\n a {\n color: inherit;\n -webkit-text-decoration: inherit;\n text-decoration: inherit;\n }\n b, strong {\n font-weight: bolder;\n }\n code, kbd, samp, pre {\n font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);\n font-feature-settings: var(--default-mono-font-feature-settings, normal);\n font-variation-settings: var(--default-mono-font-variation-settings, normal);\n font-size: 1em;\n }\n small {\n font-size: 80%;\n }\n sub, sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n sub {\n bottom: -0.25em;\n }\n sup {\n top: -0.5em;\n }\n table {\n text-indent: 0;\n border-color: inherit;\n border-collapse: collapse;\n }\n :-moz-focusring {\n outline: auto;\n }\n progress {\n vertical-align: baseline;\n }\n summary {\n display: list-item;\n }\n ol, ul, menu {\n list-style: none;\n }\n img, svg, video, canvas, audio, iframe, embed, object {\n display: block;\n vertical-align: middle;\n }\n img, video {\n max-width: 100%;\n height: auto;\n }\n button, input, select, optgroup, textarea, ::file-selector-button {\n font: inherit;\n font-feature-settings: inherit;\n font-variation-settings: inherit;\n letter-spacing: inherit;\n color: inherit;\n border-radius: 0;\n background-color: transparent;\n opacity: 1;\n }\n :where(select:is([multiple], [size])) optgroup {\n font-weight: bolder;\n }\n :where(select:is([multiple], [size])) optgroup option {\n padding-inline-start: 20px;\n }\n ::file-selector-button {\n margin-inline-end: 4px;\n }\n ::placeholder {\n opacity: 1;\n }\n @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {\n ::placeholder {\n color: currentcolor;\n @supports (color: color-mix(in lab, red, red)) {\n color: color-mix(in oklab, currentcolor 50%, transparent);\n }\n }\n }\n textarea {\n resize: vertical;\n }\n ::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n ::-webkit-date-and-time-value {\n min-height: 1lh;\n text-align: inherit;\n }\n ::-webkit-datetime-edit {\n display: inline-flex;\n }\n ::-webkit-datetime-edit-fields-wrapper {\n padding: 0;\n }\n ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {\n padding-block: 0;\n }\n :-moz-ui-invalid {\n box-shadow: none;\n }\n button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button {\n appearance: button;\n }\n ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {\n height: auto;\n }\n [hidden]:where(:not([hidden="until-found"])) {\n display: none !important;\n }\n}\n@layer utilities {\n .pointer-events-none {\n pointer-events: none;\n }\n .absolute {\n position: absolute;\n }\n .relative {\n position: relative;\n }\n .top-0 {\n top: calc(var(--spacing) * 0);\n }\n .top-1 {\n top: calc(var(--spacing) * 1);\n }\n .top-1\\/2 {\n top: calc(1/2 * 100%);\n }\n .bottom-full {\n bottom: 100%;\n }\n .left-0 {\n left: calc(var(--spacing) * 0);\n }\n .left-1 {\n left: calc(var(--spacing) * 1);\n }\n .left-1\\/2 {\n left: calc(1/2 * 100%);\n }\n .left-3 {\n left: calc(var(--spacing) * 3);\n }\n .z-1 {\n z-index: 1;\n }\n .z-10 {\n z-index: 10;\n }\n .z-20 {\n z-index: 20;\n }\n .m-auto {\n margin: auto;\n }\n .mt-1 {\n margin-top: calc(var(--spacing) * 1);\n }\n .mt-4 {\n margin-top: calc(var(--spacing) * 4);\n }\n .mb-1 {\n margin-bottom: calc(var(--spacing) * 1);\n }\n .mb-2 {\n margin-bottom: calc(var(--spacing) * 2);\n }\n .mb-4 {\n margin-bottom: calc(var(--spacing) * 4);\n }\n .block {\n display: block;\n }\n .flex {\n display: flex;\n }\n .grid {\n display: grid;\n }\n .table {\n display: table;\n }\n .h-5 {\n height: calc(var(--spacing) * 5);\n }\n .h-16 {\n height: calc(var(--spacing) * 16);\n }\n .h-48 {\n height: calc(var(--spacing) * 48);\n }\n .h-full {\n height: 100%;\n }\n .w-5 {\n width: calc(var(--spacing) * 5);\n }\n .w-16 {\n width: calc(var(--spacing) * 16);\n }\n .w-52 {\n width: calc(var(--spacing) * 52);\n }\n .w-64 {\n width: calc(var(--spacing) * 64);\n }\n .w-full {\n width: 100%;\n }\n .max-w-2xl {\n max-width: var(--container-2xl);\n }\n .flex-1 {\n flex: 1;\n }\n .border-collapse {\n border-collapse: collapse;\n }\n .-translate-x-1 {\n --tw-translate-x: calc(var(--spacing) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-x-1\\/2 {\n --tw-translate-x: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-y-1 {\n --tw-translate-y: calc(var(--spacing) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-y-1\\/2 {\n --tw-translate-y: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .transform {\n transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);\n }\n .animate-spin {\n animation: var(--animate-spin);\n }\n .cursor-help {\n cursor: help;\n }\n .resize {\n resize: both;\n }\n .grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n .flex-col {\n flex-direction: column;\n }\n .flex-row {\n flex-direction: row;\n }\n .items-center {\n align-items: center;\n }\n .items-start {\n align-items: flex-start;\n }\n .justify-between {\n justify-content: space-between;\n }\n .justify-center {\n justify-content: center;\n }\n .justify-start {\n justify-content: flex-start;\n }\n .gap-1 {\n gap: calc(var(--spacing) * 1);\n }\n .gap-2 {\n gap: calc(var(--spacing) * 2);\n }\n .gap-4 {\n gap: calc(var(--spacing) * 4);\n }\n .space-y-4 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .space-y-6 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .rounded-4xl {\n border-radius: var(--radius-4xl);\n }\n .rounded-full {\n border-radius: calc(infinity * 1px);\n }\n .rounded-lg {\n border-radius: var(--radius-lg);\n }\n .border {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n .border-t {\n border-top-style: var(--tw-border-style);\n border-top-width: 1px;\n }\n .border-t-2 {\n border-top-style: var(--tw-border-style);\n border-top-width: 2px;\n }\n .border-b-2 {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 2px;\n }\n .border-\\[\\#271200\\] {\n border-color: #271200;\n }\n .border-gray-200 {\n border-color: var(--color-gray-200);\n }\n .border-gray-300 {\n border-color: var(--color-gray-300);\n }\n .border-red-500 {\n border-color: var(--color-red-500);\n }\n .bg-\\[\\#271200\\] {\n background-color: #271200;\n }\n .bg-\\[\\#f3ebda\\] {\n background-color: #f3ebda;\n }\n .bg-gray-800 {\n background-color: var(--color-gray-800);\n }\n .bg-white {\n background-color: var(--color-white);\n }\n .p-2 {\n padding: calc(var(--spacing) * 2);\n }\n .p-3 {\n padding: calc(var(--spacing) * 3);\n }\n .p-4 {\n padding: calc(var(--spacing) * 4);\n }\n .p-6 {\n padding: calc(var(--spacing) * 6);\n }\n .px-4 {\n padding-inline: calc(var(--spacing) * 4);\n }\n .py-2 {\n padding-block: calc(var(--spacing) * 2);\n }\n .pt-4 {\n padding-top: calc(var(--spacing) * 4);\n }\n .pt-7 {\n padding-top: calc(var(--spacing) * 7);\n }\n .pr-4 {\n padding-right: calc(var(--spacing) * 4);\n }\n .pb-3 {\n padding-bottom: calc(var(--spacing) * 3);\n }\n .pl-10 {\n padding-left: calc(var(--spacing) * 10);\n }\n .text-center {\n text-align: center;\n }\n .text-2xl {\n font-size: var(--text-2xl);\n line-height: var(--tw-leading, var(--text-2xl--line-height));\n }\n .text-lg {\n font-size: var(--text-lg);\n line-height: var(--tw-leading, var(--text-lg--line-height));\n }\n .text-sm {\n font-size: var(--text-sm);\n line-height: var(--tw-leading, var(--text-sm--line-height));\n }\n .text-xl {\n font-size: var(--text-xl);\n line-height: var(--tw-leading, var(--text-xl--line-height));\n }\n .font-bold {\n --tw-font-weight: var(--font-weight-bold);\n font-weight: var(--font-weight-bold);\n }\n .font-medium {\n --tw-font-weight: var(--font-weight-medium);\n font-weight: var(--font-weight-medium);\n }\n .font-semibold {\n --tw-font-weight: var(--font-weight-semibold);\n font-weight: var(--font-weight-semibold);\n }\n .text-\\[\\#271200\\] {\n color: #271200;\n }\n .text-gray-400 {\n color: var(--color-gray-400);\n }\n .text-gray-500 {\n color: var(--color-gray-500);\n }\n .text-gray-600 {\n color: var(--color-gray-600);\n }\n .text-green-600 {\n color: var(--color-green-600);\n }\n .text-red-500 {\n color: var(--color-red-500);\n }\n .text-white {\n color: var(--color-white);\n }\n .underline {\n text-decoration-line: underline;\n }\n .opacity-0 {\n opacity: 0%;\n }\n .shadow {\n --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .outline {\n outline-style: var(--tw-outline-style);\n outline-width: 1px;\n }\n .transition-colors {\n transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-opacity {\n transition-property: opacity;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .duration-200 {\n --tw-duration: 200ms;\n transition-duration: 200ms;\n }\n .group-hover\\:opacity-100 {\n &:is(:where(.group):hover *) {\n @media (hover: hover) {\n opacity: 100%;\n }\n }\n }\n .hover\\:bg-\\[\\#964500\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #964500;\n }\n }\n }\n .focus\\:border-transparent {\n &:focus {\n border-color: transparent;\n }\n }\n .focus\\:ring-2 {\n &:focus {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n }\n .focus\\:ring-\\[\\#964500\\] {\n &:focus {\n --tw-ring-color: #964500;\n }\n }\n .focus\\:ring-blue-500 {\n &:focus {\n --tw-ring-color: var(--color-blue-500);\n }\n }\n .focus\\:outline-none {\n &:focus {\n --tw-outline-style: none;\n outline-style: none;\n }\n }\n .lg\\:gap-4 {\n @media (width >= 64rem) {\n gap: calc(var(--spacing) * 4);\n }\n }\n}\n@property --tw-translate-x {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-y {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-z {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-rotate-x {\n syntax: "*";\n inherits: false;\n}\n@property --tw-rotate-y {\n syntax: "*";\n inherits: false;\n}\n@property --tw-rotate-z {\n syntax: "*";\n inherits: false;\n}\n@property --tw-skew-x {\n syntax: "*";\n inherits: false;\n}\n@property --tw-skew-y {\n syntax: "*";\n inherits: false;\n}\n@property --tw-space-y-reverse {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-border-style {\n syntax: "*";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-font-weight {\n syntax: "*";\n inherits: false;\n}\n@property --tw-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-shadow-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-shadow-alpha {\n syntax: "<percentage>";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-inset-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-shadow-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-inset-shadow-alpha {\n syntax: "<percentage>";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-ring-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-ring-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-ring-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-inset-ring-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-ring-inset {\n syntax: "*";\n inherits: false;\n}\n@property --tw-ring-offset-width {\n syntax: "<length>";\n inherits: false;\n initial-value: 0px;\n}\n@property --tw-ring-offset-color {\n syntax: "*";\n inherits: false;\n initial-value: #fff;\n}\n@property --tw-ring-offset-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-outline-style {\n syntax: "*";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-duration {\n syntax: "*";\n inherits: false;\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n@layer properties {\n @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {\n *, ::before, ::after, ::backdrop {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-translate-z: 0;\n --tw-rotate-x: initial;\n --tw-rotate-y: initial;\n --tw-rotate-z: initial;\n --tw-skew-x: initial;\n --tw-skew-y: initial;\n --tw-space-y-reverse: 0;\n --tw-border-style: solid;\n --tw-font-weight: initial;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-color: initial;\n --tw-shadow-alpha: 100%;\n --tw-inset-shadow: 0 0 #0000;\n --tw-inset-shadow-color: initial;\n --tw-inset-shadow-alpha: 100%;\n --tw-ring-color: initial;\n --tw-ring-shadow: 0 0 #0000;\n --tw-inset-ring-color: initial;\n --tw-inset-ring-shadow: 0 0 #0000;\n --tw-ring-inset: initial;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-outline-style: solid;\n --tw-duration: initial;\n }\n }\n}\n';const d=class{constructor(n){t(this,n)}name;render(){if(this.name==="search"){return n("search-icon",null)}if(this.name==="house"){return n("house-icon",null)}if(this.name==="move"){return n("move-icon",null)}if(this.name==="octagon-minus"){return n("octagon-minus-icon",null)}if(this.name==="eraser"){return n("eraser-icon",null)}return n("div",null,"Icon ",this.name)}};d.style=f;function u(t,n,e){if(!e){e=document.createElement("canvas")}e.width=t.width;e.height=t.height;const i=t.width/e.width;const o=t.height/e.height;const s=e.getContext("2d");const r=s.getImageData(0,0,e.width,e.height);for(let n=0;n<e.height;n++){for(let s=0;s<e.width;s++){const a=Math.floor(n*o)*t.width+Math.floor(s*i);const l=n*e.width*4+s*4;const c=.65;r.data[l+0]=Math.round(t.rasters[0][a]*c);r.data[l+1]=Math.round(t.rasters[1][a]*c);r.data[l+2]=Math.round(t.rasters[2][a]*c);r.data[l+3]=255}}s.putImageData(r,0,0);return e}function p(t,n,e,i,o,s){const{x:r,y:a}=t.pixelPosition;let l=e;let c=i*Math.cos(s*Math.PI/180);if(t.horizontal){l=i;c=e*Math.cos(s*Math.PI/180)}n.save();n.translate(r,a);n.rotate(o*Math.PI/180);n.fillStyle="rgba(115, 143, 255, 1)";n.fillRect(-l/2,-c/2,l,c);n.strokeStyle="rgba(0, 0, 0, 0.8)";n.lineWidth=1;n.strokeRect(-l/2,-c/2,l,c);n.restore()}function g({rgb:t,zoom:n=1,canvas:e}){const i=u(t,undefined,e);const o=i.getContext("2d");const s=o.getImageData(0,0,i.width,i.height);const r=i.width;const a=i.height;const l=Math.floor(r*n);const c=Math.floor(a*n);const h=Math.floor((r-l)/2);const f=Math.floor((a-c)/2);const d=new ImageData(l,c);for(let t=0;t<a;t++){for(let n=0;n<r;n++){const e=(t*r+n)*4;if(n>=h&&n<h+l&&t>=f&&t<f+c){const i=n-h;const o=t-f;const r=(o*l+i)*4;d.data[r]=s.data[e];d.data[r+1]=s.data[e+1];d.data[r+2]=s.data[e+2];d.data[r+3]=255}}}i.width=l;i.height=c;o.putImageData(d,0,0);return i}const b="rgba(0, 0, 0, 0.5)";const w=1;const m=1;const y=.2;const x=600;function v({x:t,y:n,lastPoint:e,secondLastPoint:i}){const o=e.x-i.x;const s=e.y-i.y;const r=-s;const a=o;const l=Math.sqrt(r*r+a*a);const c=r/l;const h=a/l;const f={x:t-e.x,y:n-e.y};const d=f.x*c+f.y*h;t=e.x+c*d;n=e.y+h*d;return{x:t,y:n}}function k({polygonCtx:t,polygonCanvas:n,polygon:e,shiftKeyPressed:i,mousePoint:o,strokeColor:s,fillColor:r}){if(!t||!n)return;t.beginPath();t.strokeStyle=s;t.lineWidth=2;e.points.forEach(((n,e)=>{if(e===0){t.moveTo(n.x,n.y)}else{t.lineTo(n.x,n.y)}}));if(e.closed){t.lineTo(e.points[0].x,e.points[0].y);if(r){t.fillStyle=r;t.fill()}}if(e.points.length>0){t.stroke()}if(e.points.length>1&&!e.closed&&i){const n=v({x:o.x,y:o.y,lastPoint:e.points[e.points.length-1],secondLastPoint:e.points[e.points.length-2]});z({ctx:t,startPoint:n,endPoint:e.points[e.points.length-1],strokeStyle:b})}if(i&&e.points.length>1&&!e.closed){const n=v({x:o.x,y:o.y,lastPoint:e.points[e.points.length-1],secondLastPoint:e.points[e.points.length-2]});M({ctx:t,x:n.x,y:n.y,radius:5,strokeStyle:b})}e.points.forEach((n=>{t.beginPath();const e=s;const i=Math.sqrt(Math.pow(n.x-o.x,2)+Math.pow(n.y-o.y,2));if(i<10){M({ctx:t,x:n.x,y:n.y,strokeStyle:e,radius:8})}else{M({ctx:t,x:n.x,y:n.y,strokeStyle:e,radius:5})}t.stroke()}))}function M({ctx:t,x:n,y:e,radius:i,strokeStyle:o="black",lineWidth:s=2}){t.beginPath();t.strokeStyle=o;t.lineWidth=s;t.arc(n,e,i,0,2*Math.PI);t.stroke()}function z({ctx:t,startPoint:n,endPoint:e,dashPattern:i=[5,5],strokeStyle:o="black",lineWidth:s=2}){t.beginPath();t.strokeStyle=o;t.lineWidth=s;t.setLineDash(i);t.moveTo(n.x,n.y);t.lineTo(e.x,e.y);t.stroke();t.setLineDash([])}function S(t,n){if(!n.closed||n.points.length<3)return false;const e=n.points.length;const i=t.x;const o=t.y;let s=false;let r=n.points[0];let a;for(let t=1;t<=e;t++){a=n.points[t%e];if(o>Math.min(r.y,a.y)){if(o<=Math.max(r.y,a.y)){if(i<=Math.max(r.x,a.x)){const t=(o-r.y)*(a.x-r.x)/(a.y-r.y)+r.x;if(r.x===a.x||i<=t){s=!s}}}}r=a}return s}const C=[{key:"shift",description:"add one point on perpendicular line"}];const _={name:"move",ariaLabel:"Move",icon:"move",cursor:"move",keyboardShortcut:"m",explanation:"Move points of the active polygon"};const j={name:"roof",ariaLabel:"Roof Area",icon:"house",cursor:"crosshair",keyboardShortcut:"r",keyboardCombinations:C,explanation:"Draw the roof of the building"};const P={name:"obstruction",ariaLabel:"Obstruction",icon:"octagon-minus",cursor:"crosshair",keyboardShortcut:"o",keyboardCombinations:C,explanation:"Draw the obstruction of the building"};const O={name:"delete",ariaLabel:"Delete",icon:"eraser",cursor:"default",keyboardShortcut:"d",explanation:"Delete the active polygon"};const E=[_,j,P,O];const A={openRoofColor:"#d6eeff",closedRoofColor:"#ffffff",openObstructionColor:"#f57242",closedObstructionColor:"rgba(255, 132, 107, 0.8)",roofPolygonFillColor:"rgba(92, 187, 255, 0.5)",obstructionPolygonFillColor:"rgba(255, 132, 107, 0.5)",roofPolygonHoverFillColor:"rgba(92, 187, 255, 0.8)",obstructionPolygonHoverFillColor:"rgba(255, 132, 107, 0.8)",roofPolygonSelectedFillColor:"rgba(92, 187, 255, 0.7)",obstructionPolygonSelectedFillColor:"rgba(255, 132, 107, 0.7)"};const D={widthMeters:1.134,heightMeters:1.762,kWattPeak:.455,efficiency:.224,price:77.68};function L(t,n,e,i,o){const s=n?.type===i.type&&n?._id===e;if(s){return i.type==="roof"?o.roofPolygonHoverFillColor:o.obstructionPolygonHoverFillColor}const r=t?.type===i.type&&t?._id===e;if(r){return i.type==="roof"?o.roofPolygonSelectedFillColor:o.obstructionPolygonSelectedFillColor}if(i.type==="roof"){return i.closed?o.roofPolygonFillColor:undefined}return i.closed?o.obstructionPolygonFillColor:undefined}var R=[];for(var N=0;N<256;++N){R.push((N+256).toString(16).slice(1))}function I(t,n=0){return(R[t[n+0]]+R[t[n+1]]+R[t[n+2]]+R[t[n+3]]+"-"+R[t[n+4]]+R[t[n+5]]+"-"+R[t[n+6]]+R[t[n+7]]+"-"+R[t[n+8]]+R[t[n+9]]+"-"+R[t[n+10]]+R[t[n+11]]+R[t[n+12]]+R[t[n+13]]+R[t[n+14]]+R[t[n+15]]).toLowerCase()}var T;var F=new Uint8Array(16);function W(){if(!T){T=typeof crypto!=="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto);if(!T){throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")}}return T(F)}var B=typeof crypto!=="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var U={randomUUID:B};function H(t,n,e){if(U.randomUUID&&true&&!t){return U.randomUUID()}t=t||{};var i=t.random||(t.rng||W)();i[6]=i[6]&15|64;i[8]=i[8]&63|128;return I(i)}function V(t){let n=0;for(let e=0;e<t.length;e++){const i=(e+1)%t.length;n+=t[e].x*t[i].y;n-=t[i].x*t[e].y}return Math.abs(n/2)}function $(t){if(t>=337.5||t<22.5)return"North";if(t>=22.5&&t<67.5)return"Northeast";if(t>=67.5&&t<112.5)return"East";if(t>=112.5&&t<157.5)return"Southeast";if(t>=157.5&&t<202.5)return"South";if(t>=202.5&&t<247.5)return"Southwest";if(t>=247.5&&t<292.5)return"West";return"Northwest"}function Y(t,n,e){const i=n.getContext("2d");if(!i){throw new Error("Canvas context not found")}const o=e=>n.height*(1-(e-t.south)/(t.north-t.south));const s=e=>n.width*(e-t.west)/(t.east-t.west);return{x:s(e.longitude),y:o(e.latitude)}}function X(t){const n=t.bounds.north-t.bounds.south;const e=t.height;const i=n*111320/e;return i}function K(t,n){const e=n*(Math.PI/180);const i=t.x*Math.cos(e)-t.y*Math.sin(e);const o=t.x*Math.sin(e)+t.y*Math.cos(e);return{x:i,y:o}}function q(t,n){return{points:t.points.map((t=>K(t,n))),type:t.type,closed:t.closed,_id:t._id,details:t.details}}function Z(t,n){if(t.points.length===0){return{polygon:t,offset:{x:0,y:0}}}let e=0;let i=0;if(!n){const n=Math.min(...t.points.map((t=>t.x)));const o=Math.min(...t.points.map((t=>t.y)));const s=Math.max(...t.points.map((t=>t.x)));const r=Math.max(...t.points.map((t=>t.y)));e=n+(s-n)/2;i=o+(r-o)/2}else{e=n.x;i=n.y}const o=t.points.map((t=>({x:t.x-e,y:t.y-i})));return{polygon:{...t,points:o},offset:{x:e,y:i}}}function J(t,n){return t.x===n.x&&t.y===n.y}function Q(t,n){const e=t.start;const i=t.end;const o=n.start;const s=n.end;if(J(e,o)||J(e,s)||J(i,o)||J(i,s)){return false}const r=(s.x-o.x)*(e.y-o.y)-(s.y-o.y)*(e.x-o.x);const a=(s.x-o.x)*(i.y-o.y)-(s.y-o.y)*(i.x-o.x);const l=(i.x-e.x)*(o.y-e.y)-(i.y-e.y)*(o.x-e.x);const c=(i.x-e.x)*(s.y-e.y)-(i.y-e.y)*(s.x-e.x);return r*a<0&&l*c<0}function G(t,n,e,i){const o={minX:Math.min(...t.points.map((t=>t.x))),maxX:Math.max(...t.points.map((t=>t.x))),minY:Math.min(...t.points.map((t=>t.y))),maxY:Math.max(...t.points.map((t=>t.y)))};let s=null;let r=0;for(const t of n){const n=Y(e,i,{latitude:t.boundingBox.sw.latitude,longitude:t.boundingBox.sw.longitude});const a=Y(e,i,{latitude:t.boundingBox.ne.latitude,longitude:t.boundingBox.ne.longitude});const l={minX:n.x,maxX:a.x,minY:a.y,maxY:n.y};const c=Math.max(o.minX,l.minX);const h=Math.min(o.maxX,l.maxX);const f=Math.max(o.minY,l.minY);const d=Math.min(o.maxY,l.maxY);const u=h-c;const p=d-f;let g=0;if(u>0&&p>0){g=u*p}const b=(o.maxX-o.minX)*(o.maxY-o.minY);const w=(l.maxX-l.minX)*(l.maxY-l.minY);const m=b+w-g;const y=m>0?g/m:0;if(y>r){r=y;s=t}}return s}function tt(t,n,e,i,o,s){const r=[];const a=e?n.heightMeters:n.widthMeters;const l=Math.ceil((t.maxX-t.minX)/a);const c=e?n.widthMeters:n.heightMeters;const h=Math.ceil((t.maxY-t.minY)/c);const f=a/2;const d=c/2;const u=i.x-Math.ceil((i.x-t.minX)/a)*a;const p=i.y-Math.ceil((i.y-t.minY)/c)*c;for(let t=0;t<h;t++){const i=[];for(let r=0;r<l;r++){const l=u+r*a+r*s+f;const h=p+t*c+t*o+d;const g={panel:n,pixelPosition:{x:l,y:h},horizontal:e};i.push(g)}r.push(i)}return r}function nt(t,n){const e=n?t.panel.heightMeters:t.panel.widthMeters;const i=n?t.panel.widthMeters:t.panel.heightMeters;const o={x:t.pixelPosition.x-e/2,y:t.pixelPosition.y-i/2};const s={x:t.pixelPosition.x-e/2,y:t.pixelPosition.y+i/2};const r={x:t.pixelPosition.x+e/2,y:t.pixelPosition.y+i/2};const a={x:t.pixelPosition.x+e/2,y:t.pixelPosition.y-i/2};const l=[{start:o,end:s},{start:s,end:r},{start:r,end:a},{start:a,end:o}];return l}function et(t,n,e){const i=nt(t,e);if(S(t.pixelPosition,n)){return true}for(let t=0;t<n.points.length;t++){const e=n.points[t];const o=n.points[(t+1)%n.points.length];const s={start:e,end:o};for(const t of i){if(Q(t,s)){return true}}}return false}function it(t,n,e){const i=nt(t,e);for(let t=0;t<n.points.length;t++){const e=n.points[t];const o=n.points[(t+1)%n.points.length];const s={start:e,end:o};for(const t of i){if(Q(t,s)){return false}}}return S(t.pixelPosition,n)}function ot(t,n,e){for(const i of n){if(et(t,i.polygon,e)){return true}}return false}function st(t,n,e,i){const o=[];for(const s of t){let t=[];for(const o of s){const s=ot(o,i,e);if(it(o,n,e)&&!s){t.push(o)}}o.push(t)}return o}function rt(t,n,e,i){const o=Math.min(...t.points.map((t=>t.x)));const s=Math.max(...t.points.map((t=>t.x)));const r=Math.min(...t.points.map((t=>t.y)));const a=Math.max(...t.points.map((t=>t.y)));const l={minX:o,maxX:s,minY:r,maxY:a};console.log("solar",e);const c={...e,widthMeters:e.widthMeters*Math.cos(i*Math.PI/180),heightMeters:e.heightMeters};const h={...e,widthMeters:e.widthMeters,heightMeters:e.heightMeters*Math.cos(i*Math.PI/180)};let f=[];let d=0;for(const e of t.points){for(const i of[false]){const o=tt(l,i?c:h,i,e,w,m);const s=st(o,t,i,n);const r=s.reduce(((t,n)=>t+n.length),0);if(r>d){d=r;f=s}}break}return f}function at(t,n,e,i){const o=[];for(const s of t){const t=Z(s,e);const r=q(t.polygon,-n);const a=ct(r,-i);const l=Math.min(...a.points.map((t=>t.x)));const c=Math.max(...a.points.map((t=>t.x)));const h=Math.min(...a.points.map((t=>t.y)));const f=Math.max(...a.points.map((t=>t.y)));const d={minX:l,maxX:c,minY:h,maxY:f};o.push({polygon:r,boundingBox:d})}return o}function lt(t){let n=0;for(let e=0;e<t.length;e++){const i=t[e];const o=t[(e+1)%t.length];n+=(o.x-i.x)*(o.y+i.y)}return n>0}function ct(t,n){const e=t.points;const i=lt(e);n=n*Math.sqrt(2)*(i?-1:1);const o=[];for(let t=0;t<e.length;t++){const i=e[(t-1+e.length)%e.length];const s=e[t];const r=e[(t+1)%e.length];const a={x:s.x-i.x,y:s.y-i.y};const l={x:r.x-s.x,y:r.y-s.y};const c={x:-a.y,y:a.x};const h={x:-l.y,y:l.x};const f=Math.sqrt(c.x*c.x+c.y*c.y);const d=Math.sqrt(h.x*h.x+h.y*h.y);c.x/=f;c.y/=f;h.x/=d;h.y/=d;const u={x:c.x+h.x,y:c.y+h.y};const p=Math.sqrt(u.x*u.x+u.y*u.y);u.x/=p;u.y/=p;const g={x:s.x+u.x*n,y:s.y+u.y*n};o.push(g)}return{points:o,type:t.type,closed:t.closed,_id:t._id,details:t.details}}function ht(t,n,e,i,o,s){const r=ct(t,o);const a=Z(r);const l=q(a.polygon,-i);const c=at(n,i,a.offset,o);const h=rt(l,c,e,s);const f=[];for(const t of h.flat()){const n=K(t.pixelPosition,i);const e={x:n.x+a.offset.x,y:n.y+a.offset.y};f.push({panel:t.panel,pixelPosition:e,horizontal:t.horizontal})}return f}const ft={solarExpert:{searchPlaceholder:"Search for a location"},solarSystemForm:{title:"Solar System Configuration",systemInformation:"System Information",numberOfPanels:"Number of Solar Panels",panelPeakPower:"Panel Peak Power (kW)",totalSystemPeakPower:"Total System Peak Power (kW)",electricityPrice:"Electricity Price (€/kWh)",compensationRate:"Compensation Rate (€/kWh)",autonomy:"Autonomy (days)",costSavings:"Cost Savings (€/year)",householdConsumptionTitle:"Household Electricity Consumption",consumptionProfileTitle:"Consumption Profile",electricityCostsTitle:"Electricity Costs",compensationRateTitle:"Compensation Rate",resultsTitle:"Results",savingsDisclaimer:"Disclaimer: The savings are based on the average electricity price in Spain.",annualConsumption:"Annual Consumption (kWh)",name:"Name",email:"Email",nameError:"Please enter your name",emailError:"Please enter a valid email address",consumptionProfiles:{mostlyAtHome:"Mostly at home",mostlyAway:"Mostly away"},chart:{consumption:"Consumption",production:"Production",consumptionProfile:"Consumption Profile",relativeConsumption:"Relative Consumption",hourOfDay:"Hour of Day"},validEmailError:"Please enter a valid email address",requestOffer:"Request Offer",requestOfferButton:"Request Offer",year:"year"},mapDraw:{noPolygonSelected:"No polygon selected",noAddressSelected:"Please select an address",information:"Information",calculateSolarPanels:"Calculate Solar Panels",panels:"Panels",area:"Area",azimuth:"Azimuth",pitch:"Pitch",tools:{roof:{name:"Roof",explanation:"Draw the roof of the building",ariaLabel:"Roof"},obstruction:{name:"Obstruction",explanation:"Draw the obstruction of the building",ariaLabel:"Obstruction"},delete:{name:"Delete",explanation:"Delete the selected polygon",ariaLabel:"Delete"},move:{name:"Move",explanation:"Move the selected polygon",ariaLabel:"Move"}}}};const dt={solarExpert:{searchPlaceholder:"Suche nach einer Adresse"},solarSystemForm:{title:"Solarsystem Konfiguration",systemInformation:"System Information",numberOfPanels:"Anzahl der Solarpanel",panelPeakPower:"Panel Peak Power (kW)",totalSystemPeakPower:"Total System Peak Power (kW)",electricityPrice:"Strompreis (€/kWh)",compensationRate:"Einspeisevergütung (€/kWh)",autonomy:"Autonomie (Tage)",costSavings:"Einsparungen (€/Jahr)",householdConsumptionTitle:"Haushaltsverbrauch",consumptionProfileTitle:"Verbrauchprofil",electricityCostsTitle:"Stromkosten",compensationRateTitle:"Einspeisevergütung",resultsTitle:"Ergebnisse",savingsDisclaimer:"Disclaimer: Die Einsparungen basieren auf dem durchschnittlichen Strompreis in Spanien.",annualConsumption:"Jährlicher Verbrauch (kWh)",name:"Name",email:"Email",nameError:"Bitte geben Sie Ihren Namen ein",emailError:"Bitte geben Sie eine gültige E-Mail-Adresse ein",consumptionProfiles:{mostlyAtHome:"Hauptsächlich zu Hause",mostlyAway:"Erwerbstätig"},chart:{consumption:"Verbrauch",production:"Produktion",consumptionProfile:"Verbrauchprofil",relativeConsumption:"Verbrauch",hourOfDay:"Stunde des Tages"},validEmailError:"Bitte geben Sie eine gültige E-Mail-Adresse ein",requestOffer:"Angebot anfordern",requestOfferButton:"Angebot anfordern",year:"Jahr"},mapDraw:{noPolygonSelected:"Kein Polygon ausgewählt",noAddressSelected:"Bitte wählen Sie eine Adresse",information:"Information",calculateSolarPanels:"Berechnen Sie die Solarpanele",panels:"Panele",area:"Fläche",azimuth:"Ausrichtung",pitch:"Neigung",tools:{roof:{name:"Dach",explanation:"Zeichnen Sie das Dach des Gebäudes",ariaLabel:"Dach"},obstruction:{name:"Hindernis",explanation:"Zeichnen Sie das Hindernis des Gebäudes",ariaLabel:"Hindernis"},delete:{name:"Löschen",explanation:"Löschen Sie das ausgewählte Polygon",ariaLabel:"Löschen"},move:{name:"Verschieben",explanation:"Verschieben Sie Punkte des ausgewählten Polygons",ariaLabel:"Verschieben"}}}};const ut={solarExpert:{searchPlaceholder:"Suche nach einer Adresse"},solarSystemForm:{title:"Configuración del sistema solar",systemInformation:"Información del sistema",numberOfPanels:"Número de paneles solares",panelPeakPower:"Potencia pico del panel (kW)",totalSystemPeakPower:"Potencia pico total del sistema (kW)",electricityPrice:"Precio de la electricidad (€/kWh)",compensationRate:"Tasa de compensación (€/kWh)",autonomy:"Autonomía (días)",costSavings:"Ahorro (€/año)",householdConsumptionTitle:"Consumo de la casa",consumptionProfileTitle:"Perfil de consumo",electricityCostsTitle:"Costes de la electricidad",compensationRateTitle:"Tasa de compensación",resultsTitle:"Resultados",savingsDisclaimer:"Nota: Los ahorros se basan en el precio promedio de la electricidad en España.",annualConsumption:"Consumo anual (kWh)",name:"Nombre",email:"Email",nameError:"Por favor, ingrese su nombre",emailError:"Por favor, ingrese una dirección de correo electrónico válida",consumptionProfiles:{mostlyAtHome:"Principalmente en casa",mostlyAway:"Empleo"},chart:{consumption:"Consumo",production:"Producción",consumptionProfile:"Perfil de consumo",relativeConsumption:"Consumo",hourOfDay:"Hora del día"},validEmailError:"Por favor, ingrese una dirección de correo electrónico válida",requestOffer:"Solicitar una oferta",requestOfferButton:"Solicitar oferta",year:"Año"},mapDraw:{noPolygonSelected:"No se ha seleccionado un polígono",noAddressSelected:"Por favor, seleccione una dirección",information:"Información",calculateSolarPanels:"Calcular paneles solares",panels:"Paneles",area:"Área",azimuth:"Azimut",pitch:"Inclinación",tools:{roof:{name:"Tejado",explanation:"Dibuje el tejado del edificio",ariaLabel:"Tejado"},obstruction:{name:"Obstrucción",explanation:"Dibuje la obstrucción del edificio",ariaLabel:"Obstrucción"},delete:{name:"Eliminar",explanation:"Elimine el polígono seleccionado",ariaLabel:"Eliminar"},move:{name:"Mover",explanation:"Mueva los puntos del polígono seleccionado",ariaLabel:"Mover"}}}};const pt={en:ft,es:ut,de:dt};function gt(t){const n=pt["en"];if(t==="en"){return n}const e=pt[t];const i=JSON.parse(JSON.stringify(n));function o(t,n){for(const e in n){if(n[e]instanceof Object&&e in t){o(t[e],n[e])}else if(n[e]!==undefined){t[e]=n[e]}}}o(i,e);return i}const bt='/*! tailwindcss v4.1.7 | MIT License | https://tailwindcss.com */\n@layer properties;\n@layer theme, base, components, utilities;\n@layer theme {\n :root, :host {\n --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",\n "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";\n --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",\n "Courier New", monospace;\n --color-red-500: oklch(63.7% 0.237 25.331);\n --color-green-600: oklch(62.7% 0.194 149.214);\n --color-blue-500: oklch(62.3% 0.214 259.815);\n --color-gray-50: oklch(98.5% 0.002 247.839);\n --color-gray-200: oklch(92.8% 0.006 264.531);\n --color-gray-300: oklch(87.2% 0.01 258.338);\n --color-gray-400: oklch(70.7% 0.022 261.325);\n --color-gray-500: oklch(55.1% 0.027 264.364);\n --color-gray-600: oklch(44.6% 0.03 256.802);\n --color-gray-700: oklch(37.3% 0.034 259.733);\n --color-gray-800: oklch(27.8% 0.033 256.848);\n --color-white: #fff;\n --spacing: 0.25rem;\n --container-2xl: 42rem;\n --container-3xl: 48rem;\n --text-sm: 0.875rem;\n --text-sm--line-height: calc(1.25 / 0.875);\n --text-lg: 1.125rem;\n --text-lg--line-height: calc(1.75 / 1.125);\n --text-xl: 1.25rem;\n --text-xl--line-height: calc(1.75 / 1.25);\n --text-2xl: 1.5rem;\n --text-2xl--line-height: calc(2 / 1.5);\n --text-3xl: 1.875rem;\n --text-3xl--line-height: calc(2.25 / 1.875);\n --font-weight-medium: 500;\n --font-weight-semibold: 600;\n --font-weight-bold: 700;\n --radius-lg: 0.5rem;\n --radius-xl: 0.75rem;\n --radius-2xl: 1rem;\n --radius-4xl: 2rem;\n --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);\n --animate-spin: spin 1s linear infinite;\n --default-transition-duration: 150ms;\n --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n --default-font-family: var(--font-sans);\n --default-mono-font-family: var(--font-mono);\n }\n}\n@layer base {\n *, ::after, ::before, ::backdrop, ::file-selector-button {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: 0 solid;\n }\n html, :host {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n tab-size: 4;\n font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");\n font-feature-settings: var(--default-font-feature-settings, normal);\n font-variation-settings: var(--default-font-variation-settings, normal);\n -webkit-tap-highlight-color: transparent;\n }\n hr {\n height: 0;\n color: inherit;\n border-top-width: 1px;\n }\n abbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n h1, h2, h3, h4, h5, h6 {\n font-size: inherit;\n font-weight: inherit;\n }\n a {\n color: inherit;\n -webkit-text-decoration: inherit;\n text-decoration: inherit;\n }\n b, strong {\n font-weight: bolder;\n }\n code, kbd, samp, pre {\n font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);\n font-feature-settings: var(--default-mono-font-feature-settings, normal);\n font-variation-settings: var(--default-mono-font-variation-settings, normal);\n font-size: 1em;\n }\n small {\n font-size: 80%;\n }\n sub, sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n sub {\n bottom: -0.25em;\n }\n sup {\n top: -0.5em;\n }\n table {\n text-indent: 0;\n border-color: inherit;\n border-collapse: collapse;\n }\n :-moz-focusring {\n outline: auto;\n }\n progress {\n vertical-align: baseline;\n }\n summary {\n display: list-item;\n }\n ol, ul, menu {\n list-style: none;\n }\n img, svg, video, canvas, audio, iframe, embed, object {\n display: block;\n vertical-align: middle;\n }\n img, video {\n max-width: 100%;\n height: auto;\n }\n button, input, select, optgroup, textarea, ::file-selector-button {\n font: inherit;\n font-feature-settings: inherit;\n font-variation-settings: inherit;\n letter-spacing: inherit;\n color: inherit;\n border-radius: 0;\n background-color: transparent;\n opacity: 1;\n }\n :where(select:is([multiple], [size])) optgroup {\n font-weight: bolder;\n }\n :where(select:is([multiple], [size])) optgroup option {\n padding-inline-start: 20px;\n }\n ::file-selector-button {\n margin-inline-end: 4px;\n }\n ::placeholder {\n opacity: 1;\n }\n @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {\n ::placeholder {\n color: currentcolor;\n @supports (color: color-mix(in lab, red, red)) {\n color: color-mix(in oklab, currentcolor 50%, transparent);\n }\n }\n }\n textarea {\n resize: vertical;\n }\n ::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n ::-webkit-date-and-time-value {\n min-height: 1lh;\n text-align: inherit;\n }\n ::-webkit-datetime-edit {\n display: inline-flex;\n }\n ::-webkit-datetime-edit-fields-wrapper {\n padding: 0;\n }\n ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {\n padding-block: 0;\n }\n :-moz-ui-invalid {\n box-shadow: none;\n }\n button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button {\n appearance: button;\n }\n ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {\n height: auto;\n }\n [hidden]:where(:not([hidden="until-found"])) {\n display: none !important;\n }\n}\n@layer utilities {\n .pointer-events-none {\n pointer-events: none;\n }\n .absolute {\n position: absolute;\n }\n .relative {\n position: relative;\n }\n .top-0 {\n top: calc(var(--spacing) * 0);\n }\n .top-1 {\n top: calc(var(--spacing) * 1);\n }\n .top-1\\/2 {\n top: calc(1/2 * 100%);\n }\n .bottom-full {\n bottom: 100%;\n }\n .left-0 {\n left: calc(var(--spacing) * 0);\n }\n .left-1 {\n left: calc(var(--spacing) * 1);\n }\n .left-1\\/2 {\n left: calc(1/2 * 100%);\n }\n .left-3 {\n left: calc(var(--spacing) * 3);\n }\n .z-1 {\n z-index: 1;\n }\n .z-10 {\n z-index: 10;\n }\n .z-20 {\n z-index: 20;\n }\n .m-auto {\n margin: auto;\n }\n .mt-1 {\n margin-top: calc(var(--spacing) * 1);\n }\n .mt-4 {\n margin-top: calc(var(--spacing) * 4);\n }\n .mb-1 {\n margin-bottom: calc(var(--spacing) * 1);\n }\n .mb-2 {\n margin-bottom: calc(var(--spacing) * 2);\n }\n .mb-4 {\n margin-bottom: calc(var(--spacing) * 4);\n }\n .block {\n display: block;\n }\n .flex {\n display: flex;\n }\n .grid {\n display: grid;\n }\n .table {\n display: table;\n }\n .h-5 {\n height: calc(var(--spacing) * 5);\n }\n .h-16 {\n height: calc(var(--spacing) * 16);\n }\n .h-48 {\n height: calc(var(--spacing) * 48);\n }\n .h-full {\n height: 100%;\n }\n .w-5 {\n width: calc(var(--spacing) * 5);\n }\n .w-16 {\n width: calc(var(--spacing) * 16);\n }\n .w-52 {\n width: calc(var(--spacing) * 52);\n }\n .w-64 {\n width: calc(var(--spacing) * 64);\n }\n .w-full {\n width: 100%;\n }\n .max-w-2xl {\n max-width: var(--container-2xl);\n }\n .flex-1 {\n flex: 1;\n }\n .border-collapse {\n border-collapse: collapse;\n }\n .-translate-x-1 {\n --tw-translate-x: calc(var(--spacing) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-x-1\\/2 {\n --tw-translate-x: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-y-1 {\n --tw-translate-y: calc(var(--spacing) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-y-1\\/2 {\n --tw-translate-y: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .transform {\n transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);\n }\n .animate-spin {\n animation: var(--animate-spin);\n }\n .cursor-help {\n cursor: help;\n }\n .resize {\n resize: both;\n }\n .grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n .flex-col {\n flex-direction: column;\n }\n .flex-row {\n flex-direction: row;\n }\n .items-center {\n align-items: center;\n }\n .items-start {\n align-items: flex-start;\n }\n .justify-between {\n justify-content: space-between;\n }\n .justify-center {\n justify-content: center;\n }\n .justify-start {\n justify-content: flex-start;\n }\n .gap-1 {\n gap: calc(var(--spacing) * 1);\n }\n .gap-2 {\n gap: calc(var(--spacing) * 2);\n }\n .gap-4 {\n gap: calc(var(--spacing) * 4);\n }\n .space-y-4 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .space-y-6 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .rounded-4xl {\n border-radius: var(--radius-4xl);\n }\n .rounded-full {\n border-radius: calc(infinity * 1px);\n }\n .rounded-lg {\n border-radius: var(--radius-lg);\n }\n .border {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n .border-t {\n border-top-style: var(--tw-border-style);\n border-top-width: 1px;\n }\n .border-t-2 {\n border-top-style: var(--tw-border-style);\n border-top-width: 2px;\n }\n .border-b-2 {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 2px;\n }\n .border-\\[\\#271200\\] {\n border-color: #271200;\n }\n .border-gray-200 {\n border-color: var(--color-gray-200);\n }\n .border-gray-300 {\n border-color: var(--color-gray-300);\n }\n .border-red-500 {\n border-color: var(--color-red-500);\n }\n .bg-\\[\\#271200\\] {\n background-color: #271200;\n }\n .bg-\\[\\#f3ebda\\] {\n background-color: #f3ebda;\n }\n .bg-gray-800 {\n background-color: var(--color-gray-800);\n }\n .bg-white {\n background-color: var(--color-white);\n }\n .p-2 {\n padding: calc(var(--spacing) * 2);\n }\n .p-3 {\n padding: calc(var(--spacing) * 3);\n }\n .p-4 {\n padding: calc(var(--spacing) * 4);\n }\n .p-6 {\n padding: calc(var(--spacing) * 6);\n }\n .px-4 {\n padding-inline: calc(var(--spacing) * 4);\n }\n .py-2 {\n padding-block: calc(var(--spacing) * 2);\n }\n .pt-4 {\n padding-top: calc(var(--spacing) * 4);\n }\n .pt-7 {\n padding-top: calc(var(--spacing) * 7);\n }\n .pr-4 {\n padding-right: calc(var(--spacing) * 4);\n }\n .pb-3 {\n padding-bottom: calc(var(--spacing) * 3);\n }\n .pl-10 {\n padding-left: calc(var(--spacing) * 10);\n }\n .text-center {\n text-align: center;\n }\n .text-2xl {\n font-size: var(--text-2xl);\n line-height: var(--tw-leading, var(--text-2xl--line-height));\n }\n .text-lg {\n font-size: var(--text-lg);\n line-height: var(--tw-leading, var(--text-lg--line-height));\n }\n .text-sm {\n font-size: var(--text-sm);\n line-height: var(--tw-leading, var(--text-sm--line-height));\n }\n .text-xl {\n font-size: var(--text-xl);\n line-height: var(--tw-leading, var(--text-xl--line-height));\n }\n .font-bold {\n --tw-font-weight: var(--font-weight-bold);\n font-weight: var(--font-weight-bold);\n }\n .font-medium {\n --tw-font-weight: var(--font-weight-medium);\n font-weight: var(--font-weight-medium);\n }\n .font-semibold {\n --tw-font-weight: var(--font-weight-semibold);\n font-weight: var(--font-weight-semibold);\n }\n .text-\\[\\#271200\\] {\n color: #271200;\n }\n .text-gray-400 {\n color: var(--color-gray-400);\n }\n .text-gray-500 {\n color: var(--color-gray-500);\n }\n .text-gray-600 {\n color: var(--color-gray-600);\n }\n .text-green-600 {\n color: var(--color-green-600);\n }\n .text-red-500 {\n color: var(--color-red-500);\n }\n .text-white {\n color: var(--color-white);\n }\n .underline {\n text-decoration-line: underline;\n }\n .opacity-0 {\n opacity: 0%;\n }\n .shadow {\n --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .outline {\n outline-style: var(--tw-outline-style);\n outline-width: 1px;\n }\n .transition-colors {\n transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-opacity {\n transition-property: opacity;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .duration-200 {\n --tw-duration: 200ms;\n transition-duration: 200ms;\n }\n .group-hover\\:opacity-100 {\n &:is(:where(.group):hover *) {\n @media (hover: hover) {\n opacity: 100%;\n }\n }\n }\n .hover\\:bg-\\[\\#964500\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #964500;\n }\n }\n }\n .focus\\:border-transparent {\n &:focus {\n border-color: transparent;\n }\n }\n .focus\\:ring-2 {\n &:focus {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n }\n .focus\\:ring-\\[\\#964500\\] {\n &:focus {\n --tw-ring-color: #964500;\n }\n }\n .focus\\:ring-blue-500 {\n &:focus {\n --tw-ring-color: var(--color-blue-500);\n }\n }\n .focus\\:outline-none {\n &:focus {\n --tw-outline-style: none;\n outline-style: none;\n }\n }\n .lg\\:gap-4 {\n @media (width >= 64rem) {\n gap: calc(var(--spacing) * 4);\n }\n }\n}\n@property --tw-translate-x {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-y {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-z {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-rotate-x {\n syntax: "*";\n inherits: false;\n}\n@property --tw-rotate-y {\n syntax: "*";\n inherits: false;\n}\n@property --tw-rotate-z {\n syntax: "*";\n inherits: false;\n}\n@property --tw-skew-x {\n syntax: "*";\n inherits: false;\n}\n@property --tw-skew-y {\n syntax: "*";\n inherits: false;\n}\n@property --tw-space-y-reverse {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-border-style {\n syntax: "*";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-font-weight {\n syntax: "*";\n inherits: false;\n}\n@property --tw-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-shadow-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-shadow-alpha {\n syntax: "<percentage>";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-inset-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-shadow-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-inset-shadow-alpha {\n syntax: "<percentage>";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-ring-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-ring-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-ring-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-inset-ring-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-ring-inset {\n syntax: "*";\n inherits: false;\n}\n@property --tw-ring-offset-width {\n syntax: "<length>";\n inherits: false;\n initial-value: 0px;\n}\n@property --tw-ring-offset-color {\n syntax: "*";\n inherits: false;\n initial-value: #fff;\n}\n@property --tw-ring-offset-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-outline-style {\n syntax: "*";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-duration {\n syntax: "*";\n inherits: false;\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n@layer properties {\n @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {\n *, ::before, ::after, ::backdrop {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-translate-z: 0;\n --tw-rotate-x: initial;\n --tw-rotate-y: initial;\n --tw-rotate-z: initial;\n --tw-skew-x: initial;\n --tw-skew-y: initial;\n --tw-space-y-reverse: 0;\n --tw-border-style: solid;\n --tw-font-weight: initial;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-color: initial;\n --tw-shadow-alpha: 100%;\n --tw-inset-shadow: 0 0 #0000;\n --tw-inset-shadow-color: initial;\n --tw-inset-shadow-alpha: 100%;\n --tw-ring-color: initial;\n --tw-ring-shadow: 0 0 #0000;\n --tw-inset-ring-color: initial;\n --tw-inset-ring-shadow: 0 0 #0000;\n --tw-ring-inset: initial;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-outline-style: solid;\n --tw-duration: initial;\n }\n }\n}\n';const wt=1;const mt=class{constructor(n){t(this,n)}language="en";apiKey="";latitude=null;longitude=null;config=A;solarPanel=D;zoom=1;loadingState="empty";rgbTiff=null;draggedPointIndex=null;hoveredPointIndex=null;hoveredPolygon=null;shiftKeyPressed=false;altKeyPressed=false;mousePoint=null;currentTool=j;roofPolygons={};roofPolygonsSolarPanels={};obstructionPolygons={};selectedPolygon=null;buildingInsights=null;pixelInMeters=.2;showAzimuth=true;get el(){return e(this)}canvasElement;polygonCanvas;polygonCtx;getCurrentPolygon(){if(!this.selectedPolygon){return null}const{_id:t,type:n}=this.selectedPolygon;return n==="roof"?this.roofPolygons[t]:this.obstructionPolygons[t]}componentDidLoad(){if(this.latitude&&this.longitude){this.loadingState="loading"}requestAnimationFrame((()=>{if(this.canvasElement){const t=this.canvasElement.getBoundingClientRect();this.canvasElement.width=t.width;this.canvasElement.height=t.height;this.drawMap()}}))}sizeCanvas(t,n){if(this.polygonCanvas){this.polygonCanvas.width=t;this.polygonCanvas.height=n;this.polygonCtx=this.polygonCanvas.getContext("2d")}}async getBuildingInsights(){if(!this.latitude||!this.longitude){return}this.loadingState="loading";if(this.buildingInsights){const t=this.buildingInsights.center.latitude===this.latitude&&this.buildingInsights.center.longitude===this.longitude;if(t){return}this.obstructionPolygons={};this.roofPolygons={};this.selectedPolygon=null;this.hoveredPolygon=null;this.canvasElement.getContext("2d")?.clearRect(0,0,this.canvasElement.width,this.canvasElement.height);this.polygonCtx?.clearRect(0,0,this.polygonCanvas.width,this.polygonCanvas.height);this.rgbTiff=null}this.buildingInsights=await o(this.latitude,this.longitude,this.apiKey);if(!this.buildingInsights){alert("No building insights found. Please enter them manually.")}}async getBuildingImages(){if(!this.latitude||!this.longitude){return}if(this.buildingInsights){const t=this.buildingInsights.center.latitude===this.latitude&&this.buildingInsights.center.longitude===this.longitude;if(t){return}}this.rgbTiff=await s(this.latitude,this.longitude,this.apiKey);this.pixelInMeters=X(this.rgbTiff);this.loadingState="loaded"}async drawMap(){if(!this.canvasElement||!this.rgbTiff||!this.buildingInsights)return;this.sizeCanvas(this.rgbTiff.width,this.rgbTiff.height);g({rgb:this.rgbTiff,zoom:this.zoom,canvas:this.canvasElement})}handleMouseMove(t){if(!this.polygonCanvas||!this.polygonCtx)return;const n=this.polygonCanvas.getBoundingClientRect();const e=t.clientX-n.left;const i=t.clientY-n.top;this.mousePoint={x:e,y:i};const o=this.getCurrentPolygon();const s=o?.points.findIndex((t=>{const n=Math.sqrt(Math.pow(e-t.x,2)+Math.pow(i-t.y,2));return n<10}));let r=null;for(const t of Object.values(this.obstructionPolygons)){if(S({x:e,y:i},t)){r={_id:t._id,type:"obstruction"};break}}if(!r){for(const t of Object.values(this.roofPolygons)){if(S({x:e,y:i},t)){r={_id:t._id,type:"roof"};break}}}if(s!==this.hoveredPointIndex||JSON.stringify(r)!==JSON.stringify(this.hoveredPolygon)){this.hoveredPointIndex=s;this.hoveredPolygon=r;this.drawPolygons()}if(this.draggedPointIndex!==null&&o&&this.currentTool.name==="move"){o.points[this.draggedPointIndex]={x:e,y:i};this.drawPolygons()}if(this.shiftKeyPressed){this.drawPolygons()}}drawPolygons(){if(!this.polygonCanvas||!this.polygonCtx)return;this.polygonCtx.clearRect(0,0,this.polygonCanvas.width,this.polygonCanvas.height);for(const t of Object.values(this.roofPolygons)){const n=L(this.selectedPolygon,this.hoveredPolygon,t._id,t,this.config);k({polygonCtx:this.polygonCtx,polygonCanvas:this.polygonCanvas,polygon:t,strokeColor:t.closed?this.config.closedRoofColor:this.config.openRoofColor,fillColor:n,shiftKeyPressed:this.shiftKeyPressed,mousePoint:this.mousePoint});const e=this.roofPolygonsSolarPanels[t._id];const i={widthMeters:this.solarPanel.widthMeters/this.pixelInMeters,heightMeters:this.solarPanel.heightMeters/this.pixelInMeters};if(e){for(const n of e.positionedPanels){p(n,this.polygonCtx,i.widthMeters,i.heightMeters,t.details?.azimuth,t.details?.pitch)}}}for(const t of Object.values(this.obstructionPolygons)){const n=L(this.selectedPolygon,this.hoveredPolygon,t._id,t,this.config);k({polygonCtx:this.polygonCtx,polygonCanvas:this.polygonCanvas,polygon:t,shiftKeyPressed:this.shiftKeyPressed,mousePoint:this.mousePoint,strokeColor:t.closed?this.config.closedObstructionColor:this.config.openObstructionColor,fillColor:n})}}deletePolygon(t){if(this.selectedPolygon?._id===t){this.selectedPolygon=null}if(this.roofPolygons[t]){delete this.roofPolygons[t];delete this.roofPolygonsSolarPanels[t]}if(this.obstructionPolygons[t]){delete this.obstructionPolygons[t]}}handleKeyDown(t){if(t.target instanceof HTMLInputElement){return}if(t.shiftKey&&!this.shiftKeyPressed){this.shiftKeyPressed=true;this.drawPolygons();return}if(t.altKey&&!this.altKeyPressed){this.altKeyPressed=true;return}if((t.key==="Delete"||t.key==="Backspace")&&this.selectedPolygon){const t=this.getCurrentPolygon();if(t.closed){this.deletePolygon(t._id);this.drawPolygons();return}t.points.pop();this.drawPolygons();return}const n=t.key.toLowerCase();const e=E.find((t=>t.keyboardShortcut?.toLowerCase()===n));if(e){this.currentTool=e}}handleKeyUp(t){if(!t.shiftKey&&this.shiftKeyPressed){this.shiftKeyPressed=false;this.drawPolygons()}if(!t.altKey&&this.altKeyPressed){this.altKeyPressed=false}}handleMouseDown(t){if(!this.polygonCanvas||!this.polygonCtx)return;if(!this.polygonCanvas.contains(t.target))return;const n=this.polygonCanvas.getBoundingClientRect();let e=t.clientX-n.left;let i=t.clientY-n.top;if(this.currentTool.name==="delete"){if(!this.hoveredPolygon){return}const{_id:t,type:n}=this.hoveredPolygon;if(n==="roof"){delete this.roofPolygons[t];delete this.roofPolygonsSolarPanels[t]}else if(n==="obstruction"){delete this.obstructionPolygons[t]}this.hoveredPolygon=null;if(this.selectedPolygon?._id===t){this.selectedPolygon=null}this.drawPolygons();return}if(this.currentTool.name==="move"){if(this.selectedPolygon){const t=this.getCurrentPolygon();const n=t?.points.findIndex((t=>{const n=Math.sqrt(Math.pow(e-t.x,2)+Math.pow(i-t.y,2));return n<10}));if(n!==undefined&&n!==-1){this.draggedPointIndex=n;return}if(this.hoveredPolygon){this.selectedPolygon=this.hoveredPolygon;return}}this.selectedPolygon=null;this.drawPolygons();return}if(!this.selectedPolygon||this.getCurrentPolygon()?.closed){const t={_id:H(),points:[{x:e,y:i}],type:this.currentTool.name,closed:false};let n;if(this.currentTool.name==="roof"){this.roofPolygons={...this.roofPolygons,[t._id]:t};n=t._id}else if(this.currentTool.name==="obstruction"){this.obstructionPolygons={...this.obstructionPolygons,[t._id]:t};n=t._id}this.selectedPolygon={_id:n,type:this.currentTool.name};return}const{_id:o,type:s}=this.selectedPolygon;const r=s==="roof"?this.roofPolygons[o]:this.obstructionPolygons[o];if(r.closed){return}if(r.points.length>2){const t=r.points[0];const n=Math.sqrt(Math.pow(e-t.x,2)+Math.pow(i-t.y,2));if(n<10){this.closePolygon();return}}if(t.shiftKey&&r?.points.length>=2){const t=v({x:e,y:i,lastPoint:r.points[r.points.length-1],secondLastPoint:r.points[r.points.length-2]});e=t.x;i=t.y}r.points=[...r.points,{x:e,y:i}];this.drawPolygons()}handleMouseUp(){this.draggedPointIndex=null}closePolygon(){const t=this.getCurrentPolygon();if(t.points.length>=3&&(this.currentTool.name==="roof"||this.currentTool.name==="obstruction")){t.closed=true}if(t.type==="roof"){const n=1/this.pixelInMeters;const e=V(t.points)/(n*n);const i=G(t,this.buildingInsights?.solarPotential.roofSegmentStats,this.rgbTiff.bounds,this.canvasElement);if(i){t.details={area:e,azimuth:i.azimuthDegrees,pitch:i.pitchDegrees}}else{t.details={area:e,azimuth:0,pitch:0}}}this.drawPolygons();this.currentTool=_}calculateSolarPanels(){const t=this.getCurrentPolygon();if(!t.details){return}if(this.roofPolygonsSolarPanels[t._id]){delete this.roofPolygonsSolarPanels[t._id]}const n={...this.solarPanel,widthMeters:this.solarPanel.widthMeters/this.pixelInMeters,heightMeters:this.solarPanel.heightMeters/this.pixelInMeters};const e=y/this.pixelInMeters;const i=ht(t,Object.values(this.obstructionPolygons),n,t.details?.azimuth,e,t.details?.pitch);this.roofPolygonsSolarPanels={...this.roofPolygonsSolarPanels,[t._id]:{positionedPanels:i,sunniness:t.details?.assignedRoofStats?.stats.sunshineQuantiles[5]??this.buildingInsights.solarPotential.buildingStats.sunshineQuantiles[5]??x}};this.drawPolygons()}handlePitchChange(t){const n=t.target;const e=parseFloat(n.value);const i=this.getCurrentPolygon();if(i){this.roofPolygons[i._id].details.pitch=e}if(i.type==="roof"&&this.roofPolygonsSolarPanels[i._id]){this.calculateSolarPanels();return}}handleAzimuthChange(t){const n=t.target;const e=parseFloat(n.value);const i=this.getCurrentPolygon();if(i){this.roofPolygons[i._id].details.azimuth=e}if(i.type==="roof"&&this.roofPolygonsSolarPanels[i._id]){this.calculateSolarPanels();return}}handleToolSelect(t){this.currentTool=t}render(){const t=gt(this.language);const e=this.getCurrentPolygon();return n("div",{key:"16a466a7726ff3fa023dadcc42dcd8afda72243c",class:"flex flex-col justify-center items-center w-full h-full gap-4"},this.loadingState==="empty"&&n("div",{key:"52a8c08765bf0d9df5035e28c9f83887b0c92954",class:"absolute h-16"},n("p",{key:"c841d9e3556a0036bacdb9636854051b9dabce93",class:"text-white text-center h-full flex items-center justify-center rounded-4xl p-4",style:{backgroundColor:"rgba(0, 0, 0, 0.5)"}},t.mapDraw.noAddressSelected)),this.latitude&&this.longitude&&this.loadingState!=="loaded"&&n("div",{key:"391c7ec94e59db3ec783e9b00558b9cd85bd6b16",class:"absolute flex items-center justify-center bg-white bg-opacity-75 z-20 pt-7 rounded-4xl"},n("div",{key:"1a4c89acbb2289e7fe08b87d5f94d400ed5058c2",class:"animate-spin rounded-full h-16 w-16 border-t-2 border-b-2 border-[#271200]"})),n("div",{key:"4549d63240b420c46136c42bd00d59b59d3b961b",class:"flex lg:gap-4 rounded-4xl bg-[#f3ebda] p-4"},E.map((e=>{const i=t.mapDraw.tools[e.name];return n("button",{class:`px-4 py-2 rounded-4xl transition-colors duration-200 hover:bg-[#964500] ${this.currentTool.name===e.name?"bg-[#271200] hover:bg-[#964500]":"bg-[#f3ebda] hover:bg-[#964500]"}`,style:{color:this.currentTool.name===e.name?"#ffffff":"#000000"},"aria-label":i.ariaLabel,title:i.explanation,onClick:()=>this.handleToolSelect(e)},n("div",{class:"flex items-center gap-1 flex-col"},n("icon-selector",{name:e.icon}),n("span",null,i.name)))}))),n("div",{key:"1d36068f300962b0f2ccbccd484076915412fbf1",class:"flex gap-4 items-start justify-center h-full"},n("div",{key:"6a2492de11750cacedc3ffc9a9e01c66fa6e6031",class:"relative flex-1 h-full p-4 rounded-4xl flex items-center justify-center",style:{width:`${this.rgbTiff?.width*wt||0}px`,height:`${this.rgbTiff?.height*wt||0}px`}},n("canvas",{key:"93a50ba293f226152e614718767df0ffa274a08a",ref:t=>this.canvasElement=t,class:`absolute top-0 left-0 z-1 rounded-4xl m-auto`,style:{cursor:this.currentTool.cursor}}),n("canvas",{key:"4207b77d0f4b4cbcbb91d800328c9dc33740935e",ref:t=>this.polygonCanvas=t,class:`absolute top-0 left-0 z-10 rounded-4xl m-auto`,style:{cursor:this.currentTool.cursor}}))),n("div",{key:"89780b73df8b242f9b3da63ecdcc59a3bd72eb54",class:"flex gap-4 flex-row justify-center items-center"},n("div",{key:"1505f155bff334fb693c606d9e6eaca62c355d1e",class:"w-52 bg-[#f3ebda] rounded-4xl p-4"},n("h3",{key:"aee747835a6458d930170d5a88e1225a0414ad2a",class:"text-lg font-semibold mb-4 text-center"},t.mapDraw.information),e?.details?n("div",{class:"space-y-4"},n("div",{class:"flex flex-col gap-2"},n("button",{class:"px-4 py-2 bg-[#271200] rounded-4xl hover:bg-[#964500] transition-colors duration-200",onClick:()=>this.calculateSolarPanels(),style:{color:"#ffffff"}},t.mapDraw.calculateSolarPanels),this.roofPolygonsSolarPanels[e._id]&&n("p",{class:"text-lg text-center"},this.roofPolygonsSolarPanels[e._id].positionedPanels.length," ",t.mapDraw.panels)),n("div",null,n("h4",{class:"text-sm font-medium text-gray-600"},t.mapDraw.area),n("p",{class:"text-lg"},e.details?.area.toFixed(2)," m²")),n("div",null,n("h4",{class:"text-sm font-medium text-gray-600"},"Orientation"),n("div",{class:"flex gap-2 flex-row justify-start"},n("input",{class:"text-lg w-full",onKeyDown:t=>{if(t.key==="Enter"){this.handleAzimuthChange(t);t.target.blur()}},value:e.details?.azimuth}),"(",$(e.details?.azimuth),")")),n("div",null,n("h4",{class:"text-sm font-medium text-gray-600"},t.mapDraw.pitch),n("div",{class:"flex gap-2 flex-row justify-start"},n("input",{class:"text-lg w-full",onKeyDown:t=>{if(t.key==="Enter"){this.handlePitchChange(t);t.target.blur()}},value:e.details?.pitch}),"°"))):n("p",{class:"text-gray-500 text-center"},t.mapDraw.noPolygonSelected))),n("solar-system-form",{key:"89f1027028058c0c01f2be0f57ef099792805720",systemConfigs:this.roofPolygonsSolarPanels,language:this.language,roofPolygons:this.roofPolygons,obstructionPolygons:this.obstructionPolygons}))}static get watchers(){return{latitude:["getBuildingInsights","getBuildingImages"],longitude:["getBuildingInsights","getBuildingImages"],rgbTiff:["drawMap"],buildingInsights:["drawMap"],canvasElement:["drawMap"]}}};mt.style=bt;const yt='/*! tailwindcss v4.1.7 | MIT License | https://tailwindcss.com */\n@layer properties;\n@layer theme, base, components, utilities;\n@layer theme {\n :root, :host {\n --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",\n "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";\n --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",\n "Courier New", monospace;\n --color-red-500: oklch(63.7% 0.237 25.331);\n --color-green-600: oklch(62.7% 0.194 149.214);\n --color-blue-500: oklch(62.3% 0.214 259.815);\n --color-gray-50: oklch(98.5% 0.002 247.839);\n --color-gray-200: oklch(92.8% 0.006 264.531);\n --color-gray-300: oklch(87.2% 0.01 258.338);\n --color-gray-400: oklch(70.7% 0.022 261.325);\n --color-gray-500: oklch(55.1% 0.027 264.364);\n --color-gray-600: oklch(44.6% 0.03 256.802);\n --color-gray-700: oklch(37.3% 0.034 259.733);\n --color-gray-800: oklch(27.8% 0.033 256.848);\n --color-white: #fff;\n --spacing: 0.25rem;\n --container-2xl: 42rem;\n --container-3xl: 48rem;\n --text-sm: 0.875rem;\n --text-sm--line-height: calc(1.25 / 0.875);\n --text-lg: 1.125rem;\n --text-lg--line-height: calc(1.75 / 1.125);\n --text-xl: 1.25rem;\n --text-xl--line-height: calc(1.75 / 1.25);\n --text-2xl: 1.5rem;\n --text-2xl--line-height: calc(2 / 1.5);\n --text-3xl: 1.875rem;\n --text-3xl--line-height: calc(2.25 / 1.875);\n --font-weight-medium: 500;\n --font-weight-semibold: 600;\n --font-weight-bold: 700;\n --radius-lg: 0.5rem;\n --radius-xl: 0.75rem;\n --radius-2xl: 1rem;\n --radius-4xl: 2rem;\n --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);\n --animate-spin: spin 1s linear infinite;\n --default-transition-duration: 150ms;\n --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n --default-font-family: var(--font-sans);\n --default-mono-font-family: var(--font-mono);\n }\n}\n@layer base {\n *, ::after, ::before, ::backdrop, ::file-selector-button {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: 0 solid;\n }\n html, :host {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n tab-size: 4;\n font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");\n font-feature-settings: var(--default-font-feature-settings, normal);\n font-variation-settings: var(--default-font-variation-settings, normal);\n -webkit-tap-highlight-color: transparent;\n }\n hr {\n height: 0;\n color: inherit;\n border-top-width: 1px;\n }\n abbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n h1, h2, h3, h4, h5, h6 {\n font-size: inherit;\n font-weight: inherit;\n }\n a {\n color: inherit;\n -webkit-text-decoration: inherit;\n text-decoration: inherit;\n }\n b, strong {\n font-weight: bolder;\n }\n code, kbd, samp, pre {\n font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);\n font-feature-settings: var(--default-mono-font-feature-settings, normal);\n font-variation-settings: var(--default-mono-font-variation-settings, normal);\n font-size: 1em;\n }\n small {\n font-size: 80%;\n }\n sub, sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n sub {\n bottom: -0.25em;\n }\n sup {\n top: -0.5em;\n }\n table {\n text-indent: 0;\n border-color: inherit;\n border-collapse: collapse;\n }\n :-moz-focusring {\n outline: auto;\n }\n progress {\n vertical-align: baseline;\n }\n summary {\n display: list-item;\n }\n ol, ul, menu {\n list-style: none;\n }\n img, svg, video, canvas, audio, iframe, embed, object {\n display: block;\n vertical-align: middle;\n }\n img, video {\n max-width: 100%;\n height: auto;\n }\n button, input, select, optgroup, textarea, ::file-selector-button {\n font: inherit;\n font-feature-settings: inherit;\n font-variation-settings: inherit;\n letter-spacing: inherit;\n color: inherit;\n border-radius: 0;\n background-color: transparent;\n opacity: 1;\n }\n :where(select:is([multiple], [size])) optgroup {\n font-weight: bolder;\n }\n :where(select:is([multiple], [size])) optgroup option {\n padding-inline-start: 20px;\n }\n ::file-selector-button {\n margin-inline-end: 4px;\n }\n ::placeholder {\n opacity: 1;\n }\n @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {\n ::placeholder {\n color: currentcolor;\n @supports (color: color-mix(in lab, red, red)) {\n color: color-mix(in oklab, currentcolor 50%, transparent);\n }\n }\n }\n textarea {\n resize: vertical;\n }\n ::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n ::-webkit-date-and-time-value {\n min-height: 1lh;\n text-align: inherit;\n }\n ::-webkit-datetime-edit {\n display: inline-flex;\n }\n ::-webkit-datetime-edit-fields-wrapper {\n padding: 0;\n }\n ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {\n padding-block: 0;\n }\n :-moz-ui-invalid {\n box-shadow: none;\n }\n button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button {\n appearance: button;\n }\n ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {\n height: auto;\n }\n [hidden]:where(:not([hidden="until-found"])) {\n display: none !important;\n }\n}\n@layer utilities {\n .pointer-events-none {\n pointer-events: none;\n }\n .absolute {\n position: absolute;\n }\n .relative {\n position: relative;\n }\n .top-0 {\n top: calc(var(--spacing) * 0);\n }\n .top-1 {\n top: calc(var(--spacing) * 1);\n }\n .top-1\\/2 {\n top: calc(1/2 * 100%);\n }\n .bottom-full {\n bottom: 100%;\n }\n .left-0 {\n left: calc(var(--spacing) * 0);\n }\n .left-1 {\n left: calc(var(--spacing) * 1);\n }\n .left-1\\/2 {\n left: calc(1/2 * 100%);\n }\n .left-3 {\n left: calc(var(--spacing) * 3);\n }\n .z-1 {\n z-index: 1;\n }\n .z-10 {\n z-index: 10;\n }\n .z-20 {\n z-index: 20;\n }\n .m-auto {\n margin: auto;\n }\n .mt-1 {\n margin-top: calc(var(--spacing) * 1);\n }\n .mt-4 {\n margin-top: calc(var(--spacing) * 4);\n }\n .mb-1 {\n margin-bottom: calc(var(--spacing) * 1);\n }\n .mb-2 {\n margin-bottom: calc(var(--spacing) * 2);\n }\n .mb-4 {\n margin-bottom: calc(var(--spacing) * 4);\n }\n .block {\n display: block;\n }\n .flex {\n display: flex;\n }\n .grid {\n display: grid;\n }\n .table {\n display: table;\n }\n .h-5 {\n height: calc(var(--spacing) * 5);\n }\n .h-16 {\n height: calc(var(--spacing) * 16);\n }\n .h-48 {\n height: calc(var(--spacing) * 48);\n }\n .h-full {\n height: 100%;\n }\n .w-5 {\n width: calc(var(--spacing) * 5);\n }\n .w-16 {\n width: calc(var(--spacing) * 16);\n }\n .w-52 {\n width: calc(var(--spacing) * 52);\n }\n .w-64 {\n width: calc(var(--spacing) * 64);\n }\n .w-full {\n width: 100%;\n }\n .max-w-2xl {\n max-width: var(--container-2xl);\n }\n .flex-1 {\n flex: 1;\n }\n .border-collapse {\n border-collapse: collapse;\n }\n .-translate-x-1 {\n --tw-translate-x: calc(var(--spacing) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-x-1\\/2 {\n --tw-translate-x: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-y-1 {\n --tw-translate-y: calc(var(--spacing) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-y-1\\/2 {\n --tw-translate-y: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .transform {\n transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);\n }\n .animate-spin {\n animation: var(--animate-spin);\n }\n .cursor-help {\n cursor: help;\n }\n .resize {\n resize: both;\n }\n .grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n .flex-col {\n flex-direction: column;\n }\n .flex-row {\n flex-direction: row;\n }\n .items-center {\n align-items: center;\n }\n .items-start {\n align-items: flex-start;\n }\n .justify-between {\n justify-content: space-between;\n }\n .justify-center {\n justify-content: center;\n }\n .justify-start {\n justify-content: flex-start;\n }\n .gap-1 {\n gap: calc(var(--spacing) * 1);\n }\n .gap-2 {\n gap: calc(var(--spacing) * 2);\n }\n .gap-4 {\n gap: calc(var(--spacing) * 4);\n }\n .space-y-4 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .space-y-6 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .rounded-4xl {\n border-radius: var(--radius-4xl);\n }\n .rounded-full {\n border-radius: calc(infinity * 1px);\n }\n .rounded-lg {\n border-radius: var(--radius-lg);\n }\n .border {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n .border-t {\n border-top-style: var(--tw-border-style);\n border-top-width: 1px;\n }\n .border-t-2 {\n border-top-style: var(--tw-border-style);\n border-top-width: 2px;\n }\n .border-b-2 {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 2px;\n }\n .border-\\[\\#271200\\] {\n border-color: #271200;\n }\n .border-gray-200 {\n border-color: var(--color-gray-200);\n }\n .border-gray-300 {\n border-color: var(--color-gray-300);\n }\n .border-red-500 {\n border-color: var(--color-red-500);\n }\n .bg-\\[\\#271200\\] {\n background-color: #271200;\n }\n .bg-\\[\\#f3ebda\\] {\n background-color: #f3ebda;\n }\n .bg-gray-800 {\n background-color: var(--color-gray-800);\n }\n .bg-white {\n background-color: var(--color-white);\n }\n .p-2 {\n padding: calc(var(--spacing) * 2);\n }\n .p-3 {\n padding: calc(var(--spacing) * 3);\n }\n .p-4 {\n padding: calc(var(--spacing) * 4);\n }\n .p-6 {\n padding: calc(var(--spacing) * 6);\n }\n .px-4 {\n padding-inline: calc(var(--spacing) * 4);\n }\n .py-2 {\n padding-block: calc(var(--spacing) * 2);\n }\n .pt-4 {\n padding-top: calc(var(--spacing) * 4);\n }\n .pt-7 {\n padding-top: calc(var(--spacing) * 7);\n }\n .pr-4 {\n padding-right: calc(var(--spacing) * 4);\n }\n .pb-3 {\n padding-bottom: calc(var(--spacing) * 3);\n }\n .pl-10 {\n padding-left: calc(var(--spacing) * 10);\n }\n .text-center {\n text-align: center;\n }\n .text-2xl {\n font-size: var(--text-2xl);\n line-height: var(--tw-leading, var(--text-2xl--line-height));\n }\n .text-lg {\n font-size: var(--text-lg);\n line-height: var(--tw-leading, var(--text-lg--line-height));\n }\n .text-sm {\n font-size: var(--text-sm);\n line-height: var(--tw-leading, var(--text-sm--line-height));\n }\n .text-xl {\n font-size: var(--text-xl);\n line-height: var(--tw-leading, var(--text-xl--line-height));\n }\n .font-bold {\n --tw-font-weight: var(--font-weight-bold);\n font-weight: var(--font-weight-bold);\n }\n .font-medium {\n --tw-font-weight: var(--font-weight-medium);\n font-weight: var(--font-weight-medium);\n }\n .font-semibold {\n --tw-font-weight: var(--font-weight-semibold);\n font-weight: var(--font-weight-semibold);\n }\n .text-\\[\\#271200\\] {\n color: #271200;\n }\n .text-gray-400 {\n color: var(--color-gray-400);\n }\n .text-gray-500 {\n color: var(--color-gray-500);\n }\n .text-gray-600 {\n color: var(--color-gray-600);\n }\n .text-green-600 {\n color: var(--color-green-600);\n }\n .text-red-500 {\n color: var(--color-red-500);\n }\n .text-white {\n color: var(--color-white);\n }\n .underline {\n text-decoration-line: underline;\n }\n .opacity-0 {\n opacity: 0%;\n }\n .shadow {\n --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .outline {\n outline-style: var(--tw-outline-style);\n outline-width: 1px;\n }\n .transition-colors {\n transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-opacity {\n transition-property: opacity;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .duration-200 {\n --tw-duration: 200ms;\n transition-duration: 200ms;\n }\n .group-hover\\:opacity-100 {\n &:is(:where(.group):hover *) {\n @media (hover: hover) {\n opacity: 100%;\n }\n }\n }\n .hover\\:bg-\\[\\#964500\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #964500;\n }\n }\n }\n .focus\\:border-transparent {\n &:focus {\n border-color: transparent;\n }\n }\n .focus\\:ring-2 {\n &:focus {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n }\n .focus\\:ring-\\[\\#964500\\] {\n &:focus {\n --tw-ring-color: #964500;\n }\n }\n .focus\\:ring-blue-500 {\n &:focus {\n --tw-ring-color: var(--color-blue-500);\n }\n }\n .focus\\:outline-none {\n &:focus {\n --tw-outline-style: none;\n outline-style: none;\n }\n }\n .lg\\:gap-4 {\n @media (width >= 64rem) {\n gap: calc(var(--spacing) * 4);\n }\n }\n}\n@property --tw-translate-x {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-y {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-z {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-rotate-x {\n syntax: "*";\n inherits: false;\n}\n@property --tw-rotate-y {\n syntax: "*";\n inherits: false;\n}\n@property --tw-rotate-z {\n syntax: "*";\n inherits: false;\n}\n@property --tw-skew-x {\n syntax: "*";\n inherits: false;\n}\n@property --tw-skew-y {\n syntax: "*";\n inherits: false;\n}\n@property --tw-space-y-reverse {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-border-style {\n syntax: "*";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-font-weight {\n syntax: "*";\n inherits: false;\n}\n@property --tw-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-shadow-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-shadow-alpha {\n syntax: "<percentage>";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-inset-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-shadow-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-inset-shadow-alpha {\n syntax: "<percentage>";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-ring-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-ring-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-ring-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-inset-ring-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-ring-inset {\n syntax: "*";\n inherits: false;\n}\n@property --tw-ring-offset-width {\n syntax: "<length>";\n inherits: false;\n initial-value: 0px;\n}\n@property --tw-ring-offset-color {\n syntax: "*";\n inherits: false;\n initial-value: #fff;\n}\n@property --tw-ring-offset-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-outline-style {\n syntax: "*";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-duration {\n syntax: "*";\n inherits: false;\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n@layer properties {\n @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {\n *, ::before, ::after, ::backdrop {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-translate-z: 0;\n --tw-rotate-x: initial;\n --tw-rotate-y: initial;\n --tw-rotate-z: initial;\n --tw-skew-x: initial;\n --tw-skew-y: initial;\n --tw-space-y-reverse: 0;\n --tw-border-style: solid;\n --tw-font-weight: initial;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-color: initial;\n --tw-shadow-alpha: 100%;\n --tw-inset-shadow: 0 0 #0000;\n --tw-inset-shadow-color: initial;\n --tw-inset-shadow-alpha: 100%;\n --tw-ring-color: initial;\n --tw-ring-shadow: 0 0 #0000;\n --tw-inset-ring-color: initial;\n --tw-inset-ring-shadow: 0 0 #0000;\n --tw-ring-inset: initial;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-outline-style: solid;\n --tw-duration: initial;\n }\n }\n}\n';const xt=class{constructor(n){t(this,n)}render(){return n("svg",{key:"936ac8ac2ae494b01e2ce3bd0cc6725f611f4978",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-move-icon lucide-move"},n("path",{key:"f14f0dc820ed067413bce75a5b79869061b468d5",d:"M12 2v20"}),n("path",{key:"9c9db2a19d692ae8e20efedd6f284c882b109f6d",d:"m15 19-3 3-3-3"}),n("path",{key:"4337b52c7868038fa04ab339fc7b8df3f3693b25",d:"m19 9 3 3-3 3"}),n("path",{key:"e069b6a00ed4c3ad30dd7b0406150ac045d3ea60",d:"M2 12h20"}),n("path",{key:"2191f33b0cd92de41ea14aadd14a38fe23d22b2a",d:"m5 9-3 3 3 3"}),n("path",{key:"363eb2dc0ebcb202bbb15f1687ebaf0f53a468ee",d:"m9 5 3-3 3 3"}))}};xt.style=yt;const vt='/*! tailwindcss v4.1.7 | MIT License | https://tailwindcss.com */\n@layer properties;\n@layer theme, base, components, utilities;\n@layer theme {\n :root, :host {\n --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",\n "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";\n --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",\n "Courier New", monospace;\n --color-red-500: oklch(63.7% 0.237 25.331);\n --color-green-600: oklch(62.7% 0.194 149.214);\n --color-blue-500: oklch(62.3% 0.214 259.815);\n --color-gray-50: oklch(98.5% 0.002 247.839);\n --color-gray-200: oklch(92.8% 0.006 264.531);\n --color-gray-300: oklch(87.2% 0.01 258.338);\n --color-gray-400: oklch(70.7% 0.022 261.325);\n --color-gray-500: oklch(55.1% 0.027 264.364);\n --color-gray-600: oklch(44.6% 0.03 256.802);\n --color-gray-700: oklch(37.3% 0.034 259.733);\n --color-gray-800: oklch(27.8% 0.033 256.848);\n --color-white: #fff;\n --spacing: 0.25rem;\n --container-2xl: 42rem;\n --container-3xl: 48rem;\n --text-sm: 0.875rem;\n --text-sm--line-height: calc(1.25 / 0.875);\n --text-lg: 1.125rem;\n --text-lg--line-height: calc(1.75 / 1.125);\n --text-xl: 1.25rem;\n --text-xl--line-height: calc(1.75 / 1.25);\n --text-2xl: 1.5rem;\n --text-2xl--line-height: calc(2 / 1.5);\n --text-3xl: 1.875rem;\n --text-3xl--line-height: calc(2.25 / 1.875);\n --font-weight-medium: 500;\n --font-weight-semibold: 600;\n --font-weight-bold: 700;\n --radius-lg: 0.5rem;\n --radius-xl: 0.75rem;\n --radius-2xl: 1rem;\n --radius-4xl: 2rem;\n --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);\n --animate-spin: spin 1s linear infinite;\n --default-transition-duration: 150ms;\n --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n --default-font-family: var(--font-sans);\n --default-mono-font-family: var(--font-mono);\n }\n}\n@layer base {\n *, ::after, ::before, ::backdrop, ::file-selector-button {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: 0 solid;\n }\n html, :host {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n tab-size: 4;\n font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");\n font-feature-settings: var(--default-font-feature-settings, normal);\n font-variation-settings: var(--default-font-variation-settings, normal);\n -webkit-tap-highlight-color: transparent;\n }\n hr {\n height: 0;\n color: inherit;\n border-top-width: 1px;\n }\n abbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n h1, h2, h3, h4, h5, h6 {\n font-size: inherit;\n font-weight: inherit;\n }\n a {\n color: inherit;\n -webkit-text-decoration: inherit;\n text-decoration: inherit;\n }\n b, strong {\n font-weight: bolder;\n }\n code, kbd, samp, pre {\n font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);\n font-feature-settings: var(--default-mono-font-feature-settings, normal);\n font-variation-settings: var(--default-mono-font-variation-settings, normal);\n font-size: 1em;\n }\n small {\n font-size: 80%;\n }\n sub, sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n sub {\n bottom: -0.25em;\n }\n sup {\n top: -0.5em;\n }\n table {\n text-indent: 0;\n border-color: inherit;\n border-collapse: collapse;\n }\n :-moz-focusring {\n outline: auto;\n }\n progress {\n vertical-align: baseline;\n }\n summary {\n display: list-item;\n }\n ol, ul, menu {\n list-style: none;\n }\n img, svg, video, canvas, audio, iframe, embed, object {\n display: block;\n vertical-align: middle;\n }\n img, video {\n max-width: 100%;\n height: auto;\n }\n button, input, select, optgroup, textarea, ::file-selector-button {\n font: inherit;\n font-feature-settings: inherit;\n font-variation-settings: inherit;\n letter-spacing: inherit;\n color: inherit;\n border-radius: 0;\n background-color: transparent;\n opacity: 1;\n }\n :where(select:is([multiple], [size])) optgroup {\n font-weight: bolder;\n }\n :where(select:is([multiple], [size])) optgroup option {\n padding-inline-start: 20px;\n }\n ::file-selector-button {\n margin-inline-end: 4px;\n }\n ::placeholder {\n opacity: 1;\n }\n @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {\n ::placeholder {\n color: currentcolor;\n @supports (color: color-mix(in lab, red, red)) {\n color: color-mix(in oklab, currentcolor 50%, transparent);\n }\n }\n }\n textarea {\n resize: vertical;\n }\n ::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n ::-webkit-date-and-time-value {\n min-height: 1lh;\n text-align: inherit;\n }\n ::-webkit-datetime-edit {\n display: inline-flex;\n }\n ::-webkit-datetime-edit-fields-wrapper {\n padding: 0;\n }\n ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {\n padding-block: 0;\n }\n :-moz-ui-invalid {\n box-shadow: none;\n }\n button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button {\n appearance: button;\n }\n ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {\n height: auto;\n }\n [hidden]:where(:not([hidden="until-found"])) {\n display: none !important;\n }\n}\n@layer utilities {\n .pointer-events-none {\n pointer-events: none;\n }\n .absolute {\n position: absolute;\n }\n .relative {\n position: relative;\n }\n .top-0 {\n top: calc(var(--spacing) * 0);\n }\n .top-1 {\n top: calc(var(--spacing) * 1);\n }\n .top-1\\/2 {\n top: calc(1/2 * 100%);\n }\n .bottom-full {\n bottom: 100%;\n }\n .left-0 {\n left: calc(var(--spacing) * 0);\n }\n .left-1 {\n left: calc(var(--spacing) * 1);\n }\n .left-1\\/2 {\n left: calc(1/2 * 100%);\n }\n .left-3 {\n left: calc(var(--spacing) * 3);\n }\n .z-1 {\n z-index: 1;\n }\n .z-10 {\n z-index: 10;\n }\n .z-20 {\n z-index: 20;\n }\n .m-auto {\n margin: auto;\n }\n .mt-1 {\n margin-top: calc(var(--spacing) * 1);\n }\n .mt-4 {\n margin-top: calc(var(--spacing) * 4);\n }\n .mb-1 {\n margin-bottom: calc(var(--spacing) * 1);\n }\n .mb-2 {\n margin-bottom: calc(var(--spacing) * 2);\n }\n .mb-4 {\n margin-bottom: calc(var(--spacing) * 4);\n }\n .block {\n display: block;\n }\n .flex {\n display: flex;\n }\n .grid {\n display: grid;\n }\n .table {\n display: table;\n }\n .h-5 {\n height: calc(var(--spacing) * 5);\n }\n .h-16 {\n height: calc(var(--spacing) * 16);\n }\n .h-48 {\n height: calc(var(--spacing) * 48);\n }\n .h-full {\n height: 100%;\n }\n .w-5 {\n width: calc(var(--spacing) * 5);\n }\n .w-16 {\n width: calc(var(--spacing) * 16);\n }\n .w-52 {\n width: calc(var(--spacing) * 52);\n }\n .w-64 {\n width: calc(var(--spacing) * 64);\n }\n .w-full {\n width: 100%;\n }\n .max-w-2xl {\n max-width: var(--container-2xl);\n }\n .flex-1 {\n flex: 1;\n }\n .border-collapse {\n border-collapse: collapse;\n }\n .-translate-x-1 {\n --tw-translate-x: calc(var(--spacing) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-x-1\\/2 {\n --tw-translate-x: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-y-1 {\n --tw-translate-y: calc(var(--spacing) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-y-1\\/2 {\n --tw-translate-y: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .transform {\n transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);\n }\n .animate-spin {\n animation: var(--animate-spin);\n }\n .cursor-help {\n cursor: help;\n }\n .resize {\n resize: both;\n }\n .grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n .flex-col {\n flex-direction: column;\n }\n .flex-row {\n flex-direction: row;\n }\n .items-center {\n align-items: center;\n }\n .items-start {\n align-items: flex-start;\n }\n .justify-between {\n justify-content: space-between;\n }\n .justify-center {\n justify-content: center;\n }\n .justify-start {\n justify-content: flex-start;\n }\n .gap-1 {\n gap: calc(var(--spacing) * 1);\n }\n .gap-2 {\n gap: calc(var(--spacing) * 2);\n }\n .gap-4 {\n gap: calc(var(--spacing) * 4);\n }\n .space-y-4 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .space-y-6 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .rounded-4xl {\n border-radius: var(--radius-4xl);\n }\n .rounded-full {\n border-radius: calc(infinity * 1px);\n }\n .rounded-lg {\n border-radius: var(--radius-lg);\n }\n .border {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n .border-t {\n border-top-style: var(--tw-border-style);\n border-top-width: 1px;\n }\n .border-t-2 {\n border-top-style: var(--tw-border-style);\n border-top-width: 2px;\n }\n .border-b-2 {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 2px;\n }\n .border-\\[\\#271200\\] {\n border-color: #271200;\n }\n .border-gray-200 {\n border-color: var(--color-gray-200);\n }\n .border-gray-300 {\n border-color: var(--color-gray-300);\n }\n .border-red-500 {\n border-color: var(--color-red-500);\n }\n .bg-\\[\\#271200\\] {\n background-color: #271200;\n }\n .bg-\\[\\#f3ebda\\] {\n background-color: #f3ebda;\n }\n .bg-gray-800 {\n background-color: var(--color-gray-800);\n }\n .bg-white {\n background-color: var(--color-white);\n }\n .p-2 {\n padding: calc(var(--spacing) * 2);\n }\n .p-3 {\n padding: calc(var(--spacing) * 3);\n }\n .p-4 {\n padding: calc(var(--spacing) * 4);\n }\n .p-6 {\n padding: calc(var(--spacing) * 6);\n }\n .px-4 {\n padding-inline: calc(var(--spacing) * 4);\n }\n .py-2 {\n padding-block: calc(var(--spacing) * 2);\n }\n .pt-4 {\n padding-top: calc(var(--spacing) * 4);\n }\n .pt-7 {\n padding-top: calc(var(--spacing) * 7);\n }\n .pr-4 {\n padding-right: calc(var(--spacing) * 4);\n }\n .pb-3 {\n padding-bottom: calc(var(--spacing) * 3);\n }\n .pl-10 {\n padding-left: calc(var(--spacing) * 10);\n }\n .text-center {\n text-align: center;\n }\n .text-2xl {\n font-size: var(--text-2xl);\n line-height: var(--tw-leading, var(--text-2xl--line-height));\n }\n .text-lg {\n font-size: var(--text-lg);\n line-height: var(--tw-leading, var(--text-lg--line-height));\n }\n .text-sm {\n font-size: var(--text-sm);\n line-height: var(--tw-leading, var(--text-sm--line-height));\n }\n .text-xl {\n font-size: var(--text-xl);\n line-height: var(--tw-leading, var(--text-xl--line-height));\n }\n .font-bold {\n --tw-font-weight: var(--font-weight-bold);\n font-weight: var(--font-weight-bold);\n }\n .font-medium {\n --tw-font-weight: var(--font-weight-medium);\n font-weight: var(--font-weight-medium);\n }\n .font-semibold {\n --tw-font-weight: var(--font-weight-semibold);\n font-weight: var(--font-weight-semibold);\n }\n .text-\\[\\#271200\\] {\n color: #271200;\n }\n .text-gray-400 {\n color: var(--color-gray-400);\n }\n .text-gray-500 {\n color: var(--color-gray-500);\n }\n .text-gray-600 {\n color: var(--color-gray-600);\n }\n .text-green-600 {\n color: var(--color-green-600);\n }\n .text-red-500 {\n color: var(--color-red-500);\n }\n .text-white {\n color: var(--color-white);\n }\n .underline {\n text-decoration-line: underline;\n }\n .opacity-0 {\n opacity: 0%;\n }\n .shadow {\n --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .outline {\n outline-style: var(--tw-outline-style);\n outline-width: 1px;\n }\n .transition-colors {\n transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-opacity {\n transition-property: opacity;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .duration-200 {\n --tw-duration: 200ms;\n transition-duration: 200ms;\n }\n .group-hover\\:opacity-100 {\n &:is(:where(.group):hover *) {\n @media (hover: hover) {\n opacity: 100%;\n }\n }\n }\n .hover\\:bg-\\[\\#964500\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #964500;\n }\n }\n }\n .focus\\:border-transparent {\n &:focus {\n border-color: transparent;\n }\n }\n .focus\\:ring-2 {\n &:focus {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n }\n .focus\\:ring-\\[\\#964500\\] {\n &:focus {\n --tw-ring-color: #964500;\n }\n }\n .focus\\:ring-blue-500 {\n &:focus {\n --tw-ring-color: var(--color-blue-500);\n }\n }\n .focus\\:outline-none {\n &:focus {\n --tw-outline-style: none;\n outline-style: none;\n }\n }\n .lg\\:gap-4 {\n @media (width >= 64rem) {\n gap: calc(var(--spacing) * 4);\n }\n }\n}\n@property --tw-translate-x {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-y {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-z {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-rotate-x {\n syntax: "*";\n inherits: false;\n}\n@property --tw-rotate-y {\n syntax: "*";\n inherits: false;\n}\n@property --tw-rotate-z {\n syntax: "*";\n inherits: false;\n}\n@property --tw-skew-x {\n syntax: "*";\n inherits: false;\n}\n@property --tw-skew-y {\n syntax: "*";\n inherits: false;\n}\n@property --tw-space-y-reverse {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-border-style {\n syntax: "*";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-font-weight {\n syntax: "*";\n inherits: false;\n}\n@property --tw-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-shadow-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-shadow-alpha {\n syntax: "<percentage>";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-inset-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-shadow-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-inset-shadow-alpha {\n syntax: "<percentage>";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-ring-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-ring-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-ring-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-inset-ring-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-ring-inset {\n syntax: "*";\n inherits: false;\n}\n@property --tw-ring-offset-width {\n syntax: "<length>";\n inherits: false;\n initial-value: 0px;\n}\n@property --tw-ring-offset-color {\n syntax: "*";\n inherits: false;\n initial-value: #fff;\n}\n@property --tw-ring-offset-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-outline-style {\n syntax: "*";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-duration {\n syntax: "*";\n inherits: false;\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n@layer properties {\n @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {\n *, ::before, ::after, ::backdrop {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-translate-z: 0;\n --tw-rotate-x: initial;\n --tw-rotate-y: initial;\n --tw-rotate-z: initial;\n --tw-skew-x: initial;\n --tw-skew-y: initial;\n --tw-space-y-reverse: 0;\n --tw-border-style: solid;\n --tw-font-weight: initial;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-color: initial;\n --tw-shadow-alpha: 100%;\n --tw-inset-shadow: 0 0 #0000;\n --tw-inset-shadow-color: initial;\n --tw-inset-shadow-alpha: 100%;\n --tw-ring-color: initial;\n --tw-ring-shadow: 0 0 #0000;\n --tw-inset-ring-color: initial;\n --tw-inset-ring-shadow: 0 0 #0000;\n --tw-ring-inset: initial;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-outline-style: solid;\n --tw-duration: initial;\n }\n }\n}\n';const kt=class{constructor(n){t(this,n)}render(){return n("svg",{key:"c1250c925b2ffe36221195c9dfd68595d2436cb3",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-octagon-minus-icon lucide-octagon-minus"},n("path",{key:"5a7741b029b9afa37a664eee5f5f560665f9d44b",d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z"}),n("path",{key:"fdb789647e05118cfcba10dbf2c001687a851ac4",d:"M8 12h8"}))}};kt.style=vt;const Mt='/*! tailwindcss v4.1.7 | MIT License | https://tailwindcss.com */\n@layer properties;\n@layer theme, base, components, utilities;\n@layer theme {\n :root, :host {\n --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",\n "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";\n --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",\n "Courier New", monospace;\n --color-red-500: oklch(63.7% 0.237 25.331);\n --color-green-600: oklch(62.7% 0.194 149.214);\n --color-blue-500: oklch(62.3% 0.214 259.815);\n --color-gray-50: oklch(98.5% 0.002 247.839);\n --color-gray-200: oklch(92.8% 0.006 264.531);\n --color-gray-300: oklch(87.2% 0.01 258.338);\n --color-gray-400: oklch(70.7% 0.022 261.325);\n --color-gray-500: oklch(55.1% 0.027 264.364);\n --color-gray-600: oklch(44.6% 0.03 256.802);\n --color-gray-700: oklch(37.3% 0.034 259.733);\n --color-gray-800: oklch(27.8% 0.033 256.848);\n --color-white: #fff;\n --spacing: 0.25rem;\n --container-2xl: 42rem;\n --container-3xl: 48rem;\n --text-sm: 0.875rem;\n --text-sm--line-height: calc(1.25 / 0.875);\n --text-lg: 1.125rem;\n --text-lg--line-height: calc(1.75 / 1.125);\n --text-xl: 1.25rem;\n --text-xl--line-height: calc(1.75 / 1.25);\n --text-2xl: 1.5rem;\n --text-2xl--line-height: calc(2 / 1.5);\n --text-3xl: 1.875rem;\n --text-3xl--line-height: calc(2.25 / 1.875);\n --font-weight-medium: 500;\n --font-weight-semibold: 600;\n --font-weight-bold: 700;\n --radius-lg: 0.5rem;\n --radius-xl: 0.75rem;\n --radius-2xl: 1rem;\n --radius-4xl: 2rem;\n --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);\n --animate-spin: spin 1s linear infinite;\n --default-transition-duration: 150ms;\n --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n --default-font-family: var(--font-sans);\n --default-mono-font-family: var(--font-mono);\n }\n}\n@layer base {\n *, ::after, ::before, ::backdrop, ::file-selector-button {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: 0 solid;\n }\n html, :host {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n tab-size: 4;\n font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");\n font-feature-settings: var(--default-font-feature-settings, normal);\n font-variation-settings: var(--default-font-variation-settings, normal);\n -webkit-tap-highlight-color: transparent;\n }\n hr {\n height: 0;\n color: inherit;\n border-top-width: 1px;\n }\n abbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n h1, h2, h3, h4, h5, h6 {\n font-size: inherit;\n font-weight: inherit;\n }\n a {\n color: inherit;\n -webkit-text-decoration: inherit;\n text-decoration: inherit;\n }\n b, strong {\n font-weight: bolder;\n }\n code, kbd, samp, pre {\n font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);\n font-feature-settings: var(--default-mono-font-feature-settings, normal);\n font-variation-settings: var(--default-mono-font-variation-settings, normal);\n font-size: 1em;\n }\n small {\n font-size: 80%;\n }\n sub, sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n sub {\n bottom: -0.25em;\n }\n sup {\n top: -0.5em;\n }\n table {\n text-indent: 0;\n border-color: inherit;\n border-collapse: collapse;\n }\n :-moz-focusring {\n outline: auto;\n }\n progress {\n vertical-align: baseline;\n }\n summary {\n display: list-item;\n }\n ol, ul, menu {\n list-style: none;\n }\n img, svg, video, canvas, audio, iframe, embed, object {\n display: block;\n vertical-align: middle;\n }\n img, video {\n max-width: 100%;\n height: auto;\n }\n button, input, select, optgroup, textarea, ::file-selector-button {\n font: inherit;\n font-feature-settings: inherit;\n font-variation-settings: inherit;\n letter-spacing: inherit;\n color: inherit;\n border-radius: 0;\n background-color: transparent;\n opacity: 1;\n }\n :where(select:is([multiple], [size])) optgroup {\n font-weight: bolder;\n }\n :where(select:is([multiple], [size])) optgroup option {\n padding-inline-start: 20px;\n }\n ::file-selector-button {\n margin-inline-end: 4px;\n }\n ::placeholder {\n opacity: 1;\n }\n @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {\n ::placeholder {\n color: currentcolor;\n @supports (color: color-mix(in lab, red, red)) {\n color: color-mix(in oklab, currentcolor 50%, transparent);\n }\n }\n }\n textarea {\n resize: vertical;\n }\n ::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n ::-webkit-date-and-time-value {\n min-height: 1lh;\n text-align: inherit;\n }\n ::-webkit-datetime-edit {\n display: inline-flex;\n }\n ::-webkit-datetime-edit-fields-wrapper {\n padding: 0;\n }\n ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {\n padding-block: 0;\n }\n :-moz-ui-invalid {\n box-shadow: none;\n }\n button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button {\n appearance: button;\n }\n ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {\n height: auto;\n }\n [hidden]:where(:not([hidden="until-found"])) {\n display: none !important;\n }\n}\n@layer utilities {\n .pointer-events-none {\n pointer-events: none;\n }\n .absolute {\n position: absolute;\n }\n .relative {\n position: relative;\n }\n .top-0 {\n top: calc(var(--spacing) * 0);\n }\n .top-1 {\n top: calc(var(--spacing) * 1);\n }\n .top-1\\/2 {\n top: calc(1/2 * 100%);\n }\n .bottom-full {\n bottom: 100%;\n }\n .left-0 {\n left: calc(var(--spacing) * 0);\n }\n .left-1 {\n left: calc(var(--spacing) * 1);\n }\n .left-1\\/2 {\n left: calc(1/2 * 100%);\n }\n .left-3 {\n left: calc(var(--spacing) * 3);\n }\n .z-1 {\n z-index: 1;\n }\n .z-10 {\n z-index: 10;\n }\n .z-20 {\n z-index: 20;\n }\n .m-auto {\n margin: auto;\n }\n .mt-1 {\n margin-top: calc(var(--spacing) * 1);\n }\n .mt-4 {\n margin-top: calc(var(--spacing) * 4);\n }\n .mb-1 {\n margin-bottom: calc(var(--spacing) * 1);\n }\n .mb-2 {\n margin-bottom: calc(var(--spacing) * 2);\n }\n .mb-4 {\n margin-bottom: calc(var(--spacing) * 4);\n }\n .block {\n display: block;\n }\n .flex {\n display: flex;\n }\n .grid {\n display: grid;\n }\n .table {\n display: table;\n }\n .h-5 {\n height: calc(var(--spacing) * 5);\n }\n .h-16 {\n height: calc(var(--spacing) * 16);\n }\n .h-48 {\n height: calc(var(--spacing) * 48);\n }\n .h-full {\n height: 100%;\n }\n .w-5 {\n width: calc(var(--spacing) * 5);\n }\n .w-16 {\n width: calc(var(--spacing) * 16);\n }\n .w-52 {\n width: calc(var(--spacing) * 52);\n }\n .w-64 {\n width: calc(var(--spacing) * 64);\n }\n .w-full {\n width: 100%;\n }\n .max-w-2xl {\n max-width: var(--container-2xl);\n }\n .flex-1 {\n flex: 1;\n }\n .border-collapse {\n border-collapse: collapse;\n }\n .-translate-x-1 {\n --tw-translate-x: calc(var(--spacing) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-x-1\\/2 {\n --tw-translate-x: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-y-1 {\n --tw-translate-y: calc(var(--spacing) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-y-1\\/2 {\n --tw-translate-y: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .transform {\n transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);\n }\n .animate-spin {\n animation: var(--animate-spin);\n }\n .cursor-help {\n cursor: help;\n }\n .resize {\n resize: both;\n }\n .grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n .flex-col {\n flex-direction: column;\n }\n .flex-row {\n flex-direction: row;\n }\n .items-center {\n align-items: center;\n }\n .items-start {\n align-items: flex-start;\n }\n .justify-between {\n justify-content: space-between;\n }\n .justify-center {\n justify-content: center;\n }\n .justify-start {\n justify-content: flex-start;\n }\n .gap-1 {\n gap: calc(var(--spacing) * 1);\n }\n .gap-2 {\n gap: calc(var(--spacing) * 2);\n }\n .gap-4 {\n gap: calc(var(--spacing) * 4);\n }\n .space-y-4 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .space-y-6 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .rounded-4xl {\n border-radius: var(--radius-4xl);\n }\n .rounded-full {\n border-radius: calc(infinity * 1px);\n }\n .rounded-lg {\n border-radius: var(--radius-lg);\n }\n .border {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n .border-t {\n border-top-style: var(--tw-border-style);\n border-top-width: 1px;\n }\n .border-t-2 {\n border-top-style: var(--tw-border-style);\n border-top-width: 2px;\n }\n .border-b-2 {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 2px;\n }\n .border-\\[\\#271200\\] {\n border-color: #271200;\n }\n .border-gray-200 {\n border-color: var(--color-gray-200);\n }\n .border-gray-300 {\n border-color: var(--color-gray-300);\n }\n .border-red-500 {\n border-color: var(--color-red-500);\n }\n .bg-\\[\\#271200\\] {\n background-color: #271200;\n }\n .bg-\\[\\#f3ebda\\] {\n background-color: #f3ebda;\n }\n .bg-gray-800 {\n background-color: var(--color-gray-800);\n }\n .bg-white {\n background-color: var(--color-white);\n }\n .p-2 {\n padding: calc(var(--spacing) * 2);\n }\n .p-3 {\n padding: calc(var(--spacing) * 3);\n }\n .p-4 {\n padding: calc(var(--spacing) * 4);\n }\n .p-6 {\n padding: calc(var(--spacing) * 6);\n }\n .px-4 {\n padding-inline: calc(var(--spacing) * 4);\n }\n .py-2 {\n padding-block: calc(var(--spacing) * 2);\n }\n .pt-4 {\n padding-top: calc(var(--spacing) * 4);\n }\n .pt-7 {\n padding-top: calc(var(--spacing) * 7);\n }\n .pr-4 {\n padding-right: calc(var(--spacing) * 4);\n }\n .pb-3 {\n padding-bottom: calc(var(--spacing) * 3);\n }\n .pl-10 {\n padding-left: calc(var(--spacing) * 10);\n }\n .text-center {\n text-align: center;\n }\n .text-2xl {\n font-size: var(--text-2xl);\n line-height: var(--tw-leading, var(--text-2xl--line-height));\n }\n .text-lg {\n font-size: var(--text-lg);\n line-height: var(--tw-leading, var(--text-lg--line-height));\n }\n .text-sm {\n font-size: var(--text-sm);\n line-height: var(--tw-leading, var(--text-sm--line-height));\n }\n .text-xl {\n font-size: var(--text-xl);\n line-height: var(--tw-leading, var(--text-xl--line-height));\n }\n .font-bold {\n --tw-font-weight: var(--font-weight-bold);\n font-weight: var(--font-weight-bold);\n }\n .font-medium {\n --tw-font-weight: var(--font-weight-medium);\n font-weight: var(--font-weight-medium);\n }\n .font-semibold {\n --tw-font-weight: var(--font-weight-semibold);\n font-weight: var(--font-weight-semibold);\n }\n .text-\\[\\#271200\\] {\n color: #271200;\n }\n .text-gray-400 {\n color: var(--color-gray-400);\n }\n .text-gray-500 {\n color: var(--color-gray-500);\n }\n .text-gray-600 {\n color: var(--color-gray-600);\n }\n .text-green-600 {\n color: var(--color-green-600);\n }\n .text-red-500 {\n color: var(--color-red-500);\n }\n .text-white {\n color: var(--color-white);\n }\n .underline {\n text-decoration-line: underline;\n }\n .opacity-0 {\n opacity: 0%;\n }\n .shadow {\n --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .outline {\n outline-style: var(--tw-outline-style);\n outline-width: 1px;\n }\n .transition-colors {\n transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-opacity {\n transition-property: opacity;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .duration-200 {\n --tw-duration: 200ms;\n transition-duration: 200ms;\n }\n .group-hover\\:opacity-100 {\n &:is(:where(.group):hover *) {\n @media (hover: hover) {\n opacity: 100%;\n }\n }\n }\n .hover\\:bg-\\[\\#964500\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #964500;\n }\n }\n }\n .focus\\:border-transparent {\n &:focus {\n border-color: transparent;\n }\n }\n .focus\\:ring-2 {\n &:focus {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n }\n .focus\\:ring-\\[\\#964500\\] {\n &:focus {\n --tw-ring-color: #964500;\n }\n }\n .focus\\:ring-blue-500 {\n &:focus {\n --tw-ring-color: var(--color-blue-500);\n }\n }\n .focus\\:outline-none {\n &:focus {\n --tw-outline-style: none;\n outline-style: none;\n }\n }\n .lg\\:gap-4 {\n @media (width >= 64rem) {\n gap: calc(var(--spacing) * 4);\n }\n }\n}\n@property --tw-translate-x {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-y {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-z {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-rotate-x {\n syntax: "*";\n inherits: false;\n}\n@property --tw-rotate-y {\n syntax: "*";\n inherits: false;\n}\n@property --tw-rotate-z {\n syntax: "*";\n inherits: false;\n}\n@property --tw-skew-x {\n syntax: "*";\n inherits: false;\n}\n@property --tw-skew-y {\n syntax: "*";\n inherits: false;\n}\n@property --tw-space-y-reverse {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-border-style {\n syntax: "*";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-font-weight {\n syntax: "*";\n inherits: false;\n}\n@property --tw-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-shadow-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-shadow-alpha {\n syntax: "<percentage>";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-inset-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-shadow-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-inset-shadow-alpha {\n syntax: "<percentage>";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-ring-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-ring-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-ring-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-inset-ring-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-ring-inset {\n syntax: "*";\n inherits: false;\n}\n@property --tw-ring-offset-width {\n syntax: "<length>";\n inherits: false;\n initial-value: 0px;\n}\n@property --tw-ring-offset-color {\n syntax: "*";\n inherits: false;\n initial-value: #fff;\n}\n@property --tw-ring-offset-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-outline-style {\n syntax: "*";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-duration {\n syntax: "*";\n inherits: false;\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n@layer properties {\n @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {\n *, ::before, ::after, ::backdrop {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-translate-z: 0;\n --tw-rotate-x: initial;\n --tw-rotate-y: initial;\n --tw-rotate-z: initial;\n --tw-skew-x: initial;\n --tw-skew-y: initial;\n --tw-space-y-reverse: 0;\n --tw-border-style: solid;\n --tw-font-weight: initial;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-color: initial;\n --tw-shadow-alpha: 100%;\n --tw-inset-shadow: 0 0 #0000;\n --tw-inset-shadow-color: initial;\n --tw-inset-shadow-alpha: 100%;\n --tw-ring-color: initial;\n --tw-ring-shadow: 0 0 #0000;\n --tw-inset-ring-color: initial;\n --tw-inset-ring-shadow: 0 0 #0000;\n --tw-ring-inset: initial;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-outline-style: solid;\n --tw-duration: initial;\n }\n }\n}\n';const zt=class{constructor(n){t(this,n)}render(){return n("svg",{key:"0e8ff56268e94ead08c1fe89b9a4eb9053542b9c",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-search-icon lucide-search"},n("path",{key:"a8f7b64ac7aa006921a28cf9a7457c0870328e62",d:"m21 21-4.34-4.34"}),n("circle",{key:"6dc9bd44e7f0288df59b6c939721084fb608c447",cx:"11",cy:"11",r:"8"}))}};zt.style=Mt;const St='/*! tailwindcss v4.1.7 | MIT License | https://tailwindcss.com */\n@layer properties;\n@layer theme, base, components, utilities;\n@layer theme {\n :root, :host {\n --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",\n "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";\n --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",\n "Courier New", monospace;\n --color-red-500: oklch(63.7% 0.237 25.331);\n --color-green-600: oklch(62.7% 0.194 149.214);\n --color-blue-500: oklch(62.3% 0.214 259.815);\n --color-gray-50: oklch(98.5% 0.002 247.839);\n --color-gray-200: oklch(92.8% 0.006 264.531);\n --color-gray-300: oklch(87.2% 0.01 258.338);\n --color-gray-400: oklch(70.7% 0.022 261.325);\n --color-gray-500: oklch(55.1% 0.027 264.364);\n --color-gray-600: oklch(44.6% 0.03 256.802);\n --color-gray-700: oklch(37.3% 0.034 259.733);\n --color-gray-800: oklch(27.8% 0.033 256.848);\n --color-white: #fff;\n --spacing: 0.25rem;\n --container-2xl: 42rem;\n --container-3xl: 48rem;\n --text-sm: 0.875rem;\n --text-sm--line-height: calc(1.25 / 0.875);\n --text-lg: 1.125rem;\n --text-lg--line-height: calc(1.75 / 1.125);\n --text-xl: 1.25rem;\n --text-xl--line-height: calc(1.75 / 1.25);\n --text-2xl: 1.5rem;\n --text-2xl--line-height: calc(2 / 1.5);\n --text-3xl: 1.875rem;\n --text-3xl--line-height: calc(2.25 / 1.875);\n --font-weight-medium: 500;\n --font-weight-semibold: 600;\n --font-weight-bold: 700;\n --radius-lg: 0.5rem;\n --radius-xl: 0.75rem;\n --radius-2xl: 1rem;\n --radius-4xl: 2rem;\n --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);\n --animate-spin: spin 1s linear infinite;\n --default-transition-duration: 150ms;\n --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n --default-font-family: var(--font-sans);\n --default-mono-font-family: var(--font-mono);\n }\n}\n@layer base {\n *, ::after, ::before, ::backdrop, ::file-selector-button {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: 0 solid;\n }\n html, :host {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n tab-size: 4;\n font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");\n font-feature-settings: var(--default-font-feature-settings, normal);\n font-variation-settings: var(--default-font-variation-settings, normal);\n -webkit-tap-highlight-color: transparent;\n }\n hr {\n height: 0;\n color: inherit;\n border-top-width: 1px;\n }\n abbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n h1, h2, h3, h4, h5, h6 {\n font-size: inherit;\n font-weight: inherit;\n }\n a {\n color: inherit;\n -webkit-text-decoration: inherit;\n text-decoration: inherit;\n }\n b, strong {\n font-weight: bolder;\n }\n code, kbd, samp, pre {\n font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);\n font-feature-settings: var(--default-mono-font-feature-settings, normal);\n font-variation-settings: var(--default-mono-font-variation-settings, normal);\n font-size: 1em;\n }\n small {\n font-size: 80%;\n }\n sub, sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n sub {\n bottom: -0.25em;\n }\n sup {\n top: -0.5em;\n }\n table {\n text-indent: 0;\n border-color: inherit;\n border-collapse: collapse;\n }\n :-moz-focusring {\n outline: auto;\n }\n progress {\n vertical-align: baseline;\n }\n summary {\n display: list-item;\n }\n ol, ul, menu {\n list-style: none;\n }\n img, svg, video, canvas, audio, iframe, embed, object {\n display: block;\n vertical-align: middle;\n }\n img, video {\n max-width: 100%;\n height: auto;\n }\n button, input, select, optgroup, textarea, ::file-selector-button {\n font: inherit;\n font-feature-settings: inherit;\n font-variation-settings: inherit;\n letter-spacing: inherit;\n color: inherit;\n border-radius: 0;\n background-color: transparent;\n opacity: 1;\n }\n :where(select:is([multiple], [size])) optgroup {\n font-weight: bolder;\n }\n :where(select:is([multiple], [size])) optgroup option {\n padding-inline-start: 20px;\n }\n ::file-selector-button {\n margin-inline-end: 4px;\n }\n ::placeholder {\n opacity: 1;\n }\n @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {\n ::placeholder {\n color: currentcolor;\n @supports (color: color-mix(in lab, red, red)) {\n color: color-mix(in oklab, currentcolor 50%, transparent);\n }\n }\n }\n textarea {\n resize: vertical;\n }\n ::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n ::-webkit-date-and-time-value {\n min-height: 1lh;\n text-align: inherit;\n }\n ::-webkit-datetime-edit {\n display: inline-flex;\n }\n ::-webkit-datetime-edit-fields-wrapper {\n padding: 0;\n }\n ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {\n padding-block: 0;\n }\n :-moz-ui-invalid {\n box-shadow: none;\n }\n button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button {\n appearance: button;\n }\n ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {\n height: auto;\n }\n [hidden]:where(:not([hidden="until-found"])) {\n display: none !important;\n }\n}\n@layer utilities {\n .pointer-events-none {\n pointer-events: none;\n }\n .absolute {\n position: absolute;\n }\n .relative {\n position: relative;\n }\n .top-0 {\n top: calc(var(--spacing) * 0);\n }\n .top-1 {\n top: calc(var(--spacing) * 1);\n }\n .top-1\\/2 {\n top: calc(1/2 * 100%);\n }\n .bottom-full {\n bottom: 100%;\n }\n .left-0 {\n left: calc(var(--spacing) * 0);\n }\n .left-1 {\n left: calc(var(--spacing) * 1);\n }\n .left-1\\/2 {\n left: calc(1/2 * 100%);\n }\n .left-3 {\n left: calc(var(--spacing) * 3);\n }\n .z-1 {\n z-index: 1;\n }\n .z-10 {\n z-index: 10;\n }\n .z-20 {\n z-index: 20;\n }\n .m-auto {\n margin: auto;\n }\n .mt-1 {\n margin-top: calc(var(--spacing) * 1);\n }\n .mt-4 {\n margin-top: calc(var(--spacing) * 4);\n }\n .mb-1 {\n margin-bottom: calc(var(--spacing) * 1);\n }\n .mb-2 {\n margin-bottom: calc(var(--spacing) * 2);\n }\n .mb-4 {\n margin-bottom: calc(var(--spacing) * 4);\n }\n .block {\n display: block;\n }\n .flex {\n display: flex;\n }\n .grid {\n display: grid;\n }\n .table {\n display: table;\n }\n .h-5 {\n height: calc(var(--spacing) * 5);\n }\n .h-16 {\n height: calc(var(--spacing) * 16);\n }\n .h-48 {\n height: calc(var(--spacing) * 48);\n }\n .h-full {\n height: 100%;\n }\n .w-5 {\n width: calc(var(--spacing) * 5);\n }\n .w-16 {\n width: calc(var(--spacing) * 16);\n }\n .w-52 {\n width: calc(var(--spacing) * 52);\n }\n .w-64 {\n width: calc(var(--spacing) * 64);\n }\n .w-full {\n width: 100%;\n }\n .max-w-2xl {\n max-width: var(--container-2xl);\n }\n .flex-1 {\n flex: 1;\n }\n .border-collapse {\n border-collapse: collapse;\n }\n .-translate-x-1 {\n --tw-translate-x: calc(var(--spacing) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-x-1\\/2 {\n --tw-translate-x: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-y-1 {\n --tw-translate-y: calc(var(--spacing) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-y-1\\/2 {\n --tw-translate-y: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .transform {\n transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);\n }\n .animate-spin {\n animation: var(--animate-spin);\n }\n .cursor-help {\n cursor: help;\n }\n .resize {\n resize: both;\n }\n .grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n .flex-col {\n flex-direction: column;\n }\n .flex-row {\n flex-direction: row;\n }\n .items-center {\n align-items: center;\n }\n .items-start {\n align-items: flex-start;\n }\n .justify-between {\n justify-content: space-between;\n }\n .justify-center {\n justify-content: center;\n }\n .justify-start {\n justify-content: flex-start;\n }\n .gap-1 {\n gap: calc(var(--spacing) * 1);\n }\n .gap-2 {\n gap: calc(var(--spacing) * 2);\n }\n .gap-4 {\n gap: calc(var(--spacing) * 4);\n }\n .space-y-4 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .space-y-6 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .rounded-4xl {\n border-radius: var(--radius-4xl);\n }\n .rounded-full {\n border-radius: calc(infinity * 1px);\n }\n .rounded-lg {\n border-radius: var(--radius-lg);\n }\n .border {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n .border-t {\n border-top-style: var(--tw-border-style);\n border-top-width: 1px;\n }\n .border-t-2 {\n border-top-style: var(--tw-border-style);\n border-top-width: 2px;\n }\n .border-b-2 {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 2px;\n }\n .border-\\[\\#271200\\] {\n border-color: #271200;\n }\n .border-gray-200 {\n border-color: var(--color-gray-200);\n }\n .border-gray-300 {\n border-color: var(--color-gray-300);\n }\n .border-red-500 {\n border-color: var(--color-red-500);\n }\n .bg-\\[\\#271200\\] {\n background-color: #271200;\n }\n .bg-\\[\\#f3ebda\\] {\n background-color: #f3ebda;\n }\n .bg-gray-800 {\n background-color: var(--color-gray-800);\n }\n .bg-white {\n background-color: var(--color-white);\n }\n .p-2 {\n padding: calc(var(--spacing) * 2);\n }\n .p-3 {\n padding: calc(var(--spacing) * 3);\n }\n .p-4 {\n padding: calc(var(--spacing) * 4);\n }\n .p-6 {\n padding: calc(var(--spacing) * 6);\n }\n .px-4 {\n padding-inline: calc(var(--spacing) * 4);\n }\n .py-2 {\n padding-block: calc(var(--spacing) * 2);\n }\n .pt-4 {\n padding-top: calc(var(--spacing) * 4);\n }\n .pt-7 {\n padding-top: calc(var(--spacing) * 7);\n }\n .pr-4 {\n padding-right: calc(var(--spacing) * 4);\n }\n .pb-3 {\n padding-bottom: calc(var(--spacing) * 3);\n }\n .pl-10 {\n padding-left: calc(var(--spacing) * 10);\n }\n .text-center {\n text-align: center;\n }\n .text-2xl {\n font-size: var(--text-2xl);\n line-height: var(--tw-leading, var(--text-2xl--line-height));\n }\n .text-lg {\n font-size: var(--text-lg);\n line-height: var(--tw-leading, var(--text-lg--line-height));\n }\n .text-sm {\n font-size: var(--text-sm);\n line-height: var(--tw-leading, var(--text-sm--line-height));\n }\n .text-xl {\n font-size: var(--text-xl);\n line-height: var(--tw-leading, var(--text-xl--line-height));\n }\n .font-bold {\n --tw-font-weight: var(--font-weight-bold);\n font-weight: var(--font-weight-bold);\n }\n .font-medium {\n --tw-font-weight: var(--font-weight-medium);\n font-weight: var(--font-weight-medium);\n }\n .font-semibold {\n --tw-font-weight: var(--font-weight-semibold);\n font-weight: var(--font-weight-semibold);\n }\n .text-\\[\\#271200\\] {\n color: #271200;\n }\n .text-gray-400 {\n color: var(--color-gray-400);\n }\n .text-gray-500 {\n color: var(--color-gray-500);\n }\n .text-gray-600 {\n color: var(--color-gray-600);\n }\n .text-green-600 {\n color: var(--color-green-600);\n }\n .text-red-500 {\n color: var(--color-red-500);\n }\n .text-white {\n color: var(--color-white);\n }\n .underline {\n text-decoration-line: underline;\n }\n .opacity-0 {\n opacity: 0%;\n }\n .shadow {\n --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .outline {\n outline-style: var(--tw-outline-style);\n outline-width: 1px;\n }\n .transition-colors {\n transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-opacity {\n transition-property: opacity;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .duration-200 {\n --tw-duration: 200ms;\n transition-duration: 200ms;\n }\n .group-hover\\:opacity-100 {\n &:is(:where(.group):hover *) {\n @media (hover: hover) {\n opacity: 100%;\n }\n }\n }\n .hover\\:bg-\\[\\#964500\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #964500;\n }\n }\n }\n .focus\\:border-transparent {\n &:focus {\n border-color: transparent;\n }\n }\n .focus\\:ring-2 {\n &:focus {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n }\n .focus\\:ring-\\[\\#964500\\] {\n &:focus {\n --tw-ring-color: #964500;\n }\n }\n .focus\\:ring-blue-500 {\n &:focus {\n --tw-ring-color: var(--color-blue-500);\n }\n }\n .focus\\:outline-none {\n &:focus {\n --tw-outline-style: none;\n outline-style: none;\n }\n }\n .lg\\:gap-4 {\n @media (width >= 64rem) {\n gap: calc(var(--spacing) * 4);\n }\n }\n}\n@property --tw-translate-x {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-y {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-z {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-rotate-x {\n syntax: "*";\n inherits: false;\n}\n@property --tw-rotate-y {\n syntax: "*";\n inherits: false;\n}\n@property --tw-rotate-z {\n syntax: "*";\n inherits: false;\n}\n@property --tw-skew-x {\n syntax: "*";\n inherits: false;\n}\n@property --tw-skew-y {\n syntax: "*";\n inherits: false;\n}\n@property --tw-space-y-reverse {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-border-style {\n syntax: "*";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-font-weight {\n syntax: "*";\n inherits: false;\n}\n@property --tw-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-shadow-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-shadow-alpha {\n syntax: "<percentage>";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-inset-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-shadow-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-inset-shadow-alpha {\n syntax: "<percentage>";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-ring-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-ring-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-ring-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-inset-ring-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-ring-inset {\n syntax: "*";\n inherits: false;\n}\n@property --tw-ring-offset-width {\n syntax: "<length>";\n inherits: false;\n initial-value: 0px;\n}\n@property --tw-ring-offset-color {\n syntax: "*";\n inherits: false;\n initial-value: #fff;\n}\n@property --tw-ring-offset-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-outline-style {\n syntax: "*";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-duration {\n syntax: "*";\n inherits: false;\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n@layer properties {\n @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {\n *, ::before, ::after, ::backdrop {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-translate-z: 0;\n --tw-rotate-x: initial;\n --tw-rotate-y: initial;\n --tw-rotate-z: initial;\n --tw-skew-x: initial;\n --tw-skew-y: initial;\n --tw-space-y-reverse: 0;\n --tw-border-style: solid;\n --tw-font-weight: initial;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-color: initial;\n --tw-shadow-alpha: 100%;\n --tw-inset-shadow: 0 0 #0000;\n --tw-inset-shadow-color: initial;\n --tw-inset-shadow-alpha: 100%;\n --tw-ring-color: initial;\n --tw-ring-shadow: 0 0 #0000;\n --tw-inset-ring-color: initial;\n --tw-inset-ring-shadow: 0 0 #0000;\n --tw-ring-inset: initial;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-outline-style: solid;\n --tw-duration: initial;\n }\n }\n}\n';const Ct=class{constructor(n){t(this,n)}get el(){return e(this)}apiKey=i.GOOGLE_MAPS_API_KEY;language="en";latitude=null;longitude=null;isLoaded=false;autocomplete=null;place=null;inputElement;componentWillLoad(){this.loadGoogleMapsScript()}async loadGoogleMapsScript(){try{const t=new r({apiKey:this.apiKey,libraries:["places"]});const n=await t.importLibrary("places");this.isLoaded=true;this.initializeAutocomplete(n)}catch(t){console.error("Error loading Google Maps: ",t)}}initializeAutocomplete(t){if(!this.inputElement||!this.isLoaded)return;this.autocomplete=new t.Autocomplete(this.inputElement);this.autocomplete.addListener("place_changed",(()=>{const t=this.autocomplete?.getPlace();this.latitude=t?.geometry?.location?.lat()??0;this.longitude=t?.geometry?.location?.lng()??0}))}render(){const t=gt(this.language);return n("div",{key:"fa09eea42dfd57eaaf2ef4655b88841d3f5fd2a8",class:"flex flex-col w-full h-full p-3 bg-white"},n("div",{key:"96f064d4c280e2e668a5807626a9486be36c8565",class:"pb-3"},n("div",{key:"41cb8197e5cc02fd22e7d62e78193d087ce58515",class:"relative"},n("div",{key:"c08c2aca502c2421391bad10a5227ca2f6ffa44e",class:"absolute left-3 top-1/2 transform -translate-y-1/2"},n("search-icon",{key:"487b4fcf984eb4e5bce29cf7c715869f33c20310"})),n("input",{key:"d6ce0129f903b4b27edb03bbd3670249924e7421",ref:t=>this.inputElement=t,type:"text",placeholder:t.solarExpert.searchPlaceholder,class:"w-full pl-10 pr-4 py-2 border border-gray-300 rounded-4xl focus:outline-none focus:ring-2 focus:ring-blue-500 bg-white"}))),n("map-draw",{key:"0556d2fa4fc3b30c7d283e09f609cf6301d57779",latitude:this.latitude,longitude:this.longitude,apiKey:this.apiKey,language:this.language}))}};Ct.style=St;
2
+ /*!
3
+ * @kurkle/color v0.3.4
4
+ * https://github.com/kurkle/color#readme
5
+ * (c) 2024 Jukka Kurkela
6
+ * Released under the MIT License
7
+ */function _t(t){return t+.5|0}const jt=(t,n,e)=>Math.max(Math.min(t,e),n);function Pt(t){return jt(_t(t*2.55),0,255)}function Ot(t){return jt(_t(t*255),0,255)}function Et(t){return jt(_t(t/2.55)/100,0,1)}function At(t){return jt(_t(t*100),0,100)}const 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};const Lt=[..."0123456789ABCDEF"];const Rt=t=>Lt[t&15];const Nt=t=>Lt[(t&240)>>4]+Lt[t&15];const It=t=>(t&240)>>4===(t&15);const Tt=t=>It(t.r)&&It(t.g)&&It(t.b)&&It(t.a);function Ft(t){var n=t.length;var e;if(t[0]==="#"){if(n===4||n===5){e={r:255&Dt[t[1]]*17,g:255&Dt[t[2]]*17,b:255&Dt[t[3]]*17,a:n===5?Dt[t[4]]*17:255}}else if(n===7||n===9){e={r:Dt[t[1]]<<4|Dt[t[2]],g:Dt[t[3]]<<4|Dt[t[4]],b:Dt[t[5]]<<4|Dt[t[6]],a:n===9?Dt[t[7]]<<4|Dt[t[8]]:255}}}return e}const Wt=(t,n)=>t<255?n(t):"";function Bt(t){var n=Tt(t)?Rt:Nt;return t?"#"+n(t.r)+n(t.g)+n(t.b)+Wt(t.a,n):undefined}const Ut=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Ht(t,n,e){const i=n*Math.min(e,1-e);const o=(n,o=(n+t/30)%12)=>e-i*Math.max(Math.min(o-3,9-o,1),-1);return[o(0),o(8),o(4)]}function Vt(t,n,e){const i=(i,o=(i+t/60)%6)=>e-e*n*Math.max(Math.min(o,4-o,1),0);return[i(5),i(3),i(1)]}function $t(t,n,e){const i=Ht(t,1,.5);let o;if(n+e>1){o=1/(n+e);n*=o;e*=o}for(o=0;o<3;o++){i[o]*=1-n-e;i[o]+=n}return i}function Yt(t,n,e,i,o){if(t===o){return(n-e)/i+(n<e?6:0)}if(n===o){return(e-t)/i+2}return(t-n)/i+4}function Xt(t){const n=255;const e=t.r/n;const i=t.g/n;const o=t.b/n;const s=Math.max(e,i,o);const r=Math.min(e,i,o);const a=(s+r)/2;let l,c,h;if(s!==r){h=s-r;c=a>.5?h/(2-s-r):h/(s+r);l=Yt(e,i,o,h,s);l=l*60+.5}return[l|0,c||0,a]}function Kt(t,n,e,i){return(Array.isArray(n)?t(n[0],n[1],n[2]):t(n,e,i)).map(Ot)}function qt(t,n,e){return Kt(Ht,t,n,e)}function Zt(t,n,e){return Kt($t,t,n,e)}function Jt(t,n,e){return Kt(Vt,t,n,e)}function Qt(t){return(t%360+360)%360}function Gt(t){const n=Ut.exec(t);let e=255;let i;if(!n){return}if(n[5]!==i){e=n[6]?Pt(+n[5]):Ot(+n[5])}const o=Qt(+n[2]);const s=+n[3]/100;const r=+n[4]/100;if(n[1]==="hwb"){i=Zt(o,s,r)}else if(n[1]==="hsv"){i=Jt(o,s,r)}else{i=qt(o,s,r)}return{r:i[0],g:i[1],b:i[2],a:e}}function tn(t,n){var e=Xt(t);e[0]=Qt(e[0]+n);e=qt(e);t.r=e[0];t.g=e[1];t.b=e[2]}function nn(t){if(!t){return}const n=Xt(t);const e=n[0];const i=At(n[1]);const o=At(n[2]);return t.a<255?`hsla(${e}, ${i}%, ${o}%, ${Et(t.a)})`:`hsl(${e}, ${i}%, ${o}%)`}const en={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"};const on={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function sn(){const t={};const n=Object.keys(on);const e=Object.keys(en);let i,o,s,r,a;for(i=0;i<n.length;i++){r=a=n[i];for(o=0;o<e.length;o++){s=e[o];a=a.replace(s,en[s])}s=parseInt(on[r],16);t[a]=[s>>16&255,s>>8&255,s&255]}return t}let rn;function an(t){if(!rn){rn=sn();rn.transparent=[0,0,0,0]}const n=rn[t.toLowerCase()];return n&&{r:n[0],g:n[1],b:n[2],a:n.length===4?n[3]:255}}const ln=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function cn(t){const n=ln.exec(t);let e=255;let i,o,s;if(!n){return}if(n[7]!==i){const t=+n[7];e=n[8]?Pt(t):jt(t*255,0,255)}i=+n[1];o=+n[3];s=+n[5];i=255&(n[2]?Pt(i):jt(i,0,255));o=255&(n[4]?Pt(o):jt(o,0,255));s=255&(n[6]?Pt(s):jt(s,0,255));return{r:i,g:o,b:s,a:e}}function hn(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${Et(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const fn=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055;const dn=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function un(t,n,e){const i=dn(Et(t.r));const o=dn(Et(t.g));const s=dn(Et(t.b));return{r:Ot(fn(i+e*(dn(Et(n.r))-i))),g:Ot(fn(o+e*(dn(Et(n.g))-o))),b:Ot(fn(s+e*(dn(Et(n.b))-s))),a:t.a+e*(n.a-t.a)}}function pn(t,n,e){if(t){let i=Xt(t);i[n]=Math.max(0,Math.min(i[n]+i[n]*e,n===0?360:1));i=qt(i);t.r=i[0];t.g=i[1];t.b=i[2]}}function gn(t,n){return t?Object.assign(n||{},t):t}function bn(t){var n={r:0,g:0,b:0,a:255};if(Array.isArray(t)){if(t.length>=3){n={r:t[0],g:t[1],b:t[2],a:255};if(t.length>3){n.a=Ot(t[3])}}}else{n=gn(t,{r:0,g:0,b:0,a:1});n.a=Ot(n.a)}return n}function wn(t){if(t.charAt(0)==="r"){return cn(t)}return Gt(t)}class mn{constructor(t){if(t instanceof mn){return t}const n=typeof t;let e;if(n==="object"){e=bn(t)}else if(n==="string"){e=Ft(t)||an(t)||wn(t)}this._rgb=e;this._valid=!!e}get valid(){return this._valid}get rgb(){var t=gn(this._rgb);if(t){t.a=Et(t.a)}return t}set rgb(t){this._rgb=bn(t)}rgbString(){return this._valid?hn(this._rgb):undefined}hexString(){return this._valid?Bt(this._rgb):undefined}hslString(){return this._valid?nn(this._rgb):undefined}mix(t,n){if(t){const e=this.rgb;const i=t.rgb;let o;const s=n===o?.5:n;const r=2*s-1;const a=e.a-i.a;const l=((r*a===-1?r:(r+a)/(1+r*a))+1)/2;o=1-l;e.r=255&l*e.r+o*i.r+.5;e.g=255&l*e.g+o*i.g+.5;e.b=255&l*e.b+o*i.b+.5;e.a=s*e.a+(1-s)*i.a;this.rgb=e}return this}interpolate(t,n){if(t){this._rgb=un(this._rgb,t._rgb,n)}return this}clone(){return new mn(this.rgb)}alpha(t){this._rgb.a=Ot(t);return this}clearer(t){const n=this._rgb;n.a*=1-t;return this}greyscale(){const t=this._rgb;const n=_t(t.r*.3+t.g*.59+t.b*.11);t.r=t.g=t.b=n;return this}opaquer(t){const n=this._rgb;n.a*=1+t;return this}negate(){const t=this._rgb;t.r=255-t.r;t.g=255-t.g;t.b=255-t.b;return this}lighten(t){pn(this._rgb,2,t);return this}darken(t){pn(this._rgb,2,-t);return this}saturate(t){pn(this._rgb,1,t);return this}desaturate(t){pn(this._rgb,1,-t);return this}rotate(t){tn(this._rgb,t);return this}}
8
+ /*!
9
+ * Chart.js v4.4.9
10
+ * https://www.chartjs.org
11
+ * (c) 2025 Chart.js Contributors
12
+ * Released under the MIT License
13
+ */function yn(){}const xn=(()=>{let t=0;return()=>t++})();function vn(t){return t===null||t===undefined}function kn(t){if(Array.isArray&&Array.isArray(t)){return true}const n=Object.prototype.toString.call(t);if(n.slice(0,7)==="[object"&&n.slice(-6)==="Array]"){return true}return false}function Mn(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function zn(t){return(typeof t==="number"||t instanceof Number)&&isFinite(+t)}function Sn(t,n){return zn(t)?t:n}function Cn(t,n){return typeof t==="undefined"?n:t}const _n=(t,n)=>typeof t==="string"&&t.endsWith("%")?parseFloat(t)/100:+t/n;const jn=(t,n)=>typeof t==="string"&&t.endsWith("%")?parseFloat(t)/100*n:+t;function Pn(t,n,e){if(t&&typeof t.call==="function"){return t.apply(e,n)}}function On(t,n,e,i){let o,s,r;if(kn(t)){s=t.length;{for(o=0;o<s;o++){n.call(e,t[o],o)}}}else if(Mn(t)){r=Object.keys(t);s=r.length;for(o=0;o<s;o++){n.call(e,t[r[o]],r[o])}}}function En(t,n){let e,i,o,s;if(!t||!n||t.length!==n.length){return false}for(e=0,i=t.length;e<i;++e){o=t[e];s=n[e];if(o.datasetIndex!==s.datasetIndex||o.index!==s.index){return false}}return true}function An(t){if(kn(t)){return t.map(An)}if(Mn(t)){const n=Object.create(null);const e=Object.keys(t);const i=e.length;let o=0;for(;o<i;++o){n[e[o]]=An(t[e[o]])}return n}return t}function Dn(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function Ln(t,n,e,i){if(!Dn(t)){return}const o=n[t];const s=e[t];if(Mn(o)&&Mn(s)){Rn(o,s,i)}else{n[t]=An(s)}}function Rn(t,n,e){const i=kn(n)?n:[n];const o=i.length;if(!Mn(t)){return t}e=e||{};const s=e.merger||Ln;let r;for(let n=0;n<o;++n){r=i[n];if(!Mn(r)){continue}const o=Object.keys(r);for(let n=0,i=o.length;n<i;++n){s(o[n],t,r,e)}}return t}function Nn(t,n){return Rn(t,n,{merger:In})}function In(t,n,e){if(!Dn(t)){return}const i=n[t];const o=e[t];if(Mn(i)&&Mn(o)){Nn(i,o)}else if(!Object.prototype.hasOwnProperty.call(n,t)){n[t]=An(o)}}const Tn={"":t=>t,x:t=>t.x,y:t=>t.y};function Fn(t){const n=t.split(".");const e=[];let i="";for(const t of n){i+=t;if(i.endsWith("\\")){i=i.slice(0,-1)+"."}else{e.push(i);i=""}}return e}function Wn(t){const n=Fn(t);return t=>{for(const e of n){if(e===""){break}t=t&&t[e]}return t}}function Bn(t,n){const e=Tn[n]||(Tn[n]=Wn(n));return e(t)}function Un(t){return t.charAt(0).toUpperCase()+t.slice(1)}const Hn=t=>typeof t!=="undefined";const Vn=t=>typeof t==="function";const $n=(t,n)=>{if(t.size!==n.size){return false}for(const e of t){if(!n.has(e)){return false}}return true};function Yn(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const Xn=Math.PI;const Kn=2*Xn;const qn=Kn+Xn;const Zn=Number.POSITIVE_INFINITY;const Jn=Xn/180;const Qn=Xn/2;const Gn=Xn/4;const te=Xn*2/3;const ne=Math.log10;const ee=Math.sign;function ie(t,n,e){return Math.abs(t-n)<e}function oe(t){const n=Math.round(t);t=ie(t,n,t/1e3)?n:t;const e=Math.pow(10,Math.floor(ne(t)));const i=t/e;const o=i<=1?1:i<=2?2:i<=5?5:10;return o*e}function se(t){const n=[];const e=Math.sqrt(t);let i;for(i=1;i<e;i++){if(t%i===0){n.push(i);n.push(t/i)}}if(e===(e|0)){n.push(e)}n.sort(((t,n)=>t-n)).pop();return n}function re(t){return typeof t==="symbol"||typeof t==="object"&&t!==null&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}function ae(t){return!re(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function le(t,n){const e=Math.round(t);return e-n<=t&&e+n>=t}function ce(t,n,e){let i,o,s;for(i=0,o=t.length;i<o;i++){s=t[i][e];if(!isNaN(s)){n.min=Math.min(n.min,s);n.max=Math.max(n.max,s)}}}function he(t){return t*(Xn/180)}function fe(t){return t*(180/Xn)}function de(t){if(!zn(t)){return}let n=1;let e=0;while(Math.round(t*n)/n!==t){n*=10;e++}return e}function ue(t,n){const e=n.x-t.x;const i=n.y-t.y;const o=Math.sqrt(e*e+i*i);let s=Math.atan2(i,e);if(s<-.5*Xn){s+=Kn}return{angle:s,distance:o}}function pe(t,n){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))}function ge(t,n){return(t-n+qn)%Kn-Xn}function be(t){return(t%Kn+Kn)%Kn}function we(t,n,e,i){const o=be(t);const s=be(n);const r=be(e);const a=be(s-o);const l=be(r-o);const c=be(o-s);const h=be(o-r);return o===s||o===r||i&&s===r||a>l&&c<h}function me(t,n,e){return Math.max(n,Math.min(e,t))}function ye(t){return me(t,-32768,32767)}function xe(t,n,e,i=1e-6){return t>=Math.min(n,e)-i&&t<=Math.max(n,e)+i}function ve(t,n,e){e=e||(e=>t[e]<n);let i=t.length-1;let o=0;let s;while(i-o>1){s=o+i>>1;if(e(s)){o=s}else{i=s}}return{lo:o,hi:i}}const ke=(t,n,e,i)=>ve(t,e,i?i=>{const o=t[i][n];return o<e||o===e&&t[i+1][n]===e}:i=>t[i][n]<e);const Me=(t,n,e)=>ve(t,e,(i=>t[i][n]>=e));function ze(t,n,e){let i=0;let o=t.length;while(i<o&&t[i]<n){i++}while(o>i&&t[o-1]>e){o--}return i>0||o<t.length?t.slice(i,o):t}const Se=["push","pop","shift","splice","unshift"];function Ce(t,n){if(t._chartjs){t._chartjs.listeners.push(n);return}Object.defineProperty(t,"_chartjs",{configurable:true,enumerable:false,value:{listeners:[n]}});Se.forEach((n=>{const e="_onData"+Un(n);const i=t[n];Object.defineProperty(t,n,{configurable:true,enumerable:false,value(...n){const o=i.apply(this,n);t._chartjs.listeners.forEach((t=>{if(typeof t[e]==="function"){t[e](...n)}}));return o}})}))}function _e(t,n){const e=t._chartjs;if(!e){return}const i=e.listeners;const o=i.indexOf(n);if(o!==-1){i.splice(o,1)}if(i.length>0){return}Se.forEach((n=>{delete t[n]}));delete t._chartjs}function je(t){const n=new Set(t);if(n.size===t.length){return t}return Array.from(n)}const Pe=function(){if(typeof window==="undefined"){return function(t){return t()}}return window.requestAnimationFrame}();function Oe(t,n){let e=[];let i=false;return function(...o){e=o;if(!i){i=true;Pe.call(window,(()=>{i=false;t.apply(n,e)}))}}}function Ee(t,n){let e;return function(...i){if(n){clearTimeout(e);e=setTimeout(t,n,i)}else{t.apply(this,i)}return n}}const Ae=t=>t==="start"?"left":t==="end"?"right":"center";const De=(t,n,e)=>t==="start"?n:t==="end"?e:(n+e)/2;const Le=(t,n,e,i)=>{const o=i?"left":"right";return t===o?e:t==="center"?(n+e)/2:n};function Re(t,n,e){const i=n.length;let o=0;let s=i;if(t._sorted){const{iScale:r,vScale:a,_parsed:l}=t;const c=t.dataset?t.dataset.options?t.dataset.options.spanGaps:null:null;const h=r.axis;const{min:f,max:d,minDefined:u,maxDefined:p}=r.getUserBounds();if(u){o=Math.min(ke(l,h,f).lo,e?i:ke(n,h,r.getPixelForValue(f)).lo);if(c){const t=l.slice(0,o+1).reverse().findIndex((t=>!vn(t[a.axis])));o-=Math.max(0,t)}o=me(o,0,i-1)}if(p){let t=Math.max(ke(l,r.axis,d,true).hi+1,e?0:ke(n,h,r.getPixelForValue(d),true).hi+1);if(c){const n=l.slice(t-1).findIndex((t=>!vn(t[a.axis])));t+=Math.max(0,n)}s=me(t,o,i)-o}else{s=i-o}}return{start:o,count:s}}function Ne(t){const{xScale:n,yScale:e,_scaleRanges:i}=t;const o={xmin:n.min,xmax:n.max,ymin:e.min,ymax:e.max};if(!i){t._scaleRanges=o;return true}const s=i.xmin!==n.min||i.xmax!==n.max||i.ymin!==e.min||i.ymax!==e.max;Object.assign(i,o);return s}const Ie=t=>t===0||t===1;const Te=(t,n,e)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-n)*Kn/e));const Fe=(t,n,e)=>Math.pow(2,-10*t)*Math.sin((t-n)*Kn/e)+1;const We={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*Qn)+1,easeOutSine:t=>Math.sin(t*Qn),easeInOutSine:t=>-.5*(Math.cos(Xn*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>Ie(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>Ie(t)?t:Te(t,.075,.3),easeOutElastic:t=>Ie(t)?t:Fe(t,.075,.3),easeInOutElastic(t){const n=.1125;const e=.45;return Ie(t)?t:t<.5?.5*Te(t*2,n,e):.5+.5*Fe(t*2-1,n,e)},easeInBack(t){const n=1.70158;return t*t*((n+1)*t-n)},easeOutBack(t){const n=1.70158;return(t-=1)*t*((n+1)*t+n)+1},easeInOutBack(t){let n=1.70158;if((t/=.5)<1){return.5*(t*t*(((n*=1.525)+1)*t-n))}return.5*((t-=2)*t*(((n*=1.525)+1)*t+n)+2)},easeInBounce:t=>1-We.easeOutBounce(1-t),easeOutBounce(t){const n=7.5625;const e=2.75;if(t<1/e){return n*t*t}if(t<2/e){return n*(t-=1.5/e)*t+.75}if(t<2.5/e){return n*(t-=2.25/e)*t+.9375}return n*(t-=2.625/e)*t+.984375},easeInOutBounce:t=>t<.5?We.easeInBounce(t*2)*.5:We.easeOutBounce(t*2-1)*.5+.5};function Be(t){if(t&&typeof t==="object"){const n=t.toString();return n==="[object CanvasPattern]"||n==="[object CanvasGradient]"}return false}function Ue(t){return Be(t)?t:new mn(t)}function He(t){return Be(t)?t:new mn(t).saturate(.5).darken(.1).hexString()}const Ve=["x","y","borderWidth","radius","tension"];const $e=["color","borderColor","backgroundColor"];function Ye(t){t.set("animation",{delay:undefined,duration:1e3,easing:"easeOutQuart",fn:undefined,from:undefined,loop:undefined,to:undefined,type:undefined});t.describe("animation",{_fallback:false,_indexable:false,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"});t.set("animations",{colors:{type:"color",properties:$e},numbers:{type:"number",properties:Ve}});t.describe("animations",{_fallback:"animation"});t.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=>t|0}}}})}function Xe(t){t.set("layout",{autoPadding:true,padding:{top:0,right:0,bottom:0,left:0}})}const Ke=new Map;function qe(t,n){n=n||{};const e=t+JSON.stringify(n);let i=Ke.get(e);if(!i){i=new Intl.NumberFormat(t,n);Ke.set(e,i)}return i}function Ze(t,n,e){return qe(n,e).format(t)}const Je={values(t){return kn(t)?t:""+t},numeric(t,n,e){if(t===0){return"0"}const i=this.chart.options.locale;let o;let s=t;if(e.length>1){const n=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));if(n<1e-4||n>1e15){o="scientific"}s=Qe(t,e)}const r=ne(Math.abs(s));const a=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0);const l={notation:o,minimumFractionDigits:a,maximumFractionDigits:a};Object.assign(l,this.options.ticks.format);return Ze(t,i,l)},logarithmic(t,n,e){if(t===0){return"0"}const i=e[n].significand||t/Math.pow(10,Math.floor(ne(t)));if([1,2,3,5,10,15].includes(i)||n>.8*e.length){return Je.numeric.call(this,t,n,e)}return""}};function Qe(t,n){let e=n.length>3?n[2].value-n[1].value:n[1].value-n[0].value;if(Math.abs(e)>=1&&t!==Math.floor(t)){e=t-Math.floor(t)}return e}var Ge={formatters:Je};function ti(t){t.set("scale",{display:true,offset:false,reverse:false,beginAtZero:false,bounds:"ticks",clip:true,grace:0,grid:{display:true,lineWidth:1,drawOnChartArea:true,drawTicks:true,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:false},border:{display:true,dash:[],dashOffset:0,width:1},title:{display:false,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:false,textStrokeWidth:0,textStrokeColor:"",padding:3,display:true,autoSkip:true,autoSkipPadding:3,labelOffset:0,callback:Ge.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:false,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}});t.route("scale.ticks","color","","color");t.route("scale.grid","color","","borderColor");t.route("scale.border","color","","borderColor");t.route("scale.title","color","","color");t.describe("scale",{_fallback:false,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"});t.describe("scales",{_fallback:"scale"});t.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const ni=Object.create(null);const ei=Object.create(null);function ii(t,n){if(!n){return t}const e=n.split(".");for(let n=0,i=e.length;n<i;++n){const i=e[n];t=t[i]||(t[i]=Object.create(null))}return t}function oi(t,n,e){if(typeof n==="string"){return Rn(ii(t,n),e)}return Rn(ii(t,""),n)}class si{constructor(t,n){this.animation=undefined;this.backgroundColor="rgba(0,0,0,0.1)";this.borderColor="rgba(0,0,0,0.1)";this.color="#666";this.datasets={};this.devicePixelRatio=t=>t.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=(t,n)=>He(n.backgroundColor);this.hoverBorderColor=(t,n)=>He(n.borderColor);this.hoverColor=(t,n)=>He(n.color);this.indexAxis="x";this.interaction={mode:"nearest",intersect:true,includeInvisible:false};this.maintainAspectRatio=true;this.onHover=null;this.onClick=null;this.parsing=true;this.plugins={};this.responsive=true;this.scale=undefined;this.scales={};this.showLine=true;this.drawActiveElementsOnTop=true;this.describe(t);this.apply(n)}set(t,n){return oi(this,t,n)}get(t){return ii(this,t)}describe(t,n){return oi(ei,t,n)}override(t,n){return oi(ni,t,n)}route(t,n,e,i){const o=ii(this,t);const s=ii(this,e);const r="_"+n;Object.defineProperties(o,{[r]:{value:o[n],writable:true},[n]:{enumerable:true,get(){const t=this[r];const n=s[i];if(Mn(t)){return Object.assign({},n,t)}return Cn(t,n)},set(t){this[r]=t}}})}apply(t){t.forEach((t=>t(this)))}}var ri=new si({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:false,_indexable:false}},[Ye,Xe,ti]);function ai(t){if(!t||vn(t.size)||vn(t.family)){return null}return(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function li(t,n,e,i,o){let s=n[o];if(!s){s=n[o]=t.measureText(o).width;e.push(o)}if(s>i){i=s}return i}function ci(t,n,e,i){i=i||{};let o=i.data=i.data||{};let s=i.garbageCollect=i.garbageCollect||[];if(i.font!==n){o=i.data={};s=i.garbageCollect=[];i.font=n}t.save();t.font=n;let r=0;const a=e.length;let l,c,h,f,d;for(l=0;l<a;l++){f=e[l];if(f!==undefined&&f!==null&&!kn(f)){r=li(t,o,s,r,f)}else if(kn(f)){for(c=0,h=f.length;c<h;c++){d=f[c];if(d!==undefined&&d!==null&&!kn(d)){r=li(t,o,s,r,d)}}}}t.restore();const u=s.length/2;if(u>e.length){for(l=0;l<u;l++){delete o[s[l]]}s.splice(0,u)}return r}function hi(t,n,e){const i=t.currentDevicePixelRatio;const o=e!==0?Math.max(e/2,.5):0;return Math.round((n-o)*i)/i+o}function fi(t,n){if(!n&&!t){return}n=n||t.getContext("2d");n.save();n.resetTransform();n.clearRect(0,0,t.width,t.height);n.restore()}function di(t,n,e,i){ui(t,n,e,i,null)}function ui(t,n,e,i,o){let s,r,a,l,c,h,f,d;const u=n.pointStyle;const p=n.rotation;const g=n.radius;let b=(p||0)*Jn;if(u&&typeof u==="object"){s=u.toString();if(s==="[object HTMLImageElement]"||s==="[object HTMLCanvasElement]"){t.save();t.translate(e,i);t.rotate(b);t.drawImage(u,-u.width/2,-u.height/2,u.width,u.height);t.restore();return}}if(isNaN(g)||g<=0){return}t.beginPath();switch(u){default:if(o){t.ellipse(e,i,o/2,g,0,0,Kn)}else{t.arc(e,i,g,0,Kn)}t.closePath();break;case"triangle":h=o?o/2:g;t.moveTo(e+Math.sin(b)*h,i-Math.cos(b)*g);b+=te;t.lineTo(e+Math.sin(b)*h,i-Math.cos(b)*g);b+=te;t.lineTo(e+Math.sin(b)*h,i-Math.cos(b)*g);t.closePath();break;case"rectRounded":c=g*.516;l=g-c;r=Math.cos(b+Gn)*l;f=Math.cos(b+Gn)*(o?o/2-c:l);a=Math.sin(b+Gn)*l;d=Math.sin(b+Gn)*(o?o/2-c:l);t.arc(e-f,i-a,c,b-Xn,b-Qn);t.arc(e+d,i-r,c,b-Qn,b);t.arc(e+f,i+a,c,b,b+Qn);t.arc(e-d,i+r,c,b+Qn,b+Xn);t.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*g;h=o?o/2:l;t.rect(e-h,i-l,2*h,2*l);break}b+=Gn;case"rectRot":f=Math.cos(b)*(o?o/2:g);r=Math.cos(b)*g;a=Math.sin(b)*g;d=Math.sin(b)*(o?o/2:g);t.moveTo(e-f,i-a);t.lineTo(e+d,i-r);t.lineTo(e+f,i+a);t.lineTo(e-d,i+r);t.closePath();break;case"crossRot":b+=Gn;case"cross":f=Math.cos(b)*(o?o/2:g);r=Math.cos(b)*g;a=Math.sin(b)*g;d=Math.sin(b)*(o?o/2:g);t.moveTo(e-f,i-a);t.lineTo(e+f,i+a);t.moveTo(e+d,i-r);t.lineTo(e-d,i+r);break;case"star":f=Math.cos(b)*(o?o/2:g);r=Math.cos(b)*g;a=Math.sin(b)*g;d=Math.sin(b)*(o?o/2:g);t.moveTo(e-f,i-a);t.lineTo(e+f,i+a);t.moveTo(e+d,i-r);t.lineTo(e-d,i+r);b+=Gn;f=Math.cos(b)*(o?o/2:g);r=Math.cos(b)*g;a=Math.sin(b)*g;d=Math.sin(b)*(o?o/2:g);t.moveTo(e-f,i-a);t.lineTo(e+f,i+a);t.moveTo(e+d,i-r);t.lineTo(e-d,i+r);break;case"line":r=o?o/2:Math.cos(b)*g;a=Math.sin(b)*g;t.moveTo(e-r,i-a);t.lineTo(e+r,i+a);break;case"dash":t.moveTo(e,i);t.lineTo(e+Math.cos(b)*(o?o/2:g),i+Math.sin(b)*g);break;case false:t.closePath();break}t.fill();if(n.borderWidth>0){t.stroke()}}function pi(t,n,e){e=e||.5;return!n||t&&t.x>n.left-e&&t.x<n.right+e&&t.y>n.top-e&&t.y<n.bottom+e}function gi(t,n){t.save();t.beginPath();t.rect(n.left,n.top,n.right-n.left,n.bottom-n.top);t.clip()}function bi(t){t.restore()}function wi(t,n,e,i,o){if(!n){return t.lineTo(e.x,e.y)}if(o==="middle"){const i=(n.x+e.x)/2;t.lineTo(i,n.y);t.lineTo(i,e.y)}else if(o==="after"!==!!i){t.lineTo(n.x,e.y)}else{t.lineTo(e.x,n.y)}t.lineTo(e.x,e.y)}function mi(t,n,e,i){if(!n){return t.lineTo(e.x,e.y)}t.bezierCurveTo(i?n.cp1x:n.cp2x,i?n.cp1y:n.cp2y,i?e.cp2x:e.cp1x,i?e.cp2y:e.cp1y,e.x,e.y)}function yi(t,n){if(n.translation){t.translate(n.translation[0],n.translation[1])}if(!vn(n.rotation)){t.rotate(n.rotation)}if(n.color){t.fillStyle=n.color}if(n.textAlign){t.textAlign=n.textAlign}if(n.textBaseline){t.textBaseline=n.textBaseline}}function xi(t,n,e,i,o){if(o.strikethrough||o.underline){const s=t.measureText(i);const r=n-s.actualBoundingBoxLeft;const a=n+s.actualBoundingBoxRight;const l=e-s.actualBoundingBoxAscent;const c=e+s.actualBoundingBoxDescent;const h=o.strikethrough?(l+c)/2:c;t.strokeStyle=t.fillStyle;t.beginPath();t.lineWidth=o.decorationWidth||2;t.moveTo(r,h);t.lineTo(a,h);t.stroke()}}function vi(t,n){const e=t.fillStyle;t.fillStyle=n.color;t.fillRect(n.left,n.top,n.width,n.height);t.fillStyle=e}function ki(t,n,e,i,o,s={}){const r=kn(n)?n:[n];const a=s.strokeWidth>0&&s.strokeColor!=="";let l,c;t.save();t.font=o.string;yi(t,s);for(l=0;l<r.length;++l){c=r[l];if(s.backdrop){vi(t,s.backdrop)}if(a){if(s.strokeColor){t.strokeStyle=s.strokeColor}if(!vn(s.strokeWidth)){t.lineWidth=s.strokeWidth}t.strokeText(c,e,i,s.maxWidth)}t.fillText(c,e,i,s.maxWidth);xi(t,e,i,c,s);i+=Number(o.lineHeight)}t.restore()}function Mi(t,n){const{x:e,y:i,w:o,h:s,radius:r}=n;t.arc(e+r.topLeft,i+r.topLeft,r.topLeft,1.5*Xn,Xn,true);t.lineTo(e,i+s-r.bottomLeft);t.arc(e+r.bottomLeft,i+s-r.bottomLeft,r.bottomLeft,Xn,Qn,true);t.lineTo(e+o-r.bottomRight,i+s);t.arc(e+o-r.bottomRight,i+s-r.bottomRight,r.bottomRight,Qn,0,true);t.lineTo(e+o,i+r.topRight);t.arc(e+o-r.topRight,i+r.topRight,r.topRight,0,-Qn,true);t.lineTo(e+r.topLeft,i)}const zi=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/;const Si=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Ci(t,n){const e=(""+t).match(zi);if(!e||e[1]==="normal"){return n*1.2}t=+e[2];switch(e[3]){case"px":return t;case"%":t/=100;break}return n*t}const _i=t=>+t||0;function ji(t,n){const e={};const i=Mn(n);const o=i?Object.keys(n):n;const s=Mn(t)?i?e=>Cn(t[e],t[n[e]]):n=>t[n]:()=>t;for(const t of o){e[t]=_i(s(t))}return e}function Pi(t){return ji(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Oi(t){return ji(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Ei(t){const n=Pi(t);n.width=n.left+n.right;n.height=n.top+n.bottom;return n}function Ai(t,n){t=t||{};n=n||ri.font;let e=Cn(t.size,n.size);if(typeof e==="string"){e=parseInt(e,10)}let i=Cn(t.style,n.style);if(i&&!(""+i).match(Si)){console.warn('Invalid font style specified: "'+i+'"');i=undefined}const o={family:Cn(t.family,n.family),lineHeight:Ci(Cn(t.lineHeight,n.lineHeight),e),size:e,style:i,weight:Cn(t.weight,n.weight),string:""};o.string=ai(o);return o}function Di(t,n,e,i){let o,s,r;for(o=0,s=t.length;o<s;++o){r=t[o];if(r===undefined){continue}if(r!==undefined){return r}}}function Li(t,n,e){const{min:i,max:o}=t;const s=jn(n,(o-i)/2);const r=(t,n)=>e&&t===0?0:t+n;return{min:r(i,-Math.abs(s)),max:r(o,s)}}function Ri(t,n){return Object.assign(Object.create(t),n)}function Ni(t,n=[""],e,i,o=()=>t[0]){const s=e||t;if(typeof i==="undefined"){i=Qi("_fallback",t)}const r={[Symbol.toStringTag]:"Object",_cacheable:true,_scopes:t,_rootScopes:s,_fallback:i,_getTarget:o,override:e=>Ni([e,...t],n,s,i)};return new Proxy(r,{deleteProperty(n,e){delete n[e];delete n._keys;delete t[0][e];return true},get(e,i){return Bi(e,i,(()=>Ji(i,n,t,e)))},getOwnPropertyDescriptor(t,n){return Reflect.getOwnPropertyDescriptor(t._scopes[0],n)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(t,n){return Gi(t).includes(n)},ownKeys(t){return Gi(t)},set(t,n,e){const i=t._storage||(t._storage=o());t[n]=i[n]=e;delete t._keys;return true}})}function Ii(t,n,e,i){const o={_cacheable:false,_proxy:t,_context:n,_subProxy:e,_stack:new Set,_descriptors:Ti(t,i),setContext:n=>Ii(t,n,e,i),override:o=>Ii(t.override(o),n,e,i)};return new Proxy(o,{deleteProperty(n,e){delete n[e];delete t[e];return true},get(t,n,e){return Bi(t,n,(()=>Ui(t,n,e)))},getOwnPropertyDescriptor(n,e){return n._descriptors.allKeys?Reflect.has(t,e)?{enumerable:true,configurable:true}:undefined:Reflect.getOwnPropertyDescriptor(t,e)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(n,e){return Reflect.has(t,e)},ownKeys(){return Reflect.ownKeys(t)},set(n,e,i){t[e]=i;delete n[e];return true}})}function Ti(t,n={scriptable:true,indexable:true}){const{_scriptable:e=n.scriptable,_indexable:i=n.indexable,_allKeys:o=n.allKeys}=t;return{allKeys:o,scriptable:e,indexable:i,isScriptable:Vn(e)?e:()=>e,isIndexable:Vn(i)?i:()=>i}}const Fi=(t,n)=>t?t+Un(n):n;const Wi=(t,n)=>Mn(n)&&t!=="adapters"&&(Object.getPrototypeOf(n)===null||n.constructor===Object);function Bi(t,n,e){if(Object.prototype.hasOwnProperty.call(t,n)||n==="constructor"){return t[n]}const i=e();t[n]=i;return i}function Ui(t,n,e){const{_proxy:i,_context:o,_subProxy:s,_descriptors:r}=t;let a=i[n];if(Vn(a)&&r.isScriptable(n)){a=Hi(n,a,t,e)}if(kn(a)&&a.length){a=Vi(n,a,t,r.isIndexable)}if(Wi(n,a)){a=Ii(a,o,s&&s[n],r)}return a}function Hi(t,n,e,i){const{_proxy:o,_context:s,_subProxy:r,_stack:a}=e;if(a.has(t)){throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t)}a.add(t);let l=n(s,r||i);a.delete(t);if(Wi(t,l)){l=Ki(o._scopes,o,t,l)}return l}function Vi(t,n,e,i){const{_proxy:o,_context:s,_subProxy:r,_descriptors:a}=e;if(typeof s.index!=="undefined"&&i(t)){return n[s.index%n.length]}else if(Mn(n[0])){const e=n;const i=o._scopes.filter((t=>t!==e));n=[];for(const l of e){const e=Ki(i,o,t,l);n.push(Ii(e,s,r&&r[t],a))}}return n}function $i(t,n,e){return Vn(t)?t(n,e):t}const Yi=(t,n)=>t===true?n:typeof t==="string"?Bn(n,t):undefined;function Xi(t,n,e,i,o){for(const s of n){const n=Yi(e,s);if(n){t.add(n);const s=$i(n._fallback,e,o);if(typeof s!=="undefined"&&s!==e&&s!==i){return s}}else if(n===false&&typeof i!=="undefined"&&e!==i){return null}}return false}function Ki(t,n,e,i){const o=n._rootScopes;const s=$i(n._fallback,e,i);const r=[...t,...o];const a=new Set;a.add(i);let l=qi(a,r,e,s||e,i);if(l===null){return false}if(typeof s!=="undefined"&&s!==e){l=qi(a,r,s,l,i);if(l===null){return false}}return Ni(Array.from(a),[""],o,s,(()=>Zi(n,e,i)))}function qi(t,n,e,i,o){while(e){e=Xi(t,n,e,i,o)}return e}function Zi(t,n,e){const i=t._getTarget();if(!(n in i)){i[n]={}}const o=i[n];if(kn(o)&&Mn(e)){return e}return o||{}}function Ji(t,n,e,i){let o;for(const s of n){o=Qi(Fi(s,t),e);if(typeof o!=="undefined"){return Wi(t,o)?Ki(e,i,t,o):o}}}function Qi(t,n){for(const e of n){if(!e){continue}const n=e[t];if(typeof n!=="undefined"){return n}}}function Gi(t){let n=t._keys;if(!n){n=t._keys=to(t._scopes)}return n}function to(t){const n=new Set;for(const e of t){for(const t of Object.keys(e).filter((t=>!t.startsWith("_")))){n.add(t)}}return Array.from(n)}function no(t,n,e,i){const{iScale:o}=t;const{key:s="r"}=this._parsing;const r=new Array(i);let a,l,c,h;for(a=0,l=i;a<l;++a){c=a+e;h=n[c];r[a]={r:o.parse(Bn(h,s),c)}}return r}const eo=Number.EPSILON||1e-14;const io=(t,n)=>n<t.length&&!t[n].skip&&t[n];const oo=t=>t==="x"?"y":"x";function so(t,n,e,i){const o=t.skip?n:t;const s=n;const r=e.skip?n:e;const a=pe(s,o);const l=pe(r,s);let c=a/(a+l);let h=l/(a+l);c=isNaN(c)?0:c;h=isNaN(h)?0:h;const f=i*c;const d=i*h;return{previous:{x:s.x-f*(r.x-o.x),y:s.y-f*(r.y-o.y)},next:{x:s.x+d*(r.x-o.x),y:s.y+d*(r.y-o.y)}}}function ro(t,n,e){const i=t.length;let o,s,r,a,l;let c=io(t,0);for(let h=0;h<i-1;++h){l=c;c=io(t,h+1);if(!l||!c){continue}if(ie(n[h],0,eo)){e[h]=e[h+1]=0;continue}o=e[h]/n[h];s=e[h+1]/n[h];a=Math.pow(o,2)+Math.pow(s,2);if(a<=9){continue}r=3/Math.sqrt(a);e[h]=o*r*n[h];e[h+1]=s*r*n[h]}}function ao(t,n,e="x"){const i=oo(e);const o=t.length;let s,r,a;let l=io(t,0);for(let c=0;c<o;++c){r=a;a=l;l=io(t,c+1);if(!a){continue}const o=a[e];const h=a[i];if(r){s=(o-r[e])/3;a[`cp1${e}`]=o-s;a[`cp1${i}`]=h-s*n[c]}if(l){s=(l[e]-o)/3;a[`cp2${e}`]=o+s;a[`cp2${i}`]=h+s*n[c]}}}function lo(t,n="x"){const e=oo(n);const i=t.length;const o=Array(i).fill(0);const s=Array(i);let r,a,l;let c=io(t,0);for(r=0;r<i;++r){a=l;l=c;c=io(t,r+1);if(!l){continue}if(c){const t=c[n]-l[n];o[r]=t!==0?(c[e]-l[e])/t:0}s[r]=!a?o[r]:!c?o[r-1]:ee(o[r-1])!==ee(o[r])?0:(o[r-1]+o[r])/2}ro(t,o,s);ao(t,s,n)}function co(t,n,e){return Math.max(Math.min(t,e),n)}function ho(t,n){let e,i,o,s,r;let a=pi(t[0],n);for(e=0,i=t.length;e<i;++e){r=s;s=a;a=e<i-1&&pi(t[e+1],n);if(!s){continue}o=t[e];if(r){o.cp1x=co(o.cp1x,n.left,n.right);o.cp1y=co(o.cp1y,n.top,n.bottom)}if(a){o.cp2x=co(o.cp2x,n.left,n.right);o.cp2y=co(o.cp2y,n.top,n.bottom)}}}function fo(t,n,e,i,o){let s,r,a,l;if(n.spanGaps){t=t.filter((t=>!t.skip))}if(n.cubicInterpolationMode==="monotone"){lo(t,o)}else{let e=i?t[t.length-1]:t[0];for(s=0,r=t.length;s<r;++s){a=t[s];l=so(e,a,t[Math.min(s+1,r-(i?0:1))%r],n.tension);a.cp1x=l.previous.x;a.cp1y=l.previous.y;a.cp2x=l.next.x;a.cp2y=l.next.y;e=a}}if(n.capBezierPoints){ho(t,e)}}function uo(){return typeof window!=="undefined"&&typeof document!=="undefined"}function po(t){let n=t.parentNode;if(n&&n.toString()==="[object ShadowRoot]"){n=n.host}return n}function go(t,n,e){let i;if(typeof t==="string"){i=parseInt(t,10);if(t.indexOf("%")!==-1){i=i/100*n.parentNode[e]}}else{i=t}return i}const bo=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function wo(t,n){return bo(t).getPropertyValue(n)}const mo=["top","right","bottom","left"];function yo(t,n,e){const i={};e=e?"-"+e:"";for(let o=0;o<4;o++){const s=mo[o];i[s]=parseFloat(t[n+"-"+s+e])||0}i.width=i.left+i.right;i.height=i.top+i.bottom;return i}const xo=(t,n,e)=>(t>0||n>0)&&(!e||!e.shadowRoot);function vo(t,n){const e=t.touches;const i=e&&e.length?e[0]:t;const{offsetX:o,offsetY:s}=i;let r=false;let a,l;if(xo(o,s,t.target)){a=o;l=s}else{const t=n.getBoundingClientRect();a=i.clientX-t.left;l=i.clientY-t.top;r=true}return{x:a,y:l,box:r}}function ko(t,n){if("native"in t){return t}const{canvas:e,currentDevicePixelRatio:i}=n;const o=bo(e);const s=o.boxSizing==="border-box";const r=yo(o,"padding");const a=yo(o,"border","width");const{x:l,y:c,box:h}=vo(t,e);const f=r.left+(h&&a.left);const d=r.top+(h&&a.top);let{width:u,height:p}=n;if(s){u-=r.width+a.width;p-=r.height+a.height}return{x:Math.round((l-f)/u*e.width/i),y:Math.round((c-d)/p*e.height/i)}}function Mo(t,n,e){let i,o;if(n===undefined||e===undefined){const s=t&&po(t);if(!s){n=t.clientWidth;e=t.clientHeight}else{const t=s.getBoundingClientRect();const r=bo(s);const a=yo(r,"border","width");const l=yo(r,"padding");n=t.width-l.width-a.width;e=t.height-l.height-a.height;i=go(r.maxWidth,s,"clientWidth");o=go(r.maxHeight,s,"clientHeight")}}return{width:n,height:e,maxWidth:i||Zn,maxHeight:o||Zn}}const zo=t=>Math.round(t*10)/10;function So(t,n,e,i){const o=bo(t);const s=yo(o,"margin");const r=go(o.maxWidth,t,"clientWidth")||Zn;const a=go(o.maxHeight,t,"clientHeight")||Zn;const l=Mo(t,n,e);let{width:c,height:h}=l;if(o.boxSizing==="content-box"){const t=yo(o,"border","width");const n=yo(o,"padding");c-=n.width+t.width;h-=n.height+t.height}c=Math.max(0,c-s.width);h=Math.max(0,i?c/i:h-s.height);c=zo(Math.min(c,r,l.maxWidth));h=zo(Math.min(h,a,l.maxHeight));if(c&&!h){h=zo(c/2)}const f=n!==undefined||e!==undefined;if(f&&i&&l.height&&h>l.height){h=l.height;c=zo(Math.floor(h*i))}return{width:c,height:h}}function Co(t,n,e){const i=n||1;const o=Math.floor(t.height*i);const s=Math.floor(t.width*i);t.height=Math.floor(t.height);t.width=Math.floor(t.width);const r=t.canvas;if(r.style&&(e||!r.style.height&&!r.style.width)){r.style.height=`${t.height}px`;r.style.width=`${t.width}px`}if(t.currentDevicePixelRatio!==i||r.height!==o||r.width!==s){t.currentDevicePixelRatio=i;r.height=o;r.width=s;t.ctx.setTransform(i,0,0,i,0,0);return true}return false}const _o=function(){let t=false;try{const n={get passive(){t=true;return false}};if(uo()){window.addEventListener("test",null,n);window.removeEventListener("test",null,n)}}catch(t){}return t}();function jo(t,n){const e=wo(t,n);const i=e&&e.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:undefined}function Po(t,n,e,i){return{x:t.x+e*(n.x-t.x),y:t.y+e*(n.y-t.y)}}function Oo(t,n,e,i){return{x:t.x+e*(n.x-t.x),y:i==="middle"?e<.5?t.y:n.y:i==="after"?e<1?t.y:n.y:e>0?n.y:t.y}}function Eo(t,n,e,i){const o={x:t.cp2x,y:t.cp2y};const s={x:n.cp1x,y:n.cp1y};const r=Po(t,o,e);const a=Po(o,s,e);const l=Po(s,n,e);const c=Po(r,a,e);const h=Po(a,l,e);return Po(c,h,e)}const Ao=function(t,n){return{x(e){return t+t+n-e},setWidth(t){n=t},textAlign(t){if(t==="center"){return t}return t==="right"?"left":"right"},xPlus(t,n){return t-n},leftForLtr(t,n){return t-n}}};const Do=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,n){return t+n},leftForLtr(t,n){return t}}};function Lo(t,n,e){return t?Ao(n,e):Do()}function Ro(t,n){let e,i;if(n==="ltr"||n==="rtl"){e=t.canvas.style;i=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")];e.setProperty("direction",n,"important");t.prevTextDirection=i}}function No(t,n){if(n!==undefined){delete t.prevTextDirection;t.canvas.style.setProperty("direction",n[0],n[1])}}function Io(t){if(t==="angle"){return{between:we,compare:ge,normalize:be}}return{between:xe,compare:(t,n)=>t-n,normalize:t=>t}}function To({start:t,end:n,count:e,loop:i,style:o}){return{start:t%e,end:n%e,loop:i&&(n-t+1)%e===0,style:o}}function Fo(t,n,e){const{property:i,start:o,end:s}=e;const{between:r,normalize:a}=Io(i);const l=n.length;let{start:c,end:h,loop:f}=t;let d,u;if(f){c+=l;h+=l;for(d=0,u=l;d<u;++d){if(!r(a(n[c%l][i]),o,s)){break}c--;h--}c%=l;h%=l}if(h<c){h+=l}return{start:c,end:h,loop:f,style:t.style}}function Wo(t,n,e){if(!e){return[t]}const{property:i,start:o,end:s}=e;const r=n.length;const{compare:a,between:l,normalize:c}=Io(i);const{start:h,end:f,loop:d,style:u}=Fo(t,n,e);const p=[];let g=false;let b=null;let w,m,y;const x=()=>l(o,y,w)&&a(o,y)!==0;const v=()=>a(s,w)===0||l(s,y,w);const k=()=>g||x();const M=()=>!g||v();for(let t=h,e=h;t<=f;++t){m=n[t%r];if(m.skip){continue}w=c(m[i]);if(w===y){continue}g=l(w,o,s);if(b===null&&k()){b=a(w,o)===0?t:e}if(b!==null&&M()){p.push(To({start:b,end:t,loop:d,count:r,style:u}));b=null}e=t;y=w}if(b!==null){p.push(To({start:b,end:f,loop:d,count:r,style:u}))}return p}function Bo(t,n){const e=[];const i=t.segments;for(let o=0;o<i.length;o++){const s=Wo(i[o],t.points,n);if(s.length){e.push(...s)}}return e}function Uo(t,n,e,i){let o=0;let s=n-1;if(e&&!i){while(o<n&&!t[o].skip){o++}}while(o<n&&t[o].skip){o++}o%=n;if(e){s+=o}while(s>o&&t[s%n].skip){s--}s%=n;return{start:o,end:s}}function Ho(t,n,e,i){const o=t.length;const s=[];let r=n;let a=t[n];let l;for(l=n+1;l<=e;++l){const e=t[l%o];if(e.skip||e.stop){if(!a.skip){i=false;s.push({start:n%o,end:(l-1)%o,loop:i});n=r=e.stop?l:null}}else{r=l;if(a.skip){n=l}}a=e}if(r!==null){s.push({start:n%o,end:r%o,loop:i})}return s}function Vo(t,n){const e=t.points;const i=t.options.spanGaps;const o=e.length;if(!o){return[]}const s=!!t._loop;const{start:r,end:a}=Uo(e,o,s,i);if(i===true){return $o(t,[{start:r,end:a,loop:s}],e,n)}const l=a<r?a+o:a;const c=!!t._fullLoop&&r===0&&a===o-1;return $o(t,Ho(e,r,l,c),e,n)}function $o(t,n,e,i){if(!i||!i.setContext||!e){return n}return Yo(t,n,e,i)}function Yo(t,n,e,i){const o=t._chart.getContext();const s=Xo(t.options);const{_datasetIndex:r,options:{spanGaps:a}}=t;const l=e.length;const c=[];let h=s;let f=n[0].start;let d=f;function u(t,n,i,o){const s=a?-1:1;if(t===n){return}t+=l;while(e[t%l].skip){t-=s}while(e[n%l].skip){n+=s}if(t%l!==n%l){c.push({start:t%l,end:n%l,loop:i,style:o});h=o;f=n%l}}for(const t of n){f=a?f:t.start;let n=e[f%l];let s;for(d=f+1;d<=t.end;d++){const a=e[d%l];s=Xo(i.setContext(Ri(o,{type:"segment",p0:n,p1:a,p0DataIndex:(d-1)%l,p1DataIndex:d%l,datasetIndex:r})));if(Ko(s,h)){u(f,d-1,t.loop,h)}n=a;h=s}if(f<d-1){u(f,d-1,t.loop,h)}}return c}function Xo(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function Ko(t,n){if(!n){return false}const e=[];const i=function(t,n){if(!Be(n)){return n}if(!e.includes(n)){e.push(n)}return e.indexOf(n)};return JSON.stringify(t,i)!==JSON.stringify(n,i)}function qo(t,n,e){return t.options.clip?t[e]:n[e]}function Zo(t,n){const{xScale:e,yScale:i}=t;if(e&&i){return{left:qo(e,n,"left"),right:qo(e,n,"right"),top:qo(i,n,"top"),bottom:qo(i,n,"bottom")}}return n}function Jo(t,n){const e=n._clip;if(e.disabled){return false}const i=Zo(n,t.chartArea);return{left:e.left===false?0:i.left-(e.left===true?0:e.left),right:e.right===false?t.width:i.right+(e.right===true?0:e.right),top:e.top===false?0:i.top-(e.top===true?0:e.top),bottom:e.bottom===false?t.height:i.bottom+(e.bottom===true?0:e.bottom)}}
14
+ /*!
15
+ * Chart.js v4.4.9
16
+ * https://www.chartjs.org
17
+ * (c) 2025 Chart.js Contributors
18
+ * Released under the MIT License
19
+ */class Qo{constructor(){this._request=null;this._charts=new Map;this._running=false;this._lastDate=undefined}_notify(t,n,e,i){const o=n.listeners[i];const s=n.duration;o.forEach((i=>i({chart:t,initial:n.initial,numSteps:s,currentStep:Math.min(e-n.start,s)})))}_refresh(){if(this._request){return}this._running=true;this._request=Pe.call(window,(()=>{this._update();this._request=null;if(this._running){this._refresh()}}))}_update(t=Date.now()){let n=0;this._charts.forEach(((e,i)=>{if(!e.running||!e.items.length){return}const o=e.items;let s=o.length-1;let r=false;let a;for(;s>=0;--s){a=o[s];if(a._active){if(a._total>e.duration){e.duration=a._total}a.tick(t);r=true}else{o[s]=o[o.length-1];o.pop()}}if(r){i.draw();this._notify(i,e,t,"progress")}if(!o.length){e.running=false;this._notify(i,e,t,"complete");e.initial=false}n+=o.length}));this._lastDate=t;if(n===0){this._running=false}}_getAnims(t){const n=this._charts;let e=n.get(t);if(!e){e={running:false,initial:true,items:[],listeners:{complete:[],progress:[]}};n.set(t,e)}return e}listen(t,n,e){this._getAnims(t).listeners[n].push(e)}add(t,n){if(!n||!n.length){return}this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);if(!n){return}n.running=true;n.start=Date.now();n.duration=n.items.reduce(((t,n)=>Math.max(t,n._duration)),0);this._refresh()}running(t){if(!this._running){return false}const n=this._charts.get(t);if(!n||!n.running||!n.items.length){return false}return true}stop(t){const n=this._charts.get(t);if(!n||!n.items.length){return}const e=n.items;let i=e.length-1;for(;i>=0;--i){e[i].cancel()}n.items=[];this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Go=new Qo;const ts="transparent";const ns={boolean(t,n,e){return e>.5?n:t},color(t,n,e){const i=Ue(t||ts);const o=i.valid&&Ue(n||ts);return o&&o.valid?o.mix(i,e).hexString():n},number(t,n,e){return t+(n-t)*e}};class es{constructor(t,n,e,i){const o=n[e];i=Di([t.to,i,o,t.from]);const s=Di([t.from,o,i]);this._active=true;this._fn=t.fn||ns[t.type||typeof s];this._easing=We[t.easing]||We.linear;this._start=Math.floor(Date.now()+(t.delay||0));this._duration=this._total=Math.floor(t.duration);this._loop=!!t.loop;this._target=n;this._prop=e;this._from=s;this._to=i;this._promises=undefined}active(){return this._active}update(t,n,e){if(this._active){this._notify(false);const i=this._target[this._prop];const o=e-this._start;const s=this._duration-o;this._start=e;this._duration=Math.floor(Math.max(s,t.duration));this._total+=o;this._loop=!!t.loop;this._to=Di([t.to,n,i,t.from]);this._from=Di([t.from,i,n])}}cancel(){if(this._active){this.tick(Date.now());this._active=false;this._notify(false)}}tick(t){const n=t-this._start;const e=this._duration;const i=this._prop;const o=this._from;const s=this._loop;const r=this._to;let a;this._active=o!==r&&(s||n<e);if(!this._active){this._target[i]=r;this._notify(true);return}if(n<0){this._target[i]=o;return}a=n/e%2;a=s&&a>1?2-a:a;a=this._easing(Math.min(1,Math.max(0,a)));this._target[i]=this._fn(o,r,a)}wait(){const t=this._promises||(this._promises=[]);return new Promise(((n,e)=>{t.push({res:n,rej:e})}))}_notify(t){const n=t?"res":"rej";const e=this._promises||[];for(let t=0;t<e.length;t++){e[t][n]()}}}class is{constructor(t,n){this._chart=t;this._properties=new Map;this.configure(n)}configure(t){if(!Mn(t)){return}const n=Object.keys(ri.animation);const e=this._properties;Object.getOwnPropertyNames(t).forEach((i=>{const o=t[i];if(!Mn(o)){return}const s={};for(const t of n){s[t]=o[t]}(kn(o.properties)&&o.properties||[i]).forEach((t=>{if(t===i||!e.has(t)){e.set(t,s)}}))}))}_animateOptions(t,n){const e=n.options;const i=ss(t,e);if(!i){return[]}const o=this._createAnimations(i,e);if(e.$shared){os(t.options.$animations,e).then((()=>{t.options=e}),(()=>{}))}return o}_createAnimations(t,n){const e=this._properties;const i=[];const o=t.$animations||(t.$animations={});const s=Object.keys(n);const r=Date.now();let a;for(a=s.length-1;a>=0;--a){const l=s[a];if(l.charAt(0)==="$"){continue}if(l==="options"){i.push(...this._animateOptions(t,n));continue}const c=n[l];let h=o[l];const f=e.get(l);if(h){if(f&&h.active()){h.update(f,c,r);continue}else{h.cancel()}}if(!f||!f.duration){t[l]=c;continue}o[l]=h=new es(f,t,l,c);i.push(h)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const e=this._createAnimations(t,n);if(e.length){Go.add(this._chart,e);return true}}}function os(t,n){const e=[];const i=Object.keys(n);for(let n=0;n<i.length;n++){const o=t[i[n]];if(o&&o.active()){e.push(o.wait())}}return Promise.all(e)}function ss(t,n){if(!n){return}let e=t.options;if(!e){t.options=n;return}if(e.$shared){t.options=e=Object.assign({},e,{$shared:false,$animations:{}})}return e}function rs(t,n){const e=t&&t.options||{};const i=e.reverse;const o=e.min===undefined?n:0;const s=e.max===undefined?n:0;return{start:i?s:o,end:i?o:s}}function as(t,n,e){if(e===false){return false}const i=rs(t,e);const o=rs(n,e);return{top:o.end,right:i.end,bottom:o.start,left:i.start}}function ls(t){let n,e,i,o;if(Mn(t)){n=t.top;e=t.right;i=t.bottom;o=t.left}else{n=e=i=o=t}return{top:n,right:e,bottom:i,left:o,disabled:t===false}}function cs(t,n){const e=[];const i=t._getSortedDatasetMetas(n);let o,s;for(o=0,s=i.length;o<s;++o){e.push(i[o].index)}return e}function hs(t,n,e,i={}){const o=t.keys;const s=i.mode==="single";let r,a,l,c;if(n===null){return}let h=false;for(r=0,a=o.length;r<a;++r){l=+o[r];if(l===e){h=true;if(i.all){continue}break}c=t.values[l];if(zn(c)&&(s||n===0||ee(n)===ee(c))){n+=c}}if(!h&&!i.all){return 0}return n}function fs(t,n){const{iScale:e,vScale:i}=n;const o=e.axis==="x"?"x":"y";const s=i.axis==="x"?"x":"y";const r=Object.keys(t);const a=new Array(r.length);let l,c,h;for(l=0,c=r.length;l<c;++l){h=r[l];a[l]={[o]:h,[s]:t[h]}}return a}function ds(t,n){const e=t&&t.options.stacked;return e||e===undefined&&n.stack!==undefined}function us(t,n,e){return`${t.id}.${n.id}.${e.stack||e.type}`}function ps(t){const{min:n,max:e,minDefined:i,maxDefined:o}=t.getUserBounds();return{min:i?n:Number.NEGATIVE_INFINITY,max:o?e:Number.POSITIVE_INFINITY}}function gs(t,n,e){const i=t[n]||(t[n]={});return i[e]||(i[e]={})}function bs(t,n,e,i){for(const o of n.getMatchingVisibleMetas(i).reverse()){const n=t[o.index];if(e&&n>0||!e&&n<0){return o.index}}return null}function ws(t,n){const{chart:e,_cachedMeta:i}=t;const o=e._stacks||(e._stacks={});const{iScale:s,vScale:r,index:a}=i;const l=s.axis;const c=r.axis;const h=us(s,r,i);const f=n.length;let d;for(let t=0;t<f;++t){const e=n[t];const{[l]:s,[c]:f}=e;const u=e._stacks||(e._stacks={});d=u[c]=gs(o,h,s);d[a]=f;d._top=bs(d,r,true,i.type);d._bottom=bs(d,r,false,i.type);const p=d._visualValues||(d._visualValues={});p[a]=f}}function ms(t,n){const e=t.scales;return Object.keys(e).filter((t=>e[t].axis===n)).shift()}function ys(t,n){return Ri(t,{active:false,dataset:undefined,datasetIndex:n,index:n,mode:"default",type:"dataset"})}function xs(t,n,e){return Ri(t,{active:false,dataIndex:n,parsed:undefined,raw:undefined,element:e,index:n,mode:"default",type:"data"})}function vs(t,n){const e=t.controller.index;const i=t.vScale&&t.vScale.axis;if(!i){return}n=n||t._parsed;for(const t of n){const n=t._stacks;if(!n||n[i]===undefined||n[i][e]===undefined){return}delete n[i][e];if(n[i]._visualValues!==undefined&&n[i]._visualValues[e]!==undefined){delete n[i]._visualValues[e]}}}const ks=t=>t==="reset"||t==="none";const Ms=(t,n)=>n?t:Object.assign({},t);const zs=(t,n,e)=>t&&!n.hidden&&n._stacked&&{keys:cs(e,true),values:null};class Ss{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,n){this.chart=t;this._ctx=t.ctx;this.index=n;this._cachedDataOpts={};this._cachedMeta=this.getMeta();this._type=this._cachedMeta.type;this.options=undefined;this._parsing=false;this._data=undefined;this._objectData=undefined;this._sharedOptions=undefined;this._drawStart=undefined;this._drawCount=undefined;this.enableOptionSharing=false;this.supportsDecimation=false;this.$context=undefined;this._syncList=[];this.datasetElementType=new.target.datasetElementType;this.dataElementType=new.target.dataElementType;this.initialize()}initialize(){const t=this._cachedMeta;this.configure();this.linkScales();t._stacked=ds(t.vScale,t);this.addElements();if(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){if(this.index!==t){vs(this._cachedMeta)}this.index=t}linkScales(){const t=this.chart;const n=this._cachedMeta;const e=this.getDataset();const i=(t,n,e,i)=>t==="x"?n:t==="r"?i:e;const o=n.xAxisID=Cn(e.xAxisID,ms(t,"x"));const s=n.yAxisID=Cn(e.yAxisID,ms(t,"y"));const r=n.rAxisID=Cn(e.rAxisID,ms(t,"r"));const a=n.indexAxis;const l=n.iAxisID=i(a,o,s,r);const c=n.vAxisID=i(a,s,o,r);n.xScale=this.getScaleForId(o);n.yScale=this.getScaleForId(s);n.rScale=this.getScaleForId(r);n.iScale=this.getScaleForId(l);n.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;if(this._data){_e(this._data,this)}if(t._stacked){vs(t)}}_dataCheck(){const t=this.getDataset();const n=t.data||(t.data=[]);const e=this._data;if(Mn(n)){const t=this._cachedMeta;this._data=fs(n,t)}else if(e!==n){if(e){_e(e,this);const t=this._cachedMeta;vs(t);t._parsed=[]}if(n&&Object.isExtensible(n)){Ce(n,this)}this._syncList=[];this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck();if(this.datasetElementType){t.dataset=new this.datasetElementType}}buildOrUpdateElements(t){const n=this._cachedMeta;const e=this.getDataset();let i=false;this._dataCheck();const o=n._stacked;n._stacked=ds(n.vScale,n);if(n.stack!==e.stack){i=true;vs(n);n.stack=e.stack}this._resyncElements(t);if(i||o!==n._stacked){ws(this,n._parsed);n._stacked=ds(n.vScale,n)}}configure(){const t=this.chart.config;const n=t.datasetScopeKeys(this._type);const e=t.getOptionScopes(this.getDataset(),n,true);this.options=t.createResolver(e,this.getContext());this._parsing=this.options.parsing;this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:e,_data:i}=this;const{iScale:o,_stacked:s}=e;const r=o.axis;let a=t===0&&n===i.length?true:e._sorted;let l=t>0&&e._parsed[t-1];let c,h,f;if(this._parsing===false){e._parsed=i;e._sorted=true;f=i}else{if(kn(i[t])){f=this.parseArrayData(e,i,t,n)}else if(Mn(i[t])){f=this.parseObjectData(e,i,t,n)}else{f=this.parsePrimitiveData(e,i,t,n)}const o=()=>h[r]===null||l&&h[r]<l[r];for(c=0;c<n;++c){e._parsed[c+t]=h=f[c];if(a){if(o()){a=false}l=h}}e._sorted=a}if(s){ws(this,f)}}parsePrimitiveData(t,n,e,i){const{iScale:o,vScale:s}=t;const r=o.axis;const a=s.axis;const l=o.getLabels();const c=o===s;const h=new Array(i);let f,d,u;for(f=0,d=i;f<d;++f){u=f+e;h[f]={[r]:c||o.parse(l[u],u),[a]:s.parse(n[u],u)}}return h}parseArrayData(t,n,e,i){const{xScale:o,yScale:s}=t;const r=new Array(i);let a,l,c,h;for(a=0,l=i;a<l;++a){c=a+e;h=n[c];r[a]={x:o.parse(h[0],c),y:s.parse(h[1],c)}}return r}parseObjectData(t,n,e,i){const{xScale:o,yScale:s}=t;const{xAxisKey:r="x",yAxisKey:a="y"}=this._parsing;const l=new Array(i);let c,h,f,d;for(c=0,h=i;c<h;++c){f=c+e;d=n[f];l[c]={x:o.parse(Bn(d,r),f),y:s.parse(Bn(d,a),f)}}return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,e){const i=this.chart;const o=this._cachedMeta;const s=n[t.axis];const r={keys:cs(i,true),values:n._stacks[t.axis]._visualValues};return hs(r,s,o.index,{mode:e})}updateRangeFromParsed(t,n,e,i){const o=e[n.axis];let s=o===null?NaN:o;const r=i&&e._stacks[n.axis];if(i&&r){i.values=r;s=hs(i,o,this._cachedMeta.index)}t.min=Math.min(t.min,s);t.max=Math.max(t.max,s)}getMinMax(t,n){const e=this._cachedMeta;const i=e._parsed;const o=e._sorted&&t===e.iScale;const s=i.length;const r=this._getOtherScale(t);const a=zs(n,e,this.chart);const l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};const{min:c,max:h}=ps(r);let f,d;function u(){d=i[f];const n=d[r.axis];return!zn(d[t.axis])||c>n||h<n}for(f=0;f<s;++f){if(u()){continue}this.updateRangeFromParsed(l,t,d,a);if(o){break}}if(o){for(f=s-1;f>=0;--f){if(u()){continue}this.updateRangeFromParsed(l,t,d,a);break}}return l}getAllParsedValues(t){const n=this._cachedMeta._parsed;const e=[];let i,o,s;for(i=0,o=n.length;i<o;++i){s=n[i][t.axis];if(zn(s)){e.push(s)}}return e}getMaxOverflow(){return false}getLabelAndValue(t){const n=this._cachedMeta;const e=n.iScale;const i=n.vScale;const o=this.getParsed(t);return{label:e?""+e.getLabelForValue(o[e.axis]):"",value:i?""+i.getLabelForValue(o[i.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default");n._clip=ls(Cn(this.options.clip,as(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx;const n=this.chart;const e=this._cachedMeta;const i=e.data||[];const o=n.chartArea;const s=[];const r=this._drawStart||0;const a=this._drawCount||i.length-r;const l=this.options.drawActiveElementsOnTop;let c;if(e.dataset){e.dataset.draw(t,o,r,a)}for(c=r;c<r+a;++c){const n=i[c];if(n.hidden){continue}if(n.active&&l){s.push(n)}else{n.draw(t,o)}}for(c=0;c<s.length;++c){s[c].draw(t,o)}}getStyle(t,n){const e=n?"active":"default";return t===undefined&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(e):this.resolveDataElementOptions(t||0,e)}getContext(t,n,e){const i=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const n=this._cachedMeta.data[t];o=n.$context||(n.$context=xs(this.getContext(),t,n));o.parsed=this.getParsed(t);o.raw=i.data[t];o.index=o.dataIndex=t}else{o=this.$context||(this.$context=ys(this.chart.getContext(),this.index));o.dataset=i;o.index=o.datasetIndex=this.index}o.active=!!n;o.mode=e;return o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",e){const i=n==="active";const o=this._cachedDataOpts;const s=t+"-"+n;const r=o[s];const a=this.enableOptionSharing&&Hn(e);if(r){return Ms(r,a)}const l=this.chart.config;const c=l.datasetElementScopeKeys(this._type,t);const h=i?[`${t}Hover`,"hover",t,""]:[t,""];const f=l.getOptionScopes(this.getDataset(),c);const d=Object.keys(ri.elements[t]);const u=()=>this.getContext(e,i,n);const p=l.resolveNamedOptions(f,d,u,h);if(p.$shared){p.$shared=a;o[s]=Object.freeze(Ms(p,a))}return p}_resolveAnimations(t,n,e){const i=this.chart;const o=this._cachedDataOpts;const s=`animation-${n}`;const r=o[s];if(r){return r}let a;if(i.options.animation!==false){const i=this.chart.config;const o=i.datasetAnimationScopeKeys(this._type,n);const s=i.getOptionScopes(this.getDataset(),o);a=i.createResolver(s,this.getContext(t,e,n))}const l=new is(i,a&&a.animations);if(a&&a._cacheable){o[s]=Object.freeze(l)}return l}getSharedOptions(t){if(!t.$shared){return}return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||ks(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const e=this.resolveDataElementOptions(t,n);const i=this._sharedOptions;const o=this.getSharedOptions(e);const s=this.includeOptions(n,o)||o!==i;this.updateSharedOptions(o,n,e);return{sharedOptions:o,includeOptions:s}}updateElement(t,n,e,i){if(ks(i)){Object.assign(t,e)}else{this._resolveAnimations(n,i).update(t,e)}}updateSharedOptions(t,n,e){if(t&&!ks(n)){this._resolveAnimations(undefined,n).update(t,e)}}_setStyle(t,n,e,i){t.active=i;const o=this.getStyle(n,i);this._resolveAnimations(n,e,i).update(t,{options:!i&&this.getSharedOptions(o)||o})}removeHoverStyle(t,n,e){this._setStyle(t,e,"active",false)}setHoverStyle(t,n,e){this._setStyle(t,e,"active",true)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;if(t){this._setStyle(t,undefined,"active",false)}}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;if(t){this._setStyle(t,undefined,"active",true)}}_resyncElements(t){const n=this._data;const e=this._cachedMeta.data;for(const[t,n,e]of this._syncList){this[t](n,e)}this._syncList=[];const i=e.length;const o=n.length;const s=Math.min(o,i);if(s){this.parse(0,s)}if(o>i){this._insertElements(i,o-i,t)}else if(o<i){this._removeElements(o,i-o)}}_insertElements(t,n,e=true){const i=this._cachedMeta;const o=i.data;const s=t+n;let r;const a=t=>{t.length+=n;for(r=t.length-1;r>=s;r--){t[r]=t[r-n]}};a(o);for(r=t;r<s;++r){o[r]=new this.dataElementType}if(this._parsing){a(i._parsed)}this.parse(t,n);if(e){this.updateElements(o,t,n,"reset")}}updateElements(t,n,e,i){}_removeElements(t,n){const e=this._cachedMeta;if(this._parsing){const i=e._parsed.splice(t,n);if(e._stacked){vs(e,i)}}e.data.splice(t,n)}_sync(t){if(this._parsing){this._syncList.push(t)}else{const[n,e,i]=t;this[n](e,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){if(n){this._sync(["_removeElements",t,n])}const e=arguments.length-2;if(e){this._sync(["_insertElements",t,e])}}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function Cs(t,n){if(!t._cache.$bar){const e=t.getMatchingVisibleMetas(n);let i=[];for(let n=0,o=e.length;n<o;n++){i=i.concat(e[n].controller.getAllParsedValues(t))}t._cache.$bar=je(i.sort(((t,n)=>t-n)))}return t._cache.$bar}function _s(t){const n=t.iScale;const e=Cs(n,t.type);let i=n._length;let o,s,r,a;const l=()=>{if(r===32767||r===-32768){return}if(Hn(a)){i=Math.min(i,Math.abs(r-a)||i)}a=r};for(o=0,s=e.length;o<s;++o){r=n.getPixelForValue(e[o]);l()}a=undefined;for(o=0,s=n.ticks.length;o<s;++o){r=n.getPixelForTick(o);l()}return i}function js(t,n,e,i){const o=e.barThickness;let s,r;if(vn(o)){s=n.min*e.categoryPercentage;r=e.barPercentage}else{s=o*i;r=1}return{chunk:s/i,ratio:r,start:n.pixels[t]-s/2}}function Ps(t,n,e,i){const o=n.pixels;const s=o[t];let r=t>0?o[t-1]:null;let a=t<o.length-1?o[t+1]:null;const l=e.categoryPercentage;if(r===null){r=s-(a===null?n.end-n.start:a-s)}if(a===null){a=s+s-r}const c=s-(s-Math.min(r,a))/2*l;const h=Math.abs(a-r)/2*l;return{chunk:h/i,ratio:e.barPercentage,start:c}}function Os(t,n,e,i){const o=e.parse(t[0],i);const s=e.parse(t[1],i);const r=Math.min(o,s);const a=Math.max(o,s);let l=r;let c=a;if(Math.abs(r)>Math.abs(a)){l=a;c=r}n[e.axis]=c;n._custom={barStart:l,barEnd:c,start:o,end:s,min:r,max:a}}function Es(t,n,e,i){if(kn(t)){Os(t,n,e,i)}else{n[e.axis]=e.parse(t,i)}return n}function As(t,n,e,i){const o=t.iScale;const s=t.vScale;const r=o.getLabels();const a=o===s;const l=[];let c,h,f,d;for(c=e,h=e+i;c<h;++c){d=n[c];f={};f[o.axis]=a||o.parse(r[c],c);l.push(Es(d,f,s,c))}return l}function Ds(t){return t&&t.barStart!==undefined&&t.barEnd!==undefined}function Ls(t,n,e){if(t!==0){return ee(t)}return(n.isHorizontal()?1:-1)*(n.min>=e?1:-1)}function Rs(t){let n,e,i,o,s;if(t.horizontal){n=t.base>t.x;e="left";i="right"}else{n=t.base<t.y;e="bottom";i="top"}if(n){o="end";s="start"}else{o="start";s="end"}return{start:e,end:i,reverse:n,top:o,bottom:s}}function Ns(t,n,e,i){let o=n.borderSkipped;const s={};if(!o){t.borderSkipped=s;return}if(o===true){t.borderSkipped={top:true,right:true,bottom:true,left:true};return}const{start:r,end:a,reverse:l,top:c,bottom:h}=Rs(t);if(o==="middle"&&e){t.enableBorderRadius=true;if((e._top||0)===i){o=c}else if((e._bottom||0)===i){o=h}else{s[Is(h,r,a,l)]=true;o=c}}s[Is(o,r,a,l)]=true;t.borderSkipped=s}function Is(t,n,e,i){if(i){t=Ts(t,n,e);t=Fs(t,e,n)}else{t=Fs(t,n,e)}return t}function Ts(t,n,e){return t===n?e:t===e?n:t}function Fs(t,n,e){return t==="start"?n:t==="end"?e:t}function Ws(t,{inflateAmount:n},e){t.inflateAmount=n==="auto"?e===1?.33:0:n}class Bs extends Ss{static id="bar";static defaults={datasetElementType:false,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:true,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:true,grid:{offset:true}},_value_:{type:"linear",beginAtZero:true}}};parsePrimitiveData(t,n,e,i){return As(t,n,e,i)}parseArrayData(t,n,e,i){return As(t,n,e,i)}parseObjectData(t,n,e,i){const{iScale:o,vScale:s}=t;const{xAxisKey:r="x",yAxisKey:a="y"}=this._parsing;const l=o.axis==="x"?r:a;const c=s.axis==="x"?r:a;const h=[];let f,d,u,p;for(f=e,d=e+i;f<d;++f){p=n[f];u={};u[o.axis]=o.parse(Bn(p,l),f);h.push(Es(Bn(p,c),u,s,f))}return h}updateRangeFromParsed(t,n,e,i){super.updateRangeFromParsed(t,n,e,i);const o=e._custom;if(o&&n===this._cachedMeta.vScale){t.min=Math.min(t.min,o.min);t.max=Math.max(t.max,o.max)}}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta;const{iScale:e,vScale:i}=n;const o=this.getParsed(t);const s=o._custom;const r=Ds(s)?"["+s.start+", "+s.end+"]":""+i.getLabelForValue(o[i.axis]);return{label:""+e.getLabelForValue(o[e.axis]),value:r}}initialize(){this.enableOptionSharing=true;super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,e,i){const o=i==="reset";const{index:s,_cachedMeta:{vScale:r}}=this;const a=r.getBasePixel();const l=r.isHorizontal();const c=this._getRuler();const{sharedOptions:h,includeOptions:f}=this._getSharedOptions(n,i);for(let d=n;d<n+e;d++){const n=this.getParsed(d);const e=o||vn(n[r.axis])?{base:a,head:a}:this._calculateBarValuePixels(d);const u=this._calculateBarIndexPixels(d,c);const p=(n._stacks||{})[r.axis];const g={horizontal:l,base:e.base,enableBorderRadius:!p||Ds(n._custom)||s===p._top||s===p._bottom,x:l?e.head:u.center,y:l?u.center:e.head,height:l?u.size:Math.abs(e.size),width:l?Math.abs(e.size):u.size};if(f){g.options=h||this.resolveDataElementOptions(d,t[d].active?"active":i)}const b=g.options||t[d].options;Ns(g,b,p,s);Ws(g,b,c.ratio);this.updateElement(t[d],d,g,i)}}_getStacks(t,n){const{iScale:e}=this._cachedMeta;const i=e.getMatchingVisibleMetas(this._type).filter((t=>t.controller.options.grouped));const o=e.options.stacked;const s=[];const r=this._cachedMeta.controller.getParsed(n);const a=r&&r[e.axis];const l=t=>{const n=t._parsed.find((t=>t[e.axis]===a));const i=n&&n[t.vScale.axis];if(vn(i)||isNaN(i)){return true}};for(const e of i){if(n!==undefined&&l(e)){continue}if(o===false||s.indexOf(e.stack)===-1||o===undefined&&e.stack===undefined){s.push(e.stack)}if(e.index===t){break}}if(!s.length){s.push(undefined)}return s}_getStackCount(t){return this._getStacks(undefined,t).length}_getStackIndex(t,n,e){const i=this._getStacks(t,e);const o=n!==undefined?i.indexOf(n):-1;return o===-1?i.length-1:o}_getRuler(){const t=this.options;const n=this._cachedMeta;const e=n.iScale;const i=[];let o,s;for(o=0,s=n.data.length;o<s;++o){i.push(e.getPixelForValue(this.getParsed(o)[e.axis],o))}const r=t.barThickness;const a=r||_s(n);return{min:a,pixels:i,start:e._startPixel,end:e._endPixel,stackCount:this._getStackCount(),scale:e,grouped:t.grouped,ratio:r?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:e,index:i},options:{base:o,minBarLength:s}}=this;const r=o||0;const a=this.getParsed(t);const l=a._custom;const c=Ds(l);let h=a[n.axis];let f=0;let d=e?this.applyStack(n,a,e):h;let u,p;if(d!==h){f=d-h;d=h}if(c){h=l.barStart;d=l.barEnd-l.barStart;if(h!==0&&ee(h)!==ee(l.barEnd)){f=0}f+=h}const g=!vn(o)&&!c?o:f;let b=n.getPixelForValue(g);if(this.chart.getDataVisibility(t)){u=n.getPixelForValue(f+d)}else{u=b}p=u-b;if(Math.abs(p)<s){p=Ls(p,n,r)*s;if(h===r){b-=p/2}const t=n.getPixelForDecimal(0);const o=n.getPixelForDecimal(1);const l=Math.min(t,o);const f=Math.max(t,o);b=Math.max(Math.min(b,f),l);u=b+p;if(e&&!c){a._stacks[n.axis]._visualValues[i]=n.getValueForPixel(u)-n.getValueForPixel(b)}}if(b===n.getPixelForValue(r)){const t=ee(p)*n.getLineWidthForValue(r)/2;b+=t;p-=t}return{size:p,base:b,head:u,center:u+p/2}}_calculateBarIndexPixels(t,n){const e=n.scale;const i=this.options;const o=i.skipNull;const s=Cn(i.maxBarThickness,Infinity);let r,a;if(n.grouped){const e=o?this._getStackCount(t):n.stackCount;const l=i.barThickness==="flex"?Ps(t,n,i,e):js(t,n,i,e);const c=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:undefined);r=l.start+l.chunk*c+l.chunk/2;a=Math.min(s,l.chunk*l.ratio)}else{r=e.getPixelForValue(this.getParsed(t)[e.axis],t);a=Math.min(s,n.min*n.ratio)}return{base:r-a/2,head:r+a/2,center:r,size:a}}draw(){const t=this._cachedMeta;const n=t.vScale;const e=t.data;const i=e.length;let o=0;for(;o<i;++o){if(this.getParsed(o)[n.axis]!==null&&!e[o].hidden){e[o].draw(this._ctx)}}}}class Us extends Ss{static id="bubble";static defaults={datasetElementType:false,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};static overrides={scales:{x:{type:"linear"},y:{type:"linear"}}};initialize(){this.enableOptionSharing=true;super.initialize()}parsePrimitiveData(t,n,e,i){const o=super.parsePrimitiveData(t,n,e,i);for(let t=0;t<o.length;t++){o[t]._custom=this.resolveDataElementOptions(t+e).radius}return o}parseArrayData(t,n,e,i){const o=super.parseArrayData(t,n,e,i);for(let t=0;t<o.length;t++){const i=n[e+t];o[t]._custom=Cn(i[2],this.resolveDataElementOptions(t+e).radius)}return o}parseObjectData(t,n,e,i){const o=super.parseObjectData(t,n,e,i);for(let t=0;t<o.length;t++){const i=n[e+t];o[t]._custom=Cn(i&&i.r&&+i.r,this.resolveDataElementOptions(t+e).radius)}return o}getMaxOverflow(){const t=this._cachedMeta.data;let n=0;for(let e=t.length-1;e>=0;--e){n=Math.max(n,t[e].size(this.resolveDataElementOptions(e))/2)}return n>0&&n}getLabelAndValue(t){const n=this._cachedMeta;const e=this.chart.data.labels||[];const{xScale:i,yScale:o}=n;const s=this.getParsed(t);const r=i.getLabelForValue(s.x);const a=o.getLabelForValue(s.y);const l=s._custom;return{label:e[t]||"",value:"("+r+", "+a+(l?", "+l:"")+")"}}update(t){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,e,i){const o=i==="reset";const{iScale:s,vScale:r}=this._cachedMeta;const{sharedOptions:a,includeOptions:l}=this._getSharedOptions(n,i);const c=s.axis;const h=r.axis;for(let f=n;f<n+e;f++){const n=t[f];const e=!o&&this.getParsed(f);const d={};const u=d[c]=o?s.getPixelForDecimal(.5):s.getPixelForValue(e[c]);const p=d[h]=o?r.getBasePixel():r.getPixelForValue(e[h]);d.skip=isNaN(u)||isNaN(p);if(l){d.options=a||this.resolveDataElementOptions(f,n.active?"active":i);if(o){d.options.radius=0}}this.updateElement(n,f,d,i)}}resolveDataElementOptions(t,n){const e=this.getParsed(t);let i=super.resolveDataElementOptions(t,n);if(i.$shared){i=Object.assign({},i,{$shared:false})}const o=i.radius;if(n!=="active"){i.radius=0}i.radius+=Cn(e&&e._custom,o);return i}}function Hs(t,n,e){let i=1;let o=1;let s=0;let r=0;if(n<Kn){const a=t;const l=a+n;const c=Math.cos(a);const h=Math.sin(a);const f=Math.cos(l);const d=Math.sin(l);const u=(t,n,i)=>we(t,a,l,true)?1:Math.max(n,n*e,i,i*e);const p=(t,n,i)=>we(t,a,l,true)?-1:Math.min(n,n*e,i,i*e);const g=u(0,c,f);const b=u(Qn,h,d);const w=p(Xn,c,f);const m=p(Xn+Qn,h,d);i=(g-w)/2;o=(b-m)/2;s=-(g+w)/2;r=-(b+m)/2}return{ratioX:i,ratioY:o,offsetX:s,offsetY:r}}class Vs extends Ss{static id="doughnut";static defaults={datasetElementType:false,dataElementType:"arc",animation:{animateRotate:true,animateScale:false},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:e,color:i}}=t.legend.options;return n.labels.map(((n,o)=>{const s=t.getDatasetMeta(0);const r=s.controller.getStyle(o);return{text:n,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,fontColor:i,lineWidth:r.borderWidth,pointStyle:e,hidden:!t.getDataVisibility(o),index:o}}))}return[]}},onClick(t,n,e){e.chart.toggleDataVisibility(n.index);e.chart.update()}}}};constructor(t,n){super(t,n);this.enableOptionSharing=true;this.innerRadius=undefined;this.outerRadius=undefined;this.offsetX=undefined;this.offsetY=undefined}linkScales(){}parse(t,n){const e=this.getDataset().data;const i=this._cachedMeta;if(this._parsing===false){i._parsed=e}else{let o=t=>+e[t];if(Mn(e[t])){const{key:t="value"}=this._parsing;o=n=>+Bn(e[n],t)}let s,r;for(s=t,r=t+n;s<r;++s){i._parsed[s]=o(s)}}}_getRotation(){return he(this.options.rotation-90)}_getCircumference(){return he(this.options.circumference)}_getRotationExtents(){let t=Kn;let n=-Kn;for(let e=0;e<this.chart.data.datasets.length;++e){if(this.chart.isDatasetVisible(e)&&this.chart.getDatasetMeta(e).type===this._type){const i=this.chart.getDatasetMeta(e).controller;const o=i._getRotation();const s=i._getCircumference();t=Math.min(t,o);n=Math.max(n,o+s)}}return{rotation:t,circumference:n-t}}update(t){const n=this.chart;const{chartArea:e}=n;const i=this._cachedMeta;const o=i.data;const s=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing;const r=Math.max((Math.min(e.width,e.height)-s)/2,0);const a=Math.min(_n(this.options.cutout,r),1);const l=this._getRingWeight(this.index);const{circumference:c,rotation:h}=this._getRotationExtents();const{ratioX:f,ratioY:d,offsetX:u,offsetY:p}=Hs(h,c,a);const g=(e.width-s)/f;const b=(e.height-s)/d;const w=Math.max(Math.min(g,b)/2,0);const m=jn(this.options.radius,w);const y=Math.max(m*a,0);const x=(m-y)/this._getVisibleDatasetWeightTotal();this.offsetX=u*m;this.offsetY=p*m;i.total=this.calculateTotal();this.outerRadius=m-x*this._getRingWeightOffset(this.index);this.innerRadius=Math.max(this.outerRadius-x*l,0);this.updateElements(o,0,o.length,t)}_circumference(t,n){const e=this.options;const i=this._cachedMeta;const o=this._getCircumference();if(n&&e.animation.animateRotate||!this.chart.getDataVisibility(t)||i._parsed[t]===null||i.data[t].hidden){return 0}return this.calculateCircumference(i._parsed[t]*o/Kn)}updateElements(t,n,e,i){const o=i==="reset";const s=this.chart;const r=s.chartArea;const a=s.options;const l=a.animation;const c=(r.left+r.right)/2;const h=(r.top+r.bottom)/2;const f=o&&l.animateScale;const d=f?0:this.innerRadius;const u=f?0:this.outerRadius;const{sharedOptions:p,includeOptions:g}=this._getSharedOptions(n,i);let b=this._getRotation();let w;for(w=0;w<n;++w){b+=this._circumference(w,o)}for(w=n;w<n+e;++w){const n=this._circumference(w,o);const e=t[w];const s={x:c+this.offsetX,y:h+this.offsetY,startAngle:b,endAngle:b+n,circumference:n,outerRadius:u,innerRadius:d};if(g){s.options=p||this.resolveDataElementOptions(w,e.active?"active":i)}b+=n;this.updateElement(e,w,s,i)}}calculateTotal(){const t=this._cachedMeta;const n=t.data;let e=0;let i;for(i=0;i<n.length;i++){const o=t._parsed[i];if(o!==null&&!isNaN(o)&&this.chart.getDataVisibility(i)&&!n[i].hidden){e+=Math.abs(o)}}return e}calculateCircumference(t){const n=this._cachedMeta.total;if(n>0&&!isNaN(t)){return Kn*(Math.abs(t)/n)}return 0}getLabelAndValue(t){const n=this._cachedMeta;const e=this.chart;const i=e.data.labels||[];const o=Ze(n._parsed[t],e.options.locale);return{label:i[t]||"",value:o}}getMaxBorderWidth(t){let n=0;const e=this.chart;let i,o,s,r,a;if(!t){for(i=0,o=e.data.datasets.length;i<o;++i){if(e.isDatasetVisible(i)){s=e.getDatasetMeta(i);t=s.data;r=s.controller;break}}}if(!t){return 0}for(i=0,o=t.length;i<o;++i){a=r.resolveDataElementOptions(i);if(a.borderAlign!=="inner"){n=Math.max(n,a.borderWidth||0,a.hoverBorderWidth||0)}}return n}getMaxOffset(t){let n=0;for(let e=0,i=t.length;e<i;++e){const t=this.resolveDataElementOptions(e);n=Math.max(n,t.offset||0,t.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let e=0;e<t;++e){if(this.chart.isDatasetVisible(e)){n+=this._getRingWeight(e)}}return n}_getRingWeight(t){return Math.max(Cn(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class $s extends Ss{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:true,spanGaps:false};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=true;this.supportsDecimation=true;super.initialize()}update(t){const n=this._cachedMeta;const{dataset:e,data:i=[],_dataset:o}=n;const s=this.chart._animationsDisabled;let{start:r,count:a}=Re(n,i,s);this._drawStart=r;this._drawCount=a;if(Ne(n)){r=0;a=i.length}e._chart=this.chart;e._datasetIndex=this.index;e._decimated=!!o._decimated;e.points=i;const l=this.resolveDatasetElementOptions(t);if(!this.options.showLine){l.borderWidth=0}l.segment=this.options.segment;this.updateElement(e,undefined,{animated:!s,options:l},t);this.updateElements(i,r,a,t)}updateElements(t,n,e,i){const o=i==="reset";const{iScale:s,vScale:r,_stacked:a,_dataset:l}=this._cachedMeta;const{sharedOptions:c,includeOptions:h}=this._getSharedOptions(n,i);const f=s.axis;const d=r.axis;const{spanGaps:u,segment:p}=this.options;const g=ae(u)?u:Number.POSITIVE_INFINITY;const b=this.chart._animationsDisabled||o||i==="none";const w=n+e;const m=t.length;let y=n>0&&this.getParsed(n-1);for(let e=0;e<m;++e){const u=t[e];const m=b?u:{};if(e<n||e>=w){m.skip=true;continue}const x=this.getParsed(e);const v=vn(x[d]);const k=m[f]=s.getPixelForValue(x[f],e);const M=m[d]=o||v?r.getBasePixel():r.getPixelForValue(a?this.applyStack(r,x,a):x[d],e);m.skip=isNaN(k)||isNaN(M)||v;m.stop=e>0&&Math.abs(x[f]-y[f])>g;if(p){m.parsed=x;m.raw=l.data[e]}if(h){m.options=c||this.resolveDataElementOptions(e,u.active?"active":i)}if(!b){this.updateElement(u,e,m,i)}y=x}}getMaxOverflow(){const t=this._cachedMeta;const n=t.dataset;const e=n.options&&n.options.borderWidth||0;const i=t.data||[];if(!i.length){return e}const o=i[0].size(this.resolveDataElementOptions(0));const s=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(e,o,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis);super.draw()}}class Ys extends Ss{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:true,animateScale:true},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:e,color:i}}=t.legend.options;return n.labels.map(((n,o)=>{const s=t.getDatasetMeta(0);const r=s.controller.getStyle(o);return{text:n,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,fontColor:i,lineWidth:r.borderWidth,pointStyle:e,hidden:!t.getDataVisibility(o),index:o}}))}return[]}},onClick(t,n,e){e.chart.toggleDataVisibility(n.index);e.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:false},beginAtZero:true,grid:{circular:true},pointLabels:{display:false},startAngle:0}}};constructor(t,n){super(t,n);this.innerRadius=undefined;this.outerRadius=undefined}getLabelAndValue(t){const n=this._cachedMeta;const e=this.chart;const i=e.data.labels||[];const o=Ze(n._parsed[t].r,e.options.locale);return{label:i[t]||"",value:o}}parseObjectData(t,n,e,i){return no.bind(this)(t,n,e,i)}update(t){const n=this._cachedMeta.data;this._updateRadius();this.updateElements(n,0,n.length,t)}getMinMax(){const t=this._cachedMeta;const n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};t.data.forEach(((t,e)=>{const i=this.getParsed(e).r;if(!isNaN(i)&&this.chart.getDataVisibility(e)){if(i<n.min){n.min=i}if(i>n.max){n.max=i}}}));return n}_updateRadius(){const t=this.chart;const n=t.chartArea;const e=t.options;const i=Math.min(n.right-n.left,n.bottom-n.top);const o=Math.max(i/2,0);const s=Math.max(e.cutoutPercentage?o/100*e.cutoutPercentage:1,0);const r=(o-s)/t.getVisibleDatasetCount();this.outerRadius=o-r*this.index;this.innerRadius=this.outerRadius-r}updateElements(t,n,e,i){const o=i==="reset";const s=this.chart;const r=s.options;const a=r.animation;const l=this._cachedMeta.rScale;const c=l.xCenter;const h=l.yCenter;const f=l.getIndexAngle(0)-.5*Xn;let d=f;let u;const p=360/this.countVisibleElements();for(u=0;u<n;++u){d+=this._computeAngle(u,i,p)}for(u=n;u<n+e;u++){const n=t[u];let e=d;let r=d+this._computeAngle(u,i,p);let g=s.getDataVisibility(u)?l.getDistanceFromCenterForValue(this.getParsed(u).r):0;d=r;if(o){if(a.animateScale){g=0}if(a.animateRotate){e=r=f}}const b={x:c,y:h,innerRadius:0,outerRadius:g,startAngle:e,endAngle:r,options:this.resolveDataElementOptions(u,n.active?"active":i)};this.updateElement(n,u,b,i)}}countVisibleElements(){const t=this._cachedMeta;let n=0;t.data.forEach(((t,e)=>{if(!isNaN(this.getParsed(e).r)&&this.chart.getDataVisibility(e)){n++}}));return n}_computeAngle(t,n,e){return this.chart.getDataVisibility(t)?he(this.resolveDataElementOptions(t,n).angle||e):0}}class Xs extends Vs{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}class Ks extends Ss{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:true,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(t){const n=this._cachedMeta.vScale;const e=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(e[n.axis])}}parseObjectData(t,n,e,i){return no.bind(this)(t,n,e,i)}update(t){const n=this._cachedMeta;const e=n.dataset;const i=n.data||[];const o=n.iScale.getLabels();e.points=i;if(t!=="resize"){const n=this.resolveDatasetElementOptions(t);if(!this.options.showLine){n.borderWidth=0}const s={_loop:true,_fullLoop:o.length===i.length,options:n};this.updateElement(e,undefined,s,t)}this.updateElements(i,0,i.length,t)}updateElements(t,n,e,i){const o=this._cachedMeta.rScale;const s=i==="reset";for(let r=n;r<n+e;r++){const n=t[r];const e=this.resolveDataElementOptions(r,n.active?"active":i);const a=o.getPointPositionForValue(r,this.getParsed(r).r);const l=s?o.xCenter:a.x;const c=s?o.yCenter:a.y;const h={x:l,y:c,angle:a.angle,skip:isNaN(l)||isNaN(c),options:e};this.updateElement(n,r,h,i)}}}class qs extends Ss{static id="scatter";static defaults={datasetElementType:false,dataElementType:"point",showLine:false,fill:false};static overrides={interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}};getLabelAndValue(t){const n=this._cachedMeta;const e=this.chart.data.labels||[];const{xScale:i,yScale:o}=n;const s=this.getParsed(t);const r=i.getLabelForValue(s.x);const a=o.getLabelForValue(s.y);return{label:e[t]||"",value:"("+r+", "+a+")"}}update(t){const n=this._cachedMeta;const{data:e=[]}=n;const i=this.chart._animationsDisabled;let{start:o,count:s}=Re(n,e,i);this._drawStart=o;this._drawCount=s;if(Ne(n)){o=0;s=e.length}if(this.options.showLine){if(!this.datasetElementType){this.addElements()}const{dataset:o,_dataset:s}=n;o._chart=this.chart;o._datasetIndex=this.index;o._decimated=!!s._decimated;o.points=e;const r=this.resolveDatasetElementOptions(t);r.segment=this.options.segment;this.updateElement(o,undefined,{animated:!i,options:r},t)}else if(this.datasetElementType){delete n.dataset;this.datasetElementType=false}this.updateElements(e,o,s,t)}addElements(){const{showLine:t}=this.options;if(!this.datasetElementType&&t){this.datasetElementType=this.chart.registry.getElement("line")}super.addElements()}updateElements(t,n,e,i){const o=i==="reset";const{iScale:s,vScale:r,_stacked:a,_dataset:l}=this._cachedMeta;const c=this.resolveDataElementOptions(n,i);const h=this.getSharedOptions(c);const f=this.includeOptions(i,h);const d=s.axis;const u=r.axis;const{spanGaps:p,segment:g}=this.options;const b=ae(p)?p:Number.POSITIVE_INFINITY;const w=this.chart._animationsDisabled||o||i==="none";let m=n>0&&this.getParsed(n-1);for(let c=n;c<n+e;++c){const n=t[c];const e=this.getParsed(c);const p=w?n:{};const y=vn(e[u]);const x=p[d]=s.getPixelForValue(e[d],c);const v=p[u]=o||y?r.getBasePixel():r.getPixelForValue(a?this.applyStack(r,e,a):e[u],c);p.skip=isNaN(x)||isNaN(v)||y;p.stop=c>0&&Math.abs(e[d]-m[d])>b;if(g){p.parsed=e;p.raw=l.data[c]}if(f){p.options=h||this.resolveDataElementOptions(c,n.active?"active":i)}if(!w){this.updateElement(n,c,p,i)}m=e}this.updateSharedOptions(h,i,c)}getMaxOverflow(){const t=this._cachedMeta;const n=t.data||[];if(!this.options.showLine){let t=0;for(let e=n.length-1;e>=0;--e){t=Math.max(t,n[e].size(this.resolveDataElementOptions(e))/2)}return t>0&&t}const e=t.dataset;const i=e.options&&e.options.borderWidth||0;if(!n.length){return i}const o=n[0].size(this.resolveDataElementOptions(0));const s=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,o,s)/2}}var Zs=Object.freeze({__proto__:null,BarController:Bs,BubbleController:Us,DoughnutController:Vs,LineController:$s,PieController:Xs,PolarAreaController:Ys,RadarController:Ks,ScatterController:qs});function Js(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Qs{static override(t){Object.assign(Qs.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return Js()}parse(){return Js()}format(){return Js()}add(){return Js()}diff(){return Js()}startOf(){return Js()}endOf(){return Js()}}var Gs={_date:Qs};function tr(t,n,e,i){const{controller:o,data:s,_sorted:r}=t;const a=o._cachedMeta.iScale;const l=t.dataset?t.dataset.options?t.dataset.options.spanGaps:null:null;if(a&&n===a.axis&&n!=="r"&&r&&s.length){const r=a._reversePixels?Me:ke;if(!i){const i=r(s,n,e);if(l){const{vScale:n}=o._cachedMeta;const{_parsed:e}=t;const s=e.slice(0,i.lo+1).reverse().findIndex((t=>!vn(t[n.axis])));i.lo-=Math.max(0,s);const r=e.slice(i.hi).findIndex((t=>!vn(t[n.axis])));i.hi+=Math.max(0,r)}return i}else if(o._sharedOptions){const t=s[0];const i=typeof t.getRange==="function"&&t.getRange(n);if(i){const t=r(s,n,e-i);const o=r(s,n,e+i);return{lo:t.lo,hi:o.hi}}}}return{lo:0,hi:s.length-1}}function nr(t,n,e,i,o){const s=t.getSortedVisibleDatasetMetas();const r=e[n];for(let t=0,e=s.length;t<e;++t){const{index:e,data:a}=s[t];const{lo:l,hi:c}=tr(s[t],n,r,o);for(let t=l;t<=c;++t){const n=a[t];if(!n.skip){i(n,e,t)}}}}function er(t){const n=t.indexOf("x")!==-1;const e=t.indexOf("y")!==-1;return function(t,i){const o=n?Math.abs(t.x-i.x):0;const s=e?Math.abs(t.y-i.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(s,2))}}function ir(t,n,e,i,o){const s=[];if(!o&&!t.isPointInArea(n)){return s}const r=function(e,r,a){if(!o&&!pi(e,t.chartArea,0)){return}if(e.inRange(n.x,n.y,i)){s.push({element:e,datasetIndex:r,index:a})}};nr(t,e,n,r,true);return s}function or(t,n,e,i){let o=[];function s(t,e,s){const{startAngle:r,endAngle:a}=t.getProps(["startAngle","endAngle"],i);const{angle:l}=ue(t,{x:n.x,y:n.y});if(we(l,r,a)){o.push({element:t,datasetIndex:e,index:s})}}nr(t,e,n,s);return o}function sr(t,n,e,i,o,s){let r=[];const a=er(e);let l=Number.POSITIVE_INFINITY;function c(e,c,h){const f=e.inRange(n.x,n.y,o);if(i&&!f){return}const d=e.getCenterPoint(o);const u=!!s||t.isPointInArea(d);if(!u&&!f){return}const p=a(n,d);if(p<l){r=[{element:e,datasetIndex:c,index:h}];l=p}else if(p===l){r.push({element:e,datasetIndex:c,index:h})}}nr(t,e,n,c);return r}function rr(t,n,e,i,o,s){if(!s&&!t.isPointInArea(n)){return[]}return e==="r"&&!i?or(t,n,e,o):sr(t,n,e,i,o,s)}function ar(t,n,e,i,o){const s=[];const r=e==="x"?"inXRange":"inYRange";let a=false;nr(t,e,n,((t,i,l)=>{if(t[r]&&t[r](n[e],o)){s.push({element:t,datasetIndex:i,index:l});a=a||t.inRange(n.x,n.y,o)}}));if(i&&!a){return[]}return s}var lr={modes:{index(t,n,e,i){const o=ko(n,t);const s=e.axis||"x";const r=e.includeInvisible||false;const a=e.intersect?ir(t,o,s,i,r):rr(t,o,s,false,i,r);const l=[];if(!a.length){return[]}t.getSortedVisibleDatasetMetas().forEach((t=>{const n=a[0].index;const e=t.data[n];if(e&&!e.skip){l.push({element:e,datasetIndex:t.index,index:n})}}));return l},dataset(t,n,e,i){const o=ko(n,t);const s=e.axis||"xy";const r=e.includeInvisible||false;let a=e.intersect?ir(t,o,s,i,r):rr(t,o,s,false,i,r);if(a.length>0){const n=a[0].datasetIndex;const e=t.getDatasetMeta(n).data;a=[];for(let t=0;t<e.length;++t){a.push({element:e[t],datasetIndex:n,index:t})}}return a},point(t,n,e,i){const o=ko(n,t);const s=e.axis||"xy";const r=e.includeInvisible||false;return ir(t,o,s,i,r)},nearest(t,n,e,i){const o=ko(n,t);const s=e.axis||"xy";const r=e.includeInvisible||false;return rr(t,o,s,e.intersect,i,r)},x(t,n,e,i){const o=ko(n,t);return ar(t,o,"x",e.intersect,i)},y(t,n,e,i){const o=ko(n,t);return ar(t,o,"y",e.intersect,i)}}};const cr=["left","top","right","bottom"];function hr(t,n){return t.filter((t=>t.pos===n))}function fr(t,n){return t.filter((t=>cr.indexOf(t.pos)===-1&&t.box.axis===n))}function dr(t,n){return t.sort(((t,e)=>{const i=n?e:t;const o=n?t:e;return i.weight===o.weight?i.index-o.index:i.weight-o.weight}))}function ur(t){const n=[];let e,i,o,s,r,a;for(e=0,i=(t||[]).length;e<i;++e){o=t[e];({position:s,options:{stack:r,stackWeight:a=1}}=o);n.push({index:e,box:o,pos:s,horizontal:o.isHorizontal(),weight:o.weight,stack:r&&s+r,stackWeight:a})}return n}function pr(t){const n={};for(const e of t){const{stack:t,pos:i,stackWeight:o}=e;if(!t||!cr.includes(i)){continue}const s=n[t]||(n[t]={count:0,placed:0,weight:0,size:0});s.count++;s.weight+=o}return n}function gr(t,n){const e=pr(t);const{vBoxMaxWidth:i,hBoxMaxHeight:o}=n;let s,r,a;for(s=0,r=t.length;s<r;++s){a=t[s];const{fullSize:r}=a.box;const l=e[a.stack];const c=l&&a.stackWeight/l.weight;if(a.horizontal){a.width=c?c*i:r&&n.availableWidth;a.height=o}else{a.width=i;a.height=c?c*o:r&&n.availableHeight}}return e}function br(t){const n=ur(t);const e=dr(n.filter((t=>t.box.fullSize)),true);const i=dr(hr(n,"left"),true);const o=dr(hr(n,"right"));const s=dr(hr(n,"top"),true);const r=dr(hr(n,"bottom"));const a=fr(n,"x");const l=fr(n,"y");return{fullSize:e,leftAndTop:i.concat(s),rightAndBottom:o.concat(l).concat(r).concat(a),chartArea:hr(n,"chartArea"),vertical:i.concat(o).concat(l),horizontal:s.concat(r).concat(a)}}function wr(t,n,e,i){return Math.max(t[e],n[e])+Math.max(t[i],n[i])}function mr(t,n){t.top=Math.max(t.top,n.top);t.left=Math.max(t.left,n.left);t.bottom=Math.max(t.bottom,n.bottom);t.right=Math.max(t.right,n.right)}function yr(t,n,e,i){const{pos:o,box:s}=e;const r=t.maxPadding;if(!Mn(o)){if(e.size){t[o]-=e.size}const n=i[e.stack]||{size:0,count:1};n.size=Math.max(n.size,e.horizontal?s.height:s.width);e.size=n.size/n.count;t[o]+=e.size}if(s.getPadding){mr(r,s.getPadding())}const a=Math.max(0,n.outerWidth-wr(r,t,"left","right"));const l=Math.max(0,n.outerHeight-wr(r,t,"top","bottom"));const c=a!==t.w;const h=l!==t.h;t.w=a;t.h=l;return e.horizontal?{same:c,other:h}:{same:h,other:c}}function xr(t){const n=t.maxPadding;function e(e){const i=Math.max(n[e]-t[e],0);t[e]+=i;return i}t.y+=e("top");t.x+=e("left");e("right");e("bottom")}function vr(t,n){const e=n.maxPadding;function i(t){const i={left:0,top:0,right:0,bottom:0};t.forEach((t=>{i[t]=Math.max(n[t],e[t])}));return i}return t?i(["left","right"]):i(["top","bottom"])}function kr(t,n,e,i){const o=[];let s,r,a,l,c,h;for(s=0,r=t.length,c=0;s<r;++s){a=t[s];l=a.box;l.update(a.width||n.w,a.height||n.h,vr(a.horizontal,n));const{same:r,other:f}=yr(n,e,a,i);c|=r&&o.length;h=h||f;if(!l.fullSize){o.push(a)}}return c&&kr(o,n,e,i)||h}function Mr(t,n,e,i,o){t.top=e;t.left=n;t.right=n+i;t.bottom=e+o;t.width=i;t.height=o}function zr(t,n,e,i){const o=e.padding;let{x:s,y:r}=n;for(const a of t){const t=a.box;const l=i[a.stack]||{placed:0,weight:1};const c=a.stackWeight/l.weight||1;if(a.horizontal){const i=n.w*c;const s=l.size||t.height;if(Hn(l.start)){r=l.start}if(t.fullSize){Mr(t,o.left,r,e.outerWidth-o.right-o.left,s)}else{Mr(t,n.left+l.placed,r,i,s)}l.start=r;l.placed+=i;r=t.bottom}else{const i=n.h*c;const r=l.size||t.width;if(Hn(l.start)){s=l.start}if(t.fullSize){Mr(t,s,o.top,r,e.outerHeight-o.bottom-o.top)}else{Mr(t,s,n.top+l.placed,r,i)}l.start=s;l.placed+=i;s=t.right}}n.x=s;n.y=r}var Sr={addBox(t,n){if(!t.boxes){t.boxes=[]}n.fullSize=n.fullSize||false;n.position=n.position||"top";n.weight=n.weight||0;n._layers=n._layers||function(){return[{z:0,draw(t){n.draw(t)}}]};t.boxes.push(n)},removeBox(t,n){const e=t.boxes?t.boxes.indexOf(n):-1;if(e!==-1){t.boxes.splice(e,1)}},configure(t,n,e){n.fullSize=e.fullSize;n.position=e.position;n.weight=e.weight},update(t,n,e,i){if(!t){return}const o=Ei(t.options.layout.padding);const s=Math.max(n-o.width,0);const r=Math.max(e-o.height,0);const a=br(t.boxes);const l=a.vertical;const c=a.horizontal;On(t.boxes,(t=>{if(typeof t.beforeLayout==="function"){t.beforeLayout()}}));const h=l.reduce(((t,n)=>n.box.options&&n.box.options.display===false?t:t+1),0)||1;const f=Object.freeze({outerWidth:n,outerHeight:e,padding:o,availableWidth:s,availableHeight:r,vBoxMaxWidth:s/2/h,hBoxMaxHeight:r/2});const d=Object.assign({},o);mr(d,Ei(i));const u=Object.assign({maxPadding:d,w:s,h:r,x:o.left,y:o.top},o);const p=gr(l.concat(c),f);kr(a.fullSize,u,f,p);kr(l,u,f,p);if(kr(c,u,f,p)){kr(l,u,f,p)}xr(u);zr(a.leftAndTop,u,f,p);u.x+=u.w;u.y+=u.h;zr(a.rightAndBottom,u,f,p);t.chartArea={left:u.left,top:u.top,right:u.left+u.w,bottom:u.top+u.h,height:u.h,width:u.w};On(a.chartArea,(n=>{const e=n.box;Object.assign(e,t.chartArea);e.update(u.w,u.h,{left:0,top:0,right:0,bottom:0})}))}};class Cr{acquireContext(t,n){}releaseContext(t){return false}addEventListener(t,n,e){}removeEventListener(t,n,e){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,e,i){n=Math.max(0,n||t.width);e=e||t.height;return{width:n,height:Math.max(0,i?Math.floor(n/i):e)}}isAttached(t){return true}updateConfig(t){}}class _r extends Cr{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=false}}const jr="$chartjs";const Pr={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};const Or=t=>t===null||t==="";function Er(t,n){const e=t.style;const i=t.getAttribute("height");const o=t.getAttribute("width");t[jr]={initial:{height:i,width:o,style:{display:e.display,height:e.height,width:e.width}}};e.display=e.display||"block";e.boxSizing=e.boxSizing||"border-box";if(Or(o)){const n=jo(t,"width");if(n!==undefined){t.width=n}}if(Or(i)){if(t.style.height===""){t.height=t.width/(n||2)}else{const n=jo(t,"height");if(n!==undefined){t.height=n}}}return t}const Ar=_o?{passive:true}:false;function Dr(t,n,e){if(t){t.addEventListener(n,e,Ar)}}function Lr(t,n,e){if(t&&t.canvas){t.canvas.removeEventListener(n,e,Ar)}}function Rr(t,n){const e=Pr[t.type]||t.type;const{x:i,y:o}=ko(t,n);return{type:e,chart:n,native:t,x:i!==undefined?i:null,y:o!==undefined?o:null}}function Nr(t,n){for(const e of t){if(e===n||e.contains(n)){return true}}}function Ir(t,n,e){const i=t.canvas;const o=new MutationObserver((t=>{let n=false;for(const e of t){n=n||Nr(e.addedNodes,i);n=n&&!Nr(e.removedNodes,i)}if(n){e()}}));o.observe(document,{childList:true,subtree:true});return o}function Tr(t,n,e){const i=t.canvas;const o=new MutationObserver((t=>{let n=false;for(const e of t){n=n||Nr(e.removedNodes,i);n=n&&!Nr(e.addedNodes,i)}if(n){e()}}));o.observe(document,{childList:true,subtree:true});return o}const Fr=new Map;let Wr=0;function Br(){const t=window.devicePixelRatio;if(t===Wr){return}Wr=t;Fr.forEach(((n,e)=>{if(e.currentDevicePixelRatio!==t){n()}}))}function Ur(t,n){if(!Fr.size){window.addEventListener("resize",Br)}Fr.set(t,n)}function Hr(t){Fr.delete(t);if(!Fr.size){window.removeEventListener("resize",Br)}}function Vr(t,n,e){const i=t.canvas;const o=i&&po(i);if(!o){return}const s=Oe(((t,n)=>{const i=o.clientWidth;e(t,n);if(i<o.clientWidth){e()}}),window);const r=new ResizeObserver((t=>{const n=t[0];const e=n.contentRect.width;const i=n.contentRect.height;if(e===0&&i===0){return}s(e,i)}));r.observe(o);Ur(t,s);return r}function $r(t,n,e){if(e){e.disconnect()}if(n==="resize"){Hr(t)}}function Yr(t,n,e){const i=t.canvas;const o=Oe((n=>{if(t.ctx!==null){e(Rr(n,t))}}),t);Dr(i,n,o);return o}class Xr extends Cr{acquireContext(t,n){const e=t&&t.getContext&&t.getContext("2d");if(e&&e.canvas===t){Er(t,n);return e}return null}releaseContext(t){const n=t.canvas;if(!n[jr]){return false}const e=n[jr].initial;["height","width"].forEach((t=>{const i=e[t];if(vn(i)){n.removeAttribute(t)}else{n.setAttribute(t,i)}}));const i=e.style||{};Object.keys(i).forEach((t=>{n.style[t]=i[t]}));n.width=n.width;delete n[jr];return true}addEventListener(t,n,e){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={});const o={attach:Ir,detach:Tr,resize:Vr};const s=o[n]||Yr;i[n]=s(t,n,e)}removeEventListener(t,n){const e=t.$proxies||(t.$proxies={});const i=e[n];if(!i){return}const o={attach:$r,detach:$r,resize:$r};const s=o[n]||Lr;s(t,n,i);e[n]=undefined}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,e,i){return So(t,n,e,i)}isAttached(t){const n=t&&po(t);return!!(n&&n.isConnected)}}function Kr(t){if(!uo()||typeof OffscreenCanvas!=="undefined"&&t instanceof OffscreenCanvas){return _r}return Xr}class qr{static defaults={};static defaultRoutes=undefined;x;y;active=false;options;$animations;tooltipPosition(t){const{x:n,y:e}=this.getProps(["x","y"],t);return{x:n,y:e}}hasValue(){return ae(this.x)&&ae(this.y)}getProps(t,n){const e=this.$animations;if(!n||!e){return this}const i={};t.forEach((t=>{i[t]=e[t]&&e[t].active()?e[t]._to:this[t]}));return i}}function Zr(t,n){const e=t.options.ticks;const i=Jr(t);const o=Math.min(e.maxTicksLimit||i,i);const s=e.major.enabled?Gr(n):[];const r=s.length;const a=s[0];const l=s[r-1];const c=[];if(r>o){ta(n,c,s,r/o);return c}const h=Qr(s,n,o);if(r>0){let t,e;const i=r>1?Math.round((l-a)/(r-1)):null;na(n,c,h,vn(i)?0:a-i,a);for(t=0,e=r-1;t<e;t++){na(n,c,h,s[t],s[t+1])}na(n,c,h,l,vn(i)?n.length:l+i);return c}na(n,c,h);return c}function Jr(t){const n=t.options.offset;const e=t._tickSize();const i=t._length/e+(n?0:1);const o=t._maxLength/e;return Math.floor(Math.min(i,o))}function Qr(t,n,e){const i=ea(t);const o=n.length/e;if(!i){return Math.max(o,1)}const s=se(i);for(let t=0,n=s.length-1;t<n;t++){const n=s[t];if(n>o){return n}}return Math.max(o,1)}function Gr(t){const n=[];let e,i;for(e=0,i=t.length;e<i;e++){if(t[e].major){n.push(e)}}return n}function ta(t,n,e,i){let o=0;let s=e[0];let r;i=Math.ceil(i);for(r=0;r<t.length;r++){if(r===s){n.push(t[r]);o++;s=e[o*i]}}}function na(t,n,e,i,o){const s=Cn(i,0);const r=Math.min(Cn(o,t.length),t.length);let a=0;let l,c,h;e=Math.ceil(e);if(o){l=o-i;e=l/Math.floor(l/e)}h=s;while(h<0){a++;h=Math.round(s+a*e)}for(c=Math.max(s,0);c<r;c++){if(c===h){n.push(t[c]);a++;h=Math.round(s+a*e)}}}function ea(t){const n=t.length;let e,i;if(n<2){return false}for(i=t[0],e=1;e<n;++e){if(t[e]-t[e-1]!==i){return false}}return i}const ia=t=>t==="left"?"right":t==="right"?"left":t;const oa=(t,n,e)=>n==="top"||n==="left"?t[n]+e:t[n]-e;const sa=(t,n)=>Math.min(n||t,t);function ra(t,n){const e=[];const i=t.length/n;const o=t.length;let s=0;for(;s<o;s+=i){e.push(t[Math.floor(s)])}return e}function aa(t,n,e){const i=t.ticks.length;const o=Math.min(n,i-1);const s=t._startPixel;const r=t._endPixel;const a=1e-6;let l=t.getPixelForTick(o);let c;if(e){if(i===1){c=Math.max(l-s,r-l)}else if(n===0){c=(t.getPixelForTick(1)-l)/2}else{c=(l-t.getPixelForTick(o-1))/2}l+=o<n?c:-c;if(l<s-a||l>r+a){return}}return l}function la(t,n){On(t,(t=>{const e=t.gc;const i=e.length/2;let o;if(i>n){for(o=0;o<i;++o){delete t.data[e[o]]}e.splice(0,i)}}))}function ca(t){return t.drawTicks?t.tickLength:0}function ha(t,n){if(!t.display){return 0}const e=Ai(t.font,n);const i=Ei(t.padding);const o=kn(t.text)?t.text.length:1;return o*e.lineHeight+i.height}function fa(t,n){return Ri(t,{scale:n,type:"scale"})}function da(t,n,e){return Ri(t,{tick:e,index:n,type:"tick"})}function ua(t,n,e){let i=Ae(t);if(e&&n!=="right"||!e&&n==="right"){i=ia(i)}return i}function pa(t,n,e,i){const{top:o,left:s,bottom:r,right:a,chart:l}=t;const{chartArea:c,scales:h}=l;let f=0;let d,u,p;const g=r-o;const b=a-s;if(t.isHorizontal()){u=De(i,s,a);if(Mn(e)){const t=Object.keys(e)[0];const i=e[t];p=h[t].getPixelForValue(i)+g-n}else if(e==="center"){p=(c.bottom+c.top)/2+g-n}else{p=oa(t,e,n)}d=a-s}else{if(Mn(e)){const t=Object.keys(e)[0];const i=e[t];u=h[t].getPixelForValue(i)-b+n}else if(e==="center"){u=(c.left+c.right)/2-b+n}else{u=oa(t,e,n)}p=De(i,r,o);f=e==="left"?-Qn:Qn}return{titleX:u,titleY:p,maxWidth:d,rotation:f}}class ga extends qr{constructor(t){super();this.id=t.id;this.type=t.type;this.options=undefined;this.ctx=t.ctx;this.chart=t.chart;this.top=undefined;this.bottom=undefined;this.left=undefined;this.right=undefined;this.width=undefined;this.height=undefined;this._margins={left:0,right:0,top:0,bottom:0};this.maxWidth=undefined;this.maxHeight=undefined;this.paddingTop=undefined;this.paddingBottom=undefined;this.paddingLeft=undefined;this.paddingRight=undefined;this.axis=undefined;this.labelRotation=undefined;this.min=undefined;this.max=undefined;this._range=undefined;this.ticks=[];this._gridLineItems=null;this._labelItems=null;this._labelSizes=null;this._length=0;this._maxLength=0;this._longestTextCache={};this._startPixel=undefined;this._endPixel=undefined;this._reversePixels=false;this._userMax=undefined;this._userMin=undefined;this._suggestedMax=undefined;this._suggestedMin=undefined;this._ticksLength=0;this._borderValue=0;this._cache={};this._dataLimitsCached=false;this.$context=undefined}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,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:e,_suggestedMax:i}=this;t=Sn(t,Number.POSITIVE_INFINITY);n=Sn(n,Number.NEGATIVE_INFINITY);e=Sn(e,Number.POSITIVE_INFINITY);i=Sn(i,Number.NEGATIVE_INFINITY);return{min:Sn(t,e),max:Sn(n,i),minDefined:zn(t),maxDefined:zn(n)}}getMinMax(t){let{min:n,max:e,minDefined:i,maxDefined:o}=this.getUserBounds();let s;if(i&&o){return{min:n,max:e}}const r=this.getMatchingVisibleMetas();for(let a=0,l=r.length;a<l;++a){s=r[a].controller.getMinMax(this,t);if(!i){n=Math.min(n,s.min)}if(!o){e=Math.max(e,s.max)}}n=o&&n>e?e:n;e=i&&n>e?n:e;return{min:Sn(n,Sn(e,n)),max:Sn(e,Sn(n,e))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){const n=this._labelItems||(this._labelItems=this._computeLabelItems(t));return n}beforeLayout(){this._cache={};this._dataLimitsCached=false}beforeUpdate(){Pn(this.options.beforeUpdate,[this])}update(t,n,e){const{beginAtZero:i,grace:o,ticks:s}=this.options;const r=s.sampleSize;this.beforeUpdate();this.maxWidth=t;this.maxHeight=n;this._margins=e=Object.assign({left:0,right:0,top:0,bottom:0},e);this.ticks=null;this._labelSizes=null;this._gridLineItems=null;this._labelItems=null;this.beforeSetDimensions();this.setDimensions();this.afterSetDimensions();this._maxLength=this.isHorizontal()?this.width+e.left+e.right:this.height+e.top+e.bottom;if(!this._dataLimitsCached){this.beforeDataLimits();this.determineDataLimits();this.afterDataLimits();this._range=Li(this,o,i);this._dataLimitsCached=true}this.beforeBuildTicks();this.ticks=this.buildTicks()||[];this.afterBuildTicks();const a=r<this.ticks.length;this._convertTicksToLabels(a?ra(this.ticks,r):this.ticks);this.configure();this.beforeCalculateLabelRotation();this.calculateLabelRotation();this.afterCalculateLabelRotation();if(s.display&&(s.autoSkip||s.source==="auto")){this.ticks=Zr(this,this.ticks);this._labelSizes=null;this.afterAutoSkip()}if(a){this._convertTicksToLabels(this.ticks)}this.beforeFit();this.fit();this.afterFit();this.afterUpdate()}configure(){let t=this.options.reverse;let n,e;if(this.isHorizontal()){n=this.left;e=this.right}else{n=this.top;e=this.bottom;t=!t}this._startPixel=n;this._endPixel=e;this._reversePixels=t;this._length=e-n;this._alignToPixels=this.options.alignToPixels}afterUpdate(){Pn(this.options.afterUpdate,[this])}beforeSetDimensions(){Pn(this.options.beforeSetDimensions,[this])}setDimensions(){if(this.isHorizontal()){this.width=this.maxWidth;this.left=0;this.right=this.width}else{this.height=this.maxHeight;this.top=0;this.bottom=this.height}this.paddingLeft=0;this.paddingTop=0;this.paddingRight=0;this.paddingBottom=0}afterSetDimensions(){Pn(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext());Pn(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Pn(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let e,i,o;for(e=0,i=t.length;e<i;e++){o=t[e];o.label=Pn(n.callback,[o.value,e,t],this)}}afterTickToLabelConversion(){Pn(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Pn(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options;const n=t.ticks;const e=sa(this.ticks.length,t.ticks.maxTicksLimit);const i=n.minRotation||0;const o=n.maxRotation;let s=i;let r,a,l;if(!this._isVisible()||!n.display||i>=o||e<=1||!this.isHorizontal()){this.labelRotation=i;return}const c=this._getLabelSizes();const h=c.widest.width;const f=c.highest.height;const d=me(this.chart.width-h,0,this.maxWidth);r=t.offset?this.maxWidth/e:d/(e-1);if(h+6>r){r=d/(e-(t.offset?.5:1));a=this.maxHeight-ca(t.grid)-n.padding-ha(t.title,this.chart.options.font);l=Math.sqrt(h*h+f*f);s=fe(Math.min(Math.asin(me((c.highest.height+6)/r,-1,1)),Math.asin(me(a/l,-1,1))-Math.asin(me(f/l,-1,1))));s=Math.max(i,Math.min(o,s))}this.labelRotation=s}afterCalculateLabelRotation(){Pn(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Pn(this.options.beforeFit,[this])}fit(){const t={width:0,height:0};const{chart:n,options:{ticks:e,title:i,grid:o}}=this;const s=this._isVisible();const r=this.isHorizontal();if(s){const s=ha(i,n.options.font);if(r){t.width=this.maxWidth;t.height=ca(o)+s}else{t.height=this.maxHeight;t.width=ca(o)+s}if(e.display&&this.ticks.length){const{first:n,last:i,widest:o,highest:s}=this._getLabelSizes();const a=e.padding*2;const l=he(this.labelRotation);const c=Math.cos(l);const h=Math.sin(l);if(r){const n=e.mirror?0:h*o.width+c*s.height;t.height=Math.min(this.maxHeight,t.height+n+a)}else{const n=e.mirror?0:c*o.width+h*s.height;t.width=Math.min(this.maxWidth,t.width+n+a)}this._calculatePadding(n,i,h,c)}}this._handleMargins();if(r){this.width=this._length=n.width-this._margins.left-this._margins.right;this.height=t.height}else{this.width=t.width;this.height=this._length=n.height-this._margins.top-this._margins.bottom}}_calculatePadding(t,n,e,i){const{ticks:{align:o,padding:s},position:r}=this.options;const a=this.labelRotation!==0;const l=r!=="top"&&this.axis==="x";if(this.isHorizontal()){const r=this.getPixelForTick(0)-this.left;const c=this.right-this.getPixelForTick(this.ticks.length-1);let h=0;let f=0;if(a){if(l){h=i*t.width;f=e*n.height}else{h=e*t.height;f=i*n.width}}else if(o==="start"){f=n.width}else if(o==="end"){h=t.width}else if(o!=="inner"){h=t.width/2;f=n.width/2}this.paddingLeft=Math.max((h-r+s)*this.width/(this.width-r),0);this.paddingRight=Math.max((f-c+s)*this.width/(this.width-c),0)}else{let e=n.height/2;let i=t.height/2;if(o==="start"){e=0;i=t.height}else if(o==="end"){e=n.height;i=0}this.paddingTop=e+s;this.paddingBottom=i+s}}_handleMargins(){if(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(){Pn(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion();this.generateTickLabels(t);let n,e;for(n=0,e=t.length;n<e;n++){if(vn(t[n].label)){t.splice(n,1);e--;n--}}this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let e=this.ticks;if(n<e.length){e=ra(e,n)}this._labelSizes=t=this._computeLabelSizes(e,e.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,e){const{ctx:i,_longestTextCache:o}=this;const s=[];const r=[];const a=Math.floor(n/sa(n,e));let l=0;let c=0;let h,f,d,u,p,g,b,w,m,y,x;for(h=0;h<n;h+=a){u=t[h].label;p=this._resolveTickFontOptions(h);i.font=g=p.string;b=o[g]=o[g]||{data:{},gc:[]};w=p.lineHeight;m=y=0;if(!vn(u)&&!kn(u)){m=li(i,b.data,b.gc,m,u);y=w}else if(kn(u)){for(f=0,d=u.length;f<d;++f){x=u[f];if(!vn(x)&&!kn(x)){m=li(i,b.data,b.gc,m,x);y+=w}}}s.push(m);r.push(y);l=Math.max(m,l);c=Math.max(y,c)}la(o,n);const v=s.indexOf(l);const k=r.indexOf(c);const M=t=>({width:s[t]||0,height:r[t]||0});return{first:M(0),last:M(n-1),widest:M(v),highest:M(k),widths:s,heights:r}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;if(t<0||t>n.length-1){return null}return this.getPixelForValue(n[t].value)}getPixelForDecimal(t){if(this._reversePixels){t=1-t}const n=this._startPixel+t*this._length;return ye(this._alignToPixels?hi(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const e=n[t];return e.$context||(e.$context=da(this.getContext(),t,e))}return this.$context||(this.$context=fa(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks;const n=he(this.labelRotation);const e=Math.abs(Math.cos(n));const i=Math.abs(Math.sin(n));const o=this._getLabelSizes();const s=t.autoSkipPadding||0;const r=o?o.widest.width+s:0;const a=o?o.highest.height+s:0;return this.isHorizontal()?a*e>r*i?r/e:a/i:a*i<r*e?a/e:r/i}_isVisible(){const t=this.options.display;if(t!=="auto"){return!!t}return this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis;const e=this.chart;const i=this.options;const{grid:o,position:s,border:r}=i;const a=o.offset;const l=this.isHorizontal();const c=this.ticks;const h=c.length+(a?1:0);const f=ca(o);const d=[];const u=r.setContext(this.getContext());const p=u.display?u.width:0;const g=p/2;const b=function(t){return hi(e,t,p)};let w,m,y,x;let v,k,M,z,S,C,_,j;if(s==="top"){w=b(this.bottom);k=this.bottom-f;z=w-g;C=b(t.top)+g;j=t.bottom}else if(s==="bottom"){w=b(this.top);C=t.top;j=b(t.bottom)-g;k=w+g;z=this.top+f}else if(s==="left"){w=b(this.right);v=this.right-f;M=w-g;S=b(t.left)+g;_=t.right}else if(s==="right"){w=b(this.left);S=t.left;_=b(t.right)-g;v=w+g;M=this.left+f}else if(n==="x"){if(s==="center"){w=b((t.top+t.bottom)/2+.5)}else if(Mn(s)){const t=Object.keys(s)[0];const n=s[t];w=b(this.chart.scales[t].getPixelForValue(n))}C=t.top;j=t.bottom;k=w+g;z=k+f}else if(n==="y"){if(s==="center"){w=b((t.left+t.right)/2)}else if(Mn(s)){const t=Object.keys(s)[0];const n=s[t];w=b(this.chart.scales[t].getPixelForValue(n))}v=w-g;M=v-f;S=t.left;_=t.right}const P=Cn(i.ticks.maxTicksLimit,h);const O=Math.max(1,Math.ceil(h/P));for(m=0;m<h;m+=O){const t=this.getContext(m);const n=o.setContext(t);const i=r.setContext(t);const s=n.lineWidth;const c=n.color;const h=i.dash||[];const f=i.dashOffset;const u=n.tickWidth;const p=n.tickColor;const g=n.tickBorderDash||[];const b=n.tickBorderDashOffset;y=aa(this,m,a);if(y===undefined){continue}x=hi(e,y,s);if(l){v=M=S=_=x}else{k=z=C=j=x}d.push({tx1:v,ty1:k,tx2:M,ty2:z,x1:S,y1:C,x2:_,y2:j,width:s,color:c,borderDash:h,borderDashOffset:f,tickWidth:u,tickColor:p,tickBorderDash:g,tickBorderDashOffset:b})}this._ticksLength=h;this._borderValue=w;return d}_computeLabelItems(t){const n=this.axis;const e=this.options;const{position:i,ticks:o}=e;const s=this.isHorizontal();const r=this.ticks;const{align:a,crossAlign:l,padding:c,mirror:h}=o;const f=ca(e.grid);const d=f+c;const u=h?-c:d;const p=-he(this.labelRotation);const g=[];let b,w,m,y,x,v,k,M,z,S,C,_;let j="middle";if(i==="top"){v=this.bottom-u;k=this._getXAxisLabelAlignment()}else if(i==="bottom"){v=this.top+u;k=this._getXAxisLabelAlignment()}else if(i==="left"){const t=this._getYAxisLabelAlignment(f);k=t.textAlign;x=t.x}else if(i==="right"){const t=this._getYAxisLabelAlignment(f);k=t.textAlign;x=t.x}else if(n==="x"){if(i==="center"){v=(t.top+t.bottom)/2+d}else if(Mn(i)){const t=Object.keys(i)[0];const n=i[t];v=this.chart.scales[t].getPixelForValue(n)+d}k=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center"){x=(t.left+t.right)/2-d}else if(Mn(i)){const t=Object.keys(i)[0];const n=i[t];x=this.chart.scales[t].getPixelForValue(n)}k=this._getYAxisLabelAlignment(f).textAlign}if(n==="y"){if(a==="start"){j="top"}else if(a==="end"){j="bottom"}}const P=this._getLabelSizes();for(b=0,w=r.length;b<w;++b){m=r[b];y=m.label;const t=o.setContext(this.getContext(b));M=this.getPixelForTick(b)+o.labelOffset;z=this._resolveTickFontOptions(b);S=z.lineHeight;C=kn(y)?y.length:1;const n=C/2;const e=t.color;const a=t.textStrokeColor;const c=t.textStrokeWidth;let f=k;if(s){x=M;if(k==="inner"){if(b===w-1){f=!this.options.reverse?"right":"left"}else if(b===0){f=!this.options.reverse?"left":"right"}else{f="center"}}if(i==="top"){if(l==="near"||p!==0){_=-C*S+S/2}else if(l==="center"){_=-P.highest.height/2-n*S+S}else{_=-P.highest.height+S/2}}else{if(l==="near"||p!==0){_=S/2}else if(l==="center"){_=P.highest.height/2-n*S}else{_=P.highest.height-C*S}}if(h){_*=-1}if(p!==0&&!t.showLabelBackdrop){x+=S/2*Math.sin(p)}}else{v=M;_=(1-C)*S/2}let d;if(t.showLabelBackdrop){const n=Ei(t.backdropPadding);const e=P.heights[b];const i=P.widths[b];let o=_-n.top;let s=0-n.left;switch(j){case"middle":o-=e/2;break;case"bottom":o-=e;break}switch(k){case"center":s-=i/2;break;case"right":s-=i;break;case"inner":if(b===w-1){s-=i}else if(b>0){s-=i/2}break}d={left:s,top:o,width:i+n.width,height:e+n.height,color:t.backdropColor}}g.push({label:y,font:z,textOffset:_,options:{rotation:p,color:e,strokeColor:a,strokeWidth:c,textAlign:f,textBaseline:j,translation:[x,v],backdrop:d}})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;const e=-he(this.labelRotation);if(e){return t==="top"?"left":"right"}let i="center";if(n.align==="start"){i="left"}else if(n.align==="end"){i="right"}else if(n.align==="inner"){i="inner"}return i}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:e,mirror:i,padding:o}}=this.options;const s=this._getLabelSizes();const r=t+o;const a=s.widest.width;let l;let c;if(n==="left"){if(i){c=this.right+o;if(e==="near"){l="left"}else if(e==="center"){l="center";c+=a/2}else{l="right";c+=a}}else{c=this.right-r;if(e==="near"){l="right"}else if(e==="center"){l="center";c-=a/2}else{l="left";c=this.left}}}else if(n==="right"){if(i){c=this.left+o;if(e==="near"){l="right"}else if(e==="center"){l="center";c-=a/2}else{l="left";c-=a}}else{c=this.left+r;if(e==="near"){l="left"}else if(e==="center"){l="center";c+=a/2}else{l="right";c=this.right}}}else{l="right"}return{textAlign:l,x:c}}_computeLabelArea(){if(this.options.ticks.mirror){return}const t=this.chart;const n=this.options.position;if(n==="left"||n==="right"){return{top:0,left:this.left,bottom:t.height,right:this.right}}if(n==="top"||n==="bottom"){return{top:this.top,left:0,bottom:this.bottom,right:t.width}}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:e,top:i,width:o,height:s}=this;if(n){t.save();t.fillStyle=n;t.fillRect(e,i,o,s);t.restore()}}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display){return 0}const e=this.ticks;const i=e.findIndex((n=>n.value===t));if(i>=0){const t=n.setContext(this.getContext(i));return t.lineWidth}return 0}drawGrid(t){const n=this.options.grid;const e=this.ctx;const i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,s;const r=(t,n,i)=>{if(!i.width||!i.color){return}e.save();e.lineWidth=i.width;e.strokeStyle=i.color;e.setLineDash(i.borderDash||[]);e.lineDashOffset=i.borderDashOffset;e.beginPath();e.moveTo(t.x,t.y);e.lineTo(n.x,n.y);e.stroke();e.restore()};if(n.display){for(o=0,s=i.length;o<s;++o){const t=i[o];if(n.drawOnChartArea){r({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t)}if(n.drawTicks){r({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}}}drawBorder(){const{chart:t,ctx:n,options:{border:e,grid:i}}=this;const o=e.setContext(this.getContext());const s=e.display?o.width:0;if(!s){return}const r=i.setContext(this.getContext(0)).lineWidth;const a=this._borderValue;let l,c,h,f;if(this.isHorizontal()){l=hi(t,this.left,s)-s/2;c=hi(t,this.right,r)+r/2;h=f=a}else{h=hi(t,this.top,s)-s/2;f=hi(t,this.bottom,r)+r/2;l=c=a}n.save();n.lineWidth=o.width;n.strokeStyle=o.color;n.beginPath();n.moveTo(l,h);n.lineTo(c,f);n.stroke();n.restore()}drawLabels(t){const n=this.options.ticks;if(!n.display){return}const e=this.ctx;const i=this._computeLabelArea();if(i){gi(e,i)}const o=this.getLabelItems(t);for(const t of o){const n=t.options;const i=t.font;const o=t.label;const s=t.textOffset;ki(e,o,0,s,i,n)}if(i){bi(e)}}drawTitle(){const{ctx:t,options:{position:n,title:e,reverse:i}}=this;if(!e.display){return}const o=Ai(e.font);const s=Ei(e.padding);const r=e.align;let a=o.lineHeight/2;if(n==="bottom"||n==="center"||Mn(n)){a+=s.bottom;if(kn(e.text)){a+=o.lineHeight*(e.text.length-1)}}else{a+=s.top}const{titleX:l,titleY:c,maxWidth:h,rotation:f}=pa(this,a,n,r);ki(t,e.text,0,0,o,{color:e.color,maxWidth:h,rotation:f,textAlign:ua(r,n,i),textBaseline:"middle",translation:[l,c]})}draw(t){if(!this._isVisible()){return}this.drawBackground();this.drawGrid(t);this.drawBorder();this.drawTitle();this.drawLabels(t)}_layers(){const t=this.options;const n=t.ticks&&t.ticks.z||0;const e=Cn(t.grid&&t.grid.z,-1);const i=Cn(t.border&&t.border.z,0);if(!this._isVisible()||this.draw!==ga.prototype.draw){return[{z:n,draw:t=>{this.draw(t)}}]}return[{z:e,draw:t=>{this.drawBackground();this.drawGrid(t);this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:t=>{this.drawLabels(t)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas();const e=this.axis+"AxisID";const i=[];let o,s;for(o=0,s=n.length;o<s;++o){const s=n[o];if(s[e]===this.id&&(!t||s.type===t)){i.push(s)}}return i}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return Ai(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class ba{constructor(t,n,e){this.type=t;this.scope=n;this.override=e;this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let e;if(ya(n)){e=this.register(n)}const i=this.items;const o=t.id;const s=this.scope+"."+o;if(!o){throw new Error("class does not have id: "+t)}if(o in i){return s}i[o]=t;wa(t,s,e);if(this.override){ri.override(t.id,t.overrides)}return s}get(t){return this.items[t]}unregister(t){const n=this.items;const e=t.id;const i=this.scope;if(e in n){delete n[e]}if(i&&e in ri[i]){delete ri[i][e];if(this.override){delete ni[e]}}}}function wa(t,n,e){const i=Rn(Object.create(null),[e?ri.get(e):{},ri.get(n),t.defaults]);ri.set(n,i);if(t.defaultRoutes){ma(n,t.defaultRoutes)}if(t.descriptors){ri.describe(n,t.descriptors)}}function ma(t,n){Object.keys(n).forEach((e=>{const i=e.split(".");const o=i.pop();const s=[t].concat(i).join(".");const r=n[e].split(".");const a=r.pop();const l=r.join(".");ri.route(s,o,l,a)}))}function ya(t){return"id"in t&&"defaults"in t}class xa{constructor(){this.controllers=new ba(Ss,"datasets",true);this.elements=new ba(qr,"elements");this.plugins=new ba(Object,"plugins");this.scales=new ba(ga,"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,n,e){[...n].forEach((n=>{const i=e||this._getRegistryForType(n);if(e||i.isForType(n)||i===this.plugins&&n.id){this._exec(t,i,n)}else{On(n,(n=>{const i=e||this._getRegistryForType(n);this._exec(t,i,n)}))}}))}_exec(t,n,e){const i=Un(t);Pn(e["before"+i],[],e);n[t](e);Pn(e["after"+i],[],e)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const e=this._typedRegistries[n];if(e.isForType(t)){return e}}return this.plugins}_get(t,n,e){const i=n.get(t);if(i===undefined){throw new Error('"'+t+'" is not a registered '+e+".")}return i}}var va=new xa;class ka{constructor(){this._init=[]}notify(t,n,e,i){if(n==="beforeInit"){this._init=this._createDescriptors(t,true);this._notify(this._init,t,"install")}const o=i?this._descriptors(t).filter(i):this._descriptors(t);const s=this._notify(o,t,n,e);if(n==="afterDestroy"){this._notify(o,t,"stop");this._notify(this._init,t,"uninstall")}return s}_notify(t,n,e,i){i=i||{};for(const o of t){const t=o.plugin;const s=t[e];const r=[n,i,o.options];if(Pn(s,r,t)===false&&i.cancelable){return false}}return true}invalidate(){if(!vn(this._cache)){this._oldCache=this._cache;this._cache=undefined}}_descriptors(t){if(this._cache){return this._cache}const n=this._cache=this._createDescriptors(t);this._notifyStateChanges(t);return n}_createDescriptors(t,n){const e=t&&t.config;const i=Cn(e.options&&e.options.plugins,{});const o=Ma(e);return i===false&&!n?[]:Sa(t,o,i,n)}_notifyStateChanges(t){const n=this._oldCache||[];const e=this._cache;const i=(t,n)=>t.filter((t=>!n.some((n=>t.plugin.id===n.plugin.id))));this._notify(i(n,e),t,"stop");this._notify(i(e,n),t,"start")}}function Ma(t){const n={};const e=[];const i=Object.keys(va.plugins.items);for(let t=0;t<i.length;t++){e.push(va.getPlugin(i[t]))}const o=t.plugins||[];for(let t=0;t<o.length;t++){const i=o[t];if(e.indexOf(i)===-1){e.push(i);n[i.id]=true}}return{plugins:e,localIds:n}}function za(t,n){if(!n&&t===false){return null}if(t===true){return{}}return t}function Sa(t,{plugins:n,localIds:e},i,o){const s=[];const r=t.getContext();for(const a of n){const n=a.id;const l=za(i[n],o);if(l===null){continue}s.push({plugin:a,options:Ca(t.config,{plugin:a,local:e[n]},l,r)})}return s}function Ca(t,{plugin:n,local:e},i,o){const s=t.pluginScopeKeys(n);const r=t.getOptionScopes(i,s);if(e&&n.defaults){r.push(n.defaults)}return t.createResolver(r,o,[""],{scriptable:false,indexable:false,allKeys:true})}function _a(t,n){const e=ri.datasets[t]||{};const i=(n.datasets||{})[t]||{};return i.indexAxis||n.indexAxis||e.indexAxis||"x"}function ja(t,n){let e=t;if(t==="_index_"){e=n}else if(t==="_value_"){e=n==="x"?"y":"x"}return e}function Pa(t,n){return t===n?"_index_":"_value_"}function Oa(t){if(t==="x"||t==="y"||t==="r"){return t}}function Ea(t){if(t==="top"||t==="bottom"){return"x"}if(t==="left"||t==="right"){return"y"}}function Aa(t,...n){if(Oa(t)){return t}for(const e of n){const n=e.axis||Ea(e.position)||t.length>1&&Oa(t[0].toLowerCase());if(n){return n}}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function Da(t,n,e){if(e[n+"AxisID"]===t){return{axis:n}}}function La(t,n){if(n.data&&n.data.datasets){const e=n.data.datasets.filter((n=>n.xAxisID===t||n.yAxisID===t));if(e.length){return Da(t,"x",e[0])||Da(t,"y",e[0])}}return{}}function Ra(t,n){const e=ni[t.type]||{scales:{}};const i=n.scales||{};const o=_a(t.type,n);const s=Object.create(null);Object.keys(i).forEach((n=>{const r=i[n];if(!Mn(r)){return console.error(`Invalid scale configuration for scale: ${n}`)}if(r._proxy){return console.warn(`Ignoring resolver passed as options for scale: ${n}`)}const a=Aa(n,r,La(n,t),ri.scales[r.type]);const l=Pa(a,o);const c=e.scales||{};s[n]=Nn(Object.create(null),[{axis:a},r,c[a],c[l]])}));t.data.datasets.forEach((e=>{const o=e.type||t.type;const r=e.indexAxis||_a(o,n);const a=ni[o]||{};const l=a.scales||{};Object.keys(l).forEach((t=>{const n=ja(t,r);const o=e[n+"AxisID"]||n;s[o]=s[o]||Object.create(null);Nn(s[o],[{axis:n},i[o],l[t]])}))}));Object.keys(s).forEach((t=>{const n=s[t];Nn(n,[ri.scales[n.type],ri.scale])}));return s}function Na(t){const n=t.options||(t.options={});n.plugins=Cn(n.plugins,{});n.scales=Ra(t,n)}function Ia(t){t=t||{};t.datasets=t.datasets||[];t.labels=t.labels||[];return t}function Ta(t){t=t||{};t.data=Ia(t.data);Na(t);return t}const Fa=new Map;const Wa=new Set;function Ba(t,n){let e=Fa.get(t);if(!e){e=n();Fa.set(t,e);Wa.add(e)}return e}const Ua=(t,n,e)=>{const i=Bn(n,e);if(i!==undefined){t.add(i)}};class Ha{constructor(t){this._config=Ta(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=Ia(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache();Na(t)}clearCache(){this._scopeCache.clear();this._resolverCache.clear()}datasetScopeKeys(t){return Ba(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,n){return Ba(`${t}.transition.${n}`,(()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,n){return Ba(`${t}-${n}`,(()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]]))}pluginScopeKeys(t){const n=t.id;const e=this.type;return Ba(`${e}-plugin-${n}`,(()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,n){const e=this._scopeCache;let i=e.get(t);if(!i||n){i=new Map;e.set(t,i)}return i}getOptionScopes(t,n,e){const{options:i,type:o}=this;const s=this._cachedScopes(t,e);const r=s.get(n);if(r){return r}const a=new Set;n.forEach((n=>{if(t){a.add(t);n.forEach((n=>Ua(a,t,n)))}n.forEach((t=>Ua(a,i,t)));n.forEach((t=>Ua(a,ni[o]||{},t)));n.forEach((t=>Ua(a,ri,t)));n.forEach((t=>Ua(a,ei,t)))}));const l=Array.from(a);if(l.length===0){l.push(Object.create(null))}if(Wa.has(n)){s.set(n,l)}return l}chartOptionScopes(){const{options:t,type:n}=this;return[t,ni[n]||{},ri.datasets[n]||{},{type:n},ri,ei]}resolveNamedOptions(t,n,e,i=[""]){const o={$shared:true};const{resolver:s,subPrefixes:r}=Va(this._resolverCache,t,i);let a=s;if(Ya(s,n)){o.$shared=false;e=Vn(e)?e():e;const n=this.createResolver(t,e,r);a=Ii(s,e,n)}for(const t of n){o[t]=a[t]}return o}createResolver(t,n,e=[""],i){const{resolver:o}=Va(this._resolverCache,t,e);return Mn(n)?Ii(o,n,undefined,i):o}}function Va(t,n,e){let i=t.get(n);if(!i){i=new Map;t.set(n,i)}const o=e.join();let s=i.get(o);if(!s){const t=Ni(n,e);s={resolver:t,subPrefixes:e.filter((t=>!t.toLowerCase().includes("hover")))};i.set(o,s)}return s}const $a=t=>Mn(t)&&Object.getOwnPropertyNames(t).some((n=>Vn(t[n])));function Ya(t,n){const{isScriptable:e,isIndexable:i}=Ti(t);for(const o of n){const n=e(o);const s=i(o);const r=(s||n)&&t[o];if(n&&(Vn(r)||$a(r))||s&&kn(r)){return true}}return false}var Xa="4.4.9";const Ka=["top","bottom","left","right","chartArea"];function qa(t,n){return t==="top"||t==="bottom"||Ka.indexOf(t)===-1&&n==="x"}function Za(t,n){return function(e,i){return e[t]===i[t]?e[n]-i[n]:e[t]-i[t]}}function Ja(t){const n=t.chart;const e=n.options.animation;n.notifyPlugins("afterRender");Pn(e&&e.onComplete,[t],n)}function Qa(t){const n=t.chart;const e=n.options.animation;Pn(e&&e.onProgress,[t],n)}function Ga(t){if(uo()&&typeof t==="string"){t=document.getElementById(t)}else if(t&&t.length){t=t[0]}if(t&&t.canvas){t=t.canvas}return t}const tl={};const nl=t=>{const n=Ga(t);return Object.values(tl).filter((t=>t.canvas===n)).pop()};function el(t,n,e){const i=Object.keys(t);for(const o of i){const i=+o;if(i>=n){const s=t[o];delete t[o];if(e>0||i>n){t[i+e]=s}}}}function il(t,n,e,i){if(!e||t.type==="mouseout"){return null}if(i){return n}return t}class ol{static defaults=ri;static instances=tl;static overrides=ni;static registry=va;static version=Xa;static getChart=nl;static register(...t){va.add(...t);sl()}static unregister(...t){va.remove(...t);sl()}constructor(t,n){const e=this.config=new Ha(n);const i=Ga(t);const o=nl(i);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.")}const s=e.createResolver(e.chartOptionScopes(),this.getContext());this.platform=new(e.platform||Kr(i));this.platform.updateConfig(e);const r=this.platform.acquireContext(i,s.aspectRatio);const a=r&&r.canvas;const l=a&&a.height;const c=a&&a.width;this.id=xn();this.ctx=r;this.canvas=a;this.width=c;this.height=l;this._options=s;this._aspectRatio=this.aspectRatio;this._layers=[];this._metasets=[];this._stacks=undefined;this.boxes=[];this.currentDevicePixelRatio=undefined;this.chartArea=undefined;this._active=[];this._lastEvent=undefined;this._listeners={};this._responsiveListeners=undefined;this._sortedMetasets=[];this.scales={};this._plugins=new ka;this.$proxies={};this._hiddenIndices={};this.attached=false;this._animationsDisabled=undefined;this.$context=undefined;this._doResize=Ee((t=>this.update(t)),s.resizeDelay||0);this._dataChanges=[];tl[this.id]=this;if(!r||!a){console.error("Failed to create chart: can't acquire context from the given item");return}Go.listen(this,"complete",Ja);Go.listen(this,"progress",Qa);this._initialize();if(this.attached){this.update()}}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:e,height:i,_aspectRatio:o}=this;if(!vn(t)){return t}if(n&&o){return o}return i?e/i:null}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 va}_initialize(){this.notifyPlugins("beforeInit");if(this.options.responsive){this.resize()}else{Co(this,this.options.devicePixelRatio)}this.bindEvents();this.notifyPlugins("afterInit");return this}clear(){fi(this.canvas,this.ctx);return this}stop(){Go.stop(this);return this}resize(t,n){if(!Go.running(this)){this._resize(t,n)}else{this._resizeBeforeDraw={width:t,height:n}}}_resize(t,n){const e=this.options;const i=this.canvas;const o=e.maintainAspectRatio&&this.aspectRatio;const s=this.platform.getMaximumSize(i,t,n,o);const r=e.devicePixelRatio||this.platform.getDevicePixelRatio();const a=this.width?"resize":"attach";this.width=s.width;this.height=s.height;this._aspectRatio=this.aspectRatio;if(!Co(this,r,true)){return}this.notifyPlugins("resize",{size:s});Pn(e.onResize,[this,s],this);if(this.attached){if(this._doResize(a)){this.render()}}}ensureScalesHaveIDs(){const t=this.options;const n=t.scales||{};On(n,((t,n)=>{t.id=n}))}buildOrUpdateScales(){const t=this.options;const n=t.scales;const e=this.scales;const i=Object.keys(e).reduce(((t,n)=>{t[n]=false;return t}),{});let o=[];if(n){o=o.concat(Object.keys(n).map((t=>{const e=n[t];const i=Aa(t,e);const o=i==="r";const s=i==="x";return{options:e,dposition:o?"chartArea":s?"bottom":"left",dtype:o?"radialLinear":s?"category":"linear"}})))}On(o,(n=>{const o=n.options;const s=o.id;const r=Aa(s,o);const a=Cn(o.type,n.dtype);if(o.position===undefined||qa(o.position,r)!==qa(n.dposition)){o.position=n.dposition}i[s]=true;let l=null;if(s in e&&e[s].type===a){l=e[s]}else{const t=va.getScale(a);l=new t({id:s,type:a,ctx:this.ctx,chart:this});e[l.id]=l}l.init(o,t)}));On(i,((t,n)=>{if(!t){delete e[n]}}));On(e,(t=>{Sr.configure(this,t,t.options);Sr.addBox(this,t)}))}_updateMetasets(){const t=this._metasets;const n=this.data.datasets.length;const e=t.length;t.sort(((t,n)=>t.index-n.index));if(e>n){for(let t=n;t<e;++t){this._destroyDatasetMeta(t)}t.splice(n,e-n)}this._sortedMetasets=t.slice(0).sort(Za("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;if(t.length>n.length){delete this._stacks}t.forEach(((t,e)=>{if(n.filter((n=>n===t._dataset)).length===0){this._destroyDatasetMeta(e)}}))}buildOrUpdateControllers(){const t=[];const n=this.data.datasets;let e,i;this._removeUnreferencedMetasets();for(e=0,i=n.length;e<i;e++){const i=n[e];let o=this.getDatasetMeta(e);const s=i.type||this.config.type;if(o.type&&o.type!==s){this._destroyDatasetMeta(e);o=this.getDatasetMeta(e)}o.type=s;o.indexAxis=i.indexAxis||_a(s,this.options);o.order=i.order||0;o.index=e;o.label=""+i.label;o.visible=this.isDatasetVisible(e);if(o.controller){o.controller.updateIndex(e);o.controller.linkScales()}else{const n=va.getController(s);const{datasetElementType:i,dataElementType:r}=ri.datasets[s];Object.assign(n,{dataElementType:va.getElement(r),datasetElementType:i&&va.getElement(i)});o.controller=new n(this,e);t.push(o.controller)}}this._updateMetasets();return t}_resetElements(){On(this.data.datasets,((t,n)=>{this.getDatasetMeta(n).controller.reset()}),this)}reset(){this._resetElements();this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const e=this._options=n.createResolver(n.chartOptionScopes(),this.getContext());const i=this._animationsDisabled=!e.animation;this._updateScales();this._checkEventBindings();this._updateHiddenIndices();this._plugins.invalidate();if(this.notifyPlugins("beforeUpdate",{mode:t,cancelable:true})===false){return}const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let t=0,n=this.data.datasets.length;t<n;t++){const{controller:n}=this.getDatasetMeta(t);const e=!i&&o.indexOf(n)===-1;n.buildOrUpdateElements(e);s=Math.max(+n.getMaxOverflow(),s)}s=this._minPadding=e.layout.autoPadding?s:0;this._updateLayout(s);if(!i){On(o,(t=>{t.reset()}))}this._updateDatasets(t);this.notifyPlugins("afterUpdate",{mode:t});this._layers.sort(Za("z","_idx"));const{_active:r,_lastEvent:a}=this;if(a){this._eventHandler(a,true)}else if(r.length){this._updateHoverStyles(r,r,true)}this.render()}_updateScales(){On(this.scales,(t=>{Sr.removeBox(this,t)}));this.ensureScalesHaveIDs();this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options;const n=new Set(Object.keys(this._listeners));const e=new Set(t.events);if(!$n(n,e)||!!this._responsiveListeners!==t.responsive){this.unbindEvents();this.bindEvents()}}_updateHiddenIndices(){const{_hiddenIndices:t}=this;const n=this._getUniformDataChanges()||[];for(const{method:e,start:i,count:o}of n){const n=e==="_removeElements"?-o:o;el(t,i,n)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length){return}this._dataChanges=[];const n=this.data.datasets.length;const e=n=>new Set(t.filter((t=>t[0]===n)).map(((t,n)=>n+","+t.splice(1).join(","))));const i=e(0);for(let t=1;t<n;t++){if(!$n(i,e(t))){return}}return Array.from(i).map((t=>t.split(","))).map((t=>({method:t[1],start:+t[2],count:+t[3]})))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:true})===false){return}Sr.update(this,this.width,this.height,t);const n=this.chartArea;const e=n.width<=0||n.height<=0;this._layers=[];On(this.boxes,(t=>{if(e&&t.position==="chartArea"){return}if(t.configure){t.configure()}this._layers.push(...t._layers())}),this);this._layers.forEach(((t,n)=>{t._idx=n}));this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:true})===false){return}for(let t=0,n=this.data.datasets.length;t<n;++t){this.getDatasetMeta(t).controller.configure()}for(let n=0,e=this.data.datasets.length;n<e;++n){this._updateDataset(n,Vn(t)?t({datasetIndex:n}):t)}this.notifyPlugins("afterDatasetsUpdate",{mode:t})}_updateDataset(t,n){const e=this.getDatasetMeta(t);const i={meta:e,index:t,mode:n,cancelable:true};if(this.notifyPlugins("beforeDatasetUpdate",i)===false){return}e.controller._update(n);i.cancelable=false;this.notifyPlugins("afterDatasetUpdate",i)}render(){if(this.notifyPlugins("beforeRender",{cancelable:true})===false){return}if(Go.has(this)){if(this.attached&&!Go.running(this)){Go.start(this)}}else{this.draw();Ja({chart:this})}}draw(){let t;if(this._resizeBeforeDraw){const{width:t,height:n}=this._resizeBeforeDraw;this._resizeBeforeDraw=null;this._resize(t,n)}this.clear();if(this.width<=0||this.height<=0){return}if(this.notifyPlugins("beforeDraw",{cancelable:true})===false){return}const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t){n[t].draw(this.chartArea)}this._drawDatasets();for(;t<n.length;++t){n[t].draw(this.chartArea)}this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets;const e=[];let i,o;for(i=0,o=n.length;i<o;++i){const o=n[i];if(!t||o.visible){e.push(o)}}return e}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(true)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:true})===false){return}const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n){this._drawDataset(t[n])}this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx;const e={meta:t,index:t.index,cancelable:true};const i=Jo(this,t);if(this.notifyPlugins("beforeDatasetDraw",e)===false){return}if(i){gi(n,i)}t.controller.draw();if(i){bi(n)}e.cancelable=false;this.notifyPlugins("afterDatasetDraw",e)}isPointInArea(t){return pi(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,e,i){const o=lr.modes[n];if(typeof o==="function"){return o(this,t,e,i)}return[]}getDatasetMeta(t){const n=this.data.datasets[t];const e=this._metasets;let i=e.filter((t=>t&&t._dataset===n)).pop();if(!i){i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:false};e.push(i)}return i}getContext(){return this.$context||(this.$context=Ri(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n){return false}const e=this.getDatasetMeta(t);return typeof e.hidden==="boolean"?!e.hidden:!n.hidden}setDatasetVisibility(t,n){const e=this.getDatasetMeta(t);e.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,e){const i=e?"show":"hide";const o=this.getDatasetMeta(t);const s=o.controller._resolveAnimations(undefined,i);if(Hn(n)){o.data[n].hidden=!e;this.update()}else{this.setDatasetVisibility(t,e);s.update(o,{visible:e});this.update((n=>n.datasetIndex===t?i:undefined))}}hide(t,n){this._updateVisibility(t,n,false)}show(t,n){this._updateVisibility(t,n,true)}_destroyDatasetMeta(t){const n=this._metasets[t];if(n&&n.controller){n.controller._destroy()}delete this._metasets[t]}_stop(){let t,n;this.stop();Go.remove(this);for(t=0,n=this.data.datasets.length;t<n;++t){this._destroyDatasetMeta(t)}}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop();this.config.clearCache();if(t){this.unbindEvents();fi(t,n);this.platform.releaseContext(n);this.canvas=null;this.ctx=null}delete tl[this.id];this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents();if(this.options.responsive){this.bindResponsiveEvents()}else{this.attached=true}}bindUserEvents(){const t=this._listeners;const n=this.platform;const e=(e,i)=>{n.addEventListener(this,e,i);t[e]=i};const i=(t,n,e)=>{t.offsetX=n;t.offsetY=e;this._eventHandler(t)};On(this.options.events,(t=>e(t,i)))}bindResponsiveEvents(){if(!this._responsiveListeners){this._responsiveListeners={}}const t=this._responsiveListeners;const n=this.platform;const e=(e,i)=>{n.addEventListener(this,e,i);t[e]=i};const i=(e,i)=>{if(t[e]){n.removeEventListener(this,e,i);delete t[e]}};const o=(t,n)=>{if(this.canvas){this.resize(t,n)}};let s;const r=()=>{i("attach",r);this.attached=true;this.resize();e("resize",o);e("detach",s)};s=()=>{this.attached=false;i("resize",o);this._stop();this._resize(0,0);e("attach",r)};if(n.isAttached(this.canvas)){r()}else{s()}}unbindEvents(){On(this._listeners,((t,n)=>{this.platform.removeEventListener(this,n,t)}));this._listeners={};On(this._responsiveListeners,((t,n)=>{this.platform.removeEventListener(this,n,t)}));this._responsiveListeners=undefined}updateHoverStyle(t,n,e){const i=e?"set":"remove";let o,s,r,a;if(n==="dataset"){o=this.getDatasetMeta(t[0].datasetIndex);o.controller["_"+i+"DatasetHoverStyle"]()}for(r=0,a=t.length;r<a;++r){s=t[r];const n=s&&this.getDatasetMeta(s.datasetIndex).controller;if(n){n[i+"HoverStyle"](s.element,s.datasetIndex,s.index)}}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[];const e=t.map((({datasetIndex:t,index:n})=>{const e=this.getDatasetMeta(t);if(!e){throw new Error("No dataset found at index "+t)}return{datasetIndex:t,element:e.data[n],index:n}}));const i=!En(e,n);if(i){this._active=e;this._lastEvent=null;this._updateHoverStyles(e,n)}}notifyPlugins(t,n,e){return this._plugins.notify(this,t,n,e)}isPluginEnabled(t){return this._plugins._cache.filter((n=>n.plugin.id===t)).length===1}_updateHoverStyles(t,n,e){const i=this.options.hover;const o=(t,n)=>t.filter((t=>!n.some((n=>t.datasetIndex===n.datasetIndex&&t.index===n.index))));const s=o(n,t);const r=e?t:o(t,n);if(s.length){this.updateHoverStyle(s,i.mode,false)}if(r.length&&i.mode){this.updateHoverStyle(r,i.mode,true)}}_eventHandler(t,n){const e={event:t,replay:n,cancelable:true,inChartArea:this.isPointInArea(t)};const i=n=>(n.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",e,i)===false){return}const o=this._handleEvent(t,n,e.inChartArea);e.cancelable=false;this.notifyPlugins("afterEvent",e,i);if(o||e.changed){this.render()}return this}_handleEvent(t,n,e){const{_active:i=[],options:o}=this;const s=n;const r=this._getActiveElements(t,i,e,s);const a=Yn(t);const l=il(t,this._lastEvent,e,a);if(e){this._lastEvent=null;Pn(o.onHover,[t,r,this],this);if(a){Pn(o.onClick,[t,r,this],this)}}const c=!En(r,i);if(c||n){this._active=r;this._updateHoverStyles(r,i,n)}this._lastEvent=l;return c}_getActiveElements(t,n,e,i){if(t.type==="mouseout"){return[]}if(!e){return n}const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,i)}}function sl(){return On(ol.instances,(t=>t._plugins.invalidate()))}function rl(t,n,e){const{startAngle:i,pixelMargin:o,x:s,y:r,outerRadius:a,innerRadius:l}=n;let c=o/a;t.beginPath();t.arc(s,r,a,i-c,e+c);if(l>o){c=o/l;t.arc(s,r,l,e+c,i-c,true)}else{t.arc(s,r,o,e+Qn,i-Qn)}t.closePath();t.clip()}function al(t){return ji(t,["outerStart","outerEnd","innerStart","innerEnd"])}function ll(t,n,e,i){const o=al(t.options.borderRadius);const s=(e-n)/2;const r=Math.min(s,i*n/2);const a=t=>{const n=(e-Math.min(s,t))*i/2;return me(t,0,Math.min(s,n))};return{outerStart:a(o.outerStart),outerEnd:a(o.outerEnd),innerStart:me(o.innerStart,0,r),innerEnd:me(o.innerEnd,0,r)}}function cl(t,n,e,i){return{x:e+t*Math.cos(n),y:i+t*Math.sin(n)}}function hl(t,n,e,i,o,s){const{x:r,y:a,startAngle:l,pixelMargin:c,innerRadius:h}=n;const f=Math.max(n.outerRadius+i+e-c,0);const d=h>0?h+i+e+c:0;let u=0;const p=o-l;if(i){const t=h>0?h-i:0;const n=f>0?f-i:0;const e=(t+n)/2;const o=e!==0?p*e/(e+i):p;u=(p-o)/2}const g=Math.max(.001,p*f-e/Xn)/f;const b=(p-g)/2;const w=l+b+u;const m=o-b-u;const{outerStart:y,outerEnd:x,innerStart:v,innerEnd:k}=ll(n,d,f,m-w);const M=f-y;const z=f-x;const S=w+y/M;const C=m-x/z;const _=d+v;const j=d+k;const P=w+v/_;const O=m-k/j;t.beginPath();if(s){const n=(S+C)/2;t.arc(r,a,f,S,n);t.arc(r,a,f,n,C);if(x>0){const n=cl(z,C,r,a);t.arc(n.x,n.y,x,C,m+Qn)}const e=cl(j,m,r,a);t.lineTo(e.x,e.y);if(k>0){const n=cl(j,O,r,a);t.arc(n.x,n.y,k,m+Qn,O+Math.PI)}const i=(m-k/d+(w+v/d))/2;t.arc(r,a,d,m-k/d,i,true);t.arc(r,a,d,i,w+v/d,true);if(v>0){const n=cl(_,P,r,a);t.arc(n.x,n.y,v,P+Math.PI,w-Qn)}const o=cl(M,w,r,a);t.lineTo(o.x,o.y);if(y>0){const n=cl(M,S,r,a);t.arc(n.x,n.y,y,w-Qn,S)}}else{t.moveTo(r,a);const n=Math.cos(S)*f+r;const e=Math.sin(S)*f+a;t.lineTo(n,e);const i=Math.cos(C)*f+r;const o=Math.sin(C)*f+a;t.lineTo(i,o)}t.closePath()}function fl(t,n,e,i,o){const{fullCircles:s,startAngle:r,circumference:a}=n;let l=n.endAngle;if(s){hl(t,n,e,i,l,o);for(let n=0;n<s;++n){t.fill()}if(!isNaN(a)){l=r+(a%Kn||Kn)}}hl(t,n,e,i,l,o);t.fill();return l}function dl(t,n,e,i,o){const{fullCircles:s,startAngle:r,circumference:a,options:l}=n;const{borderWidth:c,borderJoinStyle:h,borderDash:f,borderDashOffset:d}=l;const u=l.borderAlign==="inner";if(!c){return}t.setLineDash(f||[]);t.lineDashOffset=d;if(u){t.lineWidth=c*2;t.lineJoin=h||"round"}else{t.lineWidth=c;t.lineJoin=h||"bevel"}let p=n.endAngle;if(s){hl(t,n,e,i,p,o);for(let n=0;n<s;++n){t.stroke()}if(!isNaN(a)){p=r+(a%Kn||Kn)}}if(u){rl(t,n,p)}if(!s){hl(t,n,e,i,p,o);t.stroke()}}class ul extends qr{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:undefined,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:undefined,circular:true};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:true,_indexable:t=>t!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){super();this.options=undefined;this.circumference=undefined;this.startAngle=undefined;this.endAngle=undefined;this.innerRadius=undefined;this.outerRadius=undefined;this.pixelMargin=0;this.fullCircles=0;if(t){Object.assign(this,t)}}inRange(t,n,e){const i=this.getProps(["x","y"],e);const{angle:o,distance:s}=ue(i,{x:t,y:n});const{startAngle:r,endAngle:a,innerRadius:l,outerRadius:c,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],e);const f=(this.options.spacing+this.options.borderWidth)/2;const d=Cn(h,a-r);const u=we(o,r,a)&&r!==a;const p=d>=Kn||u;const g=xe(s,l+f,c+f);return p&&g}getCenterPoint(t){const{x:n,y:e,startAngle:i,endAngle:o,innerRadius:s,outerRadius:r}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t);const{offset:a,spacing:l}=this.options;const c=(i+o)/2;const h=(s+r+l+a)/2;return{x:n+Math.cos(c)*h,y:e+Math.sin(c)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:n,circumference:e}=this;const i=(n.offset||0)/4;const o=(n.spacing||0)/2;const s=n.circular;this.pixelMargin=n.borderAlign==="inner"?.33:0;this.fullCircles=e>Kn?Math.floor(e/Kn):0;if(e===0||this.innerRadius<0||this.outerRadius<0){return}t.save();const r=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(r)*i,Math.sin(r)*i);const a=1-Math.sin(Math.min(Xn,e||0));const l=i*a;t.fillStyle=n.backgroundColor;t.strokeStyle=n.borderColor;fl(t,this,l,o,s);dl(t,this,l,o,s);t.restore()}}function pl(t,n,e=n){t.lineCap=Cn(e.borderCapStyle,n.borderCapStyle);t.setLineDash(Cn(e.borderDash,n.borderDash));t.lineDashOffset=Cn(e.borderDashOffset,n.borderDashOffset);t.lineJoin=Cn(e.borderJoinStyle,n.borderJoinStyle);t.lineWidth=Cn(e.borderWidth,n.borderWidth);t.strokeStyle=Cn(e.borderColor,n.borderColor)}function gl(t,n,e){t.lineTo(e.x,e.y)}function bl(t){if(t.stepped){return wi}if(t.tension||t.cubicInterpolationMode==="monotone"){return mi}return gl}function wl(t,n,e={}){const i=t.length;const{start:o=0,end:s=i-1}=e;const{start:r,end:a}=n;const l=Math.max(o,r);const c=Math.min(s,a);const h=o<r&&s<r||o>a&&s>a;return{count:i,start:l,loop:n.loop,ilen:c<l&&!h?i+c-l:c-l}}function ml(t,n,e,i){const{points:o,options:s}=n;const{count:r,start:a,loop:l,ilen:c}=wl(o,e,i);const h=bl(s);let{move:f=true,reverse:d}=i||{};let u,p,g;for(u=0;u<=c;++u){p=o[(a+(d?c-u:u))%r];if(p.skip){continue}else if(f){t.moveTo(p.x,p.y);f=false}else{h(t,g,p,d,s.stepped)}g=p}if(l){p=o[(a+(d?c:0))%r];h(t,g,p,d,s.stepped)}return!!l}function yl(t,n,e,i){const o=n.points;const{count:s,start:r,ilen:a}=wl(o,e,i);const{move:l=true,reverse:c}=i||{};let h=0;let f=0;let d,u,p,g,b,w;const m=t=>(r+(c?a-t:t))%s;const y=()=>{if(g!==b){t.lineTo(h,b);t.lineTo(h,g);t.lineTo(h,w)}};if(l){u=o[m(0)];t.moveTo(u.x,u.y)}for(d=0;d<=a;++d){u=o[m(d)];if(u.skip){continue}const n=u.x;const e=u.y;const i=n|0;if(i===p){if(e<g){g=e}else if(e>b){b=e}h=(f*h+n)/++f}else{y();t.lineTo(n,e);p=i;f=0;g=b=e}w=e}y()}function xl(t){const n=t.options;const e=n.borderDash&&n.borderDash.length;const i=!t._decimated&&!t._loop&&!n.tension&&n.cubicInterpolationMode!=="monotone"&&!n.stepped&&!e;return i?yl:ml}function vl(t){if(t.stepped){return Oo}if(t.tension||t.cubicInterpolationMode==="monotone"){return Eo}return Po}function kl(t,n,e,i){let o=n._path;if(!o){o=n._path=new Path2D;if(n.path(o,e,i)){o.closePath()}}pl(t,n.options);t.stroke(o)}function Ml(t,n,e,i){const{segments:o,options:s}=n;const r=xl(n);for(const a of o){pl(t,s,a.style);t.beginPath();if(r(t,n,a,{start:e,end:e+i-1})){t.closePath()}t.stroke()}}const zl=typeof Path2D==="function";function Sl(t,n,e,i){if(zl&&!n.options.segment){kl(t,n,e,i)}else{Ml(t,n,e,i)}}class Cl extends qr{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:true,cubicInterpolationMode:"default",fill:false,spanGaps:false,stepped:false,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:true,_indexable:t=>t!=="borderDash"&&t!=="fill"};constructor(t){super();this.animated=true;this.options=undefined;this._chart=undefined;this._loop=undefined;this._fullLoop=undefined;this._path=undefined;this._points=undefined;this._segments=undefined;this._decimated=false;this._pointsUpdated=false;this._datasetIndex=undefined;if(t){Object.assign(this,t)}}updateControlPoints(t,n){const e=this.options;if((e.tension||e.cubicInterpolationMode==="monotone")&&!e.stepped&&!this._pointsUpdated){const i=e.spanGaps?this._loop:this._fullLoop;fo(this._points,e,t,i,n);this._pointsUpdated=true}}set points(t){this._points=t;delete this._segments;delete this._path;this._pointsUpdated=false}get points(){return this._points}get segments(){return this._segments||(this._segments=Vo(this,this.options.segment))}first(){const t=this.segments;const n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments;const n=this.points;const e=t.length;return e&&n[t[e-1].end]}interpolate(t,n){const e=this.options;const i=t[n];const o=this.points;const s=Bo(this,{property:n,start:i,end:i});if(!s.length){return}const r=[];const a=vl(e);let l,c;for(l=0,c=s.length;l<c;++l){const{start:c,end:h}=s[l];const f=o[c];const d=o[h];if(f===d){r.push(f);continue}const u=Math.abs((i-f[n])/(d[n]-f[n]));const p=a(f,d,u,e.stepped);p[n]=t[n];r.push(p)}return r.length===1?r[0]:r}pathSegment(t,n,e){const i=xl(this);return i(t,this,n,e)}path(t,n,e){const i=this.segments;const o=xl(this);let s=this._loop;n=n||0;e=e||this.points.length-n;for(const r of i){s&=o(t,this,r,{start:n,end:n+e-1})}return!!s}draw(t,n,e,i){const o=this.options||{};const s=this.points||[];if(s.length&&o.borderWidth){t.save();Sl(t,this,e,i);t.restore()}if(this.animated){this._pointsUpdated=false;this._path=undefined}}}function _l(t,n,e,i){const o=t.options;const{[e]:s}=t.getProps([e],i);return Math.abs(n-s)<o.radius+o.hitRadius}class jl extends qr{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super();this.options=undefined;this.parsed=undefined;this.skip=undefined;this.stop=undefined;if(t){Object.assign(this,t)}}inRange(t,n,e){const i=this.options;const{x:o,y:s}=this.getProps(["x","y"],e);return Math.pow(t-o,2)+Math.pow(n-s,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(t,n){return _l(this,t,"x",n)}inYRange(t,n){return _l(this,t,"y",n)}getCenterPoint(t){const{x:n,y:e}=this.getProps(["x","y"],t);return{x:n,y:e}}size(t){t=t||this.options||{};let n=t.radius||0;n=Math.max(n,n&&t.hoverRadius||0);const e=n&&t.borderWidth||0;return(n+e)*2}draw(t,n){const e=this.options;if(this.skip||e.radius<.1||!pi(this,n,this.size(e)/2)){return}t.strokeStyle=e.borderColor;t.lineWidth=e.borderWidth;t.fillStyle=e.backgroundColor;di(t,e,this.x,this.y)}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function Pl(t,n){const{x:e,y:i,base:o,width:s,height:r}=t.getProps(["x","y","base","width","height"],n);let a,l,c,h,f;if(t.horizontal){f=r/2;a=Math.min(e,o);l=Math.max(e,o);c=i-f;h=i+f}else{f=s/2;a=e-f;l=e+f;c=Math.min(i,o);h=Math.max(i,o)}return{left:a,top:c,right:l,bottom:h}}function Ol(t,n,e,i){return t?0:me(n,e,i)}function El(t,n,e){const i=t.options.borderWidth;const o=t.borderSkipped;const s=Pi(i);return{t:Ol(o.top,s.top,0,e),r:Ol(o.right,s.right,0,n),b:Ol(o.bottom,s.bottom,0,e),l:Ol(o.left,s.left,0,n)}}function Al(t,n,e){const{enableBorderRadius:i}=t.getProps(["enableBorderRadius"]);const o=t.options.borderRadius;const s=Oi(o);const r=Math.min(n,e);const a=t.borderSkipped;const l=i||Mn(o);return{topLeft:Ol(!l||a.top||a.left,s.topLeft,0,r),topRight:Ol(!l||a.top||a.right,s.topRight,0,r),bottomLeft:Ol(!l||a.bottom||a.left,s.bottomLeft,0,r),bottomRight:Ol(!l||a.bottom||a.right,s.bottomRight,0,r)}}function Dl(t){const n=Pl(t);const e=n.right-n.left;const i=n.bottom-n.top;const o=El(t,e/2,i/2);const s=Al(t,e/2,i/2);return{outer:{x:n.left,y:n.top,w:e,h:i,radius:s},inner:{x:n.left+o.l,y:n.top+o.t,w:e-o.l-o.r,h:i-o.t-o.b,radius:{topLeft:Math.max(0,s.topLeft-Math.max(o.t,o.l)),topRight:Math.max(0,s.topRight-Math.max(o.t,o.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(o.b,o.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(o.b,o.r))}}}}function Ll(t,n,e,i){const o=n===null;const s=e===null;const r=o&&s;const a=t&&!r&&Pl(t,i);return a&&(o||xe(n,a.left,a.right))&&(s||xe(e,a.top,a.bottom))}function Rl(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function Nl(t,n){t.rect(n.x,n.y,n.w,n.h)}function Il(t,n,e={}){const i=t.x!==e.x?-n:0;const o=t.y!==e.y?-n:0;const s=(t.x+t.w!==e.x+e.w?n:0)-i;const r=(t.y+t.h!==e.y+e.h?n:0)-o;return{x:t.x+i,y:t.y+o,w:t.w+s,h:t.h+r,radius:t.radius}}class Tl extends qr{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:undefined};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super();this.options=undefined;this.horizontal=undefined;this.base=undefined;this.width=undefined;this.height=undefined;this.inflateAmount=undefined;if(t){Object.assign(this,t)}}draw(t){const{inflateAmount:n,options:{borderColor:e,backgroundColor:i}}=this;const{inner:o,outer:s}=Dl(this);const r=Rl(s.radius)?Mi:Nl;t.save();if(s.w!==o.w||s.h!==o.h){t.beginPath();r(t,Il(s,n,o));t.clip();r(t,Il(o,-n,s));t.fillStyle=e;t.fill("evenodd")}t.beginPath();r(t,Il(o,n));t.fillStyle=i;t.fill();t.restore()}inRange(t,n,e){return Ll(this,t,n,e)}inXRange(t,n){return Ll(this,t,null,n)}inYRange(t,n){return Ll(this,null,t,n)}getCenterPoint(t){const{x:n,y:e,base:i,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(n+i)/2:n,y:o?e:(e+i)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}var Fl=Object.freeze({__proto__:null,ArcElement:ul,BarElement:Tl,LineElement:Cl,PointElement:jl});const Wl=["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)"];const Bl=Wl.map((t=>t.replace("rgb(","rgba(").replace(")",", 0.5)")));function Ul(t){return Wl[t%Wl.length]}function Hl(t){return Bl[t%Bl.length]}function Vl(t,n){t.borderColor=Ul(n);t.backgroundColor=Hl(n);return++n}function $l(t,n){t.backgroundColor=t.data.map((()=>Ul(n++)));return n}function Yl(t,n){t.backgroundColor=t.data.map((()=>Hl(n++)));return n}function Xl(t){let n=0;return(e,i)=>{const o=t.getDatasetMeta(i).controller;if(o instanceof Vs){n=$l(e,n)}else if(o instanceof Ys){n=Yl(e,n)}else if(o){n=Vl(e,n)}}}function Kl(t){let n;for(n in t){if(t[n].borderColor||t[n].backgroundColor){return true}}return false}function ql(t){return t&&(t.borderColor||t.backgroundColor)}function Zl(){return ri.borderColor!=="rgba(0,0,0,0.1)"||ri.backgroundColor!=="rgba(0,0,0,0.1)"}var Jl={id:"colors",defaults:{enabled:true,forceOverride:false},beforeLayout(t,n,e){if(!e.enabled){return}const{data:{datasets:i},options:o}=t.config;const{elements:s}=o;const r=Kl(i)||ql(o)||s&&Kl(s)||Zl();if(!e.forceOverride&&r){return}const a=Xl(t);i.forEach(a)}};function Ql(t,n,e,i,o){const s=o.samples||i;if(s>=e){return t.slice(n,n+e)}const r=[];const a=(e-2)/(s-2);let l=0;const c=n+e-1;let h=n;let f,d,u,p,g;r[l++]=t[h];for(f=0;f<s-2;f++){let i=0;let o=0;let s;const c=Math.floor((f+1)*a)+1+n;const b=Math.min(Math.floor((f+2)*a)+1,e)+n;const w=b-c;for(s=c;s<b;s++){i+=t[s].x;o+=t[s].y}i/=w;o/=w;const m=Math.floor(f*a)+1+n;const y=Math.min(Math.floor((f+1)*a)+1,e)+n;const{x,y:v}=t[h];u=p=-1;for(s=m;s<y;s++){p=.5*Math.abs((x-i)*(t[s].y-v)-(x-t[s].x)*(o-v));if(p>u){u=p;d=t[s];g=s}}r[l++]=d;h=g}r[l++]=t[c];return r}function Gl(t,n,e,i){let o=0;let s=0;let r,a,l,c,h,f,d,u,p,g;const b=[];const w=n+e-1;const m=t[n].x;const y=t[w].x;const x=y-m;for(r=n;r<n+e;++r){a=t[r];l=(a.x-m)/x*i;c=a.y;const n=l|0;if(n===h){if(c<p){p=c;f=r}else if(c>g){g=c;d=r}o=(s*o+a.x)/++s}else{const e=r-1;if(!vn(f)&&!vn(d)){const n=Math.min(f,d);const i=Math.max(f,d);if(n!==u&&n!==e){b.push({...t[n],x:o})}if(i!==u&&i!==e){b.push({...t[i],x:o})}}if(r>0&&e!==u){b.push(t[e])}b.push(a);h=n;s=0;p=g=c;f=d=u=r}}return b}function tc(t){if(t._decimated){const n=t._data;delete t._decimated;delete t._data;Object.defineProperty(t,"data",{configurable:true,enumerable:true,writable:true,value:n})}}function nc(t){t.data.datasets.forEach((t=>{tc(t)}))}function ec(t,n){const e=n.length;let i=0;let o;const{iScale:s}=t;const{min:r,max:a,minDefined:l,maxDefined:c}=s.getUserBounds();if(l){i=me(ke(n,s.axis,r).lo,0,e-1)}if(c){o=me(ke(n,s.axis,a).hi+1,i,e)-i}else{o=e-i}return{start:i,count:o}}var ic={id:"decimation",defaults:{algorithm:"min-max",enabled:false},beforeElementsUpdate:(t,n,e)=>{if(!e.enabled){nc(t);return}const i=t.width;t.data.datasets.forEach(((n,o)=>{const{_data:s,indexAxis:r}=n;const a=t.getDatasetMeta(o);const l=s||n.data;if(Di([r,t.options.indexAxis])==="y"){return}if(!a.controller.supportsDecimation){return}const c=t.scales[a.xAxisID];if(c.type!=="linear"&&c.type!=="time"){return}if(t.options.parsing){return}let{start:h,count:f}=ec(a,l);const d=e.threshold||4*i;if(f<=d){tc(n);return}if(vn(s)){n._data=l;delete n.data;Object.defineProperty(n,"data",{configurable:true,enumerable:true,get:function(){return this._decimated},set:function(t){this._data=t}})}let u;switch(e.algorithm){case"lttb":u=Ql(l,h,f,i,e);break;case"min-max":u=Gl(l,h,f,i);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}n._decimated=u}))},destroy(t){nc(t)}};function oc(t,n,e){const i=t.segments;const o=t.points;const s=n.points;const r=[];for(const t of i){let{start:i,end:a}=t;a=ac(i,a,o);const l=sc(e,o[i],o[a],t.loop);if(!n.segments){r.push({source:t,target:l,start:o[i],end:o[a]});continue}const c=Bo(n,l);for(const n of c){const i=sc(e,s[n.start],s[n.end],n.loop);const a=Wo(t,o,i);for(const t of a){r.push({source:t,target:n,start:{[e]:lc(l,i,"start",Math.max)},end:{[e]:lc(l,i,"end",Math.min)}})}}}return r}function sc(t,n,e,i){if(i){return}let o=n[t];let s=e[t];if(t==="angle"){o=be(o);s=be(s)}return{property:t,start:o,end:s}}function rc(t,n){const{x:e=null,y:i=null}=t||{};const o=n.points;const s=[];n.segments.forEach((({start:t,end:n})=>{n=ac(t,n,o);const r=o[t];const a=o[n];if(i!==null){s.push({x:r.x,y:i});s.push({x:a.x,y:i})}else if(e!==null){s.push({x:e,y:r.y});s.push({x:e,y:a.y})}}));return s}function ac(t,n,e){for(;n>t;n--){const t=e[n];if(!isNaN(t.x)&&!isNaN(t.y)){break}}return n}function lc(t,n,e,i){if(t&&n){return i(t[e],n[e])}return t?t[e]:n?n[e]:0}function cc(t,n){let e=[];let i=false;if(kn(t)){i=true;e=t}else{e=rc(t,n)}return e.length?new Cl({points:e,options:{tension:0},_loop:i,_fullLoop:i}):null}function hc(t){return t&&t.fill!==false}function fc(t,n,e){const i=t[n];let o=i.fill;const s=[n];let r;if(!e){return o}while(o!==false&&s.indexOf(o)===-1){if(!zn(o)){return o}r=t[o];if(!r){return false}if(r.visible){return o}s.push(o);o=r.fill}return false}function dc(t,n,e){const i=bc(t);if(Mn(i)){return isNaN(i.value)?false:i}let o=parseFloat(i);if(zn(o)&&Math.floor(o)===o){return uc(i[0],n,o,e)}return["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function uc(t,n,e,i){if(t==="-"||t==="+"){e=n+e}if(e===n||e<0||e>=i){return false}return e}function pc(t,n){let e=null;if(t==="start"){e=n.bottom}else if(t==="end"){e=n.top}else if(Mn(t)){e=n.getPixelForValue(t.value)}else if(n.getBasePixel){e=n.getBasePixel()}return e}function gc(t,n,e){let i;if(t==="start"){i=e}else if(t==="end"){i=n.options.reverse?n.min:n.max}else if(Mn(t)){i=t.value}else{i=n.getBaseValue()}return i}function bc(t){const n=t.options;const e=n.fill;let i=Cn(e&&e.target,e);if(i===undefined){i=!!n.backgroundColor}if(i===false||i===null){return false}if(i===true){return"origin"}return i}function wc(t){const{scale:n,index:e,line:i}=t;const o=[];const s=i.segments;const r=i.points;const a=mc(n,e);a.push(cc({x:null,y:n.bottom},i));for(let t=0;t<s.length;t++){const n=s[t];for(let t=n.start;t<=n.end;t++){yc(o,r[t],a)}}return new Cl({points:o,options:{}})}function mc(t,n){const e=[];const i=t.getMatchingVisibleMetas("line");for(let t=0;t<i.length;t++){const o=i[t];if(o.index===n){break}if(!o.hidden){e.unshift(o.dataset)}}return e}function yc(t,n,e){const i=[];for(let o=0;o<e.length;o++){const s=e[o];const{first:r,last:a,point:l}=xc(s,n,"x");if(!l||r&&a){continue}if(r){i.unshift(l)}else{t.push(l);if(!a){break}}}t.push(...i)}function xc(t,n,e){const i=t.interpolate(n,e);if(!i){return{}}const o=i[e];const s=t.segments;const r=t.points;let a=false;let l=false;for(let t=0;t<s.length;t++){const n=s[t];const i=r[n.start][e];const c=r[n.end][e];if(xe(o,i,c)){a=o===i;l=o===c;break}}return{first:a,last:l,point:i}}class vc{constructor(t){this.x=t.x;this.y=t.y;this.radius=t.radius}pathSegment(t,n,e){const{x:i,y:o,radius:s}=this;n=n||{start:0,end:Kn};t.arc(i,o,s,n.end,n.start,true);return!e.bounds}interpolate(t){const{x:n,y:e,radius:i}=this;const o=t.angle;return{x:n+Math.cos(o)*i,y:e+Math.sin(o)*i,angle:o}}}function kc(t){const{chart:n,fill:e,line:i}=t;if(zn(e)){return Mc(n,e)}if(e==="stack"){return wc(t)}if(e==="shape"){return true}const o=zc(t);if(o instanceof vc){return o}return cc(o,i)}function Mc(t,n){const e=t.getDatasetMeta(n);const i=e&&t.isDatasetVisible(n);return i?e.dataset:null}function zc(t){const n=t.scale||{};if(n.getPointPositionForValue){return Cc(t)}return Sc(t)}function Sc(t){const{scale:n={},fill:e}=t;const i=pc(e,n);if(zn(i)){const t=n.isHorizontal();return{x:t?i:null,y:t?null:i}}return null}function Cc(t){const{scale:n,fill:e}=t;const i=n.options;const o=n.getLabels().length;const s=i.reverse?n.max:n.min;const r=gc(e,n,s);const a=[];if(i.grid.circular){const t=n.getPointPositionForValue(0,s);return new vc({x:t.x,y:t.y,radius:n.getDistanceFromCenterForValue(r)})}for(let t=0;t<o;++t){a.push(n.getPointPositionForValue(t,r))}return a}function _c(t,n,e){const i=kc(n);const{chart:o,index:s,line:r,scale:a,axis:l}=n;const c=r.options;const h=c.fill;const f=c.backgroundColor;const{above:d=f,below:u=f}=h||{};const p=o.getDatasetMeta(s);const g=Jo(o,p);if(i&&r.points.length){gi(t,e);jc(t,{line:r,target:i,above:d,below:u,area:e,scale:a,axis:l,clip:g});bi(t)}}function jc(t,n){const{line:e,target:i,above:o,below:s,area:r,scale:a,clip:l}=n;const c=e._loop?"angle":n.axis;t.save();if(c==="x"&&s!==o){Pc(t,i,r.top);Oc(t,{line:e,target:i,color:o,scale:a,property:c,clip:l});t.restore();t.save();Pc(t,i,r.bottom)}Oc(t,{line:e,target:i,color:s,scale:a,property:c,clip:l});t.restore()}function Pc(t,n,e){const{segments:i,points:o}=n;let s=true;let r=false;t.beginPath();for(const a of i){const{start:i,end:l}=a;const c=o[i];const h=o[ac(i,l,o)];if(s){t.moveTo(c.x,c.y);s=false}else{t.lineTo(c.x,e);t.lineTo(c.x,c.y)}r=!!n.pathSegment(t,a,{move:r});if(r){t.closePath()}else{t.lineTo(h.x,e)}}t.lineTo(n.first().x,e);t.closePath();t.clip()}function Oc(t,n){const{line:e,target:i,property:o,color:s,scale:r,clip:a}=n;const l=oc(e,i,o);for(const{source:n,target:c,start:h,end:f}of l){const{style:{backgroundColor:l=s}={}}=n;const d=i!==true;t.save();t.fillStyle=l;Ec(t,r,a,d&&sc(o,h,f));t.beginPath();const u=!!e.pathSegment(t,n);let p;if(d){if(u){t.closePath()}else{Ac(t,i,f,o)}const n=!!i.pathSegment(t,c,{move:u,reverse:true});p=u&&n;if(!p){Ac(t,i,h,o)}}t.closePath();t.fill(p?"evenodd":"nonzero");t.restore()}}function Ec(t,n,e,i){const o=n.chart.chartArea;const{property:s,start:r,end:a}=i||{};if(s==="x"||s==="y"){let n,i,l,c;if(s==="x"){n=r;i=o.top;l=a;c=o.bottom}else{n=o.left;i=r;l=o.right;c=a}t.beginPath();if(e){n=Math.max(n,e.left);l=Math.min(l,e.right);i=Math.max(i,e.top);c=Math.min(c,e.bottom)}t.rect(n,i,l-n,c-i);t.clip()}}function Ac(t,n,e,i){const o=n.interpolate(e,i);if(o){t.lineTo(o.x,o.y)}}var Dc={id:"filler",afterDatasetsUpdate(t,n,e){const i=(t.data.datasets||[]).length;const o=[];let s,r,a,l;for(r=0;r<i;++r){s=t.getDatasetMeta(r);a=s.dataset;l=null;if(a&&a.options&&a instanceof Cl){l={visible:t.isDatasetVisible(r),index:r,fill:dc(a,r,i),chart:t,axis:s.controller.options.indexAxis,scale:s.vScale,line:a}}s.$filler=l;o.push(l)}for(r=0;r<i;++r){l=o[r];if(!l||l.fill===false){continue}l.fill=fc(o,r,e.propagate)}},beforeDraw(t,n,e){const i=e.drawTime==="beforeDraw";const o=t.getSortedVisibleDatasetMetas();const s=t.chartArea;for(let n=o.length-1;n>=0;--n){const e=o[n].$filler;if(!e){continue}e.line.updateControlPoints(s,e.axis);if(i&&e.fill){_c(t.ctx,e,s)}}},beforeDatasetsDraw(t,n,e){if(e.drawTime!=="beforeDatasetsDraw"){return}const i=t.getSortedVisibleDatasetMetas();for(let n=i.length-1;n>=0;--n){const e=i[n].$filler;if(hc(e)){_c(t.ctx,e,t.chartArea)}}},beforeDatasetDraw(t,n,e){const i=n.meta.$filler;if(!hc(i)||e.drawTime!=="beforeDatasetDraw"){return}_c(t.ctx,i,t.chartArea)},defaults:{propagate:true,drawTime:"beforeDatasetDraw"}};const Lc=(t,n)=>{let{boxHeight:e=n,boxWidth:i=n}=t;if(t.usePointStyle){e=Math.min(e,n);i=t.pointStyleWidth||Math.min(i,n)}return{boxWidth:i,boxHeight:e,itemHeight:Math.max(n,e)}};const Rc=(t,n)=>t!==null&&n!==null&&t.datasetIndex===n.datasetIndex&&t.index===n.index;class Nc extends qr{constructor(t){super();this._added=false;this.legendHitBoxes=[];this._hoveredItem=null;this.doughnutMode=false;this.chart=t.chart;this.options=t.options;this.ctx=t.ctx;this.legendItems=undefined;this.columnSizes=undefined;this.lineWidths=undefined;this.maxHeight=undefined;this.maxWidth=undefined;this.top=undefined;this.bottom=undefined;this.left=undefined;this.right=undefined;this.height=undefined;this.width=undefined;this._margins=undefined;this.position=undefined;this.weight=undefined;this.fullSize=undefined}update(t,n,e){this.maxWidth=t;this.maxHeight=n;this._margins=e;this.setDimensions();this.buildLabels();this.fit()}setDimensions(){if(this.isHorizontal()){this.width=this.maxWidth;this.left=this._margins.left;this.right=this.width}else{this.height=this.maxHeight;this.top=this._margins.top;this.bottom=this.height}}buildLabels(){const t=this.options.labels||{};let n=Pn(t.generateLabels,[this.chart],this)||[];if(t.filter){n=n.filter((n=>t.filter(n,this.chart.data)))}if(t.sort){n=n.sort(((n,e)=>t.sort(n,e,this.chart.data)))}if(this.options.reverse){n.reverse()}this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const e=t.labels;const i=Ai(e.font);const o=i.size;const s=this._computeTitleHeight();const{boxWidth:r,itemHeight:a}=Lc(e,o);let l,c;n.font=i.string;if(this.isHorizontal()){l=this.maxWidth;c=this._fitRows(s,o,r,a)+10}else{c=this.maxHeight;l=this._fitCols(s,i,r,a)+10}this.width=Math.min(l,t.maxWidth||this.maxWidth);this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,n,e,i){const{ctx:o,maxWidth:s,options:{labels:{padding:r}}}=this;const a=this.legendHitBoxes=[];const l=this.lineWidths=[0];const c=i+r;let h=t;o.textAlign="left";o.textBaseline="middle";let f=-1;let d=-c;this.legendItems.forEach(((t,u)=>{const p=e+n/2+o.measureText(t.text).width;if(u===0||l[l.length-1]+p+2*r>s){h+=c;l[l.length-(u>0?0:1)]=0;d+=c;f++}a[u]={left:0,top:d,row:f,width:p,height:i};l[l.length-1]+=p+r}));return h}_fitCols(t,n,e,i){const{ctx:o,maxHeight:s,options:{labels:{padding:r}}}=this;const a=this.legendHitBoxes=[];const l=this.columnSizes=[];const c=s-t;let h=r;let f=0;let d=0;let u=0;let p=0;this.legendItems.forEach(((t,s)=>{const{itemWidth:g,itemHeight:b}=Ic(e,n,o,t,i);if(s>0&&d+b+2*r>c){h+=f+r;l.push({width:f,height:d});u+=f+r;p++;f=d=0}a[s]={left:u,top:d,col:p,width:g,height:b};f=Math.max(f,g);d+=b+r}));h+=f;l.push({width:f,height:d});return h}adjustHitBoxes(){if(!this.options.display){return}const t=this._computeTitleHeight();const{legendHitBoxes:n,options:{align:e,labels:{padding:i},rtl:o}}=this;const s=Lo(o,this.left,this.width);if(this.isHorizontal()){let o=0;let r=De(e,this.left+i,this.right-this.lineWidths[o]);for(const a of n){if(o!==a.row){o=a.row;r=De(e,this.left+i,this.right-this.lineWidths[o])}a.top+=this.top+t+i;a.left=s.leftForLtr(s.x(r),a.width);r+=a.width+i}}else{let o=0;let r=De(e,this.top+t+i,this.bottom-this.columnSizes[o].height);for(const a of n){if(a.col!==o){o=a.col;r=De(e,this.top+t+i,this.bottom-this.columnSizes[o].height)}a.top=r;a.left+=this.left+i;a.left=s.leftForLtr(s.x(a.left),a.width);r+=a.height+i}}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;gi(t,this);this._draw();bi(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:e,ctx:i}=this;const{align:o,labels:s}=t;const r=ri.color;const a=Lo(t.rtl,this.left,this.width);const l=Ai(s.font);const{padding:c}=s;const h=l.size;const f=h/2;let d;this.drawTitle();i.textAlign=a.textAlign("left");i.textBaseline="middle";i.lineWidth=.5;i.font=l.string;const{boxWidth:u,boxHeight:p,itemHeight:g}=Lc(s,h);const b=function(t,n,e){if(isNaN(u)||u<=0||isNaN(p)||p<0){return}i.save();const o=Cn(e.lineWidth,1);i.fillStyle=Cn(e.fillStyle,r);i.lineCap=Cn(e.lineCap,"butt");i.lineDashOffset=Cn(e.lineDashOffset,0);i.lineJoin=Cn(e.lineJoin,"miter");i.lineWidth=o;i.strokeStyle=Cn(e.strokeStyle,r);i.setLineDash(Cn(e.lineDash,[]));if(s.usePointStyle){const r={radius:p*Math.SQRT2/2,pointStyle:e.pointStyle,rotation:e.rotation,borderWidth:o};const l=a.xPlus(t,u/2);const c=n+f;ui(i,r,l,c,s.pointStyleWidth&&u)}else{const s=n+Math.max((h-p)/2,0);const r=a.leftForLtr(t,u);const l=Oi(e.borderRadius);i.beginPath();if(Object.values(l).some((t=>t!==0))){Mi(i,{x:r,y:s,w:u,h:p,radius:l})}else{i.rect(r,s,u,p)}i.fill();if(o!==0){i.stroke()}}i.restore()};const w=function(t,n,e){ki(i,e.text,t,n+g/2,l,{strikethrough:e.hidden,textAlign:a.textAlign(e.textAlign)})};const m=this.isHorizontal();const y=this._computeTitleHeight();if(m){d={x:De(o,this.left+c,this.right-e[0]),y:this.top+c+y,line:0}}else{d={x:this.left+c,y:De(o,this.top+y+c,this.bottom-n[0].height),line:0}}Ro(this.ctx,t.textDirection);const x=g+c;this.legendItems.forEach(((r,h)=>{i.strokeStyle=r.fontColor;i.fillStyle=r.fontColor;const p=i.measureText(r.text).width;const g=a.textAlign(r.textAlign||(r.textAlign=s.textAlign));const v=u+f+p;let k=d.x;let M=d.y;a.setWidth(this.width);if(m){if(h>0&&k+v+c>this.right){M=d.y+=x;d.line++;k=d.x=De(o,this.left+c,this.right-e[d.line])}}else if(h>0&&M+x>this.bottom){k=d.x=k+n[d.line].width+c;d.line++;M=d.y=De(o,this.top+y+c,this.bottom-n[d.line].height)}const z=a.x(k);b(z,M,r);k=Le(g,k+u+f,m?k+v:this.right,t.rtl);w(a.x(k),M,r);if(m){d.x+=v+c}else if(typeof r.text!=="string"){const t=l.lineHeight;d.y+=Wc(r,t)+c}else{d.y+=x}}));No(this.ctx,t.textDirection)}drawTitle(){const t=this.options;const n=t.title;const e=Ai(n.font);const i=Ei(n.padding);if(!n.display){return}const o=Lo(t.rtl,this.left,this.width);const s=this.ctx;const r=n.position;const a=e.size/2;const l=i.top+a;let c;let h=this.left;let f=this.width;if(this.isHorizontal()){f=Math.max(...this.lineWidths);c=this.top+l;h=De(t.align,h,this.right-f)}else{const n=this.columnSizes.reduce(((t,n)=>Math.max(t,n.height)),0);c=l+De(t.align,this.top,this.bottom-n-t.labels.padding-this._computeTitleHeight())}const d=De(r,h,h+f);s.textAlign=o.textAlign(Ae(r));s.textBaseline="middle";s.strokeStyle=n.color;s.fillStyle=n.color;s.font=e.string;ki(s,n.text,d,c,e)}_computeTitleHeight(){const t=this.options.title;const n=Ai(t.font);const e=Ei(t.padding);return t.display?n.lineHeight+e.height:0}_getLegendItemAt(t,n){let e,i,o;if(xe(t,this.left,this.right)&&xe(n,this.top,this.bottom)){o=this.legendHitBoxes;for(e=0;e<o.length;++e){i=o[e];if(xe(t,i.left,i.left+i.width)&&xe(n,i.top,i.top+i.height)){return this.legendItems[e]}}}return null}handleEvent(t){const n=this.options;if(!Bc(t.type,n)){return}const e=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem;const o=Rc(i,e);if(i&&!o){Pn(n.onLeave,[t,i,this],this)}this._hoveredItem=e;if(e&&!o){Pn(n.onHover,[t,e,this],this)}}else if(e){Pn(n.onClick,[t,e,this],this)}}}function Ic(t,n,e,i,o){const s=Tc(i,t,n,e);const r=Fc(o,i,n.lineHeight);return{itemWidth:s,itemHeight:r}}function Tc(t,n,e,i){let o=t.text;if(o&&typeof o!=="string"){o=o.reduce(((t,n)=>t.length>n.length?t:n))}return n+e.size/2+i.measureText(o).width}function Fc(t,n,e){let i=t;if(typeof n.text!=="string"){i=Wc(n,e)}return i}function Wc(t,n){const e=t.text?t.text.length:0;return n*e}function Bc(t,n){if((t==="mousemove"||t==="mouseout")&&(n.onHover||n.onLeave)){return true}if(n.onClick&&(t==="click"||t==="mouseup")){return true}return false}var Uc={id:"legend",_element:Nc,start(t,n,e){const i=t.legend=new Nc({ctx:t.ctx,options:e,chart:t});Sr.configure(t,i,e);Sr.addBox(t,i)},stop(t){Sr.removeBox(t,t.legend);delete t.legend},beforeUpdate(t,n,e){const i=t.legend;Sr.configure(t,i,e);i.options=e},afterUpdate(t){const n=t.legend;n.buildLabels();n.adjustHitBoxes()},afterEvent(t,n){if(!n.replay){t.legend.handleEvent(n.event)}},defaults:{display:true,position:"top",align:"center",fullSize:true,reverse:false,weight:1e3,onClick(t,n,e){const i=n.datasetIndex;const o=e.chart;if(o.isDatasetVisible(i)){o.hide(i);n.hidden=true}else{o.show(i);n.hidden=false}},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const n=t.data.datasets;const{labels:{usePointStyle:e,pointStyle:i,textAlign:o,color:s,useBorderRadius:r,borderRadius:a}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const l=t.controller.getStyle(e?0:undefined);const c=Ei(l.borderWidth);return{text:n[t.index].label,fillStyle:l.backgroundColor,fontColor:s,hidden:!t.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:l.borderColor,pointStyle:i||l.pointStyle,rotation:l.rotation,textAlign:o||l.textAlign,borderRadius:r&&(a||l.borderRadius),datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:false,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class Hc extends qr{constructor(t){super();this.chart=t.chart;this.options=t.options;this.ctx=t.ctx;this._padding=undefined;this.top=undefined;this.bottom=undefined;this.left=undefined;this.right=undefined;this.width=undefined;this.height=undefined;this.position=undefined;this.weight=undefined;this.fullSize=undefined}update(t,n){const e=this.options;this.left=0;this.top=0;if(!e.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t;this.height=this.bottom=n;const i=kn(e.text)?e.text.length:1;this._padding=Ei(e.padding);const o=i*Ai(e.font).lineHeight+this._padding.height;if(this.isHorizontal()){this.height=o}else{this.width=o}}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:e,bottom:i,right:o,options:s}=this;const r=s.align;let a=0;let l,c,h;if(this.isHorizontal()){c=De(r,e,o);h=n+t;l=o-e}else{if(s.position==="left"){c=e+t;h=De(r,i,n);a=Xn*-.5}else{c=o-t;h=De(r,n,i);a=Xn*.5}l=i-n}return{titleX:c,titleY:h,maxWidth:l,rotation:a}}draw(){const t=this.ctx;const n=this.options;if(!n.display){return}const e=Ai(n.font);const i=e.lineHeight;const o=i/2+this._padding.top;const{titleX:s,titleY:r,maxWidth:a,rotation:l}=this._drawArgs(o);ki(t,n.text,0,0,e,{color:n.color,maxWidth:a,rotation:l,textAlign:Ae(n.align),textBaseline:"middle",translation:[s,r]})}}function Vc(t,n){const e=new Hc({ctx:t.ctx,options:n,chart:t});Sr.configure(t,e,n);Sr.addBox(t,e);t.titleBlock=e}var $c={id:"title",_element:Hc,start(t,n,e){Vc(t,e)},stop(t){const n=t.titleBlock;Sr.removeBox(t,n);delete t.titleBlock},beforeUpdate(t,n,e){const i=t.titleBlock;Sr.configure(t,i,e);i.options=e},defaults:{align:"center",display:false,font:{weight:"bold"},fullSize:true,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:true,_indexable:false}};const Yc=new WeakMap;var Xc={id:"subtitle",start(t,n,e){const i=new Hc({ctx:t.ctx,options:e,chart:t});Sr.configure(t,i,e);Sr.addBox(t,i);Yc.set(t,i)},stop(t){Sr.removeBox(t,Yc.get(t));Yc.delete(t)},beforeUpdate(t,n,e){const i=Yc.get(t);Sr.configure(t,i,e);i.options=e},defaults:{align:"center",display:false,font:{weight:"normal"},fullSize:true,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:true,_indexable:false}};const Kc={average(t){if(!t.length){return false}let n,e;let i=new Set;let o=0;let s=0;for(n=0,e=t.length;n<e;++n){const e=t[n].element;if(e&&e.hasValue()){const t=e.tooltipPosition();i.add(t.x);o+=t.y;++s}}if(s===0||i.size===0){return false}const r=[...i].reduce(((t,n)=>t+n))/i.size;return{x:r,y:o/s}},nearest(t,n){if(!t.length){return false}let e=n.x;let i=n.y;let o=Number.POSITIVE_INFINITY;let s,r,a;for(s=0,r=t.length;s<r;++s){const e=t[s].element;if(e&&e.hasValue()){const t=e.getCenterPoint();const i=pe(n,t);if(i<o){o=i;a=e}}}if(a){const t=a.tooltipPosition();e=t.x;i=t.y}return{x:e,y:i}}};function qc(t,n){if(n){if(kn(n)){Array.prototype.push.apply(t,n)}else{t.push(n)}}return t}function Zc(t){if((typeof t==="string"||t instanceof String)&&t.indexOf("\n")>-1){return t.split("\n")}return t}function Jc(t,n){const{element:e,datasetIndex:i,index:o}=n;const s=t.getDatasetMeta(i).controller;const{label:r,value:a}=s.getLabelAndValue(o);return{chart:t,label:r,parsed:s.getParsed(o),raw:t.data.datasets[i].data[o],formattedValue:a,dataset:s.getDataset(),dataIndex:o,datasetIndex:i,element:e}}function Qc(t,n){const e=t.chart.ctx;const{body:i,footer:o,title:s}=t;const{boxWidth:r,boxHeight:a}=n;const l=Ai(n.bodyFont);const c=Ai(n.titleFont);const h=Ai(n.footerFont);const f=s.length;const d=o.length;const u=i.length;const p=Ei(n.padding);let g=p.height;let b=0;let w=i.reduce(((t,n)=>t+n.before.length+n.lines.length+n.after.length),0);w+=t.beforeBody.length+t.afterBody.length;if(f){g+=f*c.lineHeight+(f-1)*n.titleSpacing+n.titleMarginBottom}if(w){const t=n.displayColors?Math.max(a,l.lineHeight):l.lineHeight;g+=u*t+(w-u)*l.lineHeight+(w-1)*n.bodySpacing}if(d){g+=n.footerMarginTop+d*h.lineHeight+(d-1)*n.footerSpacing}let m=0;const y=function(t){b=Math.max(b,e.measureText(t).width+m)};e.save();e.font=c.string;On(t.title,y);e.font=l.string;On(t.beforeBody.concat(t.afterBody),y);m=n.displayColors?r+2+n.boxPadding:0;On(i,(t=>{On(t.before,y);On(t.lines,y);On(t.after,y)}));m=0;e.font=h.string;On(t.footer,y);e.restore();b+=p.width;return{width:b,height:g}}function Gc(t,n){const{y:e,height:i}=n;if(e<i/2){return"top"}else if(e>t.height-i/2){return"bottom"}return"center"}function th(t,n,e,i){const{x:o,width:s}=i;const r=e.caretSize+e.caretPadding;if(t==="left"&&o+s+r>n.width){return true}if(t==="right"&&o-s-r<0){return true}}function nh(t,n,e,i){const{x:o,width:s}=e;const{width:r,chartArea:{left:a,right:l}}=t;let c="center";if(i==="center"){c=o<=(a+l)/2?"left":"right"}else if(o<=s/2){c="left"}else if(o>=r-s/2){c="right"}if(th(c,t,n,e)){c="center"}return c}function eh(t,n,e){const i=e.yAlign||n.yAlign||Gc(t,e);return{xAlign:e.xAlign||n.xAlign||nh(t,n,e,i),yAlign:i}}function ih(t,n){let{x:e,width:i}=t;if(n==="right"){e-=i}else if(n==="center"){e-=i/2}return e}function oh(t,n,e){let{y:i,height:o}=t;if(n==="top"){i+=e}else if(n==="bottom"){i-=o+e}else{i-=o/2}return i}function sh(t,n,e,i){const{caretSize:o,caretPadding:s,cornerRadius:r}=t;const{xAlign:a,yAlign:l}=e;const c=o+s;const{topLeft:h,topRight:f,bottomLeft:d,bottomRight:u}=Oi(r);let p=ih(n,a);const g=oh(n,l,c);if(l==="center"){if(a==="left"){p+=c}else if(a==="right"){p-=c}}else if(a==="left"){p-=Math.max(h,d)+o}else if(a==="right"){p+=Math.max(f,u)+o}return{x:me(p,0,i.width-n.width),y:me(g,0,i.height-n.height)}}function rh(t,n,e){const i=Ei(e.padding);return n==="center"?t.x+t.width/2:n==="right"?t.x+t.width-i.right:t.x+i.left}function ah(t){return qc([],Zc(t))}function lh(t,n,e){return Ri(t,{tooltip:n,tooltipItems:e,type:"tooltip"})}function ch(t,n){const e=n&&n.dataset&&n.dataset.tooltip&&n.dataset.tooltip.callbacks;return e?t.override(e):t}const hh={beforeTitle:yn,title(t){if(t.length>0){const n=t[0];const e=n.chart.data.labels;const i=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset"){return n.dataset.label||""}else if(n.label){return n.label}else if(i>0&&n.dataIndex<i){return e[n.dataIndex]}}return""},afterTitle:yn,beforeBody:yn,beforeLabel:yn,label(t){if(this&&this.options&&this.options.mode==="dataset"){return t.label+": "+t.formattedValue||t.formattedValue}let n=t.dataset.label||"";if(n){n+=": "}const e=t.formattedValue;if(!vn(e)){n+=e}return n},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex);const e=n.controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex);const e=n.controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:yn,afterBody:yn,beforeFooter:yn,footer:yn,afterFooter:yn};function fh(t,n,e,i){const o=t[n].call(e,i);if(typeof o==="undefined"){return hh[n].call(e,i)}return o}class dh extends qr{static positioners=Kc;constructor(t){super();this.opacity=0;this._active=[];this._eventPosition=undefined;this._size=undefined;this._cachedAnimations=undefined;this._tooltipItems=[];this.$animations=undefined;this.$context=undefined;this.chart=t.chart;this.options=t.options;this.dataPoints=undefined;this.title=undefined;this.beforeBody=undefined;this.body=undefined;this.afterBody=undefined;this.footer=undefined;this.xAlign=undefined;this.yAlign=undefined;this.x=undefined;this.y=undefined;this.height=undefined;this.width=undefined;this.caretX=undefined;this.caretY=undefined;this.labelColors=undefined;this.labelPointStyles=undefined;this.labelTextColors=undefined}initialize(t){this.options=t;this._cachedAnimations=undefined;this.$context=undefined}_resolveAnimations(){const t=this._cachedAnimations;if(t){return t}const n=this.chart;const e=this.options.setContext(this.getContext());const i=e.enabled&&n.options.animation&&e.animations;const o=new is(this.chart,i);if(i._cacheable){this._cachedAnimations=Object.freeze(o)}return o}getContext(){return this.$context||(this.$context=lh(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:e}=n;const i=fh(e,"beforeTitle",this,t);const o=fh(e,"title",this,t);const s=fh(e,"afterTitle",this,t);let r=[];r=qc(r,Zc(i));r=qc(r,Zc(o));r=qc(r,Zc(s));return r}getBeforeBody(t,n){return ah(fh(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:e}=n;const i=[];On(t,(t=>{const n={before:[],lines:[],after:[]};const o=ch(e,t);qc(n.before,Zc(fh(o,"beforeLabel",this,t)));qc(n.lines,fh(o,"label",this,t));qc(n.after,Zc(fh(o,"afterLabel",this,t)));i.push(n)}));return i}getAfterBody(t,n){return ah(fh(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:e}=n;const i=fh(e,"beforeFooter",this,t);const o=fh(e,"footer",this,t);const s=fh(e,"afterFooter",this,t);let r=[];r=qc(r,Zc(i));r=qc(r,Zc(o));r=qc(r,Zc(s));return r}_createItems(t){const n=this._active;const e=this.chart.data;const i=[];const o=[];const s=[];let r=[];let a,l;for(a=0,l=n.length;a<l;++a){r.push(Jc(this.chart,n[a]))}if(t.filter){r=r.filter(((n,i,o)=>t.filter(n,i,o,e)))}if(t.itemSort){r=r.sort(((n,i)=>t.itemSort(n,i,e)))}On(r,(n=>{const e=ch(t.callbacks,n);i.push(fh(e,"labelColor",this,n));o.push(fh(e,"labelPointStyle",this,n));s.push(fh(e,"labelTextColor",this,n))}));this.labelColors=i;this.labelPointStyles=o;this.labelTextColors=s;this.dataPoints=r;return r}update(t,n){const e=this.options.setContext(this.getContext());const i=this._active;let o;let s=[];if(!i.length){if(this.opacity!==0){o={opacity:0}}}else{const t=Kc[e.position].call(this,i,this._eventPosition);s=this._createItems(e);this.title=this.getTitle(s,e);this.beforeBody=this.getBeforeBody(s,e);this.body=this.getBody(s,e);this.afterBody=this.getAfterBody(s,e);this.footer=this.getFooter(s,e);const n=this._size=Qc(this,e);const r=Object.assign({},t,n);const a=eh(this.chart,e,r);const l=sh(e,r,a,this.chart);this.xAlign=a.xAlign;this.yAlign=a.yAlign;o={opacity:1,x:l.x,y:l.y,width:n.width,height:n.height,caretX:t.x,caretY:t.y}}this._tooltipItems=s;this.$context=undefined;if(o){this._resolveAnimations().update(this,o)}if(t&&e.external){e.external.call(this,{chart:this.chart,tooltip:this,replay:n})}}drawCaret(t,n,e,i){const o=this.getCaretPosition(t,e,i);n.lineTo(o.x1,o.y1);n.lineTo(o.x2,o.y2);n.lineTo(o.x3,o.y3)}getCaretPosition(t,n,e){const{xAlign:i,yAlign:o}=this;const{caretSize:s,cornerRadius:r}=e;const{topLeft:a,topRight:l,bottomLeft:c,bottomRight:h}=Oi(r);const{x:f,y:d}=t;const{width:u,height:p}=n;let g,b,w,m,y,x;if(o==="center"){y=d+p/2;if(i==="left"){g=f;b=g-s;m=y+s;x=y-s}else{g=f+u;b=g+s;m=y-s;x=y+s}w=g}else{if(i==="left"){b=f+Math.max(a,c)+s}else if(i==="right"){b=f+u-Math.max(l,h)-s}else{b=this.caretX}if(o==="top"){m=d;y=m-s;g=b-s;w=b+s}else{m=d+p;y=m+s;g=b+s;w=b-s}x=m}return{x1:g,x2:b,x3:w,y1:m,y2:y,y3:x}}drawTitle(t,n,e){const i=this.title;const o=i.length;let s,r,a;if(o){const l=Lo(e.rtl,this.x,this.width);t.x=rh(this,e.titleAlign,e);n.textAlign=l.textAlign(e.titleAlign);n.textBaseline="middle";s=Ai(e.titleFont);r=e.titleSpacing;n.fillStyle=e.titleColor;n.font=s.string;for(a=0;a<o;++a){n.fillText(i[a],l.x(t.x),t.y+s.lineHeight/2);t.y+=s.lineHeight+r;if(a+1===o){t.y+=e.titleMarginBottom-r}}}}_drawColorBox(t,n,e,i,o){const s=this.labelColors[e];const r=this.labelPointStyles[e];const{boxHeight:a,boxWidth:l}=o;const c=Ai(o.bodyFont);const h=rh(this,"left",o);const f=i.x(h);const d=a<c.lineHeight?(c.lineHeight-a)/2:0;const u=n.y+d;if(o.usePointStyle){const n={radius:Math.min(l,a)/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:1};const e=i.leftForLtr(f,l)+l/2;const c=u+a/2;t.strokeStyle=o.multiKeyBackground;t.fillStyle=o.multiKeyBackground;di(t,n,e,c);t.strokeStyle=s.borderColor;t.fillStyle=s.backgroundColor;di(t,n,e,c)}else{t.lineWidth=Mn(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1;t.strokeStyle=s.borderColor;t.setLineDash(s.borderDash||[]);t.lineDashOffset=s.borderDashOffset||0;const n=i.leftForLtr(f,l);const e=i.leftForLtr(i.xPlus(f,1),l-2);const r=Oi(s.borderRadius);if(Object.values(r).some((t=>t!==0))){t.beginPath();t.fillStyle=o.multiKeyBackground;Mi(t,{x:n,y:u,w:l,h:a,radius:r});t.fill();t.stroke();t.fillStyle=s.backgroundColor;t.beginPath();Mi(t,{x:e,y:u+1,w:l-2,h:a-2,radius:r});t.fill()}else{t.fillStyle=o.multiKeyBackground;t.fillRect(n,u,l,a);t.strokeRect(n,u,l,a);t.fillStyle=s.backgroundColor;t.fillRect(e,u+1,l-2,a-2)}}t.fillStyle=this.labelTextColors[e]}drawBody(t,n,e){const{body:i}=this;const{bodySpacing:o,bodyAlign:s,displayColors:r,boxHeight:a,boxWidth:l,boxPadding:c}=e;const h=Ai(e.bodyFont);let f=h.lineHeight;let d=0;const u=Lo(e.rtl,this.x,this.width);const p=function(e){n.fillText(e,u.x(t.x+d),t.y+f/2);t.y+=f+o};const g=u.textAlign(s);let b,w,m,y,x,v,k;n.textAlign=s;n.textBaseline="middle";n.font=h.string;t.x=rh(this,g,e);n.fillStyle=e.bodyColor;On(this.beforeBody,p);d=r&&g!=="right"?s==="center"?l/2+c:l+2+c:0;for(y=0,v=i.length;y<v;++y){b=i[y];w=this.labelTextColors[y];n.fillStyle=w;On(b.before,p);m=b.lines;if(r&&m.length){this._drawColorBox(n,t,y,u,e);f=Math.max(h.lineHeight,a)}for(x=0,k=m.length;x<k;++x){p(m[x]);f=h.lineHeight}On(b.after,p)}d=0;f=h.lineHeight;On(this.afterBody,p);t.y-=o}drawFooter(t,n,e){const i=this.footer;const o=i.length;let s,r;if(o){const a=Lo(e.rtl,this.x,this.width);t.x=rh(this,e.footerAlign,e);t.y+=e.footerMarginTop;n.textAlign=a.textAlign(e.footerAlign);n.textBaseline="middle";s=Ai(e.footerFont);n.fillStyle=e.footerColor;n.font=s.string;for(r=0;r<o;++r){n.fillText(i[r],a.x(t.x),t.y+s.lineHeight/2);t.y+=s.lineHeight+e.footerSpacing}}}drawBackground(t,n,e,i){const{xAlign:o,yAlign:s}=this;const{x:r,y:a}=t;const{width:l,height:c}=e;const{topLeft:h,topRight:f,bottomLeft:d,bottomRight:u}=Oi(i.cornerRadius);n.fillStyle=i.backgroundColor;n.strokeStyle=i.borderColor;n.lineWidth=i.borderWidth;n.beginPath();n.moveTo(r+h,a);if(s==="top"){this.drawCaret(t,n,e,i)}n.lineTo(r+l-f,a);n.quadraticCurveTo(r+l,a,r+l,a+f);if(s==="center"&&o==="right"){this.drawCaret(t,n,e,i)}n.lineTo(r+l,a+c-u);n.quadraticCurveTo(r+l,a+c,r+l-u,a+c);if(s==="bottom"){this.drawCaret(t,n,e,i)}n.lineTo(r+d,a+c);n.quadraticCurveTo(r,a+c,r,a+c-d);if(s==="center"&&o==="left"){this.drawCaret(t,n,e,i)}n.lineTo(r,a+h);n.quadraticCurveTo(r,a,r+h,a);n.closePath();n.fill();if(i.borderWidth>0){n.stroke()}}_updateAnimationTarget(t){const n=this.chart;const e=this.$animations;const i=e&&e.x;const o=e&&e.y;if(i||o){const e=Kc[t.position].call(this,this._active,this._eventPosition);if(!e){return}const s=this._size=Qc(this,t);const r=Object.assign({},e,this._size);const a=eh(n,t,r);const l=sh(t,r,a,n);if(i._to!==l.x||o._to!==l.y){this.xAlign=a.xAlign;this.yAlign=a.yAlign;this.width=s.width;this.height=s.height;this.caretX=e.x;this.caretY=e.y;this._resolveAnimations().update(this,l)}}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let e=this.opacity;if(!e){return}this._updateAnimationTarget(n);const i={width:this.width,height:this.height};const o={x:this.x,y:this.y};e=Math.abs(e)<.001?0:e;const s=Ei(n.padding);const r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;if(n.enabled&&r){t.save();t.globalAlpha=e;this.drawBackground(o,t,i,n);Ro(t,n.textDirection);o.y+=s.top;this.drawTitle(o,t,n);this.drawBody(o,t,n);this.drawFooter(o,t,n);No(t,n.textDirection);t.restore()}}getActiveElements(){return this._active||[]}setActiveElements(t,n){const e=this._active;const i=t.map((({datasetIndex:t,index:n})=>{const e=this.chart.getDatasetMeta(t);if(!e){throw new Error("Cannot find a dataset at index "+t)}return{datasetIndex:t,element:e.data[n],index:n}}));const o=!En(e,i);const s=this._positionChanged(i,n);if(o||s){this._active=i;this._eventPosition=n;this._ignoreReplayEvents=true;this.update(true)}}handleEvent(t,n,e=true){if(n&&this._ignoreReplayEvents){return false}this._ignoreReplayEvents=false;const i=this.options;const o=this._active||[];const s=this._getActiveElements(t,o,n,e);const r=this._positionChanged(s,t);const a=n||!En(s,o)||r;if(a){this._active=s;if(i.enabled||i.external){this._eventPosition={x:t.x,y:t.y};this.update(true,n)}}return a}_getActiveElements(t,n,e,i){const o=this.options;if(t.type==="mouseout"){return[]}if(!i){return n.filter((t=>this.chart.data.datasets[t.datasetIndex]&&this.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index)!==undefined))}const s=this.chart.getElementsAtEventForMode(t,o.mode,o,e);if(o.reverse){s.reverse()}return s}_positionChanged(t,n){const{caretX:e,caretY:i,options:o}=this;const s=Kc[o.position].call(this,t,n);return s!==false&&(e!==s.x||i!==s.y)}}var uh={id:"tooltip",_element:dh,positioners:Kc,afterInit(t,n,e){if(e){t.tooltip=new dh({chart:t,options:e})}},beforeUpdate(t,n,e){if(t.tooltip){t.tooltip.initialize(e)}},reset(t,n,e){if(t.tooltip){t.tooltip.initialize(e)}},afterDraw(t){const n=t.tooltip;if(n&&n._willRender()){const e={tooltip:n};if(t.notifyPlugins("beforeTooltipDraw",{...e,cancelable:true})===false){return}n.draw(t.ctx);t.notifyPlugins("afterTooltipDraw",e)}},afterEvent(t,n){if(t.tooltip){const e=n.replay;if(t.tooltip.handleEvent(n.event,e,n.inChartArea)){n.changed=true}}},defaults:{enabled:true,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:(t,n)=>n.bodyFont.size,boxWidth:(t,n)=>n.bodyFont.size,multiKeyBackground:"#fff",displayColors:true,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:hh},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:false,callbacks:{_scriptable:false,_indexable:false},animation:{_fallback:false},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};var ph=Object.freeze({__proto__:null,Colors:Jl,Decimation:ic,Filler:Dc,Legend:Uc,SubTitle:Xc,Title:$c,Tooltip:uh});const gh=(t,n,e,i)=>{if(typeof n==="string"){e=t.push(n)-1;i.unshift({index:e,label:n})}else if(isNaN(n)){e=null}return e};function bh(t,n,e,i){const o=t.indexOf(n);if(o===-1){return gh(t,n,e,i)}const s=t.lastIndexOf(n);return o!==s?e:o}const wh=(t,n)=>t===null?null:me(Math.round(t),0,n);function mh(t){const n=this.getLabels();if(t>=0&&t<n.length){return n[t]}return t}class yh extends ga{static id="category";static defaults={ticks:{callback:mh}};constructor(t){super(t);this._startValue=undefined;this._valueRange=0;this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const t=this.getLabels();for(const{index:e,label:i}of n){if(t[e]===i){t.splice(e,1)}}this._addedLabels=[]}super.init(t)}parse(t,n){if(vn(t)){return null}const e=this.getLabels();n=isFinite(n)&&e[n]===t?n:bh(e,t,Cn(n,t),this._addedLabels);return wh(n,e.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:e,max:i}=this.getMinMax(true);if(this.options.bounds==="ticks"){if(!t){e=0}if(!n){i=this.getLabels().length-1}}this.min=e;this.max=i}buildTicks(){const t=this.min;const n=this.max;const e=this.options.offset;const i=[];let o=this.getLabels();o=t===0&&n===o.length-1?o:o.slice(t,n+1);this._valueRange=Math.max(o.length-(e?0:1),1);this._startValue=this.min-(e?.5:0);for(let e=t;e<=n;e++){i.push({value:e})}return i}getLabelForValue(t){return mh.call(this,t)}configure(){super.configure();if(!this.isHorizontal()){this._reversePixels=!this._reversePixels}}getPixelForValue(t){if(typeof t!=="number"){t=this.parse(t)}return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;if(t<0||t>n.length-1){return null}return this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function xh(t,n){const e=[];const i=1e-14;const{bounds:o,step:s,min:r,max:a,precision:l,count:c,maxTicks:h,maxDigits:f,includeBounds:d}=t;const u=s||1;const p=h-1;const{min:g,max:b}=n;const w=!vn(r);const m=!vn(a);const y=!vn(c);const x=(b-g)/(f+1);let v=oe((b-g)/p/u)*u;let k,M,z,S;if(v<i&&!w&&!m){return[{value:g},{value:b}]}S=Math.ceil(b/v)-Math.floor(g/v);if(S>p){v=oe(S*v/p/u)*u}if(!vn(l)){k=Math.pow(10,l);v=Math.ceil(v*k)/k}if(o==="ticks"){M=Math.floor(g/v)*v;z=Math.ceil(b/v)*v}else{M=g;z=b}if(w&&m&&s&&le((a-r)/s,v/1e3)){S=Math.round(Math.min((a-r)/v,h));v=(a-r)/S;M=r;z=a}else if(y){M=w?r:M;z=m?a:z;S=c-1;v=(z-M)/S}else{S=(z-M)/v;if(ie(S,Math.round(S),v/1e3)){S=Math.round(S)}else{S=Math.ceil(S)}}const C=Math.max(de(v),de(M));k=Math.pow(10,vn(l)?C:l);M=Math.round(M*k)/k;z=Math.round(z*k)/k;let _=0;if(w){if(d&&M!==r){e.push({value:r});if(M<r){_++}if(ie(Math.round((M+_*v)*k)/k,r,vh(r,x,t))){_++}}else if(M<r){_++}}for(;_<S;++_){const t=Math.round((M+_*v)*k)/k;if(m&&t>a){break}e.push({value:t})}if(m&&d&&z!==a){if(e.length&&ie(e[e.length-1].value,a,vh(a,x,t))){e[e.length-1].value=a}else{e.push({value:a})}}else if(!m||z===a){e.push({value:z})}return e}function vh(t,n,{horizontal:e,minRotation:i}){const o=he(i);const s=(e?Math.sin(o):Math.cos(o))||.001;const r=.75*n*(""+t).length;return Math.min(n/s,r)}class kh extends ga{constructor(t){super(t);this.start=undefined;this.end=undefined;this._startValue=undefined;this._endValue=undefined;this._valueRange=0}parse(t,n){if(vn(t)){return null}if((typeof t==="number"||t instanceof Number)&&!isFinite(+t)){return null}return+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options;const{minDefined:n,maxDefined:e}=this.getUserBounds();let{min:i,max:o}=this;const s=t=>i=n?i:t;const r=t=>o=e?o:t;if(t){const t=ee(i);const n=ee(o);if(t<0&&n<0){r(0)}else if(t>0&&n>0){s(0)}}if(i===o){let n=o===0?1:Math.abs(o*.05);r(o+n);if(!t){s(i-n)}}this.min=i;this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:e}=t;let i;if(e){i=Math.ceil(this.max/e)-Math.floor(this.min/e)+1;if(i>1e3){console.warn(`scales.${this.id}.ticks.stepSize: ${e} would result generating up to ${i} ticks. Limiting to 1000.`);i=1e3}}else{i=this.computeTickLimit();n=n||11}if(n){i=Math.min(n,i)}return i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options;const n=t.ticks;let e=this.getTickLimit();e=Math.max(2,e);const i={maxTicks:e,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==false};const o=this._range||this;const s=xh(i,o);if(t.bounds==="ticks"){ce(s,this,"value")}if(t.reverse){s.reverse();this.start=this.max;this.end=this.min}else{this.start=this.min;this.end=this.max}return s}configure(){const t=this.ticks;let n=this.min;let e=this.max;super.configure();if(this.options.offset&&t.length){const i=(e-n)/Math.max(t.length-1,1)/2;n-=i;e+=i}this._startValue=n;this._endValue=e;this._valueRange=e-n}getLabelForValue(t){return Ze(t,this.chart.options.locale,this.options.ticks.format)}}class Mh extends kh{static id="linear";static defaults={ticks:{callback:Ge.formatters.numeric}};determineDataLimits(){const{min:t,max:n}=this.getMinMax(true);this.min=zn(t)?t:0;this.max=zn(n)?n:1;this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal();const n=t?this.width:this.height;const e=he(this.options.ticks.minRotation);const i=(t?Math.sin(e):Math.cos(e))||.001;const o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const zh=t=>Math.floor(ne(t));const Sh=(t,n)=>Math.pow(10,zh(t)+n);function Ch(t){const n=t/Math.pow(10,zh(t));return n===1}function _h(t,n,e){const i=Math.pow(10,e);const o=Math.floor(t/i);const s=Math.ceil(n/i);return s-o}function jh(t,n){const e=n-t;let i=zh(e);while(_h(t,n,i)>10){i++}while(_h(t,n,i)<10){i--}return Math.min(i,zh(t))}function Ph(t,{min:n,max:e}){n=Sn(t.min,n);const i=[];const o=zh(n);let s=jh(n,e);let r=s<0?Math.pow(10,Math.abs(s)):1;const a=Math.pow(10,s);const l=o>s?Math.pow(10,o):0;const c=Math.round((n-l)*r)/r;const h=Math.floor((n-l)/a/10)*a*10;let f=Math.floor((c-h)/Math.pow(10,s));let d=Sn(t.min,Math.round((l+h+f*Math.pow(10,s))*r)/r);while(d<e){i.push({value:d,major:Ch(d),significand:f});if(f>=10){f=f<15?15:20}else{f++}if(f>=20){s++;f=2;r=s>=0?1:r}d=Math.round((l+h+f*Math.pow(10,s))*r)/r}const u=Sn(t.max,d);i.push({value:u,major:Ch(u),significand:f});return i}class Oh extends ga{static id="logarithmic";static defaults={ticks:{callback:Ge.formatters.logarithmic,major:{enabled:true}}};constructor(t){super(t);this.start=undefined;this.end=undefined;this._startValue=undefined;this._valueRange=0}parse(t,n){const e=kh.prototype.parse.apply(this,[t,n]);if(e===0){this._zero=true;return undefined}return zn(e)&&e>0?e:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(true);this.min=zn(t)?Math.max(0,t):null;this.max=zn(n)?Math.max(0,n):null;if(this.options.beginAtZero){this._zero=true}if(this._zero&&this.min!==this._suggestedMin&&!zn(this._userMin)){this.min=t===Sh(this.min,0)?Sh(this.min,-1):Sh(this.min,0)}this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let e=this.min;let i=this.max;const o=n=>e=t?e:n;const s=t=>i=n?i:t;if(e===i){if(e<=0){o(1);s(10)}else{o(Sh(e,-1));s(Sh(i,1))}}if(e<=0){o(Sh(i,-1))}if(i<=0){s(Sh(e,1))}this.min=e;this.max=i}buildTicks(){const t=this.options;const n={min:this._userMin,max:this._userMax};const e=Ph(n,this);if(t.bounds==="ticks"){ce(e,this,"value")}if(t.reverse){e.reverse();this.start=this.max;this.end=this.min}else{this.start=this.min;this.end=this.max}return e}getLabelForValue(t){return t===undefined?"0":Ze(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure();this._startValue=ne(t);this._valueRange=ne(this.max)-ne(t)}getPixelForValue(t){if(t===undefined||t===0){t=this.min}if(t===null||isNaN(t)){return NaN}return this.getPixelForDecimal(t===this.min?0:(ne(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}function Eh(t){const n=t.ticks;if(n.display&&t.display){const t=Ei(n.backdropPadding);return Cn(n.font&&n.font.size,ri.font.size)+t.height}return 0}function Ah(t,n,e){e=kn(e)?e:[e];return{w:ci(t,n.string,e),h:e.length*n.lineHeight}}function Dh(t,n,e,i,o){if(t===i||t===o){return{start:n-e/2,end:n+e/2}}else if(t<i||t>o){return{start:n-e,end:n}}return{start:n,end:n+e}}function Lh(t){const n={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom};const e=Object.assign({},n);const i=[];const o=[];const s=t._pointLabels.length;const r=t.options.pointLabels;const a=r.centerPointLabels?Xn/s:0;for(let l=0;l<s;l++){const s=r.setContext(t.getPointLabelContext(l));o[l]=s.padding;const c=t.getPointPosition(l,t.drawingArea+o[l],a);const h=Ai(s.font);const f=Ah(t.ctx,h,t._pointLabels[l]);i[l]=f;const d=be(t.getIndexAngle(l)+a);const u=Math.round(fe(d));const p=Dh(u,c.x,f.w,0,180);const g=Dh(u,c.y,f.h,90,270);Rh(e,n,d,p,g)}t.setCenterPoint(n.l-e.l,e.r-n.r,n.t-e.t,e.b-n.b);t._pointLabelItems=Th(t,i,o)}function Rh(t,n,e,i,o){const s=Math.abs(Math.sin(e));const r=Math.abs(Math.cos(e));let a=0;let l=0;if(i.start<n.l){a=(n.l-i.start)/s;t.l=Math.min(t.l,n.l-a)}else if(i.end>n.r){a=(i.end-n.r)/s;t.r=Math.max(t.r,n.r+a)}if(o.start<n.t){l=(n.t-o.start)/r;t.t=Math.min(t.t,n.t-l)}else if(o.end>n.b){l=(o.end-n.b)/r;t.b=Math.max(t.b,n.b+l)}}function Nh(t,n,e){const i=t.drawingArea;const{extra:o,additionalAngle:s,padding:r,size:a}=e;const l=t.getPointPosition(n,i+o+r,s);const c=Math.round(fe(be(l.angle+Qn)));const h=Bh(l.y,a.h,c);const f=Fh(c);const d=Wh(l.x,a.w,f);return{visible:true,x:l.x,y:h,textAlign:f,left:d,top:h,right:d+a.w,bottom:h+a.h}}function Ih(t,n){if(!n){return true}const{left:e,top:i,right:o,bottom:s}=t;const r=pi({x:e,y:i},n)||pi({x:e,y:s},n)||pi({x:o,y:i},n)||pi({x:o,y:s},n);return!r}function Th(t,n,e){const i=[];const o=t._pointLabels.length;const s=t.options;const{centerPointLabels:r,display:a}=s.pointLabels;const l={extra:Eh(s)/2,additionalAngle:r?Xn/o:0};let c;for(let s=0;s<o;s++){l.padding=e[s];l.size=n[s];const o=Nh(t,s,l);i.push(o);if(a==="auto"){o.visible=Ih(o,c);if(o.visible){c=o}}}return i}function Fh(t){if(t===0||t===180){return"center"}else if(t<180){return"left"}return"right"}function Wh(t,n,e){if(e==="right"){t-=n}else if(e==="center"){t-=n/2}return t}function Bh(t,n,e){if(e===90||e===270){t-=n/2}else if(e>270||e<90){t-=n}return t}function Uh(t,n,e){const{left:i,top:o,right:s,bottom:r}=e;const{backdropColor:a}=n;if(!vn(a)){const e=Oi(n.borderRadius);const l=Ei(n.backdropPadding);t.fillStyle=a;const c=i-l.left;const h=o-l.top;const f=s-i+l.width;const d=r-o+l.height;if(Object.values(e).some((t=>t!==0))){t.beginPath();Mi(t,{x:c,y:h,w:f,h:d,radius:e});t.fill()}else{t.fillRect(c,h,f,d)}}}function Hh(t,n){const{ctx:e,options:{pointLabels:i}}=t;for(let o=n-1;o>=0;o--){const n=t._pointLabelItems[o];if(!n.visible){continue}const s=i.setContext(t.getPointLabelContext(o));Uh(e,s,n);const r=Ai(s.font);const{x:a,y:l,textAlign:c}=n;ki(e,t._pointLabels[o],a,l+r.lineHeight/2,r,{color:s.color,textAlign:c,textBaseline:"middle"})}}function Vh(t,n,e,i){const{ctx:o}=t;if(e){o.arc(t.xCenter,t.yCenter,n,0,Kn)}else{let e=t.getPointPosition(0,n);o.moveTo(e.x,e.y);for(let s=1;s<i;s++){e=t.getPointPosition(s,n);o.lineTo(e.x,e.y)}}}function $h(t,n,e,i,o){const s=t.ctx;const r=n.circular;const{color:a,lineWidth:l}=n;if(!r&&!i||!a||!l||e<0){return}s.save();s.strokeStyle=a;s.lineWidth=l;s.setLineDash(o.dash||[]);s.lineDashOffset=o.dashOffset;s.beginPath();Vh(t,e,r,i);s.closePath();s.stroke();s.restore()}function Yh(t,n,e){return Ri(t,{label:e,index:n,type:"pointLabel"})}class Xh extends kh{static id="radialLinear";static defaults={display:true,animate:true,position:"chartArea",angleLines:{display:true,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:false},startAngle:0,ticks:{showLabelBackdrop:true,callback:Ge.formatters.numeric},pointLabels:{backdropColor:undefined,backdropPadding:2,display:true,font:{size:10},callback(t){return t},padding:5,centerPointLabels:false}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};constructor(t){super(t);this.xCenter=undefined;this.yCenter=undefined;this.drawingArea=undefined;this._pointLabels=[];this._pointLabelItems=[]}setDimensions(){const t=this._padding=Ei(Eh(this.options)/2);const n=this.width=this.maxWidth-t.width;const e=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+n/2+t.left);this.yCenter=Math.floor(this.top+e/2+t.top);this.drawingArea=Math.floor(Math.min(n,e)/2)}determineDataLimits(){const{min:t,max:n}=this.getMinMax(false);this.min=zn(t)&&!isNaN(t)?t:0;this.max=zn(n)&&!isNaN(n)?n:0;this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Eh(this.options))}generateTickLabels(t){kh.prototype.generateTickLabels.call(this,t);this._pointLabels=this.getLabels().map(((t,n)=>{const e=Pn(this.options.pointLabels.callback,[t,n],this);return e||e===0?e:""})).filter(((t,n)=>this.chart.getDataVisibility(n)))}fit(){const t=this.options;if(t.display&&t.pointLabels.display){Lh(this)}else{this.setCenterPoint(0,0,0,0)}}setCenterPoint(t,n,e,i){this.xCenter+=Math.floor((t-n)/2);this.yCenter+=Math.floor((e-i)/2);this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,e,i))}getIndexAngle(t){const n=Kn/(this._pointLabels.length||1);const e=this.options.startAngle||0;return be(t*n+he(e))}getDistanceFromCenterForValue(t){if(vn(t)){return NaN}const n=this.drawingArea/(this.max-this.min);if(this.options.reverse){return(this.max-t)*n}return(t-this.min)*n}getValueForDistanceFromCenter(t){if(vn(t)){return NaN}const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t<n.length){const e=n[t];return Yh(this.getContext(),t,e)}}getPointPosition(t,n,e=0){const i=this.getIndexAngle(t)-Qn+e;return{x:Math.cos(i)*n+this.xCenter,y:Math.sin(i)*n+this.yCenter,angle:i}}getPointPositionForValue(t,n){return this.getPointPosition(t,this.getDistanceFromCenterForValue(n))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:n,top:e,right:i,bottom:o}=this._pointLabelItems[t];return{left:n,top:e,right:i,bottom:o}}drawBackground(){const{backgroundColor:t,grid:{circular:n}}=this.options;if(t){const e=this.ctx;e.save();e.beginPath();Vh(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length);e.closePath();e.fillStyle=t;e.fill();e.restore()}}drawGrid(){const t=this.ctx;const n=this.options;const{angleLines:e,grid:i,border:o}=n;const s=this._pointLabels.length;let r,a,l;if(n.pointLabels.display){Hh(this,s)}if(i.display){this.ticks.forEach(((t,n)=>{if(n!==0||n===0&&this.min<0){a=this.getDistanceFromCenterForValue(t.value);const e=this.getContext(n);const r=i.setContext(e);const l=o.setContext(e);$h(this,r,a,s,l)}}))}if(e.display){t.save();for(r=s-1;r>=0;r--){const i=e.setContext(this.getPointLabelContext(r));const{color:o,lineWidth:s}=i;if(!s||!o){continue}t.lineWidth=s;t.strokeStyle=o;t.setLineDash(i.borderDash);t.lineDashOffset=i.borderDashOffset;a=this.getDistanceFromCenterForValue(n.reverse?this.min:this.max);l=this.getPointPosition(r,a);t.beginPath();t.moveTo(this.xCenter,this.yCenter);t.lineTo(l.x,l.y);t.stroke()}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx;const n=this.options;const e=n.ticks;if(!e.display){return}const i=this.getIndexAngle(0);let o,s;t.save();t.translate(this.xCenter,this.yCenter);t.rotate(i);t.textAlign="center";t.textBaseline="middle";this.ticks.forEach(((i,r)=>{if(r===0&&this.min>=0&&!n.reverse){return}const a=e.setContext(this.getContext(r));const l=Ai(a.font);o=this.getDistanceFromCenterForValue(this.ticks[r].value);if(a.showLabelBackdrop){t.font=l.string;s=t.measureText(i.label).width;t.fillStyle=a.backdropColor;const n=Ei(a.backdropPadding);t.fillRect(-s/2-n.left,-o-l.size/2-n.top,s+n.width,l.size+n.height)}ki(t,i.label,0,-o,l,{color:a.color,strokeColor:a.textStrokeColor,strokeWidth:a.textStrokeWidth})}));t.restore()}drawTitle(){}}const Kh={millisecond:{common:true,size:1,steps:1e3},second:{common:true,size:1e3,steps:60},minute:{common:true,size:6e4,steps:60},hour:{common:true,size:36e5,steps:24},day:{common:true,size:864e5,steps:30},week:{common:false,size:6048e5,steps:4},month:{common:true,size:2628e6,steps:12},quarter:{common:false,size:7884e6,steps:4},year:{common:true,size:3154e7}};const qh=Object.keys(Kh);function Zh(t,n){return t-n}function Jh(t,n){if(vn(n)){return null}const e=t._adapter;const{parser:i,round:o,isoWeekday:s}=t._parseOpts;let r=n;if(typeof i==="function"){r=i(r)}if(!zn(r)){r=typeof i==="string"?e.parse(r,i):e.parse(r)}if(r===null){return null}if(o){r=o==="week"&&(ae(s)||s===true)?e.startOf(r,"isoWeek",s):e.startOf(r,o)}return+r}function Qh(t,n,e,i){const o=qh.length;for(let s=qh.indexOf(t);s<o-1;++s){const t=Kh[qh[s]];const o=t.steps?t.steps:Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((e-n)/(o*t.size))<=i){return qh[s]}}return qh[o-1]}function Gh(t,n,e,i,o){for(let s=qh.length-1;s>=qh.indexOf(e);s--){const e=qh[s];if(Kh[e].common&&t._adapter.diff(o,i,e)>=n-1){return e}}return qh[e?qh.indexOf(e):0]}function tf(t){for(let n=qh.indexOf(t)+1,e=qh.length;n<e;++n){if(Kh[qh[n]].common){return qh[n]}}}function nf(t,n,e){if(!e){t[n]=true}else if(e.length){const{lo:i,hi:o}=ve(e,n);const s=e[i]>=n?e[i]:e[o];t[s]=true}}function ef(t,n,e,i){const o=t._adapter;const s=+o.startOf(n[0].value,i);const r=n[n.length-1].value;let a,l;for(a=s;a<=r;a=+o.add(a,1,i)){l=e[a];if(l>=0){n[l].major=true}}return n}function of(t,n,e){const i=[];const o={};const s=n.length;let r,a;for(r=0;r<s;++r){a=n[r];o[a]=r;i.push({value:a,major:false})}return s===0||!e?i:ef(t,i,o,e)}class sf extends ga{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:false,unit:false,round:false,isoWeekday:false,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:false,major:{enabled:false}}};constructor(t){super(t);this._cache={data:[],labels:[],all:[]};this._unit="day";this._majorUnit=undefined;this._offsets={};this._normalized=false;this._parseOpts=undefined}init(t,n={}){const e=t.time||(t.time={});const i=this._adapter=new Gs._date(t.adapters.date);i.init(n);Nn(e.displayFormats,i.formats());this._parseOpts={parser:e.parser,round:e.round,isoWeekday:e.isoWeekday};super.init(t);this._normalized=n.normalized}parse(t,n){if(t===undefined){return null}return Jh(this,t)}beforeLayout(){super.beforeLayout();this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options;const n=this._adapter;const e=t.time.unit||"day";let{min:i,max:o,minDefined:s,maxDefined:r}=this.getUserBounds();function a(t){if(!s&&!isNaN(t.min)){i=Math.min(i,t.min)}if(!r&&!isNaN(t.max)){o=Math.max(o,t.max)}}if(!s||!r){a(this._getLabelBounds());if(t.bounds!=="ticks"||t.ticks.source!=="labels"){a(this.getMinMax(false))}}i=zn(i)&&!isNaN(i)?i:+n.startOf(Date.now(),e);o=zn(o)&&!isNaN(o)?o:+n.endOf(Date.now(),e)+1;this.min=Math.min(i,o-1);this.max=Math.max(i+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY;let e=Number.NEGATIVE_INFINITY;if(t.length){n=t[0];e=t[t.length-1]}return{min:n,max:e}}buildTicks(){const t=this.options;const n=t.time;const e=t.ticks;const i=e.source==="labels"?this.getLabelTimestamps():this._generate();if(t.bounds==="ticks"&&i.length){this.min=this._userMin||i[0];this.max=this._userMax||i[i.length-1]}const o=this.min;const s=this.max;const r=ze(i,o,s);this._unit=n.unit||(e.autoSkip?Qh(n.minUnit,this.min,this.max,this._getLabelCapacity(o)):Gh(this,r.length,n.minUnit,this.min,this.max));this._majorUnit=!e.major.enabled||this._unit==="year"?undefined:tf(this._unit);this.initOffsets(i);if(t.reverse){r.reverse()}return of(this,r,this._majorUnit)}afterAutoSkip(){if(this.options.offsetAfterAutoskip){this.initOffsets(this.ticks.map((t=>+t.value)))}}initOffsets(t=[]){let n=0;let e=0;let i,o;if(this.options.offset&&t.length){i=this.getDecimalForValue(t[0]);if(t.length===1){n=1-i}else{n=(this.getDecimalForValue(t[1])-i)/2}o=this.getDecimalForValue(t[t.length-1]);if(t.length===1){e=o}else{e=(o-this.getDecimalForValue(t[t.length-2]))/2}}const s=t.length<3?.5:.25;n=me(n,0,s);e=me(e,0,s);this._offsets={start:n,end:e,factor:1/(n+1+e)}}_generate(){const t=this._adapter;const n=this.min;const e=this.max;const i=this.options;const o=i.time;const s=o.unit||Qh(o.minUnit,n,e,this._getLabelCapacity(n));const r=Cn(i.ticks.stepSize,1);const a=s==="week"?o.isoWeekday:false;const l=ae(a)||a===true;const c={};let h=n;let f,d;if(l){h=+t.startOf(h,"isoWeek",a)}h=+t.startOf(h,l?"day":s);if(t.diff(e,n,s)>1e5*r){throw new Error(n+" and "+e+" are too far apart with stepSize of "+r+" "+s)}const u=i.ticks.source==="data"&&this.getDataTimestamps();for(f=h,d=0;f<e;f=+t.add(f,r,s),d++){nf(c,f,u)}if(f===e||i.bounds==="ticks"||d===1){nf(c,f,u)}return Object.keys(c).sort(Zh).map((t=>+t))}getLabelForValue(t){const n=this._adapter;const e=this.options.time;if(e.tooltipFormat){return n.format(t,e.tooltipFormat)}return n.format(t,e.displayFormats.datetime)}format(t,n){const e=this.options;const i=e.time.displayFormats;const o=this._unit;const s=n||i[o];return this._adapter.format(t,s)}_tickFormatFunction(t,n,e,i){const o=this.options;const s=o.ticks.callback;if(s){return Pn(s,[t,n,e],this)}const r=o.time.displayFormats;const a=this._unit;const l=this._majorUnit;const c=a&&r[a];const h=l&&r[l];const f=e[n];const d=l&&h&&f&&f.major;return this._adapter.format(t,i||(d?h:c))}generateTickLabels(t){let n,e,i;for(n=0,e=t.length;n<e;++n){i=t[n];i.label=this._tickFormatFunction(i.value,n,t)}}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets;const e=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+e)*n.factor)}getValueForPixel(t){const n=this._offsets;const e=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+e*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks;const e=this.ctx.measureText(t).width;const i=he(this.isHorizontal()?n.maxRotation:n.minRotation);const o=Math.cos(i);const s=Math.sin(i);const r=this._resolveTickFontOptions(0).size;return{w:e*o+r*s,h:e*s+r*o}}_getLabelCapacity(t){const n=this.options.time;const e=n.displayFormats;const i=e[n.unit]||e.millisecond;const o=this._tickFormatFunction(t,0,of(this,[t],this._majorUnit),i);const s=this._getLabelSize(o);const r=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return r>0?r:1}getDataTimestamps(){let t=this._cache.data||[];let n,e;if(t.length){return t}const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length){return this._cache.data=i[0].controller.getAllParsedValues(this)}for(n=0,e=i.length;n<e;++n){t=t.concat(i[n].controller.getAllParsedValues(this))}return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,e;if(t.length){return t}const i=this.getLabels();for(n=0,e=i.length;n<e;++n){t.push(Jh(this,i[n]))}return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return je(t.sort(Zh))}}function rf(t,n,e){let i=0;let o=t.length-1;let s,r,a,l;if(e){if(n>=t[i].pos&&n<=t[o].pos){({lo:i,hi:o}=ke(t,"pos",n))}({pos:s,time:a}=t[i]);({pos:r,time:l}=t[o])}else{if(n>=t[i].time&&n<=t[o].time){({lo:i,hi:o}=ke(t,"time",n))}({time:s,pos:a}=t[i]);({time:r,pos:l}=t[o])}const c=r-s;return c?a+(l-a)*(n-s)/c:a}class af extends sf{static id="timeseries";static defaults=sf.defaults;constructor(t){super(t);this._table=[];this._minPos=undefined;this._tableRange=undefined}initOffsets(){const t=this._getTimestampsForTable();const n=this._table=this.buildLookupTable(t);this._minPos=rf(n,this.min);this._tableRange=rf(n,this.max)-this._minPos;super.initOffsets(t)}buildLookupTable(t){const{min:n,max:e}=this;const i=[];const o=[];let s,r,a,l,c;for(s=0,r=t.length;s<r;++s){l=t[s];if(l>=n&&l<=e){i.push(l)}}if(i.length<2){return[{time:n,pos:0},{time:e,pos:1}]}for(s=0,r=i.length;s<r;++s){c=i[s+1];a=i[s-1];l=i[s];if(Math.round((c+a)/2)!==l){o.push({time:l,pos:s/(r-1)})}}return o}_generate(){const t=this.min;const n=this.max;let e=super.getDataTimestamps();if(!e.includes(t)||!e.length){e.splice(0,0,t)}if(!e.includes(n)||e.length===1){e.push(n)}return e.sort(((t,n)=>t-n))}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length){return t}const n=this.getDataTimestamps();const e=this.getLabelTimestamps();if(n.length&&e.length){t=this.normalize(n.concat(e))}else{t=n.length?n:e}t=this._cache.all=t;return t}getDecimalForValue(t){return(rf(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets;const e=this.getDecimalForPixel(t)/n.factor-n.end;return rf(this._table,e*this._tableRange+this._minPos,true)}}var lf=Object.freeze({__proto__:null,CategoryScale:yh,LinearScale:Mh,LogarithmicScale:Oh,RadialLinearScale:Xh,TimeScale:sf,TimeSeriesScale:af});const cf=[Zs,Fl,ph,lf];ol.register(...cf);const hf='/*! tailwindcss v4.1.7 | MIT License | https://tailwindcss.com */\n@layer properties;\n@layer theme, base, components, utilities;\n@layer theme {\n :root, :host {\n --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",\n "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";\n --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",\n "Courier New", monospace;\n --color-red-500: oklch(63.7% 0.237 25.331);\n --color-green-600: oklch(62.7% 0.194 149.214);\n --color-blue-500: oklch(62.3% 0.214 259.815);\n --color-gray-50: oklch(98.5% 0.002 247.839);\n --color-gray-200: oklch(92.8% 0.006 264.531);\n --color-gray-300: oklch(87.2% 0.01 258.338);\n --color-gray-400: oklch(70.7% 0.022 261.325);\n --color-gray-500: oklch(55.1% 0.027 264.364);\n --color-gray-600: oklch(44.6% 0.03 256.802);\n --color-gray-700: oklch(37.3% 0.034 259.733);\n --color-gray-800: oklch(27.8% 0.033 256.848);\n --color-white: #fff;\n --spacing: 0.25rem;\n --container-2xl: 42rem;\n --container-3xl: 48rem;\n --text-sm: 0.875rem;\n --text-sm--line-height: calc(1.25 / 0.875);\n --text-lg: 1.125rem;\n --text-lg--line-height: calc(1.75 / 1.125);\n --text-xl: 1.25rem;\n --text-xl--line-height: calc(1.75 / 1.25);\n --text-2xl: 1.5rem;\n --text-2xl--line-height: calc(2 / 1.5);\n --text-3xl: 1.875rem;\n --text-3xl--line-height: calc(2.25 / 1.875);\n --font-weight-medium: 500;\n --font-weight-semibold: 600;\n --font-weight-bold: 700;\n --radius-lg: 0.5rem;\n --radius-xl: 0.75rem;\n --radius-2xl: 1rem;\n --radius-4xl: 2rem;\n --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);\n --animate-spin: spin 1s linear infinite;\n --default-transition-duration: 150ms;\n --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n --default-font-family: var(--font-sans);\n --default-mono-font-family: var(--font-mono);\n }\n}\n@layer base {\n *, ::after, ::before, ::backdrop, ::file-selector-button {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: 0 solid;\n }\n html, :host {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n tab-size: 4;\n font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");\n font-feature-settings: var(--default-font-feature-settings, normal);\n font-variation-settings: var(--default-font-variation-settings, normal);\n -webkit-tap-highlight-color: transparent;\n }\n hr {\n height: 0;\n color: inherit;\n border-top-width: 1px;\n }\n abbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n h1, h2, h3, h4, h5, h6 {\n font-size: inherit;\n font-weight: inherit;\n }\n a {\n color: inherit;\n -webkit-text-decoration: inherit;\n text-decoration: inherit;\n }\n b, strong {\n font-weight: bolder;\n }\n code, kbd, samp, pre {\n font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);\n font-feature-settings: var(--default-mono-font-feature-settings, normal);\n font-variation-settings: var(--default-mono-font-variation-settings, normal);\n font-size: 1em;\n }\n small {\n font-size: 80%;\n }\n sub, sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n sub {\n bottom: -0.25em;\n }\n sup {\n top: -0.5em;\n }\n table {\n text-indent: 0;\n border-color: inherit;\n border-collapse: collapse;\n }\n :-moz-focusring {\n outline: auto;\n }\n progress {\n vertical-align: baseline;\n }\n summary {\n display: list-item;\n }\n ol, ul, menu {\n list-style: none;\n }\n img, svg, video, canvas, audio, iframe, embed, object {\n display: block;\n vertical-align: middle;\n }\n img, video {\n max-width: 100%;\n height: auto;\n }\n button, input, select, optgroup, textarea, ::file-selector-button {\n font: inherit;\n font-feature-settings: inherit;\n font-variation-settings: inherit;\n letter-spacing: inherit;\n color: inherit;\n border-radius: 0;\n background-color: transparent;\n opacity: 1;\n }\n :where(select:is([multiple], [size])) optgroup {\n font-weight: bolder;\n }\n :where(select:is([multiple], [size])) optgroup option {\n padding-inline-start: 20px;\n }\n ::file-selector-button {\n margin-inline-end: 4px;\n }\n ::placeholder {\n opacity: 1;\n }\n @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {\n ::placeholder {\n color: currentcolor;\n @supports (color: color-mix(in lab, red, red)) {\n color: color-mix(in oklab, currentcolor 50%, transparent);\n }\n }\n }\n textarea {\n resize: vertical;\n }\n ::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n ::-webkit-date-and-time-value {\n min-height: 1lh;\n text-align: inherit;\n }\n ::-webkit-datetime-edit {\n display: inline-flex;\n }\n ::-webkit-datetime-edit-fields-wrapper {\n padding: 0;\n }\n ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {\n padding-block: 0;\n }\n :-moz-ui-invalid {\n box-shadow: none;\n }\n button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button {\n appearance: button;\n }\n ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {\n height: auto;\n }\n [hidden]:where(:not([hidden="until-found"])) {\n display: none !important;\n }\n}\n@layer utilities {\n .pointer-events-none {\n pointer-events: none;\n }\n .absolute {\n position: absolute;\n }\n .relative {\n position: relative;\n }\n .top-0 {\n top: calc(var(--spacing) * 0);\n }\n .top-1 {\n top: calc(var(--spacing) * 1);\n }\n .top-1\\/2 {\n top: calc(1/2 * 100%);\n }\n .bottom-full {\n bottom: 100%;\n }\n .left-0 {\n left: calc(var(--spacing) * 0);\n }\n .left-1 {\n left: calc(var(--spacing) * 1);\n }\n .left-1\\/2 {\n left: calc(1/2 * 100%);\n }\n .left-3 {\n left: calc(var(--spacing) * 3);\n }\n .z-1 {\n z-index: 1;\n }\n .z-10 {\n z-index: 10;\n }\n .z-20 {\n z-index: 20;\n }\n .m-auto {\n margin: auto;\n }\n .mt-1 {\n margin-top: calc(var(--spacing) * 1);\n }\n .mt-4 {\n margin-top: calc(var(--spacing) * 4);\n }\n .mb-1 {\n margin-bottom: calc(var(--spacing) * 1);\n }\n .mb-2 {\n margin-bottom: calc(var(--spacing) * 2);\n }\n .mb-4 {\n margin-bottom: calc(var(--spacing) * 4);\n }\n .block {\n display: block;\n }\n .flex {\n display: flex;\n }\n .grid {\n display: grid;\n }\n .table {\n display: table;\n }\n .h-5 {\n height: calc(var(--spacing) * 5);\n }\n .h-16 {\n height: calc(var(--spacing) * 16);\n }\n .h-48 {\n height: calc(var(--spacing) * 48);\n }\n .h-full {\n height: 100%;\n }\n .w-5 {\n width: calc(var(--spacing) * 5);\n }\n .w-16 {\n width: calc(var(--spacing) * 16);\n }\n .w-52 {\n width: calc(var(--spacing) * 52);\n }\n .w-64 {\n width: calc(var(--spacing) * 64);\n }\n .w-full {\n width: 100%;\n }\n .max-w-2xl {\n max-width: var(--container-2xl);\n }\n .flex-1 {\n flex: 1;\n }\n .border-collapse {\n border-collapse: collapse;\n }\n .-translate-x-1 {\n --tw-translate-x: calc(var(--spacing) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-x-1\\/2 {\n --tw-translate-x: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-y-1 {\n --tw-translate-y: calc(var(--spacing) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-y-1\\/2 {\n --tw-translate-y: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .transform {\n transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);\n }\n .animate-spin {\n animation: var(--animate-spin);\n }\n .cursor-help {\n cursor: help;\n }\n .resize {\n resize: both;\n }\n .grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n .flex-col {\n flex-direction: column;\n }\n .flex-row {\n flex-direction: row;\n }\n .items-center {\n align-items: center;\n }\n .items-start {\n align-items: flex-start;\n }\n .justify-between {\n justify-content: space-between;\n }\n .justify-center {\n justify-content: center;\n }\n .justify-start {\n justify-content: flex-start;\n }\n .gap-1 {\n gap: calc(var(--spacing) * 1);\n }\n .gap-2 {\n gap: calc(var(--spacing) * 2);\n }\n .gap-4 {\n gap: calc(var(--spacing) * 4);\n }\n .space-y-4 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .space-y-6 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .rounded-4xl {\n border-radius: var(--radius-4xl);\n }\n .rounded-full {\n border-radius: calc(infinity * 1px);\n }\n .rounded-lg {\n border-radius: var(--radius-lg);\n }\n .border {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n .border-t {\n border-top-style: var(--tw-border-style);\n border-top-width: 1px;\n }\n .border-t-2 {\n border-top-style: var(--tw-border-style);\n border-top-width: 2px;\n }\n .border-b-2 {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 2px;\n }\n .border-\\[\\#271200\\] {\n border-color: #271200;\n }\n .border-gray-200 {\n border-color: var(--color-gray-200);\n }\n .border-gray-300 {\n border-color: var(--color-gray-300);\n }\n .border-red-500 {\n border-color: var(--color-red-500);\n }\n .bg-\\[\\#271200\\] {\n background-color: #271200;\n }\n .bg-\\[\\#f3ebda\\] {\n background-color: #f3ebda;\n }\n .bg-gray-800 {\n background-color: var(--color-gray-800);\n }\n .bg-white {\n background-color: var(--color-white);\n }\n .p-2 {\n padding: calc(var(--spacing) * 2);\n }\n .p-3 {\n padding: calc(var(--spacing) * 3);\n }\n .p-4 {\n padding: calc(var(--spacing) * 4);\n }\n .p-6 {\n padding: calc(var(--spacing) * 6);\n }\n .px-4 {\n padding-inline: calc(var(--spacing) * 4);\n }\n .py-2 {\n padding-block: calc(var(--spacing) * 2);\n }\n .pt-4 {\n padding-top: calc(var(--spacing) * 4);\n }\n .pt-7 {\n padding-top: calc(var(--spacing) * 7);\n }\n .pr-4 {\n padding-right: calc(var(--spacing) * 4);\n }\n .pb-3 {\n padding-bottom: calc(var(--spacing) * 3);\n }\n .pl-10 {\n padding-left: calc(var(--spacing) * 10);\n }\n .text-center {\n text-align: center;\n }\n .text-2xl {\n font-size: var(--text-2xl);\n line-height: var(--tw-leading, var(--text-2xl--line-height));\n }\n .text-lg {\n font-size: var(--text-lg);\n line-height: var(--tw-leading, var(--text-lg--line-height));\n }\n .text-sm {\n font-size: var(--text-sm);\n line-height: var(--tw-leading, var(--text-sm--line-height));\n }\n .text-xl {\n font-size: var(--text-xl);\n line-height: var(--tw-leading, var(--text-xl--line-height));\n }\n .font-bold {\n --tw-font-weight: var(--font-weight-bold);\n font-weight: var(--font-weight-bold);\n }\n .font-medium {\n --tw-font-weight: var(--font-weight-medium);\n font-weight: var(--font-weight-medium);\n }\n .font-semibold {\n --tw-font-weight: var(--font-weight-semibold);\n font-weight: var(--font-weight-semibold);\n }\n .text-\\[\\#271200\\] {\n color: #271200;\n }\n .text-gray-400 {\n color: var(--color-gray-400);\n }\n .text-gray-500 {\n color: var(--color-gray-500);\n }\n .text-gray-600 {\n color: var(--color-gray-600);\n }\n .text-green-600 {\n color: var(--color-green-600);\n }\n .text-red-500 {\n color: var(--color-red-500);\n }\n .text-white {\n color: var(--color-white);\n }\n .underline {\n text-decoration-line: underline;\n }\n .opacity-0 {\n opacity: 0%;\n }\n .shadow {\n --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .outline {\n outline-style: var(--tw-outline-style);\n outline-width: 1px;\n }\n .transition-colors {\n transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-opacity {\n transition-property: opacity;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .duration-200 {\n --tw-duration: 200ms;\n transition-duration: 200ms;\n }\n .group-hover\\:opacity-100 {\n &:is(:where(.group):hover *) {\n @media (hover: hover) {\n opacity: 100%;\n }\n }\n }\n .hover\\:bg-\\[\\#964500\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #964500;\n }\n }\n }\n .focus\\:border-transparent {\n &:focus {\n border-color: transparent;\n }\n }\n .focus\\:ring-2 {\n &:focus {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n }\n .focus\\:ring-\\[\\#964500\\] {\n &:focus {\n --tw-ring-color: #964500;\n }\n }\n .focus\\:ring-blue-500 {\n &:focus {\n --tw-ring-color: var(--color-blue-500);\n }\n }\n .focus\\:outline-none {\n &:focus {\n --tw-outline-style: none;\n outline-style: none;\n }\n }\n .lg\\:gap-4 {\n @media (width >= 64rem) {\n gap: calc(var(--spacing) * 4);\n }\n }\n}\n@property --tw-translate-x {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-y {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-z {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-rotate-x {\n syntax: "*";\n inherits: false;\n}\n@property --tw-rotate-y {\n syntax: "*";\n inherits: false;\n}\n@property --tw-rotate-z {\n syntax: "*";\n inherits: false;\n}\n@property --tw-skew-x {\n syntax: "*";\n inherits: false;\n}\n@property --tw-skew-y {\n syntax: "*";\n inherits: false;\n}\n@property --tw-space-y-reverse {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-border-style {\n syntax: "*";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-font-weight {\n syntax: "*";\n inherits: false;\n}\n@property --tw-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-shadow-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-shadow-alpha {\n syntax: "<percentage>";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-inset-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-shadow-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-inset-shadow-alpha {\n syntax: "<percentage>";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-ring-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-ring-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-ring-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-inset-ring-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-ring-inset {\n syntax: "*";\n inherits: false;\n}\n@property --tw-ring-offset-width {\n syntax: "<length>";\n inherits: false;\n initial-value: 0px;\n}\n@property --tw-ring-offset-color {\n syntax: "*";\n inherits: false;\n initial-value: #fff;\n}\n@property --tw-ring-offset-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-outline-style {\n syntax: "*";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-duration {\n syntax: "*";\n inherits: false;\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n@layer properties {\n @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {\n *, ::before, ::after, ::backdrop {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-translate-z: 0;\n --tw-rotate-x: initial;\n --tw-rotate-y: initial;\n --tw-rotate-z: initial;\n --tw-skew-x: initial;\n --tw-skew-y: initial;\n --tw-space-y-reverse: 0;\n --tw-border-style: solid;\n --tw-font-weight: initial;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-color: initial;\n --tw-shadow-alpha: 100%;\n --tw-inset-shadow: 0 0 #0000;\n --tw-inset-shadow-color: initial;\n --tw-inset-shadow-alpha: 100%;\n --tw-ring-color: initial;\n --tw-ring-shadow: 0 0 #0000;\n --tw-inset-ring-color: initial;\n --tw-inset-ring-shadow: 0 0 #0000;\n --tw-ring-inset: initial;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-outline-style: solid;\n --tw-duration: initial;\n }\n }\n}\n';const ff=[0,0,0,0,0,0,0,.1,.2,.4,.8,1,1,1,1,.7,.5,.3,.16,.02,0,0,0,0];const df={mostly_at_home:[.1,.1,.1,.1,.1,.15,.23,.26,.16,.16,.15,.19,.23,.24,.35,.28,.275,.8,.78,.74,.75,.73,.26,.1],mostly_away:[.1,.1,.1,.1,.1,.15,.29,.32,.25,.15,.12,.14,.15,.12,.16,.21,.285,1,.81,.77,.79,.73,.26,.1]};const uf=class{constructor(n){t(this,n)}systemConfigs={};language="en";roofPolygons={};obstructionPolygons={};householdConsumption=3500;consumptionProfile="mostly_at_home";electricityPrice=.3;compensationRate=.07;autonomy=0;costSavings=0;numberOfPanels=5;panelPeakPower=.4;name="";email="";nameError="";emailError="";chart=null;chartRef=null;updateSystemConfigs(){if(Object.keys(this.systemConfigs).length===0){this.numberOfPanels=0;return}this.numberOfPanels=Object.keys(this.systemConfigs).reduce(((t,n)=>t+this.systemConfigs[n].positionedPanels.length),0);this.panelPeakPower=Object.entries(this.systemConfigs)[0][1].positionedPanels[0].panel.kWattPeak;this.recalculate();this.updateChart()}recalculate(){const t=df[this.consumptionProfile];const n=t.reduce(((t,n)=>t+n),0);const e=this.numberOfPanels*this.panelPeakPower;const i=ff.map((t=>t*e));let o=0;for(let e=0;e<t.length;e++){t[e]=t[e]*this.householdConsumption/n/365;if(t[e]<=i[e]){o+=t[e]}else if(t[e]>i[e]){o+=i[e]}}const s=i.map(((n,e)=>t[e]-n));const r=-s.filter((t=>t<0)).reduce(((t,n)=>t+n),0);this.costSavings=r*this.compensationRate*365+o*365*this.electricityPrice;this.autonomy=o/(this.householdConsumption/365)*100}updateChart(){if(!this.chartRef)return;const t=this.chartRef.getContext("2d");if(!t)return;if(this.chart){this.chart.destroy()}const n=Array.from({length:24},((t,n)=>`${n}:00`));const e=df[this.consumptionProfile];const i=e.reduce(((t,n)=>t+n),0);const o=this.numberOfPanels*this.panelPeakPower;const s=ff.map((t=>t*o));for(let t=0;t<e.length;t++){e[t]=e[t]*this.householdConsumption/i/365}let r=[{label:"Energy Consumption",data:e,borderColor:"#964500",backgroundColor:"rgba(150, 69, 0, 0.1)",fill:true,tension:.4},{label:"Energy Production",data:s,borderColor:"#000000",backgroundColor:"rgba(0, 0, 0, 0.1)",fill:true}];this.chart=new ol(t,{type:"line",data:{labels:n,datasets:r},options:{responsive:true,plugins:{title:{display:true,text:"Daily Consumption Profile"}},scales:{y:{beginAtZero:true,title:{display:true,text:"Relative Consumption"}},x:{title:{display:true,text:"Hour of Day"}}}}})}componentWillLoad(){this.updateSystemConfigs()}validateForm(){let t=true;const n=gt(this.language);if(!this.name.trim()){this.nameError=n.solarSystemForm.nameError;t=false}else{this.nameError=""}const e=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;if(!this.email.trim()){this.emailError=n.solarSystemForm.emailError;t=false}else if(!e.test(this.email)){this.emailError=n.solarSystemForm.validEmailError;t=false}else{this.emailError=""}return t}handleRequestOffer(){if(!this.validateForm()){return}console.log("Requesting offer for: ",{name:this.name,email:this.email,systemConfig:this.systemConfigs,consumption:this.householdConsumption,autonomy:this.autonomy,costSavings:this.costSavings,roofPolygons:this.roofPolygons,obstructionPolygons:this.obstructionPolygons})}render(){const t=gt(this.language);return n("div",{key:"85f0ec10f34015604a1acefcef02299b50466b6b",class:"flex flex-col justify-center items-center w-full h-full gap-4 p-4",style:{display:Object.keys(this.systemConfigs).length===0?"none":"flex"}},n("h1",{key:"bf5f2adee5fb32b7a4b6ed215164799f834cb19d",class:"text-2xl font-bold text-[#271200] mb-4"},t.solarSystemForm.title),n("div",{key:"be9b94e078403ad753219dede42a9150f59fa9c2",class:"w-full max-w-2xl bg-[#f3ebda] rounded-4xl p-6 space-y-6"},n("div",{key:"aee08edb3ae4839d0d563a16c1dedddc20cda0ca",class:"space-y-4"},n("h2",{key:"a26a8f0a04be453a66e93d682fe32f886793c863",class:"text-lg font-semibold text-[#271200]"},t.solarSystemForm.systemInformation),n("div",{key:"2b260f44574aecf9068c4dddff21f1dfcea1869f",class:"grid grid-cols-2 gap-4"},n("div",{key:"ba75503bcca9fbe04c99c0feac99eb7c7f064455"},n("label",{key:"5ffaad1ceab5def87c9208f236b45597f539d574",class:"block text-sm font-medium text-gray-600 mb-1"},t.solarSystemForm.numberOfPanels),n("input",{key:"e984ed36d139ba29ea648122686cd71e9a01511f",type:"number",class:"w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent",value:this.numberOfPanels,readOnly:true})),n("div",{key:"6d60596af443dceaccbf71738b6e161678452053"},n("label",{key:"593fb87663cab979e4409a15199d28cd716bfa33",class:"block text-sm font-medium text-gray-600 mb-1"},t.solarSystemForm.panelPeakPower),n("input",{key:"71436a23b315fd713988d8d23f0056a5b8a378ac",type:"number",class:"w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent",value:this.panelPeakPower,readonly:true}))),n("div",{key:"d8ea7e83738283446eef7c166d05692b9cff8f30",class:"bg-white rounded-4xl p-4"},n("div",{key:"3ef0039db7abdc783a9fe2d8a5c6a5044d76b383",class:"flex items-center justify-between"},n("span",{key:"8532b97fb829f69b338e5fba682cc5f5f68b8e2f",class:"text-gray-600"},t.solarSystemForm.totalSystemPeakPower),n("span",{key:"fa3835b2d2670cbd2fa11f57af60deab2cdc7142",class:"text-xl font-bold text-[#271200]"},(D.kWattPeak*this.numberOfPanels).toFixed(1)," kW")))),n("div",{key:"357c15507bbb1374c4d386360b3ba313fe12c71e",class:"space-y-4"},n("h2",{key:"d87a246f2765a91490067d8c0449741e75bf3e71",class:"text-lg font-semibold text-[#271200]"},t.solarSystemForm.householdConsumptionTitle),n("div",{key:"0ba31368f5fbb4909f2858a5b325976aa6fa103f",class:"grid grid-cols-2 gap-4"},n("div",{key:"051bd4afd32d202664e13df6dfaf92d6f2c881ea"},n("label",{key:"56ed4f26cdc9d0c0001f0a0a602fcdd9c4e514f2",class:"block text-sm font-medium text-gray-600 mb-1"},t.solarSystemForm.annualConsumption),n("input",{key:"fe3a1e54b09104fa8829c3d8eb1337a8665aea55",type:"number",class:"w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent",value:this.householdConsumption,onInput:t=>{this.householdConsumption=parseInt(t.target.value);this.recalculate();this.updateChart()}})),n("div",{key:"c33aaab13fa367d60842d9b378a8045aeee946cc"},n("label",{key:"3bb5d0271fad3ac4d5bf45a76d62a1d31efbec06",class:"block text-sm font-medium text-gray-600 mb-1"},t.solarSystemForm.consumptionProfileTitle),n("select",{key:"061a6746a1fde4aa95d39c48c772de24ca80dda6",class:"w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent",onChange:t=>{this.consumptionProfile=t.target.value;this.recalculate();this.updateChart()}},n("option",{key:"c763ff9d4bdf3c60c5067e105d00936bf32ffbd5",value:"mostly_at_home",selected:this.consumptionProfile==="mostly_at_home"},t.solarSystemForm.consumptionProfiles.mostlyAtHome),n("option",{key:"df7e8cf24b1680575fcceab59a1ba7c79da39009",value:"mostly_away",selected:this.consumptionProfile==="mostly_away"},t.solarSystemForm.consumptionProfiles.mostlyAway)))),n("div",{key:"61df552d9e00d3acd2419071187703a8e808abd5",class:"mt-4 h-48"},n("canvas",{key:"fad304a8b3b6390c9ccd79dfa37cec5ec0b2bda0",ref:t=>this.chartRef=t}))),n("div",{key:"d7d8e5c36d883d5dcdc51cd9a2ec44092e5cb26b",class:"space-y-4"},n("h2",{key:"e18131dfdc84c8e0105a9ca4640d196c006e3095",class:"text-lg font-semibold text-[#271200]"},t.solarSystemForm.electricityCostsTitle),n("div",{key:"1cd7f7d3d59149e79b30b9832ef7a42e2082e00d",class:"grid grid-cols-2 gap-4"},n("div",{key:"53bead211d686cf6acc883474baa7d9135365afc"},n("label",{key:"c04f6d3880e9590f9d51649df7bd124073746e5b",class:"block text-sm font-medium text-gray-600 mb-1"},t.solarSystemForm.electricityPrice),n("input",{key:"68e226adfe557355b89745efc3aeee88528b6710",type:"number",step:"0.01",class:"w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent",value:this.electricityPrice,onInput:t=>{this.electricityPrice=parseFloat(t.target.value);this.recalculate();this.updateChart()}})),n("div",{key:"3264cda47cb1f7f90259fc13116601ae9e636238"},n("label",{key:"1580f49c9f24ec02fcfe5ec174e5c8087c040f4e",class:"block text-sm font-medium text-gray-600 mb-1"},t.solarSystemForm.compensationRate),n("input",{key:"f87e99c2b852da74267351cb630453f2d7cadd6f",type:"number",step:"0.01",class:"w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent",value:this.compensationRate,onInput:t=>{this.compensationRate=parseFloat(t.target.value);this.recalculate();this.updateChart()}})))),n("div",{key:"cccd456f9ec53c92069d10a8e6d784846bf5f781",class:"space-y-4 pt-4 border-t border-gray-200"},n("h2",{key:"3c78d0c1acc807cc98b9d9dbc3da4a4fb6cc2a8e",class:"text-lg font-semibold text-[#271200]"},t.solarSystemForm.resultsTitle),n("div",{key:"91312264cd67e83a97de15523cbc6d9f82299ed4",class:"bg-white rounded-4xl p-4"},n("div",{key:"1e85cd1784830413d0b1c004b6d8c3351190b8f3",class:"flex items-center justify-between"},n("span",{key:"014465ba43e1c65df0ec912c5a8f7852e8606752",class:"text-gray-600"},t.solarSystemForm.autonomy),n("span",{key:"16f0e0cec4193c35413790f24f60a96ec698271b",class:"text-xl font-bold text-[#271200]"},this.autonomy.toFixed(1),"%")),n("div",{key:"03a768dc16689bdefe3da494e3647703f2efd975",class:"flex items-center justify-between mt-4"},n("div",{key:"903e120975d517ddf5969f89b6abab03d25f2f0b",class:"flex items-center gap-2"},n("span",{key:"6c1de0b96b625c0fc7bc5b376156e0e8b33c2f1b",class:"text-gray-600"},t.solarSystemForm.costSavings),n("div",{key:"c70b1d80322d64ccf07b9f40ca300ed4aba9da2f",class:"relative group"},n("svg",{key:"7f8567254e065d1dd8b6da090b12305db89bb83c",xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-gray-400 cursor-help",viewBox:"0 0 20 20",fill:"currentColor"},n("path",{key:"d374484901dcffbc35e1ff5c1d1039526ea65978","fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-3a1 1 0 00-.867.5 1 1 0 11-1.731-1A3 3 0 0113 8a3.001 3.001 0 01-2 2.83V11a1 1 0 11-2 0v-1a1 1 0 011-1 1 1 0 100-2zm0 8a1 1 0 100-2 1 1 0 000 2z","clip-rule":"evenodd"})),n("div",{key:"0f59e908dfa91226ee1648d6d4739f9e9bc54ca5",class:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 w-64 p-2 bg-gray-800 text-white text-sm rounded-lg opacity-0 group-hover:opacity-100 transition-opacity duration-200 pointer-events-none"},t.solarSystemForm.savingsDisclaimer))),n("span",{key:"bf1d7bd08a93274615b88d35e2bd359187ca085b",class:"text-xl font-bold text-green-600"},this.costSavings.toFixed(2),"€/",t.solarSystemForm.year)))),n("div",{key:"ca60e696392cb3ef2cb66603489997869e0f51cb",class:"space-y-4 pt-4 border-t border-gray-200"},n("h2",{key:"4f44b5774a022e8925738abc25894fdf8b6fc8fa",class:"text-lg font-semibold text-[#271200]"},t.solarSystemForm.requestOffer),n("div",{key:"fe32a47f43e742d81424980fd41631d328358695",class:"grid grid-cols-2 gap-4"},n("div",{key:"a2ce707a5f4b4568eabb02a08022d8f1c74137e2"},n("label",{key:"b38ec2029a9d9cfe29c4e2d415a03b046acba319",class:"block text-sm font-medium text-gray-600 mb-1"},t.solarSystemForm.name),n("input",{key:"8f94467b24e2a11f898f258c6d4aa9ee0de34dc1",type:"text",class:`w-full px-4 py-2 rounded-4xl border ${this.nameError?"border-red-500":"border-gray-300"} focus:ring-2 focus:ring-[#964500] focus:border-transparent`,value:this.name,onInput:t=>{this.name=t.target.value;this.validateForm()},placeholder:"Your name"}),this.nameError&&n("p",{key:"e539561f556cf7914a3d888d20450e2d09b72fa2",class:"text-red-500 text-sm mt-1"},this.nameError)),n("div",{key:"6ab0ef38a62847304aa131d41902d4eeeebd2fc9"},n("label",{key:"336f9d727f4c556397bef6a080d969015d730036",class:"block text-sm font-medium text-gray-600 mb-1"},t.solarSystemForm.email),n("input",{key:"783fe2c3552a444e300a3d36f784aa13af9cfc79",type:"email",class:`w-full px-4 py-2 rounded-4xl border ${this.emailError?"border-red-500":"border-gray-300"} focus:ring-2 focus:ring-[#964500] focus:border-transparent`,value:this.email,onInput:t=>{this.email=t.target.value;this.validateForm()},placeholder:"your.email@example.com"}),this.emailError&&n("p",{key:"5e67155bb99c051e1a1a6d5957826ef328daa362",class:"text-red-500 text-sm mt-1"},this.emailError))),n("div",{key:"d4a4ded8adfab4ef284f888556e9ad4847f0de2e",class:"flex justify-center"},n("button",{key:"b4eb433e4ce1e0c9128fc7c3b89670091e137c8b",onClick:()=>this.handleRequestOffer(),disabled:!this.name.trim()||!this.email.trim()||!!this.nameError||!!this.emailError,class:"px-4 py-2 bg-[#271200] rounded-4xl hover:bg-[#964500] transition-colors duration-200",style:{color:"white"}},t.solarSystemForm.requestOfferButton)))))}static get watchers(){return{systemConfigs:["updateSystemConfigs"]}}};uf.style=hf;export{l as eraser_icon,h as house_icon,d as icon_selector,mt as map_draw,xt as move_icon,kt as octagon_minus_icon,zt as search_icon,Ct as solar_expert,uf as solar_system_form};
20
+ //# sourceMappingURL=p-7512b392.entry.js.map