diff --git a/web/build/_app/env.js b/web/build/_app/env.js deleted file mode 100644 index f5427da..0000000 --- a/web/build/_app/env.js +++ /dev/null @@ -1 +0,0 @@ -export const env={} \ No newline at end of file diff --git a/web/build/_app/immutable/assets/0.D9W-GzMQ.css b/web/build/_app/immutable/assets/0.D9W-GzMQ.css deleted file mode 100644 index 2368707..0000000 --- a/web/build/_app/immutable/assets/0.D9W-GzMQ.css +++ /dev/null @@ -1 +0,0 @@ -*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,system-ui,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}html{font-family:Inter,system-ui,sans-serif}*{box-sizing:border-box}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.top-0{top:0}.z-50{z-index:50}.col-span-2{grid-column:span 2 / span 2}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.ml-auto{margin-left:auto}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-24{height:6rem}.h-28{height:7rem}.h-3{height:.75rem}.h-32{height:8rem}.h-4{height:1rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-7{height:1.75rem}.h-9{height:2.25rem}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-\[80vh\]{max-height:80vh}.max-h-\[90vh\]{max-height:90vh}.min-h-\[72px\]{min-height:72px}.min-h-screen{min-height:100vh}.w-14{width:3.5rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-28{width:7rem}.w-3{width:.75rem}.w-36{width:9rem}.w-4{width:1rem}.w-40{width:10rem}.w-44{width:11rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-60{width:15rem}.w-7{width:1.75rem}.w-9{width:2.25rem}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-48{min-width:12rem}.min-w-\[180px\]{min-width:180px}.max-w-2xl{max-width:42rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-50>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(249 250 251 / var(--tw-divide-opacity, 1))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-amber-300{--tw-border-opacity: 1;border-color:rgb(252 211 77 / var(--tw-border-opacity, 1))}.border-blue-100{--tw-border-opacity: 1;border-color:rgb(219 234 254 / var(--tw-border-opacity, 1))}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.border-blue-400{--tw-border-opacity: 1;border-color:rgb(96 165 250 / var(--tw-border-opacity, 1))}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.border-gray-50{--tw-border-opacity: 1;border-color:rgb(249 250 251 / var(--tw-border-opacity, 1))}.border-red-300{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity, 1))}.border-t-transparent{border-top-color:transparent}.bg-amber-100{--tw-bg-opacity: 1;background-color:rgb(254 243 199 / var(--tw-bg-opacity, 1))}.bg-amber-200{--tw-bg-opacity: 1;background-color:rgb(253 230 138 / var(--tw-bg-opacity, 1))}.bg-amber-50{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.bg-amber-50\/30{background-color:#fffbeb4d}.bg-amber-50\/40{background-color:#fffbeb66}.bg-amber-50\/50{background-color:#fffbeb80}.bg-amber-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity, 1))}.bg-black\/40{background-color:#0006}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-200{--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity, 1))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-gray-50\/50{background-color:#f9fafb80}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity, 1))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.bg-green-400{--tw-bg-opacity: 1;background-color:rgb(74 222 128 / var(--tw-bg-opacity, 1))}.bg-green-50{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity, 1))}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(255 237 213 / var(--tw-bg-opacity, 1))}.bg-orange-200{--tw-bg-opacity: 1;background-color:rgb(254 215 170 / var(--tw-bg-opacity, 1))}.bg-orange-50{--tw-bg-opacity: 1;background-color:rgb(255 247 237 / var(--tw-bg-opacity, 1))}.bg-purple-50\/40{background-color:#faf5ff66}.bg-purple-600{--tw-bg-opacity: 1;background-color:rgb(147 51 234 / var(--tw-bg-opacity, 1))}.bg-red-400{--tw-bg-opacity: 1;background-color:rgb(248 113 113 / var(--tw-bg-opacity, 1))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.bg-red-50\/40{background-color:#fef2f266}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}.p-1\.5{padding:.375rem}.p-10{padding:2.5rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-16{padding-top:4rem;padding-bottom:4rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pb-1\.5{padding-bottom:.375rem}.pb-2{padding-bottom:.5rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tracking-wider{letter-spacing:.05em}.text-amber-600{--tw-text-opacity: 1;color:rgb(217 119 6 / var(--tw-text-opacity, 1))}.text-amber-700{--tw-text-opacity: 1;color:rgb(180 83 9 / var(--tw-text-opacity, 1))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}.text-orange-500{--tw-text-opacity: 1;color:rgb(249 115 22 / var(--tw-text-opacity, 1))}.text-orange-700{--tw-text-opacity: 1;color:rgb(194 65 12 / var(--tw-text-opacity, 1))}.text-orange-800{--tw-text-opacity: 1;color:rgb(154 52 18 / var(--tw-text-opacity, 1))}.text-purple-600{--tw-text-opacity: 1;color:rgb(147 51 234 / var(--tw-text-opacity, 1))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity, 1))}.accent-blue-600{accent-color:#2563eb}.opacity-30{opacity:.3}.opacity-40{opacity:.4}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.ring-amber-400{--tw-ring-opacity: 1;--tw-ring-color: rgb(251 191 36 / var(--tw-ring-opacity, 1))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.last\:border-0:last-child{border-width:0px}.hover\:border-blue-300:hover{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1))}.hover\:border-gray-200:hover{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.hover\:border-gray-300:hover{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.hover\:bg-amber-50:hover{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.hover\:bg-amber-600:hover{--tw-bg-opacity: 1;background-color:rgb(217 119 6 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-50:hover{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\:bg-green-600:hover{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity, 1))}.hover\:bg-green-700:hover{--tw-bg-opacity: 1;background-color:rgb(21 128 61 / var(--tw-bg-opacity, 1))}.hover\:bg-purple-50:hover{--tw-bg-opacity: 1;background-color:rgb(250 245 255 / var(--tw-bg-opacity, 1))}.hover\:bg-purple-700:hover{--tw-bg-opacity: 1;background-color:rgb(126 34 206 / var(--tw-bg-opacity, 1))}.hover\:bg-red-50:hover{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.hover\:bg-yellow-100:hover{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.hover\:text-blue-600:hover{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.hover\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.hover\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.hover\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.hover\:text-purple-600:hover{--tw-text-opacity: 1;color:rgb(147 51 234 / var(--tw-text-opacity, 1))}.hover\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.hover\:text-red-600:hover{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.focus\:border-blue-400:focus{--tw-border-opacity: 1;border-color:rgb(96 165 250 / var(--tw-border-opacity, 1))}.focus\:bg-white:focus{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1))}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}@media (min-width: 768px){.md\:flex{display:flex}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@media (min-width: 1024px){.lg\:col-span-2{grid-column:span 2 / span 2}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (prefers-color-scheme: dark){.dark\:divide-gray-800>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(31 41 55 / var(--tw-divide-opacity, 1))}.dark\:border-blue-800{--tw-border-opacity: 1;border-color:rgb(30 64 175 / var(--tw-border-opacity, 1))}.dark\:border-blue-900{--tw-border-opacity: 1;border-color:rgb(30 58 138 / var(--tw-border-opacity, 1))}.dark\:border-gray-700{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity, 1))}.dark\:border-gray-800{--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity, 1))}.dark\:border-gray-800\/50{border-color:#1f293780}.dark\:bg-amber-800{--tw-bg-opacity: 1;background-color:rgb(146 64 14 / var(--tw-bg-opacity, 1))}.dark\:bg-amber-950{--tw-bg-opacity: 1;background-color:rgb(69 26 3 / var(--tw-bg-opacity, 1))}.dark\:bg-amber-950\/10{background-color:#451a031a}.dark\:bg-amber-950\/30{background-color:#451a034d}.dark\:bg-blue-900{--tw-bg-opacity: 1;background-color:rgb(30 58 138 / var(--tw-bg-opacity, 1))}.dark\:bg-blue-950{--tw-bg-opacity: 1;background-color:rgb(23 37 84 / var(--tw-bg-opacity, 1))}.dark\:bg-blue-950\/30{background-color:#1725544d}.dark\:bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.dark\:bg-gray-800\/20{background-color:#1f293733}.dark\:bg-gray-800\/30{background-color:#1f29374d}.dark\:bg-gray-800\/50{background-color:#1f293780}.dark\:bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.dark\:bg-gray-950{--tw-bg-opacity: 1;background-color:rgb(3 7 18 / var(--tw-bg-opacity, 1))}.dark\:bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.dark\:bg-green-950{--tw-bg-opacity: 1;background-color:rgb(5 46 22 / var(--tw-bg-opacity, 1))}.dark\:bg-green-950\/30{background-color:#052e164d}.dark\:bg-orange-900{--tw-bg-opacity: 1;background-color:rgb(124 45 18 / var(--tw-bg-opacity, 1))}.dark\:bg-orange-950{--tw-bg-opacity: 1;background-color:rgb(67 20 7 / var(--tw-bg-opacity, 1))}.dark\:bg-orange-950\/30{background-color:#4314074d}.dark\:bg-purple-950\/10{background-color:#3b07641a}.dark\:bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.dark\:bg-red-950{--tw-bg-opacity: 1;background-color:rgb(69 10 10 / var(--tw-bg-opacity, 1))}.dark\:bg-red-950\/10{background-color:#450a0a1a}.dark\:bg-red-950\/30{background-color:#450a0a4d}.dark\:bg-yellow-950\/30{background-color:#4220064d}.dark\:text-amber-300{--tw-text-opacity: 1;color:rgb(252 211 77 / var(--tw-text-opacity, 1))}.dark\:text-amber-400{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.dark\:text-blue-200{--tw-text-opacity: 1;color:rgb(191 219 254 / var(--tw-text-opacity, 1))}.dark\:text-blue-300{--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}.dark\:text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.dark\:text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}.dark\:text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.dark\:text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.dark\:text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.dark\:text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.dark\:text-green-300{--tw-text-opacity: 1;color:rgb(134 239 172 / var(--tw-text-opacity, 1))}.dark\:text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.dark\:text-orange-200{--tw-text-opacity: 1;color:rgb(254 215 170 / var(--tw-text-opacity, 1))}.dark\:text-orange-300{--tw-text-opacity: 1;color:rgb(253 186 116 / var(--tw-text-opacity, 1))}.dark\:text-purple-400{--tw-text-opacity: 1;color:rgb(192 132 252 / var(--tw-text-opacity, 1))}.dark\:text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.dark\:text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.dark\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.dark\:hover\:border-gray-600:hover{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity, 1))}.dark\:hover\:border-gray-700:hover{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity, 1))}.dark\:hover\:bg-amber-950\/20:hover{background-color:#451a0333}.dark\:hover\:bg-amber-950\/30:hover{background-color:#451a034d}.dark\:hover\:bg-blue-950:hover{--tw-bg-opacity: 1;background-color:rgb(23 37 84 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-blue-950\/20:hover{background-color:#17255433}.dark\:hover\:bg-gray-700:hover{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-gray-800:hover{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-gray-800\/40:hover{background-color:#1f293766}.dark\:hover\:bg-gray-800\/50:hover{background-color:#1f293780}.dark\:hover\:bg-purple-900:hover{--tw-bg-opacity: 1;background-color:rgb(88 28 135 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-purple-950:hover{--tw-bg-opacity: 1;background-color:rgb(59 7 100 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-red-950:hover{--tw-bg-opacity: 1;background-color:rgb(69 10 10 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-red-950\/50:hover{background-color:#450a0a80}.dark\:hover\:bg-yellow-950\/50:hover{background-color:#42200680}.dark\:hover\:text-gray-200:hover{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}.dark\:hover\:text-gray-300:hover{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.dark\:hover\:text-red-400:hover{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.dark\:focus\:bg-gray-800:focus{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}} diff --git a/web/build/_app/immutable/chunks/2JpTzebs.js b/web/build/_app/immutable/chunks/2JpTzebs.js deleted file mode 100644 index 589bd7f..0000000 --- a/web/build/_app/immutable/chunks/2JpTzebs.js +++ /dev/null @@ -1 +0,0 @@ -import{s as u,a as l,e as i,b as m,u as p,g as d,d as g}from"./DHedsUi_.js";import{S as $,i as h,k as b,l as f,m as _,n as k,o as v,p as N}from"./G8UKEBBn.js";import{I as G,g as I,a as M}from"./C1tDbyYL.js";function S(c){let e;const s=c[2].default,o=m(s,c,c[3],null);return{c(){o&&o.c()},l(n){o&&o.l(n)},m(n,t){o&&o.m(n,t),e=!0},p(n,t){o&&o.p&&(!e||t&8)&&p(o,s,n,n[3],e?g(s,n[3],t,null):d(n[3]),null)},i(n){e||(_(o,n),e=!0)},o(n){f(o,n),e=!1},d(n){o&&o.d(n)}}}function j(c){let e,s;const o=[{name:"git-fork"},c[1],{iconNode:c[0]}];let n={$$slots:{default:[S]},$$scope:{ctx:c}};for(let t=0;t{s(1,e=l(l({},e),i(a))),"$$scope"in a&&s(3,n=a.$$scope)},e=i(e),[t,e,o,n]}class y extends ${constructor(e){super(),h(this,e,q,j,u,{})}}export{y as G}; diff --git a/web/build/_app/immutable/chunks/6cgBTYw-.js b/web/build/_app/immutable/chunks/6cgBTYw-.js deleted file mode 100644 index 7ced1d4..0000000 --- a/web/build/_app/immutable/chunks/6cgBTYw-.js +++ /dev/null @@ -1 +0,0 @@ -var mt=Object.defineProperty;var _t=(e,t,n)=>t in e?mt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var U=(e,t,n)=>_t(e,typeof t!="symbol"?t+"":t,n);import{o as De,t as ee}from"./DHedsUi_.js";import{w as Ee}from"./oVx0hpG8.js";class Se{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class Re{constructor(t,n){this.status=t,this.location=n}}class xe extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}new URL("sveltekit-internal://");function wt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function vt(e){return e.split("%25").map(decodeURI).join("%25")}function yt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function pe({href:e}){return e.split("#")[0]}function bt(...e){let t=5381;for(const n of e)if(typeof n=="string"){let r=n.length;for(;r;)t=t*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)t=t*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}new TextEncoder;new TextDecoder;function kt(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r((e instanceof Request?e.method:(t==null?void 0:t.method)||"GET")!=="GET"&&F.delete(Le(e)),Et(e,t));const F=new Map;function St(e,t){const n=Le(e,t),r=document.querySelector(n);if(r!=null&&r.textContent){r.remove();let{body:a,...s}=JSON.parse(r.textContent);const o=r.getAttribute("data-ttl");return o&&F.set(n,{body:a,init:s,ttl:1e3*Number(o)}),r.getAttribute("data-b64")!==null&&(a=kt(a)),Promise.resolve(new Response(a,s))}return window.fetch(e,t)}function Rt(e,t,n){if(F.size>0){const r=Le(e,n),a=F.get(r);if(a){if(performance.now(){const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return t.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const s=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(s)return t.push({name:s[1],matcher:s[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const o=r.split(/\[(.+?)\](?!\])/);return"/"+o.map((l,c)=>{if(c%2){if(l.startsWith("x+"))return ge(String.fromCharCode(parseInt(l.slice(2),16)));if(l.startsWith("u+"))return ge(String.fromCharCode(...l.slice(2).split("-").map(m=>parseInt(m,16))));const d=xt.exec(l),[,u,w,p,f]=d;return t.push({name:p,matcher:f,optional:!!u,rest:!!w,chained:w?c===1&&o[0]==="":!1}),w?"([^]*?)":u?"([^/]*)?":"([^/]+?)"}return ge(l)}).join("")}).join("")}/?$`),params:t}}function Ut(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function At(e){return e.slice(1).split("/").filter(Ut)}function Tt(e,t,n){const r={},a=e.slice(1),s=a.filter(i=>i!==void 0);let o=0;for(let i=0;id).join("/"),o=0),c===void 0)if(l.rest)c="";else continue;if(!l.matcher||n[l.matcher](c)){r[l.name]=c;const d=t[i+1],u=a[i+1];d&&!d.rest&&d.optional&&u&&l.chained&&(o=0),!d&&!u&&Object.keys(r).length===s.length&&(o=0);continue}if(l.optional&&l.chained){o++;continue}return}if(!o)return r}function ge(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function $t({nodes:e,server_loads:t,dictionary:n,matchers:r}){const a=new Set(t);return Object.entries(n).map(([i,[l,c,d]])=>{const{pattern:u,params:w}=Lt(i),p={id:i,exec:f=>{const m=u.exec(f);if(m)return Tt(m,w,r)},errors:[1,...d||[]].map(f=>e[f]),layouts:[0,...c||[]].map(o),leaf:s(l)};return p.errors.length=p.layouts.length=Math.max(p.errors.length,p.layouts.length),p});function s(i){const l=i<0;return l&&(i=~i),[l,e[i]]}function o(i){return i===void 0?i:[a.has(i),e[i]]}}function He(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function Ve(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}var Ye;const L=((Ye=globalThis.__sveltekit_80oik8)==null?void 0:Ye.base)??"";var ze;const It=((ze=globalThis.__sveltekit_80oik8)==null?void 0:ze.assets)??L??"",Ot="1775902055626",Je="sveltekit:snapshot",Xe="sveltekit:scroll",Qe="sveltekit:states",Pt="sveltekit:pageurl",D="sveltekit:history",W="sveltekit:navigation",P={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},ce=location.origin;function Ue(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function j(){return{x:pageXOffset,y:pageYOffset}}function N(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const qe={...P,"":P.hover};function Ze(e){let t=e.assignedSlot??e.parentNode;return(t==null?void 0:t.nodeType)===11&&(t=t.host),t}function et(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=Ze(e)}}function we(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const i=location.hash.split("#")[1]||"/";r.hash=`#${i}${r.hash}`}}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,s=!r||!!a||fe(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),o=(r==null?void 0:r.origin)===ce&&e.hasAttribute("download");return{url:r,external:s,target:a,download:o}}function te(e){let t=null,n=null,r=null,a=null,s=null,o=null,i=e;for(;i&&i!==document.documentElement;)r===null&&(r=N(i,"preload-code")),a===null&&(a=N(i,"preload-data")),t===null&&(t=N(i,"keepfocus")),n===null&&(n=N(i,"noscroll")),s===null&&(s=N(i,"reload")),o===null&&(o=N(i,"replacestate")),i=Ze(i);function l(c){switch(c){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:qe[r??"off"],preload_data:qe[a??"off"],keepfocus:l(t),noscroll:l(n),reload:l(s),replace_state:l(o)}}function Be(e){const t=Ee(e);let n=!0;function r(){n=!0,t.update(o=>o)}function a(o){n=!1,t.set(o)}function s(o){let i;return t.subscribe(l=>{(i===void 0||n&&l!==i)&&o(i=l)})}return{notify:r,set:a,subscribe:s}}const tt={v:()=>{}};function Ct(){const{set:e,subscribe:t}=Ee(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${It}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const o=(await a.json()).version!==Ot;return o&&(e(!0),tt.v(),clearTimeout(n)),o}catch{return!1}}return{subscribe:t,check:r}}function fe(e,t,n){return e.origin!==ce||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function fn(e){}const nt=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...nt];const jt=new Set([...nt]);[...jt];function Nt(e){return e.filter(t=>t!=null)}function Ae(e){return e instanceof Se||e instanceof xe?e.status:500}function Dt(e){return e instanceof xe?e.text:"Internal Error"}let S,Y,me;const Vt=De.toString().includes("$$")||/function \w+\(\) \{\}/.test(De.toString()),Ke="a:";Vt?(S={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(Ke)},Y={current:null},me={current:!1}):(S=new class{constructor(){U(this,"data",$state.raw({}));U(this,"form",$state.raw(null));U(this,"error",$state.raw(null));U(this,"params",$state.raw({}));U(this,"route",$state.raw({id:null}));U(this,"state",$state.raw({}));U(this,"status",$state.raw(-1));U(this,"url",$state.raw(new URL(Ke)))}},Y=new class{constructor(){U(this,"current",$state.raw(null))}},me=new class{constructor(){U(this,"current",$state.raw(!1))}},tt.v=()=>me.current=!0);function qt(e){Object.assign(S,e)}const Bt=new Set(["icon","shortcut icon","apple-touch-icon"]);let K=null;const I=He(Xe)??{},z=He(Je)??{},$={url:Be({}),page:Be({}),navigating:Ee(null),updated:Ct()};function Te(e){I[e]=j()}function Kt(e,t){let n=e+1;for(;I[n];)delete I[n],n+=1;for(n=t+1;z[n];)delete z[n],n+=1}function H(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(()=>{})}async function at(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(L||"/");e&&await e.update()}}function Me(){}let $e,ve,ne,A,ye,E;const ae=[],re=[];let v=null;function be(){var e;(e=v==null?void 0:v.fork)==null||e.then(t=>t==null?void 0:t.discard()),v=null}const Z=new Map,rt=new Set,Mt=new Set,G=new Set;let _={branch:[],error:null,url:null},ot=!1,oe=!1,Fe=!0,J=!1,M=!1,st=!1,Ie=!1,it,k,x,C;const se=new Set,Ge=new Map;async function pn(e,t,n){var s,o,i,l,c;(s=globalThis.__sveltekit_80oik8)!=null&&s.data&&globalThis.__sveltekit_80oik8.data,document.URL!==location.href&&(location.href=location.href),E=e,await((i=(o=e.hooks).init)==null?void 0:i.call(o)),$e=$t(e),A=document.documentElement,ye=t,ve=e.nodes[0],ne=e.nodes[1],ve(),ne(),k=(l=history.state)==null?void 0:l[D],x=(c=history.state)==null?void 0:c[W],k||(k=x=Date.now(),history.replaceState({...history.state,[D]:k,[W]:x},""));const r=I[k];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await nn(ye,n)):(await V({type:"enter",url:Ue(E.hash?on(new URL(location.href)):location.href),replace_state:!0}),a()),tn()}function Ft(){ae.length=0,Ie=!1}function lt(e){re.some(t=>t==null?void 0:t.snapshot)&&(z[e]=re.map(t=>{var n;return(n=t==null?void 0:t.snapshot)==null?void 0:n.capture()}))}function ct(e){var t;(t=z[e])==null||t.forEach((n,r)=>{var a,s;(s=(a=re[r])==null?void 0:a.snapshot)==null||s.restore(n)})}function We(){Te(k),Ve(Xe,I),lt(x),Ve(Je,z)}async function ft(e,t,n,r){let a;t.invalidateAll&&be(),await V({type:"goto",url:Ue(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(Ie=!0,a=[...Ge.keys()]),t.invalidate&&t.invalidate.forEach(en)}}),t.invalidateAll&&ee().then(ee).then(()=>{Ge.forEach(({resource:s},o)=>{var i;a!=null&&a.includes(o)&&((i=s.refresh)==null||i.call(s))})})}async function Gt(e){if(e.id!==(v==null?void 0:v.id)){be();const t={};se.add(t),v={id:e.id,token:t,promise:dt({...e,preload:t}).then(n=>(se.delete(t),n.type==="loaded"&&n.state.error&&be(),n)),fork:null}}return v.promise}async function _e(e){var n;const t=(n=await ue(e,!1))==null?void 0:n.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(r=>r[1]()))}async function ut(e,t,n){var s;const r={params:_.params,route:{id:((s=_.route)==null?void 0:s.id)??null},url:new URL(location.href)};_={...e.state,nav:r};const a=document.querySelector("style[data-sveltekit]");if(a&&a.remove(),Object.assign(S,e.props.page),it=new E.root({target:t,props:{...e.props,stores:$,components:re},hydrate:n,sync:!1,transformError:void 0}),await Promise.resolve(),ct(x),n){const o={from:null,to:{...r,scroll:I[k]??j()},willUnload:!1,type:"enter",complete:Promise.resolve()};G.forEach(i=>i(o))}oe=!0}async function ie({url:e,params:t,branch:n,errors:r,status:a,error:s,route:o,form:i}){let l="never";if(L&&(e.pathname===L||e.pathname===L+"/"))l="always";else for(const f of n)(f==null?void 0:f.slash)!==void 0&&(l=f.slash);e.pathname=wt(e.pathname,l),e.search=e.search;const c={type:"loaded",state:{url:e,params:t,branch:n,error:s,route:o},props:{constructors:Nt(n).map(f=>f.node.component),page:Ne(S)}};i!==void 0&&(c.props.form=i);let d={},u=!S,w=0;for(let f=0;fi(new URL(o))))return!0;return!1}function Pe(e,t){return(e==null?void 0:e.type)==="data"?e:(e==null?void 0:e.type)==="skip"?t??null:null}function zt(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const r of n){const a=e.searchParams.getAll(r),s=t.searchParams.getAll(r);a.every(o=>s.includes(o))&&s.every(o=>a.includes(o))&&n.delete(r)}return n}function Ht({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:Ne(S),constructors:[]}}}async function dt({id:e,invalidating:t,url:n,params:r,route:a,preload:s}){if((v==null?void 0:v.id)===e)return se.delete(v.token),v.promise;const{errors:o,layouts:i,leaf:l}=a,c=[...i,l];o.forEach(h=>h==null?void 0:h().catch(()=>{})),c.forEach(h=>h==null?void 0:h[1]().catch(()=>{}));const d=_.url?e!==le(_.url):!1,u=_.route?a.id!==_.route.id:!1,w=zt(_.url,n);let p=!1;const f=c.map(async(h,g)=>{var T;if(!h)return;const y=_.branch[g];return h[1]===(y==null?void 0:y.loader)&&!Yt(p,u,d,w,(T=y.universal)==null?void 0:T.uses,r)?y:(p=!0,Oe({loader:h[1],url:n,params:r,route:a,parent:async()=>{var Q;const O={};for(let b=0;b{});const m=[];for(let h=0;hPromise.resolve({}),server_data_node:Pe(s)}),i={node:await ne(),loader:ne,universal:null,server:null,data:null};return ie({url:n,params:a,branch:[o,i],status:e,error:t,errors:[],route:null})}catch(o){if(o instanceof Re)return ft(new URL(o.location,location.href),{},0);throw o}}async function Xt(e){const t=e.href;if(Z.has(t))return Z.get(t);let n;try{const r=(async()=>{let a=await E.hooks.reroute({url:new URL(e),fetch:async(s,o)=>Wt(s,o,e).promise})??e;if(typeof a=="string"){const s=new URL(e);E.hash?s.hash=a:s.pathname=a,a=s}return a})();Z.set(t,r),n=await r}catch{Z.delete(t);return}return n}async function ue(e,t){if(e&&!fe(e,L,E.hash)){const n=await Xt(e);if(!n)return;const r=Qt(n);for(const a of $e){const s=a.exec(r);if(s)return{id:le(e),invalidating:t,route:a,params:yt(s),url:e}}}}function Qt(e){return vt(E.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(L.length))||"/"}function le(e){return(E.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function ht({url:e,type:t,intent:n,delta:r,event:a,scroll:s}){let o=!1;const i=je(_,n,e,t,s??null);r!==void 0&&(i.navigation.delta=r),a!==void 0&&(i.navigation.event=a);const l={...i.navigation,cancel:()=>{o=!0,i.reject(new Error("navigation cancelled"))}};return J||rt.forEach(c=>c(l)),o?null:i}async function V({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:s,state:o={},redirect_count:i=0,nav_token:l={},accept:c=Me,block:d=Me,event:u}){const w=C;C=l;const p=await ue(t,!1),f=e==="enter"?je(_,p,t,e):ht({url:t,type:e,delta:n==null?void 0:n.delta,intent:p,scroll:n==null?void 0:n.scroll,event:u});if(!f){d(),C===l&&(C=w);return}const m=k,h=x;c(),J=!0,oe&&f.navigation.type!=="enter"&&$.navigating.set(Y.current=f.navigation);let g=p&&await dt(p);if(!g){if(fe(t,L,E.hash))return await H(t,s);g=await pt(t,{id:null},await X(new xe(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,s)}if(t=(p==null?void 0:p.url)||t,C!==l)return f.reject(new Error("navigation aborted")),!1;if(g.type==="redirect"){if(i<20){await V({type:e,url:new URL(g.location,t),popped:n,keepfocus:r,noscroll:a,replace_state:s,state:o,redirect_count:i+1,nav_token:l}),f.fulfil(void 0);return}g=await Ce({status:500,error:await X(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}})}else g.props.page.status>=400&&await $.updated.check()&&(await at(),await H(t,s));if(Ft(),Te(m),lt(h),g.props.page.url.pathname!==t.pathname&&(t.pathname=g.props.page.url.pathname),o=n?n.state:o,!n){const b=s?0:1,q={[D]:k+=b,[W]:x+=b,[Qe]:o};(s?history.replaceState:history.pushState).call(history,q,"",t),s||Kt(k,x)}const y=p&&(v==null?void 0:v.id)===p.id?v.fork:null;v=null,g.props.page.state=o;let R;if(oe){const b=(await Promise.all(Array.from(Mt,B=>B(f.navigation)))).filter(B=>typeof B=="function");if(b.length>0){let B=function(){b.forEach(he=>{G.delete(he)})};b.push(B),b.forEach(he=>{G.add(he)})}const q=f.navigation.to;_={...g.state,nav:{params:q.params,route:q.route,url:q.url}},g.props.page&&(g.props.page.url=t);const de=y&&await y;de?R=de.commit():(K=null,it.$set(g.props),K&&Object.assign(g.props.page,K),qt(g.props.page),R=void 0),st=!0}else await ut(g,ye,!1);const{activeElement:T}=document;await R,await ee(),await ee();let O=null;if(Fe){const b=n?n.scroll:a?j():null;b?scrollTo(b.x,b.y):(O=t.hash&&document.getElementById(gt(t)))?O.scrollIntoView():scrollTo(0,0)}const Q=document.activeElement!==T&&document.activeElement!==document.body;!r&&!Q&&rn(t,!O),Fe=!0,g.props.page&&(K&&Object.assign(g.props.page,K),Object.assign(S,g.props.page)),J=!1,e==="popstate"&&ct(x),f.fulfil(void 0),f.navigation.to&&(f.navigation.to.scroll=j()),G.forEach(b=>b(f.navigation)),$.navigating.set(Y.current=null)}async function pt(e,t,n,r,a){return e.origin===ce&&e.pathname===location.pathname&&!ot?await Ce({status:r,error:n,url:e,route:t}):await H(e,a)}function Zt(){let e,t={element:void 0,href:void 0},n;A.addEventListener("mousemove",i=>{const l=i.target;clearTimeout(e),e=setTimeout(()=>{s(l,P.hover)},20)});function r(i){i.defaultPrevented||s(i.composedPath()[0],P.tap)}A.addEventListener("mousedown",r),A.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(i=>{for(const l of i)l.isIntersecting&&(_e(new URL(l.target.href)),a.unobserve(l.target))},{threshold:0});async function s(i,l){const c=et(i,A),d=c===t.element&&(c==null?void 0:c.href)===t.href&&l>=n;if(!c||d)return;const{url:u,external:w,download:p}=we(c,L,E.hash);if(w||p)return;const f=te(c),m=u&&le(_.url)===le(u);if(!(f.reload||m))if(l<=f.preload_data){t={element:c,href:c.href},n=P.tap;const h=await ue(u,!1);if(!h)return;Gt(h)}else l<=f.preload_code&&(t={element:c,href:c.href},n=l,_e(u))}function o(){a.disconnect();for(const i of A.querySelectorAll("a")){const{url:l,external:c,download:d}=we(i,L,E.hash);if(c||d)continue;const u=te(i);u.reload||(u.preload_code===P.viewport&&a.observe(i),u.preload_code===P.eager&&_e(l))}}G.add(o),o()}function X(e,t){if(e instanceof Se)return e.body;const n=Ae(e),r=Dt(e);return E.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function gn(e,t={}){return e=new URL(Ue(e)),e.origin!==ce?Promise.reject(new Error("goto: invalid URL")):ft(e,t,0)}function en(e){if(typeof e=="function")ae.push(e);else{const{href:t}=new URL(e,location.href);ae.push(n=>n.href===t)}}function tn(){var t;history.scrollRestoration="manual",addEventListener("beforeunload",n=>{let r=!1;if(We(),!J){const a=je(_,void 0,null,"leave"),s={...a.navigation,cancel:()=>{r=!0,a.reject(new Error("navigation cancelled"))}};rt.forEach(o=>o(s))}r?(n.preventDefault(),n.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&We()}),(t=navigator.connection)!=null&&t.saveData||Zt(),A.addEventListener("click",async n=>{if(n.button||n.which!==1||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey||n.defaultPrevented)return;const r=et(n.composedPath()[0],A);if(!r)return;const{url:a,external:s,target:o,download:i}=we(r,L,E.hash);if(!a)return;if(o==="_parent"||o==="_top"){if(window.parent!==window)return}else if(o&&o!=="_self")return;const l=te(r);if(!(r instanceof SVGAElement)&&a.protocol!==location.protocol&&!(a.protocol==="https:"||a.protocol==="http:")||i)return;const[d,u]=(E.hash?a.hash.replace(/^#/,""):a.href).split("#"),w=d===pe(location);if(s||l.reload&&(!w||!u)){ht({url:a,type:"link",event:n})?J=!0:n.preventDefault();return}if(u!==void 0&&w){const[,p]=_.url.href.split("#");if(p===u){if(n.preventDefault(),u===""||u==="top"&&r.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const f=r.ownerDocument.getElementById(decodeURIComponent(u));f&&(f.scrollIntoView(),f.focus())}return}if(M=!0,Te(k),e(a),!l.replace_state)return;M=!1}n.preventDefault(),await new Promise(p=>{requestAnimationFrame(()=>{setTimeout(p,0)}),setTimeout(p,100)}),await V({type:"link",url:a,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??a.href===location.href,event:n})}),A.addEventListener("submit",n=>{if(n.defaultPrevented)return;const r=HTMLFormElement.prototype.cloneNode.call(n.target),a=n.submitter;if(((a==null?void 0:a.formTarget)||r.target)==="_blank"||((a==null?void 0:a.formMethod)||r.method)!=="get")return;const i=new URL((a==null?void 0:a.hasAttribute("formaction"))&&(a==null?void 0:a.formAction)||r.action);if(fe(i,L,!1))return;const l=n.target,c=te(l);if(c.reload)return;n.preventDefault(),n.stopPropagation();const d=new FormData(l,a);i.search=new URLSearchParams(d).toString(),V({type:"form",url:i,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??i.href===location.href,event:n})}),addEventListener("popstate",async n=>{var r;if(!ke){if((r=n.state)!=null&&r[D]){const a=n.state[D];if(C={},a===k)return;const s=I[a],o=n.state[Qe]??{},i=new URL(n.state[Pt]??location.href),l=n.state[W],c=_.url?pe(location)===pe(_.url):!1;if(l===x&&(st||c)){o!==S.state&&(S.state=o),e(i),I[k]=j(),s&&scrollTo(s.x,s.y),k=a;return}const u=a-k;await V({type:"popstate",url:i,popped:{state:o,scroll:s,delta:u},accept:()=>{k=a,x=l},block:()=>{history.go(-u)},nav_token:C,event:n})}else if(!M){const a=new URL(location.href);e(a),E.hash&&location.reload()}}}),addEventListener("hashchange",()=>{M&&(M=!1,history.replaceState({...history.state,[D]:++k,[W]:x},"",location.href))});for(const n of document.querySelectorAll("link"))Bt.has(n.rel)&&(n.href=n.href);addEventListener("pageshow",n=>{n.persisted&&$.navigating.set(Y.current=null)});function e(n){_.url=S.url=n,$.page.set(Ne(S)),$.page.notify()}}async function nn(e,{status:t=200,error:n,node_ids:r,params:a,route:s,server_route:o,data:i,form:l}){ot=!0;const c=new URL(location.href);let d;({params:a={},route:s={id:null}}=await ue(c,!1)||{}),d=$e.find(({id:p})=>p===s.id);let u,w=!0;try{const p=r.map(async(m,h)=>{const g=i[h];return g!=null&&g.uses&&(g.uses=an(g.uses)),Oe({loader:E.nodes[m],url:c,params:a,route:s,parent:async()=>{const y={};for(let R=0;R{const i=history.state;ke=!0,location.replace(new URL(`#${r}`,location.href)),history.replaceState(i,"",e),t&&scrollTo(s,o),ke=!1})}else{const s=document.body,o=s.getAttribute("tabindex");s.tabIndex=-1,s.focus({preventScroll:!0,focusVisible:!1}),o!==null?s.setAttribute("tabindex",o):s.removeAttribute("tabindex")}const a=getSelection();if(a&&a.type!=="None"){const s=[];for(let o=0;o{if(a.rangeCount===s.length){for(let o=0;o{s=u,o=w});return i.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:((c=e.route)==null?void 0:c.id)??null},url:e.url,scroll:j()},to:n&&{params:(t==null?void 0:t.params)??null,route:{id:((d=t==null?void 0:t.route)==null?void 0:d.id)??null},url:n,scroll:a},willUnload:!t,type:r,complete:i},fulfil:s,reject:o}}function Ne(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function on(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function gt(e){let t;if(E.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{pn as a,gn as g,fn as l,$ as s}; diff --git a/web/build/_app/immutable/chunks/7IRyKQzz.js b/web/build/_app/immutable/chunks/7IRyKQzz.js deleted file mode 100644 index 12bf0db..0000000 --- a/web/build/_app/immutable/chunks/7IRyKQzz.js +++ /dev/null @@ -1 +0,0 @@ -import{s as _,a as i,e as c,b as m,u as p,g as d,d as g}from"./DHedsUi_.js";import{S as $,i as h,k as N,l as f,m as u,n as b,o as T,p as I}from"./G8UKEBBn.js";import{I as S,g as j,a as k}from"./C1tDbyYL.js";function q(a){let e;const s=a[2].default,o=m(s,a,a[3],null);return{c(){o&&o.c()},l(t){o&&o.l(t)},m(t,n){o&&o.m(t,n),e=!0},p(t,n){o&&o.p&&(!e||n&8)&&p(o,s,t,t[3],e?g(s,t[3],n,null):d(t[3]),null)},i(t){e||(u(o,t),e=!0)},o(t){f(o,t),e=!1},d(t){o&&o.d(t)}}}function v(a){let e,s;const o=[{name:"trending-down"},a[1],{iconNode:a[0]}];let t={$$slots:{default:[q]},$$scope:{ctx:a}};for(let n=0;n{s(1,e=i(i({},e),c(l))),"$$scope"in l&&s(3,t=l.$$scope)},e=c(e),[n,e,o,t]}class F extends ${constructor(e){super(),h(this,e,C,v,_,{})}}function w(a){let e;const s=a[2].default,o=m(s,a,a[3],null);return{c(){o&&o.c()},l(t){o&&o.l(t)},m(t,n){o&&o.m(t,n),e=!0},p(t,n){o&&o.p&&(!e||n&8)&&p(o,s,t,t[3],e?g(s,t[3],n,null):d(t[3]),null)},i(t){e||(u(o,t),e=!0)},o(t){f(o,t),e=!1},d(t){o&&o.d(t)}}}function z(a){let e,s;const o=[{name:"trending-up"},a[1],{iconNode:a[0]}];let t={$$slots:{default:[w]},$$scope:{ctx:a}};for(let n=0;n{s(1,e=i(i({},e),c(l))),"$$scope"in l&&s(3,t=l.$$scope)},e=c(e),[n,e,o,t]}class G extends ${constructor(e){super(),h(this,e,A,z,_,{})}}export{G as T,F as a}; diff --git a/web/build/_app/immutable/chunks/7MWtQ_HQ.js b/web/build/_app/immutable/chunks/7MWtQ_HQ.js deleted file mode 100644 index cd79647..0000000 --- a/web/build/_app/immutable/chunks/7MWtQ_HQ.js +++ /dev/null @@ -1 +0,0 @@ -import{s as u,a as r,e as i,b as m,u as p,g as d,d as g}from"./DHedsUi_.js";import{S as h,i as $,k as b,l as _,m as f,n as v,o as M,p as N}from"./G8UKEBBn.js";import{I,g as S,a as T}from"./C1tDbyYL.js";function V(l){let e;const o=l[2].default,s=m(o,l,l[3],null);return{c(){s&&s.c()},l(n){s&&s.l(n)},m(n,t){s&&s.m(n,t),e=!0},p(n,t){s&&s.p&&(!e||t&8)&&p(s,o,n,n[3],e?g(o,n[3],t,null):d(n[3]),null)},i(n){e||(f(s,n),e=!0)},o(n){_(s,n),e=!1},d(n){s&&s.d(n)}}}function j(l){let e,o;const s=[{name:"trash-2"},l[1],{iconNode:l[0]}];let n={$$slots:{default:[V]},$$scope:{ctx:l}};for(let t=0;t{o(1,e=r(r({},e),i(a))),"$$scope"in a&&o(3,n=a.$$scope)},e=i(e),[t,e,s,n]}class H extends h{constructor(e){super(),$(this,e,k,j,u,{})}}export{H as T}; diff --git a/web/build/_app/immutable/chunks/B9ru2HtO.js b/web/build/_app/immutable/chunks/B9ru2HtO.js deleted file mode 100644 index d841c6c..0000000 --- a/web/build/_app/immutable/chunks/B9ru2HtO.js +++ /dev/null @@ -1 +0,0 @@ -import{s as u,a as r,e as c,b as d,u as m,g as p,d as h}from"./DHedsUi_.js";import{S as g,i as $,k as y,l as _,m as f,n as M,o as b,p as C}from"./G8UKEBBn.js";import{I as N,g as x,a as I}from"./C1tDbyYL.js";function S(l){let e;const s=l[2].default,a=d(s,l,l[3],null);return{c(){a&&a.c()},l(n){a&&a.l(n)},m(n,t){a&&a.m(n,t),e=!0},p(n,t){a&&a.p&&(!e||t&8)&&m(a,s,n,n[3],e?h(s,n[3],t,null):p(n[3]),null)},i(n){e||(f(a,n),e=!0)},o(n){_(a,n),e=!1},d(n){a&&a.d(n)}}}function j(l){let e,s;const a=[{name:"calendar-days"},l[1],{iconNode:l[0]}];let n={$$slots:{default:[S]},$$scope:{ctx:l}};for(let t=0;t{s(1,e=r(r({},e),c(o))),"$$scope"in o&&s(3,n=o.$$scope)},e=c(e),[t,e,a,n]}class z extends g{constructor(e){super(),$(this,e,k,j,u,{})}}export{z as C}; diff --git a/web/build/_app/immutable/chunks/BYJWe3D5.js b/web/build/_app/immutable/chunks/BYJWe3D5.js deleted file mode 100644 index aa0bd7c..0000000 --- a/web/build/_app/immutable/chunks/BYJWe3D5.js +++ /dev/null @@ -1 +0,0 @@ -import{s as _,a as r,e as i,b as m,u as p,g as d,d as g}from"./DHedsUi_.js";import{S as $,i as h,k as v,l as u,m as f,n as b,o as M,p as N}from"./G8UKEBBn.js";import{I,g as S,a as U}from"./C1tDbyYL.js";function j(l){let e;const a=l[2].default,n=m(a,l,l[3],null);return{c(){n&&n.c()},l(s){n&&n.l(s)},m(s,t){n&&n.m(s,t),e=!0},p(s,t){n&&n.p&&(!e||t&8)&&p(n,a,s,s[3],e?g(a,s[3],t,null):d(s[3]),null)},i(s){e||(f(n,s),e=!0)},o(s){u(n,s),e=!1},d(s){n&&n.d(s)}}}function k(l){let e,a;const n=[{name:"users"},l[1],{iconNode:l[0]}];let s={$$slots:{default:[j]},$$scope:{ctx:l}};for(let t=0;t{a(1,e=r(r({},e),i(o))),"$$scope"in o&&a(3,s=o.$$scope)},e=i(e),[t,e,n,s]}class A extends ${constructor(e){super(),h(this,e,q,k,_,{})}}export{A as U}; diff --git a/web/build/_app/immutable/chunks/Betcpvy2.js b/web/build/_app/immutable/chunks/Betcpvy2.js deleted file mode 100644 index 335dd67..0000000 --- a/web/build/_app/immutable/chunks/Betcpvy2.js +++ /dev/null @@ -1 +0,0 @@ -import{s as _,a as r,e as c,b as m,u as p,g as d,d as g}from"./DHedsUi_.js";import{S as $,i as h,k as b,l as u,m as f,n as v,o as N,p as I}from"./G8UKEBBn.js";import{I as S,g as U,a as j}from"./C1tDbyYL.js";function k(l){let e;const s=l[2].default,o=m(s,l,l[3],null);return{c(){o&&o.c()},l(n){o&&o.l(n)},m(n,t){o&&o.m(n,t),e=!0},p(n,t){o&&o.p&&(!e||t&8)&&p(o,s,n,n[3],e?g(s,n[3],t,null):d(n[3]),null)},i(n){e||(f(o,n),e=!0)},o(n){u(o,n),e=!1},d(n){o&&o.d(n)}}}function q(l){let e,s;const o=[{name:"upload"},l[1],{iconNode:l[0]}];let n={$$slots:{default:[k]},$$scope:{ctx:l}};for(let t=0;t{s(1,e=r(r({},e),c(a))),"$$scope"in a&&s(3,n=a.$$scope)},e=c(e),[t,e,o,n]}class z extends ${constructor(e){super(),h(this,e,C,q,_,{})}}export{z as U}; diff --git a/web/build/_app/immutable/chunks/BojKV9te.js b/web/build/_app/immutable/chunks/BojKV9te.js deleted file mode 100644 index 54a8ddb..0000000 --- a/web/build/_app/immutable/chunks/BojKV9te.js +++ /dev/null @@ -1 +0,0 @@ -import{s as _,a as r,e as c,b as m,u as p,g as d,d as g}from"./DHedsUi_.js";import{S as $,i as h,k as b,l as f,m as u,n as v,o as N,p as D}from"./G8UKEBBn.js";import{I,g as S,a as j}from"./C1tDbyYL.js";function k(l){let e;const s=l[2].default,o=m(s,l,l[3],null);return{c(){o&&o.c()},l(n){o&&o.l(n)},m(n,t){o&&o.m(n,t),e=!0},p(n,t){o&&o.p&&(!e||t&8)&&p(o,s,n,n[3],e?g(s,n[3],t,null):d(n[3]),null)},i(n){e||(u(o,n),e=!0)},o(n){f(o,n),e=!1},d(n){o&&o.d(n)}}}function q(l){let e,s;const o=[{name:"download"},l[1],{iconNode:l[0]}];let n={$$slots:{default:[k]},$$scope:{ctx:l}};for(let t=0;t{s(1,e=r(r({},e),c(a))),"$$scope"in a&&s(3,n=a.$$scope)},e=c(e),[t,e,o,n]}class y extends ${constructor(e){super(),h(this,e,w,q,_,{})}}export{y as D}; diff --git a/web/build/_app/immutable/chunks/C1tDbyYL.js b/web/build/_app/immutable/chunks/C1tDbyYL.js deleted file mode 100644 index ca95783..0000000 --- a/web/build/_app/immutable/chunks/C1tDbyYL.js +++ /dev/null @@ -1,6 +0,0 @@ -import{r as U,s as G,b as V,a as N,u as X,g as Y,d as Z,k as B,e as J}from"./DHedsUi_.js";import{m as H,l as L,S as p,i as x,d as b,x as $,I as W,a as M,b as ee,J as O,e as Q,w as S,K as R}from"./G8UKEBBn.js";function K(s){return(s==null?void 0:s.length)!==void 0?s:Array.from(s)}function ie(s,e){s.d(1),e.delete(s.key)}function oe(s,e){L(s,1,1,()=>{e.delete(s.key)})}function ae(s,e,o,i,n,a,h,u,c,d,_,k){let t=s.length,l=a.length,f=t;const v={};for(;f--;)v[s[f].key]=f;const w=[],z=new Map,j=new Map,A=[];for(f=l;f--;){const r=k(n,a,f),m=o(r);let g=h.get(m);g?A.push(()=>g.p(r,e)):(g=d(m,r),g.c()),z.set(m,w[f]=g),m in v&&j.set(m,Math.abs(f-v[m]))}const E=new Set,q=new Set;function C(r){H(r,1),r.m(u,_),h.set(r.key,r),_=r.first,l--}for(;t&&l;){const r=w[l-1],m=s[t-1],g=r.key,y=m.key;r===m?(_=r.first,t--,l--):z.has(y)?!h.has(g)||E.has(g)?C(r):q.has(y)?t--:j.get(g)>j.get(y)?(q.add(g),C(r)):(E.add(y),t--):(c(m,h),t--)}for(;t--;){const r=s[t];z.has(r.key)||c(r,h)}for(;l;)C(w[l-1]);return U(A),w}function T(s,e){const o={},i={},n={$$scope:1};let a=s.length;for(;a--;){const h=s[a],u=e[a];if(u){for(const c in h)c in u||(i[c]=1);for(const c in u)n[c]||(o[c]=u[c],n[c]=1);s[a]=u}else for(const c in h)n[c]=1}for(const h in i)h in o||(o[h]=void 0);return o}function fe(s){return typeof s=="object"&&s!==null?s:{}}/** - * @license lucide-svelte v0.303.0 - ISC - -This source code is licensed under the ISC license. -See the LICENSE file in the root directory of this source tree. - */const P={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"};function D(s,e,o){const i=s.slice();return i[10]=e[o][0],i[11]=e[o][1],i}function I(s){let e,o=[s[11]],i={};for(let n=0;n{o(7,e=N(N({},e),J(l))),o(6,n=B(e,i)),"name"in l&&o(0,u=l.name),"color"in l&&o(1,c=l.color),"size"in l&&o(2,d=l.size),"strokeWidth"in l&&o(3,_=l.strokeWidth),"absoluteStrokeWidth"in l&&o(4,k=l.absoluteStrokeWidth),"iconNode"in l&&o(5,t=l.iconNode),"$$scope"in l&&o(8,h=l.$$scope)},e=J(e),[u,c,d,_,k,t,n,e,h,a]}class ue extends p{constructor(e){super(),x(this,e,se,te,G,{name:0,color:1,size:2,strokeWidth:3,absoluteStrokeWidth:4,iconNode:5})}}export{ue as I,fe as a,ie as d,K as e,T as g,oe as o,ae as u}; diff --git a/web/build/_app/immutable/chunks/C7zepb3B.js b/web/build/_app/immutable/chunks/C7zepb3B.js deleted file mode 100644 index 82fb617..0000000 --- a/web/build/_app/immutable/chunks/C7zepb3B.js +++ /dev/null @@ -1 +0,0 @@ -import{s as _,a as r,e as i,b as m,u as p,g as d,d as g}from"./DHedsUi_.js";import{S as $,i as h,k as b,l as f,m as u,n as N,o as v,p as I}from"./G8UKEBBn.js";import{I as M,g as S,a as T}from"./C1tDbyYL.js";function j(l){let e;const o=l[2].default,s=m(o,l,l[3],null);return{c(){s&&s.c()},l(n){s&&s.l(n)},m(n,t){s&&s.m(n,t),e=!0},p(n,t){s&&s.p&&(!e||t&8)&&p(s,o,n,n[3],e?g(o,n[3],t,null):d(n[3]),null)},i(n){e||(u(s,n),e=!0)},o(n){f(s,n),e=!1},d(n){s&&s.d(n)}}}function k(l){let e,o;const s=[{name:"tag"},l[1],{iconNode:l[0]}];let n={$$slots:{default:[j]},$$scope:{ctx:l}};for(let t=0;t{o(1,e=r(r({},e),i(a))),"$$scope"in a&&o(3,n=a.$$scope)},e=i(e),[t,e,s,n]}class Z extends ${constructor(e){super(),h(this,e,q,k,_,{})}}export{Z as T}; diff --git a/web/build/_app/immutable/chunks/CEKnDucw.js b/web/build/_app/immutable/chunks/CEKnDucw.js deleted file mode 100644 index 533d466..0000000 --- a/web/build/_app/immutable/chunks/CEKnDucw.js +++ /dev/null @@ -1 +0,0 @@ -import{s as e}from"./6cgBTYw-.js";const r=()=>{const s=e;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},b={subscribe(s){return r().page.subscribe(s)}};export{b as p}; diff --git a/web/build/_app/immutable/chunks/CImgxE6m.js b/web/build/_app/immutable/chunks/CImgxE6m.js deleted file mode 100644 index ed2c9b9..0000000 --- a/web/build/_app/immutable/chunks/CImgxE6m.js +++ /dev/null @@ -1 +0,0 @@ -import{s as _,a as r,e as i,b as m,u as p,g as d,d as g}from"./DHedsUi_.js";import{S as $,i as h,k as b,l as u,m as f,n as v,o as N,p as I}from"./G8UKEBBn.js";import{I as S,g as U,a as j}from"./C1tDbyYL.js";function k(l){let e;const o=l[2].default,n=m(o,l,l[3],null);return{c(){n&&n.c()},l(s){n&&n.l(s)},m(s,t){n&&n.m(s,t),e=!0},p(s,t){n&&n.p&&(!e||t&8)&&p(n,o,s,s[3],e?g(o,s[3],t,null):d(s[3]),null)},i(s){e||(f(n,s),e=!0)},o(s){u(n,s),e=!1},d(s){n&&n.d(s)}}}function q(l){let e,o;const n=[{name:"user"},l[1],{iconNode:l[0]}];let s={$$slots:{default:[k]},$$scope:{ctx:l}};for(let t=0;t{o(1,e=r(r({},e),i(a))),"$$scope"in a&&o(3,s=a.$$scope)},e=i(e),[t,e,n,s]}class A extends ${constructor(e){super(),h(this,e,C,q,_,{})}}export{A as U}; diff --git a/web/build/_app/immutable/chunks/CLS07P5K.js b/web/build/_app/immutable/chunks/CLS07P5K.js deleted file mode 100644 index 5423790..0000000 --- a/web/build/_app/immutable/chunks/CLS07P5K.js +++ /dev/null @@ -1 +0,0 @@ -import{s as _,a as r,e as i,b as m,u as p,g as d,d as g}from"./DHedsUi_.js";import{S as $,i as h,k as b,l as u,m as f,n as N,o as v,p as I}from"./G8UKEBBn.js";import{I as M,g as P,a as S}from"./C1tDbyYL.js";function j(l){let e;const o=l[2].default,n=m(o,l,l[3],null);return{c(){n&&n.c()},l(s){n&&n.l(s)},m(s,t){n&&n.m(s,t),e=!0},p(s,t){n&&n.p&&(!e||t&8)&&p(n,o,s,s[3],e?g(o,s[3],t,null):d(s[3]),null)},i(s){e||(f(n,s),e=!0)},o(s){u(n,s),e=!1},d(s){n&&n.d(s)}}}function k(l){let e,o;const n=[{name:"plus"},l[1],{iconNode:l[0]}];let s={$$slots:{default:[j]},$$scope:{ctx:l}};for(let t=0;t{o(1,e=r(r({},e),i(a))),"$$scope"in a&&o(3,s=a.$$scope)},e=i(e),[t,e,n,s]}class B extends ${constructor(e){super(),h(this,e,q,k,_,{})}}export{B as P}; diff --git a/web/build/_app/immutable/chunks/CNY58Upt.js b/web/build/_app/immutable/chunks/CNY58Upt.js deleted file mode 100644 index 4e0fccf..0000000 --- a/web/build/_app/immutable/chunks/CNY58Upt.js +++ /dev/null @@ -1 +0,0 @@ -import{s as u,a as i,e as c,b as m,u as p,g as d,d as g}from"./DHedsUi_.js";import{S as $,i as h,k as y,l as f,m as _,n as b,o as N,p as v}from"./G8UKEBBn.js";import{I as x,g as F,a as I}from"./C1tDbyYL.js";function S(l){let e;const o=l[2].default,s=m(o,l,l[3],null);return{c(){s&&s.c()},l(n){s&&s.l(n)},m(n,t){s&&s.m(n,t),e=!0},p(n,t){s&&s.p&&(!e||t&8)&&p(s,o,n,n[3],e?g(o,n[3],t,null):d(n[3]),null)},i(n){e||(_(s,n),e=!0)},o(n){f(s,n),e=!1},d(n){s&&s.d(n)}}}function j(l){let e,o;const s=[{name:"file-text"},l[1],{iconNode:l[0]}];let n={$$slots:{default:[S]},$$scope:{ctx:l}};for(let t=0;t{o(1,e=i(i({},e),c(a))),"$$scope"in a&&o(3,n=a.$$scope)},e=c(e),[t,e,s,n]}class H extends ${constructor(e){super(),h(this,e,k,j,u,{})}}export{H as F}; diff --git a/web/build/_app/immutable/chunks/CUwAs-mp.js b/web/build/_app/immutable/chunks/CUwAs-mp.js deleted file mode 100644 index c882996..0000000 --- a/web/build/_app/immutable/chunks/CUwAs-mp.js +++ /dev/null @@ -1 +0,0 @@ -import{s as u,a as r,e as c,b as p,u as m,g as d,d as h}from"./DHedsUi_.js";import{S as g,i as $,k as M,l as f,m as _,n as b,o as N,p as v}from"./G8UKEBBn.js";import{I as F,g as I,a as S}from"./C1tDbyYL.js";function j(l){let e;const n=l[2].default,a=p(n,l,l[3],null);return{c(){a&&a.c()},l(s){a&&a.l(s)},m(s,t){a&&a.m(s,t),e=!0},p(s,t){a&&a.p&&(!e||t&8)&&m(a,n,s,s[3],e?h(n,s[3],t,null):d(s[3]),null)},i(s){e||(_(a,s),e=!0)},o(s){f(a,s),e=!1},d(s){a&&a.d(s)}}}function k(l){let e,n;const a=[{name:"file-spreadsheet"},l[1],{iconNode:l[0]}];let s={$$slots:{default:[j]},$$scope:{ctx:l}};for(let t=0;t{n(1,e=r(r({},e),c(o))),"$$scope"in o&&n(3,s=o.$$scope)},e=c(e),[t,e,a,s]}class L extends g{constructor(e){super(),$(this,e,q,k,u,{})}}export{L as F}; diff --git a/web/build/_app/immutable/chunks/C_K4PjIw.js b/web/build/_app/immutable/chunks/C_K4PjIw.js deleted file mode 100644 index 62adae6..0000000 --- a/web/build/_app/immutable/chunks/C_K4PjIw.js +++ /dev/null @@ -1 +0,0 @@ -import{s as _,a as r,e as i,b as m,u as p,g as d,d as g}from"./DHedsUi_.js";import{S as $,i as h,k as b,l as f,m as u,n as N,o as I,p as P}from"./G8UKEBBn.js";import{I as S,g as j,a as k}from"./C1tDbyYL.js";function q(l){let e;const o=l[2].default,s=m(o,l,l[3],null);return{c(){s&&s.c()},l(n){s&&s.l(n)},m(n,t){s&&s.m(n,t),e=!0},p(n,t){s&&s.p&&(!e||t&8)&&p(s,o,n,n[3],e?g(o,n[3],t,null):d(n[3]),null)},i(n){e||(u(s,n),e=!0)},o(n){f(s,n),e=!1},d(n){s&&s.d(n)}}}function v(l){let e,o;const s=[{name:"pencil"},l[1],{iconNode:l[0]}];let n={$$slots:{default:[q]},$$scope:{ctx:l}};for(let t=0;t{o(1,e=r(r({},e),i(a))),"$$scope"in a&&o(3,n=a.$$scope)},e=i(e),[t,e,s,n]}class z extends ${constructor(e){super(),h(this,e,C,v,_,{})}}export{z as P}; diff --git a/web/build/_app/immutable/chunks/C_l6I72z.js b/web/build/_app/immutable/chunks/C_l6I72z.js deleted file mode 100644 index 2391115..0000000 --- a/web/build/_app/immutable/chunks/C_l6I72z.js +++ /dev/null @@ -1 +0,0 @@ -import{s as _,a as r,e as i,b as m,u as p,g as d,d as g}from"./DHedsUi_.js";import{S as $,i as h,k as b,l as f,m as u,n as N,o as I,p as S}from"./G8UKEBBn.js";import{I as j,g as k,a as q}from"./C1tDbyYL.js";function v(l){let e;const o=l[2].default,s=m(o,l,l[3],null);return{c(){s&&s.c()},l(n){s&&s.l(n)},m(n,t){s&&s.m(n,t),e=!0},p(n,t){s&&s.p&&(!e||t&8)&&p(s,o,n,n[3],e?g(o,n[3],t,null):d(n[3]),null)},i(n){e||(u(s,n),e=!0)},o(n){f(s,n),e=!1},d(n){s&&s.d(n)}}}function C(l){let e,o;const s=[{name:"x"},l[1],{iconNode:l[0]}];let n={$$slots:{default:[v]},$$scope:{ctx:l}};for(let t=0;t{o(1,e=r(r({},e),i(a))),"$$scope"in a&&o(3,n=a.$$scope)},e=i(e),[t,e,s,n]}class B extends ${constructor(e){super(),h(this,e,M,C,_,{})}}export{B as X}; diff --git a/web/build/_app/immutable/chunks/D3KWQg4I.js b/web/build/_app/immutable/chunks/D3KWQg4I.js deleted file mode 100644 index 9f64ffb..0000000 --- a/web/build/_app/immutable/chunks/D3KWQg4I.js +++ /dev/null @@ -1 +0,0 @@ -import{s as f,a as i,e as c,b as m,u as p,g as d,d as h}from"./DHedsUi_.js";import{S as g,i as $,k as M,l as u,m as _,n as b,o as v,p as N}from"./G8UKEBBn.js";import{I as B,g as I,a as S}from"./C1tDbyYL.js";function j(l){let e;const s=l[2].default,n=m(s,l,l[3],null);return{c(){n&&n.c()},l(a){n&&n.l(a)},m(a,t){n&&n.m(a,t),e=!0},p(a,t){n&&n.p&&(!e||t&8)&&p(n,s,a,a[3],e?h(s,a[3],t,null):d(a[3]),null)},i(a){e||(_(n,a),e=!0)},o(a){u(n,a),e=!1},d(a){n&&n.d(a)}}}function k(l){let e,s;const n=[{name:"building-2"},l[1],{iconNode:l[0]}];let a={$$slots:{default:[j]},$$scope:{ctx:l}};for(let t=0;t{s(1,e=i(i({},e),c(o))),"$$scope"in o&&s(3,a=o.$$scope)},e=c(e),[t,e,n,a]}class Z extends g{constructor(e){super(),$(this,e,q,k,f,{})}}export{Z as B}; diff --git a/web/build/_app/immutable/chunks/DHedsUi_.js b/web/build/_app/immutable/chunks/DHedsUi_.js deleted file mode 100644 index 6b2f32f..0000000 --- a/web/build/_app/immutable/chunks/DHedsUi_.js +++ /dev/null @@ -1 +0,0 @@ -function x(){}function k(t,n){for(const e in n)t[e]=n[e];return t}function w(t){return t()}function z(){return Object.create(null)}function v(t){t.forEach(w)}function S(t){return typeof t=="function"}function A(t,n){return t!=t?n==n:t!==n||t&&typeof t=="object"||typeof t=="function"}function F(t){return Object.keys(t).length===0}function d(t,...n){if(t==null){for(const o of n)o(void 0);return x}const e=t.subscribe(...n);return e.unsubscribe?()=>e.unsubscribe():e}function M(t){let n;return d(t,e=>n=e)(),n}function P(t,n,e){t.$$.on_destroy.push(d(n,e))}function U(t,n,e,o){if(t){const u=p(t,n,e,o);return t[0](u)}}function p(t,n,e,o){return t[1]&&o?k(e.ctx.slice(),t[1](o(n))):e.ctx}function B(t,n,e,o){return t[2],n.dirty}function C(t,n,e,o,u,m){if(u){const y=p(n,e,o,m);t.p(y,u)}}function D(t){if(t.ctx.length>32){const n=[],e=t.ctx.length/32;for(let o=0;ot.indexOf(o)===-1?n.push(o):e.push(o)),e.forEach(o=>o()),r=n}export{j as A,k as a,U as b,P as c,B as d,G as e,E as f,D as g,M as h,_ as i,J as j,H as k,S as l,F as m,x as n,I as o,a as p,z as q,v as r,A as s,K as t,C as u,O as v,i as w,L as x,w as y,s as z}; diff --git a/web/build/_app/immutable/chunks/DIz1JgvC.js b/web/build/_app/immutable/chunks/DIz1JgvC.js deleted file mode 100644 index 93b8c6e..0000000 --- a/web/build/_app/immutable/chunks/DIz1JgvC.js +++ /dev/null @@ -1 +0,0 @@ -import{s as u,a as r,e as i,b as m,u as d,g as p,d as g}from"./DHedsUi_.js";import{S as $,i as h,k as b,l as _,m as f,n as C,o as N,p as I}from"./G8UKEBBn.js";import{I as S,g as j,a as k}from"./C1tDbyYL.js";function q(l){let e;const o=l[2].default,s=m(o,l,l[3],null);return{c(){s&&s.c()},l(n){s&&s.l(n)},m(n,t){s&&s.m(n,t),e=!0},p(n,t){s&&s.p&&(!e||t&8)&&d(s,o,n,n[3],e?g(o,n[3],t,null):p(n[3]),null)},i(n){e||(f(s,n),e=!0)},o(n){_(s,n),e=!1},d(n){s&&s.d(n)}}}function v(l){let e,o;const s=[{name:"credit-card"},l[1],{iconNode:l[0]}];let n={$$slots:{default:[q]},$$scope:{ctx:l}};for(let t=0;t{o(1,e=r(r({},e),i(a))),"$$scope"in a&&o(3,n=a.$$scope)},e=i(e),[t,e,s,n]}class B extends ${constructor(e){super(),h(this,e,w,v,u,{})}}export{B as C}; diff --git a/web/build/_app/immutable/chunks/Db8cSFEn.js b/web/build/_app/immutable/chunks/Db8cSFEn.js deleted file mode 100644 index a26c80e..0000000 --- a/web/build/_app/immutable/chunks/Db8cSFEn.js +++ /dev/null @@ -1 +0,0 @@ -import{s as u,a as r,e as i,b as m,u as p,g as d,d as g}from"./DHedsUi_.js";import{S as h,i as $,k as M,l as f,m as _,n as b,o as v,p as N}from"./G8UKEBBn.js";import{I,g as L,a as R}from"./C1tDbyYL.js";function S(l){let e;const a=l[2].default,n=m(a,l,l[3],null);return{c(){n&&n.c()},l(s){n&&n.l(s)},m(s,t){n&&n.m(s,t),e=!0},p(s,t){n&&n.p&&(!e||t&8)&&p(n,a,s,s[3],e?g(a,s[3],t,null):d(s[3]),null)},i(s){e||(_(n,s),e=!0)},o(s){f(n,s),e=!1},d(s){n&&n.d(s)}}}function j(l){let e,a;const n=[{name:"refresh-cw"},l[1],{iconNode:l[0]}];let s={$$slots:{default:[S]},$$scope:{ctx:l}};for(let t=0;t{a(1,e=r(r({},e),i(o))),"$$scope"in o&&a(3,s=o.$$scope)},e=i(e),[t,e,n,s]}class H extends h{constructor(e){super(),$(this,e,k,j,u,{})}}export{H as R}; diff --git a/web/build/_app/immutable/chunks/DjUyxgK6.js b/web/build/_app/immutable/chunks/DjUyxgK6.js deleted file mode 100644 index 2092dc9..0000000 --- a/web/build/_app/immutable/chunks/DjUyxgK6.js +++ /dev/null @@ -1 +0,0 @@ -import{w as o}from"./oVx0hpG8.js";import{h as p}from"./DHedsUi_.js";const d=o(null),u=o(null),n="/api";async function a(e,t,r,c=!1){const i=p(u),l={};i&&(l.Authorization=i),r&&!c&&(l["Content-Type"]="application/json");const s=await fetch(`${n}${t}`,{method:e,headers:l,body:c?r:r?JSON.stringify(r):void 0,credentials:"include"});if(s.status===401){d.set(null),u.set(null),window.location.href="/login";return}if(!s.ok){const E=await s.text();throw new Error(E||`HTTP ${s.status}`)}return s.status===204?null:s.json()}const m={auth:{login:(e,t)=>a("POST","/auth/login",{email:e,password:t}),logout:()=>a("POST","/auth/logout"),register:e=>a("POST","/auth/register",e),me:()=>a("GET","/me"),updateProfile:e=>a("PUT","/me",e),updatePassword:e=>a("PUT","/me/password",e)},users:{list:()=>a("GET","/users"),delete:e=>a("DELETE",`/users/${e}`)},categories:{list:(e={})=>a("GET",`/categories?${new URLSearchParams(e)}`),create:e=>a("POST","/categories",e),update:(e,t)=>a("PUT",`/categories/${e}`,t),delete:e=>a("DELETE",`/categories/${e}`)},properties:{list:()=>a("GET","/properties"),get:e=>a("GET",`/properties/${e}`),create:e=>a("POST","/properties",e),update:(e,t)=>a("PUT",`/properties/${e}`,t),delete:e=>a("DELETE",`/properties/${e}`)},transactions:{list:(e={})=>a("GET",`/transactions?${new URLSearchParams(e)}`),create:e=>a("POST","/transactions",e),update:(e,t)=>a("PUT",`/transactions/${e}`,t),delete:e=>a("DELETE",`/transactions/${e}`),split:(e,t)=>a("POST",`/transactions/${e}/split`,t),summary:(e={})=>a("GET",`/transactions/summary?${new URLSearchParams(e)}`),monthly:(e={})=>a("GET",`/transactions/monthly?${new URLSearchParams(e)}`),categories:(e={})=>a("GET",`/transactions/categories?${new URLSearchParams(e)}`)},calendar:{list:(e={})=>a("GET",`/calendar?${new URLSearchParams(e)}`),createEvent:e=>a("POST","/calendar",e),updateEvent:(e,t)=>a("PUT",`/calendar/${e}`,t),deleteEvent:e=>a("DELETE",`/calendar/${e}`),stats:(e={})=>a("GET",`/calendar/stats?${new URLSearchParams(e)}`),sync:e=>a("POST",`/calendar/sync/${e}`)},documents:{list:(e={})=>a("GET",`/documents?${new URLSearchParams(e)}`),upload:e=>a("POST","/documents",e,!0),download:e=>`${n}/documents/${e}/download`,delete:e=>a("DELETE",`/documents/${e}`),exportUrl:(e={})=>`${n}/documents/export?${new URLSearchParams(e)}`},loans:{list:(e={})=>a("GET",`/loans?${new URLSearchParams(e)}`),createWithData:e=>a("POST","/loans/create",e),create:e=>a("POST","/loans",e),delete:e=>a("DELETE",`/loans/${e}`),lines:(e,t={})=>a("GET",`/loans/${e}/lines?${new URLSearchParams(t)}`),annualSummary:(e,t={})=>a("GET",`/loans/${e}/summary?${new URLSearchParams(t)}`),uploadLines:(e,t)=>a("POST",`/loans/${e}/lines`,t),splitByDate:(e,t)=>a("GET",`/loans/${e}/split?date=${t}`),splitForDate:e=>a("GET",`/loans/split?date=${e}`)},fiscal:{summary:(e={})=>a("GET",`/fiscal/summary?${new URLSearchParams(e)}`),exportUrl:(e={})=>`${n}/fiscal/export?${new URLSearchParams(e)}`}},$=o([]),T=o(null);async function h(){const e=await m.properties.list();$.set(e||[]),!p(T)&&(e==null?void 0:e.length)>0&&T.set(e[0])}export{m as a,u as b,d as c,h as l,$ as p}; diff --git a/web/build/_app/immutable/chunks/G8UKEBBn.js b/web/build/_app/immutable/chunks/G8UKEBBn.js deleted file mode 100644 index a57a4b6..0000000 --- a/web/build/_app/immutable/chunks/G8UKEBBn.js +++ /dev/null @@ -1 +0,0 @@ -var C=Object.defineProperty;var I=(e,t,n)=>t in e?C(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var $=(e,t,n)=>I(e,typeof t!="symbol"?t+"":t,n);import{r as h,n as y,l as E,m as B,p as j,q as w,v as q,w as b,x as D,f as N,y as H,z as L,A as O}from"./DHedsUi_.js";let p=!1;function P(){p=!0}function T(){p=!1}function z(e,t,n,i){for(;e>1);n(s)<=i?e=s+1:t=s}return e}function M(e){if(e.hydrate_init)return;e.hydrate_init=!0;let t=e.childNodes;if(e.nodeName==="HEAD"){const r=[];for(let l=0;l0&&t[n[s]].claim_order<=l?s+1:z(1,s,d=>t[n[d]].claim_order,l))-1;i[r]=n[o]+1;const f=o+1;n[f]=r,s=Math.max(f,s)}const c=[],a=[];let u=t.length-1;for(let r=n[s]+1;r!=0;r=i[r-1]){for(c.push(t[r-1]);u>=r;u--)a.push(t[u]);u--}for(;u>=0;u--)a.push(t[u]);c.reverse(),a.sort((r,l)=>r.claim_order-l.claim_order);for(let r=0,l=0;r=c[l].claim_order;)l++;const o=le.removeEventListener(t,n,i)}function ae(e){return function(t){return t.preventDefault(),e.call(this,t)}}function ue(e){return function(t){t.target===this&&e.call(this,t)}}function R(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function ce(e,t){for(const n in t)R(e,n,t[n])}function fe(e){return e.dataset.svelteH}function oe(e){let t;return{p(...n){t=n,t.forEach(i=>e.push(i))},r(){t.forEach(n=>e.splice(e.indexOf(n),1))}}}function _e(e){return e===""?null:+e}function U(e){return Array.from(e.childNodes)}function V(e){e.claim_info===void 0&&(e.claim_info={last_index:0,total_claimed:0})}function S(e,t,n,i,s=!1){V(e);const c=(()=>{for(let a=e.claim_info.last_index;a=0;a--){const u=e[a];if(t(u)){const r=n(u);return r===void 0?e.splice(a,1):e[a]=r,s?r===void 0&&e.claim_info.last_index--:e.claim_info.last_index=a,u}}return i()})();return c.claim_order=e.claim_info.total_claimed,e.claim_info.total_claimed+=1,c}function A(e,t,n,i){return S(e,s=>s.nodeName===t,s=>{const c=[];for(let a=0;as.removeAttribute(a))},()=>i(t))}function de(e,t,n){return A(e,t,n,J)}function me(e,t,n){return A(e,t,n,K)}function W(e,t){return S(e,n=>n.nodeType===3,n=>{const i=""+t;if(n.data.startsWith(i)){if(n.data.length!==i.length)return n.splitText(i.length)}else n.data=i},()=>x(t),!0)}function he(e){return W(e," ")}function pe(e,t){t=""+t,e.data!==t&&(e.data=t)}function $e(e,t){e.value=t??""}function ye(e,t,n,i){n==null?e.style.removeProperty(t):e.style.setProperty(t,n,"")}function xe(e,t,n){for(let i=0;i{m.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function Ee(e){e&&e.c()}function Se(e,t){e&&e.l(t)}function X(e,t,n){const{fragment:i,after_update:s}=e.$$;i&&i.m(t,n),N(()=>{const c=e.$$.on_mount.map(H).filter(E);e.$$.on_destroy?e.$$.on_destroy.push(...c):h(c),e.$$.on_mount=[]}),s.forEach(N)}function Y(e,t){const n=e.$$;n.fragment!==null&&(D(n.after_update),h(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Z(e,t){e.$$.dirty[0]===-1&&(L.push(e),O(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const v=g.length?g[0]:d;return l.ctx&&s(l.ctx[f],l.ctx[f]=v)&&(!l.skip_bound&&l.bound[f]&&l.bound[f](v),o&&Z(e,f)),d}):[],l.update(),o=!0,h(l.before_update),l.fragment=i?i(l.ctx):!1,t.target){if(t.hydrate){P();const f=U(t.target);l.fragment&&l.fragment.l(f),f.forEach(G)}else l.fragment&&l.fragment.c();t.intro&&Q(e.$$.fragment),X(e,t.target,t.anchor),T(),q()}b(r)}class Ce{constructor(){$(this,"$$");$(this,"$$set")}$destroy(){Y(this,1),this.$destroy=y}$on(t,n){if(!E(n))return y;const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const s=i.indexOf(n);s!==-1&&i.splice(s,1)}}$set(t){this.$$set&&!B(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const k="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(k);export{xe as A,ge as B,oe as C,ue as D,ae as E,_e as F,ve as G,ye as H,ce as I,me as J,K,Ce as S,ne as a,F as b,de as c,G as d,U as e,W as f,he as g,J as h,Ae as i,re as j,Y as k,Ne as l,Q as m,X as n,Se as o,Ee as p,be as q,le as r,pe as s,x as t,R as u,fe as v,se as w,ie as x,we as y,$e as z}; diff --git a/web/build/_app/immutable/chunks/eC_GsYA7.js b/web/build/_app/immutable/chunks/eC_GsYA7.js deleted file mode 100644 index 8700520..0000000 --- a/web/build/_app/immutable/chunks/eC_GsYA7.js +++ /dev/null @@ -1 +0,0 @@ -import{s as u,a as r,e as i,b as m,u as p,g as d,d as g}from"./DHedsUi_.js";import{S as $,i as h,k as b,l as _,m as f,n as N,o as y,p as A}from"./G8UKEBBn.js";import{I,g as S,a as j}from"./C1tDbyYL.js";function k(l){let e;const o=l[2].default,s=m(o,l,l[3],null);return{c(){s&&s.c()},l(n){s&&s.l(n)},m(n,t){s&&s.m(n,t),e=!0},p(n,t){s&&s.p&&(!e||t&8)&&p(s,o,n,n[3],e?g(o,n[3],t,null):d(n[3]),null)},i(n){e||(f(s,n),e=!0)},o(n){_(s,n),e=!1},d(n){s&&s.d(n)}}}function q(l){let e,o;const s=[{name:"alert-circle"},l[1],{iconNode:l[0]}];let n={$$slots:{default:[k]},$$scope:{ctx:l}};for(let t=0;t{o(1,e=r(r({},e),i(a))),"$$scope"in a&&o(3,n=a.$$scope)},e=i(e),[t,e,s,n]}class D extends ${constructor(e){super(),h(this,e,v,q,u,{})}}export{D as A}; diff --git a/web/build/_app/immutable/chunks/oVx0hpG8.js b/web/build/_app/immutable/chunks/oVx0hpG8.js deleted file mode 100644 index 20220a7..0000000 --- a/web/build/_app/immutable/chunks/oVx0hpG8.js +++ /dev/null @@ -1 +0,0 @@ -import{n as f,s as l}from"./DHedsUi_.js";const e=[];function h(n,b=f){let i;const o=new Set;function r(t){if(l(n,t)&&(n=t,i)){const c=!e.length;for(const s of o)s[1](),e.push(s,n);if(c){for(let s=0;s{o.delete(s),o.size===0&&i&&(i(),i=null)}}return{set:r,update:u,subscribe:p}}export{h as w}; diff --git a/web/build/_app/immutable/chunks/zQrtb5Kq.js b/web/build/_app/immutable/chunks/zQrtb5Kq.js deleted file mode 100644 index 47cd16a..0000000 --- a/web/build/_app/immutable/chunks/zQrtb5Kq.js +++ /dev/null @@ -1 +0,0 @@ -import{s as _,a as c,e as i,b as m,u as p,g as d,d as g}from"./DHedsUi_.js";import{S as $,i as h,k as b,l as f,m as u,n as k,o as C,p as N}from"./G8UKEBBn.js";import{I,g as S,a as j}from"./C1tDbyYL.js";function q(l){let e;const o=l[2].default,s=m(o,l,l[3],null);return{c(){s&&s.c()},l(n){s&&s.l(n)},m(n,t){s&&s.m(n,t),e=!0},p(n,t){s&&s.p&&(!e||t&8)&&p(s,o,n,n[3],e?g(o,n[3],t,null):d(n[3]),null)},i(n){e||(u(s,n),e=!0)},o(n){f(s,n),e=!1},d(n){s&&s.d(n)}}}function v(l){let e,o;const s=[{name:"check"},l[1],{iconNode:l[0]}];let n={$$slots:{default:[q]},$$scope:{ctx:l}};for(let t=0;t{o(1,e=c(c({},e),i(a))),"$$scope"in a&&o(3,n=a.$$scope)},e=i(e),[t,e,s,n]}class D extends ${constructor(e){super(),h(this,e,M,v,_,{})}}export{D as C}; diff --git a/web/build/_app/immutable/entry/app.CdLU2Zc4.js b/web/build/_app/immutable/entry/app.CdLU2Zc4.js deleted file mode 100644 index 3802afa..0000000 --- a/web/build/_app/immutable/entry/app.CdLU2Zc4.js +++ /dev/null @@ -1,2 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.DFf2-eFR.js","../chunks/DHedsUi_.js","../chunks/G8UKEBBn.js","../chunks/C1tDbyYL.js","../chunks/CEKnDucw.js","../chunks/6cgBTYw-.js","../chunks/oVx0hpG8.js","../chunks/DjUyxgK6.js","../chunks/D3KWQg4I.js","../chunks/DIz1JgvC.js","../chunks/C7zepb3B.js","../chunks/B9ru2HtO.js","../chunks/CNY58Upt.js","../chunks/BojKV9te.js","../chunks/Betcpvy2.js","../chunks/BYJWe3D5.js","../chunks/CImgxE6m.js","../assets/0.D9W-GzMQ.css","../nodes/1.B1rRQsgb.js","../nodes/2.Bm5TUCsw.js","../chunks/Db8cSFEn.js","../chunks/7IRyKQzz.js","../nodes/3.DMsI14gA.js","../chunks/CLS07P5K.js","../chunks/C_l6I72z.js","../chunks/zQrtb5Kq.js","../nodes/4.CoOqOv0Y.js","../chunks/eC_GsYA7.js","../chunks/C_K4PjIw.js","../chunks/7MWtQ_HQ.js","../nodes/5.DZw7u2fg.js","../nodes/6.BT2j549n.js","../chunks/CUwAs-mp.js","../nodes/7.C8SC4dD8.js","../chunks/2JpTzebs.js","../nodes/8.By7Q-xW8.js","../nodes/9.DcGrZhBA.js","../nodes/10.B_2_uNhq.js","../nodes/11.BwpkXZtE.js","../nodes/12.D8a8HBoC.js","../nodes/13.D1xscHx8.js"])))=>i.map(i=>d[i]); -import{s as N,j as B,o as U,t as G,i as T}from"../chunks/DHedsUi_.js";import{S as H,i as W,d as h,l as E,m as g,y as D,q as I,a as k,g as z,w,j as F,G as R,k as O,p as L,n as A,o as y,u as V,H as d,c as J,e as K,h as Q,s as X,f as Y,t as Z}from"../chunks/G8UKEBBn.js";const M="modulepreload",$=function(o,e){return new URL(o,e).href},S={},m=function(e,n,i){let s=Promise.resolve();if(n&&n.length>0){const t=document.getElementsByTagName("link"),r=document.querySelector("meta[property=csp-nonce]"),a=(r==null?void 0:r.nonce)||(r==null?void 0:r.getAttribute("nonce"));s=Promise.allSettled(n.map(c=>{if(c=$(c,i),c in S)return;S[c]=!0;const l=c.endsWith(".css"),u=l?'[rel="stylesheet"]':"";if(!!i)for(let v=t.length-1;v>=0;v--){const P=t[v];if(P.href===c&&(!l||P.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${c}"]${u}`))return;const p=document.createElement("link");if(p.rel=l?"stylesheet":M,l||(p.as="script"),p.crossOrigin="",p.href=c,a&&p.setAttribute("nonce",a),document.head.appendChild(p),l)return new Promise((v,P)=>{p.addEventListener("load",v),p.addEventListener("error",()=>P(new Error(`Unable to preload CSS for ${c}`)))})}))}function _(t){const r=new Event("vite:preloadError",{cancelable:!0});if(r.payload=t,window.dispatchEvent(r),!r.defaultPrevented)throw t}return s.then(t=>{for(const r of t||[])r.status==="rejected"&&_(r.reason);return e().catch(_)})},ae={};function x(o){let e,n,i;var s=o[2][0];function _(t,r){return{props:{data:t[4],form:t[3],params:t[1].params}}}return s&&(e=R(s,_(o)),o[12](e)),{c(){e&&L(e.$$.fragment),n=w()},l(t){e&&y(e.$$.fragment,t),n=w()},m(t,r){e&&A(e,t,r),k(t,n,r),i=!0},p(t,r){if(r&4&&s!==(s=t[2][0])){if(e){D();const a=e;E(a.$$.fragment,1,0,()=>{O(a,1)}),I()}s?(e=R(s,_(t)),t[12](e),L(e.$$.fragment),g(e.$$.fragment,1),A(e,n.parentNode,n)):e=null}else if(s){const a={};r&16&&(a.data=t[4]),r&8&&(a.form=t[3]),r&2&&(a.params=t[1].params),e.$set(a)}},i(t){i||(e&&g(e.$$.fragment,t),i=!0)},o(t){e&&E(e.$$.fragment,t),i=!1},d(t){t&&h(n),o[12](null),e&&O(e,t)}}}function ee(o){let e,n,i;var s=o[2][0];function _(t,r){return{props:{data:t[4],params:t[1].params,$$slots:{default:[te]},$$scope:{ctx:t}}}}return s&&(e=R(s,_(o)),o[11](e)),{c(){e&&L(e.$$.fragment),n=w()},l(t){e&&y(e.$$.fragment,t),n=w()},m(t,r){e&&A(e,t,r),k(t,n,r),i=!0},p(t,r){if(r&4&&s!==(s=t[2][0])){if(e){D();const a=e;E(a.$$.fragment,1,0,()=>{O(a,1)}),I()}s?(e=R(s,_(t)),t[11](e),L(e.$$.fragment),g(e.$$.fragment,1),A(e,n.parentNode,n)):e=null}else if(s){const a={};r&16&&(a.data=t[4]),r&2&&(a.params=t[1].params),r&8239&&(a.$$scope={dirty:r,ctx:t}),e.$set(a)}},i(t){i||(e&&g(e.$$.fragment,t),i=!0)},o(t){e&&E(e.$$.fragment,t),i=!1},d(t){t&&h(n),o[11](null),e&&O(e,t)}}}function te(o){let e,n,i;var s=o[2][1];function _(t,r){return{props:{data:t[5],form:t[3],params:t[1].params}}}return s&&(e=R(s,_(o)),o[10](e)),{c(){e&&L(e.$$.fragment),n=w()},l(t){e&&y(e.$$.fragment,t),n=w()},m(t,r){e&&A(e,t,r),k(t,n,r),i=!0},p(t,r){if(r&4&&s!==(s=t[2][1])){if(e){D();const a=e;E(a.$$.fragment,1,0,()=>{O(a,1)}),I()}s?(e=R(s,_(t)),t[10](e),L(e.$$.fragment),g(e.$$.fragment,1),A(e,n.parentNode,n)):e=null}else if(s){const a={};r&32&&(a.data=t[5]),r&8&&(a.form=t[3]),r&2&&(a.params=t[1].params),e.$set(a)}},i(t){i||(e&&g(e.$$.fragment,t),i=!0)},o(t){e&&E(e.$$.fragment,t),i=!1},d(t){t&&h(n),o[10](null),e&&O(e,t)}}}function j(o){let e,n=o[7]&&q(o);return{c(){e=Q("div"),n&&n.c(),this.h()},l(i){e=J(i,"DIV",{id:!0,"aria-live":!0,"aria-atomic":!0,style:!0});var s=K(e);n&&n.l(s),s.forEach(h),this.h()},h(){V(e,"id","svelte-announcer"),V(e,"aria-live","assertive"),V(e,"aria-atomic","true"),d(e,"position","absolute"),d(e,"left","0"),d(e,"top","0"),d(e,"clip","rect(0 0 0 0)"),d(e,"clip-path","inset(50%)"),d(e,"overflow","hidden"),d(e,"white-space","nowrap"),d(e,"width","1px"),d(e,"height","1px")},m(i,s){k(i,e,s),n&&n.m(e,null)},p(i,s){i[7]?n?n.p(i,s):(n=q(i),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},d(i){i&&h(e),n&&n.d()}}}function q(o){let e;return{c(){e=Z(o[8])},l(n){e=Y(n,o[8])},m(n,i){k(n,e,i)},p(n,i){i&256&&X(e,n[8])},d(n){n&&h(e)}}}function ne(o){let e,n,i,s,_;const t=[ee,x],r=[];function a(l,u){return l[2][1]?0:1}e=a(o),n=r[e]=t[e](o);let c=o[6]&&j(o);return{c(){n.c(),i=F(),c&&c.c(),s=w()},l(l){n.l(l),i=z(l),c&&c.l(l),s=w()},m(l,u){r[e].m(l,u),k(l,i,u),c&&c.m(l,u),k(l,s,u),_=!0},p(l,[u]){let b=e;e=a(l),e===b?r[e].p(l,u):(D(),E(r[b],1,1,()=>{r[b]=null}),I(),n=r[e],n?n.p(l,u):(n=r[e]=t[e](l),n.c()),g(n,1),n.m(i.parentNode,i)),l[6]?c?c.p(l,u):(c=j(l),c.c(),c.m(s.parentNode,s)):c&&(c.d(1),c=null)},i(l){_||(g(n),_=!0)},o(l){E(n),_=!1},d(l){l&&(h(i),h(s)),r[e].d(l),c&&c.d(l)}}}function re(o,e,n){let{stores:i}=e,{page:s}=e,{constructors:_}=e,{components:t=[]}=e,{form:r}=e,{data_0:a=null}=e,{data_1:c=null}=e;B(i.page.notify);let l=!1,u=!1,b=null;U(()=>{const f=i.page.subscribe(()=>{l&&(n(7,u=!0),G().then(()=>{n(8,b=document.title||"untitled page")}))});return n(6,l=!0),f});function p(f){T[f?"unshift":"push"](()=>{t[1]=f,n(0,t)})}function v(f){T[f?"unshift":"push"](()=>{t[0]=f,n(0,t)})}function P(f){T[f?"unshift":"push"](()=>{t[0]=f,n(0,t)})}return o.$$set=f=>{"stores"in f&&n(9,i=f.stores),"page"in f&&n(1,s=f.page),"constructors"in f&&n(2,_=f.constructors),"components"in f&&n(0,t=f.components),"form"in f&&n(3,r=f.form),"data_0"in f&&n(4,a=f.data_0),"data_1"in f&&n(5,c=f.data_1)},o.$$.update=()=>{o.$$.dirty&514&&i.page.set(s)},[t,s,_,r,a,c,l,u,b,i,p,v,P]}class le extends H{constructor(e){super(),W(this,e,re,ne,N,{stores:9,page:1,constructors:2,components:0,form:3,data_0:4,data_1:5})}}const ce=[()=>m(()=>import("../nodes/0.DFf2-eFR.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]),import.meta.url),()=>m(()=>import("../nodes/1.B1rRQsgb.js"),__vite__mapDeps([18,1,2,4,5,6]),import.meta.url),()=>m(()=>import("../nodes/2.Bm5TUCsw.js"),__vite__mapDeps([19,1,2,3,7,6,20,21,11]),import.meta.url),()=>m(()=>import("../nodes/3.DMsI14gA.js"),__vite__mapDeps([22,1,2,3,7,6,11,20,23,24,25]),import.meta.url),()=>m(()=>import("../nodes/4.CoOqOv0Y.js"),__vite__mapDeps([26,1,2,3,7,6,10,23,24,25,27,28,29]),import.meta.url),()=>m(()=>import("../nodes/5.DZw7u2fg.js"),__vite__mapDeps([30,1,2,3,7,6,12,14,13,29]),import.meta.url),()=>m(()=>import("../nodes/6.BT2j549n.js"),__vite__mapDeps([31,1,2,3,7,6,32,13,21]),import.meta.url),()=>m(()=>import("../nodes/7.C8SC4dD8.js"),__vite__mapDeps([33,1,2,3,7,6,32,27,25,34,24,14,10]),import.meta.url),()=>m(()=>import("../nodes/8.By7Q-xW8.js"),__vite__mapDeps([35,1,2,3,7,6,8,24,29,27,25]),import.meta.url),()=>m(()=>import("../nodes/9.DcGrZhBA.js"),__vite__mapDeps([36,1,2,5,6,7]),import.meta.url),()=>m(()=>import("../nodes/10.B_2_uNhq.js"),__vite__mapDeps([37,1,2,7,6,16,3,25,27]),import.meta.url),()=>m(()=>import("../nodes/11.BwpkXZtE.js"),__vite__mapDeps([38,1,2,3,7,6,8,23,24,25,28,29,20]),import.meta.url),()=>m(()=>import("../nodes/12.D8a8HBoC.js"),__vite__mapDeps([39,1,2,3,7,6,9,23,21,24,25,34,28,29]),import.meta.url),()=>m(()=>import("../nodes/13.D1xscHx8.js"),__vite__mapDeps([40,1,2,3,7,6,15,23,25,24,27,29]),import.meta.url)],fe=[],_e={"/":[2],"/calendar":[3],"/categories":[4],"/documents":[5],"/fiscal":[6],"/import":[7],"/loans":[8],"/login":[9],"/profile":[10],"/properties":[11],"/transactions":[12],"/users":[13]},C={handleError:({error:o})=>{console.error(o)},reroute:()=>{},transport:{}},ie=Object.fromEntries(Object.entries(C.transport).map(([o,e])=>[o,e.decode])),ue=Object.fromEntries(Object.entries(C.transport).map(([o,e])=>[o,e.encode])),me=!1,pe=(o,e)=>ie[o](e);export{pe as decode,ie as decoders,_e as dictionary,ue as encoders,me as hash,C as hooks,ae as matchers,ce as nodes,le as root,fe as server_loads}; diff --git a/web/build/_app/immutable/entry/start.C3I7xU3P.js b/web/build/_app/immutable/entry/start.C3I7xU3P.js deleted file mode 100644 index 303a33b..0000000 --- a/web/build/_app/immutable/entry/start.C3I7xU3P.js +++ /dev/null @@ -1 +0,0 @@ -import{l as o,a as r}from"../chunks/6cgBTYw-.js";export{o as load_css,r as start}; diff --git a/web/build/_app/immutable/nodes/0.DFf2-eFR.js b/web/build/_app/immutable/nodes/0.DFf2-eFR.js deleted file mode 100644 index 291769a..0000000 --- a/web/build/_app/immutable/nodes/0.DFf2-eFR.js +++ /dev/null @@ -1 +0,0 @@ -import{s as ie,a as C,e as K,b as Z,u as ee,g as te,d as re,c as Ae,o as Je,n as ye,r as Ke}from"../chunks/DHedsUi_.js";import{S as fe,i as ce,k as I,l as v,m as p,n as A,o as q,p as B,d as k,q as X,a as le,w as Be,u as w,c as x,v as Fe,h as N,x as Le,s as Ve,b as m,r as Se,e as T,g as M,f as G,j as U,t as J,G as se,y as Y}from"../chunks/G8UKEBBn.js";import{I as xe,g as Ne,a as Ee,e as oe}from"../chunks/C1tDbyYL.js";import{p as Re}from"../chunks/CEKnDucw.js";import{g as ke}from"../chunks/6cgBTYw-.js";import{a as je,c as we,b as We}from"../chunks/DjUyxgK6.js";import{B as ze}from"../chunks/D3KWQg4I.js";import{C as Xe}from"../chunks/DIz1JgvC.js";import{T as Ye}from"../chunks/C7zepb3B.js";import{C as Ze}from"../chunks/B9ru2HtO.js";import{F as et}from"../chunks/CNY58Upt.js";import{D as tt}from"../chunks/BojKV9te.js";import{U as rt}from"../chunks/Betcpvy2.js";import{U as lt}from"../chunks/BYJWe3D5.js";import{U as nt}from"../chunks/CImgxE6m.js";const at=!1,ot=!1,Ht=Object.freeze(Object.defineProperty({__proto__:null,prerender:at,ssr:ot},Symbol.toStringTag,{value:"Module"}));function st(a){let e;const t=a[2].default,r=Z(t,a,a[3],null);return{c(){r&&r.c()},l(l){r&&r.l(l)},m(l,n){r&&r.m(l,n),e=!0},p(l,n){r&&r.p&&(!e||n&8)&&ee(r,t,l,l[3],e?re(t,l[3],n,null):te(l[3]),null)},i(l){e||(p(r,l),e=!0)},o(l){v(r,l),e=!1},d(l){r&&r.d(l)}}}function it(a){let e,t;const r=[{name:"layout-dashboard"},a[1],{iconNode:a[0]}];let l={$$slots:{default:[st]},$$scope:{ctx:a}};for(let n=0;n{t(1,e=C(C({},e),K(o))),"$$scope"in o&&t(3,l=o.$$scope)},e=K(e),[n,e,r,l]}class ct extends fe{constructor(e){super(),ce(this,e,ft,it,ie,{})}}function ut(a){let e;const t=a[2].default,r=Z(t,a,a[3],null);return{c(){r&&r.c()},l(l){r&&r.l(l)},m(l,n){r&&r.m(l,n),e=!0},p(l,n){r&&r.p&&(!e||n&8)&&ee(r,t,l,l[3],e?re(t,l[3],n,null):te(l[3]),null)},i(l){e||(p(r,l),e=!0)},o(l){v(r,l),e=!1},d(l){r&&r.d(l)}}}function dt(a){let e,t;const r=[{name:"log-out"},a[1],{iconNode:a[0]}];let l={$$slots:{default:[ut]},$$scope:{ctx:a}};for(let n=0;n{t(1,e=C(C({},e),K(o))),"$$scope"in o&&t(3,l=o.$$scope)},e=K(e),[n,e,r,l]}class mt extends fe{constructor(e){super(),ce(this,e,ht,dt,ie,{})}}function gt(a){let e;const t=a[2].default,r=Z(t,a,a[3],null);return{c(){r&&r.c()},l(l){r&&r.l(l)},m(l,n){r&&r.m(l,n),e=!0},p(l,n){r&&r.p&&(!e||n&8)&&ee(r,t,l,l[3],e?re(t,l[3],n,null):te(l[3]),null)},i(l){e||(p(r,l),e=!0)},o(l){v(r,l),e=!1},d(l){r&&r.d(l)}}}function _t(a){let e,t;const r=[{name:"power-off"},a[1],{iconNode:a[0]}];let l={$$slots:{default:[gt]},$$scope:{ctx:a}};for(let n=0;n{t(1,e=C(C({},e),K(o))),"$$scope"in o&&t(3,l=o.$$scope)},e=K(e),[n,e,r,l]}class bt extends fe{constructor(e){super(),ce(this,e,pt,_t,ie,{})}}function He(a,e,t){const r=a.slice();return r[9]=e[t],r}function Oe(a,e,t){const r=a.slice();return r[9]=e[t],r}function $t(a){let e;const t=a[8].default,r=Z(t,a,a[7],null);return{c(){r&&r.c()},l(l){r&&r.l(l)},m(l,n){r&&r.m(l,n),e=!0},p(l,n){r&&r.p&&(!e||n&128)&&ee(r,t,l,l[7],e?re(t,l[7],n,null):te(l[7]),null)},i(l){e||(p(r,l),e=!0)},o(l){v(r,l),e=!1},d(l){r&&r.d(l)}}}function vt(a){var De,Me;let e,t,r,l='🏠 Mes Locations',n,o,u,i,h,c,b,$=(((Me=(De=a[1].name)==null?void 0:De[0])==null?void 0:Me.toUpperCase())??"?")+"",ne,ue,F,R=a[1].name+"",ae,de,L,j,he,me,V,z,ge,_e,Q,S,pe,Te,H=oe(a[2]),g=[];for(let s=0;sv(g[s],1,1,()=>{g[s]=null});let O=oe(a[3]),_=[];for(let s=0;sv(_[s],1,1,()=>{_[s]=null});j=new mt({props:{size:17}}),z=new bt({props:{size:17}});const be=a[8].default,E=Z(be,a,a[7],null);return{c(){e=N("div"),t=N("aside"),r=N("div"),r.innerHTML=l,n=U(),o=N("nav");for(let s=0;s{I($,1)}),X()}i?(t=se(i,h()),B(t.$$.fragment),p(t.$$.fragment,1),A(t,e,r)):t=null}},i(c){u||(t&&p(t.$$.fragment,c),u=!0)},o(c){t&&v(t.$$.fragment,c),u=!1},d(c){c&&k(e),t&&I(t)}}}function qe(a){let e,t,r,l=a[9].label+"",n,o;var u=a[9].icon;function i(h,c){return{props:{size:17}}}return u&&(t=se(u,i())),{c(){e=N("a"),t&&B(t.$$.fragment),r=U(),n=J(l),this.h()},l(h){e=x(h,"A",{href:!0,class:!0});var c=T(e);t&&q(t.$$.fragment,c),r=M(c),n=G(c,l),c.forEach(k),this.h()},h(){w(e,"href",a[9].href),w(e,"class","flex items-center gap-3 px-3 py-2 rounded-lg text-sm transition-colors "+(a[5](a[9].href)?"bg-blue-50 dark:bg-blue-950 text-blue-700 dark:text-blue-300 font-medium":"text-gray-600 dark:text-gray-400 hover:bg-gray-50 dark:hover:bg-gray-800 hover:text-gray-900 dark:hover:text-gray-200"))},m(h,c){le(h,e,c),t&&A(t,e,null),m(e,r),m(e,n),o=!0},p(h,c){if(u!==(u=h[9].icon)){if(t){Y();const b=t;v(b.$$.fragment,1,0,()=>{I(b,1)}),X()}u?(t=se(u,i()),B(t.$$.fragment),p(t.$$.fragment,1),A(t,e,r)):t=null}},i(h){o||(t&&p(t.$$.fragment,h),o=!0)},o(h){t&&v(t.$$.fragment,h),o=!1},d(h){h&&k(e),t&&I(t)}}}function kt(a){let e,t,r,l;const n=[yt,vt,$t],o=[];function u(i,h){return i[0]?i[1]?1:2:0}return e=u(a),t=o[e]=n[e](a),{c(){t.c(),r=Be()},l(i){t.l(i),r=Be()},m(i,h){o[e].m(i,h),le(i,r,h),l=!0},p(i,[h]){let c=e;e=u(i),e===c?o[e].p(i,h):(Y(),v(o[c],1,1,()=>{o[c]=null}),X(),t=o[e],t?t.p(i,h):(t=o[e]=n[e](i),t.c()),p(t,1),t.m(r.parentNode,r))},i(i){l||(p(t),l=!0)},o(i){v(t),l=!1},d(i){i&&k(r),o[e].d(i)}}}async function wt(){if(confirm("Arrêter l'application ?"))try{await fetch("/api/shutdown",{method:"POST",credentials:"include"})}catch{}}function xt(a,e,t){let r,l;Ae(a,Re,$=>t(6,r=$)),Ae(a,we,$=>t(1,l=$));let{$$slots:n={},$$scope:o}=e,u=!1;const i=[{href:"/",label:"Dashboard",icon:ct},{href:"/properties",label:"Biens",icon:ze},{href:"/transactions",label:"Transactions",icon:Xe},{href:"/categories",label:"Catégories",icon:Ye},{href:"/calendar",label:"Calendrier",icon:Ze},{href:"/documents",label:"Documents",icon:et},{href:"/fiscal",label:"Export fiscal",icon:tt},{href:"/loans",label:"Prêts",icon:ze},{href:"/import",label:"Import bancaire",icon:rt}],h=[{href:"/users",label:"Utilisateurs",icon:lt},{href:"/profile",label:"Mon profil",icon:nt}];Je(async()=>{if(r.url.pathname==="/login"){t(0,u=!0);return}if(!l)try{const $=await je.auth.me();if($)we.set($);else{ke("/login");return}}catch{ke("/login");return}t(0,u=!0)});async function c(){await je.auth.logout(),we.set(null),We.set(null),ke("/login")}function b($){return r.url.pathname===$}return a.$$set=$=>{"$$scope"in $&&t(7,o=$.$$scope)},a.$$.update=()=>{a.$$.dirty&64&&r.url.pathname==="/login"&&t(0,u=!0)},[u,l,i,h,c,b,r,o,n]}class Ot extends fe{constructor(e){super(),ce(this,e,xt,kt,ie,{})}}export{Ot as component,Ht as universal}; diff --git a/web/build/_app/immutable/nodes/1.B1rRQsgb.js b/web/build/_app/immutable/nodes/1.B1rRQsgb.js deleted file mode 100644 index e1eb0b0..0000000 --- a/web/build/_app/immutable/nodes/1.B1rRQsgb.js +++ /dev/null @@ -1 +0,0 @@ -import{s as x,n as u,c as S}from"../chunks/DHedsUi_.js";import{S as j,i as q,d as c,s as h,a as _,b as d,c as v,e as g,f as b,g as y,h as E,t as $,j as C}from"../chunks/G8UKEBBn.js";import{p as H}from"../chunks/CEKnDucw.js";function P(p){var f;let a,s=p[0].status+"",r,o,n,i=((f=p[0].error)==null?void 0:f.message)+"",m;return{c(){a=E("h1"),r=$(s),o=C(),n=E("p"),m=$(i)},l(e){a=v(e,"H1",{});var t=g(a);r=b(t,s),t.forEach(c),o=y(e),n=v(e,"P",{});var l=g(n);m=b(l,i),l.forEach(c)},m(e,t){_(e,a,t),d(a,r),_(e,o,t),_(e,n,t),d(n,m)},p(e,[t]){var l;t&1&&s!==(s=e[0].status+"")&&h(r,s),t&1&&i!==(i=((l=e[0].error)==null?void 0:l.message)+"")&&h(m,i)},i:u,o:u,d(e){e&&(c(a),c(o),c(n))}}}function k(p,a,s){let r;return S(p,H,o=>s(0,r=o)),[r]}class B extends j{constructor(a){super(),q(this,a,k,P,x,{})}}export{B as component}; diff --git a/web/build/_app/immutable/nodes/10.B_2_uNhq.js b/web/build/_app/immutable/nodes/10.B_2_uNhq.js deleted file mode 100644 index 2607e01..0000000 --- a/web/build/_app/immutable/nodes/10.B_2_uNhq.js +++ /dev/null @@ -1 +0,0 @@ -import{s as ft,a as Ge,e as rt,b as mt,u as bt,g as _t,d as ht,r as vt,c as xt,o as yt}from"../chunks/DHedsUi_.js";import{S as ct,i as gt,k as q,l as $,m as w,n as O,o as S,p as K,d as b,q as st,z as L,s as De,a as Je,b as s,r as se,u as i,c as f,e as y,g as _,v as de,f as fe,h as c,j as h,t as ce,y as at}from"../chunks/G8UKEBBn.js";import{a as nt,c as lt}from"../chunks/DjUyxgK6.js";import{U as ot}from"../chunks/CImgxE6m.js";import{C as wt}from"../chunks/zQrtb5Kq.js";import{I as kt,g as $t,a as Et}from"../chunks/C1tDbyYL.js";import{A as pt}from"../chunks/eC_GsYA7.js";function Ct(l){let e;const t=l[2].default,o=mt(t,l,l[3],null);return{c(){o&&o.c()},l(a){o&&o.l(a)},m(a,r){o&&o.m(a,r),e=!0},p(a,r){o&&o.p&&(!e||r&8)&&bt(o,t,a,a[3],e?ht(t,a[3],r,null):_t(a[3]),null)},i(a){e||(w(o,a),e=!0)},o(a){$(o,a),e=!1},d(a){o&&o.d(a)}}}function It(l){let e,t;const o=[{name:"key-round"},l[1],{iconNode:l[0]}];let a={$$slots:{default:[Ct]},$$scope:{ctx:l}};for(let r=0;r{t(1,e=Ge(Ge({},e),rt(g))),"$$scope"in g&&t(3,a=g.$$scope)},e=rt(e),[r,e,o,a]}class ut extends ct{constructor(e){super(),gt(this,e,Dt,It,ft,{})}}function it(l){let e,t,o,a=l[2].text+"",r,g,p;return t=new pt({props:{size:14}}),{c(){e=c("div"),K(t.$$.fragment),o=h(),r=ce(a),this.h()},l(n){e=f(n,"DIV",{class:!0});var d=y(e);S(t.$$.fragment,d),o=_(d),r=fe(d,a),d.forEach(b),this.h()},h(){i(e,"class",g="flex items-center gap-2 text-sm px-4 py-3 rounded-lg mb-4 "+(l[2].type==="success"?"bg-green-50 dark:bg-green-950/30 text-green-700 dark:text-green-300":"bg-red-50 dark:bg-red-950/30 text-red-700 dark:text-red-300"))},m(n,d){Je(n,e,d),O(t,e,null),s(e,o),s(e,r),p=!0},p(n,d){(!p||d&4)&&a!==(a=n[2].text+"")&&De(r,a),(!p||d&4&&g!==(g="flex items-center gap-2 text-sm px-4 py-3 rounded-lg mb-4 "+(n[2].type==="success"?"bg-green-50 dark:bg-green-950/30 text-green-700 dark:text-green-300":"bg-red-50 dark:bg-red-950/30 text-red-700 dark:text-red-300")))&&i(e,"class",g)},i(n){p||(w(t.$$.fragment,n),p=!0)},o(n){$(t.$$.fragment,n),p=!1},d(n){n&&b(e),q(t)}}}function dt(l){let e,t,o,a=l[3].text+"",r,g,p;return t=new pt({props:{size:14}}),{c(){e=c("div"),K(t.$$.fragment),o=h(),r=ce(a),this.h()},l(n){e=f(n,"DIV",{class:!0});var d=y(e);S(t.$$.fragment,d),o=_(d),r=fe(d,a),d.forEach(b),this.h()},h(){i(e,"class",g="flex items-center gap-2 text-sm px-4 py-3 rounded-lg mb-4 "+(l[3].type==="success"?"bg-green-50 dark:bg-green-950/30 text-green-700 dark:text-green-300":"bg-red-50 dark:bg-red-950/30 text-red-700 dark:text-red-300"))},m(n,d){Je(n,e,d),O(t,e,null),s(e,o),s(e,r),p=!0},p(n,d){(!p||d&8)&&a!==(a=n[3].text+"")&&De(r,a),(!p||d&8&&g!==(g="flex items-center gap-2 text-sm px-4 py-3 rounded-lg mb-4 "+(n[3].type==="success"?"bg-green-50 dark:bg-green-950/30 text-green-700 dark:text-green-300":"bg-red-50 dark:bg-red-950/30 text-red-700 dark:text-red-300")))&&i(e,"class",g)},i(n){p||(w(t.$$.fragment,n),p=!0)},o(n){$(t.$$.fragment,n),p=!1},d(n){n&&b(e),q(t)}}}function Vt(l){let e,t,o,a,r,g="Mon profil",p,n,d,U,ge,pe,ae,E,M,T,k="Nom affiché",Ve,B,Pe,Z,F,Qe="Adresse email",Ne,A,ze,ne,I,G,Le,me=l[4]?"Enregistrement...":"Enregistrer",_e,Ue,D,J,Q,Me,Te,he,C,R,W,Re="Mot de passe actuel",Ae,P,Be,X,Y,We="Nouveau mot de passe",je,N,He,ee,te,Xe="Confirmer le nouveau mot de passe",qe,z,Oe,le,V,re,Se,be=l[5]?"Modification...":"Changer le mot de passe",ve,j,Ke,Ye;o=new ot({props:{size:22,class:"text-gray-400"}}),U=new ot({props:{size:15}});let v=l[2]&&it(l);G=new wt({props:{size:15}}),Q=new ut({props:{size:15}});let x=l[3]&&dt(l);return re=new ut({props:{size:15}}),{c(){e=c("div"),t=c("div"),K(o.$$.fragment),a=h(),r=c("h1"),r.textContent=g,p=h(),n=c("div"),d=c("h2"),K(U.$$.fragment),ge=ce(" Informations personnelles"),pe=h(),v&&v.c(),ae=h(),E=c("div"),M=c("div"),T=c("label"),T.textContent=k,Ve=h(),B=c("input"),Pe=h(),Z=c("div"),F=c("label"),F.textContent=Qe,Ne=h(),A=c("input"),ze=h(),ne=c("div"),I=c("button"),K(G.$$.fragment),Le=h(),_e=ce(me),Ue=h(),D=c("div"),J=c("h2"),K(Q.$$.fragment),Me=ce(" Changer le mot de passe"),Te=h(),x&&x.c(),he=h(),C=c("div"),R=c("div"),W=c("label"),W.textContent=Re,Ae=h(),P=c("input"),Be=h(),X=c("div"),Y=c("label"),Y.textContent=We,je=h(),N=c("input"),He=h(),ee=c("div"),te=c("label"),te.textContent=Xe,qe=h(),z=c("input"),Oe=h(),le=c("div"),V=c("button"),K(re.$$.fragment),Se=h(),ve=ce(be),this.h()},l(u){e=f(u,"DIV",{class:!0});var m=y(e);t=f(m,"DIV",{class:!0});var xe=y(t);S(o.$$.fragment,xe),a=_(xe),r=f(xe,"H1",{class:!0,"data-svelte-h":!0}),de(r)!=="svelte-aokuio"&&(r.textContent=g),xe.forEach(b),p=_(m),n=f(m,"DIV",{class:!0});var oe=y(n);d=f(oe,"H2",{class:!0});var Ze=y(d);S(U.$$.fragment,Ze),ge=fe(Ze," Informations personnelles"),Ze.forEach(b),pe=_(oe),v&&v.l(oe),ae=_(oe),E=f(oe,"DIV",{class:!0});var ue=y(E);M=f(ue,"DIV",{});var ye=y(M);T=f(ye,"LABEL",{class:!0,"data-svelte-h":!0}),de(T)!=="svelte-1rnibbg"&&(T.textContent=k),Ve=_(ye),B=f(ye,"INPUT",{class:!0}),ye.forEach(b),Pe=_(ue),Z=f(ue,"DIV",{});var we=y(Z);F=f(we,"LABEL",{class:!0,"data-svelte-h":!0}),de(F)!=="svelte-1e4vz97"&&(F.textContent=Qe),Ne=_(we),A=f(we,"INPUT",{type:!0,class:!0}),we.forEach(b),ze=_(ue),ne=f(ue,"DIV",{class:!0});var et=y(ne);I=f(et,"BUTTON",{class:!0});var ke=y(I);S(G.$$.fragment,ke),Le=_(ke),_e=fe(ke,me),ke.forEach(b),et.forEach(b),ue.forEach(b),oe.forEach(b),Ue=_(m),D=f(m,"DIV",{class:!0});var ie=y(D);J=f(ie,"H2",{class:!0});var Fe=y(J);S(Q.$$.fragment,Fe),Me=fe(Fe," Changer le mot de passe"),Fe.forEach(b),Te=_(ie),x&&x.l(ie),he=_(ie),C=f(ie,"DIV",{class:!0});var H=y(C);R=f(H,"DIV",{});var $e=y(R);W=f($e,"LABEL",{class:!0,"data-svelte-h":!0}),de(W)!=="svelte-15z55vh"&&(W.textContent=Re),Ae=_($e),P=f($e,"INPUT",{type:!0,autocomplete:!0,class:!0}),$e.forEach(b),Be=_(H),X=f(H,"DIV",{});var Ee=y(X);Y=f(Ee,"LABEL",{class:!0,"data-svelte-h":!0}),de(Y)!=="svelte-1vz3gt6"&&(Y.textContent=We),je=_(Ee),N=f(Ee,"INPUT",{type:!0,autocomplete:!0,class:!0}),Ee.forEach(b),He=_(H),ee=f(H,"DIV",{});var Ce=y(ee);te=f(Ce,"LABEL",{class:!0,"data-svelte-h":!0}),de(te)!=="svelte-47gik4"&&(te.textContent=Xe),qe=_(Ce),z=f(Ce,"INPUT",{type:!0,autocomplete:!0,class:!0}),Ce.forEach(b),Oe=_(H),le=f(H,"DIV",{class:!0});var tt=y(le);V=f(tt,"BUTTON",{class:!0});var Ie=y(V);S(re.$$.fragment,Ie),Se=_(Ie),ve=fe(Ie,be),Ie.forEach(b),tt.forEach(b),H.forEach(b),ie.forEach(b),m.forEach(b),this.h()},h(){i(r,"class","text-2xl font-semibold text-gray-900 dark:text-white"),i(t,"class","flex items-center gap-3 mb-6"),i(d,"class","text-sm font-semibold text-gray-700 dark:text-gray-300 mb-4 flex items-center gap-2"),i(T,"class","block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1"),i(B,"class","w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"),i(F,"class","block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1"),i(A,"type","email"),i(A,"class","w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"),I.disabled=l[4],i(I,"class","flex items-center gap-2 px-4 py-2 bg-blue-600 hover:bg-blue-700 disabled:opacity-50 text-white rounded-lg text-sm font-medium transition-colors"),i(ne,"class","flex justify-end"),i(E,"class","space-y-4"),i(n,"class","bg-white dark:bg-gray-900 rounded-xl border border-gray-100 dark:border-gray-800 p-6 mb-5"),i(J,"class","text-sm font-semibold text-gray-700 dark:text-gray-300 mb-4 flex items-center gap-2"),i(W,"class","block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1"),i(P,"type","password"),i(P,"autocomplete","current-password"),i(P,"class","w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"),i(Y,"class","block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1"),i(N,"type","password"),i(N,"autocomplete","new-password"),i(N,"class","w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"),i(te,"class","block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1"),i(z,"type","password"),i(z,"autocomplete","new-password"),i(z,"class","w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"),V.disabled=l[5],i(V,"class","flex items-center gap-2 px-4 py-2 bg-blue-600 hover:bg-blue-700 disabled:opacity-50 text-white rounded-lg text-sm font-medium transition-colors"),i(le,"class","flex justify-end"),i(C,"class","space-y-4"),i(D,"class","bg-white dark:bg-gray-900 rounded-xl border border-gray-100 dark:border-gray-800 p-6"),i(e,"class","p-6 max-w-2xl mx-auto")},m(u,m){Je(u,e,m),s(e,t),O(o,t,null),s(t,a),s(t,r),s(e,p),s(e,n),s(n,d),O(U,d,null),s(d,ge),s(n,pe),v&&v.m(n,null),s(n,ae),s(n,E),s(E,M),s(M,T),s(M,Ve),s(M,B),L(B,l[0].name),s(E,Pe),s(E,Z),s(Z,F),s(Z,Ne),s(Z,A),L(A,l[0].email),s(E,ze),s(E,ne),s(ne,I),O(G,I,null),s(I,Le),s(I,_e),s(e,Ue),s(e,D),s(D,J),O(Q,J,null),s(J,Me),s(D,Te),x&&x.m(D,null),s(D,he),s(D,C),s(C,R),s(R,W),s(R,Ae),s(R,P),L(P,l[1].current_password),s(C,Be),s(C,X),s(X,Y),s(X,je),s(X,N),L(N,l[1].new_password),s(C,He),s(C,ee),s(ee,te),s(ee,qe),s(ee,z),L(z,l[1].confirm),s(C,Oe),s(C,le),s(le,V),O(re,V,null),s(V,Se),s(V,ve),j=!0,Ke||(Ye=[se(B,"input",l[8]),se(A,"input",l[9]),se(I,"click",l[6]),se(P,"input",l[10]),se(N,"input",l[11]),se(z,"input",l[12]),se(V,"click",l[7])],Ke=!0)},p(u,[m]){u[2]?v?(v.p(u,m),m&4&&w(v,1)):(v=it(u),v.c(),w(v,1),v.m(n,ae)):v&&(at(),$(v,1,1,()=>{v=null}),st()),m&1&&B.value!==u[0].name&&L(B,u[0].name),m&1&&A.value!==u[0].email&&L(A,u[0].email),(!j||m&16)&&me!==(me=u[4]?"Enregistrement...":"Enregistrer")&&De(_e,me),(!j||m&16)&&(I.disabled=u[4]),u[3]?x?(x.p(u,m),m&8&&w(x,1)):(x=dt(u),x.c(),w(x,1),x.m(D,he)):x&&(at(),$(x,1,1,()=>{x=null}),st()),m&2&&P.value!==u[1].current_password&&L(P,u[1].current_password),m&2&&N.value!==u[1].new_password&&L(N,u[1].new_password),m&2&&z.value!==u[1].confirm&&L(z,u[1].confirm),(!j||m&32)&&be!==(be=u[5]?"Modification...":"Changer le mot de passe")&&De(ve,be),(!j||m&32)&&(V.disabled=u[5])},i(u){j||(w(o.$$.fragment,u),w(U.$$.fragment,u),w(v),w(G.$$.fragment,u),w(Q.$$.fragment,u),w(x),w(re.$$.fragment,u),j=!0)},o(u){$(o.$$.fragment,u),$(U.$$.fragment,u),$(v),$(G.$$.fragment,u),$(Q.$$.fragment,u),$(x),$(re.$$.fragment,u),j=!1},d(u){u&&b(e),q(o),q(U),v&&v.d(),q(G),q(Q),x&&x.d(),q(re),Ke=!1,vt(Ye)}}}function Pt(l,e,t){let o;xt(l,lt,k=>t(13,o=k));let a={email:"",name:""},r={current_password:"",new_password:"",confirm:""},g=null,p=null,n=!1,d=!1;yt(()=>{const k=o;k&&t(0,a={email:k.email,name:k.name})});async function U(){t(2,g=null),t(4,n=!0);try{const k=await nt.auth.updateProfile(a);lt.set(k),t(2,g={type:"success",text:"Profil mis à jour."})}catch(k){t(2,g={type:"error",text:k.message})}t(4,n=!1)}async function ge(){if(t(3,p=null),r.new_password!==r.confirm){t(3,p={type:"error",text:"Les mots de passe ne correspondent pas."});return}if(r.new_password.length<6){t(3,p={type:"error",text:"Minimum 6 caractères."});return}t(5,d=!0);try{await nt.auth.updatePassword({current_password:r.current_password,new_password:r.new_password}),t(1,r={current_password:"",new_password:"",confirm:""}),t(3,p={type:"success",text:"Mot de passe modifié."})}catch(k){t(3,p={type:"error",text:k.message})}t(5,d=!1)}function pe(){a.name=this.value,t(0,a)}function ae(){a.email=this.value,t(0,a)}function E(){r.current_password=this.value,t(1,r)}function M(){r.new_password=this.value,t(1,r)}function T(){r.confirm=this.value,t(1,r)}return[a,r,g,p,n,d,U,ge,pe,ae,E,M,T]}class Bt extends ct{constructor(e){super(),gt(this,e,Pt,Vt,ft,{})}}export{Bt as component}; diff --git a/web/build/_app/immutable/nodes/11.BwpkXZtE.js b/web/build/_app/immutable/nodes/11.BwpkXZtE.js deleted file mode 100644 index ca5aacd..0000000 --- a/web/build/_app/immutable/nodes/11.BwpkXZtE.js +++ /dev/null @@ -1 +0,0 @@ -import{s as ut,o as ct,n as De,r as ot,f as ft}from"../chunks/DHedsUi_.js";import{S as dt,i as pt,d as p,k as he,l as F,m as q,q as je,a as K,b as r,n as be,r as J,u,c as f,e as g,o as _e,g as k,v as Y,f as ce,w as We,h as d,p as ge,j as x,t as fe,x as ht,y as Se,s as ye,z as ae,A as Ye,D as bt,B as _t}from"../chunks/G8UKEBBn.js";import{e as Xe,u as gt,o as mt}from"../chunks/C1tDbyYL.js";import{a as Te}from"../chunks/DjUyxgK6.js";import{B as it}from"../chunks/D3KWQg4I.js";import{P as vt}from"../chunks/CLS07P5K.js";import{X as yt}from"../chunks/C_l6I72z.js";import{C as kt}from"../chunks/zQrtb5Kq.js";import{P as xt}from"../chunks/C_K4PjIw.js";import{T as wt}from"../chunks/7MWtQ_HQ.js";import{R as Et}from"../chunks/Db8cSFEn.js";function Ze(o,e,t){const l=o.slice();return l[29]=e[t],l}function Ct(o,e,t){const l=o.slice();return l[26]=e[t],l}function It(o){let e,t=[],l=new Map,a,i=Xe(o[0]);const c=s=>s[29].id;for(let s=0;s{P=null}),je())},i(B){C||(q(P),q(h.$$.fragment,B),q(N.$$.fragment,B),C=!0)},o(B){F(P),F(h.$$.fragment,B),F(N.$$.fragment,B),C=!1},d(B){B&&p(t),z&&z.d(),A&&A.d(),P&&P.d(),he(h),he(N),S=!1,ot(te)}}}function Vt(o){let e;return{c(){e=d("div"),this.h()},l(t){e=f(t,"DIV",{class:!0}),g(e).forEach(p),this.h()},h(){u(e,"class","h-28 bg-gray-100 dark:bg-gray-800 rounded-xl animate-pulse")},m(t,l){K(t,e,l)},p:De,d(t){t&&p(e)}}}function at(o){let e,t,l,a,i=o[3]?"Modifier le bien":"Nouveau bien",c,s,n,b,_,y,T,m,w,L,O="Nom du bien *",H,D,Q,j,E,Z="Adresse *",v,h,$,V,N,ee="Type *",C,S,te,z="Airbnb",A,P="Longue durée",Ce,oe,B,U="Compte bancaire",ne,X,ke,me,se,re,ie="Notes",xe,W,qe,de,pe,Ge="Annuler",Re,ue,ve,Me,Ie=o[3]?"Enregistrer":"Créer",Ve,we,He,Je;b=new yt({props:{size:18}});let R=o[5]&&st(o),M=o[6].type==="airbnb"&&nt(o);return ve=new kt({props:{size:15}}),{c(){e=d("div"),t=d("div"),l=d("div"),a=d("h2"),c=fe(i),s=x(),n=d("button"),ge(b.$$.fragment),_=x(),y=d("div"),R&&R.c(),T=x(),m=d("div"),w=d("div"),L=d("label"),L.textContent=O,H=x(),D=d("input"),Q=x(),j=d("div"),E=d("label"),E.textContent=Z,v=x(),h=d("input"),$=x(),V=d("div"),N=d("label"),N.textContent=ee,C=x(),S=d("select"),te=d("option"),te.textContent=z,A=d("option"),A.textContent=P,Ce=x(),oe=d("div"),B=d("label"),B.textContent=U,ne=x(),X=d("input"),ke=x(),M&&M.c(),me=x(),se=d("div"),re=d("label"),re.textContent=ie,xe=x(),W=d("textarea"),qe=x(),de=d("div"),pe=d("button"),pe.textContent=Ge,Re=x(),ue=d("button"),ge(ve.$$.fragment),Me=x(),Ve=fe(Ie),this.h()},l(I){e=f(I,"DIV",{class:!0});var G=g(e);t=f(G,"DIV",{class:!0});var Ee=g(t);l=f(Ee,"DIV",{class:!0});var $e=g(l);a=f($e,"H2",{class:!0});var Ke=g(a);c=ce(Ke,i),Ke.forEach(p),s=k($e),n=f($e,"BUTTON",{class:!0});var Qe=g(n);_e(b.$$.fragment,Qe),Qe.forEach(p),$e.forEach(p),_=k(Ee),y=f(Ee,"DIV",{class:!0});var Ae=g(y);R&&R.l(Ae),T=k(Ae),m=f(Ae,"DIV",{class:!0});var le=g(m);w=f(le,"DIV",{class:!0});var Pe=g(w);L=f(Pe,"LABEL",{class:!0,"data-svelte-h":!0}),Y(L)!=="svelte-1ubnyal"&&(L.textContent=O),H=k(Pe),D=f(Pe,"INPUT",{placeholder:!0,class:!0}),Pe.forEach(p),Q=k(le),j=f(le,"DIV",{class:!0});var Ne=g(j);E=f(Ne,"LABEL",{class:!0,"data-svelte-h":!0}),Y(E)!=="svelte-1p9totl"&&(E.textContent=Z),v=k(Ne),h=f(Ne,"INPUT",{placeholder:!0,class:!0}),Ne.forEach(p),$=k(le),V=f(le,"DIV",{});var Be=g(V);N=f(Be,"LABEL",{class:!0,"data-svelte-h":!0}),Y(N)!=="svelte-13t3io0"&&(N.textContent=ee),C=k(Be),S=f(Be,"SELECT",{class:!0});var Fe=g(S);te=f(Fe,"OPTION",{"data-svelte-h":!0}),Y(te)!=="svelte-1h6u9yi"&&(te.textContent=z),A=f(Fe,"OPTION",{"data-svelte-h":!0}),Y(A)!=="svelte-1tpi71p"&&(A.textContent=P),Fe.forEach(p),Be.forEach(p),Ce=k(le),oe=f(le,"DIV",{});var Le=g(oe);B=f(Le,"LABEL",{class:!0,"data-svelte-h":!0}),Y(B)!=="svelte-52nxf7"&&(B.textContent=U),ne=k(Le),X=f(Le,"INPUT",{placeholder:!0,class:!0}),Le.forEach(p),ke=k(le),M&&M.l(le),me=k(le),se=f(le,"DIV",{class:!0});var ze=g(se);re=f(ze,"LABEL",{class:!0,"data-svelte-h":!0}),Y(re)!=="svelte-1mx82tb"&&(re.textContent=ie),xe=k(ze),W=f(ze,"TEXTAREA",{rows:!0,placeholder:!0,class:!0}),g(W).forEach(p),ze.forEach(p),le.forEach(p),Ae.forEach(p),qe=k(Ee),de=f(Ee,"DIV",{class:!0});var Ue=g(de);pe=f(Ue,"BUTTON",{class:!0,"data-svelte-h":!0}),Y(pe)!=="svelte-1sp5oxe"&&(pe.textContent=Ge),Re=k(Ue),ue=f(Ue,"BUTTON",{class:!0});var Oe=g(ue);_e(ve.$$.fragment,Oe),Me=k(Oe),Ve=ce(Oe,Ie),Oe.forEach(p),Ue.forEach(p),Ee.forEach(p),G.forEach(p),this.h()},h(){u(a,"class","font-semibold text-gray-900 dark:text-white"),u(n,"class","text-gray-400 hover:text-gray-600 dark:hover:text-gray-200"),u(l,"class","flex items-center justify-between px-6 py-4 border-b border-gray-100 dark:border-gray-800"),u(L,"class","block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1"),u(D,"placeholder","Ex: Appartement Paris 11e"),u(D,"class","input col-span-2 w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"),u(w,"class","col-span-2"),u(E,"class","block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1"),u(h,"placeholder","12 rue de la Paix, 75001 Paris"),u(h,"class","w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"),u(j,"class","col-span-2"),u(N,"class","block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1"),te.__value="airbnb",ae(te,te.__value),A.__value="longterm",ae(A,A.__value),u(S,"class","w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"),o[6].type===void 0&&ft(()=>o[20].call(S)),u(B,"class","block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1"),u(X,"placeholder","FR76 xxxx xxxx"),u(X,"class","w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"),u(re,"class","block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1"),u(W,"rows",2),u(W,"placeholder","Informations complémentaires..."),u(W,"class","w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 resize-none"),u(se,"class","col-span-2"),u(m,"class","grid grid-cols-2 gap-4"),u(y,"class","px-6 py-5 space-y-4"),u(pe,"class","px-4 py-2 text-sm text-gray-600 dark:text-gray-400 hover:text-gray-900 transition-colors"),u(ue,"class","flex items-center gap-2 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg text-sm font-medium transition-colors"),u(de,"class","flex justify-end gap-3 px-6 py-4 border-t border-gray-100 dark:border-gray-800"),u(t,"class","bg-white dark:bg-gray-900 rounded-2xl w-full max-w-lg shadow-xl border border-gray-100 dark:border-gray-800"),u(e,"class","fixed inset-0 bg-black/40 flex items-center justify-center z-50 p-4")},m(I,G){K(I,e,G),r(e,t),r(t,l),r(l,a),r(a,c),r(l,s),r(l,n),be(b,n,null),r(t,_),r(t,y),R&&R.m(y,null),r(y,T),r(y,m),r(m,w),r(w,L),r(w,H),r(w,D),ae(D,o[6].name),r(m,Q),r(m,j),r(j,E),r(j,v),r(j,h),ae(h,o[6].address),r(m,$),r(m,V),r(V,N),r(V,C),r(V,S),r(S,te),r(S,A),Ye(S,o[6].type,!0),r(m,Ce),r(m,oe),r(oe,B),r(oe,ne),r(oe,X),ae(X,o[6].bank_account),r(m,ke),M&&M.m(m,null),r(m,me),r(m,se),r(se,re),r(se,xe),r(se,W),ae(W,o[6].notes),r(t,qe),r(t,de),r(de,pe),r(de,Re),r(de,ue),be(ve,ue,null),r(ue,Me),r(ue,Ve),we=!0,He||(Je=[J(n,"click",o[9]),J(D,"input",o[18]),J(h,"input",o[19]),J(S,"change",o[20]),J(X,"input",o[21]),J(W,"input",o[23]),J(pe,"click",o[9]),J(ue,"click",o[10]),J(e,"click",bt(o[9]))],He=!0)},p(I,G){(!we||G[0]&8)&&i!==(i=I[3]?"Modifier le bien":"Nouveau bien")&&ye(c,i),I[5]?R?R.p(I,G):(R=st(I),R.c(),R.m(y,T)):R&&(R.d(1),R=null),G[0]&64&&D.value!==I[6].name&&ae(D,I[6].name),G[0]&64&&h.value!==I[6].address&&ae(h,I[6].address),G[0]&64&&Ye(S,I[6].type),G[0]&64&&X.value!==I[6].bank_account&&ae(X,I[6].bank_account),I[6].type==="airbnb"?M?M.p(I,G):(M=nt(I),M.c(),M.m(m,me)):M&&(M.d(1),M=null),G[0]&64&&ae(W,I[6].notes),(!we||G[0]&8)&&Ie!==(Ie=I[3]?"Enregistrer":"Créer")&&ye(Ve,Ie)},i(I){we||(q(b.$$.fragment,I),q(ve.$$.fragment,I),we=!0)},o(I){F(b.$$.fragment,I),F(ve.$$.fragment,I),we=!1},d(I){I&&p(e),he(b),R&&R.d(),M&&M.d(),he(ve),He=!1,ot(Je)}}}function st(o){let e,t;return{c(){e=d("p"),t=fe(o[5]),this.h()},l(l){e=f(l,"P",{class:!0});var a=g(e);t=ce(a,o[5]),a.forEach(p),this.h()},h(){u(e,"class","text-red-500 text-sm")},m(l,a){K(l,e,a),r(e,t)},p(l,a){a[0]&32&&ye(t,l[5])},d(l){l&&p(e)}}}function nt(o){let e,t,l="URL iCal Airbnb",a,i,c,s,n="Airbnb → Annonce → Paramètres → Calendrier → Exporter",b,_;return{c(){e=d("div"),t=d("label"),t.textContent=l,a=x(),i=d("input"),c=x(),s=d("p"),s.textContent=n,this.h()},l(y){e=f(y,"DIV",{class:!0});var T=g(e);t=f(T,"LABEL",{class:!0,"data-svelte-h":!0}),Y(t)!=="svelte-12hf7xu"&&(t.textContent=l),a=k(T),i=f(T,"INPUT",{placeholder:!0,class:!0}),c=k(T),s=f(T,"P",{class:!0,"data-svelte-h":!0}),Y(s)!=="svelte-1p5dlq4"&&(s.textContent=n),T.forEach(p),this.h()},h(){u(t,"class","block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1"),u(i,"placeholder","https://www.airbnb.fr/calendar/ical/..."),u(i,"class","w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"),u(s,"class","text-xs text-gray-400 mt-1"),u(e,"class","col-span-2")},m(y,T){K(y,e,T),r(e,t),r(e,a),r(e,i),ae(i,o[6].ical_url),r(e,c),r(e,s),b||(_=J(i,"input",o[22]),b=!0)},p(y,T){T[0]&64&&i.value!==y[6].ical_url&&ae(i,y[6].ical_url)},d(y){y&&p(e),b=!1,_()}}}function $t(o){let e,t,l,a,i,c,s="Biens",n,b,_,y,T,m,w,L,O,H,D,Q;a=new it({props:{size:22,class:"text-gray-400"}}),_=new vt({props:{size:16}});const j=[Dt,Tt,It],E=[];function Z(h,$){return h[1]?0:h[0].length===0?1:2}m=Z(o),w=E[m]=j[m](o);let v=o[2]&&at(o);return{c(){e=d("div"),t=d("div"),l=d("div"),ge(a.$$.fragment),i=x(),c=d("h1"),c.textContent=s,n=x(),b=d("button"),ge(_.$$.fragment),y=fe(" Ajouter un bien"),T=x(),w.c(),L=x(),v&&v.c(),O=We(),this.h()},l(h){e=f(h,"DIV",{class:!0});var $=g(e);t=f($,"DIV",{class:!0});var V=g(t);l=f(V,"DIV",{class:!0});var N=g(l);_e(a.$$.fragment,N),i=k(N),c=f(N,"H1",{class:!0,"data-svelte-h":!0}),Y(c)!=="svelte-48z1dd"&&(c.textContent=s),N.forEach(p),n=k(V),b=f(V,"BUTTON",{class:!0});var ee=g(b);_e(_.$$.fragment,ee),y=ce(ee," Ajouter un bien"),ee.forEach(p),V.forEach(p),T=k($),w.l($),$.forEach(p),L=k(h),v&&v.l(h),O=We(),this.h()},h(){u(c,"class","text-2xl font-semibold text-gray-900 dark:text-white"),u(l,"class","flex items-center gap-3"),u(b,"class","flex items-center gap-2 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg text-sm font-medium transition-colors"),u(t,"class","flex items-center justify-between mb-6"),u(e,"class","p-6 max-w-4xl mx-auto")},m(h,$){K(h,e,$),r(e,t),r(t,l),be(a,l,null),r(l,i),r(l,c),r(t,n),r(t,b),be(_,b,null),r(b,y),r(e,T),E[m].m(e,null),K(h,L,$),v&&v.m(h,$),K(h,O,$),H=!0,D||(Q=J(b,"click",o[7]),D=!0)},p(h,$){let V=m;m=Z(h),m===V?E[m].p(h,$):(Se(),F(E[V],1,1,()=>{E[V]=null}),je(),w=E[m],w?w.p(h,$):(w=E[m]=j[m](h),w.c()),q(w,1),w.m(e,null)),h[2]?v?(v.p(h,$),$[0]&4&&q(v,1)):(v=at(h),v.c(),q(v,1),v.m(O.parentNode,O)):v&&(Se(),F(v,1,1,()=>{v=null}),je())},i(h){H||(q(a.$$.fragment,h),q(_.$$.fragment,h),q(w),q(v),H=!0)},o(h){F(a.$$.fragment,h),F(_.$$.fragment,h),F(w),F(v),H=!1},d(h){h&&(p(e),p(L),p(O)),he(a),he(_),E[m].d(),v&&v.d(h),D=!1,Q()}}}function At(o,e,t){let l=[],a=!0,i=!1,c=null,s=null,n="";const b=()=>({name:"",address:"",type:"airbnb",bank_account:"",ical_url:"",notes:""});let _=b();ct(y);async function y(){t(1,a=!0),t(0,l=await Te.properties.list()||[]),t(1,a=!1)}function T(){t(6,_=b()),t(3,c=null),t(2,i=!0),t(5,n="")}function m(C){t(6,_={...C}),t(3,c=C.id),t(2,i=!0),t(5,n="")}function w(){t(2,i=!1),t(5,n="")}async function L(){t(5,n="");try{c?await Te.properties.update(c,_):await Te.properties.create(_),t(2,i=!1),await y()}catch(C){t(5,n=C.message)}}async function O(C,S){confirm(`Supprimer "${S}" ? Toutes les données associées seront perdues.`)&&(await Te.properties.delete(C),await y())}async function H(C){t(4,s=C),await Te.calendar.sync(C),t(4,s=null)}const D={airbnb:"Airbnb",longterm:"Longue durée"},Q={airbnb:"bg-orange-50 text-orange-700 dark:bg-orange-950 dark:text-orange-300",longterm:"bg-blue-50 text-blue-700 dark:bg-blue-950 dark:text-blue-300"},j=C=>H(C.id),E=C=>m(C),Z=C=>O(C.id,C.name);function v(){_.name=this.value,t(6,_)}function h(){_.address=this.value,t(6,_)}function $(){_.type=_t(this),t(6,_)}function V(){_.bank_account=this.value,t(6,_)}function N(){_.ical_url=this.value,t(6,_)}function ee(){_.notes=this.value,t(6,_)}return[l,a,i,c,s,n,_,T,m,w,L,O,H,D,Q,j,E,Z,v,h,$,V,N,ee]}class Mt extends dt{constructor(e){super(),pt(this,e,At,$t,ut,{},null,[-1,-1])}}export{Mt as component}; diff --git a/web/build/_app/immutable/nodes/12.D8a8HBoC.js b/web/build/_app/immutable/nodes/12.D8a8HBoC.js deleted file mode 100644 index 1efe727..0000000 --- a/web/build/_app/immutable/nodes/12.D8a8HBoC.js +++ /dev/null @@ -1,4 +0,0 @@ -import{s as fl,a as It,e as Pt,b as bl,u as yl,g as xl,d as kl,r as vt,f as pt,o as El,n as ht}from"../chunks/DHedsUi_.js";import{S as pl,i as _l,k as nt,l as Ze,m as Re,n as at,o as st,p as ot,d as c,x as ct,s as qe,u as s,A as rt,q as bt,a as Qe,b as r,r as Ee,z as Ae,c as o,e as p,g as h,v as Ie,f as Y,w as Ot,h as i,j as v,t as G,y as yt,F as wt,B as ft}from"../chunks/G8UKEBBn.js";import{I as Cl,g as wl,a as Tl,e as tt,u as Dl,o as Il}from"../chunks/C1tDbyYL.js";import{a as gt}from"../chunks/DjUyxgK6.js";import{C as gl}from"../chunks/DIz1JgvC.js";import{P as hl}from"../chunks/CLS07P5K.js";import{T as Nl,a as Vl}from"../chunks/7IRyKQzz.js";import{X as Tt}from"../chunks/C_l6I72z.js";import{C as Pl}from"../chunks/zQrtb5Kq.js";import{G as vl}from"../chunks/2JpTzebs.js";import{P as Ol}from"../chunks/C_K4PjIw.js";import{T as Ll}from"../chunks/7MWtQ_HQ.js";function Sl(l){let e;const t=l[2].default,n=bl(t,l,l[3],null);return{c(){n&&n.c()},l(a){n&&n.l(a)},m(a,u){n&&n.m(a,u),e=!0},p(a,u){n&&n.p&&(!e||u&8)&&yl(n,t,a,a[3],e?kl(t,a[3],u,null):xl(a[3]),null)},i(a){e||(Re(n,a),e=!0)},o(a){Ze(n,a),e=!1},d(a){n&&n.d(a)}}}function Bl(l){let e,t;const n=[{name:"layers"},l[1],{iconNode:l[0]}];let a={$$slots:{default:[Sl]},$$scope:{ctx:l}};for(let u=0;u{t(1,e=It(It({},e),Pt(f))),"$$scope"in f&&t(3,a=f.$$scope)},e=Pt(e),[u,e,n,a]}class ml extends pl{constructor(e){super(),_l(this,e,Fl,Bl,fl,{})}}function Lt(l,e,t){const n=l.slice();return n[85]=e[t],n[86]=e,n[87]=t,n}function St(l,e,t){const n=l.slice();return n[88]=e[t],n}function Bt(l,e,t){const n=l.slice();return n[91]=e[t],n}function Ft(l,e,t){const n=l.slice();return n[85]=e[t],n[94]=e,n[87]=t,n}function At(l,e,t){const n=l.slice();return n[88]=e[t],n}function Ut(l,e,t){const n=l.slice();return n[91]=e[t],n}function jt(l,e,t){const n=l.slice();return n[88]=e[t],n}function Mt(l,e,t){const n=l.slice();return n[91]=e[t],n}function zt(l,e,t){const n=l.slice();return n[106]=e[t],n}function Al(l,e,t){const n=l.slice();return n[103]=e[t],n}function Rt(l,e,t){const n=l.slice();return n[109]=e[t],n}function qt(l,e,t){const n=l.slice();return n[91]=e[t],n}function Ht(l){let e,t=l[91].name+"",n,a;return{c(){e=i("option"),n=G(t),this.h()},l(u){e=o(u,"OPTION",{});var f=p(e);n=Y(f,t),f.forEach(c),this.h()},h(){e.__value=a=l[91].id,Ae(e,e.__value)},m(u,f){Qe(u,e,f),r(e,n)},p(u,f){f[0]&4096&&t!==(t=u[91].name+"")&&qe(n,t),f[0]&4096&&a!==(a=u[91].id)&&(e.__value=a,Ae(e,e.__value))},d(u){u&&c(e)}}}function Yt(l){let e,t=l[109]+"",n;return{c(){e=i("option"),n=G(t),this.h()},l(a){e=o(a,"OPTION",{});var u=p(e);n=Y(u,t),u.forEach(c),this.h()},h(){e.__value=l[109],Ae(e,e.__value)},m(a,u){Qe(a,e,u),r(e,n)},p:ht,d(a){a&&c(e)}}}function Gt(l){let e,t=` - Sans catégorie`;return{c(){e=i("span"),e.innerHTML=t,this.h()},l(n){e=o(n,"SPAN",{class:!0,"data-svelte-h":!0}),Ie(e)!=="svelte-3fc8tw"&&(e.innerHTML=t),this.h()},h(){s(e,"class","flex items-center gap-1.5 text-xs text-amber-600 dark:text-amber-400 ml-2")},m(n,a){Qe(n,e,a)},d(n){n&&c(e)}}}function Ul(l){let e,t,n,a='Date Description Catégorie Bien Montant ',u,f,m=[],y=new Map,K,M=tt(l[0]);const z=w=>w[106].id;for(let w=0;wl[58].call(F)),s(je,"class","block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1"),Le.__value="",Ae(Le,Le.__value),s(A,"class","w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"),l[2].category_id===void 0&&pt(()=>l[59].call(A)),s(Se,"class","block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1"),s(me,"type","number"),s(me,"step","0.01"),s(me,"min","0"),s(me,"placeholder","0.00"),s(me,"class","w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"),s(b,"class","block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1"),s(Ye,"type","date"),s(Ye,"class","w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"),s(xe,"class","grid grid-cols-2 gap-4"),s(Me,"class","block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1"),s(J,"placeholder","Ex: Facture plombier, loyer janvier..."),s(J,"class","w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"),s(z,"class","px-6 py-5 space-y-4"),s(ke,"class","px-4 py-2 text-sm text-gray-600 dark:text-gray-400"),s(Te,"class","flex items-center gap-2 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg text-sm font-medium transition-colors"),s(T,"class","flex justify-end gap-3 px-6 py-4 border-t border-gray-100 dark:border-gray-800"),s(t,"class","bg-white dark:bg-gray-900 rounded-2xl w-full max-w-md shadow-xl border border-gray-100 dark:border-gray-800"),s(e,"class","fixed inset-0 bg-black/40 flex items-center justify-center z-50 p-4")},m(P,X){Qe(P,e,X),r(e,t),r(t,n),r(n,a),r(a,f),r(n,m),r(n,y),at(K,y,null),r(t,M),r(t,z),He&&He.m(z,null),r(z,w),r(z,k),r(k,j),r(j,H),r(k,pe),r(k,ee),r(ee,ne),r(z,Ce),r(z,Q),r(Q,B),r(Q,ve),r(Q,F),r(F,se);for(let x=0;x=0?"−":"+",te,Ye=l[44](Math.abs(l[27]))+"",Be,R,Me,Xe,Ve,J="Annuler",S,T,ke,be,Je=l[4].length+"",Te,De,Fe,Pe,$;y=new Tt({props:{size:18}});let C=l[20]&&$t(l),D=tt(l[4]),V=[];for(let q=0;qZe(V[q],1,1,()=>{V[q]=null});return de=new hl({props:{size:13}}),ke=new ml({props:{size:15}}),{c(){e=i("div"),t=i("div"),n=i("div"),a=i("div"),a.innerHTML=u,f=v(),m=i("button"),ot(y.$$.fragment),K=v(),M=i("div"),C&&C.c(),z=v(),w=i("div"),k=i("label"),k.textContent=j,H=v(),E=i("input"),pe=v();for(let q=0;q=0?"text-red-500":"text-green-600")),s(fe,"class","flex justify-between border-t border-gray-200 dark:border-gray-700 pt-1 mt-1"),s(B,"class","bg-gray-100 dark:bg-gray-800 rounded-lg px-4 py-3 text-xs space-y-1"),s(M,"class","px-6 py-4 overflow-y-auto flex-1 space-y-4"),s(Ve,"class","px-4 py-2 text-sm text-gray-600 dark:text-gray-400"),s(T,"class","flex items-center gap-2 px-4 py-2 bg-purple-600 hover:bg-purple-700 text-white rounded-lg text-sm font-medium transition-colors"),s(Xe,"class","flex justify-end gap-3 px-6 py-4 border-t border-gray-100 dark:border-gray-800"),s(t,"class","bg-white dark:bg-gray-900 rounded-2xl w-full max-w-2xl shadow-xl border border-gray-100 dark:border-gray-800 max-h-[90vh] flex flex-col"),s(e,"class","fixed inset-0 bg-black/40 flex items-center justify-center z-50 p-4")},m(q,O){Qe(q,e,O),r(e,t),r(t,n),r(n,a),r(n,f),r(n,m),at(y,m,null),r(t,K),r(t,M),C&&C.m(M,null),r(M,z),r(M,w),r(w,k),r(w,H),r(w,E),Ae(E,l[24]),r(M,pe);for(let le=0;le=0?"−":"+")&&qe(te,ie),(!Fe||O[0]&134217728)&&Ye!==(Ye=q[44](Math.abs(q[27]))+"")&&qe(Be,Ye),(!Fe||O[0]&134217728&&R!==(R="font-semibold "+(q[27]>=0?"text-red-500":"text-green-600")))&&s(b,"class",R),(!Fe||O[0]&16)&&Je!==(Je=q[4].length+"")&&qe(Te,Je)},i(q){if(!Fe){Re(y.$$.fragment,q);for(let O=0;O2&&el(l),ie=tt(l[12]),te=[];for(let J=0;J2?b?(b.p(l,S),S[0]&16&&Re(b,1)):(b=el(l),b.c(),Re(b,1),b.m(t,null)):b&&(yt(),Ze(b,1,1,()=>{b=null}),bt()),S[0]&4096){ie=tt(l[12]);let T;for(T=0;T=0?"text-green-600":"text-red-500")),s(oe,"class","bg-white dark:bg-gray-900 rounded-xl p-4 border border-gray-100 dark:border-gray-800"),s(ee,"class","grid grid-cols-3 gap-3 mb-6"),te.__value="",Ae(te,te.__value),s(ie,"class","px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"),l[21]===void 0&&pt(()=>l[50].call(ie)),Me.__value="",Ae(Me,Me.__value),Ve.__value="income",Ae(Ve,Ve.__value),S.__value="expense",Ae(S,S.__value),s(R,"class","px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"),l[22]===void 0&&pt(()=>l[51].call(R)),s(be,"class","px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"),l[23]===void 0&&pt(()=>l[52].call(be)),s(b,"class","flex flex-wrap gap-3 mb-4 items-center"),s(e,"class","p-6 max-w-5xl mx-auto")},m(g,ae){Qe(g,e,ae),r(e,t),r(t,n),at(a,n,null),r(n,u),r(n,f),r(t,y),r(t,K),r(K,M),at(z,M,null),r(M,w),r(K,k),r(K,j),at(H,j,null),r(j,E),r(e,pe),r(e,ee),r(ee,ne),r(ne,de),at(Ce,de,null),r(de,Q),r(ne,B),r(ne,_e),r(_e,F),r(ee,se),r(ee,ge),r(ge,ue),at(W,ue,null),r(ue,je),r(ge,Z),r(ge,_),r(_,Le),r(ee,N),r(ee,oe),r(oe,xe),r(oe,Se),r(oe,we),r(we,me),r(e,he),r(e,b),r(b,ie),r(ie,te);for(let Ue=0;Ue=0?"text-green-600":"text-red-500")))&&s(we,"class",We),ae[0]&4096){le=tt(g[12]);let ce;for(ce=0;ce{ye[Ue]=null}),bt(),Pe=ye[Fe],Pe?Pe.p(g,ae):(Pe=ye[Fe]=I[Fe](g),Pe.c()),Re(Pe,1),Pe.m(e,null)),g[14]?re?(re.p(g,ae),ae[0]&16384&&Re(re,1)):(re=Xt(g),re.c(),Re(re,1),re.m(C.parentNode,C)):re&&(yt(),Ze(re,1,1,()=>{re=null}),bt()),g[16]?ze?(ze.p(g,ae),ae[0]&65536&&Re(ze,1)):(ze=Wt(g),ze.c(),Re(ze,1),ze.m(D.parentNode,D)):ze&&(yt(),Ze(ze,1,1,()=>{ze=null}),bt()),g[15]&&g[1]?Ge?(Ge.p(g,ae),ae[0]&32770&&Re(Ge,1)):(Ge=nl(g),Ge.c(),Re(Ge,1),Ge.m(V.parentNode,V)):Ge&&(yt(),Ze(Ge,1,1,()=>{Ge=null}),bt())},i(g){He||(Re(a.$$.fragment,g),Re(z.$$.fragment,g),Re(H.$$.fragment,g),Re(Ce.$$.fragment,g),Re(W.$$.fragment,g),Re(Pe),Re(re),Re(ze),Re(Ge),He=!0)},o(g){Ze(a.$$.fragment,g),Ze(z.$$.fragment,g),Ze(H.$$.fragment,g),Ze(Ce.$$.fragment,g),Ze(W.$$.fragment,g),Ze(Pe),Ze(re),Ze(ze),Ze(Ge),He=!1},d(g){g&&(c(e),c($),c(C),c(D),c(V)),nt(a),nt(z),nt(H),nt(Ce),nt(W),ct(L,g),ct(X,g),x&&x.d(),ye[Fe].d(),re&&re.d(g),ze&&ze.d(g),Ge&&Ge.d(g),q=!1,vt(O)}}}const kt="w-full px-2 py-1.5 rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-900 text-gray-900 dark:text-white text-xs focus:outline-none focus:ring-2 focus:ring-blue-500";function cl(l){return l.category_id?"hover:bg-gray-50 dark:hover:bg-gray-800/50":"bg-amber-50/50 dark:bg-amber-950/10 hover:bg-amber-50 dark:hover:bg-amber-950/20"}const dl=l=>!l.category_id;function Ql(l,e,t){let n,a,u,f,m,y,K,M,z,w,k,j,H=[],E=[],pe=[],ee=!0,ne=!1,de=!1,Ce=!1,Q=null,B=null,_e="",ve="",F="",se="",ge="",ue=String(new Date().getFullYear());const W=Array.from({length:5},(d,U)=>String(new Date().getFullYear()-U)),je=()=>({property_id:"",category_id:"",type:"expense",amount:"",date:new Date().toISOString().slice(0,10),description:""});let Z=je(),_=[];const A=()=>({type:"expense",property_id:"",category_id:"",amount:"",description:""});let Le=new Date().toISOString().slice(0,10),N=[{...A(),type:"income"},{...A(),type:"expense"}];El(async()=>{t(12,[E,pe]=await Promise.all([gt.properties.list(),gt.categories.list()]),E,t(47,pe)),t(12,E=E||[]),t(47,pe=pe||[]),await oe()});async function oe(){t(13,ee=!0);const d={};se&&(d.property_id=se),ge&&(d.type=ge),ue&&(d.year=ue),t(0,H=await gt.transactions.list(d)||[]),t(13,ee=!1)}function xe(){t(2,Z=je()),t(17,Q=null),t(14,ne=!0),t(18,_e="")}function Ne(d){t(2,Z={property_id:d.property_id,category_id:d.category_id||"",type:d.type,amount:d.amount,date:d.date,description:d.description||""}),t(17,Q=d.id),t(14,ne=!0),t(18,_e="")}function Se(){t(14,ne=!1),t(18,_e=""),t(17,Q=null)}async function we(){if(t(18,_e=""),!Z.property_id||!Z.amount||!Z.date){t(18,_e="Bien, montant et date sont requis.");return}try{const d={...Z,amount:parseFloat(Z.amount)};Q?await gt.transactions.update(Q,d):await gt.transactions.create(d),t(14,ne=!1),t(17,Q=null),await oe()}catch(d){t(18,_e=d.message)}}async function fe(d){confirm("Supprimer cette transaction ?")&&(await gt.transactions.delete(d),await oe())}function me(){var d,U;t(24,Le=new Date().toISOString().slice(0,10)),t(4,N=[{...A(),type:"income",property_id:((d=E[0])==null?void 0:d.id)||""},{...A(),type:"expense",property_id:((U=E[0])==null?void 0:U.id)||""}]),t(20,F=""),t(16,Ce=!0)}function We(){var d;t(4,N=[...N,{...A(),property_id:((d=E[0])==null?void 0:d.id)||""}])}function he(d){t(4,N=N.filter((U,Ke)=>Ke!==d))}async function b(){t(20,F="");for(const d of N){if(!d.property_id){t(20,F="Chaque ligne doit avoir un bien.");return}if(!d.amount||parseFloat(d.amount)<=0){t(20,F="Chaque ligne doit avoir un montant > 0.");return}}try{for(const d of N)await gt.transactions.create({property_id:d.property_id,category_id:d.category_id||"",type:d.type,amount:parseFloat(d.amount),date:Le,description:d.description});t(16,Ce=!1),await oe()}catch(d){t(20,F=d.message)}}function ie(d){var Ke;t(1,B=d),t(19,ve="");const U=d.amount;t(3,_=E.slice(0,2).map((lt,it)=>({property_id:lt.id,category_id:d.category_id||"",type:d.type,amount:parseFloat((U/2).toFixed(2)),description:d.description||"",pct:50}))),_.length<2&&_.push({property_id:((Ke=E[0])==null?void 0:Ke.id)||"",category_id:d.category_id||"",type:d.type,amount:parseFloat((U/2).toFixed(2)),description:d.description||"",pct:50}),t(15,de=!0)}function te(d,U){const Ke=B.amount;if(U=Math.min(100,Math.max(0,parseFloat(U)||0)),_.length===2){const lt=100-U;t(3,_[d].pct=U,_),t(3,_[d].amount=parseFloat((Ke*U/100).toFixed(2)),_),t(3,_[1-d].pct=lt,_),t(3,_[1-d].amount=parseFloat((Ke*lt/100).toFixed(2)),_)}else t(3,_[d].pct=U,_),t(3,_[d].amount=parseFloat((Ke*U/100).toFixed(2)),_);t(3,_=[..._])}function Ye(d,U){const Ke=B.amount;if(U=Math.abs(parseFloat(U)||0),t(3,_[d].amount=U,_),t(3,_[d].pct=parseFloat((U/Ke*100).toFixed(1)),_),_.length===2){const lt=1-d,it=B.type,ut=_.every(dt=>dt.type===it);let et;ut?et=parseFloat((Ke-U).toFixed(2)):(et=_[d].type===it?parseFloat((U-Ke).toFixed(2)):parseFloat((Ke+U).toFixed(2)),et=Math.max(0,et)),t(3,_[lt].amount=et,_),t(3,_[lt].pct=parseFloat((et/Ke*100).toFixed(1)),_)}t(3,_=[..._])}async function Be(){if(t(19,ve=""),!z){const d=B.type==="income"?"Revenus − Dépenses":"Dépenses − Revenus";t(19,ve=`${d} = ${R(K)} ≠ ${R(B.amount)}`);return}for(const d of _)if(!d.property_id){t(19,ve="Chaque part doit avoir un bien.");return}try{await gt.transactions.split(B.id,{source_id:B.id,splits:_.map(d=>({property_id:d.property_id,category_id:d.category_id,type:d.type,amount:parseFloat(d.amount),description:d.description}))}),t(15,de=!1),t(1,B=null),await oe()}catch(d){t(19,ve=d.message)}}const R=d=>Number(d).toLocaleString("fr-FR",{minimumFractionDigits:2})+" €",Me=d=>{if(!d)return"—";const U=d.split("-");return U.length===3?U[2]+"/"+U[1]+"/"+U[0]:d},Xe=d=>pe.filter(U=>U.type===d),Ve=d=>d.type===B.type;function J(){se=ft(this),t(21,se),t(12,E)}function S(){ge=ft(this),t(22,ge)}function T(){ue=ft(this),t(23,ue),t(29,W)}const ke=d=>ie(d),be=d=>Ne(d),Je=d=>fe(d.id),Te=()=>{t(2,Z.type="expense",Z),t(2,Z.category_id="",Z)},De=()=>{t(2,Z.type="income",Z),t(2,Z.category_id="",Z)};function Fe(){Z.property_id=ft(this),t(2,Z),t(12,E)}function Pe(){Z.category_id=ft(this),t(2,Z),t(12,E)}function $(){Z.amount=wt(this.value),t(2,Z),t(12,E)}function C(){Z.date=this.value,t(2,Z),t(12,E)}function D(){Z.description=this.value,t(2,Z),t(12,E)}const V=()=>t(16,Ce=!1);function He(){Le=this.value,t(24,Le)}const q=d=>{t(4,N[d].type="income",N),t(4,N[d].category_id="",N),t(4,N=[...N])},O=d=>{t(4,N[d].type="expense",N),t(4,N[d].category_id="",N),t(4,N=[...N])},le=d=>he(d);function L(d){N[d].property_id=ft(this),t(4,N),t(12,E)}function P(d){N[d].category_id=ft(this),t(4,N),t(12,E)}function X(d){N[d].amount=wt(this.value),t(4,N),t(12,E)}function x(d){N[d].description=this.value,t(4,N),t(12,E)}const I=()=>t(16,Ce=!1),ye=()=>t(15,de=!1),Oe=d=>{t(3,_[d].type="income",_),t(3,_[d].category_id="",_),t(3,_=[..._])},re=d=>{t(3,_[d].type="expense",_),t(3,_[d].category_id="",_),t(3,_=[..._])},ze=(d,U)=>te(d,U.target.value),Ge=(d,U)=>te(d,U.target.value),g=(d,U)=>Ye(d,U.target.value);function ae(d){_[d].property_id=ft(this),t(3,_),t(12,E)}function Ue(d){_[d].category_id=ft(this),t(3,_),t(12,E)}function ce(d){_[d].description=this.value,t(3,_),t(12,E)}const $e=()=>t(15,de=!1);return l.$$.update=()=>{l.$$.dirty[0]&4|l.$$.dirty[1]&65536&&t(28,n=pe.filter(d=>d.type===Z.type)),l.$$.dirty[0]&16&&t(10,a=N.filter(d=>d.type==="income").reduce((d,U)=>d+(parseFloat(U.amount)||0),0)),l.$$.dirty[0]&16&&t(11,u=N.filter(d=>d.type==="expense").reduce((d,U)=>d+(parseFloat(U.amount)||0),0)),l.$$.dirty[0]&3072&&t(27,f=parseFloat((u-a).toFixed(2))),l.$$.dirty[0]&8&&t(9,m=_.filter(d=>d.type==="expense").reduce((d,U)=>d+(parseFloat(U.amount)||0),0)),l.$$.dirty[0]&8&&t(8,y=_.filter(d=>d.type==="income").reduce((d,U)=>d+(parseFloat(U.amount)||0),0)),l.$$.dirty[0]&770&&t(7,K=parseFloat(((B==null?void 0:B.type)==="income"?y-m:m-y).toFixed(2))),l.$$.dirty[0]&130&&t(48,M=parseFloat((K-((B==null?void 0:B.amount)||0)).toFixed(2))),l.$$.dirty[1]&131072&&t(26,z=Math.abs(M)<=.01),l.$$.dirty[0]&1&&t(6,w=H.filter(d=>d.type==="income").reduce((d,U)=>d+U.amount,0)),l.$$.dirty[0]&1&&t(5,k=H.filter(d=>d.type==="expense").reduce((d,U)=>d+U.amount,0)),l.$$.dirty[0]&96&&t(25,j=w-k)},[H,B,Z,_,N,k,w,K,y,m,a,u,E,ee,ne,de,Ce,Q,_e,ve,F,se,ge,ue,Le,j,z,f,n,W,oe,xe,Ne,Se,we,fe,me,We,he,b,ie,te,Ye,Be,R,Me,Xe,pe,M,Ve,J,S,T,ke,be,Je,Te,De,Fe,Pe,$,C,D,V,He,q,O,le,L,P,X,x,I,ye,Oe,re,ze,Ge,g,ae,Ue,ce,$e]}class sr extends pl{constructor(e){super(),_l(this,e,Ql,Gl,fl,{},null,[-1,-1,-1,-1])}}export{sr as component}; diff --git a/web/build/_app/immutable/nodes/13.D1xscHx8.js b/web/build/_app/immutable/nodes/13.D1xscHx8.js deleted file mode 100644 index b67adda..0000000 --- a/web/build/_app/immutable/nodes/13.D1xscHx8.js +++ /dev/null @@ -1,2 +0,0 @@ -import{s as Be,o as Me,n as ae,r as qe}from"../chunks/DHedsUi_.js";import{S as Oe,i as Se,d as h,k as ne,l as L,m as j,q as de,a as X,b as o,n as oe,r as K,u as d,c as m,e as w,o as ie,g as C,v as W,f as Y,w as Ue,h as p,p as ue,j as E,t as Z,s as fe,x as Fe,y as me,z as le,D as He}from"../chunks/G8UKEBBn.js";import{e as Ie,u as Re,o as Xe}from"../chunks/C1tDbyYL.js";import{a as De}from"../chunks/DjUyxgK6.js";import{U as Ge}from"../chunks/BYJWe3D5.js";import{P as Je}from"../chunks/CLS07P5K.js";import{C as Le}from"../chunks/zQrtb5Kq.js";import{X as Ke}from"../chunks/C_l6I72z.js";import{A as Qe}from"../chunks/eC_GsYA7.js";import{T as We}from"../chunks/7MWtQ_HQ.js";function Ae(u,e,t){const s=u.slice();return s[22]=e[t],s[24]=t,s}function Ye(u,e,t){const s=u.slice();return s[19]=e[t],s}function je(u){let e,t,s,a,f;return t=new Le({props:{size:14}}),{c(){e=p("div"),ue(t.$$.fragment),s=E(),a=Z(u[4]),this.h()},l(n){e=m(n,"DIV",{class:!0});var r=w(e);ie(t.$$.fragment,r),s=C(r),a=Y(r,u[4]),r.forEach(h),this.h()},h(){d(e,"class","flex items-center gap-2 text-sm px-4 py-3 rounded-lg mb-4 bg-green-50 dark:bg-green-950/30 text-green-700 dark:text-green-300")},m(n,r){X(n,e,r),oe(t,e,null),o(e,s),o(e,a),f=!0},p(n,r){(!f||r&16)&&fe(a,n[4])},i(n){f||(j(t.$$.fragment,n),f=!0)},o(n){L(t.$$.fragment,n),f=!1},d(n){n&&h(e),ne(t)}}}function Ze(u){let e,t=[],s=new Map,a,f=Ie(u[0]);const n=r=>r[22].id;for(let r=0;r0?"border-t border-gray-50 dark:border-gray-800":"")),this.first=t},m(c,i){X(c,t,i),o(t,s),o(s,f),o(t,n),o(t,r),o(r,l),o(l,v),o(r,M),o(r,D),o(D,R),o(D,F),o(D,$),o(t,x),z[y].m(t,null),o(t,q),P=!0},p(c,i){var B,H;e=c,(!P||i&1)&&a!==(a=(((H=(B=e[22].name)==null?void 0:B[0])==null?void 0:H.toUpperCase())??"?")+"")&&fe(f,a),(!P||i&1)&&g!==(g=e[22].name+"")&&fe(v,g),(!P||i&1)&&I!==(I=e[22].email+"")&&fe(R,I),(!P||i&1)&&A!==(A=e[9](e[22].created_at)+"")&&fe($,A);let T=y;y=O(e),y===T?z[y].p(e,i):(me(),L(z[T],1,1,()=>{z[T]=null}),de(),V=z[y],V?V.p(e,i):(V=z[y]=_[y](e),V.c()),j(V,1),V.m(t,q)),(!P||i&1&&k!==(k="flex items-center gap-4 px-5 py-4 "+(e[24]>0?"border-t border-gray-50 dark:border-gray-800":"")))&&d(t,"class",k)},i(c){P||(j(V),P=!0)},o(c){L(V),P=!1},d(c){c&&h(t),z[y].d()}}}function lt(u){let e;return{c(){e=p("div"),this.h()},l(t){e=m(t,"DIV",{class:!0}),w(e).forEach(h),this.h()},h(){d(e,"class","h-16 bg-gray-100 dark:bg-gray-800 rounded-xl animate-pulse")},m(t,s){X(t,e,s)},p:ae,d(t){t&&h(e)}}}function ze(u){let e,t,s,a,f="Ajouter un membre",n,r,l,g,v,M,D,I,R="Nom affiché",F,A,$,x,y,V="Email",q,k,P,_,z,O="Mot de passe",Q,b,c,i,T,B="Confirmer le mot de passe",H,S,ye,ee,te,$e="Annuler",xe,re,se,we,pe,Ce,Ve;l=new Ke({props:{size:18}});let N=u[3]&&Pe(u);return se=new Le({props:{size:15}}),{c(){e=p("div"),t=p("div"),s=p("div"),a=p("h2"),a.textContent=f,n=E(),r=p("button"),ue(l.$$.fragment),g=E(),v=p("div"),N&&N.c(),M=E(),D=p("div"),I=p("label"),I.textContent=R,F=E(),A=p("input"),$=E(),x=p("div"),y=p("label"),y.textContent=V,q=E(),k=p("input"),P=E(),_=p("div"),z=p("label"),z.textContent=O,Q=E(),b=p("input"),c=E(),i=p("div"),T=p("label"),T.textContent=B,H=E(),S=p("input"),ye=E(),ee=p("div"),te=p("button"),te.textContent=$e,xe=E(),re=p("button"),ue(se.$$.fragment),we=Z(" Créer le compte"),this.h()},l(U){e=m(U,"DIV",{class:!0});var G=w(e);t=m(G,"DIV",{class:!0});var ce=w(t);s=m(ce,"DIV",{class:!0});var he=w(s);a=m(he,"H2",{class:!0,"data-svelte-h":!0}),W(a)!=="svelte-vs62sb"&&(a.textContent=f),n=C(he),r=m(he,"BUTTON",{class:!0});var Te=w(r);ie(l.$$.fragment,Te),Te.forEach(h),he.forEach(h),g=C(ce),v=m(ce,"DIV",{class:!0});var J=w(v);N&&N.l(J),M=C(J),D=m(J,"DIV",{});var ge=w(D);I=m(ge,"LABEL",{class:!0,"data-svelte-h":!0}),W(I)!=="svelte-1rnibbg"&&(I.textContent=R),F=C(ge),A=m(ge,"INPUT",{placeholder:!0,class:!0}),ge.forEach(h),$=C(J),x=m(J,"DIV",{});var _e=w(x);y=m(_e,"LABEL",{class:!0,"data-svelte-h":!0}),W(y)!=="svelte-1hqydf6"&&(y.textContent=V),q=C(_e),k=m(_e,"INPUT",{type:!0,placeholder:!0,class:!0}),_e.forEach(h),P=C(J),_=m(J,"DIV",{});var be=w(_);z=m(be,"LABEL",{class:!0,"data-svelte-h":!0}),W(z)!=="svelte-1apo42j"&&(z.textContent=O),Q=C(be),b=m(be,"INPUT",{type:!0,class:!0}),be.forEach(h),c=C(J),i=m(J,"DIV",{});var ve=w(i);T=m(ve,"LABEL",{class:!0,"data-svelte-h":!0}),W(T)!=="svelte-1g2vdt3"&&(T.textContent=B),H=C(ve),S=m(ve,"INPUT",{type:!0,class:!0}),ve.forEach(h),J.forEach(h),ye=C(ce),ee=m(ce,"DIV",{class:!0});var ke=w(ee);te=m(ke,"BUTTON",{class:!0,"data-svelte-h":!0}),W(te)!=="svelte-tj1z1u"&&(te.textContent=$e),xe=C(ke),re=m(ke,"BUTTON",{class:!0});var Ee=w(re);ie(se.$$.fragment,Ee),we=Y(Ee," Créer le compte"),Ee.forEach(h),ke.forEach(h),ce.forEach(h),G.forEach(h),this.h()},h(){d(a,"class","font-semibold text-gray-900 dark:text-white"),d(r,"class","text-gray-400 hover:text-gray-600"),d(s,"class","flex items-center justify-between px-6 py-4 border-b border-gray-100 dark:border-gray-800"),d(I,"class","block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1"),d(A,"placeholder","Ex: Marie Dupont"),d(A,"class","w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"),d(y,"class","block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1"),d(k,"type","email"),d(k,"placeholder","marie@exemple.fr"),d(k,"class","w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"),d(z,"class","block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1"),d(b,"type","password"),d(b,"class","w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"),d(T,"class","block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1"),d(S,"type","password"),d(S,"class","w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"),d(v,"class","px-6 py-5 space-y-4"),d(te,"class","px-4 py-2 text-sm text-gray-600 dark:text-gray-400"),d(re,"class","flex items-center gap-2 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg text-sm font-medium transition-colors"),d(ee,"class","flex justify-end gap-3 px-6 py-4 border-t border-gray-100 dark:border-gray-800"),d(t,"class","bg-white dark:bg-gray-900 rounded-2xl w-full max-w-md shadow-xl border border-gray-100 dark:border-gray-800"),d(e,"class","fixed inset-0 bg-black/40 flex items-center justify-center z-50 p-4")},m(U,G){X(U,e,G),o(e,t),o(t,s),o(s,a),o(s,n),o(s,r),oe(l,r,null),o(t,g),o(t,v),N&&N.m(v,null),o(v,M),o(v,D),o(D,I),o(D,F),o(D,A),le(A,u[5].name),o(v,$),o(v,x),o(x,y),o(x,q),o(x,k),le(k,u[5].email),o(v,P),o(v,_),o(_,z),o(_,Q),o(_,b),le(b,u[5].password),o(v,c),o(v,i),o(i,T),o(i,H),o(i,S),le(S,u[5].confirm),o(t,ye),o(t,ee),o(ee,te),o(ee,xe),o(ee,re),oe(se,re,null),o(re,we),pe=!0,Ce||(Ve=[K(r,"click",u[11]),K(A,"input",u[12]),K(k,"input",u[13]),K(b,"input",u[14]),K(S,"input",u[15]),K(te,"click",u[16]),K(re,"click",u[7]),K(e,"click",He(u[17]))],Ce=!0)},p(U,G){U[3]?N?(N.p(U,G),G&8&&j(N,1)):(N=Pe(U),N.c(),j(N,1),N.m(v,M)):N&&(me(),L(N,1,1,()=>{N=null}),de()),G&32&&A.value!==U[5].name&&le(A,U[5].name),G&32&&k.value!==U[5].email&&le(k,U[5].email),G&32&&b.value!==U[5].password&&le(b,U[5].password),G&32&&S.value!==U[5].confirm&&le(S,U[5].confirm)},i(U){pe||(j(l.$$.fragment,U),j(N),j(se.$$.fragment,U),pe=!0)},o(U){L(l.$$.fragment,U),L(N),L(se.$$.fragment,U),pe=!1},d(U){U&&h(e),ne(l),N&&N.d(),ne(se),Ce=!1,qe(Ve)}}}function Pe(u){let e,t,s,a,f;return t=new Qe({props:{size:13}}),{c(){e=p("div"),ue(t.$$.fragment),s=E(),a=Z(u[3]),this.h()},l(n){e=m(n,"DIV",{class:!0});var r=w(e);ie(t.$$.fragment,r),s=C(r),a=Y(r,u[3]),r.forEach(h),this.h()},h(){d(e,"class","flex items-center gap-2 text-sm px-3 py-2 rounded-lg bg-red-50 dark:bg-red-950/30 text-red-600 dark:text-red-400")},m(n,r){X(n,e,r),oe(t,e,null),o(e,s),o(e,a),f=!0},p(n,r){(!f||r&8)&&fe(a,n[3])},i(n){f||(j(t.$$.fragment,n),f=!0)},o(n){L(t.$$.fragment,n),f=!1},d(n){n&&h(e),ne(t)}}}function st(u){let e,t,s,a,f,n,r="Utilisateurs",l,g,v,M,D,I,R=`Ajoutez les membres de votre famille qui peuvent accéder à l'application. - Chacun a son propre compte et mot de passe.`,F,A,$,x,y,V,q,k,P;a=new Ge({props:{size:22,class:"text-gray-400"}}),v=new Je({props:{size:16}});let _=u[4]&&je(u);const z=[et,Ze],O=[];function Q(c,i){return c[1]?0:1}$=Q(u),x=O[$]=z[$](u);let b=u[2]&&ze(u);return{c(){e=p("div"),t=p("div"),s=p("div"),ue(a.$$.fragment),f=E(),n=p("h1"),n.textContent=r,l=E(),g=p("button"),ue(v.$$.fragment),M=Z(" Ajouter un membre"),D=E(),I=p("p"),I.textContent=R,F=E(),_&&_.c(),A=E(),x.c(),y=E(),b&&b.c(),V=Ue(),this.h()},l(c){e=m(c,"DIV",{class:!0});var i=w(e);t=m(i,"DIV",{class:!0});var T=w(t);s=m(T,"DIV",{class:!0});var B=w(s);ie(a.$$.fragment,B),f=C(B),n=m(B,"H1",{class:!0,"data-svelte-h":!0}),W(n)!=="svelte-1ot16rk"&&(n.textContent=r),B.forEach(h),l=C(T),g=m(T,"BUTTON",{class:!0});var H=w(g);ie(v.$$.fragment,H),M=Y(H," Ajouter un membre"),H.forEach(h),T.forEach(h),D=C(i),I=m(i,"P",{class:!0,"data-svelte-h":!0}),W(I)!=="svelte-csgthk"&&(I.textContent=R),F=C(i),_&&_.l(i),A=C(i),x.l(i),i.forEach(h),y=C(c),b&&b.l(c),V=Ue(),this.h()},h(){d(n,"class","text-2xl font-semibold text-gray-900 dark:text-white"),d(s,"class","flex items-center gap-3"),d(g,"class","flex items-center gap-2 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg text-sm font-medium transition-colors"),d(t,"class","flex items-center justify-between mb-6"),d(I,"class","text-sm text-gray-500 dark:text-gray-400 mb-5"),d(e,"class","p-6 max-w-2xl mx-auto")},m(c,i){X(c,e,i),o(e,t),o(t,s),oe(a,s,null),o(s,f),o(s,n),o(t,l),o(t,g),oe(v,g,null),o(g,M),o(e,D),o(e,I),o(e,F),_&&_.m(e,null),o(e,A),O[$].m(e,null),X(c,y,i),b&&b.m(c,i),X(c,V,i),q=!0,k||(P=K(g,"click",u[6]),k=!0)},p(c,[i]){c[4]?_?(_.p(c,i),i&16&&j(_,1)):(_=je(c),_.c(),j(_,1),_.m(e,A)):_&&(me(),L(_,1,1,()=>{_=null}),de());let T=$;$=Q(c),$===T?O[$].p(c,i):(me(),L(O[T],1,1,()=>{O[T]=null}),de(),x=O[$],x?x.p(c,i):(x=O[$]=z[$](c),x.c()),j(x,1),x.m(e,null)),c[2]?b?(b.p(c,i),i&4&&j(b,1)):(b=ze(c),b.c(),j(b,1),b.m(V.parentNode,V)):b&&(me(),L(b,1,1,()=>{b=null}),de())},i(c){q||(j(a.$$.fragment,c),j(v.$$.fragment,c),j(_),j(x),j(b),q=!0)},o(c){L(a.$$.fragment,c),L(v.$$.fragment,c),L(_),L(x),L(b),q=!1},d(c){c&&(h(e),h(y),h(V)),ne(a),ne(v),_&&_.d(),O[$].d(),b&&b.d(c),k=!1,P()}}}function at(u,e,t){let s=[],a=!0,f=!1,n="",r="",l={email:"",name:"",password:"",confirm:""};Me(g);async function g(){t(1,a=!0),t(0,s=await De.users.list()||[]),t(1,a=!1)}function v(){t(5,l={email:"",name:"",password:"",confirm:""}),t(3,n=""),t(2,f=!0)}async function M(){if(t(3,n=""),!l.email||!l.name||!l.password){t(3,n="Tous les champs sont requis.");return}if(l.password!==l.confirm){t(3,n="Les mots de passe ne correspondent pas.");return}if(l.password.length<6){t(3,n="Minimum 6 caractères.");return}try{await De.auth.register({email:l.email,name:l.name,password:l.password}),t(2,f=!1),t(4,r=`Compte "${l.name}" créé avec succès.`),setTimeout(()=>t(4,r=""),4e3),await g()}catch(k){t(3,n=k.message)}}async function D(k,P){if(confirm(`Supprimer le compte de "${P}" ?`))try{await De.users.delete(k),await g()}catch(_){alert(_.message)}}const I=k=>new Date(k).toLocaleDateString("fr-FR",{day:"2-digit",month:"long",year:"numeric"}),R=k=>D(k.id,k.name),F=()=>t(2,f=!1);function A(){l.name=this.value,t(5,l)}function $(){l.email=this.value,t(5,l)}function x(){l.password=this.value,t(5,l)}function y(){l.confirm=this.value,t(5,l)}return[s,a,f,n,r,l,v,M,D,I,R,F,A,$,x,y,()=>t(2,f=!1),()=>t(2,f=!1)]}class gt extends Oe{constructor(e){super(),Se(this,e,at,st,Be,{})}}export{gt as component}; diff --git a/web/build/_app/immutable/nodes/2.Bm5TUCsw.js b/web/build/_app/immutable/nodes/2.Bm5TUCsw.js deleted file mode 100644 index 46164c4..0000000 --- a/web/build/_app/immutable/nodes/2.Bm5TUCsw.js +++ /dev/null @@ -1,18 +0,0 @@ -var Kr=Object.defineProperty;var qr=(i,t,e)=>t in i?Kr(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var I=(i,t,e)=>qr(i,typeof t!="symbol"?t+"":t,e);import{s as Gr,r as Ka,f as Js,c as Jr,o as Zr,n as Ot,i as lo}from"../chunks/DHedsUi_.js";import{S as Qr,i as tl,d as D,x as Le,k as Ze,l as Oe,m as Te,A as Be,q as el,a as Q,b as k,n as Qe,r as Qt,z as fi,u as E,c as O,e as R,v as Pt,g as H,o as ti,h as T,j,p as ei,s as ot,f as $,t as U,H as Yt,B as Zs,y as il}from"../chunks/G8UKEBBn.js";import{e as _t,u as qa,d as Ga}from"../chunks/C1tDbyYL.js";import{l as sl,a as Ue,p as nl}from"../chunks/DjUyxgK6.js";import{R as ol}from"../chunks/Db8cSFEn.js";import{T as al,a as rl}from"../chunks/7IRyKQzz.js";import{C as co}from"../chunks/B9ru2HtO.js";/*! - * @kurkle/color v0.3.4 - * https://github.com/kurkle/color#readme - * (c) 2024 Jukka Kurkela - * Released under the MIT License - */function ki(i){return i+.5|0}const he=(i,t,e)=>Math.max(Math.min(i,e),t);function ii(i){return he(ki(i*2.55),0,255)}function pe(i){return he(ki(i*255),0,255)}function te(i){return he(ki(i/2.55)/100,0,1)}function ho(i){return he(ki(i*100),0,100)}const Tt={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},pn=[..."0123456789ABCDEF"],ll=i=>pn[i&15],cl=i=>pn[(i&240)>>4]+pn[i&15],Ji=i=>(i&240)>>4===(i&15),hl=i=>Ji(i.r)&&Ji(i.g)&&Ji(i.b)&&Ji(i.a);function dl(i){var t=i.length,e;return i[0]==="#"&&(t===4||t===5?e={r:255&Tt[i[1]]*17,g:255&Tt[i[2]]*17,b:255&Tt[i[3]]*17,a:t===5?Tt[i[4]]*17:255}:(t===7||t===9)&&(e={r:Tt[i[1]]<<4|Tt[i[2]],g:Tt[i[3]]<<4|Tt[i[4]],b:Tt[i[5]]<<4|Tt[i[6]],a:t===9?Tt[i[7]]<<4|Tt[i[8]]:255})),e}const ul=(i,t)=>i<255?t(i):"";function fl(i){var t=hl(i)?ll:cl;return i?"#"+t(i.r)+t(i.g)+t(i.b)+ul(i.a,t):void 0}const gl=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Ja(i,t,e){const s=t*Math.min(e,1-e),n=(o,a=(o+i/30)%12)=>e-s*Math.max(Math.min(a-3,9-a,1),-1);return[n(0),n(8),n(4)]}function pl(i,t,e){const s=(n,o=(n+i/60)%6)=>e-e*t*Math.max(Math.min(o,4-o,1),0);return[s(5),s(3),s(1)]}function ml(i,t,e){const s=Ja(i,1,.5);let n;for(t+e>1&&(n=1/(t+e),t*=n,e*=n),n=0;n<3;n++)s[n]*=1-t-e,s[n]+=t;return s}function bl(i,t,e,s,n){return i===n?(t-e)/s+(t.5?h/(2-o-a):h/(o+a),l=bl(e,s,n,h,o),l=l*60+.5),[l|0,c||0,r]}function En(i,t,e,s){return(Array.isArray(t)?i(t[0],t[1],t[2]):i(t,e,s)).map(pe)}function Ln(i,t,e){return En(Ja,i,t,e)}function _l(i,t,e){return En(ml,i,t,e)}function xl(i,t,e){return En(pl,i,t,e)}function Za(i){return(i%360+360)%360}function yl(i){const t=gl.exec(i);let e=255,s;if(!t)return;t[5]!==s&&(e=t[6]?ii(+t[5]):pe(+t[5]));const n=Za(+t[2]),o=+t[3]/100,a=+t[4]/100;return t[1]==="hwb"?s=_l(n,o,a):t[1]==="hsv"?s=xl(n,o,a):s=Ln(n,o,a),{r:s[0],g:s[1],b:s[2],a:e}}function vl(i,t){var e=Tn(i);e[0]=Za(e[0]+t),e=Ln(e),i.r=e[0],i.g=e[1],i.b=e[2]}function kl(i){if(!i)return;const t=Tn(i),e=t[0],s=ho(t[1]),n=ho(t[2]);return i.a<255?`hsla(${e}, ${s}%, ${n}%, ${te(i.a)})`:`hsl(${e}, ${s}%, ${n}%)`}const uo={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"},fo={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 Ml(){const i={},t=Object.keys(fo),e=Object.keys(uo);let s,n,o,a,r;for(s=0;s>16&255,o>>8&255,o&255]}return i}let Zi;function wl(i){Zi||(Zi=Ml(),Zi.transparent=[0,0,0,0]);const t=Zi[i.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const Sl=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Dl(i){const t=Sl.exec(i);let e=255,s,n,o;if(t){if(t[7]!==s){const a=+t[7];e=t[8]?ii(a):he(a*255,0,255)}return s=+t[1],n=+t[3],o=+t[5],s=255&(t[2]?ii(s):he(s,0,255)),n=255&(t[4]?ii(n):he(n,0,255)),o=255&(t[6]?ii(o):he(o,0,255)),{r:s,g:n,b:o,a:e}}}function Pl(i){return i&&(i.a<255?`rgba(${i.r}, ${i.g}, ${i.b}, ${te(i.a)})`:`rgb(${i.r}, ${i.g}, ${i.b})`)}const Qs=i=>i<=.0031308?i*12.92:Math.pow(i,1/2.4)*1.055-.055,Ne=i=>i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4);function Cl(i,t,e){const s=Ne(te(i.r)),n=Ne(te(i.g)),o=Ne(te(i.b));return{r:pe(Qs(s+e*(Ne(te(t.r))-s))),g:pe(Qs(n+e*(Ne(te(t.g))-n))),b:pe(Qs(o+e*(Ne(te(t.b))-o))),a:i.a+e*(t.a-i.a)}}function Qi(i,t,e){if(i){let s=Tn(i);s[t]=Math.max(0,Math.min(s[t]+s[t]*e,t===0?360:1)),s=Ln(s),i.r=s[0],i.g=s[1],i.b=s[2]}}function Qa(i,t){return i&&Object.assign(t||{},i)}function go(i){var t={r:0,g:0,b:0,a:255};return Array.isArray(i)?i.length>=3&&(t={r:i[0],g:i[1],b:i[2],a:255},i.length>3&&(t.a=pe(i[3]))):(t=Qa(i,{r:0,g:0,b:0,a:1}),t.a=pe(t.a)),t}function Al(i){return i.charAt(0)==="r"?Dl(i):yl(i)}class gi{constructor(t){if(t instanceof gi)return t;const e=typeof t;let s;e==="object"?s=go(t):e==="string"&&(s=dl(t)||wl(t)||Al(t)),this._rgb=s,this._valid=!!s}get valid(){return this._valid}get rgb(){var t=Qa(this._rgb);return t&&(t.a=te(t.a)),t}set rgb(t){this._rgb=go(t)}rgbString(){return this._valid?Pl(this._rgb):void 0}hexString(){return this._valid?fl(this._rgb):void 0}hslString(){return this._valid?kl(this._rgb):void 0}mix(t,e){if(t){const s=this.rgb,n=t.rgb;let o;const a=e===o?.5:e,r=2*a-1,l=s.a-n.a,c=((r*l===-1?r:(r+l)/(1+r*l))+1)/2;o=1-c,s.r=255&c*s.r+o*n.r+.5,s.g=255&c*s.g+o*n.g+.5,s.b=255&c*s.b+o*n.b+.5,s.a=a*s.a+(1-a)*n.a,this.rgb=s}return this}interpolate(t,e){return t&&(this._rgb=Cl(this._rgb,t._rgb,e)),this}clone(){return new gi(this.rgb)}alpha(t){return this._rgb.a=pe(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=ki(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){const e=this._rgb;return e.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Qi(this._rgb,2,t),this}darken(t){return Qi(this._rgb,2,-t),this}saturate(t){return Qi(this._rgb,1,t),this}desaturate(t){return Qi(this._rgb,1,-t),this}rotate(t){return vl(this._rgb,t),this}}/*! - * Chart.js v4.5.1 - * https://www.chartjs.org - * (c) 2025 Chart.js Contributors - * Released under the MIT License - */function Gt(){}const Ol=(()=>{let i=0;return()=>i++})();function Z(i){return i==null}function lt(i){if(Array.isArray&&Array.isArray(i))return!0;const t=Object.prototype.toString.call(i);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function tt(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}function ut(i){return(typeof i=="number"||i instanceof Number)&&isFinite(+i)}function At(i,t){return ut(i)?i:t}function X(i,t){return typeof i>"u"?t:i}const Tl=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100:+i/t,tr=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*t:+i;function at(i,t,e){if(i&&typeof i.call=="function")return i.apply(e,t)}function nt(i,t,e,s){let n,o,a;if(lt(i))for(o=i.length,n=0;ni,x:i=>i.x,y:i=>i.y};function Rl(i){const t=i.split("."),e=[];let s="";for(const n of t)s+=n,s.endsWith("\\")?s=s.slice(0,-1)+".":(e.push(s),s="");return e}function Il(i){const t=Rl(i);return e=>{for(const s of t){if(s==="")break;e=e&&e[s]}return e}}function me(i,t){return(po[t]||(po[t]=Il(t)))(i)}function Rn(i){return i.charAt(0).toUpperCase()+i.slice(1)}const mi=i=>typeof i<"u",be=i=>typeof i=="function",mo=(i,t)=>{if(i.size!==t.size)return!1;for(const e of i)if(!t.has(e))return!1;return!0};function Fl(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}const st=Math.PI,rt=2*st,zl=rt+st,vs=Number.POSITIVE_INFINITY,Vl=st/180,ft=st/2,we=st/4,bo=st*2/3,de=Math.log10,$t=Math.sign;function ci(i,t,e){return Math.abs(i-t)n-o).pop(),t}function Nl(i){return typeof i=="symbol"||typeof i=="object"&&i!==null&&!(Symbol.toPrimitive in i||"toString"in i||"valueOf"in i)}function je(i){return!Nl(i)&&!isNaN(parseFloat(i))&&isFinite(i)}function Wl(i,t){const e=Math.round(i);return e-t<=i&&e+t>=i}function ir(i,t,e){let s,n,o;for(s=0,n=i.length;sl&&c=Math.min(t,e)-s&&i<=Math.max(t,e)+s}function Fn(i,t,e){e=e||(a=>i[a]1;)o=n+s>>1,e(o)?n=o:s=o;return{lo:n,hi:s}}const ie=(i,t,e,s)=>Fn(i,e,s?n=>{const o=i[n][t];return oi[n][t]Fn(i,e,s=>i[s][t]>=e);function $l(i,t,e){let s=0,n=i.length;for(;ss&&i[n-1]>e;)n--;return s>0||n{const s="_onData"+Rn(e),n=i[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,value(...o){const a=n.apply(this,o);return i._chartjs.listeners.forEach(r=>{typeof r[s]=="function"&&r[s](...o)}),a}})})}function yo(i,t){const e=i._chartjs;if(!e)return;const s=e.listeners,n=s.indexOf(t);n!==-1&&s.splice(n,1),!(s.length>0)&&(nr.forEach(o=>{delete i[o]}),delete i._chartjs)}function or(i){const t=new Set(i);return t.size===i.length?i:Array.from(t)}const ar=function(){return typeof window>"u"?function(i){return i()}:window.requestAnimationFrame}();function rr(i,t){let e=[],s=!1;return function(...n){e=n,s||(s=!0,ar.call(window,()=>{s=!1,i.apply(t,e)}))}}function Xl(i,t){let e;return function(...s){return t?(clearTimeout(e),e=setTimeout(i,t,s)):i.apply(this,s),t}}const zn=i=>i==="start"?"left":i==="end"?"right":"center",mt=(i,t,e)=>i==="start"?t:i==="end"?e:(t+e)/2,Kl=(i,t,e,s)=>i===(s?"left":"right")?e:i==="center"?(t+e)/2:t;function lr(i,t,e){const s=t.length;let n=0,o=s;if(i._sorted){const{iScale:a,vScale:r,_parsed:l}=i,c=i.dataset&&i.dataset.options?i.dataset.options.spanGaps:null,h=a.axis,{min:d,max:u,minDefined:f,maxDefined:g}=a.getUserBounds();if(f){if(n=Math.min(ie(l,h,d).lo,e?s:ie(t,h,a.getPixelForValue(d)).lo),c){const p=l.slice(0,n+1).reverse().findIndex(m=>!Z(m[r.axis]));n-=Math.max(0,p)}n=pt(n,0,s-1)}if(g){let p=Math.max(ie(l,a.axis,u,!0).hi+1,e?0:ie(t,h,a.getPixelForValue(u),!0).hi+1);if(c){const m=l.slice(p-1).findIndex(b=>!Z(b[r.axis]));p+=Math.max(0,m)}o=pt(p,n,s)-n}else o=s-n}return{start:n,count:o}}function cr(i){const{xScale:t,yScale:e,_scaleRanges:s}=i,n={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!s)return i._scaleRanges=n,!0;const o=s.xmin!==t.min||s.xmax!==t.max||s.ymin!==e.min||s.ymax!==e.max;return Object.assign(s,n),o}const ts=i=>i===0||i===1,vo=(i,t,e)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-t)*rt/e)),ko=(i,t,e)=>Math.pow(2,-10*i)*Math.sin((i-t)*rt/e)+1,hi={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>-Math.cos(i*ft)+1,easeOutSine:i=>Math.sin(i*ft),easeInOutSine:i=>-.5*(Math.cos(st*i)-1),easeInExpo:i=>i===0?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>i===1?1:-Math.pow(2,-10*i)+1,easeInOutExpo:i=>ts(i)?i:i<.5?.5*Math.pow(2,10*(i*2-1)):.5*(-Math.pow(2,-10*(i*2-1))+2),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>ts(i)?i:vo(i,.075,.3),easeOutElastic:i=>ts(i)?i:ko(i,.075,.3),easeInOutElastic(i){return ts(i)?i:i<.5?.5*vo(i*2,.1125,.45):.5+.5*ko(i*2-1,.1125,.45)},easeInBack(i){return i*i*((1.70158+1)*i-1.70158)},easeOutBack(i){return(i-=1)*i*((1.70158+1)*i+1.70158)+1},easeInOutBack(i){let t=1.70158;return(i/=.5)<1?.5*(i*i*(((t*=1.525)+1)*i-t)):.5*((i-=2)*i*(((t*=1.525)+1)*i+t)+2)},easeInBounce:i=>1-hi.easeOutBounce(1-i),easeOutBounce(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},easeInOutBounce:i=>i<.5?hi.easeInBounce(i*2)*.5:hi.easeOutBounce(i*2-1)*.5+.5};function Vn(i){if(i&&typeof i=="object"){const t=i.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Mo(i){return Vn(i)?i:new gi(i)}function tn(i){return Vn(i)?i:new gi(i).saturate(.5).darken(.1).hexString()}const ql=["x","y","borderWidth","radius","tension"],Gl=["color","borderColor","backgroundColor"];function Jl(i){i.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),i.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),i.set("animations",{colors:{type:"color",properties:Gl},numbers:{type:"number",properties:ql}}),i.describe("animations",{_fallback:"animation"}),i.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function Zl(i){i.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const wo=new Map;function Ql(i,t){t=t||{};const e=i+JSON.stringify(t);let s=wo.get(e);return s||(s=new Intl.NumberFormat(i,t),wo.set(e,s)),s}function Mi(i,t,e){return Ql(t,e).format(i)}const hr={values(i){return lt(i)?i:""+i},numeric(i,t,e){if(i===0)return"0";const s=this.chart.options.locale;let n,o=i;if(e.length>1){const c=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(c<1e-4||c>1e15)&&(n="scientific"),o=tc(i,e)}const a=de(Math.abs(o)),r=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:n,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),Mi(i,s,l)},logarithmic(i,t,e){if(i===0)return"0";const s=e[t].significand||i/Math.pow(10,Math.floor(de(i)));return[1,2,3,5,10,15].includes(s)||t>.8*e.length?hr.numeric.call(this,i,t,e):""}};function tc(i,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&i!==Math.floor(i)&&(e=i-Math.floor(i)),e}var Ps={formatters:hr};function ec(i){i.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Ps.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),i.route("scale.ticks","color","","color"),i.route("scale.grid","color","","borderColor"),i.route("scale.border","color","","borderColor"),i.route("scale.title","color","","color"),i.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),i.describe("scales",{_fallback:"scale"}),i.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Fe=Object.create(null),bn=Object.create(null);function di(i,t){if(!t)return i;const e=t.split(".");for(let s=0,n=e.length;ss.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(s,n)=>tn(n.backgroundColor),this.hoverBorderColor=(s,n)=>tn(n.borderColor),this.hoverColor=(s,n)=>tn(n.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return en(this,t,e)}get(t){return di(this,t)}describe(t,e){return en(bn,t,e)}override(t,e){return en(Fe,t,e)}route(t,e,s,n){const o=di(this,t),a=di(this,s),r="_"+e;Object.defineProperties(o,{[r]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const l=this[r],c=a[n];return tt(l)?Object.assign({},c,l):X(l,c)},set(l){this[r]=l}}})}apply(t){t.forEach(e=>e(this))}}var ct=new ic({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Jl,Zl,ec]);function sc(i){return!i||Z(i.size)||Z(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function ks(i,t,e,s,n){let o=t[n];return o||(o=t[n]=i.measureText(n).width,e.push(n)),o>s&&(s=o),s}function nc(i,t,e,s){s=s||{};let n=s.data=s.data||{},o=s.garbageCollect=s.garbageCollect||[];s.font!==t&&(n=s.data={},o=s.garbageCollect=[],s.font=t),i.save(),i.font=t;let a=0;const r=e.length;let l,c,h,d,u;for(l=0;le.length){for(l=0;l0&&i.stroke()}}function se(i,t,e){return e=e||.5,!t||i&&i.x>t.left-e&&i.xt.top-e&&i.y0&&o.strokeColor!=="";let l,c;for(i.save(),i.font=n.string,rc(i,o),l=0;l+i||0;function Bn(i,t){const e={},s=tt(t),n=s?Object.keys(t):t,o=tt(i)?s?a=>X(i[a],i[t[a]]):a=>i[a]:()=>i;for(const a of n)e[a]=fc(o(a));return e}function ur(i){return Bn(i,{top:"y",right:"x",bottom:"y",left:"x"})}function Re(i){return Bn(i,["topLeft","topRight","bottomLeft","bottomRight"])}function yt(i){const t=ur(i);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function gt(i,t){i=i||{},t=t||ct.font;let e=X(i.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let s=X(i.style,t.style);s&&!(""+s).match(dc)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);const n={family:X(i.family,t.family),lineHeight:uc(X(i.lineHeight,t.lineHeight),e),size:e,style:s,weight:X(i.weight,t.weight),string:""};return n.string=sc(n),n}function si(i,t,e,s){let n,o,a;for(n=0,o=i.length;ne&&r===0?0:r+l;return{min:a(s,-Math.abs(o)),max:a(n,o)}}function _e(i,t){return Object.assign(Object.create(i),t)}function Nn(i,t=[""],e,s,n=()=>i[0]){const o=e||i;typeof s>"u"&&(s=mr("_fallback",i));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:o,_fallback:s,_getTarget:n,override:r=>Nn([r,...i],t,o,s)};return new Proxy(a,{deleteProperty(r,l){return delete r[l],delete r._keys,delete i[0][l],!0},get(r,l){return gr(r,l,()=>kc(l,t,i,r))},getOwnPropertyDescriptor(r,l){return Reflect.getOwnPropertyDescriptor(r._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(r,l){return Po(r).includes(l)},ownKeys(r){return Po(r)},set(r,l,c){const h=r._storage||(r._storage=n());return r[l]=h[l]=c,delete r._keys,!0}})}function Ye(i,t,e,s){const n={_cacheable:!1,_proxy:i,_context:t,_subProxy:e,_stack:new Set,_descriptors:fr(i,s),setContext:o=>Ye(i,o,e,s),override:o=>Ye(i.override(o),t,e,s)};return new Proxy(n,{deleteProperty(o,a){return delete o[a],delete i[a],!0},get(o,a,r){return gr(o,a,()=>mc(o,a,r))},getOwnPropertyDescriptor(o,a){return o._descriptors.allKeys?Reflect.has(i,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,a)},getPrototypeOf(){return Reflect.getPrototypeOf(i)},has(o,a){return Reflect.has(i,a)},ownKeys(){return Reflect.ownKeys(i)},set(o,a,r){return i[a]=r,delete o[a],!0}})}function fr(i,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:s=t.indexable,_allKeys:n=t.allKeys}=i;return{allKeys:n,scriptable:e,indexable:s,isScriptable:be(e)?e:()=>e,isIndexable:be(s)?s:()=>s}}const pc=(i,t)=>i?i+Rn(t):t,Wn=(i,t)=>tt(t)&&i!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function gr(i,t,e){if(Object.prototype.hasOwnProperty.call(i,t)||t==="constructor")return i[t];const s=e();return i[t]=s,s}function mc(i,t,e){const{_proxy:s,_context:n,_subProxy:o,_descriptors:a}=i;let r=s[t];return be(r)&&a.isScriptable(t)&&(r=bc(t,r,i,e)),lt(r)&&r.length&&(r=_c(t,r,i,a.isIndexable)),Wn(t,r)&&(r=Ye(r,n,o&&o[t],a)),r}function bc(i,t,e,s){const{_proxy:n,_context:o,_subProxy:a,_stack:r}=e;if(r.has(i))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+i);r.add(i);let l=t(o,a||s);return r.delete(i),Wn(i,l)&&(l=Hn(n._scopes,n,i,l)),l}function _c(i,t,e,s){const{_proxy:n,_context:o,_subProxy:a,_descriptors:r}=e;if(typeof o.index<"u"&&s(i))return t[o.index%t.length];if(tt(t[0])){const l=t,c=n._scopes.filter(h=>h!==l);t=[];for(const h of l){const d=Hn(c,n,i,h);t.push(Ye(d,o,a&&a[i],r))}}return t}function pr(i,t,e){return be(i)?i(t,e):i}const xc=(i,t)=>i===!0?t:typeof i=="string"?me(t,i):void 0;function yc(i,t,e,s,n){for(const o of t){const a=xc(e,o);if(a){i.add(a);const r=pr(a._fallback,e,n);if(typeof r<"u"&&r!==e&&r!==s)return r}else if(a===!1&&typeof s<"u"&&e!==s)return null}return!1}function Hn(i,t,e,s){const n=t._rootScopes,o=pr(t._fallback,e,s),a=[...i,...n],r=new Set;r.add(s);let l=Do(r,a,e,o||e,s);return l===null||typeof o<"u"&&o!==e&&(l=Do(r,a,o,l,s),l===null)?!1:Nn(Array.from(r),[""],n,o,()=>vc(t,e,s))}function Do(i,t,e,s,n){for(;e;)e=yc(i,t,e,s,n);return e}function vc(i,t,e){const s=i._getTarget();t in s||(s[t]={});const n=s[t];return lt(n)&&tt(e)?e:n||{}}function kc(i,t,e,s){let n;for(const o of t)if(n=mr(pc(o,i),e),typeof n<"u")return Wn(i,n)?Hn(e,s,i,n):n}function mr(i,t){for(const e of t){if(!e)continue;const s=e[i];if(typeof s<"u")return s}}function Po(i){let t=i._keys;return t||(t=i._keys=Mc(i._scopes)),t}function Mc(i){const t=new Set;for(const e of i)for(const s of Object.keys(e).filter(n=>!n.startsWith("_")))t.add(s);return Array.from(t)}function br(i,t,e,s){const{iScale:n}=i,{key:o="r"}=this._parsing,a=new Array(s);let r,l,c,h;for(r=0,l=s;rti==="x"?"y":"x";function Sc(i,t,e,s){const n=i.skip?t:i,o=t,a=e.skip?t:e,r=mn(o,n),l=mn(a,o);let c=r/(r+l),h=l/(r+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const d=s*c,u=s*h;return{previous:{x:o.x-d*(a.x-n.x),y:o.y-d*(a.y-n.y)},next:{x:o.x+u*(a.x-n.x),y:o.y+u*(a.y-n.y)}}}function Dc(i,t,e){const s=i.length;let n,o,a,r,l,c=$e(i,0);for(let h=0;h!c.skip)),t.cubicInterpolationMode==="monotone")Cc(i,n);else{let c=s?i[i.length-1]:i[0];for(o=0,a=i.length;oi.ownerDocument.defaultView.getComputedStyle(i,null);function Tc(i,t){return Os(i).getPropertyValue(t)}const Ec=["top","right","bottom","left"];function Ie(i,t,e){const s={};e=e?"-"+e:"";for(let n=0;n<4;n++){const o=Ec[n];s[o]=parseFloat(i[t+"-"+o+e])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}const Lc=(i,t,e)=>(i>0||t>0)&&(!e||!e.shadowRoot);function Rc(i,t){const e=i.touches,s=e&&e.length?e[0]:i,{offsetX:n,offsetY:o}=s;let a=!1,r,l;if(Lc(n,o,i.target))r=n,l=o;else{const c=t.getBoundingClientRect();r=s.clientX-c.left,l=s.clientY-c.top,a=!0}return{x:r,y:l,box:a}}function Ce(i,t){if("native"in i)return i;const{canvas:e,currentDevicePixelRatio:s}=t,n=Os(e),o=n.boxSizing==="border-box",a=Ie(n,"padding"),r=Ie(n,"border","width"),{x:l,y:c,box:h}=Rc(i,e),d=a.left+(h&&r.left),u=a.top+(h&&r.top);let{width:f,height:g}=t;return o&&(f-=a.width+r.width,g-=a.height+r.height),{x:Math.round((l-d)/f*e.width/s),y:Math.round((c-u)/g*e.height/s)}}function Ic(i,t,e){let s,n;if(t===void 0||e===void 0){const o=i&&Yn(i);if(!o)t=i.clientWidth,e=i.clientHeight;else{const a=o.getBoundingClientRect(),r=Os(o),l=Ie(r,"border","width"),c=Ie(r,"padding");t=a.width-c.width-l.width,e=a.height-c.height-l.height,s=Ms(r.maxWidth,o,"clientWidth"),n=Ms(r.maxHeight,o,"clientHeight")}}return{width:t,height:e,maxWidth:s||vs,maxHeight:n||vs}}const ue=i=>Math.round(i*10)/10;function Fc(i,t,e,s){const n=Os(i),o=Ie(n,"margin"),a=Ms(n.maxWidth,i,"clientWidth")||vs,r=Ms(n.maxHeight,i,"clientHeight")||vs,l=Ic(i,t,e);let{width:c,height:h}=l;if(n.boxSizing==="content-box"){const u=Ie(n,"border","width"),f=Ie(n,"padding");c-=f.width+u.width,h-=f.height+u.height}return c=Math.max(0,c-o.width),h=Math.max(0,s?c/s:h-o.height),c=ue(Math.min(c,a,l.maxWidth)),h=ue(Math.min(h,r,l.maxHeight)),c&&!h&&(h=ue(c/2)),(t!==void 0||e!==void 0)&&s&&l.height&&h>l.height&&(h=l.height,c=ue(Math.floor(h*s))),{width:c,height:h}}function Co(i,t,e){const s=t||1,n=ue(i.height*s),o=ue(i.width*s);i.height=ue(i.height),i.width=ue(i.width);const a=i.canvas;return a.style&&(e||!a.style.height&&!a.style.width)&&(a.style.height=`${i.height}px`,a.style.width=`${i.width}px`),i.currentDevicePixelRatio!==s||a.height!==n||a.width!==o?(i.currentDevicePixelRatio=s,a.height=n,a.width=o,i.ctx.setTransform(s,0,0,s,0,0),!0):!1}const zc=function(){let i=!1;try{const t={get passive(){return i=!0,!1}};jn()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return i}();function Ao(i,t){const e=Tc(i,t),s=e&&e.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function Ae(i,t,e,s){return{x:i.x+e*(t.x-i.x),y:i.y+e*(t.y-i.y)}}function Vc(i,t,e,s){return{x:i.x+e*(t.x-i.x),y:s==="middle"?e<.5?i.y:t.y:s==="after"?e<1?i.y:t.y:e>0?t.y:i.y}}function Bc(i,t,e,s){const n={x:i.cp2x,y:i.cp2y},o={x:t.cp1x,y:t.cp1y},a=Ae(i,n,e),r=Ae(n,o,e),l=Ae(o,t,e),c=Ae(a,r,e),h=Ae(r,l,e);return Ae(c,h,e)}const Nc=function(i,t){return{x(e){return i+i+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,s){return e-s},leftForLtr(e,s){return e-s}}},Wc=function(){return{x(i){return i},setWidth(i){},textAlign(i){return i},xPlus(i,t){return i+t},leftForLtr(i,t){return i}}};function He(i,t,e){return i?Nc(t,e):Wc()}function xr(i,t){let e,s;(t==="ltr"||t==="rtl")&&(e=i.canvas.style,s=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),i.prevTextDirection=s)}function yr(i,t){t!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",t[0],t[1]))}function vr(i){return i==="angle"?{between:bi,compare:Hl,normalize:bt}:{between:ee,compare:(t,e)=>t-e,normalize:t=>t}}function Oo({start:i,end:t,count:e,loop:s,style:n}){return{start:i%e,end:t%e,loop:s&&(t-i+1)%e===0,style:n}}function Hc(i,t,e){const{property:s,start:n,end:o}=e,{between:a,normalize:r}=vr(s),l=t.length;let{start:c,end:h,loop:d}=i,u,f;if(d){for(c+=l,h+=l,u=0,f=l;ul(n,v,b)&&r(n,v)!==0,y=()=>r(o,b)===0||l(o,v,b),w=()=>p||x(),M=()=>!p||y();for(let S=h,C=h;S<=d;++S)_=t[S%a],!_.skip&&(b=c(_[s]),b!==v&&(p=l(b,n,o),m===null&&w()&&(m=r(b,n)===0?S:C),m!==null&&M()&&(g.push(Oo({start:m,end:S,loop:u,count:a,style:f})),m=null),C=S,v=b));return m!==null&&g.push(Oo({start:m,end:d,loop:u,count:a,style:f})),g}function Mr(i,t){const e=[],s=i.segments;for(let n=0;nn&&i[o%t].skip;)o--;return o%=t,{start:n,end:o}}function Yc(i,t,e,s){const n=i.length,o=[];let a=t,r=i[t],l;for(l=t+1;l<=e;++l){const c=i[l%n];c.skip||c.stop?r.skip||(s=!1,o.push({start:t%n,end:(l-1)%n,loop:s}),t=a=c.stop?l:null):(a=l,r.skip&&(t=l)),r=c}return a!==null&&o.push({start:t%n,end:a%n,loop:s}),o}function $c(i,t){const e=i.points,s=i.options.spanGaps,n=e.length;if(!n)return[];const o=!!i._loop,{start:a,end:r}=jc(e,n,o,s);if(s===!0)return To(i,[{start:a,end:r,loop:o}],e,t);const l=rr({chart:t,initial:e.initial,numSteps:a,currentStep:Math.min(s-e.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=ar.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((s,n)=>{if(!s.running||!s.items.length)return;const o=s.items;let a=o.length-1,r=!1,l;for(;a>=0;--a)l=o[a],l._active?(l._total>s.duration&&(s.duration=l._total),l.tick(t),r=!0):(o[a]=o[o.length-1],o.pop());r&&(n.draw(),this._notify(n,s,t,"progress")),o.length||(s.running=!1,this._notify(n,s,t,"complete"),s.initial=!1),e+=o.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let s=e.get(t);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,s)),s}listen(t,e,s){this._getAnims(t).listeners[e].push(s)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((s,n)=>Math.max(s,n._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const s=e.items;let n=s.length-1;for(;n>=0;--n)s[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Jt=new qc;const Lo="transparent",Gc={boolean(i,t,e){return e>.5?t:i},color(i,t,e){const s=Mo(i||Lo),n=s.valid&&Mo(t||Lo);return n&&n.valid?n.mix(s,e).hexString():t},number(i,t,e){return i+(t-i)*e}};class Jc{constructor(t,e,s,n){const o=e[s];n=si([t.to,n,o,t.from]);const a=si([t.from,o,n]);this._active=!0,this._fn=t.fn||Gc[t.type||typeof a],this._easing=hi[t.easing]||hi.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=s,this._from=a,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,s){if(this._active){this._notify(!1);const n=this._target[this._prop],o=s-this._start,a=this._duration-o;this._start=s,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=si([t.to,e,n,t.from]),this._from=si([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,s=this._duration,n=this._prop,o=this._from,a=this._loop,r=this._to;let l;if(this._active=o!==r&&(a||e1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[n]=this._fn(o,r,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,s)=>{t.push({res:e,rej:s})})}_notify(t){const e=t?"res":"rej",s=this._promises||[];for(let n=0;n{const o=t[n];if(!tt(o))return;const a={};for(const r of e)a[r]=o[r];(lt(o.properties)&&o.properties||[n]).forEach(r=>{(r===n||!s.has(r))&&s.set(r,a)})})}_animateOptions(t,e){const s=e.options,n=Qc(t,s);if(!n)return[];const o=this._createAnimations(n,s);return s.$shared&&Zc(t.options.$animations,s).then(()=>{t.options=s},()=>{}),o}_createAnimations(t,e){const s=this._properties,n=[],o=t.$animations||(t.$animations={}),a=Object.keys(e),r=Date.now();let l;for(l=a.length-1;l>=0;--l){const c=a[l];if(c.charAt(0)==="$")continue;if(c==="options"){n.push(...this._animateOptions(t,e));continue}const h=e[c];let d=o[c];const u=s.get(c);if(d)if(u&&d.active()){d.update(u,h,r);continue}else d.cancel();if(!u||!u.duration){t[c]=h;continue}o[c]=d=new Jc(u,t,c,h),n.push(d)}return n}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const s=this._createAnimations(t,e);if(s.length)return Jt.add(this._chart,s),!0}}function Zc(i,t){const e=[],s=Object.keys(t);for(let n=0;n0||!e&&o<0)return n.index}return null}function zo(i,t){const{chart:e,_cachedMeta:s}=i,n=e._stacks||(e._stacks={}),{iScale:o,vScale:a,index:r}=s,l=o.axis,c=a.axis,h=sh(o,a,s),d=t.length;let u;for(let f=0;fe[s].axis===t).shift()}function ah(i,t){return _e(i,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function rh(i,t,e){return _e(i,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function Xe(i,t){const e=i.controller.index,s=i.vScale&&i.vScale.axis;if(s){t=t||i._parsed;for(const n of t){const o=n._stacks;if(!o||o[s]===void 0||o[s][e]===void 0)return;delete o[s][e],o[s]._visualValues!==void 0&&o[s]._visualValues[e]!==void 0&&delete o[s]._visualValues[e]}}}const on=i=>i==="reset"||i==="none",Vo=(i,t)=>t?i:Object.assign({},i),lh=(i,t,e)=>i&&!t.hidden&&t._stacked&&{keys:Dr(e,!0),values:null};class Vt{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=sn(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Xe(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,s=this.getDataset(),n=(d,u,f,g)=>d==="x"?u:d==="r"?g:f,o=e.xAxisID=X(s.xAxisID,nn(t,"x")),a=e.yAxisID=X(s.yAxisID,nn(t,"y")),r=e.rAxisID=X(s.rAxisID,nn(t,"r")),l=e.indexAxis,c=e.iAxisID=n(l,o,a,r),h=e.vAxisID=n(l,a,o,r);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(a),e.rScale=this.getScaleForId(r),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(h)}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 e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&yo(this._data,this),t._stacked&&Xe(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),s=this._data;if(tt(e)){const n=this._cachedMeta;this._data=ih(e,n)}else if(s!==e){if(s){yo(s,this);const n=this._cachedMeta;Xe(n),n._parsed=[]}e&&Object.isExtensible(e)&&Ul(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,s=this.getDataset();let n=!1;this._dataCheck();const o=e._stacked;e._stacked=sn(e.vScale,e),e.stack!==s.stack&&(n=!0,Xe(e),e.stack=s.stack),this._resyncElements(t),(n||o!==e._stacked)&&(zo(this,e._parsed),e._stacked=sn(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),s=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:s,_data:n}=this,{iScale:o,_stacked:a}=s,r=o.axis;let l=t===0&&e===n.length?!0:s._sorted,c=t>0&&s._parsed[t-1],h,d,u;if(this._parsing===!1)s._parsed=n,s._sorted=!0,u=n;else{lt(n[t])?u=this.parseArrayData(s,n,t,e):tt(n[t])?u=this.parseObjectData(s,n,t,e):u=this.parsePrimitiveData(s,n,t,e);const f=()=>d[r]===null||c&&d[r]p||d=0;--u)if(!g()){this.updateRangeFromParsed(c,t,f,l);break}}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,s=[];let n,o,a;for(n=0,o=e.length;n=0&&tthis.getContext(s,n,e),p=c.resolveNamedOptions(u,f,g,d);return p.$shared&&(p.$shared=l,o[a]=Object.freeze(Vo(p,l))),p}_resolveAnimations(t,e,s){const n=this.chart,o=this._cachedDataOpts,a=`animation-${e}`,r=o[a];if(r)return r;let l;if(n.options.animation!==!1){const h=this.chart.config,d=h.datasetAnimationScopeKeys(this._type,e),u=h.getOptionScopes(this.getDataset(),d);l=h.createResolver(u,this.getContext(t,s,e))}const c=new Sr(n,l&&l.animations);return l&&l._cacheable&&(o[a]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||on(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const s=this.resolveDataElementOptions(t,e),n=this._sharedOptions,o=this.getSharedOptions(s),a=this.includeOptions(e,o)||o!==n;return this.updateSharedOptions(o,e,s),{sharedOptions:o,includeOptions:a}}updateElement(t,e,s,n){on(n)?Object.assign(t,s):this._resolveAnimations(e,n).update(t,s)}updateSharedOptions(t,e,s){t&&!on(e)&&this._resolveAnimations(void 0,e).update(t,s)}_setStyle(t,e,s,n){t.active=n;const o=this.getStyle(e,n);this._resolveAnimations(e,s,n).update(t,{options:!n&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,s){this._setStyle(t,s,"active",!1)}setHoverStyle(t,e,s){this._setStyle(t,s,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,s=this._cachedMeta.data;for(const[r,l,c]of this._syncList)this[r](l,c);this._syncList=[];const n=s.length,o=e.length,a=Math.min(o,n);a&&this.parse(0,a),o>n?this._insertElements(n,o-n,t):o{for(c.length+=e,r=c.length-1;r>=a;r--)c[r]=c[r-e]};for(l(o),r=t;rn-o))}return i._cache.$bar}function hh(i){const t=i.iScale,e=ch(t,i.type);let s=t._length,n,o,a,r;const l=()=>{a===32767||a===-32768||(mi(r)&&(s=Math.min(s,Math.abs(a-r)||s)),r=a)};for(n=0,o=e.length;n0?n[i-1]:null,r=iMath.abs(r)&&(l=r,c=a),t[e.axis]=c,t._custom={barStart:l,barEnd:c,start:n,end:o,min:a,max:r}}function Pr(i,t,e,s){return lt(i)?fh(i,t,e,s):t[e.axis]=e.parse(i,s),t}function Bo(i,t,e,s){const n=i.iScale,o=i.vScale,a=n.getLabels(),r=n===o,l=[];let c,h,d,u;for(c=e,h=e+s;c=e?1:-1)}function ph(i){let t,e,s,n,o;return i.horizontal?(t=i.base>i.x,e="left",s="right"):(t=i.baseh.controller.options.grouped),o=s.options.stacked,a=[],r=this._cachedMeta.controller.getParsed(e),l=r&&r[s.axis],c=h=>{const d=h._parsed.find(f=>f[s.axis]===l),u=d&&d[h.vScale.axis];if(Z(u)||isNaN(u))return!0};for(const h of n)if(!(e!==void 0&&c(h))&&((o===!1||a.indexOf(h.stack)===-1||o===void 0&&h.stack===void 0)&&a.push(h.stack),h.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,e=this.chart.options.indexAxis;return Object.keys(t).filter(s=>t[s].axis===e).shift()}_getAxis(){const t={},e=this.getFirstScaleIdForIndexAxis();for(const s of this.chart.data.datasets)t[X(this.chart.options.indexAxis==="x"?s.xAxisID:s.yAxisID,e)]=!0;return Object.keys(t)}_getStackIndex(t,e,s){const n=this._getStacks(t,s),o=e!==void 0?n.indexOf(e):-1;return o===-1?n.length-1:o}_getRuler(){const t=this.options,e=this._cachedMeta,s=e.iScale,n=[];let o,a;for(o=0,a=e.data.length;o=0;--s)e=Math.max(e,t[s].size(this.resolveDataElementOptions(s))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,s=this.chart.data.labels||[],{xScale:n,yScale:o}=e,a=this.getParsed(t),r=n.getLabelForValue(a.x),l=o.getLabelForValue(a.y),c=a._custom;return{label:s[t]||"",value:"("+r+", "+l+(c?", "+c:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,s,n){const o=n==="reset",{iScale:a,vScale:r}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(e,n),h=a.axis,d=r.axis;for(let u=e;ubi(v,r,l,!0)?1:Math.max(x,x*e,y,y*e),g=(v,x,y)=>bi(v,r,l,!0)?-1:Math.min(x,x*e,y,y*e),p=f(0,c,d),m=f(ft,h,u),b=g(st,c,d),_=g(st+ft,h,u);s=(p-b)/2,n=(m-_)/2,o=-(p+b)/2,a=-(m+_)/2}return{ratioX:s,ratioY:n,offsetX:o,offsetY:a}}class Ee extends Vt{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const s=this.getDataset().data,n=this._cachedMeta;if(this._parsing===!1)n._parsed=s;else{let o=l=>+s[l];if(tt(s[t])){const{key:l="value"}=this._parsing;o=c=>+me(s[c],l)}let a,r;for(a=t,r=t+e;a0&&!isNaN(t)?rt*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,s=this.chart,n=s.data.labels||[],o=Mi(e._parsed[t],s.options.locale);return{label:n[t]||"",value:o}}getMaxBorderWidth(t){let e=0;const s=this.chart;let n,o,a,r,l;if(!t){for(n=0,o=s.data.datasets.length;nt!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),I(Ee,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data,{labels:{pointStyle:s,textAlign:n,color:o,useBorderRadius:a,borderRadius:r}}=t.legend.options;return e.labels.length&&e.datasets.length?e.labels.map((l,c)=>{const d=t.getDatasetMeta(0).controller.getStyle(c);return{text:l,fillStyle:d.backgroundColor,fontColor:o,hidden:!t.getDataVisibility(c),lineDash:d.borderDash,lineDashOffset:d.borderDashOffset,lineJoin:d.borderJoinStyle,lineWidth:d.borderWidth,strokeStyle:d.borderColor,textAlign:n,pointStyle:s,borderRadius:a&&(r||d.borderRadius),index:c}}):[]}},onClick(t,e,s){s.chart.toggleDataVisibility(e.index),s.chart.update()}}}});class us extends Vt{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:s,data:n=[],_dataset:o}=e,a=this.chart._animationsDisabled;let{start:r,count:l}=lr(e,n,a);this._drawStart=r,this._drawCount=l,cr(e)&&(r=0,l=n.length),s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!o._decimated,s.points=n;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(s,void 0,{animated:!a,options:c},t),this.updateElements(n,r,l,t)}updateElements(t,e,s,n){const o=n==="reset",{iScale:a,vScale:r,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:h,includeOptions:d}=this._getSharedOptions(e,n),u=a.axis,f=r.axis,{spanGaps:g,segment:p}=this.options,m=je(g)?g:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||o||n==="none",_=e+s,v=t.length;let x=e>0&&this.getParsed(e-1);for(let y=0;y=_){M.skip=!0;continue}const S=this.getParsed(y),C=Z(S[f]),P=M[u]=a.getPixelForValue(S[u],y),L=M[f]=o||C?r.getBasePixel():r.getPixelForValue(l?this.applyStack(r,S,l):S[f],y);M.skip=isNaN(P)||isNaN(L)||C,M.stop=y>0&&Math.abs(S[u]-x[u])>m,p&&(M.parsed=S,M.raw=c.data[y]),d&&(M.options=h||this.resolveDataElementOptions(y,w.active?"active":n)),b||this.updateElement(w,y,M,n),x=S}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,s=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return s;const o=n[0].size(this.resolveDataElementOptions(0)),a=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(s,o,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}I(us,"id","line"),I(us,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),I(us,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class ui extends Vt{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,s=this.chart,n=s.data.labels||[],o=Mi(e._parsed[t].r,s.options.locale);return{label:n[t]||"",value:o}}parseObjectData(t,e,s,n){return br.bind(this)(t,e,s,n)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((s,n)=>{const o=this.getParsed(n).r;!isNaN(o)&&this.chart.getDataVisibility(n)&&(oe.max&&(e.max=o))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,s=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),o=Math.max(n/2,0),a=Math.max(s.cutoutPercentage?o/100*s.cutoutPercentage:1,0),r=(o-a)/t.getVisibleDatasetCount();this.outerRadius=o-r*this.index,this.innerRadius=this.outerRadius-r}updateElements(t,e,s,n){const o=n==="reset",a=this.chart,l=a.options.animation,c=this._cachedMeta.rScale,h=c.xCenter,d=c.yCenter,u=c.getIndexAngle(0)-.5*st;let f=u,g;const p=360/this.countVisibleElements();for(g=0;g{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&e++}),e}_computeAngle(t,e,s){return this.chart.getDataVisibility(t)?zt(this.resolveDataElementOptions(t,e).angle||s):0}}I(ui,"id","polarArea"),I(ui,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),I(ui,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:s,color:n}}=t.legend.options;return e.labels.map((o,a)=>{const l=t.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:n,lineWidth:l.borderWidth,pointStyle:s,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,e,s){s.chart.toggleDataVisibility(e.index),s.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class xn extends Ee{}I(xn,"id","pie"),I(xn,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class fs extends Vt{getLabelAndValue(t){const e=this._cachedMeta.vScale,s=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(s[e.axis])}}parseObjectData(t,e,s,n){return br.bind(this)(t,e,s,n)}update(t){const e=this._cachedMeta,s=e.dataset,n=e.data||[],o=e.iScale.getLabels();if(s.points=n,t!=="resize"){const a=this.resolveDatasetElementOptions(t);this.options.showLine||(a.borderWidth=0);const r={_loop:!0,_fullLoop:o.length===n.length,options:a};this.updateElement(s,void 0,r,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,s,n){const o=this._cachedMeta.rScale,a=n==="reset";for(let r=e;r0&&this.getParsed(e-1);for(let x=e;x0&&Math.abs(w[f]-v[f])>b,m&&(M.parsed=w,M.raw=c.data[x]),u&&(M.options=d||this.resolveDataElementOptions(x,y.active?"active":n)),_||this.updateElement(y,x,M,n),v=w}this.updateSharedOptions(d,n,h)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let r=0;for(let l=e.length-1;l>=0;--l)r=Math.max(r,e[l].size(this.resolveDataElementOptions(l))/2);return r>0&&r}const s=t.dataset,n=s.options&&s.options.borderWidth||0;if(!e.length)return n;const o=e[0].size(this.resolveDataElementOptions(0)),a=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(n,o,a)/2}}I(gs,"id","scatter"),I(gs,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),I(gs,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var yh=Object.freeze({__proto__:null,BarController:hs,BubbleController:ds,DoughnutController:Ee,LineController:us,PieController:xn,PolarAreaController:ui,RadarController:fs,ScatterController:gs});function De(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class $n{constructor(t){I(this,"options");this.options=t||{}}static override(t){Object.assign($n.prototype,t)}init(){}formats(){return De()}parse(){return De()}format(){return De()}add(){return De()}diff(){return De()}startOf(){return De()}endOf(){return De()}}var vh={_date:$n};function kh(i,t,e,s){const{controller:n,data:o,_sorted:a}=i,r=n._cachedMeta.iScale,l=i.dataset&&i.dataset.options?i.dataset.options.spanGaps:null;if(r&&t===r.axis&&t!=="r"&&a&&o.length){const c=r._reversePixels?Yl:ie;if(s){if(n._sharedOptions){const h=o[0],d=typeof h.getRange=="function"&&h.getRange(t);if(d){const u=c(o,t,e-d),f=c(o,t,e+d);return{lo:u.lo,hi:f.hi}}}}else{const h=c(o,t,e);if(l){const{vScale:d}=n._cachedMeta,{_parsed:u}=i,f=u.slice(0,h.lo+1).reverse().findIndex(p=>!Z(p[d.axis]));h.lo-=Math.max(0,f);const g=u.slice(h.hi).findIndex(p=>!Z(p[d.axis]));h.hi+=Math.max(0,g)}return h}}return{lo:0,hi:o.length-1}}function Ts(i,t,e,s,n){const o=i.getSortedVisibleDatasetMetas(),a=e[t];for(let r=0,l=o.length;r{l[a]&&l[a](t[e],n)&&(o.push({element:l,datasetIndex:c,index:h}),r=r||l.inRange(t.x,t.y,n))}),s&&!r?[]:o}var Dh={modes:{index(i,t,e,s){const n=Ce(t,i),o=e.axis||"x",a=e.includeInvisible||!1,r=e.intersect?rn(i,n,o,s,a):ln(i,n,o,!1,s,a),l=[];return r.length?(i.getSortedVisibleDatasetMetas().forEach(c=>{const h=r[0].index,d=c.data[h];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:h})}),l):[]},dataset(i,t,e,s){const n=Ce(t,i),o=e.axis||"xy",a=e.includeInvisible||!1;let r=e.intersect?rn(i,n,o,s,a):ln(i,n,o,!1,s,a);if(r.length>0){const l=r[0].datasetIndex,c=i.getDatasetMeta(l).data;r=[];for(let h=0;he.pos===t)}function jo(i,t){return i.filter(e=>Cr.indexOf(e.pos)===-1&&e.box.axis===t)}function qe(i,t){return i.sort((e,s)=>{const n=t?s:e,o=t?e:s;return n.weight===o.weight?n.index-o.index:n.weight-o.weight})}function Ph(i){const t=[];let e,s,n,o,a,r;for(e=0,s=(i||[]).length;ec.box.fullSize),!0),s=qe(Ke(t,"left"),!0),n=qe(Ke(t,"right")),o=qe(Ke(t,"top"),!0),a=qe(Ke(t,"bottom")),r=jo(t,"x"),l=jo(t,"y");return{fullSize:e,leftAndTop:s.concat(o),rightAndBottom:n.concat(l).concat(a).concat(r),chartArea:Ke(t,"chartArea"),vertical:s.concat(n).concat(l),horizontal:o.concat(a).concat(r)}}function Yo(i,t,e,s){return Math.max(i[e],t[e])+Math.max(i[s],t[s])}function Ar(i,t){i.top=Math.max(i.top,t.top),i.left=Math.max(i.left,t.left),i.bottom=Math.max(i.bottom,t.bottom),i.right=Math.max(i.right,t.right)}function Th(i,t,e,s){const{pos:n,box:o}=e,a=i.maxPadding;if(!tt(n)){e.size&&(i[n]-=e.size);const d=s[e.stack]||{size:0,count:1};d.size=Math.max(d.size,e.horizontal?o.height:o.width),e.size=d.size/d.count,i[n]+=e.size}o.getPadding&&Ar(a,o.getPadding());const r=Math.max(0,t.outerWidth-Yo(a,i,"left","right")),l=Math.max(0,t.outerHeight-Yo(a,i,"top","bottom")),c=r!==i.w,h=l!==i.h;return i.w=r,i.h=l,e.horizontal?{same:c,other:h}:{same:h,other:c}}function Eh(i){const t=i.maxPadding;function e(s){const n=Math.max(t[s]-i[s],0);return i[s]+=n,n}i.y+=e("top"),i.x+=e("left"),e("right"),e("bottom")}function Lh(i,t){const e=t.maxPadding;function s(n){const o={left:0,top:0,right:0,bottom:0};return n.forEach(a=>{o[a]=Math.max(t[a],e[a])}),o}return s(i?["left","right"]:["top","bottom"])}function ni(i,t,e,s){const n=[];let o,a,r,l,c,h;for(o=0,a=i.length,c=0;o{typeof p.beforeLayout=="function"&&p.beforeLayout()});const h=l.reduce((p,m)=>m.box.options&&m.box.options.display===!1?p:p+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:e,padding:n,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/h,hBoxMaxHeight:a/2}),u=Object.assign({},n);Ar(u,yt(s));const f=Object.assign({maxPadding:u,w:o,h:a,x:n.left,y:n.top},n),g=Ah(l.concat(c),d);ni(r.fullSize,f,d,g),ni(l,f,d,g),ni(c,f,d,g)&&ni(l,f,d,g),Eh(f),$o(r.leftAndTop,f,d,g),f.x+=f.w,f.y+=f.h,$o(r.rightAndBottom,f,d,g),i.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},nt(r.chartArea,p=>{const m=p.box;Object.assign(m,i.chartArea),m.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class Or{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,s){}removeEventListener(t,e,s){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,s,n){return e=Math.max(0,e||t.width),s=s||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):s)}}isAttached(t){return!0}updateConfig(t){}}class Rh extends Or{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const ps="$chartjs",Ih={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Uo=i=>i===null||i==="";function Fh(i,t){const e=i.style,s=i.getAttribute("height"),n=i.getAttribute("width");if(i[ps]={initial:{height:s,width:n,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",Uo(n)){const o=Ao(i,"width");o!==void 0&&(i.width=o)}if(Uo(s))if(i.style.height==="")i.height=i.width/(t||2);else{const o=Ao(i,"height");o!==void 0&&(i.height=o)}return i}const Tr=zc?{passive:!0}:!1;function zh(i,t,e){i&&i.addEventListener(t,e,Tr)}function Vh(i,t,e){i&&i.canvas&&i.canvas.removeEventListener(t,e,Tr)}function Bh(i,t){const e=Ih[i.type]||i.type,{x:s,y:n}=Ce(i,t);return{type:e,chart:t,native:i,x:s!==void 0?s:null,y:n!==void 0?n:null}}function ws(i,t){for(const e of i)if(e===t||e.contains(t))return!0}function Nh(i,t,e){const s=i.canvas,n=new MutationObserver(o=>{let a=!1;for(const r of o)a=a||ws(r.addedNodes,s),a=a&&!ws(r.removedNodes,s);a&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}function Wh(i,t,e){const s=i.canvas,n=new MutationObserver(o=>{let a=!1;for(const r of o)a=a||ws(r.removedNodes,s),a=a&&!ws(r.addedNodes,s);a&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}const xi=new Map;let Xo=0;function Er(){const i=window.devicePixelRatio;i!==Xo&&(Xo=i,xi.forEach((t,e)=>{e.currentDevicePixelRatio!==i&&t()}))}function Hh(i,t){xi.size||window.addEventListener("resize",Er),xi.set(i,t)}function jh(i){xi.delete(i),xi.size||window.removeEventListener("resize",Er)}function Yh(i,t,e){const s=i.canvas,n=s&&Yn(s);if(!n)return;const o=rr((r,l)=>{const c=n.clientWidth;e(r,l),c{const l=r[0],c=l.contentRect.width,h=l.contentRect.height;c===0&&h===0||o(c,h)});return a.observe(n),Hh(i,o),a}function cn(i,t,e){e&&e.disconnect(),t==="resize"&&jh(i)}function $h(i,t,e){const s=i.canvas,n=rr(o=>{i.ctx!==null&&e(Bh(o,i))},i);return zh(s,t,n),n}class Uh extends Or{acquireContext(t,e){const s=t&&t.getContext&&t.getContext("2d");return s&&s.canvas===t?(Fh(t,e),s):null}releaseContext(t){const e=t.canvas;if(!e[ps])return!1;const s=e[ps].initial;["height","width"].forEach(o=>{const a=s[o];Z(a)?e.removeAttribute(o):e.setAttribute(o,a)});const n=s.style||{};return Object.keys(n).forEach(o=>{e.style[o]=n[o]}),e.width=e.width,delete e[ps],!0}addEventListener(t,e,s){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),a={attach:Nh,detach:Wh,resize:Yh}[e]||$h;n[e]=a(t,e,s)}removeEventListener(t,e){const s=t.$proxies||(t.$proxies={}),n=s[e];if(!n)return;({attach:cn,detach:cn,resize:cn}[e]||Vh)(t,e,n),s[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,s,n){return Fc(t,e,s,n)}isAttached(t){const e=t&&Yn(t);return!!(e&&e.isConnected)}}function Xh(i){return!jn()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?Rh:Uh}class Bt{constructor(){I(this,"x");I(this,"y");I(this,"active",!1);I(this,"options");I(this,"$animations")}tooltipPosition(t){const{x:e,y:s}=this.getProps(["x","y"],t);return{x:e,y:s}}hasValue(){return je(this.x)&&je(this.y)}getProps(t,e){const s=this.$animations;if(!e||!s)return this;const n={};return t.forEach(o=>{n[o]=s[o]&&s[o].active()?s[o]._to:this[o]}),n}}I(Bt,"defaults",{}),I(Bt,"defaultRoutes");function Kh(i,t){const e=i.options.ticks,s=qh(i),n=Math.min(e.maxTicksLimit||s,s),o=e.major.enabled?Jh(t):[],a=o.length,r=o[0],l=o[a-1],c=[];if(a>n)return Zh(t,c,o,a/n),c;const h=Gh(o,t,n);if(a>0){let d,u;const f=a>1?Math.round((l-r)/(a-1)):null;for(ns(t,c,h,Z(f)?0:r-f,r),d=0,u=a-1;dn)return l}return Math.max(n,1)}function Jh(i){const t=[];let e,s;for(e=0,s=i.length;ei==="left"?"right":i==="right"?"left":i,Ko=(i,t,e)=>t==="top"||t==="left"?i[t]+e:i[t]-e,qo=(i,t)=>Math.min(t||i,i);function Go(i,t){const e=[],s=i.length/t,n=i.length;let o=0;for(;oa+r)))return l}function id(i,t){nt(i,e=>{const s=e.gc,n=s.length/2;let o;if(n>t){for(o=0;os?s:e,s=n&&e>s?e:s,{min:At(e,At(s,e)),max:At(s,At(e,s))}}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){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){at(this.options.beforeUpdate,[this])}update(t,e,s){const{beginAtZero:n,grace:o,ticks:a}=this.options,r=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=s=Object.assign({left:0,right:0,top:0,bottom:0},s),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+s.left+s.right:this.height+s.top+s.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=gc(this,o,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=r=o||s<=1||!this.isHorizontal()){this.labelRotation=n;return}const h=this._getLabelSizes(),d=h.widest.width,u=h.highest.height,f=pt(this.chart.width-d,0,this.maxWidth);r=t.offset?this.maxWidth/s:f/(s-1),d+6>r&&(r=f/(s-(t.offset?.5:1)),l=this.maxHeight-Ge(t.grid)-e.padding-Jo(t.title,this.chart.options.font),c=Math.sqrt(d*d+u*u),a=In(Math.min(Math.asin(pt((h.highest.height+6)/r,-1,1)),Math.asin(pt(l/c,-1,1))-Math.asin(pt(u/c,-1,1)))),a=Math.max(n,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){at(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){at(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:s,title:n,grid:o}}=this,a=this._isVisible(),r=this.isHorizontal();if(a){const l=Jo(n,e.options.font);if(r?(t.width=this.maxWidth,t.height=Ge(o)+l):(t.height=this.maxHeight,t.width=Ge(o)+l),s.display&&this.ticks.length){const{first:c,last:h,widest:d,highest:u}=this._getLabelSizes(),f=s.padding*2,g=zt(this.labelRotation),p=Math.cos(g),m=Math.sin(g);if(r){const b=s.mirror?0:m*d.width+p*u.height;t.height=Math.min(this.maxHeight,t.height+b+f)}else{const b=s.mirror?0:p*d.width+m*u.height;t.width=Math.min(this.maxWidth,t.width+b+f)}this._calculatePadding(c,h,m,p)}}this._handleMargins(),r?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,s,n){const{ticks:{align:o,padding:a},position:r}=this.options,l=this.labelRotation!==0,c=r!=="top"&&this.axis==="x";if(this.isHorizontal()){const h=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let u=0,f=0;l?c?(u=n*t.width,f=s*e.height):(u=s*t.height,f=n*e.width):o==="start"?f=e.width:o==="end"?u=t.width:o!=="inner"&&(u=t.width/2,f=e.width/2),this.paddingLeft=Math.max((u-h+a)*this.width/(this.width-h),0),this.paddingRight=Math.max((f-d+a)*this.width/(this.width-d),0)}else{let h=e.height/2,d=t.height/2;o==="start"?(h=0,d=t.height):o==="end"&&(h=e.height,d=0),this.paddingTop=h+a,this.paddingBottom=d+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){at(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,s;for(e=0,s=t.length;e({width:a[C]||0,height:r[C]||0});return{first:S(0),last:S(e-1),widest:S(w),highest:S(M),widths:a,heights:r}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return jl(this._alignToPixels?Se(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&tr*n?r/s:l/n:l*n0}_computeGridLineItems(t){const e=this.axis,s=this.chart,n=this.options,{grid:o,position:a,border:r}=n,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),u=Ge(o),f=[],g=r.setContext(this.getContext()),p=g.display?g.width:0,m=p/2,b=function(A){return Se(s,A,p)};let _,v,x,y,w,M,S,C,P,L,F,it;if(a==="top")_=b(this.bottom),M=this.bottom-u,C=_-m,L=b(t.top)+m,it=t.bottom;else if(a==="bottom")_=b(this.top),L=t.top,it=b(t.bottom)-m,M=_+m,C=this.top+u;else if(a==="left")_=b(this.right),w=this.right-u,S=_-m,P=b(t.left)+m,F=t.right;else if(a==="right")_=b(this.left),P=t.left,F=b(t.right)-m,w=_+m,S=this.left+u;else if(e==="x"){if(a==="center")_=b((t.top+t.bottom)/2+.5);else if(tt(a)){const A=Object.keys(a)[0],N=a[A];_=b(this.chart.scales[A].getPixelForValue(N))}L=t.top,it=t.bottom,M=_+m,C=M+u}else if(e==="y"){if(a==="center")_=b((t.left+t.right)/2);else if(tt(a)){const A=Object.keys(a)[0],N=a[A];_=b(this.chart.scales[A].getPixelForValue(N))}w=_-m,S=w-u,P=t.left,F=t.right}const J=X(n.ticks.maxTicksLimit,d),W=Math.max(1,Math.ceil(d/J));for(v=0;v0&&(q-=V/2);break}ht={left:q,top:G,width:V+vt.width,height:kt+vt.height,color:W.backdropColor}}m.push({label:x,font:C,textOffset:F,options:{rotation:p,color:N,strokeColor:Y,strokeWidth:et,textAlign:B,textBaseline:it,translation:[y,w],backdrop:ht}})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-zt(this.labelRotation))return t==="top"?"left":"right";let n="center";return e.align==="start"?n="left":e.align==="end"?n="right":e.align==="inner"&&(n="inner"),n}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:s,mirror:n,padding:o}}=this.options,a=this._getLabelSizes(),r=t+o,l=a.widest.width;let c,h;return e==="left"?n?(h=this.right+o,s==="near"?c="left":s==="center"?(c="center",h+=l/2):(c="right",h+=l)):(h=this.right-r,s==="near"?c="right":s==="center"?(c="center",h-=l/2):(c="left",h=this.left)):e==="right"?n?(h=this.left+o,s==="near"?c="right":s==="center"?(c="center",h-=l/2):(c="left",h-=l)):(h=this.left+r,s==="near"?c="left":s==="center"?(c="center",h+=l/2):(c="right",h=this.right)):c="right",{textAlign:c,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:s,top:n,width:o,height:a}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(s,n,o,a),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const n=this.ticks.findIndex(o=>o.value===t);return n>=0?e.setContext(this.getContext(n)).lineWidth:0}drawGrid(t){const e=this.options.grid,s=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,a;const r=(l,c,h)=>{!h.width||!h.color||(s.save(),s.lineWidth=h.width,s.strokeStyle=h.color,s.setLineDash(h.borderDash||[]),s.lineDashOffset=h.borderDashOffset,s.beginPath(),s.moveTo(l.x,l.y),s.lineTo(c.x,c.y),s.stroke(),s.restore())};if(e.display)for(o=0,a=n.length;o{this.draw(o)}}]:[{z:s,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:e,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),s=this.axis+"AxisID",n=[];let o,a;for(o=0,a=e.length;o{const s=e.split("."),n=s.pop(),o=[i].concat(s).join("."),a=t[e].split("."),r=a.pop(),l=a.join(".");ct.route(o,n,l,r)})}function cd(i){return"id"in i&&"defaults"in i}class hd{constructor(){this.controllers=new os(Vt,"datasets",!0),this.elements=new os(Bt,"elements"),this.plugins=new os(Object,"plugins"),this.scales=new os(Ve,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,s){[...e].forEach(n=>{const o=s||this._getRegistryForType(n);s||o.isForType(n)||o===this.plugins&&n.id?this._exec(t,o,n):nt(n,a=>{const r=s||this._getRegistryForType(a);this._exec(t,r,a)})})}_exec(t,e,s){const n=Rn(t);at(s["before"+n],[],s),e[t](s),at(s["after"+n],[],s)}_getRegistryForType(t){for(let e=0;eo.filter(r=>!a.some(l=>r.plugin.id===l.plugin.id));this._notify(n(e,s),t,"stop"),this._notify(n(s,e),t,"start")}}function ud(i){const t={},e=[],s=Object.keys(Ht.plugins.items);for(let o=0;o1&&Zo(i[0].toLowerCase());if(s)return s}throw new Error(`Cannot determine type of '${i}' axis. Please provide 'axis' or 'position' option.`)}function Qo(i,t,e){if(e[t+"AxisID"]===i)return{axis:t}}function xd(i,t){if(t.data&&t.data.datasets){const e=t.data.datasets.filter(s=>s.xAxisID===i||s.yAxisID===i);if(e.length)return Qo(i,"x",e[0])||Qo(i,"y",e[0])}return{}}function yd(i,t){const e=Fe[i.type]||{scales:{}},s=t.scales||{},n=yn(i.type,t),o=Object.create(null);return Object.keys(s).forEach(a=>{const r=s[a];if(!tt(r))return console.error(`Invalid scale configuration for scale: ${a}`);if(r._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const l=vn(a,r,xd(a,i),ct.scales[r.type]),c=bd(l,n),h=e.scales||{};o[a]=li(Object.create(null),[{axis:l},r,h[l],h[c]])}),i.data.datasets.forEach(a=>{const r=a.type||i.type,l=a.indexAxis||yn(r,t),h=(Fe[r]||{}).scales||{};Object.keys(h).forEach(d=>{const u=md(d,l),f=a[u+"AxisID"]||u;o[f]=o[f]||Object.create(null),li(o[f],[{axis:u},s[f],h[d]])})}),Object.keys(o).forEach(a=>{const r=o[a];li(r,[ct.scales[r.type],ct.scale])}),o}function Lr(i){const t=i.options||(i.options={});t.plugins=X(t.plugins,{}),t.scales=yd(i,t)}function Rr(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function vd(i){return i=i||{},i.data=Rr(i.data),Lr(i),i}const ta=new Map,Ir=new Set;function as(i,t){let e=ta.get(i);return e||(e=t(),ta.set(i,e),Ir.add(e)),e}const Je=(i,t,e)=>{const s=me(t,e);s!==void 0&&i.add(s)};class kd{constructor(t){this._config=vd(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=Rr(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(),Lr(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return as(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return as(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return as(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,s=this.type;return as(`${s}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const s=this._scopeCache;let n=s.get(t);return(!n||e)&&(n=new Map,s.set(t,n)),n}getOptionScopes(t,e,s){const{options:n,type:o}=this,a=this._cachedScopes(t,s),r=a.get(e);if(r)return r;const l=new Set;e.forEach(h=>{t&&(l.add(t),h.forEach(d=>Je(l,t,d))),h.forEach(d=>Je(l,n,d)),h.forEach(d=>Je(l,Fe[o]||{},d)),h.forEach(d=>Je(l,ct,d)),h.forEach(d=>Je(l,bn,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Ir.has(e)&&a.set(e,c),c}chartOptionScopes(){const{options:t,type:e}=this;return[t,Fe[e]||{},ct.datasets[e]||{},{type:e},ct,bn]}resolveNamedOptions(t,e,s,n=[""]){const o={$shared:!0},{resolver:a,subPrefixes:r}=ea(this._resolverCache,t,n);let l=a;if(wd(a,e)){o.$shared=!1,s=be(s)?s():s;const c=this.createResolver(t,s,r);l=Ye(a,s,c)}for(const c of e)o[c]=l[c];return o}createResolver(t,e,s=[""],n){const{resolver:o}=ea(this._resolverCache,t,s);return tt(e)?Ye(o,e,void 0,n):o}}function ea(i,t,e){let s=i.get(t);s||(s=new Map,i.set(t,s));const n=e.join();let o=s.get(n);return o||(o={resolver:Nn(t,e),subPrefixes:e.filter(r=>!r.toLowerCase().includes("hover"))},s.set(n,o)),o}const Md=i=>tt(i)&&Object.getOwnPropertyNames(i).some(t=>be(i[t]));function wd(i,t){const{isScriptable:e,isIndexable:s}=fr(i);for(const n of t){const o=e(n),a=s(n),r=(a||o)&&i[n];if(o&&(be(r)||Md(r))||a&<(r))return!0}return!1}var Sd="4.5.1";const Dd=["top","bottom","left","right","chartArea"];function ia(i,t){return i==="top"||i==="bottom"||Dd.indexOf(i)===-1&&t==="x"}function sa(i,t){return function(e,s){return e[i]===s[i]?e[t]-s[t]:e[i]-s[i]}}function na(i){const t=i.chart,e=t.options.animation;t.notifyPlugins("afterRender"),at(e&&e.onComplete,[i],t)}function Pd(i){const t=i.chart,e=t.options.animation;at(e&&e.onProgress,[i],t)}function Fr(i){return jn()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}const ms={},oa=i=>{const t=Fr(i);return Object.values(ms).filter(e=>e.canvas===t).pop()};function Cd(i,t,e){const s=Object.keys(i);for(const n of s){const o=+n;if(o>=t){const a=i[n];delete i[n],(e>0||o>t)&&(i[o+e]=a)}}}function Ad(i,t,e,s){return!e||i.type==="mouseout"?null:s?t:i}class jt{static register(...t){Ht.add(...t),aa()}static unregister(...t){Ht.remove(...t),aa()}constructor(t,e){const s=this.config=new kd(e),n=Fr(t),o=oa(n);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const a=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||Xh(n)),this.platform.updateConfig(s);const r=this.platform.acquireContext(n,a.aspectRatio),l=r&&r.canvas,c=l&&l.height,h=l&&l.width;if(this.id=Ol(),this.ctx=r,this.canvas=l,this.width=h,this.height=c,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new dd,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Xl(d=>this.update(d),a.resizeDelay||0),this._dataChanges=[],ms[this.id]=this,!r||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Jt.listen(this,"complete",na),Jt.listen(this,"progress",Pd),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:s,height:n,_aspectRatio:o}=this;return Z(t)?e&&o?o:n?s/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Ht}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Co(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return So(this.canvas,this.ctx),this}stop(){return Jt.stop(this),this}resize(t,e){Jt.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const s=this.options,n=this.canvas,o=s.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(n,t,e,o),r=s.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,Co(this,r,!0)&&(this.notifyPlugins("resize",{size:a}),at(s.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};nt(e,(s,n)=>{s.id=n})}buildOrUpdateScales(){const t=this.options,e=t.scales,s=this.scales,n=Object.keys(s).reduce((a,r)=>(a[r]=!1,a),{});let o=[];e&&(o=o.concat(Object.keys(e).map(a=>{const r=e[a],l=vn(a,r),c=l==="r",h=l==="x";return{options:r,dposition:c?"chartArea":h?"bottom":"left",dtype:c?"radialLinear":h?"category":"linear"}}))),nt(o,a=>{const r=a.options,l=r.id,c=vn(l,r),h=X(r.type,a.dtype);(r.position===void 0||ia(r.position,c)!==ia(a.dposition))&&(r.position=a.dposition),n[l]=!0;let d=null;if(l in s&&s[l].type===h)d=s[l];else{const u=Ht.getScale(h);d=new u({id:l,type:h,ctx:this.ctx,chart:this}),s[d.id]=d}d.init(r,t)}),nt(n,(a,r)=>{a||delete s[r]}),nt(s,a=>{xt.configure(this,a,a.options),xt.addBox(this,a)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,s=t.length;if(t.sort((n,o)=>n.index-o.index),s>e){for(let n=e;ne.length&&delete this._stacks,t.forEach((s,n)=>{e.filter(o=>o===s._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let s,n;for(this._removeUnreferencedMetasets(),s=0,n=e.length;s{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const s=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!s.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let c=0,h=this.data.datasets.length;c{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(sa("z","_idx"));const{_active:r,_lastEvent:l}=this;l?this._eventHandler(l,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){nt(this.scales,t=>{xt.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),s=new Set(t.events);(!mo(e,s)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:s,start:n,count:o}of e){const a=s==="_removeElements"?-o:o;Cd(t,n,a)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,s=o=>new Set(t.filter(a=>a[0]===o).map((a,r)=>r+","+a.splice(1).join(","))),n=s(0);for(let o=1;oo.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;xt.update(this,this.width,this.height,t);const e=this.chartArea,s=e.width<=0||e.height<=0;this._layers=[],nt(this.boxes,n=>{s&&n.position==="chartArea"||(n.configure&&n.configure(),this._layers.push(...n._layers()))},this),this._layers.forEach((n,o)=>{n._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,s=this.data.datasets.length;e=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,s={meta:t,index:t.index,cancelable:!0},n=wr(this,t);this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(n&&Cs(e,n),t.controller.draw(),n&&As(e),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return se(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,s,n){const o=Dh.modes[e];return typeof o=="function"?o(this,t,s,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],s=this._metasets;let n=s.filter(o=>o&&o._dataset===e).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},s.push(n)),n}getContext(){return this.$context||(this.$context=_e(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const s=this.getDatasetMeta(t);return typeof s.hidden=="boolean"?!s.hidden:!e.hidden}setDatasetVisibility(t,e){const s=this.getDatasetMeta(t);s.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,s){const n=s?"show":"hide",o=this.getDatasetMeta(t),a=o.controller._resolveAnimations(void 0,n);mi(e)?(o.data[e].hidden=!s,this.update()):(this.setDatasetVisibility(t,s),a.update(o,{visible:s}),this.update(r=>r.datasetIndex===t?n:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),Jt.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,o,a),t[o]=a},n=(o,a,r)=>{o.offsetX=a,o.offsetY=r,this._eventHandler(o)};nt(this.options.events,o=>s(o,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,s=(l,c)=>{e.addEventListener(this,l,c),t[l]=c},n=(l,c)=>{t[l]&&(e.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let a;const r=()=>{n("attach",r),this.attached=!0,this.resize(),s("resize",o),s("detach",a)};a=()=>{this.attached=!1,n("resize",o),this._stop(),this._resize(0,0),s("attach",r)},e.isAttached(this.canvas)?r():a()}unbindEvents(){nt(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},nt(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,s){const n=s?"set":"remove";let o,a,r,l;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+n+"DatasetHoverStyle"]()),r=0,l=t.length;r{const r=this.getDatasetMeta(o);if(!r)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:r.data[a],index:a}});!xs(s,e)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,e))}notifyPlugins(t,e,s){return this._plugins.notify(this,t,e,s)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,s){const n=this.options.hover,o=(l,c)=>l.filter(h=>!c.some(d=>h.datasetIndex===d.datasetIndex&&h.index===d.index)),a=o(e,t),r=s?t:o(t,e);a.length&&this.updateHoverStyle(a,n.mode,!1),r.length&&n.mode&&this.updateHoverStyle(r,n.mode,!0)}_eventHandler(t,e){const s={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=a=>(a.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",s,n)===!1)return;const o=this._handleEvent(t,e,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,n),(o||s.changed)&&this.render(),this}_handleEvent(t,e,s){const{_active:n=[],options:o}=this,a=e,r=this._getActiveElements(t,n,s,a),l=Fl(t),c=Ad(t,this._lastEvent,s,l);s&&(this._lastEvent=null,at(o.onHover,[t,r,this],this),l&&at(o.onClick,[t,r,this],this));const h=!xs(r,n);return(h||e)&&(this._active=r,this._updateHoverStyles(r,n,e)),this._lastEvent=c,h}_getActiveElements(t,e,s,n){if(t.type==="mouseout")return[];if(!s)return e;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,n)}}I(jt,"defaults",ct),I(jt,"instances",ms),I(jt,"overrides",Fe),I(jt,"registry",Ht),I(jt,"version",Sd),I(jt,"getChart",oa);function aa(){return nt(jt.instances,i=>i._plugins.invalidate())}function Od(i,t,e){const{startAngle:s,x:n,y:o,outerRadius:a,innerRadius:r,options:l}=t,{borderWidth:c,borderJoinStyle:h}=l,d=Math.min(c/a,bt(s-e));if(i.beginPath(),i.arc(n,o,a-c/2,s+d/2,e-d/2),r>0){const u=Math.min(c/r,bt(s-e));i.arc(n,o,r+c/2,e-u/2,s+u/2,!0)}else{const u=Math.min(c/2,a*bt(s-e));if(h==="round")i.arc(n,o,u,e-st/2,s+st/2,!0);else if(h==="bevel"){const f=2*u*u,g=-f*Math.cos(e+st/2)+n,p=-f*Math.sin(e+st/2)+o,m=f*Math.cos(s+st/2)+n,b=f*Math.sin(s+st/2)+o;i.lineTo(g,p),i.lineTo(m,b)}}i.closePath(),i.moveTo(0,0),i.rect(0,0,i.canvas.width,i.canvas.height),i.clip("evenodd")}function Td(i,t,e){const{startAngle:s,pixelMargin:n,x:o,y:a,outerRadius:r,innerRadius:l}=t;let c=n/r;i.beginPath(),i.arc(o,a,r,s-c,e+c),l>n?(c=n/l,i.arc(o,a,l,e+c,s-c,!0)):i.arc(o,a,n,e+ft,s-ft),i.closePath(),i.clip()}function Ed(i){return Bn(i,["outerStart","outerEnd","innerStart","innerEnd"])}function Ld(i,t,e,s){const n=Ed(i.options.borderRadius),o=(e-t)/2,a=Math.min(o,s*t/2),r=l=>{const c=(e-Math.min(o,l))*s/2;return pt(l,0,Math.min(o,c))};return{outerStart:r(n.outerStart),outerEnd:r(n.outerEnd),innerStart:pt(n.innerStart,0,a),innerEnd:pt(n.innerEnd,0,a)}}function We(i,t,e,s){return{x:e+i*Math.cos(t),y:s+i*Math.sin(t)}}function Ss(i,t,e,s,n,o){const{x:a,y:r,startAngle:l,pixelMargin:c,innerRadius:h}=t,d=Math.max(t.outerRadius+s+e-c,0),u=h>0?h+s+e+c:0;let f=0;const g=n-l;if(s){const W=h>0?h-s:0,A=d>0?d-s:0,N=(W+A)/2,Y=N!==0?g*N/(N+s):g;f=(g-Y)/2}const p=Math.max(.001,g*d-e/st)/d,m=(g-p)/2,b=l+m+f,_=n-m-f,{outerStart:v,outerEnd:x,innerStart:y,innerEnd:w}=Ld(t,u,d,_-b),M=d-v,S=d-x,C=b+v/M,P=_-x/S,L=u+y,F=u+w,it=b+y/L,J=_-w/F;if(i.beginPath(),o){const W=(C+P)/2;if(i.arc(a,r,d,C,W),i.arc(a,r,d,W,P),x>0){const et=We(S,P,a,r);i.arc(et.x,et.y,x,P,_+ft)}const A=We(F,_,a,r);if(i.lineTo(A.x,A.y),w>0){const et=We(F,J,a,r);i.arc(et.x,et.y,w,_+ft,J+Math.PI)}const N=(_-w/u+(b+y/u))/2;if(i.arc(a,r,u,_-w/u,N,!0),i.arc(a,r,u,N,b+y/u,!0),y>0){const et=We(L,it,a,r);i.arc(et.x,et.y,y,it+Math.PI,b-ft)}const Y=We(M,b,a,r);if(i.lineTo(Y.x,Y.y),v>0){const et=We(M,C,a,r);i.arc(et.x,et.y,v,b-ft,C)}}else{i.moveTo(a,r);const W=Math.cos(C)*d+a,A=Math.sin(C)*d+r;i.lineTo(W,A);const N=Math.cos(P)*d+a,Y=Math.sin(P)*d+r;i.lineTo(N,Y)}i.closePath()}function Rd(i,t,e,s,n){const{fullCircles:o,startAngle:a,circumference:r}=t;let l=t.endAngle;if(o){Ss(i,t,e,s,l,n);for(let c=0;c=st&&f===0&&h!=="miter"&&Od(i,t,p),o||(Ss(i,t,e,s,p,n),i.stroke())}class oi extends Bt{constructor(e){super();I(this,"circumference");I(this,"endAngle");I(this,"fullCircles");I(this,"innerRadius");I(this,"outerRadius");I(this,"pixelMargin");I(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,s,n){const o=this.getProps(["x","y"],n),{angle:a,distance:r}=sr(o,{x:e,y:s}),{startAngle:l,endAngle:c,innerRadius:h,outerRadius:d,circumference:u}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),f=(this.options.spacing+this.options.borderWidth)/2,g=X(u,c-l),p=bi(a,l,c)&&l!==c,m=g>=rt||p,b=ee(r,h+f,d+f);return m&&b}getCenterPoint(e){const{x:s,y:n,startAngle:o,endAngle:a,innerRadius:r,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:c,spacing:h}=this.options,d=(o+a)/2,u=(r+l+h+c)/2;return{x:s+Math.cos(d)*u,y:n+Math.sin(d)*u}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:s,circumference:n}=this,o=(s.offset||0)/4,a=(s.spacing||0)/2,r=s.circular;if(this.pixelMargin=s.borderAlign==="inner"?.33:0,this.fullCircles=n>rt?Math.floor(n/rt):0,n===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const l=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(l)*o,Math.sin(l)*o);const c=1-Math.sin(Math.min(st,n||0)),h=o*c;e.fillStyle=s.backgroundColor,e.strokeStyle=s.borderColor,Rd(e,this,h,a,r),Id(e,this,h,a,r),e.restore()}}I(oi,"id","arc"),I(oi,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1}),I(oi,"defaultRoutes",{backgroundColor:"backgroundColor"}),I(oi,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"});function zr(i,t,e=t){i.lineCap=X(e.borderCapStyle,t.borderCapStyle),i.setLineDash(X(e.borderDash,t.borderDash)),i.lineDashOffset=X(e.borderDashOffset,t.borderDashOffset),i.lineJoin=X(e.borderJoinStyle,t.borderJoinStyle),i.lineWidth=X(e.borderWidth,t.borderWidth),i.strokeStyle=X(e.borderColor,t.borderColor)}function Fd(i,t,e){i.lineTo(e.x,e.y)}function zd(i){return i.stepped?oc:i.tension||i.cubicInterpolationMode==="monotone"?ac:Fd}function Vr(i,t,e={}){const s=i.length,{start:n=0,end:o=s-1}=e,{start:a,end:r}=t,l=Math.max(n,a),c=Math.min(o,r),h=nr&&o>r;return{count:s,start:l,loop:t.loop,ilen:c(a+(c?r-x:x))%o,v=()=>{p!==m&&(i.lineTo(h,m),i.lineTo(h,p),i.lineTo(h,b))};for(l&&(f=n[_(0)],i.moveTo(f.x,f.y)),u=0;u<=r;++u){if(f=n[_(u)],f.skip)continue;const x=f.x,y=f.y,w=x|0;w===g?(ym&&(m=y),h=(d*h+x)/++d):(v(),i.lineTo(x,y),g=w,d=0,p=m=y),b=y}v()}function kn(i){const t=i.options,e=t.borderDash&&t.borderDash.length;return!i._decimated&&!i._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?Bd:Vd}function Nd(i){return i.stepped?Vc:i.tension||i.cubicInterpolationMode==="monotone"?Bc:Ae}function Wd(i,t,e,s){let n=t._path;n||(n=t._path=new Path2D,t.path(n,e,s)&&n.closePath()),zr(i,t.options),i.stroke(n)}function Hd(i,t,e,s){const{segments:n,options:o}=t,a=kn(t);for(const r of n)zr(i,o,r.style),i.beginPath(),a(i,t,r,{start:e,end:e+s-1})&&i.closePath(),i.stroke()}const jd=typeof Path2D=="function";function Yd(i,t,e,s){jd&&!t.options.segment?Wd(i,t,e,s):Hd(i,t,e,s)}class fe extends Bt{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const s=this.options;if((s.tension||s.cubicInterpolationMode==="monotone")&&!s.stepped&&!this._pointsUpdated){const n=s.spanGaps?this._loop:this._fullLoop;Oc(this._points,s,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=$c(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,s=t.length;return s&&e[t[s-1].end]}interpolate(t,e){const s=this.options,n=t[e],o=this.points,a=Mr(this,{property:e,start:n,end:n});if(!a.length)return;const r=[],l=Nd(s);let c,h;for(c=0,h=a.length;ct!=="borderDash"&&t!=="fill"});function ra(i,t,e,s){const n=i.options,{[e]:o}=i.getProps([e],s);return Math.abs(t-o)i.replace("rgb(","rgba(").replace(")",", 0.5)"));function Nr(i){return Mn[i%Mn.length]}function Wr(i){return la[i%la.length]}function Jd(i,t){return i.borderColor=Nr(t),i.backgroundColor=Wr(t),++t}function Zd(i,t){return i.backgroundColor=i.data.map(()=>Nr(t++)),t}function Qd(i,t){return i.backgroundColor=i.data.map(()=>Wr(t++)),t}function tu(i){let t=0;return(e,s)=>{const n=i.getDatasetMeta(s).controller;n instanceof Ee?t=Zd(e,t):n instanceof ui?t=Qd(e,t):n&&(t=Jd(e,t))}}function ca(i){let t;for(t in i)if(i[t].borderColor||i[t].backgroundColor)return!0;return!1}function eu(i){return i&&(i.borderColor||i.backgroundColor)}function iu(){return ct.borderColor!=="rgba(0,0,0,0.1)"||ct.backgroundColor!=="rgba(0,0,0,0.1)"}var su={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(i,t,e){if(!e.enabled)return;const{data:{datasets:s},options:n}=i.config,{elements:o}=n,a=ca(s)||eu(n)||o&&ca(o)||iu();if(!e.forceOverride&&a)return;const r=tu(i);s.forEach(r)}};function nu(i,t,e,s,n){const o=n.samples||s;if(o>=e)return i.slice(t,t+e);const a=[],r=(e-2)/(o-2);let l=0;const c=t+e-1;let h=t,d,u,f,g,p;for(a[l++]=i[h],d=0;df&&(f=g,u=i[_],p=_);a[l++]=u,h=p}return a[l++]=i[c],a}function ou(i,t,e,s){let n=0,o=0,a,r,l,c,h,d,u,f,g,p;const m=[],b=t+e-1,_=i[t].x,x=i[b].x-_;for(a=t;ap&&(p=c,u=a),n=(o*n+r.x)/++o;else{const w=a-1;if(!Z(d)&&!Z(u)){const M=Math.min(d,u),S=Math.max(d,u);M!==f&&M!==w&&m.push({...i[M],x:n}),S!==f&&S!==w&&m.push({...i[S],x:n})}a>0&&w!==f&&m.push(i[w]),m.push(r),h=y,o=0,g=p=c,d=u=f=a}}return m}function Hr(i){if(i._decimated){const t=i._data;delete i._decimated,delete i._data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function ha(i){i.data.datasets.forEach(t=>{Hr(t)})}function au(i,t){const e=t.length;let s=0,n;const{iScale:o}=i,{min:a,max:r,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(s=pt(ie(t,o.axis,a).lo,0,e-1)),c?n=pt(ie(t,o.axis,r).hi+1,s,e)-s:n=e-s,{start:s,count:n}}var ru={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(i,t,e)=>{if(!e.enabled){ha(i);return}const s=i.width;i.data.datasets.forEach((n,o)=>{const{_data:a,indexAxis:r}=n,l=i.getDatasetMeta(o),c=a||n.data;if(si([r,i.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const h=i.scales[l.xAxisID];if(h.type!=="linear"&&h.type!=="time"||i.options.parsing)return;let{start:d,count:u}=au(l,c);const f=e.threshold||4*s;if(u<=f){Hr(n);return}Z(a)&&(n._data=c,delete n.data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(p){this._data=p}}));let g;switch(e.algorithm){case"lttb":g=nu(c,d,u,s,e);break;case"min-max":g=ou(c,d,u,s);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}n._decimated=g})},destroy(i){ha(i)}};function lu(i,t,e){const s=i.segments,n=i.points,o=t.points,a=[];for(const r of s){let{start:l,end:c}=r;c=Es(l,c,n);const h=wn(e,n[l],n[c],r.loop);if(!t.segments){a.push({source:r,target:h,start:n[l],end:n[c]});continue}const d=Mr(t,h);for(const u of d){const f=wn(e,o[u.start],o[u.end],u.loop),g=kr(r,n,f);for(const p of g)a.push({source:p,target:u,start:{[e]:da(h,f,"start",Math.max)},end:{[e]:da(h,f,"end",Math.min)}})}}return a}function wn(i,t,e,s){if(s)return;let n=t[i],o=e[i];return i==="angle"&&(n=bt(n),o=bt(o)),{property:i,start:n,end:o}}function cu(i,t){const{x:e=null,y:s=null}=i||{},n=t.points,o=[];return t.segments.forEach(({start:a,end:r})=>{r=Es(a,r,n);const l=n[a],c=n[r];s!==null?(o.push({x:l.x,y:s}),o.push({x:c.x,y:s})):e!==null&&(o.push({x:e,y:l.y}),o.push({x:e,y:c.y}))}),o}function Es(i,t,e){for(;t>i;t--){const s=e[t];if(!isNaN(s.x)&&!isNaN(s.y))break}return t}function da(i,t,e,s){return i&&t?s(i[e],t[e]):i?i[e]:t?t[e]:0}function jr(i,t){let e=[],s=!1;return lt(i)?(s=!0,e=i):e=cu(i,t),e.length?new fe({points:e,options:{tension:0},_loop:s,_fullLoop:s}):null}function ua(i){return i&&i.fill!==!1}function hu(i,t,e){let n=i[t].fill;const o=[t];let a;if(!e)return n;for(;n!==!1&&o.indexOf(n)===-1;){if(!ut(n))return n;if(a=i[n],!a)return!1;if(a.visible)return n;o.push(n),n=a.fill}return!1}function du(i,t,e){const s=pu(i);if(tt(s))return isNaN(s.value)?!1:s;let n=parseFloat(s);return ut(n)&&Math.floor(n)===n?uu(s[0],t,n,e):["origin","start","end","stack","shape"].indexOf(s)>=0&&s}function uu(i,t,e,s){return(i==="-"||i==="+")&&(e=t+e),e===t||e<0||e>=s?!1:e}function fu(i,t){let e=null;return i==="start"?e=t.bottom:i==="end"?e=t.top:tt(i)?e=t.getPixelForValue(i.value):t.getBasePixel&&(e=t.getBasePixel()),e}function gu(i,t,e){let s;return i==="start"?s=e:i==="end"?s=t.options.reverse?t.min:t.max:tt(i)?s=i.value:s=t.getBaseValue(),s}function pu(i){const t=i.options,e=t.fill;let s=X(e&&e.target,e);return s===void 0&&(s=!!t.backgroundColor),s===!1||s===null?!1:s===!0?"origin":s}function mu(i){const{scale:t,index:e,line:s}=i,n=[],o=s.segments,a=s.points,r=bu(t,e);r.push(jr({x:null,y:t.bottom},s));for(let l=0;l=0;--a){const r=n[a].$filler;r&&(r.line.updateControlPoints(o,r.axis),s&&r.fill&&un(i.ctx,r,o))}},beforeDatasetsDraw(i,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;const s=i.getSortedVisibleDatasetMetas();for(let n=s.length-1;n>=0;--n){const o=s[n].$filler;ua(o)&&un(i.ctx,o,i.chartArea)}},beforeDatasetDraw(i,t,e){const s=t.meta.$filler;!ua(s)||e.drawTime!=="beforeDatasetDraw"||un(i.ctx,s,i.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const ma=(i,t)=>{let{boxHeight:e=t,boxWidth:s=t}=i;return i.usePointStyle&&(e=Math.min(e,t),s=i.pointStyleWidth||Math.min(s,t)),{boxWidth:s,boxHeight:e,itemHeight:Math.max(t,e)}},Cu=(i,t)=>i!==null&&t!==null&&i.datasetIndex===t.datasetIndex&&i.index===t.index;class ba extends Bt{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,s){this.maxWidth=t,this.maxHeight=e,this._margins=s,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=at(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(s=>t.filter(s,this.chart.data))),t.sort&&(e=e.sort((s,n)=>t.sort(s,n,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}const s=t.labels,n=gt(s.font),o=n.size,a=this._computeTitleHeight(),{boxWidth:r,itemHeight:l}=ma(s,o);let c,h;e.font=n.string,this.isHorizontal()?(c=this.maxWidth,h=this._fitRows(a,o,r,l)+10):(h=this.maxHeight,c=this._fitCols(a,n,r,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,s,n){const{ctx:o,maxWidth:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],h=n+r;let d=t;o.textAlign="left",o.textBaseline="middle";let u=-1,f=-h;return this.legendItems.forEach((g,p)=>{const m=s+e/2+o.measureText(g.text).width;(p===0||c[c.length-1]+m+2*r>a)&&(d+=h,c[c.length-(p>0?0:1)]=0,f+=h,u++),l[p]={left:0,top:f,row:u,width:m,height:n},c[c.length-1]+=m+r}),d}_fitCols(t,e,s,n){const{ctx:o,maxHeight:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],h=a-t;let d=r,u=0,f=0,g=0,p=0;return this.legendItems.forEach((m,b)=>{const{itemWidth:_,itemHeight:v}=Au(s,e,o,m,n);b>0&&f+v+2*r>h&&(d+=u+r,c.push({width:u,height:f}),g+=u+r,p++,u=f=0),l[b]={left:g,top:f,col:p,width:_,height:v},u=Math.max(u,_),f+=v+r}),d+=u,c.push({width:u,height:f}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:s,labels:{padding:n},rtl:o}}=this,a=He(o,this.left,this.width);if(this.isHorizontal()){let r=0,l=mt(s,this.left+n,this.right-this.lineWidths[r]);for(const c of e)r!==c.row&&(r=c.row,l=mt(s,this.left+n,this.right-this.lineWidths[r])),c.top+=this.top+t+n,c.left=a.leftForLtr(a.x(l),c.width),l+=c.width+n}else{let r=0,l=mt(s,this.top+t+n,this.bottom-this.columnSizes[r].height);for(const c of e)c.col!==r&&(r=c.col,l=mt(s,this.top+t+n,this.bottom-this.columnSizes[r].height)),c.top=l,c.left+=this.left+n,c.left=a.leftForLtr(a.x(c.left),c.width),l+=c.height+n}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Cs(t,this),this._draw(),As(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:s,ctx:n}=this,{align:o,labels:a}=t,r=ct.color,l=He(t.rtl,this.left,this.width),c=gt(a.font),{padding:h}=a,d=c.size,u=d/2;let f;this.drawTitle(),n.textAlign=l.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=c.string;const{boxWidth:g,boxHeight:p,itemHeight:m}=ma(a,d),b=function(w,M,S){if(isNaN(g)||g<=0||isNaN(p)||p<0)return;n.save();const C=X(S.lineWidth,1);if(n.fillStyle=X(S.fillStyle,r),n.lineCap=X(S.lineCap,"butt"),n.lineDashOffset=X(S.lineDashOffset,0),n.lineJoin=X(S.lineJoin,"miter"),n.lineWidth=C,n.strokeStyle=X(S.strokeStyle,r),n.setLineDash(X(S.lineDash,[])),a.usePointStyle){const P={radius:p*Math.SQRT2/2,pointStyle:S.pointStyle,rotation:S.rotation,borderWidth:C},L=l.xPlus(w,g/2),F=M+u;dr(n,P,L,F,a.pointStyleWidth&&g)}else{const P=M+Math.max((d-p)/2,0),L=l.leftForLtr(w,g),F=Re(S.borderRadius);n.beginPath(),Object.values(F).some(it=>it!==0)?_i(n,{x:L,y:P,w:g,h:p,radius:F}):n.rect(L,P,g,p),n.fill(),C!==0&&n.stroke()}n.restore()},_=function(w,M,S){ze(n,S.text,w,M+m/2,c,{strikethrough:S.hidden,textAlign:l.textAlign(S.textAlign)})},v=this.isHorizontal(),x=this._computeTitleHeight();v?f={x:mt(o,this.left+h,this.right-s[0]),y:this.top+h+x,line:0}:f={x:this.left+h,y:mt(o,this.top+x+h,this.bottom-e[0].height),line:0},xr(this.ctx,t.textDirection);const y=m+h;this.legendItems.forEach((w,M)=>{n.strokeStyle=w.fontColor,n.fillStyle=w.fontColor;const S=n.measureText(w.text).width,C=l.textAlign(w.textAlign||(w.textAlign=a.textAlign)),P=g+u+S;let L=f.x,F=f.y;l.setWidth(this.width),v?M>0&&L+P+h>this.right&&(F=f.y+=y,f.line++,L=f.x=mt(o,this.left+h,this.right-s[f.line])):M>0&&F+y>this.bottom&&(L=f.x=L+e[f.line].width+h,f.line++,F=f.y=mt(o,this.top+x+h,this.bottom-e[f.line].height));const it=l.x(L);if(b(it,F,w),L=Kl(C,L+g+u,v?L+P:this.right,t.rtl),_(l.x(L),F,w),v)f.x+=P+h;else if(typeof w.text!="string"){const J=c.lineHeight;f.y+=$r(w,J)+h}else f.y+=y}),yr(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,s=gt(e.font),n=yt(e.padding);if(!e.display)return;const o=He(t.rtl,this.left,this.width),a=this.ctx,r=e.position,l=s.size/2,c=n.top+l;let h,d=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),h=this.top+c,d=mt(t.align,d,this.right-u);else{const g=this.columnSizes.reduce((p,m)=>Math.max(p,m.height),0);h=c+mt(t.align,this.top,this.bottom-g-t.labels.padding-this._computeTitleHeight())}const f=mt(r,d,d+u);a.textAlign=o.textAlign(zn(r)),a.textBaseline="middle",a.strokeStyle=e.color,a.fillStyle=e.color,a.font=s.string,ze(a,e.text,f,h,s)}_computeTitleHeight(){const t=this.options.title,e=gt(t.font),s=yt(t.padding);return t.display?e.lineHeight+s.height:0}_getLegendItemAt(t,e){let s,n,o;if(ee(t,this.left,this.right)&&ee(e,this.top,this.bottom)){for(o=this.legendHitBoxes,s=0;so.length>a.length?o:a)),t+e.size/2+s.measureText(n).width}function Tu(i,t,e){let s=i;return typeof t.text!="string"&&(s=$r(t,e)),s}function $r(i,t){const e=i.text?i.text.length:0;return t*e}function Eu(i,t){return!!((i==="mousemove"||i==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(i==="click"||i==="mouseup"))}var Lu={id:"legend",_element:ba,start(i,t,e){const s=i.legend=new ba({ctx:i.ctx,options:e,chart:i});xt.configure(i,s,e),xt.addBox(i,s)},stop(i){xt.removeBox(i,i.legend),delete i.legend},beforeUpdate(i,t,e){const s=i.legend;xt.configure(i,s,e),s.options=e},afterUpdate(i){const t=i.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(i,t){t.replay||i.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(i,t,e){const s=t.datasetIndex,n=e.chart;n.isDatasetVisible(s)?(n.hide(s),t.hidden=!0):(n.show(s),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:i=>i.chart.options.color,boxWidth:40,padding:10,generateLabels(i){const t=i.data.datasets,{labels:{usePointStyle:e,pointStyle:s,textAlign:n,color:o,useBorderRadius:a,borderRadius:r}}=i.legend.options;return i._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(e?0:void 0),h=yt(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:c.borderColor,pointStyle:s||c.pointStyle,rotation:c.rotation,textAlign:n||c.textAlign,borderRadius:a&&(r||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:i=>i.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:i=>!i.startsWith("on"),labels:{_scriptable:i=>!["generateLabels","filter","sort"].includes(i)}}};class Un extends Bt{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const s=this.options;if(this.left=0,this.top=0,!s.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;const n=lt(s.text)?s.text.length:1;this._padding=yt(s.padding);const o=n*gt(s.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:e,left:s,bottom:n,right:o,options:a}=this,r=a.align;let l=0,c,h,d;return this.isHorizontal()?(h=mt(r,s,o),d=e+t,c=o-s):(a.position==="left"?(h=s+t,d=mt(r,n,e),l=st*-.5):(h=o-t,d=mt(r,e,n),l=st*.5),c=n-e),{titleX:h,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const s=gt(e.font),o=s.lineHeight/2+this._padding.top,{titleX:a,titleY:r,maxWidth:l,rotation:c}=this._drawArgs(o);ze(t,e.text,0,0,s,{color:e.color,maxWidth:l,rotation:c,textAlign:zn(e.align),textBaseline:"middle",translation:[a,r]})}}function Ru(i,t){const e=new Un({ctx:i.ctx,options:t,chart:i});xt.configure(i,e,t),xt.addBox(i,e),i.titleBlock=e}var Iu={id:"title",_element:Un,start(i,t,e){Ru(i,e)},stop(i){const t=i.titleBlock;xt.removeBox(i,t),delete i.titleBlock},beforeUpdate(i,t,e){const s=i.titleBlock;xt.configure(i,s,e),s.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const rs=new WeakMap;var Fu={id:"subtitle",start(i,t,e){const s=new Un({ctx:i.ctx,options:e,chart:i});xt.configure(i,s,e),xt.addBox(i,s),rs.set(i,s)},stop(i){xt.removeBox(i,rs.get(i)),rs.delete(i)},beforeUpdate(i,t,e){const s=rs.get(i);xt.configure(i,s,e),s.options=e},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const ai={average(i){if(!i.length)return!1;let t,e,s=new Set,n=0,o=0;for(t=0,e=i.length;tr+l)/s.size,y:n/o}},nearest(i,t){if(!i.length)return!1;let e=t.x,s=t.y,n=Number.POSITIVE_INFINITY,o,a,r;for(o=0,a=i.length;o-1?i.split(` -`):i}function zu(i,t){const{element:e,datasetIndex:s,index:n}=t,o=i.getDatasetMeta(s).controller,{label:a,value:r}=o.getLabelAndValue(n);return{chart:i,label:a,parsed:o.getParsed(n),raw:i.data.datasets[s].data[n],formattedValue:r,dataset:o.getDataset(),dataIndex:n,datasetIndex:s,element:e}}function _a(i,t){const e=i.chart.ctx,{body:s,footer:n,title:o}=i,{boxWidth:a,boxHeight:r}=t,l=gt(t.bodyFont),c=gt(t.titleFont),h=gt(t.footerFont),d=o.length,u=n.length,f=s.length,g=yt(t.padding);let p=g.height,m=0,b=s.reduce((x,y)=>x+y.before.length+y.lines.length+y.after.length,0);if(b+=i.beforeBody.length+i.afterBody.length,d&&(p+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),b){const x=t.displayColors?Math.max(r,l.lineHeight):l.lineHeight;p+=f*x+(b-f)*l.lineHeight+(b-1)*t.bodySpacing}u&&(p+=t.footerMarginTop+u*h.lineHeight+(u-1)*t.footerSpacing);let _=0;const v=function(x){m=Math.max(m,e.measureText(x).width+_)};return e.save(),e.font=c.string,nt(i.title,v),e.font=l.string,nt(i.beforeBody.concat(i.afterBody),v),_=t.displayColors?a+2+t.boxPadding:0,nt(s,x=>{nt(x.before,v),nt(x.lines,v),nt(x.after,v)}),_=0,e.font=h.string,nt(i.footer,v),e.restore(),m+=g.width,{width:m,height:p}}function Vu(i,t){const{y:e,height:s}=t;return ei.height-s/2?"bottom":"center"}function Bu(i,t,e,s){const{x:n,width:o}=s,a=e.caretSize+e.caretPadding;if(i==="left"&&n+o+a>t.width||i==="right"&&n-o-a<0)return!0}function Nu(i,t,e,s){const{x:n,width:o}=e,{width:a,chartArea:{left:r,right:l}}=i;let c="center";return s==="center"?c=n<=(r+l)/2?"left":"right":n<=o/2?c="left":n>=a-o/2&&(c="right"),Bu(c,i,t,e)&&(c="center"),c}function xa(i,t,e){const s=e.yAlign||t.yAlign||Vu(i,e);return{xAlign:e.xAlign||t.xAlign||Nu(i,t,e,s),yAlign:s}}function Wu(i,t){let{x:e,width:s}=i;return t==="right"?e-=s:t==="center"&&(e-=s/2),e}function Hu(i,t,e){let{y:s,height:n}=i;return t==="top"?s+=e:t==="bottom"?s-=n+e:s-=n/2,s}function ya(i,t,e,s){const{caretSize:n,caretPadding:o,cornerRadius:a}=i,{xAlign:r,yAlign:l}=e,c=n+o,{topLeft:h,topRight:d,bottomLeft:u,bottomRight:f}=Re(a);let g=Wu(t,r);const p=Hu(t,l,c);return l==="center"?r==="left"?g+=c:r==="right"&&(g-=c):r==="left"?g-=Math.max(h,u)+n:r==="right"&&(g+=Math.max(d,f)+n),{x:pt(g,0,s.width-t.width),y:pt(p,0,s.height-t.height)}}function ls(i,t,e){const s=yt(e.padding);return t==="center"?i.x+i.width/2:t==="right"?i.x+i.width-s.right:i.x+s.left}function va(i){return Wt([],Zt(i))}function ju(i,t,e){return _e(i,{tooltip:t,tooltipItems:e,type:"tooltip"})}function ka(i,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?i.override(e):i}const Ur={beforeTitle:Gt,title(i){if(i.length>0){const t=i[0],e=t.chart.data.labels,s=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(s>0&&t.dataIndex"u"?Ur[t].call(e,s):n}class Sn extends Bt{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,s=this.options.setContext(this.getContext()),n=s.enabled&&e.options.animation&&s.animations,o=new Sr(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=ju(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:s}=e,n=St(s,"beforeTitle",this,t),o=St(s,"title",this,t),a=St(s,"afterTitle",this,t);let r=[];return r=Wt(r,Zt(n)),r=Wt(r,Zt(o)),r=Wt(r,Zt(a)),r}getBeforeBody(t,e){return va(St(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:s}=e,n=[];return nt(t,o=>{const a={before:[],lines:[],after:[]},r=ka(s,o);Wt(a.before,Zt(St(r,"beforeLabel",this,o))),Wt(a.lines,St(r,"label",this,o)),Wt(a.after,Zt(St(r,"afterLabel",this,o))),n.push(a)}),n}getAfterBody(t,e){return va(St(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:s}=e,n=St(s,"beforeFooter",this,t),o=St(s,"footer",this,t),a=St(s,"afterFooter",this,t);let r=[];return r=Wt(r,Zt(n)),r=Wt(r,Zt(o)),r=Wt(r,Zt(a)),r}_createItems(t){const e=this._active,s=this.chart.data,n=[],o=[],a=[];let r=[],l,c;for(l=0,c=e.length;lt.filter(h,d,u,s))),t.itemSort&&(r=r.sort((h,d)=>t.itemSort(h,d,s))),nt(r,h=>{const d=ka(t.callbacks,h);n.push(St(d,"labelColor",this,h)),o.push(St(d,"labelPointStyle",this,h)),a.push(St(d,"labelTextColor",this,h))}),this.labelColors=n,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=r,r}update(t,e){const s=this.options.setContext(this.getContext()),n=this._active;let o,a=[];if(!n.length)this.opacity!==0&&(o={opacity:0});else{const r=ai[s.position].call(this,n,this._eventPosition);a=this._createItems(s),this.title=this.getTitle(a,s),this.beforeBody=this.getBeforeBody(a,s),this.body=this.getBody(a,s),this.afterBody=this.getAfterBody(a,s),this.footer=this.getFooter(a,s);const l=this._size=_a(this,s),c=Object.assign({},r,l),h=xa(this.chart,s,c),d=ya(s,c,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,o={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:r.x,caretY:r.y}}this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,s,n){const o=this.getCaretPosition(t,s,n);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,s){const{xAlign:n,yAlign:o}=this,{caretSize:a,cornerRadius:r}=s,{topLeft:l,topRight:c,bottomLeft:h,bottomRight:d}=Re(r),{x:u,y:f}=t,{width:g,height:p}=e;let m,b,_,v,x,y;return o==="center"?(x=f+p/2,n==="left"?(m=u,b=m-a,v=x+a,y=x-a):(m=u+g,b=m+a,v=x-a,y=x+a),_=m):(n==="left"?b=u+Math.max(l,h)+a:n==="right"?b=u+g-Math.max(c,d)-a:b=this.caretX,o==="top"?(v=f,x=v-a,m=b-a,_=b+a):(v=f+p,x=v+a,m=b+a,_=b-a),y=v),{x1:m,x2:b,x3:_,y1:v,y2:x,y3:y}}drawTitle(t,e,s){const n=this.title,o=n.length;let a,r,l;if(o){const c=He(s.rtl,this.x,this.width);for(t.x=ls(this,s.titleAlign,s),e.textAlign=c.textAlign(s.titleAlign),e.textBaseline="middle",a=gt(s.titleFont),r=s.titleSpacing,e.fillStyle=s.titleColor,e.font=a.string,l=0;l_!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,_i(t,{x:p,y:g,w:c,h:l,radius:b}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),_i(t,{x:m,y:g+1,w:c-2,h:l-2,radius:b}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(p,g,c,l),t.strokeRect(p,g,c,l),t.fillStyle=a.backgroundColor,t.fillRect(m,g+1,c-2,l-2))}t.fillStyle=this.labelTextColors[s]}drawBody(t,e,s){const{body:n}=this,{bodySpacing:o,bodyAlign:a,displayColors:r,boxHeight:l,boxWidth:c,boxPadding:h}=s,d=gt(s.bodyFont);let u=d.lineHeight,f=0;const g=He(s.rtl,this.x,this.width),p=function(S){e.fillText(S,g.x(t.x+f),t.y+u/2),t.y+=u+o},m=g.textAlign(a);let b,_,v,x,y,w,M;for(e.textAlign=a,e.textBaseline="middle",e.font=d.string,t.x=ls(this,m,s),e.fillStyle=s.bodyColor,nt(this.beforeBody,p),f=r&&m!=="right"?a==="center"?c/2+h:c+2+h:0,x=0,w=n.length;x0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,s=this.$animations,n=s&&s.x,o=s&&s.y;if(n||o){const a=ai[t.position].call(this,this._active,this._eventPosition);if(!a)return;const r=this._size=_a(this,t),l=Object.assign({},a,this._size),c=xa(e,t,l),h=ya(t,l,c,e);(n._to!==h.x||o._to!==h.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=r.width,this.height=r.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let s=this.opacity;if(!s)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},o={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;const a=yt(e.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&r&&(t.save(),t.globalAlpha=s,this.drawBackground(o,t,n,e),xr(t,e.textDirection),o.y+=a.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),yr(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const s=this._active,n=t.map(({datasetIndex:r,index:l})=>{const c=this.chart.getDatasetMeta(r);if(!c)throw new Error("Cannot find a dataset at index "+r);return{datasetIndex:r,element:c.data[l],index:l}}),o=!xs(s,n),a=this._positionChanged(n,e);(o||a)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,s=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,o=this._active||[],a=this._getActiveElements(t,o,e,s),r=this._positionChanged(a,t),l=e||!xs(a,o)||r;return l&&(this._active=a,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,s,n){const o=this.options;if(t.type==="mouseout")return[];if(!n)return e.filter(r=>this.chart.data.datasets[r.datasetIndex]&&this.chart.getDatasetMeta(r.datasetIndex).controller.getParsed(r.index)!==void 0);const a=this.chart.getElementsAtEventForMode(t,o.mode,o,s);return o.reverse&&a.reverse(),a}_positionChanged(t,e){const{caretX:s,caretY:n,options:o}=this,a=ai[o.position].call(this,t,e);return a!==!1&&(s!==a.x||n!==a.y)}}I(Sn,"positioners",ai);var Yu={id:"tooltip",_element:Sn,positioners:ai,afterInit(i,t,e){e&&(i.tooltip=new Sn({chart:i,options:e}))},beforeUpdate(i,t,e){i.tooltip&&i.tooltip.initialize(e)},reset(i,t,e){i.tooltip&&i.tooltip.initialize(e)},afterDraw(i){const t=i.tooltip;if(t&&t._willRender()){const e={tooltip:t};if(i.notifyPlugins("beforeTooltipDraw",{...e,cancelable:!0})===!1)return;t.draw(i.ctx),i.notifyPlugins("afterTooltipDraw",e)}},afterEvent(i,t){if(i.tooltip){const e=t.replay;i.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(i,t)=>t.bodyFont.size,boxWidth:(i,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Ur},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:i=>i!=="filter"&&i!=="itemSort"&&i!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},$u=Object.freeze({__proto__:null,Colors:su,Decimation:ru,Filler:Pu,Legend:Lu,SubTitle:Fu,Title:Iu,Tooltip:Yu});const Uu=(i,t,e,s)=>(typeof t=="string"?(e=i.push(t)-1,s.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function Xu(i,t,e,s){const n=i.indexOf(t);if(n===-1)return Uu(i,t,e,s);const o=i.lastIndexOf(t);return n!==o?e:n}const Ku=(i,t)=>i===null?null:pt(Math.round(i),0,t);function Ma(i){const t=this.getLabels();return i>=0&&ie.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}I(Dn,"id","category"),I(Dn,"defaults",{ticks:{callback:Ma}});function qu(i,t){const e=[],{bounds:n,step:o,min:a,max:r,precision:l,count:c,maxTicks:h,maxDigits:d,includeBounds:u}=i,f=o||1,g=h-1,{min:p,max:m}=t,b=!Z(a),_=!Z(r),v=!Z(c),x=(m-p)/(d+1);let y=_o((m-p)/g/f)*f,w,M,S,C;if(y<1e-14&&!b&&!_)return[{value:p},{value:m}];C=Math.ceil(m/y)-Math.floor(p/y),C>g&&(y=_o(C*y/g/f)*f),Z(l)||(w=Math.pow(10,l),y=Math.ceil(y*w)/w),n==="ticks"?(M=Math.floor(p/y)*y,S=Math.ceil(m/y)*y):(M=p,S=m),b&&_&&o&&Wl((r-a)/o,y/1e3)?(C=Math.round(Math.min((r-a)/y,h)),y=(r-a)/C,M=a,S=r):v?(M=b?a:M,S=_?r:S,C=c-1,y=(S-M)/C):(C=(S-M)/y,ci(C,Math.round(C),y/1e3)?C=Math.round(C):C=Math.ceil(C));const P=Math.max(xo(y),xo(M));w=Math.pow(10,Z(l)?P:l),M=Math.round(M*w)/w,S=Math.round(S*w)/w;let L=0;for(b&&(u&&M!==a?(e.push({value:a}),Mr)break;e.push({value:F})}return _&&u&&S!==r?e.length&&ci(e[e.length-1].value,r,wa(r,x,i))?e[e.length-1].value=r:e.push({value:r}):(!_||S===r)&&e.push({value:S}),e}function wa(i,t,{horizontal:e,minRotation:s}){const n=zt(s),o=(e?Math.sin(n):Math.cos(n))||.001,a=.75*t*(""+i).length;return Math.min(t/o,a)}class Ds extends Ve{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return Z(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:s}=this.getUserBounds();let{min:n,max:o}=this;const a=l=>n=e?n:l,r=l=>o=s?o:l;if(t){const l=$t(n),c=$t(o);l<0&&c<0?r(0):l>0&&c>0&&a(0)}if(n===o){let l=o===0?1:Math.abs(o*.05);r(o+l),t||a(n-l)}this.min=n,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:s}=t,n;return s?(n=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${n} ticks. Limiting to 1000.`),n=1e3)):(n=this.computeTickLimit(),e=e||11),e&&(n=Math.min(e,n)),n}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let s=this.getTickLimit();s=Math.max(2,s);const n={maxTicks:s,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},o=this._range||this,a=qu(n,o);return t.bounds==="ticks"&&ir(a,this,"value"),t.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const t=this.ticks;let e=this.min,s=this.max;if(super.configure(),this.options.offset&&t.length){const n=(s-e)/Math.max(t.length-1,1)/2;e-=n,s+=n}this._startValue=e,this._endValue=s,this._valueRange=s-e}getLabelForValue(t){return Mi(t,this.chart.options.locale,this.options.ticks.format)}}class Pn extends Ds{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=ut(t)?t:0,this.max=ut(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,s=zt(this.options.ticks.minRotation),n=(t?Math.sin(s):Math.cos(s))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/n))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}I(Pn,"id","linear"),I(Pn,"defaults",{ticks:{callback:Ps.formatters.numeric}});const yi=i=>Math.floor(de(i)),Pe=(i,t)=>Math.pow(10,yi(i)+t);function Sa(i){return i/Math.pow(10,yi(i))===1}function Da(i,t,e){const s=Math.pow(10,e),n=Math.floor(i/s);return Math.ceil(t/s)-n}function Gu(i,t){const e=t-i;let s=yi(e);for(;Da(i,t,s)>10;)s++;for(;Da(i,t,s)<10;)s--;return Math.min(s,yi(i))}function Ju(i,{min:t,max:e}){t=At(i.min,t);const s=[],n=yi(t);let o=Gu(t,e),a=o<0?Math.pow(10,Math.abs(o)):1;const r=Math.pow(10,o),l=n>o?Math.pow(10,n):0,c=Math.round((t-l)*a)/a,h=Math.floor((t-l)/r/10)*r*10;let d=Math.floor((c-h)/Math.pow(10,o)),u=At(i.min,Math.round((l+h+d*Math.pow(10,o))*a)/a);for(;u=10?d=d<15?15:20:d++,d>=20&&(o++,d=2,a=o>=0?1:a),u=Math.round((l+h+d*Math.pow(10,o))*a)/a;const f=At(i.max,u);return s.push({value:f,major:Sa(f),significand:d}),s}class Cn extends Ve{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const s=Ds.prototype.parse.apply(this,[t,e]);if(s===0){this._zero=!0;return}return ut(s)&&s>0?s:null}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=ut(t)?Math.max(0,t):null,this.max=ut(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!ut(this._userMin)&&(this.min=t===Pe(this.min,0)?Pe(this.min,-1):Pe(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let s=this.min,n=this.max;const o=r=>s=t?s:r,a=r=>n=e?n:r;s===n&&(s<=0?(o(1),a(10)):(o(Pe(s,-1)),a(Pe(n,1)))),s<=0&&o(Pe(n,-1)),n<=0&&a(Pe(s,1)),this.min=s,this.max=n}buildTicks(){const t=this.options,e={min:this._userMin,max:this._userMax},s=Ju(e,this);return t.bounds==="ticks"&&ir(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}getLabelForValue(t){return t===void 0?"0":Mi(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=de(t),this._valueRange=de(this.max)-de(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(de(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}I(Cn,"id","logarithmic"),I(Cn,"defaults",{ticks:{callback:Ps.formatters.logarithmic,major:{enabled:!0}}});function An(i){const t=i.ticks;if(t.display&&i.display){const e=yt(t.backdropPadding);return X(t.font&&t.font.size,ct.font.size)+e.height}return 0}function Zu(i,t,e){return e=lt(e)?e:[e],{w:nc(i,t.string,e),h:e.length*t.lineHeight}}function Pa(i,t,e,s,n){return i===s||i===n?{start:t-e/2,end:t+e/2}:in?{start:t-e,end:t}:{start:t,end:t+e}}function Qu(i){const t={l:i.left+i._padding.left,r:i.right-i._padding.right,t:i.top+i._padding.top,b:i.bottom-i._padding.bottom},e=Object.assign({},t),s=[],n=[],o=i._pointLabels.length,a=i.options.pointLabels,r=a.centerPointLabels?st/o:0;for(let l=0;lt.r&&(r=(s.end-t.r)/o,i.r=Math.max(i.r,t.r+r)),n.startt.b&&(l=(n.end-t.b)/a,i.b=Math.max(i.b,t.b+l))}function ef(i,t,e){const s=i.drawingArea,{extra:n,additionalAngle:o,padding:a,size:r}=e,l=i.getPointPosition(t,s+n+a,o),c=Math.round(In(bt(l.angle+ft))),h=rf(l.y,r.h,c),d=of(c),u=af(l.x,r.w,d);return{visible:!0,x:l.x,y:h,textAlign:d,left:u,top:h,right:u+r.w,bottom:h+r.h}}function sf(i,t){if(!t)return!0;const{left:e,top:s,right:n,bottom:o}=i;return!(se({x:e,y:s},t)||se({x:e,y:o},t)||se({x:n,y:s},t)||se({x:n,y:o},t))}function nf(i,t,e){const s=[],n=i._pointLabels.length,o=i.options,{centerPointLabels:a,display:r}=o.pointLabels,l={extra:An(o)/2,additionalAngle:a?st/n:0};let c;for(let h=0;h270||e<90)&&(i-=t),i}function lf(i,t,e){const{left:s,top:n,right:o,bottom:a}=e,{backdropColor:r}=t;if(!Z(r)){const l=Re(t.borderRadius),c=yt(t.backdropPadding);i.fillStyle=r;const h=s-c.left,d=n-c.top,u=o-s+c.width,f=a-n+c.height;Object.values(l).some(g=>g!==0)?(i.beginPath(),_i(i,{x:h,y:d,w:u,h:f,radius:l}),i.fill()):i.fillRect(h,d,u,f)}}function cf(i,t){const{ctx:e,options:{pointLabels:s}}=i;for(let n=t-1;n>=0;n--){const o=i._pointLabelItems[n];if(!o.visible)continue;const a=s.setContext(i.getPointLabelContext(n));lf(e,a,o);const r=gt(a.font),{x:l,y:c,textAlign:h}=o;ze(e,i._pointLabels[n],l,c+r.lineHeight/2,r,{color:a.color,textAlign:h,textBaseline:"middle"})}}function Xr(i,t,e,s){const{ctx:n}=i;if(e)n.arc(i.xCenter,i.yCenter,t,0,rt);else{let o=i.getPointPosition(0,t);n.moveTo(o.x,o.y);for(let a=1;a{const n=at(this.options.pointLabels.callback,[e,s],this);return n||n===0?n:""}).filter((e,s)=>this.chart.getDataVisibility(s))}fit(){const t=this.options;t.display&&t.pointLabels.display?Qu(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,s,n){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((s-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,s,n))}getIndexAngle(t){const e=rt/(this._pointLabels.length||1),s=this.options.startAngle||0;return bt(t*e+zt(s))}getDistanceFromCenterForValue(t){if(Z(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(Z(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t{if(d!==0||d===0&&this.min<0){l=this.getDistanceFromCenterForValue(h.value);const u=this.getContext(d),f=n.setContext(u),g=o.setContext(u);hf(this,f,l,a,g)}}),s.display){for(t.save(),r=a-1;r>=0;r--){const h=s.setContext(this.getPointLabelContext(r)),{color:d,lineWidth:u}=h;!u||!d||(t.lineWidth=u,t.strokeStyle=d,t.setLineDash(h.borderDash),t.lineDashOffset=h.borderDashOffset,l=this.getDistanceFromCenterForValue(e.reverse?this.min:this.max),c=this.getPointPosition(r,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,s=e.ticks;if(!s.display)return;const n=this.getIndexAngle(0);let o,a;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((r,l)=>{if(l===0&&this.min>=0&&!e.reverse)return;const c=s.setContext(this.getContext(l)),h=gt(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=h.string,a=t.measureText(r.label).width,t.fillStyle=c.backdropColor;const d=yt(c.backdropPadding);t.fillRect(-a/2-d.left,-o-h.size/2-d.top,a+d.width,h.size+d.height)}ze(t,r.label,0,-o,h,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}}I(ri,"id","radialLinear"),I(ri,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Ps.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),I(ri,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),I(ri,"descriptors",{angleLines:{_fallback:"grid"}});const Ls={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Dt=Object.keys(Ls);function Ca(i,t){return i-t}function Aa(i,t){if(Z(t))return null;const e=i._adapter,{parser:s,round:n,isoWeekday:o}=i._parseOpts;let a=t;return typeof s=="function"&&(a=s(a)),ut(a)||(a=typeof s=="string"?e.parse(a,s):e.parse(a)),a===null?null:(n&&(a=n==="week"&&(je(o)||o===!0)?e.startOf(a,"isoWeek",o):e.startOf(a,n)),+a)}function Oa(i,t,e,s){const n=Dt.length;for(let o=Dt.indexOf(i);o=Dt.indexOf(e);o--){const a=Dt[o];if(Ls[a].common&&i._adapter.diff(n,s,a)>=t-1)return a}return Dt[e?Dt.indexOf(e):0]}function ff(i){for(let t=Dt.indexOf(i)+1,e=Dt.length;t=t?e[s]:e[n];i[o]=!0}}function gf(i,t,e,s){const n=i._adapter,o=+n.startOf(t[0].value,s),a=t[t.length-1].value;let r,l;for(r=o;r<=a;r=+n.add(r,1,s))l=e[r],l>=0&&(t[l].major=!0);return t}function Ea(i,t,e){const s=[],n={},o=t.length;let a,r;for(a=0;a+t.value))}initOffsets(t=[]){let e=0,s=0,n,o;this.options.offset&&t.length&&(n=this.getDecimalForValue(t[0]),t.length===1?e=1-n:e=(this.getDecimalForValue(t[1])-n)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?s=o:s=(o-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;e=pt(e,0,a),s=pt(s,0,a),this._offsets={start:e,end:s,factor:1/(e+1+s)}}_generate(){const t=this._adapter,e=this.min,s=this.max,n=this.options,o=n.time,a=o.unit||Oa(o.minUnit,e,s,this._getLabelCapacity(e)),r=X(n.ticks.stepSize,1),l=a==="week"?o.isoWeekday:!1,c=je(l)||l===!0,h={};let d=e,u,f;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":a),t.diff(s,e,a)>1e5*r)throw new Error(e+" and "+s+" are too far apart with stepSize of "+r+" "+a);const g=n.ticks.source==="data"&&this.getDataTimestamps();for(u=d,f=0;u+p)}getLabelForValue(t){const e=this._adapter,s=this.options.time;return s.tooltipFormat?e.format(t,s.tooltipFormat):e.format(t,s.displayFormats.datetime)}format(t,e){const n=this.options.time.displayFormats,o=this._unit,a=e||n[o];return this._adapter.format(t,a)}_tickFormatFunction(t,e,s,n){const o=this.options,a=o.ticks.callback;if(a)return at(a,[t,e,s],this);const r=o.time.displayFormats,l=this._unit,c=this._majorUnit,h=l&&r[l],d=c&&r[c],u=s[e],f=c&&d&&u&&u.major;return this._adapter.format(t,n||(f?d:h))}generateTickLabels(t){let e,s,n;for(e=0,s=t.length;e0?r:1}getDataTimestamps(){let t=this._cache.data||[],e,s;if(t.length)return t;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(e=0,s=n.length;e=i[s].pos&&t<=i[n].pos&&({lo:s,hi:n}=ie(i,"pos",t)),{pos:o,time:r}=i[s],{pos:a,time:l}=i[n]):(t>=i[s].time&&t<=i[n].time&&({lo:s,hi:n}=ie(i,"time",t)),{time:o,pos:r}=i[s],{time:a,pos:l}=i[n]);const c=a-o;return c?r+(l-r)*(t-o)/c:r}class On extends vi{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=cs(e,this.min),this._tableRange=cs(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:s}=this,n=[],o=[];let a,r,l,c,h;for(a=0,r=t.length;a=e&&c<=s&&n.push(c);if(n.length<2)return[{time:e,pos:0},{time:s,pos:1}];for(a=0,r=n.length;an-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),s=this.getLabelTimestamps();return e.length&&s.length?t=this.normalize(e.concat(s)):t=e.length?e:s,t=this._cache.all=t,t}getDecimalForValue(t){return(cs(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,s=this.getDecimalForPixel(t)/e.factor-e.end;return cs(this._table,s*this._tableRange+this._minPos,!0)}}I(On,"id","timeseries"),I(On,"defaults",vi.defaults);var pf=Object.freeze({__proto__:null,CategoryScale:Dn,LinearScale:Pn,LogarithmicScale:Cn,RadialLinearScale:ri,TimeScale:vi,TimeSeriesScale:On});const mf=[yh,Gd,$u,pf];function La(i,t,e){const s=i.slice();return s[42]=t[e],s}function Ra(i,t,e){const s=i.slice();return s[45]=t[e],s}function Ia(i,t,e){const s=i.slice();return s[48]=t[e],s}function gn(i){const t=i.slice(),e=t[48].total_income+t[48].total_expense;return t[51]=e,t}function Fa(i,t,e){const s=i.slice();return s[52]=t[e],s[54]=e,s}function bf(i,t,e){const s=i.slice();return s[37]=t[e],s}function _f(i,t,e){const s=i.slice();return s[37]=t[e],s}function za(i,t,e){const s=i.slice();return s[55]=t[e],s}function Va(i,t,e){const s=i.slice();return s[58]=t[e],s}function Ba(i,t,e){const s=i.slice();return s[61]=t[e],s}function Na(i){let t,e=i[61].name+"",s,n;return{c(){t=T("option"),s=U(e),this.h()},l(o){t=O(o,"OPTION",{});var a=R(t);s=$(a,e),a.forEach(D),this.h()},h(){t.__value=n=i[61].id,fi(t,t.__value)},m(o,a){Q(o,t,a),k(t,s)},p(o,a){a[0]&262144&&e!==(e=o[61].name+"")&&ot(s,e),a[0]&262144&&n!==(n=o[61].id)&&(t.__value=n,fi(t,t.__value))},d(o){o&&D(t)}}}function Wa(i){let t,e=i[58]+"",s;return{c(){t=T("option"),s=U(e),this.h()},l(n){t=O(n,"OPTION",{});var o=R(t);s=$(o,e),o.forEach(D),this.h()},h(){t.__value=i[58],fi(t,t.__value)},m(n,o){Q(n,t,o),k(t,s)},p:Ot,d(n){n&&D(t)}}}function Ha(i){let t,e=i[55].label+"",s;return{c(){t=T("option"),s=U(e),this.h()},l(n){t=O(n,"OPTION",{});var o=R(t);s=$(o,e),o.forEach(D),this.h()},h(){t.__value=i[55].value,fi(t,t.__value)},m(n,o){Q(n,t,o),k(t,s)},p:Ot,d(n){n&&D(t)}}}function xf(i){let t,e,s,n,o,a,r,l,c=i[21](i[6])+"",h,d,u,f,g,p,m,b,_,v=i[21](i[5])+"",x,y,w,M,S="Bénéfice net",C,P,L=i[21](i[17])+"",F,it,J,W,A,N,Y,et,B,ht,vt,kt,V,G,q,dt,wt,ne,Ct,wi,Rs,Ut,oe,xe,Xn="Dépenses par catégorie",Is,ae,re,Fs,Si,zs,le,Vs,Di,Bs,Pi,Xt,Kt,ye,Ns,Ci,Ws,Hs,qt,ve,Kn="Dernières transactions",js,Ai,Nt,ce,ke,Ys,Me,qn="Occupations ce mois",$s,Mt,Us,Gn;n=new al({props:{size:13,class:"text-green-500"}}),g=new rl({props:{size:13,class:"text-red-500"}}),N=new co({props:{size:13}});function Jn(z,K){return K[0]&256&&(wi=null),wi==null&&(wi=!!z[8].every(If)),wi?kf:vf}let Oi=Jn(i,[-1,-1,-1]),Et=Oi(i);function Zn(z,K){return z[2].length===0?Sf:z[10]==="chart"?wf:Mf}let Ti=Zn(i),Lt=Ti(i);function Qn(z,K){return z[0].length===0?Pf:Df}let Ei=Qn(i),Rt=Ei(i);function to(z,K){return z[7].length===0?Af:Cf}let Li=to(i),It=Li(i);ke=new co({props:{size:16,class:"text-gray-400"}});function eo(z,K){return z[1].length===0?Tf:Of}let Ri=eo(i),Ft=Ri(i);return{c(){t=T("div"),e=T("div"),s=T("div"),ei(n.$$.fragment),o=U(" Revenus "),a=U(i[14]),r=j(),l=T("p"),h=U(c),d=j(),u=T("div"),f=T("div"),ei(g.$$.fragment),p=U(" Dépenses "),m=U(i[14]),b=j(),_=T("p"),x=U(v),y=j(),w=T("div"),M=T("div"),M.textContent=S,C=j(),P=T("p"),F=U(L),J=j(),W=T("div"),A=T("div"),ei(N.$$.fragment),Y=U(" Occupation ce mois"),et=j(),B=T("p"),ht=U(i[15]),vt=U("%"),kt=j(),V=T("div"),G=T("div"),q=T("h2"),dt=U("Revenus & dépenses par mois — "),wt=U(i[3]),ne=j(),Ct=T("div"),Et.c(),Rs=j(),Ut=T("div"),oe=T("div"),xe=T("h2"),xe.textContent=Xn,Is=j(),ae=T("div"),re=T("button"),Fs=U("Donut"),zs=j(),le=T("button"),Vs=U("Tableau"),Bs=j(),Lt.c(),Pi=j(),Xt=T("div"),Kt=T("div"),ye=T("h2"),Ns=U("Par bien — "),Ci=U(i[14]),Ws=j(),Rt.c(),Hs=j(),qt=T("div"),ve=T("h2"),ve.textContent=Kn,js=j(),It.c(),Ai=j(),Nt=T("div"),ce=T("div"),ei(ke.$$.fragment),Ys=j(),Me=T("h2"),Me.textContent=qn,$s=j(),Ft.c(),this.h()},l(z){t=O(z,"DIV",{class:!0});var K=R(t);e=O(K,"DIV",{class:!0});var Ii=R(e);s=O(Ii,"DIV",{class:!0});var Fi=R(s);ti(n.$$.fragment,Fi),o=$(Fi," Revenus "),a=$(Fi,i[14]),Fi.forEach(D),r=H(Ii),l=O(Ii,"P",{class:!0});var io=R(l);h=$(io,c),io.forEach(D),Ii.forEach(D),d=H(K),u=O(K,"DIV",{class:!0});var zi=R(u);f=O(zi,"DIV",{class:!0});var Vi=R(f);ti(g.$$.fragment,Vi),p=$(Vi," Dépenses "),m=$(Vi,i[14]),Vi.forEach(D),b=H(zi),_=O(zi,"P",{class:!0});var so=R(_);x=$(so,v),so.forEach(D),zi.forEach(D),y=H(K),w=O(K,"DIV",{class:!0});var Bi=R(w);M=O(Bi,"DIV",{class:!0,"data-svelte-h":!0}),Pt(M)!=="svelte-1ny5fh9"&&(M.textContent=S),C=H(Bi),P=O(Bi,"P",{class:!0});var no=R(P);F=$(no,L),no.forEach(D),Bi.forEach(D),J=H(K),W=O(K,"DIV",{class:!0});var Ni=R(W);A=O(Ni,"DIV",{class:!0});var Xs=R(A);ti(N.$$.fragment,Xs),Y=$(Xs," Occupation ce mois"),Xs.forEach(D),et=H(Ni),B=O(Ni,"P",{class:!0});var Ks=R(B);ht=$(Ks,i[15]),vt=$(Ks,"%"),Ks.forEach(D),Ni.forEach(D),K.forEach(D),kt=H(z),V=O(z,"DIV",{class:!0});var Wi=R(V);G=O(Wi,"DIV",{class:!0});var Hi=R(G);q=O(Hi,"H2",{class:!0});var qs=R(q);dt=$(qs,"Revenus & dépenses par mois — "),wt=$(qs,i[3]),qs.forEach(D),ne=H(Hi),Ct=O(Hi,"DIV",{style:!0});var oo=R(Ct);Et.l(oo),oo.forEach(D),Hi.forEach(D),Rs=H(Wi),Ut=O(Wi,"DIV",{class:!0});var ji=R(Ut);oe=O(ji,"DIV",{class:!0});var Yi=R(oe);xe=O(Yi,"H2",{class:!0,"data-svelte-h":!0}),Pt(xe)!=="svelte-k3nnaz"&&(xe.textContent=Xn),Is=H(Yi),ae=O(Yi,"DIV",{class:!0});var $i=R(ae);re=O($i,"BUTTON",{class:!0});var ao=R(re);Fs=$(ao,"Donut"),ao.forEach(D),zs=H($i),le=O($i,"BUTTON",{class:!0});var ro=R(le);Vs=$(ro,"Tableau"),ro.forEach(D),$i.forEach(D),Yi.forEach(D),Bs=H(ji),Lt.l(ji),ji.forEach(D),Wi.forEach(D),Pi=H(z),Xt=O(z,"DIV",{class:!0});var Ui=R(Xt);Kt=O(Ui,"DIV",{class:!0});var Xi=R(Kt);ye=O(Xi,"H2",{class:!0});var Gs=R(ye);Ns=$(Gs,"Par bien — "),Ci=$(Gs,i[14]),Gs.forEach(D),Ws=H(Xi),Rt.l(Xi),Xi.forEach(D),Hs=H(Ui),qt=O(Ui,"DIV",{class:!0});var Ki=R(qt);ve=O(Ki,"H2",{class:!0,"data-svelte-h":!0}),Pt(ve)!=="svelte-1sqa11w"&&(ve.textContent=Kn),js=H(Ki),It.l(Ki),Ki.forEach(D),Ui.forEach(D),Ai=H(z),Nt=O(z,"DIV",{class:!0});var qi=R(Nt);ce=O(qi,"DIV",{class:!0});var Gi=R(ce);ti(ke.$$.fragment,Gi),Ys=H(Gi),Me=O(Gi,"H2",{class:!0,"data-svelte-h":!0}),Pt(Me)!=="svelte-1cst2ja"&&(Me.textContent=qn),Gi.forEach(D),$s=H(qi),Ft.l(qi),qi.forEach(D),this.h()},h(){E(s,"class","flex items-center gap-1.5 text-xs text-gray-500 dark:text-gray-400 mb-2"),E(l,"class","text-xl font-semibold text-green-600 dark:text-green-400"),E(e,"class","bg-white dark:bg-gray-900 rounded-xl p-4 border border-gray-100 dark:border-gray-800"),E(f,"class","flex items-center gap-1.5 text-xs text-gray-500 dark:text-gray-400 mb-2"),E(_,"class","text-xl font-semibold text-red-500 dark:text-red-400"),E(u,"class","bg-white dark:bg-gray-900 rounded-xl p-4 border border-gray-100 dark:border-gray-800"),E(M,"class","text-xs text-gray-500 dark:text-gray-400 mb-2"),E(P,"class",it="text-xl font-semibold "+(i[17]>=0?"text-green-600 dark:text-green-400":"text-red-500 dark:text-red-400")),E(w,"class","bg-white dark:bg-gray-900 rounded-xl p-4 border border-gray-100 dark:border-gray-800"),E(A,"class","flex items-center gap-1.5 text-xs text-gray-500 dark:text-gray-400 mb-2"),E(B,"class","text-xl font-semibold text-blue-600 dark:text-blue-400"),E(W,"class","bg-white dark:bg-gray-900 rounded-xl p-4 border border-gray-100 dark:border-gray-800"),E(t,"class","grid grid-cols-2 md:grid-cols-4 gap-3 mb-6"),E(q,"class","text-sm font-semibold text-gray-700 dark:text-gray-300 mb-4"),Yt(Ct,"height","340px"),Yt(Ct,"position","relative"),E(G,"class","lg:col-span-2 bg-white dark:bg-gray-900 rounded-xl border border-gray-100 dark:border-gray-800 p-5"),E(xe,"class","text-sm font-semibold text-gray-700 dark:text-gray-300"),E(re,"class",Si="px-2 py-1 rounded text-xs transition-colors "+(i[10]==="chart"?"bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-300":"text-gray-400 hover:text-gray-600 dark:hover:text-gray-300")),E(le,"class",Di="px-2 py-1 rounded text-xs transition-colors "+(i[10]==="table"?"bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-300":"text-gray-400 hover:text-gray-600 dark:hover:text-gray-300")),E(ae,"class","flex gap-1"),E(oe,"class","flex items-center justify-between mb-4"),E(Ut,"class","bg-white dark:bg-gray-900 rounded-xl border border-gray-100 dark:border-gray-800 p-5"),E(V,"class","grid grid-cols-1 lg:grid-cols-3 gap-5 mb-5"),E(ye,"class","text-sm font-semibold text-gray-700 dark:text-gray-300 mb-3"),E(Kt,"class","bg-white dark:bg-gray-900 rounded-xl border border-gray-100 dark:border-gray-800 p-4"),E(ve,"class","text-sm font-semibold text-gray-700 dark:text-gray-300 mb-3"),E(qt,"class","bg-white dark:bg-gray-900 rounded-xl border border-gray-100 dark:border-gray-800 p-4"),E(Xt,"class","grid grid-cols-1 md:grid-cols-2 gap-5 mb-5"),E(Me,"class","text-sm font-semibold text-gray-700 dark:text-gray-300"),E(ce,"class","flex items-center gap-2 mb-4"),E(Nt,"class","bg-white dark:bg-gray-900 rounded-xl border border-gray-100 dark:border-gray-800 p-5")},m(z,K){Q(z,t,K),k(t,e),k(e,s),Qe(n,s,null),k(s,o),k(s,a),k(e,r),k(e,l),k(l,h),k(t,d),k(t,u),k(u,f),Qe(g,f,null),k(f,p),k(f,m),k(u,b),k(u,_),k(_,x),k(t,y),k(t,w),k(w,M),k(w,C),k(w,P),k(P,F),k(t,J),k(t,W),k(W,A),Qe(N,A,null),k(A,Y),k(W,et),k(W,B),k(B,ht),k(B,vt),Q(z,kt,K),Q(z,V,K),k(V,G),k(G,q),k(q,dt),k(q,wt),k(G,ne),k(G,Ct),Et.m(Ct,null),k(V,Rs),k(V,Ut),k(Ut,oe),k(oe,xe),k(oe,Is),k(oe,ae),k(ae,re),k(re,Fs),k(ae,zs),k(ae,le),k(le,Vs),k(Ut,Bs),Lt.m(Ut,null),Q(z,Pi,K),Q(z,Xt,K),k(Xt,Kt),k(Kt,ye),k(ye,Ns),k(ye,Ci),k(Kt,Ws),Rt.m(Kt,null),k(Xt,Hs),k(Xt,qt),k(qt,ve),k(qt,js),It.m(qt,null),Q(z,Ai,K),Q(z,Nt,K),k(Nt,ce),Qe(ke,ce,null),k(ce,Ys),k(ce,Me),k(Nt,$s),Ft.m(Nt,null),Mt=!0,Us||(Gn=[Qt(re,"click",i[30]),Qt(le,"click",i[31])],Us=!0)},p(z,K){(!Mt||K[0]&16384)&&ot(a,z[14]),(!Mt||K[0]&64)&&c!==(c=z[21](z[6])+"")&&ot(h,c),(!Mt||K[0]&16384)&&ot(m,z[14]),(!Mt||K[0]&32)&&v!==(v=z[21](z[5])+"")&&ot(x,v),(!Mt||K[0]&131072)&&L!==(L=z[21](z[17])+"")&&ot(F,L),(!Mt||K[0]&131072&&it!==(it="text-xl font-semibold "+(z[17]>=0?"text-green-600 dark:text-green-400":"text-red-500 dark:text-red-400")))&&E(P,"class",it),(!Mt||K[0]&32768)&&ot(ht,z[15]),(!Mt||K[0]&8)&&ot(wt,z[3]),Oi===(Oi=Jn(z,K))&&Et?Et.p(z,K):(Et.d(1),Et=Oi(z),Et&&(Et.c(),Et.m(Ct,null))),(!Mt||K[0]&1024&&Si!==(Si="px-2 py-1 rounded text-xs transition-colors "+(z[10]==="chart"?"bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-300":"text-gray-400 hover:text-gray-600 dark:hover:text-gray-300")))&&E(re,"class",Si),(!Mt||K[0]&1024&&Di!==(Di="px-2 py-1 rounded text-xs transition-colors "+(z[10]==="table"?"bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-300":"text-gray-400 hover:text-gray-600 dark:hover:text-gray-300")))&&E(le,"class",Di),Ti===(Ti=Zn(z))&&Lt?Lt.p(z,K):(Lt.d(1),Lt=Ti(z),Lt&&(Lt.c(),Lt.m(Ut,null))),(!Mt||K[0]&16384)&&ot(Ci,z[14]),Ei===(Ei=Qn(z))&&Rt?Rt.p(z,K):(Rt.d(1),Rt=Ei(z),Rt&&(Rt.c(),Rt.m(Kt,null))),Li===(Li=to(z))&&It?It.p(z,K):(It.d(1),It=Li(z),It&&(It.c(),It.m(qt,null))),Ri===(Ri=eo(z))&&Ft?Ft.p(z,K):(Ft.d(1),Ft=Ri(z),Ft&&(Ft.c(),Ft.m(Nt,null)))},i(z){Mt||(Te(n.$$.fragment,z),Te(g.$$.fragment,z),Te(N.$$.fragment,z),Te(ke.$$.fragment,z),Mt=!0)},o(z){Oe(n.$$.fragment,z),Oe(g.$$.fragment,z),Oe(N.$$.fragment,z),Oe(ke.$$.fragment,z),Mt=!1},d(z){z&&(D(t),D(kt),D(V),D(Pi),D(Xt),D(Ai),D(Nt)),Ze(n),Ze(g),Ze(N),Et.d(),Lt.d(),Rt.d(),It.d(),Ze(ke),Ft.d(),Us=!1,Ka(Gn)}}}function yf(i){let t,e,s,n=_t([1,2,3,4]),o=[];for(let l=0;l<4;l+=1)o[l]=Ef(_f(i,n,l));let a=_t([1,2,3]),r=[];for(let l=0;l<3;l+=1)r[l]=Lf(bf(i,a,l));return{c(){t=T("div");for(let l=0;l<4;l+=1)o[l].c();e=j(),s=T("div");for(let l=0;l<3;l+=1)r[l].c();this.h()},l(l){t=O(l,"DIV",{class:!0});var c=R(t);for(let d=0;d<4;d+=1)o[d].l(c);c.forEach(D),e=H(l),s=O(l,"DIV",{class:!0});var h=R(s);for(let d=0;d<3;d+=1)r[d].l(h);h.forEach(D),this.h()},h(){E(t,"class","grid grid-cols-2 md:grid-cols-4 gap-3 mb-6"),E(s,"class","grid grid-cols-1 md:grid-cols-2 gap-5")},m(l,c){Q(l,t,c);for(let h=0;h<4;h+=1)o[h]&&o[h].m(t,null);Q(l,e,c),Q(l,s,c);for(let h=0;h<3;h+=1)r[h]&&r[h].m(s,null)},p:Ot,i:Ot,o:Ot,d(l){l&&(D(t),D(e),D(s)),Le(o,l),Le(r,l)}}}function vf(i){let t;return{c(){t=T("canvas")},l(e){t=O(e,"CANVAS",{}),R(t).forEach(D)},m(e,s){Q(e,t,s),i[29](t)},p:Ot,d(e){e&&D(t),i[29](null)}}}function kf(i){let t,e,s;return{c(){t=T("div"),e=U("Aucune donnée pour "),s=U(i[3]),this.h()},l(n){t=O(n,"DIV",{class:!0});var o=R(t);e=$(o,"Aucune donnée pour "),s=$(o,i[3]),o.forEach(D),this.h()},h(){E(t,"class","flex items-center justify-center h-full text-sm text-gray-400")},m(n,o){Q(n,t,o),k(t,e),k(t,s)},p(n,o){o[0]&8&&ot(s,n[3])},d(n){n&&D(t)}}}function Mf(i){let t,e,s,n='Catégorie Montant %',o,a,r,l,c,h,d="Total",u,f,g=i[21](i[16])+"",p,m,b,_="100%",v=_t(i[2]),x=[];for(let y=0;y0?(i[52].amount/i[16]*100).toFixed(1):0)+"",m,b,_;return{c(){t=T("tr"),e=T("td"),s=T("div"),n=T("span"),o=j(),a=T("span"),l=U(r),c=j(),h=T("td"),u=U(d),f=j(),g=T("td"),m=U(p),b=U("%"),_=j(),this.h()},l(v){t=O(v,"TR",{class:!0});var x=R(t);e=O(x,"TD",{class:!0});var y=R(e);s=O(y,"DIV",{class:!0});var w=R(s);n=O(w,"SPAN",{class:!0,style:!0}),R(n).forEach(D),o=H(w),a=O(w,"SPAN",{class:!0});var M=R(a);l=$(M,r),M.forEach(D),w.forEach(D),y.forEach(D),c=H(x),h=O(x,"TD",{class:!0});var S=R(h);u=$(S,d),S.forEach(D),f=H(x),g=O(x,"TD",{class:!0});var C=R(g);m=$(C,p),b=$(C,"%"),C.forEach(D),_=H(x),x.forEach(D),this.h()},h(){E(n,"class","w-2.5 h-2.5 rounded-full shrink-0"),Yt(n,"background",i[24][i[54]%i[24].length]),E(a,"class","text-gray-700 dark:text-gray-300 truncate"),E(s,"class","flex items-center gap-2"),E(e,"class","py-2 pr-2"),E(h,"class","py-2 text-right font-medium text-red-500 dark:text-red-400 whitespace-nowrap"),E(g,"class","py-2 text-right text-gray-400 whitespace-nowrap"),E(t,"class","border-b border-gray-50 dark:border-gray-800 last:border-0")},m(v,x){Q(v,t,x),k(t,e),k(e,s),k(s,n),k(s,o),k(s,a),k(a,l),k(t,c),k(t,h),k(h,u),k(t,f),k(t,g),k(g,m),k(g,b),k(t,_)},p(v,x){x[0]&4&&r!==(r=v[52].category+"")&&ot(l,r),x[0]&4&&d!==(d=v[21](v[52].amount)+"")&&ot(u,d),x[0]&65540&&p!==(p=(v[16]>0?(v[52].amount/v[16]*100).toFixed(1):0)+"")&&ot(m,p)},d(v){v&&D(t)}}}function Df(i){let t,e=_t(i[0]),s=[];for(let n=0;n0||i[48].total_expense>0)&&Ya(gn(i));return{c(){t=T("div"),e=T("div"),s=T("span"),o=U(n),a=j(),r=T("span"),c=U(l),d=j(),u=T("div"),C&&C.c(),f=j(),g=T("div"),p=T("span"),m=U("↑ "),_=U(b),v=j(),x=T("span"),y=U("↓ "),M=U(w),S=j(),this.h()},l(P){t=O(P,"DIV",{});var L=R(t);e=O(L,"DIV",{class:!0});var F=R(e);s=O(F,"SPAN",{class:!0});var it=R(s);o=$(it,n),it.forEach(D),a=H(F),r=O(F,"SPAN",{class:!0});var J=R(r);c=$(J,l),J.forEach(D),F.forEach(D),d=H(L),u=O(L,"DIV",{class:!0});var W=R(u);C&&C.l(W),W.forEach(D),f=H(L),g=O(L,"DIV",{class:!0});var A=R(g);p=O(A,"SPAN",{class:!0});var N=R(p);m=$(N,"↑ "),_=$(N,b),N.forEach(D),v=H(A),x=O(A,"SPAN",{class:!0});var Y=R(x);y=$(Y,"↓ "),M=$(Y,w),Y.forEach(D),A.forEach(D),S=H(L),L.forEach(D),this.h()},h(){E(s,"class","text-sm font-medium text-gray-800 dark:text-gray-200"),E(r,"class",h="text-sm font-semibold "+(i[48].balance>=0?"text-green-600":"text-red-500")),E(e,"class","flex justify-between items-baseline mb-1.5"),E(u,"class","h-2 rounded-full bg-gray-100 dark:bg-gray-800 overflow-hidden flex gap-0.5"),E(p,"class","text-green-600 dark:text-green-400"),E(x,"class","text-red-500 dark:text-red-400"),E(g,"class","flex justify-between text-xs mt-1.5 text-gray-400")},m(P,L){Q(P,t,L),k(t,e),k(e,s),k(s,o),k(e,a),k(e,r),k(r,c),k(t,d),k(t,u),C&&C.m(u,null),k(t,f),k(t,g),k(g,p),k(p,m),k(p,_),k(g,v),k(g,x),k(x,y),k(x,M),k(t,S)},p(P,L){L[0]&1&&n!==(n=P[48].property_name+"")&&ot(o,n),L[0]&1&&l!==(l=P[21](P[48].balance)+"")&&ot(c,l),L[0]&1&&h!==(h="text-sm font-semibold "+(P[48].balance>=0?"text-green-600":"text-red-500"))&&E(r,"class",h),P[48].total_income>0||P[48].total_expense>0?C?C.p(gn(P),L):(C=Ya(gn(P)),C.c(),C.m(u,null)):C&&(C.d(1),C=null),L[0]&1&&b!==(b=P[21](P[48].total_income)+"")&&ot(_,b),L[0]&1&&w!==(w=P[21](P[48].total_expense)+"")&&ot(M,w)},d(P){P&&D(t),C&&C.d()}}}function Cf(i){let t,e=[],s=new Map,n,o,a="Voir toutes →",r=_t(i[7]);const l=c=>c[45].id;for(let c=0;ca[42].id;for(let a=0;ai[26].call(r)),E(d,"class","px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"),i[3]===void 0&&Js(()=>i[27].call(d)),E(f,"class","px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"),i[4]===void 0&&Js(()=>i[28].call(f)),E(p,"class","p-2 rounded-lg border border-gray-200 dark:border-gray-700 text-gray-500 hover:text-blue-600 hover:border-blue-300 transition-colors"),E(a,"class","flex items-center gap-3 flex-wrap"),E(e,"class","flex flex-wrap items-center justify-between gap-4 mb-6"),E(t,"class","p-6 max-w-6xl mx-auto")},m(A,N){Q(A,t,N),k(t,e),k(e,s),k(e,o),k(e,a),k(a,r),k(r,l);for(let Y=0;Y{J[et]=null}),el(),v=J[_],v?v.p(A,N):(v=J[_]=it[_](A),v.c()),Te(v,1),v.m(t,null))},i(A){x||(Te(m.$$.fragment,A),Te(v),x=!0)},o(A){Oe(m.$$.fragment,A),Oe(v),x=!1},d(A){A&&D(t),Le(S,A),Le(P,A),Le(F,A),Ze(m),J[_].d(),y=!1,Ka(w)}}}const If=i=>i.income===0&&i.expense===0;function Ff(i,t,e){let s,n,o,a,r,l,c;Jr(i,nl,V=>e(18,c=V)),jt.register(...mf);let h=[],d=[],u=[],f=[],g=[],p=!0,m="chart",b=new Date().getFullYear(),_="",v="";const x=Array.from({length:4},(V,G)=>new Date().getFullYear()-G),y=[{value:"",label:"Tous les mois"},{value:"1",label:"Janvier"},{value:"2",label:"Février"},{value:"3",label:"Mars"},{value:"4",label:"Avril"},{value:"5",label:"Mai"},{value:"6",label:"Juin"},{value:"7",label:"Juillet"},{value:"8",label:"Août"},{value:"9",label:"Septembre"},{value:"10",label:"Octobre"},{value:"11",label:"Novembre"},{value:"12",label:"Décembre"}];let w,M,S,C;const P=V=>Number(V||0).toLocaleString("fr-FR",{minimumFractionDigits:2})+" €",L=V=>new Date(V+"T00:00:00").toLocaleDateString("fr-FR",{day:"2-digit",month:"short"}),F=["Jan","Fév","Mar","Avr","Mai","Jun","Jul","Aoû","Sep","Oct","Nov","Déc"];Zr(async()=>{await sl(),await it()});async function it(){e(9,p=!0);const V=new Date,G=new Date(V.getFullYear(),V.getMonth(),1).toISOString().slice(0,10),q=new Date(V.getFullYear(),V.getMonth()+1,0).toISOString().slice(0,10),dt={year:b};_&&(dt.property_id=_),v&&(dt.month=v);const wt={year:b};_&&(wt.property_id=_),v&&(wt.month=v),e(0,[h,d,u,f,g]=await Promise.all([Ue.transactions.summary(dt),Ue.transactions.list({...wt}),Ue.calendar.list({from:G,to:q,..._?{property_id:_}:{}}),Ue.transactions.monthly({year:b,..._?{property_id:_}:{}}),Ue.transactions.categories({...dt,type:"expense"})]),h,e(7,d),e(1,u),e(8,f),e(2,g)),e(0,h=h||[]),e(7,d=(d||[]).slice(0,8)),e(1,u=u||[]),e(8,f=f||[]),e(2,g=g||[]),e(9,p=!1),await J()}async function J(){if(await new Promise(V=>setTimeout(V,50)),w){S&&S.destroy();const V=window.matchMedia("(prefers-color-scheme: dark)").matches,G=V?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.06)",q=V?"#9ca3af":"#6b7280";S=new jt(w,{type:"bar",data:{labels:F,datasets:[{label:"Revenus",data:f.map(dt=>dt.income),backgroundColor:"rgba(34,197,94,0.75)",borderRadius:5,borderSkipped:!1},{label:"Dépenses",data:f.map(dt=>dt.expense),backgroundColor:"rgba(239,68,68,0.7)",borderRadius:5,borderSkipped:!1}]},options:{responsive:!0,maintainAspectRatio:!1,plugins:{legend:{labels:{color:q,boxWidth:12,font:{size:12}}},tooltip:{callbacks:{label:dt=>` ${dt.dataset.label} : ${Number(dt.raw).toLocaleString("fr-FR",{minimumFractionDigits:2})} €`}}},scales:{x:{grid:{color:G},ticks:{color:q,font:{size:11}}},y:{grid:{color:G},ticks:{color:q,font:{size:11},callback:dt=>dt.toLocaleString("fr-FR")+" €"},beginAtZero:!0}}}})}if(m==="chart"&&M&&g.length>0){C&&C.destroy();const V=window.matchMedia("(prefers-color-scheme: dark)").matches,G=V?"#9ca3af":"#6b7280";C=new jt(M,{type:"doughnut",data:{labels:g.map(q=>q.category),datasets:[{data:g.map(q=>q.amount),backgroundColor:W.slice(0,g.length),borderWidth:2,borderColor:V?"#111827":"#ffffff"}]},options:{responsive:!0,maintainAspectRatio:!1,cutout:"65%",plugins:{legend:{position:"right",labels:{color:G,boxWidth:10,font:{size:11},padding:10}},tooltip:{callbacks:{label:q=>{const dt=q.dataset.data.reduce((ne,Ct)=>ne+Ct,0),wt=dt>0?(q.raw/dt*100).toFixed(1):0;return` ${Number(q.raw).toLocaleString("fr-FR",{minimumFractionDigits:2})} € (${wt}%)`}}}}}})}}const W=["#3b82f6","#ef4444","#f59e0b","#10b981","#8b5cf6","#ec4899","#06b6d4","#84cc16","#f97316","#6366f1"];async function A(V){e(10,m=V),V==="chart"&&(await new Promise(G=>setTimeout(G,50)),await J())}function N(){_=Zs(this),e(11,_)}function Y(){b=Zs(this),e(3,b),e(19,x)}function et(){v=Zs(this),e(4,v),e(20,y)}function B(V){lo[V?"unshift":"push"](()=>{w=V,e(12,w)})}const ht=()=>A("chart"),vt=()=>A("table");function kt(V){lo[V?"unshift":"push"](()=>{M=V,e(13,M)})}return i.$$.update=()=>{var V;i.$$.dirty[0]&1&&e(6,s=h.reduce((G,q)=>G+(q.total_income||0),0)),i.$$.dirty[0]&1&&e(5,n=h.reduce((G,q)=>G+(q.total_expense||0),0)),i.$$.dirty[0]&96&&e(17,o=s-n),i.$$.dirty[0]&4&&e(16,a=g.reduce((G,q)=>G+(q.amount||0),0)),i.$$.dirty[0]&2&&e(15,r=(()=>{const G=new Date,q=new Date(G.getFullYear(),G.getMonth()+1,0).getDate();let dt=0;for(let wt=1;wt<=q;wt++){const ne=`${G.getFullYear()}-${String(G.getMonth()+1).padStart(2,"0")}-${String(wt).padStart(2,"0")}`;u.some(Ct=>ne>=Ct.start_date&&ne0?Math.round(dt/q*100):0})()),i.$$.dirty[0]&24&&e(14,l=v?`${(V=y.find(G=>G.value===v))==null?void 0:V.label} ${b}`:String(b))},[h,u,g,b,v,n,s,d,f,p,m,_,w,M,l,r,a,o,c,x,y,P,L,it,W,A,N,Y,et,B,ht,vt,kt]}class $f extends Qr{constructor(t){super(),tl(this,t,Ff,Rf,Gr,{},null,[-1,-1,-1])}}export{$f as component}; diff --git a/web/build/_app/immutable/nodes/3.DMsI14gA.js b/web/build/_app/immutable/nodes/3.DMsI14gA.js deleted file mode 100644 index e5941ef..0000000 --- a/web/build/_app/immutable/nodes/3.DMsI14gA.js +++ /dev/null @@ -1 +0,0 @@ -import{s as Et,a as rt,e as ft,b as Xt,u as Gt,g as Kt,d as Qt,r as Zt,f as er,o as ar,n as sr}from"../chunks/DHedsUi_.js";import{S as Dt,i as Ct,k as Ae,l as me,m as de,n as Oe,o as Me,p as Be,d as c,x as ct,A as gt,s as ye,q as nr,a as ne,b as n,r as ce,u as f,z as Ce,c as u,e as g,g as k,v as ve,f as U,w as ht,h as d,j as x,t as q,D as or,B as jt,y as ir}from"../chunks/G8UKEBBn.js";import{I as tr,g as rr,a as lr,e as qe}from"../chunks/C1tDbyYL.js";import{a as wt}from"../chunks/DjUyxgK6.js";import{C as ur}from"../chunks/B9ru2HtO.js";import{R as dr}from"../chunks/Db8cSFEn.js";import{P as cr}from"../chunks/CLS07P5K.js";import{X as fr}from"../chunks/C_l6I72z.js";import{C as gr}from"../chunks/zQrtb5Kq.js";function hr(l){let e;const t=l[2].default,r=Xt(t,l,l[3],null);return{c(){r&&r.c()},l(a){r&&r.l(a)},m(a,s){r&&r.m(a,s),e=!0},p(a,s){r&&r.p&&(!e||s&8)&&Gt(r,t,a,a[3],e?Qt(t,a[3],s,null):Kt(a[3]),null)},i(a){e||(de(r,a),e=!0)},o(a){me(r,a),e=!1},d(a){r&&r.d(a)}}}function _r(l){let e,t;const r=[{name:"chevron-left"},l[1],{iconNode:l[0]}];let a={$$slots:{default:[hr]},$$scope:{ctx:l}};for(let s=0;s{t(1,e=rt(rt({},e),ft(i))),"$$scope"in i&&t(3,a=i.$$scope)},e=ft(e),[s,e,r,a]}class br extends Dt{constructor(e){super(),Ct(this,e,pr,_r,Et,{})}}function mr(l){let e;const t=l[2].default,r=Xt(t,l,l[3],null);return{c(){r&&r.c()},l(a){r&&r.l(a)},m(a,s){r&&r.m(a,s),e=!0},p(a,s){r&&r.p&&(!e||s&8)&&Gt(r,t,a,a[3],e?Qt(t,a[3],s,null):Kt(a[3]),null)},i(a){e||(de(r,a),e=!0)},o(a){me(r,a),e=!1},d(a){r&&r.d(a)}}}function vr(l){let e,t;const r=[{name:"chevron-right"},l[1],{iconNode:l[0]}];let a={$$slots:{default:[mr]},$$scope:{ctx:l}};for(let s=0;s{t(1,e=rt(rt({},e),ft(i))),"$$scope"in i&&t(3,a=i.$$scope)},e=ft(e),[s,e,r,a]}class kr extends Dt{constructor(e){super(),Ct(this,e,yr,vr,Et,{})}}function At(l,e,t){const r=l.slice();return r[38]=e[t],r}function Ot(l,e,t){const r=l.slice();r[41]=e[t],r[45]=t;const a=r[4][r[41]]??null;r[42]=a;const s=!!r[42];return r[43]=s,r}function Mt(l,e,t){const r=l.slice();return r[46]=e[t],r}function Bt(l,e,t){const r=l.slice();return r[38]=e[t],r}function Lt(l){let e,t;return{c(){e=d("p"),t=q(l[11]),this.h()},l(r){e=u(r,"P",{class:!0});var a=g(e);t=U(a,l[11]),a.forEach(c),this.h()},h(){f(e,"class","text-sm text-green-600 dark:text-green-400 mb-3")},m(r,a){ne(r,e,a),n(e,t)},p(r,a){a[0]&2048&&ye(t,r[11])},d(r){r&&c(e)}}}function zt(l){let e,t;return{c(){e=d("p"),t=q(l[12]),this.h()},l(r){e=u(r,"P",{class:!0});var a=g(e);t=U(a,l[12]),a.forEach(c),this.h()},h(){f(e,"class","text-sm text-red-500 dark:text-red-400 mb-3")},m(r,a){ne(r,e,a),n(e,t)},p(r,a){a[0]&4096&&ye(t,r[12])},d(r){r&&c(e)}}}function Ut(l){let e,t=l[38].name+"",r,a;return{c(){e=d("option"),r=q(t),this.h()},l(s){e=u(s,"OPTION",{});var i=g(e);r=U(i,t),i.forEach(c),this.h()},h(){e.__value=a=l[38].id,Ce(e,e.__value)},m(s,i){ne(s,e,i),n(e,r)},p(s,i){i[0]&32&&t!==(t=s[38].name+"")&&ye(r,t),i[0]&32&&a!==(a=s[38].id)&&(e.__value=a,Ce(e,e.__value))},d(s){s&&c(e)}}}function qt(l){let e,t=l[46]+"",r;return{c(){e=d("div"),r=q(t),this.h()},l(a){e=u(a,"DIV",{class:!0});var s=g(e);r=U(s,t),s.forEach(c),this.h()},h(){f(e,"class","py-3 text-center text-xs font-medium text-gray-400 dark:text-gray-500")},m(a,s){ne(a,e,s),n(e,r)},p:sr,d(a){a&&c(e)}}}function Ft(l){let e,t=l[41]+"",r,a,s,i=l[42]&&l[42].start_date===`${l[0]}-${String(l[1]+1).padStart(2,"0")}-${String(l[41]).padStart(2,"0")}`,S,D=i&&Jt(l);return{c(){e=d("span"),r=q(t),s=x(),D&&D.c(),S=ht(),this.h()},l(h){e=u(h,"SPAN",{class:!0});var p=g(e);r=U(p,t),p.forEach(c),s=k(h),D&&D.l(h),S=ht(),this.h()},h(){f(e,"class",a="text-xs font-medium "+(l[20](l[41])?"bg-blue-600 text-white w-6 h-6 flex items-center justify-center rounded-full":"text-gray-700 dark:text-gray-300"))},m(h,p){ne(h,e,p),n(e,r),ne(h,s,p),D&&D.m(h,p),ne(h,S,p)},p(h,p){p[0]&32768&&t!==(t=h[41]+"")&&ye(r,t),p[0]&32768&&a!==(a="text-xs font-medium "+(h[20](h[41])?"bg-blue-600 text-white w-6 h-6 flex items-center justify-center rounded-full":"text-gray-700 dark:text-gray-300"))&&f(e,"class",a),p[0]&32787&&(i=h[42]&&h[42].start_date===`${h[0]}-${String(h[1]+1).padStart(2,"0")}-${String(h[41]).padStart(2,"0")}`),i?D?D.p(h,p):(D=Jt(h),D.c(),D.m(S.parentNode,S)):D&&(D.d(1),D=null)},d(h){h&&(c(e),c(s),c(S)),D&&D.d(h)}}}function Jt(l){let e,t=(l[42].title||(l[42].source==="airbnb"?"Airbnb":"Locataire"))+"",r,a;return{c(){e=d("div"),r=q(t),this.h()},l(s){e=u(s,"DIV",{class:!0});var i=g(e);r=U(i,t),i.forEach(c),this.h()},h(){f(e,"class",a="mt-1 text-xs px-1.5 py-0.5 rounded font-medium truncate "+(l[42].source==="airbnb"?"bg-orange-200 text-orange-800 dark:bg-orange-900 dark:text-orange-200":"bg-blue-200 text-blue-800 dark:bg-blue-900 dark:text-blue-200"))},m(s,i){ne(s,e,i),n(e,r)},p(s,i){i[0]&32784&&t!==(t=(s[42].title||(s[42].source==="airbnb"?"Airbnb":"Locataire"))+"")&&ye(r,t),i[0]&32784&&a!==(a="mt-1 text-xs px-1.5 py-0.5 rounded font-medium truncate "+(s[42].source==="airbnb"?"bg-orange-200 text-orange-800 dark:bg-orange-900 dark:text-orange-200":"bg-blue-200 text-blue-800 dark:bg-blue-900 dark:text-blue-200"))&&f(e,"class",a)},d(s){s&&c(e)}}}function Ht(l){let e,t,r,a=l[41]&&Ft(l);return{c(){e=d("div"),a&&a.c(),t=x(),this.h()},l(s){e=u(s,"DIV",{class:!0});var i=g(e);a&&a.l(i),t=k(i),i.forEach(c),this.h()},h(){f(e,"class",r="border-b border-r border-gray-50 dark:border-gray-800/50 min-h-[72px] p-2 relative "+(l[41]?"":"bg-gray-50/50 dark:bg-gray-800/20")+" "+(l[43]?l[42].source==="airbnb"?"bg-orange-50 dark:bg-orange-950/30":"bg-blue-50 dark:bg-blue-950/30":""))},m(s,i){ne(s,e,i),a&&a.m(e,null),n(e,t)},p(s,i){s[41]?a?a.p(s,i):(a=Ft(s),a.c(),a.m(e,t)):a&&(a.d(1),a=null),i[0]&32784&&r!==(r="border-b border-r border-gray-50 dark:border-gray-800/50 min-h-[72px] p-2 relative "+(s[41]?"":"bg-gray-50/50 dark:bg-gray-800/20")+" "+(s[43]?s[42].source==="airbnb"?"bg-orange-50 dark:bg-orange-950/30":"bg-blue-50 dark:bg-blue-950/30":""))&&f(e,"class",r)},d(s){s&&c(e),a&&a.d()}}}function Rt(l){let e,t,r,a,s="Ajouter une période d'occupation",i,S,D,h,p,B,F,R,L="Bien *",C,m,Y,V="Sélectionner...",te,J,N,oe="Intitulé",Le,re,H,$,j,fe,ge="Arrivée *",Ie,le,$e,ie,he,ke="Départ *",_e,ue,K,w,I,ae="Annuler",A,v,z,Fe,xe,Je,He;D=new fr({props:{size:18}});let O=l[8]&&Yt(l),se=qe(l[5]),T=[];for(let y=0;yl[29].call(m)),f(N,"class","block text-xs font-medium text-gray-500 mb-1"),f(re,"placeholder","Ex: Famille Dupont"),f(re,"class","w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"),f(fe,"class","block text-xs font-medium text-gray-500 mb-1"),f(le,"type","date"),f(le,"class","w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"),f(he,"class","block text-xs font-medium text-gray-500 mb-1"),f(ue,"type","date"),f(ue,"class","w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"),f($,"class","grid grid-cols-2 gap-4"),f(p,"class","px-6 py-5 space-y-4"),f(I,"class","px-4 py-2 text-sm text-gray-600 dark:text-gray-400"),f(v,"class","flex items-center gap-2 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg text-sm font-medium transition-colors"),f(w,"class","flex justify-end gap-3 px-6 py-4 border-t border-gray-100 dark:border-gray-800"),f(t,"class","bg-white dark:bg-gray-900 rounded-2xl w-full max-w-md shadow-xl border border-gray-100 dark:border-gray-800"),f(e,"class","fixed inset-0 bg-black/40 flex items-center justify-center z-50 p-4")},m(y,Q){ne(y,e,Q),n(e,t),n(t,r),n(r,a),n(r,i),n(r,S),Oe(D,S,null),n(t,h),n(t,p),O&&O.m(p,null),n(p,B),n(p,F),n(F,R),n(F,C),n(F,m),n(m,Y);for(let E=0;El[27].call(N)),f($,"class","p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-600 dark:text-gray-400 transition-colors"),f(ge,"class","text-base font-semibold text-gray-900 dark:text-white w-36 text-center"),f(ke,"class","p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-600 dark:text-gray-400 transition-colors"),f(H,"class","flex items-center gap-2 ml-auto"),f(J,"class","flex flex-wrap items-center gap-3 mb-5"),f(I,"class","text-xs text-gray-500 dark:text-gray-400"),f(xe,"class","text-sm font-normal text-gray-400"),f(v,"class","text-2xl font-semibold text-gray-900 dark:text-white mt-1"),f(w,"class","bg-white dark:bg-gray-900 rounded-xl p-4 border border-gray-100 dark:border-gray-800"),f(T,"class","text-xs text-gray-500 dark:text-gray-400"),f(E,"class","text-2xl font-semibold text-gray-900 dark:text-white mt-1"),f(se,"class","bg-white dark:bg-gray-900 rounded-xl p-4 border border-gray-100 dark:border-gray-800"),f(Se,"class","text-xs text-gray-500 dark:text-gray-400"),f(Te,"class","text-2xl font-semibold text-gray-900 dark:text-white mt-1"),f(pe,"class","bg-white dark:bg-gray-900 rounded-xl p-4 border border-gray-100 dark:border-gray-800"),f(K,"class","grid grid-cols-3 gap-3 mb-5"),f(Ne,"class","grid grid-cols-7 border-b border-gray-100 dark:border-gray-800"),f(Ye,"class","grid grid-cols-7"),f(De,"class","bg-white dark:bg-gray-900 rounded-xl border border-gray-100 dark:border-gray-800 overflow-hidden"),f(We,"class","flex gap-4 mt-3 text-xs text-gray-500 dark:text-gray-400"),f(e,"class","p-6 max-w-5xl mx-auto")},m(o,b){ne(o,e,b),n(e,t),n(t,r),Oe(a,r,null),n(r,s),n(r,i),n(t,D),n(t,h),n(h,p),Oe(B,p,null),n(p,F),n(h,R),n(h,L),Oe(C,L,null),n(L,m),n(e,Y),Z&&Z.m(e,null),n(e,V),ee&&ee.m(e,null),n(e,te),n(e,J),n(J,N),n(N,oe);for(let P=0;P{M=null}),nr())},i(o){Ve||(de(a.$$.fragment,o),de(B.$$.fragment,o),de(C.$$.fragment,o),de(j.$$.fragment,o),de(_e.$$.fragment,o),de(M),Ve=!0)},o(o){me(a.$$.fragment,o),me(B.$$.fragment,o),me(C.$$.fragment,o),me(j.$$.fragment,o),me(_e.$$.fragment,o),me(M),Ve=!1},d(o){o&&(c(e),c(lt),c(Ge)),Ae(a),Ae(B),Ae(C),Z&&Z.d(),ee&&ee.d(),ct(W,o),Ae(j),Ae(_e),ct(X,o),ct(G,o),M&&M.d(o),bt=!1,Zt(St)}}}function wr(l,e,t){let r,a,s,i,S,D,h=[],p=[],B="",F=!1,R="",L=new Date,C=L.getFullYear(),m=L.getMonth();const Y=()=>({property_id:"",title:"",start_date:L.toISOString().slice(0,10),end_date:L.toISOString().slice(0,10),notes:""});let V=Y();ar(async()=>{t(5,h=await wt.properties.list()||[]),await te()});async function te(){const w=`${C}-${String(m+1).padStart(2,"0")}-01`,I=new Date(C,m+1,0).getDate(),ae=`${C}-${String(m+1).padStart(2,"0")}-${I}`,A={from:w,to:ae};B&&(A.property_id=B),t(25,p=await wt.calendar.list(A)||[])}function J(){m===0?(t(1,m=11),t(0,C--,C)):t(1,m--,m),te()}function N(){m===11?(t(1,m=0),t(0,C++,C)):t(1,m++,m),te()}function oe(w){return w===L.getDate()&&m===L.getMonth()&&C===L.getFullYear()}const Le=["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],re=["Lun","Mar","Mer","Jeu","Ven","Sam","Dim"];let H=!1,$="",j="";async function fe(){t(10,H=!0),t(11,$=""),t(12,j="");try{const I=await(await fetch("/api/calendar/sync",{method:"POST",credentials:"include"})).json(),ae=I.reduce((v,z)=>v+(z.imported||0),0),A=I.filter(v=>v.error);A.length>0?t(12,j=A.map(v=>`${v.property}: ${v.error}`).join(" | ")):t(11,$=`${ae} événement(s) importé(s)`),await te()}catch(w){t(12,j="Erreur de synchronisation: "+w.message)}t(10,H=!1)}async function ge(){if(t(8,R=""),!V.property_id||!V.start_date||!V.end_date){t(8,R="Bien et dates requis.");return}try{await wt.calendar.createEvent(V),t(7,F=!1),await te()}catch(w){t(8,R=w.message)}}const Ie=()=>{t(7,F=!0),t(9,V=Y()),t(8,R="")};function le(){B=jt(this),t(6,B),t(5,h)}const $e=()=>t(7,F=!1);function ie(){V.property_id=jt(this),t(9,V),t(5,h)}function he(){V.title=this.value,t(9,V),t(5,h)}function ke(){V.start_date=this.value,t(9,V),t(5,h)}function _e(){V.end_date=this.value,t(9,V),t(5,h)}const ue=()=>t(7,F=!1),K=()=>t(7,F=!1);return l.$$.update=()=>{l.$$.dirty[0]&3&&t(15,r=(()=>{const w=new Date(C,m,1).getDay(),I=new Date(C,m+1,0).getDate(),ae=[],A=w===0?6:w-1;for(let v=0;v{const w={},I=`${C}-${String(m+1).padStart(2,"0")}`,ae=new Date(C,m+1,0).getDate();for(let A=1;A<=ae;A++){const v=`${I}-${String(A).padStart(2,"0")}`;w[A]=p.find(z=>v>=z.start_date&&(z.source==="airbnb"?v0?Math.round(s/i*100):0),l.$$.dirty[0]&33554435&&t(13,D=(()=>{const w=`${C}-${String(m+1).padStart(2,"0")}`;return p.filter(I=>I.start_date.startsWith(w)).length})())},[C,m,i,s,a,h,B,F,R,V,H,$,j,D,S,r,Y,te,J,N,oe,Le,re,fe,ge,p,Ie,le,$e,ie,he,ke,_e,ue,K]}class $r extends Dt{constructor(e){super(),Ct(this,e,wr,xr,Et,{},null,[-1,-1])}}export{$r as component}; diff --git a/web/build/_app/immutable/nodes/4.CoOqOv0Y.js b/web/build/_app/immutable/nodes/4.CoOqOv0Y.js deleted file mode 100644 index 075bd67..0000000 --- a/web/build/_app/immutable/nodes/4.CoOqOv0Y.js +++ /dev/null @@ -1,7 +0,0 @@ -import{s as We,o as Ye,n as re,r as Ve}from"../chunks/DHedsUi_.js";import{S as Ze,i as et,d as f,k as ae,l as j,m as S,q as fe,a as R,b as a,n as ne,r as Z,u as p,c as m,e as v,o as oe,g as V,v as se,f as G,w as ge,h as b,p as ie,j as P,t as J,x as tt,s as ce,y as he,z as Ce}from"../chunks/G8UKEBBn.js";import{e as be,u as Ge,o as Je}from"../chunks/C1tDbyYL.js";import{a as $e}from"../chunks/DjUyxgK6.js";import{T as rt}from"../chunks/C7zepb3B.js";import{P as lt}from"../chunks/CLS07P5K.js";import{X as st}from"../chunks/C_l6I72z.js";import{C as at}from"../chunks/zQrtb5Kq.js";import{A as nt}from"../chunks/eC_GsYA7.js";import{P as Ke}from"../chunks/C_K4PjIw.js";import{T as Qe}from"../chunks/7MWtQ_HQ.js";function ze(u,e,t){const r=u.slice();return r[29]=e[t],r[31]=t,r}function Oe(u,e,t){const r=u.slice();return r[29]=e[t],r[31]=t,r}function ot(u,e,t){const r=u.slice();return r[26]=e[t],r}function it(u){let e,t,r,l,o=u[5].length+"",h,n,s,c,x,d,B,k,D,L,$,C=u[6].length+"",U,z,I,M,y,_,T;const q=[dt,ut],g=[];function i(w,A){return w[5].length===0?0:1}x=i(u),d=g[x]=q[x](u);const E=[ht,ft],N=[];function W(w,A){return w[6].length===0?0:1}return y=W(u),_=N[y]=E[y](u),{c(){e=b("div"),t=b("h2"),r=b("span"),l=J(`\r - Dépenses (`),h=J(o),n=J(")"),s=P(),c=b("div"),d.c(),B=P(),k=b("div"),D=b("h2"),L=b("span"),$=J(`\r - Revenus (`),U=J(C),z=J(")"),I=P(),M=b("div"),_.c(),this.h()},l(w){e=m(w,"DIV",{class:!0});var A=v(e);t=m(A,"H2",{class:!0});var F=v(t);r=m(F,"SPAN",{class:!0}),v(r).forEach(f),l=G(F,`\r - Dépenses (`),h=G(F,o),n=G(F,")"),F.forEach(f),s=V(A),c=m(A,"DIV",{class:!0});var ee=v(c);d.l(ee),ee.forEach(f),A.forEach(f),B=V(w),k=m(w,"DIV",{});var Y=v(k);D=m(Y,"H2",{class:!0});var K=v(D);L=m(K,"SPAN",{class:!0}),v(L).forEach(f),$=G(K,`\r - Revenus (`),U=G(K,C),z=G(K,")"),K.forEach(f),I=V(Y),M=m(Y,"DIV",{class:!0});var _e=v(M);_.l(_e),_e.forEach(f),Y.forEach(f),this.h()},h(){p(r,"class","w-2 h-2 rounded-full bg-red-400 inline-block"),p(t,"class","text-xs font-semibold text-gray-400 dark:text-gray-500 uppercase tracking-wider mb-2 flex items-center gap-2"),p(c,"class","bg-white dark:bg-gray-900 rounded-xl border border-gray-100 dark:border-gray-800 overflow-hidden"),p(e,"class","mb-6"),p(L,"class","w-2 h-2 rounded-full bg-green-400 inline-block"),p(D,"class","text-xs font-semibold text-gray-400 dark:text-gray-500 uppercase tracking-wider mb-2 flex items-center gap-2"),p(M,"class","bg-white dark:bg-gray-900 rounded-xl border border-gray-100 dark:border-gray-800 overflow-hidden")},m(w,A){R(w,e,A),a(e,t),a(t,r),a(t,l),a(t,h),a(t,n),a(e,s),a(e,c),g[x].m(c,null),R(w,B,A),R(w,k,A),a(k,D),a(D,L),a(D,$),a(D,U),a(D,z),a(k,I),a(k,M),N[y].m(M,null),T=!0},p(w,A){(!T||A[0]&32)&&o!==(o=w[5].length+"")&&ce(h,o);let F=x;x=i(w),x===F?g[x].p(w,A):(he(),j(g[F],1,1,()=>{g[F]=null}),fe(),d=g[x],d?d.p(w,A):(d=g[x]=q[x](w),d.c()),S(d,1),d.m(c,null)),(!T||A[0]&64)&&C!==(C=w[6].length+"")&&ce(U,C);let ee=y;y=W(w),y===ee?N[y].p(w,A):(he(),j(N[ee],1,1,()=>{N[ee]=null}),fe(),_=N[y],_?_.p(w,A):(_=N[y]=E[y](w),_.c()),S(_,1),_.m(M,null))},i(w){T||(S(d),S(_),T=!0)},o(w){j(d),j(_),T=!1},d(w){w&&(f(e),f(B),f(k)),g[x].d(),N[y].d()}}}function ct(u){let e,t=be([1,2,3]),r=[];for(let l=0;l<3;l+=1)r[l]=pt(ot(u,t,l));return{c(){e=b("div");for(let l=0;l<3;l+=1)r[l].c();this.h()},l(l){e=m(l,"DIV",{class:!0});var o=v(e);for(let h=0;h<3;h+=1)r[h].l(o);o.forEach(f),this.h()},h(){p(e,"class","space-y-2")},m(l,o){R(l,e,o);for(let h=0;h<3;h+=1)r[h]&&r[h].m(e,null)},p:re,i:re,o:re,d(l){l&&f(e),tt(r,l)}}}function ut(u){let e=[],t=new Map,r,l,o=be(u[5]);const h=n=>n[29].id;for(let n=0;n0?"border-t border-gray-50 dark:border-gray-800":"")+" hover:bg-gray-50 dark:hover:bg-gray-800/50 transition-colors"),this.first=t},m(g,i){R(g,t,i),a(t,r),a(r,l),a(l,o),a(o,n),a(l,s),y&&y.m(l,null),a(r,c),_&&_.m(r,null),a(t,x),a(t,d),a(d,B),ne(k,B,null),a(d,D),a(d,L),ne($,L,null),a(t,C),z=!0,I||(M=[Z(B,"click",T),Z(L,"click",q)],I=!0)},p(g,i){e=g,(!z||i[0]&32)&&h!==(h=e[29].name+"")&&ce(n,h),e[29].tax_deductible?y||(y=Se(),y.c(),y.m(l,null)):y&&(y.d(1),y=null),e[29].description?_?_.p(e,i):(_=Me(e),_.c(),_.m(r,null)):_&&(_.d(1),_=null),(!z||i[0]&32&&U!==(U="flex items-center gap-4 px-4 py-3 "+(e[31]>0?"border-t border-gray-50 dark:border-gray-800":"")+" hover:bg-gray-50 dark:hover:bg-gray-800/50 transition-colors"))&&p(t,"class",U)},i(g){z||(S(k.$$.fragment,g),S($.$$.fragment,g),z=!0)},o(g){j(k.$$.fragment,g),j($.$$.fragment,g),z=!1},d(g){g&&f(t),y&&y.d(),_&&_.d(),ae(k),ae($),I=!1,Ve(M)}}}function ft(u){let e=[],t=new Map,r,l,o=be(u[6]);const h=n=>n[29].id;for(let n=0;n0?"border-t border-gray-50 dark:border-gray-800":"")+" hover:bg-gray-50 dark:hover:bg-gray-800/50 transition-colors"),this.first=t},m(_,T){R(_,t,T),a(t,r),a(r,l),a(l,h),a(r,n),I&&I.m(r,null),a(t,s),a(t,c),a(c,x),ne(d,x,null),a(c,B),a(c,k),ne(D,k,null),a(t,L),C=!0,U||(z=[Z(x,"click",M),Z(k,"click",y)],U=!0)},p(_,T){e=_,(!C||T[0]&64)&&o!==(o=e[29].name+"")&&ce(h,o),e[29].description?I?I.p(e,T):(I=He(e),I.c(),I.m(r,null)):I&&(I.d(1),I=null),(!C||T[0]&64&&$!==($="flex items-center gap-4 px-4 py-3 "+(e[31]>0?"border-t border-gray-50 dark:border-gray-800":"")+" hover:bg-gray-50 dark:hover:bg-gray-800/50 transition-colors"))&&p(t,"class",$)},i(_){C||(S(d.$$.fragment,_),S(D.$$.fragment,_),C=!0)},o(_){j(d.$$.fragment,_),j(D.$$.fragment,_),C=!1},d(_){_&&f(t),I&&I.d(),ae(d),ae(D),U=!1,Ve(z)}}}function pt(u){let e;return{c(){e=b("div"),this.h()},l(t){e=m(t,"DIV",{class:!0}),v(e).forEach(f),this.h()},h(){p(e,"class","h-12 bg-gray-100 dark:bg-gray-800 rounded-lg animate-pulse")},m(t,r){R(t,e,r)},p:re,d(t){t&&f(e)}}}function qe(u){let e,t,r,l,o=u[2]?"Modifier la catégorie":"Nouvelle catégorie",h,n,s,c,x,d,B,k,D,L,$,C,U,z,I,M,y,_,T="Nom *",q,g,i,E,N,W="Description",w,A,F,ee,Y,K,_e="Annuler",Ie,le,de,Te,me=u[2]?"Enregistrer":"Créer",ve,ue,Ne,Pe;c=new st({props:{size:18}});let H=u[3]&&Fe(u),X=u[4].type==="expense"&&Xe(u);return de=new at({props:{size:15}}),{c(){e=b("div"),t=b("div"),r=b("div"),l=b("h2"),h=J(o),n=P(),s=b("button"),ie(c.$$.fragment),x=P(),d=b("div"),H&&H.c(),B=P(),k=b("div"),D=b("button"),L=J("Dépense"),C=P(),U=b("button"),z=J("Revenu"),M=P(),y=b("div"),_=b("label"),_.textContent=T,q=P(),g=b("input"),i=P(),E=b("div"),N=b("label"),N.textContent=W,w=P(),A=b("input"),F=P(),X&&X.c(),ee=P(),Y=b("div"),K=b("button"),K.textContent=_e,Ie=P(),le=b("button"),ie(de.$$.fragment),Te=P(),ve=J(me),this.h()},l(O){e=m(O,"DIV",{class:!0});var Q=v(e);t=m(Q,"DIV",{class:!0});var pe=v(t);r=m(pe,"DIV",{class:!0});var ke=v(r);l=m(ke,"H2",{class:!0});var Ae=v(l);h=G(Ae,o),Ae.forEach(f),n=V(ke),s=m(ke,"BUTTON",{class:!0});var Be=v(s);oe(c.$$.fragment,Be),Be.forEach(f),ke.forEach(f),x=V(pe),d=m(pe,"DIV",{class:!0});var te=v(d);H&&H.l(te),B=V(te),k=m(te,"DIV",{class:!0});var ye=v(k);D=m(ye,"BUTTON",{class:!0});var Ue=v(D);L=G(Ue,"Dépense"),Ue.forEach(f),C=V(ye),U=m(ye,"BUTTON",{class:!0});var Le=v(U);z=G(Le,"Revenu"),Le.forEach(f),ye.forEach(f),M=V(te),y=m(te,"DIV",{});var xe=v(y);_=m(xe,"LABEL",{class:!0,"data-svelte-h":!0}),se(_)!=="svelte-7fss2u"&&(_.textContent=T),q=V(xe),g=m(xe,"INPUT",{placeholder:!0,class:!0}),xe.forEach(f),i=V(te),E=m(te,"DIV",{});var we=v(E);N=m(we,"LABEL",{class:!0,"data-svelte-h":!0}),se(N)!=="svelte-9nc6s8"&&(N.textContent=W),w=V(we),A=m(we,"INPUT",{placeholder:!0,class:!0}),we.forEach(f),F=V(te),X&&X.l(te),te.forEach(f),ee=V(pe),Y=m(pe,"DIV",{class:!0});var Ee=v(Y);K=m(Ee,"BUTTON",{class:!0,"data-svelte-h":!0}),se(K)!=="svelte-o47n25"&&(K.textContent=_e),Ie=V(Ee),le=m(Ee,"BUTTON",{class:!0});var De=v(le);oe(de.$$.fragment,De),Te=V(De),ve=G(De,me),De.forEach(f),Ee.forEach(f),pe.forEach(f),Q.forEach(f),this.h()},h(){p(l,"class","font-semibold text-gray-900 dark:text-white"),p(s,"class","text-gray-400 hover:text-gray-600 dark:hover:text-gray-200"),p(r,"class","flex items-center justify-between px-6 py-4 border-b border-gray-100 dark:border-gray-800"),p(D,"class",$="flex-1 py-2 text-sm font-medium transition-colors "+(u[4].type==="expense"?"bg-red-500 text-white":"text-gray-500 hover:bg-gray-50 dark:hover:bg-gray-800")),p(U,"class",I="flex-1 py-2 text-sm font-medium transition-colors "+(u[4].type==="income"?"bg-green-600 text-white":"text-gray-500 hover:bg-gray-50 dark:hover:bg-gray-800")),p(k,"class","flex rounded-lg border border-gray-200 dark:border-gray-700 overflow-hidden"),p(_,"class","block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1"),p(g,"placeholder","Ex: Charges copropriété"),p(g,"class","w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"),p(N,"class","block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1"),p(A,"placeholder","Description optionnelle..."),p(A,"class","w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"),p(d,"class","px-6 py-5 space-y-4"),p(K,"class","px-4 py-2 text-sm text-gray-600 dark:text-gray-400"),p(le,"class","flex items-center gap-2 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg text-sm font-medium transition-colors"),p(Y,"class","flex justify-end gap-3 px-6 py-4 border-t border-gray-100 dark:border-gray-800"),p(t,"class","bg-white dark:bg-gray-900 rounded-2xl w-full max-w-md shadow-xl border border-gray-100 dark:border-gray-800"),p(e,"class","fixed inset-0 bg-black/40 flex items-center justify-center z-50 p-4")},m(O,Q){R(O,e,Q),a(e,t),a(t,r),a(r,l),a(l,h),a(r,n),a(r,s),ne(c,s,null),a(t,x),a(t,d),H&&H.m(d,null),a(d,B),a(d,k),a(k,D),a(D,L),a(k,C),a(k,U),a(U,z),a(d,M),a(d,y),a(y,_),a(y,q),a(y,g),Ce(g,u[4].name),a(d,i),a(d,E),a(E,N),a(E,w),a(E,A),Ce(A,u[4].description),a(d,F),X&&X.m(d,null),a(t,ee),a(t,Y),a(Y,K),a(Y,Ie),a(Y,le),ne(de,le,null),a(le,Te),a(le,ve),ue=!0,Ne||(Pe=[Z(s,"click",u[9]),Z(D,"click",u[17]),Z(U,"click",u[18]),Z(g,"input",u[19]),Z(A,"input",u[20]),Z(K,"click",u[9]),Z(le,"click",u[10])],Ne=!0)},p(O,Q){(!ue||Q[0]&4)&&o!==(o=O[2]?"Modifier la catégorie":"Nouvelle catégorie")&&ce(h,o),O[3]?H?(H.p(O,Q),Q[0]&8&&S(H,1)):(H=Fe(O),H.c(),S(H,1),H.m(d,B)):H&&(he(),j(H,1,1,()=>{H=null}),fe()),(!ue||Q[0]&16&&$!==($="flex-1 py-2 text-sm font-medium transition-colors "+(O[4].type==="expense"?"bg-red-500 text-white":"text-gray-500 hover:bg-gray-50 dark:hover:bg-gray-800")))&&p(D,"class",$),(!ue||Q[0]&16&&I!==(I="flex-1 py-2 text-sm font-medium transition-colors "+(O[4].type==="income"?"bg-green-600 text-white":"text-gray-500 hover:bg-gray-50 dark:hover:bg-gray-800")))&&p(U,"class",I),Q[0]&16&&g.value!==O[4].name&&Ce(g,O[4].name),Q[0]&16&&A.value!==O[4].description&&Ce(A,O[4].description),O[4].type==="expense"?X?X.p(O,Q):(X=Xe(O),X.c(),X.m(d,null)):X&&(X.d(1),X=null),(!ue||Q[0]&4)&&me!==(me=O[2]?"Enregistrer":"Créer")&&ce(ve,me)},i(O){ue||(S(c.$$.fragment,O),S(H),S(de.$$.fragment,O),ue=!0)},o(O){j(c.$$.fragment,O),j(H),j(de.$$.fragment,O),ue=!1},d(O){O&&f(e),ae(c),H&&H.d(),X&&X.d(),ae(de),Ne=!1,Ve(Pe)}}}function Fe(u){let e,t,r,l,o;return t=new nt({props:{size:13}}),{c(){e=b("div"),ie(t.$$.fragment),r=P(),l=J(u[3]),this.h()},l(h){e=m(h,"DIV",{class:!0});var n=v(e);oe(t.$$.fragment,n),r=V(n),l=G(n,u[3]),n.forEach(f),this.h()},h(){p(e,"class","flex items-center gap-2 text-sm px-3 py-2 rounded-lg bg-red-50 dark:bg-red-950/30 text-red-600 dark:text-red-400")},m(h,n){R(h,e,n),ne(t,e,null),a(e,r),a(e,l),o=!0},p(h,n){(!o||n[0]&8)&&ce(l,h[3])},i(h){o||(S(t.$$.fragment,h),o=!0)},o(h){j(t.$$.fragment,h),o=!1},d(h){h&&f(e),ae(t)}}}function Xe(u){let e,t,r,l,o='Déductible fiscalement

Apparaîtra en évidence dans l'export fiscal annuel

',h,n;return{c(){e=b("label"),t=b("input"),r=P(),l=b("div"),l.innerHTML=o,this.h()},l(s){e=m(s,"LABEL",{class:!0});var c=v(e);t=m(c,"INPUT",{type:!0,class:!0}),r=V(c),l=m(c,"DIV",{"data-svelte-h":!0}),se(l)!=="svelte-ydxft5"&&(l.innerHTML=o),c.forEach(f),this.h()},h(){p(t,"type","checkbox"),p(t,"class","w-4 h-4 rounded border-gray-300 text-blue-600 focus:ring-blue-500"),p(e,"class","flex items-center gap-3 cursor-pointer select-none")},m(s,c){R(s,e,c),a(e,t),t.checked=u[4].tax_deductible,a(e,r),a(e,l),h||(n=Z(t,"change",u[21]),h=!0)},p(s,c){c[0]&16&&(t.checked=s[4].tax_deductible)},d(s){s&&f(e),h=!1,n()}}}function gt(u){let e,t,r,l,o,h,n="Catégories",s,c,x,d,B,k,D=`Les catégories permettent de classer vos revenus et dépenses pour la comptabilité et la liasse fiscale.\r - Les catégories déductibles fiscalement sont signalées pour l'export annuel.`,L,$,C,U,z,I,M,y;l=new rt({props:{size:22,class:"text-gray-400"}}),x=new lt({props:{size:16}});const _=[ct,it],T=[];function q(i,E){return i[0]?0:1}$=q(u),C=T[$]=_[$](u);let g=u[1]&&qe(u);return{c(){e=b("div"),t=b("div"),r=b("div"),ie(l.$$.fragment),o=P(),h=b("h1"),h.textContent=n,s=P(),c=b("button"),ie(x.$$.fragment),d=J(" Nouvelle catégorie"),B=P(),k=b("p"),k.textContent=D,L=P(),C.c(),U=P(),g&&g.c(),z=ge(),this.h()},l(i){e=m(i,"DIV",{class:!0});var E=v(e);t=m(E,"DIV",{class:!0});var N=v(t);r=m(N,"DIV",{class:!0});var W=v(r);oe(l.$$.fragment,W),o=V(W),h=m(W,"H1",{class:!0,"data-svelte-h":!0}),se(h)!=="svelte-xkhe08"&&(h.textContent=n),W.forEach(f),s=V(N),c=m(N,"BUTTON",{class:!0});var w=v(c);oe(x.$$.fragment,w),d=G(w," Nouvelle catégorie"),w.forEach(f),N.forEach(f),B=V(E),k=m(E,"P",{class:!0,"data-svelte-h":!0}),se(k)!=="svelte-2k0fai"&&(k.textContent=D),L=V(E),C.l(E),E.forEach(f),U=V(i),g&&g.l(i),z=ge(),this.h()},h(){p(h,"class","text-2xl font-semibold text-gray-900 dark:text-white"),p(r,"class","flex items-center gap-3"),p(c,"class","flex items-center gap-2 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg text-sm font-medium transition-colors"),p(t,"class","flex items-center justify-between mb-6"),p(k,"class","text-sm text-gray-500 dark:text-gray-400 mb-6"),p(e,"class","p-6 max-w-4xl mx-auto")},m(i,E){R(i,e,E),a(e,t),a(t,r),ne(l,r,null),a(r,o),a(r,h),a(t,s),a(t,c),ne(x,c,null),a(c,d),a(e,B),a(e,k),a(e,L),T[$].m(e,null),R(i,U,E),g&&g.m(i,E),R(i,z,E),I=!0,M||(y=Z(c,"click",u[7]),M=!0)},p(i,E){let N=$;$=q(i),$===N?T[$].p(i,E):(he(),j(T[N],1,1,()=>{T[N]=null}),fe(),C=T[$],C?C.p(i,E):(C=T[$]=_[$](i),C.c()),S(C,1),C.m(e,null)),i[1]?g?(g.p(i,E),E[0]&2&&S(g,1)):(g=qe(i),g.c(),S(g,1),g.m(z.parentNode,z)):g&&(he(),j(g,1,1,()=>{g=null}),fe())},i(i){I||(S(l.$$.fragment,i),S(x.$$.fragment,i),S(C),S(g),I=!0)},o(i){j(l.$$.fragment,i),j(x.$$.fragment,i),j(C),j(g),I=!1},d(i){i&&(f(e),f(U),f(z)),ae(l),ae(x),T[$].d(),g&&g.d(i),M=!1,y()}}}function _t(u,e,t){let r,l,o=[],h=!0,n=!1,s=null,c="";const x=()=>({name:"",type:"expense",tax_deductible:!1,description:""});let d=x();Ye(B);async function B(){t(0,h=!0),t(12,o=await $e.categories.list()||[]),t(0,h=!1)}function k(){t(4,d=x()),t(2,s=null),t(1,n=!0),t(3,c="")}function D(i){t(4,d={...i}),t(2,s=i.id),t(1,n=!0),t(3,c="")}function L(){t(1,n=!1),t(3,c="")}async function $(){if(t(3,c=""),!d.name){t(3,c="Le nom est requis.");return}try{s?await $e.categories.update(s,d):await $e.categories.create(d),t(1,n=!1),await B()}catch(i){t(3,c=i.message)}}async function C(i,E){confirm(`Supprimer la catégorie "${E}" ? -Les transactions associées perdront leur catégorie.`)&&(await $e.categories.delete(i),await B())}const U=i=>D(i),z=i=>C(i.id,i.name),I=i=>D(i),M=i=>C(i.id,i.name),y=()=>t(4,d.type="expense",d),_=()=>t(4,d.type="income",d);function T(){d.name=this.value,t(4,d)}function q(){d.description=this.value,t(4,d)}function g(){d.tax_deductible=this.checked,t(4,d)}return u.$$.update=()=>{u.$$.dirty[0]&4096&&t(6,r=o.filter(i=>i.type==="income")),u.$$.dirty[0]&4096&&t(5,l=o.filter(i=>i.type==="expense"))},[h,n,s,c,d,l,r,k,D,L,$,C,o,U,z,I,M,y,_,T,q,g]}class It extends Ze{constructor(e){super(),et(this,e,_t,gt,We,{},null,[-1,-1])}}export{It as component}; diff --git a/web/build/_app/immutable/nodes/5.DZw7u2fg.js b/web/build/_app/immutable/nodes/5.DZw7u2fg.js deleted file mode 100644 index 3d8693e..0000000 --- a/web/build/_app/immutable/nodes/5.DZw7u2fg.js +++ /dev/null @@ -1 +0,0 @@ -import{s as ut,a as Xe,e as tt,b as qt,u as Gt,g as Kt,d as Rt,r as Zt,f as Be,o as Xt,n as De,i as el}from"../chunks/DHedsUi_.js";import{S as ft,i as _t,k as Fe,l as ee,m as Y,n as $e,o as Le,p as Ae,d as f,x as Oe,A as de,z as oe,q as lt,u as b,a as $,b as c,r as U,E as xt,c as h,e as y,g as T,v as Ee,h as g,j as I,s as Ie,f as ce,t as ue,y as rt,w as Ct,B as He}from"../chunks/G8UKEBBn.js";import{I as Jt,g as Qt,a as Wt,e as j,u as tl,o as ll}from"../chunks/C1tDbyYL.js";import{a as We}from"../chunks/DjUyxgK6.js";import{F as rl}from"../chunks/CNY58Upt.js";import{U as nl}from"../chunks/Betcpvy2.js";import{D as ol}from"../chunks/BojKV9te.js";import{T as al}from"../chunks/7MWtQ_HQ.js";const sl=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function il(n){let e;const t=n[2].default,l=qt(t,n,n[3],null);return{c(){l&&l.c()},l(r){l&&l.l(r)},m(r,a){l&&l.m(r,a),e=!0},p(r,a){l&&l.p&&(!e||a&8)&&Gt(l,t,r,r[3],e?Rt(t,r[3],a,null):Kt(r[3]),null)},i(r){e||(Y(l,r),e=!0)},o(r){ee(l,r),e=!1},d(r){l&&l.d(r)}}}function cl(n){let e,t;const l=[{name:"archive"},n[1],{iconNode:n[0]}];let r={$$slots:{default:[il]},$$scope:{ctx:n}};for(let a=0;a{t(1,e=Xe(Xe({},e),tt(o))),"$$scope"in o&&t(3,r=o.$$scope)},e=tt(e),[a,e,l,r]}class fl extends ft{constructor(e){super(),_t(this,e,ul,cl,ut,{})}}function _l(n){let e;const t=n[2].default,l=qt(t,n,n[3],null);return{c(){l&&l.c()},l(r){l&&l.l(r)},m(r,a){l&&l.m(r,a),e=!0},p(r,a){l&&l.p&&(!e||a&8)&&Gt(l,t,r,r[3],e?Rt(t,r[3],a,null):Kt(r[3]),null)},i(r){e||(Y(l,r),e=!0)},o(r){ee(l,r),e=!1},d(r){l&&l.d(r)}}}function dl(n){let e,t;const l=[{name:"folder-open"},n[1],{iconNode:n[0]}];let r={$$slots:{default:[_l]},$$scope:{ctx:n}};for(let a=0;a{t(1,e=Xe(Xe({},e),tt(o))),"$$scope"in o&&t(3,r=o.$$scope)},e=tt(e),[a,e,l,r]}class gl extends ft{constructor(e){super(),_t(this,e,hl,dl,ut,{})}}const{Boolean:pl}=sl;function Tt(n,e,t){const l=n.slice();return l[44]=e[t][0],l[45]=e[t][1],l}function It(n,e,t){const l=n.slice();return l[48]=e[t],l[50]=t,l}function bl(n,e,t){const l=n.slice();return l[41]=e[t],l}function Dt(n,e,t){const l=n.slice();return l[51]=e[t],l}function Pt(n,e,t){const l=n.slice();return l[54]=e[t],l}function Nt(n,e,t){const l=n.slice();return l[57]=e[t],l}function Ot(n,e,t){const l=n.slice();return l[54]=e[t],l}function St(n,e,t){const l=n.slice();return l[57]=e[t],l}function Vt(n,e,t){const l=n.slice();return l[54]=e[t],l}function zt(n,e,t){const l=n.slice();return l[57]=e[t],l}function Ft(n){let e,t=n[57].name+"",l,r;return{c(){e=g("option"),l=ue(t),this.h()},l(a){e=h(a,"OPTION",{});var o=y(e);l=ce(o,t),o.forEach(f),this.h()},h(){e.__value=r=n[57].id,oe(e,e.__value)},m(a,o){$(a,e,o),c(e,l)},p(a,o){o[0]&2&&t!==(t=a[57].name+"")&&Ie(l,t),o[0]&2&&r!==(r=a[57].id)&&(e.__value=r,oe(e,e.__value))},d(a){a&&f(e)}}}function $t(n){let e,t=n[54]+"",l;return{c(){e=g("option"),l=ue(t),this.h()},l(r){e=h(r,"OPTION",{});var a=y(e);l=ce(a,t),a.forEach(f),this.h()},h(){e.__value=n[54],oe(e,e.__value)},m(r,a){$(r,e,a),c(e,l)},p:De,d(r){r&&f(e)}}}function Lt(n){let e,t=n[57].name+"",l,r;return{c(){e=g("option"),l=ue(t),this.h()},l(a){e=h(a,"OPTION",{});var o=y(e);l=ce(o,t),o.forEach(f),this.h()},h(){e.__value=r=n[57].id,oe(e,e.__value)},m(a,o){$(a,e,o),c(e,l)},p(a,o){o[0]&2&&t!==(t=a[57].name+"")&&Ie(l,t),o[0]&2&&r!==(r=a[57].id)&&(e.__value=r,oe(e,e.__value))},d(a){a&&f(e)}}}function At(n){let e,t,l=n[54]+"",r;return{c(){e=g("option"),t=ue("Année "),r=ue(l),this.h()},l(a){e=h(a,"OPTION",{});var o=y(e);t=ce(o,"Année "),r=ce(o,l),o.forEach(f),this.h()},h(){e.__value=n[54],oe(e,e.__value)},m(a,o){$(a,e,o),c(e,t),c(e,r)},p:De,d(a){a&&f(e)}}}function Ut(n){let e,t;return{c(){e=g("p"),t=ue(n[4]),this.h()},l(l){e=h(l,"P",{class:!0});var r=y(e);t=ce(r,n[4]),r.forEach(f),this.h()},h(){b(e,"class","text-red-500 text-sm mb-3")},m(l,r){$(l,e,r),c(e,t)},p(l,r){r[0]&16&&Ie(t,l[4])},d(l){l&&f(e)}}}function ml(n){let e,t,l,r='Glissez vos fichiers ici ou cliquez pour choisir',a,o,u="PDF, images, tableurs acceptés",d;return e=new nl({props:{size:24,class:"mx-auto mb-2 text-gray-300 dark:text-gray-600"}}),{c(){Ae(e.$$.fragment),t=I(),l=g("p"),l.innerHTML=r,a=I(),o=g("p"),o.textContent=u,this.h()},l(_){Le(e.$$.fragment,_),t=T(_),l=h(_,"P",{class:!0,"data-svelte-h":!0}),Ee(l)!=="svelte-4vcs0z"&&(l.innerHTML=r),a=T(_),o=h(_,"P",{class:!0,"data-svelte-h":!0}),Ee(o)!=="svelte-1k4zvv4"&&(o.textContent=u),this.h()},h(){b(l,"class","text-sm text-gray-500 dark:text-gray-400"),b(o,"class","text-xs text-gray-400 dark:text-gray-500 mt-1")},m(_,x){$e(e,_,x),$(_,t,x),$(_,l,x),$(_,a,x),$(_,o,x),d=!0},i(_){d||(Y(e.$$.fragment,_),d=!0)},o(_){ee(e.$$.fragment,_),d=!1},d(_){_&&(f(t),f(l),f(a),f(o)),Fe(e,_)}}}function vl(n){let e,t="⏳ Upload en cours...";return{c(){e=g("div"),e.textContent=t,this.h()},l(l){e=h(l,"DIV",{class:!0,"data-svelte-h":!0}),Ee(e)!=="svelte-15ydiq4"&&(e.textContent=t),this.h()},h(){b(e,"class","text-blue-600 dark:text-blue-400 text-sm")},m(l,r){$(l,e,r)},i:De,o:De,d(l){l&&f(e)}}}function jt(n){let e,t=n[57].name+"",l,r;return{c(){e=g("option"),l=ue(t),this.h()},l(a){e=h(a,"OPTION",{});var o=y(e);l=ce(o,t),o.forEach(f),this.h()},h(){e.__value=r=n[57].id,oe(e,e.__value)},m(a,o){$(a,e,o),c(e,l)},p(a,o){o[0]&2&&t!==(t=a[57].name+"")&&Ie(l,t),o[0]&2&&r!==(r=a[57].id)&&(e.__value=r,oe(e,e.__value))},d(a){a&&f(e)}}}function Bt(n){let e,t=n[54]+"",l;return{c(){e=g("option"),l=ue(t),this.h()},l(r){e=h(r,"OPTION",{});var a=y(e);l=ce(a,t),a.forEach(f),this.h()},h(){e.__value=n[54],oe(e,e.__value)},m(r,a){$(r,e,a),c(e,l)},p:De,d(r){r&&f(e)}}}function Ht(n){let e,t=n[51]+"",l,r;return{c(){e=g("option"),l=ue(t),this.h()},l(a){e=h(a,"OPTION",{});var o=y(e);l=ce(o,t),o.forEach(f),this.h()},h(){e.__value=r=n[51],oe(e,e.__value)},m(a,o){$(a,e,o),c(e,l)},p(a,o){o[0]&65536&&t!==(t=a[51]+"")&&Ie(l,t),o[0]&65536&&r!==(r=a[51])&&(e.__value=r,oe(e,e.__value))},d(a){a&&f(e)}}}function kl(n){let e,t,l=j(n[15]),r=[];for(let o=0;oee(r[o],1,1,()=>{r[o]=null});return{c(){for(let o=0;o0?"border-t border-gray-50 dark:border-gray-800":"")+" hover:bg-gray-50 dark:hover:bg-gray-800/50 transition-colors"),this.first=t},m(A,F){$(A,t,F),c(t,l),c(l,a),c(t,o),c(t,u),c(u,d),c(d,x),c(u,L),c(u,D),c(D,v),c(D,E),c(D,P),c(t,fe),c(t,V),c(V,ae),$e(te,ae,null),c(V,z),c(V,q),$e(pe,q,null),c(t,xe),O=!0,Pe||(le=[U(ae,"click",Ue),U(q,"click",he)],Pe=!0)},p(A,F){e=A,(!O||F[0]&32768)&&r!==(r=e[24](e[48].mime_type)+"")&&Ie(a,r),(!O||F[0]&32768)&&_!==(_=e[48].original_name+"")&&Ie(x,_),(!O||F[0]&32768)&&w!==(w=e[48].property_name+"")&&Ie(v,w),(!O||F[0]&32768)&&M!==(M=e[25](e[48].created_at)+"")&&Ie(P,M),(!O||F[0]&32768&&B!==(B="flex items-center gap-4 px-4 py-3 "+(e[50]>0?"border-t border-gray-50 dark:border-gray-800":"")+" hover:bg-gray-50 dark:hover:bg-gray-800/50 transition-colors"))&&b(t,"class",B)},i(A){O||(Y(te.$$.fragment,A),Y(pe.$$.fragment,A),O=!0)},o(A){ee(te.$$.fragment,A),ee(pe.$$.fragment,A),O=!1},d(A){A&&f(t),Fe(te),Fe(pe),Pe=!1,Zt(le)}}}function Mt(n){let e,t,l=n[44]+"",r,a,o,u=[],d=new Map,_,x,L=j(n[45]);const D=w=>w[48].id;for(let w=0;wn[26].call(E)),b(P,"class","px-2 py-1 rounded border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 text-sm focus:outline-none"),n[14]===void 0&&Be(()=>n[27].call(P)),b(V,"class","px-3 py-1 bg-blue-600 hover:bg-blue-700 text-white text-sm rounded-lg transition-colors"),b(_,"class","flex items-center gap-2 bg-white dark:bg-gray-900 rounded-xl border border-gray-100 dark:border-gray-800 px-4 py-2"),b(t,"class","flex items-center justify-between gap-3 mb-6"),b(q,"class","text-sm font-medium text-gray-700 dark:text-gray-300 mb-4"),b(O,"class","px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"),n[10]===void 0&&Be(()=>n[28].call(O)),b(le,"class","px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"),n[11]===void 0&&Be(()=>n[29].call(le)),b(he,"placeholder","Catégorie (ex: Loyers, Travaux…)"),b(he,"class","px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 min-w-48"),b(B,"class","flex flex-wrap gap-3 mb-4"),b(G,"class",ke="border-2 border-dashed rounded-xl p-8 text-center cursor-pointer transition-colors "+(n[8]?"border-blue-400 bg-blue-50 dark:bg-blue-950/30":"border-gray-200 dark:border-gray-700 hover:border-gray-300 dark:hover:border-gray-600")),b(_e,"type","file"),_e.multiple=!0,b(_e,"class","hidden"),b(_e,"accept",".pdf,.jpg,.jpeg,.png,.xlsx,.csv,.doc,.docx"),b(z,"class","bg-white dark:bg-gray-900 rounded-xl border border-gray-100 dark:border-gray-800 p-5 mb-5"),ye.__value="",oe(ye,ye.__value),b(se,"class","px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"),n[5]===void 0&&Be(()=>n[35].call(se)),we.__value="",oe(we,we.__value),b(N,"class","px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"),n[6]===void 0&&Be(()=>n[36].call(N)),Ne.__value="",oe(Ne,Ne.__value),b(ge,"class","px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"),n[7]===void 0&&Be(()=>n[37].call(ge)),b(be,"class","flex flex-wrap gap-3 mb-5"),b(e,"class","p-6 max-w-5xl mx-auto")},m(s,k){$(s,e,k),c(e,t),c(t,l),$e(r,l,null),c(l,a),c(l,o),c(t,d),c(t,_),$e(x,_,null),c(_,L),c(_,D),c(_,v),c(_,E);for(let m=0;m{je[m]=null}),lt(),re=je[H],re||(re=je[H]=pt[H](s),re.c()),Y(re,1),re.m(G,null)),(!et||k[0]&256&&ke!==(ke="border-2 border-dashed rounded-xl p-8 text-center cursor-pointer transition-colors "+(s[8]?"border-blue-400 bg-blue-50 dark:bg-blue-950/30":"border-gray-200 dark:border-gray-700 hover:border-gray-300 dark:hover:border-gray-600")))&&b(G,"class",ke),k[0]&2){Ke=j(s[1]);let i;for(i=0;i{Ve[ze]=null}),lt(),ve=Ve[me],ve?ve.p(s,k):(ve=Ve[me]=mt[me](s),ve.c()),Y(ve,1),ve.m(e,null))},i(s){et||(Y(r.$$.fragment,s),Y(x.$$.fragment,s),Y(re),Y(ve),et=!0)},o(s){ee(r.$$.fragment,s),ee(x.$$.fragment,s),ee(re),ee(ve),et=!1},d(s){s&&f(e),Fe(r),Fe(x),Oe(K,s),Oe(R,s),Oe(Z,s),Oe(J,s),ne&&ne.d(),je[H].d(),n[34](null),Oe(Q,s),Oe(W,s),Oe(X,s),Ve[me].d(),at=!1,Zt(gt)}}}function Cl(n,e,t){let l,r,a=[],o=[],u=!0,d=!1,_="",x="",L=String(new Date().getFullYear()),D="",w=!1,v,E="",M=String(new Date().getFullYear()),P="",fe="",V=String(new Date().getFullYear());const ae=Array.from({length:5},(p,ie)=>String(new Date().getFullYear()-ie));Xt(async()=>{t(1,o=await We.properties.list()||[]),o.length>0&&(t(10,E=o[0].id),t(13,fe=o[0].id)),await te()});async function te(){t(2,u=!0);const p={};x&&(p.property_id=x),L&&(p.fiscal_year=L),D&&(p.category=D),t(0,a=await We.documents.list(p)||[]),t(2,u=!1)}async function z(p){if(!E){t(4,_="Sélectionnez un bien avant d'uploader.");return}t(4,_=""),t(3,d=!0);for(const ie of p){const N=new FormData;N.append("file",ie),N.append("property_id",E),N.append("fiscal_year",M),N.append("category",P);try{await We.documents.upload(N)}catch(we){t(4,_=`Erreur upload "${ie.name}": ${we.message}`)}}t(3,d=!1),await te()}function q(p){t(8,w=!1),z([...p.dataTransfer.files])}function pe(p){z([...p.target.files]),p.target.value=""}async function xe(p,ie){confirm(`Supprimer "${ie}" ?`)&&(await We.documents.delete(p),await te())}function B(p){window.open(We.documents.download(p),"_blank")}function O(){const p={year:V};fe&&(p.property_id=fe),window.open(We.documents.exportUrl(p),"_blank")}const Pe=p=>p?p.includes("pdf")?"📕":p.includes("image")?"🖼️":p.includes("spreadsheet")||p.includes("excel")||p.includes("csv")?"📊":p.includes("word")||p.includes("document")?"📝":"📄":"📄",le=p=>new Date(p).toLocaleDateString("fr-FR");function Ue(){fe=He(this),t(13,fe),t(1,o)}function he(){V=He(this),t(14,V),t(17,ae)}function A(){E=He(this),t(10,E),t(1,o)}function F(){M=He(this),t(11,M),t(17,ae)}function G(){P=this.value,t(12,P)}const H=()=>t(8,w=!0),re=()=>t(8,w=!1),ke=()=>v.click();function Ce(p){el[p?"unshift":"push"](()=>{v=p,t(9,v)})}function _e(){x=He(this),t(5,x),t(1,o)}function Se(){L=He(this),t(6,L),t(17,ae)}function be(){D=He(this),t(7,D),t(16,l),t(0,a)}const se=p=>B(p.id),ye=p=>xe(p.id,p.original_name);return n.$$.update=()=>{n.$$.dirty[0]&1&&t(16,l=[...new Set(a.map(p=>p.category).filter(Boolean))].sort()),n.$$.dirty[0]&1&&t(15,r=(()=>{const p={};for(const ie of a){const N=ie.category||"Sans catégorie";p[N]||(p[N]=[]),p[N].push(ie)}return Object.entries(p).sort(([ie],[N])=>ie.localeCompare(N))})())},[a,o,u,d,_,x,L,D,w,v,E,M,P,fe,V,r,l,ae,te,q,pe,xe,B,O,Pe,le,Ue,he,A,F,G,H,re,ke,Ce,_e,Se,be,se,ye]}class zl extends ft{constructor(e){super(),_t(this,e,Cl,xl,ut,{},null,[-1,-1,-1])}}export{zl as component}; diff --git a/web/build/_app/immutable/nodes/6.BT2j549n.js b/web/build/_app/immutable/nodes/6.BT2j549n.js deleted file mode 100644 index 0202741..0000000 --- a/web/build/_app/immutable/nodes/6.BT2j549n.js +++ /dev/null @@ -1,3 +0,0 @@ -import{s as je,a as De,e as Pe,b as qe,u as Ge,g as Je,d as Ke,r as Qe,f as Te,o as We,n as ae}from"../chunks/DHedsUi_.js";import{S as Ae,i as He,k as ie,l as te,m as W,n as ce,o as fe,p as ue,d as f,x as me,A as ve,q as Ue,a as le,b as n,r as de,u as m,z as be,c as d,e as b,g as z,v as ne,f as A,h as _,j as O,t as H,s as se,y as Ye,w as Se,B as Ne}from"../chunks/G8UKEBBn.js";import{I as Xe,g as Ze,a as et,e as re}from"../chunks/C1tDbyYL.js";import{a as $e}from"../chunks/DjUyxgK6.js";import{F as tt}from"../chunks/CUwAs-mp.js";import{D as lt}from"../chunks/BojKV9te.js";import{T as st,a as at}from"../chunks/7IRyKQzz.js";function rt(r){let e;const l=r[2].default,t=qe(l,r,r[3],null);return{c(){t&&t.c()},l(a){t&&t.l(a)},m(a,o){t&&t.m(a,o),e=!0},p(a,o){t&&t.p&&(!e||o&8)&&Ge(t,l,a,a[3],e?Ke(l,a[3],o,null):Je(a[3]),null)},i(a){e||(W(t,a),e=!0)},o(a){te(t,a),e=!1},d(a){t&&t.d(a)}}}function nt(r){let e,l;const t=[{name:"minus"},r[1],{iconNode:r[0]}];let a={$$slots:{default:[rt]},$$scope:{ctx:r}};for(let o=0;o{l(1,e=De(De({},e),Pe(s))),"$$scope"in s&&l(3,a=s.$$scope)},e=Pe(e),[o,e,t,a]}class it extends Ae{constructor(e){super(),He(this,e,ot,nt,je,{})}}function ze(r,e,l){const t=r.slice();return t[15]=e[l],t}function ct(r,e,l){const t=r.slice();return t[12]=e[l],t}function Oe(r,e,l){const t=r.slice();return t[18]=e[l],t}function Be(r,e,l){const t=r.slice();return t[21]=e[l],t}function Fe(r){let e,l=r[21].name+"",t,a;return{c(){e=_("option"),t=H(l),this.h()},l(o){e=d(o,"OPTION",{});var s=b(e);t=A(s,l),s.forEach(f),this.h()},h(){e.__value=a=r[21].id,be(e,e.__value)},m(o,s){le(o,e,s),n(e,t)},p(o,s){s&2&&l!==(l=o[21].name+"")&&se(t,l),s&2&&a!==(a=o[21].id)&&(e.__value=a,be(e,e.__value))},d(o){o&&f(e)}}}function Le(r){let e,l=r[18]+"",t;return{c(){e=_("option"),t=H(l),this.h()},l(a){e=d(a,"OPTION",{});var o=b(e);t=A(o,l),o.forEach(f),this.h()},h(){e.__value=r[18],be(e,e.__value)},m(a,o){le(a,e,o),n(e,t)},p:ae,d(a){a&&f(e)}}}function ft(r){let e,l,t,a,o=re(r[0]),s=[];for(let c=0;cte(s[c],1,1,()=>{s[c]=null});let h=r[0].length>1&&Re(r);return{c(){e=_("div");for(let c=0;c1?h?h.p(c,g):(h=Re(c),h.c(),h.m(t.parentNode,t)):h&&(h.d(1),h=null)},i(c){if(!a){for(let g=0;g=0?"text-green-600":"text-red-500")),m(p,"class","px-5 py-4"),m(V,"class","grid grid-cols-3 divide-x divide-gray-50 dark:divide-gray-800"),m(e,"class","bg-white dark:bg-gray-900 rounded-xl border border-gray-100 dark:border-gray-800 overflow-hidden")},m(I,S){le(I,e,S),n(e,l),n(l,t),n(t,o),n(l,s),n(l,y),n(y,h),n(y,g),n(e,u),n(e,V),n(V,P),n(P,U),ce(x,U,null),n(U,w),n(P,B),n(P,F),n(F,J),n(V,N),n(V,Y),n(Y,$),ce(D,$,null),n($,X),n(Y,Z),n(Y,j),n(j,C),n(V,G),n(V,p),n(p,T),ce(L,T,null),n(T,Q),n(p,i),n(p,k),n(k,v),n(e,ee),K=!0},p(I,S){(!K||S&1)&&a!==(a=I[15].property_name+"")&&se(o,a),(!K||S&17)&&c!==(c=(I[15].year||I[4])+"")&&se(g,c),(!K||S&1)&&q!==(q=I[7](I[15].total_income)+"")&&se(J,q),(!K||S&1)&&R!==(R=I[7](I[15].total_expense)+"")&&se(C,R),(!K||S&1)&&E!==(E=I[7](I[15].balance)+"")&&se(v,E),(!K||S&1&&M!==(M="text-lg font-semibold "+(I[15].balance>=0?"text-green-600":"text-red-500")))&&m(k,"class",M)},i(I){K||(W(x.$$.fragment,I),W(D.$$.fragment,I),W(L.$$.fragment,I),K=!0)},o(I){te(x.$$.fragment,I),te(D.$$.fragment,I),te(L.$$.fragment,I),K=!1},d(I){I&&f(e),ie(x),ie(D),ie(L)}}}function Re(r){let e,l,t,a,o,s,y,h,c="Revenus totaux",g,u,V=r[7](r[5].income)+"",P,U,x,w,B="Dépenses totales",F,q,J=r[7](r[5].expense)+"",N,Y,$,D,X="Bénéfice net",Z,j,R=r[7](r[5].balance)+"",C,G;return{c(){e=_("div"),l=_("h3"),t=H("Total consolidé — "),a=H(r[4]),o=O(),s=_("div"),y=_("div"),h=_("p"),h.textContent=c,g=O(),u=_("p"),P=H(V),U=O(),x=_("div"),w=_("p"),w.textContent=B,F=O(),q=_("p"),N=H(J),Y=O(),$=_("div"),D=_("p"),D.textContent=X,Z=O(),j=_("p"),C=H(R),this.h()},l(p){e=d(p,"DIV",{class:!0});var T=b(e);l=d(T,"H3",{class:!0});var L=b(l);t=A(L,"Total consolidé — "),a=A(L,r[4]),L.forEach(f),o=z(T),s=d(T,"DIV",{class:!0});var Q=b(s);y=d(Q,"DIV",{});var i=b(y);h=d(i,"P",{class:!0,"data-svelte-h":!0}),ne(h)!=="svelte-174cuzg"&&(h.textContent=c),g=z(i),u=d(i,"P",{class:!0});var k=b(u);P=A(k,V),k.forEach(f),i.forEach(f),U=z(Q),x=d(Q,"DIV",{});var E=b(x);w=d(E,"P",{class:!0,"data-svelte-h":!0}),ne(w)!=="svelte-sdhht4"&&(w.textContent=B),F=z(E),q=d(E,"P",{class:!0});var v=b(q);N=A(v,J),v.forEach(f),E.forEach(f),Y=z(Q),$=d(Q,"DIV",{});var M=b($);D=d(M,"P",{class:!0,"data-svelte-h":!0}),ne(D)!=="svelte-o6g5rn"&&(D.textContent=X),Z=z(M),j=d(M,"P",{class:!0});var ee=b(j);C=A(ee,R),ee.forEach(f),M.forEach(f),Q.forEach(f),T.forEach(f),this.h()},h(){m(l,"class","text-sm font-medium text-gray-400 mb-4"),m(h,"class","text-xs text-gray-400 mb-1"),m(u,"class","text-xl font-semibold text-green-400"),m(w,"class","text-xs text-gray-400 mb-1"),m(q,"class","text-xl font-semibold text-red-400"),m(D,"class","text-xs text-gray-400 mb-1"),m(j,"class",G="text-xl font-semibold "+(r[5].balance>=0?"text-green-400":"text-red-400")),m(s,"class","grid grid-cols-3 gap-4"),m(e,"class","bg-gray-900 dark:bg-gray-800 rounded-xl p-5 text-white")},m(p,T){le(p,e,T),n(e,l),n(l,t),n(l,a),n(e,o),n(e,s),n(s,y),n(y,h),n(y,g),n(y,u),n(u,P),n(s,U),n(s,x),n(x,w),n(x,F),n(x,q),n(q,N),n(s,Y),n(s,$),n($,D),n($,Z),n($,j),n(j,C)},p(p,T){T&16&&se(a,p[4]),T&32&&V!==(V=p[7](p[5].income)+"")&&se(P,V),T&32&&J!==(J=p[7](p[5].expense)+"")&&se(N,J),T&32&&R!==(R=p[7](p[5].balance)+"")&&se(C,R),T&32&&G!==(G="text-xl font-semibold "+(p[5].balance>=0?"text-green-400":"text-red-400"))&&m(j,"class",G)},d(p){p&&f(e)}}}function _t(r){let e;return{c(){e=_("div"),this.h()},l(l){e=d(l,"DIV",{class:!0}),b(e).forEach(f),this.h()},h(){m(e,"class","h-32 bg-gray-100 dark:bg-gray-800 rounded-xl animate-pulse")},m(l,t){le(l,e,t)},p:ae,d(l){l&&f(e)}}}function pt(r){let e,l,t,a,o,s,y="Export fiscal",h,c,g,u,V,P,U=`L'export CSV est formaté pour Excel (séparateur point-virgule, encodage UTF-8 avec BOM). - Il reprend toutes les transactions de l'année sélectionnée avec leur catégorie, - et inclut le total des revenus, dépenses et le bénéfice net.`,x,w,B,F,q="Tous les biens",J,N,Y,$,D,X,Z,j;a=new tt({props:{size:22,class:"text-gray-400"}}),g=new lt({props:{size:16}});let R=re(r[1]),C=[];for(let i=0;ir[10].call(B)),m(N,"class","px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"),r[4]===void 0&&Te(()=>r[11].call(N)),m(w,"class","flex flex-wrap gap-3 mb-6"),m(e,"class","p-6 max-w-4xl mx-auto")},m(i,k){le(i,e,k),n(e,l),n(l,t),ce(a,t,null),n(t,o),n(t,s),n(l,h),n(l,c),ce(g,c,null),n(c,u),n(e,V),n(e,P),n(e,x),n(e,w),n(w,B),n(B,F);for(let E=0;E{L[E]=null}),Ue(),D=L[$],D?D.p(i,k):(D=L[$]=T[$](i),D.c()),W(D,1),D.m(e,null))},i(i){X||(W(a.$$.fragment,i),W(g.$$.fragment,i),W(D),X=!0)},o(i){te(a.$$.fragment,i),te(g.$$.fragment,i),te(D),X=!1},d(i){i&&f(e),ie(a),ie(g),me(C,i),me(p,i),L[$].d(),Z=!1,Qe(j)}}}function ht(r,e,l){let t,a=[],o=[],s=!0,y="",h=String(new Date().getFullYear());const c=Array.from({length:5},(x,w)=>String(new Date().getFullYear()-w)),g=x=>Number(x||0).toLocaleString("fr-FR",{minimumFractionDigits:2})+" €";We(async()=>{l(1,a=await $e.properties.list()||[]),await u()});async function u(){l(2,s=!0);const x={year:h};y&&(x.property_id=y),l(0,o=await $e.fiscal.summary(x)||[]),l(2,s=!1)}function V(){const x={year:h};y&&(x.property_id=y),window.open($e.fiscal.exportUrl(x),"_blank")}function P(){y=Ne(this),l(3,y),l(1,a)}function U(){h=Ne(this),l(4,h),l(6,c)}return r.$$.update=()=>{r.$$.dirty&1&&l(5,t=o.reduce((x,w)=>({income:x.income+(w.total_income||0),expense:x.expense+(w.total_expense||0),balance:x.balance+(w.balance||0)}),{income:0,expense:0,balance:0}))},[o,a,s,y,h,t,c,g,u,V,P,U]}class Et extends Ae{constructor(e){super(),He(this,e,ht,pt,je,{})}}export{Et as component}; diff --git a/web/build/_app/immutable/nodes/7.C8SC4dD8.js b/web/build/_app/immutable/nodes/7.C8SC4dD8.js deleted file mode 100644 index 911358b..0000000 --- a/web/build/_app/immutable/nodes/7.C8SC4dD8.js +++ /dev/null @@ -1,10 +0,0 @@ -import{s as pr,a as wt,e as It,b as br,u as mr,g as vr,d as yr,o as kr,r as gt,i as xr,n as it,f as yt}from"../chunks/DHedsUi_.js";import{S as hr,i as _r,k as Ge,l as se,m as te,n as Ye,o as Je,p as Xe,d as c,x as ut,q as at,a as B,b as o,u as f,c as h,e as k,g as D,v as de,w as ft,h as _,j as N,s as re,f as S,t as O,y as ot,r as me,E as Tt,z as Ze,B as vt,A as pt}from"../chunks/G8UKEBBn.js";import{I as wr,g as Er,a as Cr,e as je,u as Ir,o as Tr}from"../chunks/C1tDbyYL.js";import{a as bt}from"../chunks/DjUyxgK6.js";import{F as Dr}from"../chunks/CUwAs-mp.js";import{A as gr}from"../chunks/eC_GsYA7.js";import{C as kt}from"../chunks/zQrtb5Kq.js";import{G as Et}from"../chunks/2JpTzebs.js";import{X as xt}from"../chunks/C_l6I72z.js";import{U as Nr}from"../chunks/Betcpvy2.js";import{T as Pr}from"../chunks/C7zepb3B.js";function Fr(t){let e;const r=t[2].default,l=br(r,t,t[3],null);return{c(){l&&l.c()},l(s){l&&l.l(s)},m(s,n){l&&l.m(s,n),e=!0},p(s,n){l&&l.p&&(!e||n&8)&&mr(l,r,s,s[3],e?yr(r,s[3],n,null):vr(s[3]),null)},i(s){e||(te(l,s),e=!0)},o(s){se(l,s),e=!1},d(s){l&&l.d(s)}}}function Vr(t){let e,r;const l=[{name:"link-2"},t[1],{iconNode:t[0]}];let s={$$slots:{default:[Fr]},$$scope:{ctx:t}};for(let n=0;n{r(1,e=wt(wt({},e),It(a))),"$$scope"in a&&r(3,s=a.$$scope)},e=It(e),[n,e,l,s]}class Ct extends hr{constructor(e){super(),_r(this,e,Ar,Vr,pr,{})}}function Dt(t,e,r){const l=t.slice();return l[83]=e[r],l[84]=e,l[85]=r,l}function Nt(t,e,r){const l=t.slice();return l[86]=e[r],l}function Pt(t,e,r){const l=t.slice();return l[89]=e[r],l}function Ft(t,e,r){const l=t.slice();return l[92]=e[r],l}function Vt(t,e,r){const l=t.slice();return l[95]=e[r],l}function At(t,e,r){const l=t.slice();return l[109]=e[r],l}function St(t,e,r){const l=t.slice();return l[98]=e[r],l[99]=e,l[85]=r,l}function Ot(t,e,r){const l=t.slice();return l[86]=e[r],l}function Lt(t,e,r){const l=t.slice();return l[89]=e[r],l}function zt(t,e,r){const l=t.slice();return l[104]=e[r],l}function Mt(t,e,r){const l=t.slice();return l[89]=e[r],l}function jt(t,e,r){const l=t.slice();return l[104]=e[r][0],l[112]=e[r][1],l[85]=r,l}function Sr(t){let e;return{c(){e=_("div"),this.h()},l(r){e=h(r,"DIV",{class:!0}),k(e).forEach(c),this.h()},h(){f(e,"class","flex-1 h-px bg-gray-100 dark:bg-gray-800")},m(r,l){B(r,e,l)},d(r){r&&c(e)}}}function qt(t){let e,r,l=(t[85]===0&&t[8]!=="upload"||t[85]===1&&t[8]==="done"?"✓":t[85]+1)+"",s,n,a,u,i,b,g,y,d=t[85]<2&&Sr();return{c(){e=_("div"),r=_("div"),s=O(l),a=N(),u=_("span"),i=O(t[112]),g=N(),d&&d.c(),y=ft(),this.h()},l(x){e=h(x,"DIV",{class:!0});var T=k(e);r=h(T,"DIV",{class:!0});var I=k(r);s=S(I,l),I.forEach(c),a=D(T),u=h(T,"SPAN",{class:!0});var v=k(u);i=S(v,t[112]),v.forEach(c),T.forEach(c),g=D(x),d&&d.l(x),y=ft(),this.h()},h(){f(r,"class",n="w-6 h-6 rounded-full flex items-center justify-center text-xs font-semibold "+(t[8]===t[104]?"bg-blue-600 text-white":t[85]===0&&t[8]!=="upload"||t[85]===1&&t[8]==="done"?"bg-green-500 text-white":"bg-gray-100 dark:bg-gray-800 text-gray-400")),f(u,"class",b=t[8]===t[104]?"text-gray-900 dark:text-white":"text-gray-400"),f(e,"class","flex items-center gap-2")},m(x,T){B(x,e,T),o(e,r),o(r,s),o(e,a),o(e,u),o(u,i),B(x,g,T),d&&d.m(x,T),B(x,y,T)},p(x,T){T[0]&256&&l!==(l=(x[85]===0&&x[8]!=="upload"||x[85]===1&&x[8]==="done"?"✓":x[85]+1)+"")&&re(s,l),T[0]&256&&n!==(n="w-6 h-6 rounded-full flex items-center justify-center text-xs font-semibold "+(x[8]===x[104]?"bg-blue-600 text-white":x[85]===0&&x[8]!=="upload"||x[85]===1&&x[8]==="done"?"bg-green-500 text-white":"bg-gray-100 dark:bg-gray-800 text-gray-400"))&&f(r,"class",n),T[0]&256&&b!==(b=x[8]===x[104]?"text-gray-900 dark:text-white":"text-gray-400")&&f(u,"class",b)},d(x){x&&(c(e),c(g),c(y)),d&&d.d(x)}}}function Bt(t){let e,r,l,s,n;return r=new gr({props:{size:14}}),{c(){e=_("div"),Xe(r.$$.fragment),l=N(),s=O(t[10]),this.h()},l(a){e=h(a,"DIV",{class:!0});var u=k(e);Je(r.$$.fragment,u),l=D(u),s=S(u,t[10]),u.forEach(c),this.h()},h(){f(e,"class","flex items-center gap-2 text-sm px-4 py-3 rounded-lg mb-4 bg-red-50 dark:bg-red-950/30 text-red-600 dark:text-red-400")},m(a,u){B(a,e,u),Ye(r,e,null),o(e,l),o(e,s),n=!0},p(a,u){(!n||u[0]&1024)&&re(s,a[10])},i(a){n||(te(r.$$.fragment,a),n=!0)},o(a){se(r.$$.fragment,a),n=!1},d(a){a&&c(e),Ge(r)}}}function Or(t){var ie;let e,r,l,s,n,a="Import terminé",u,i,b=t[11].imported+"",g,y,d=t[11].imported>1?"s":"",x,T,I=t[11].imported>1?"s":"",v,U,R,P,J,X,ee="Nouvel import",H,A,m="Voir les transactions →",E,z,q;l=new kt({props:{size:28,class:"text-green-600 dark:text-green-400"}});let Y=t[11].skipped>0&&Ut(t),K=((ie=t[11].errors)==null?void 0:ie.length)>0&&Ht(t);return{c(){e=_("div"),r=_("div"),Xe(l.$$.fragment),s=N(),n=_("h2"),n.textContent=a,u=N(),i=_("p"),g=O(b),y=O(" transaction"),x=O(d),T=O(" importée"),v=O(I),U=N(),Y&&Y.c(),R=N(),K&&K.c(),P=N(),J=_("div"),X=_("button"),X.textContent=ee,H=N(),A=_("a"),A.textContent=m,this.h()},l(G){e=h(G,"DIV",{class:!0});var Q=k(e);r=h(Q,"DIV",{class:!0});var ae=k(r);Je(l.$$.fragment,ae),ae.forEach(c),s=D(Q),n=h(Q,"H2",{class:!0,"data-svelte-h":!0}),de(n)!=="svelte-y375t9"&&(n.textContent=a),u=D(Q),i=h(Q,"P",{class:!0});var Ce=k(i);g=S(Ce,b),y=S(Ce," transaction"),x=S(Ce,d),T=S(Ce," importée"),v=S(Ce,I),U=D(Ce),Y&&Y.l(Ce),Ce.forEach(c),R=D(Q),K&&K.l(Q),P=D(Q),J=h(Q,"DIV",{class:!0});var ve=k(J);X=h(ve,"BUTTON",{class:!0,"data-svelte-h":!0}),de(X)!=="svelte-3lzi0m"&&(X.textContent=ee),H=D(ve),A=h(ve,"A",{href:!0,class:!0,"data-svelte-h":!0}),de(A)!=="svelte-bb70bz"&&(A.textContent=m),ve.forEach(c),Q.forEach(c),this.h()},h(){f(r,"class","w-14 h-14 bg-green-100 dark:bg-green-950 rounded-full flex items-center justify-center mx-auto mb-4"),f(n,"class","text-lg font-semibold text-gray-900 dark:text-white mb-1"),f(i,"class","text-gray-500 dark:text-gray-400 text-sm mb-6"),f(X,"class","px-4 py-2 text-sm border border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors"),f(A,"href","/transactions"),f(A,"class","px-4 py-2 text-sm bg-blue-600 hover:bg-blue-700 text-white rounded-lg font-medium transition-colors"),f(J,"class","flex justify-center gap-3"),f(e,"class","bg-white dark:bg-gray-900 rounded-xl border border-gray-100 dark:border-gray-800 p-10 text-center")},m(G,Q){B(G,e,Q),o(e,r),Ye(l,r,null),o(e,s),o(e,n),o(e,u),o(e,i),o(i,g),o(i,y),o(i,x),o(i,T),o(i,v),o(i,U),Y&&Y.m(i,null),o(e,R),K&&K.m(e,null),o(e,P),o(e,J),o(J,X),o(J,H),o(J,A),E=!0,z||(q=me(X,"click",t[42]),z=!0)},p(G,Q){var ae;(!E||Q[0]&2048)&&b!==(b=G[11].imported+"")&&re(g,b),(!E||Q[0]&2048)&&d!==(d=G[11].imported>1?"s":"")&&re(x,d),(!E||Q[0]&2048)&&I!==(I=G[11].imported>1?"s":"")&&re(v,I),G[11].skipped>0?Y?Y.p(G,Q):(Y=Ut(G),Y.c(),Y.m(i,null)):Y&&(Y.d(1),Y=null),((ae=G[11].errors)==null?void 0:ae.length)>0?K?K.p(G,Q):(K=Ht(G),K.c(),K.m(e,P)):K&&(K.d(1),K=null)},i(G){E||(te(l.$$.fragment,G),E=!0)},o(G){se(l.$$.fragment,G),E=!1},d(G){G&&c(e),Ge(l),Y&&Y.d(),K&&K.d(),z=!1,q()}}}function Lr(t){let e,r,l,s=t[23].length+"",n,a,u,i,b,g,y,d,x="Assigner tous à :",T,I,v,U="Choisir...",R,P,J="Recommencer",X,ee,H,A,m,E,z=t[21]0&&Wt(t),j=t[19]>0&&Qt(t),C=t[20]>0&&Gt(t),L=je(t[7]),xe=[];for(let F=0;FF[85];for(let F=0;F0?M?M.p(F,W):(M=Wt(F),M.c(),M.m(r,i)):M&&(M.d(1),M=null),F[19]>0?j?(j.p(F,W),W[0]&524288&&te(j,1)):(j=Qt(F),j.c(),te(j,1),j.m(r,b)):j&&(ot(),se(j,1,1,()=>{j=null}),at()),F[20]>0?C?(C.p(F,W),W[0]&1048576&&te(C,1)):(C=Gt(F),C.c(),te(C,1),C.m(r,g)):C&&(ot(),se(C,1,1,()=>{C=null}),at()),W[0]&128){L=je(F[7]);let $;for($=0;${we[V]=null}),at(),A=we[H],A||(A=we[H]=He[H](F),A.c()),te(A,1),A.m(ee,m)),(!ge||W[0]&2097152)&&re(E,F[21]),(!ge||W[0]&10485760)&&z!==(z=F[21]Comment exporter depuis votre banque ?

- Espace client → Mes comptes → Télécharger / Exporter → Format QIF. - Vous pourrez assigner chaque ligne à un appartement, la ventiler sur plusieurs biens (✂️), ou l'ignorer.`,y,d,x;const T=[Zr,Kr],I=[];function v(U,R){return U[9]?0:1}return l=v(t),s=I[l]=T[l](t),{c(){e=_("div"),r=_("div"),s.c(),a=N(),u=_("input"),i=N(),b=_("div"),b.innerHTML=g,this.h()},l(U){e=h(U,"DIV",{class:!0});var R=k(e);r=h(R,"DIV",{role:!0,tabindex:!0,class:!0});var P=k(r);s.l(P),P.forEach(c),a=D(R),u=h(R,"INPUT",{type:!0,accept:!0,class:!0}),i=D(R),b=h(R,"DIV",{class:!0,"data-svelte-h":!0}),de(b)!=="svelte-1cwn52r"&&(b.innerHTML=g),R.forEach(c),this.h()},h(){f(r,"role","button"),f(r,"tabindex","0"),f(r,"class",n="border-2 border-dashed rounded-xl p-10 text-center cursor-pointer transition-colors "+(t[13]?"border-blue-400 bg-blue-50 dark:bg-blue-950/30":"border-gray-200 dark:border-gray-700 hover:border-gray-300 dark:hover:border-gray-600")),f(u,"type","file"),f(u,"accept",".qif,.qfx"),f(u,"class","hidden"),f(b,"class","mt-4 p-4 bg-blue-50 dark:bg-blue-950/30 rounded-lg text-xs text-blue-600 dark:text-blue-400"),f(e,"class","bg-white dark:bg-gray-900 rounded-xl border border-gray-100 dark:border-gray-800 p-6")},m(U,R){B(U,e,R),o(e,r),I[l].m(r,null),o(e,a),o(e,u),t[51](u),o(e,i),o(e,b),y=!0,d||(x=[me(r,"dragover",Tt(t[47])),me(r,"dragleave",t[48]),me(r,"drop",Tt(t[27])),me(r,"click",t[49]),me(r,"keydown",t[50]),me(u,"change",t[28])],d=!0)},p(U,R){let P=l;l=v(U),l!==P&&(ot(),se(I[P],1,1,()=>{I[P]=null}),at(),s=I[l],s||(s=I[l]=T[l](U),s.c()),te(s,1),s.m(r,null)),(!y||R[0]&8192&&n!==(n="border-2 border-dashed rounded-xl p-10 text-center cursor-pointer transition-colors "+(U[13]?"border-blue-400 bg-blue-50 dark:bg-blue-950/30":"border-gray-200 dark:border-gray-700 hover:border-gray-300 dark:hover:border-gray-600")))&&f(r,"class",n)},i(U){y||(te(s),y=!0)},o(U){se(s),y=!1},d(U){U&&c(e),I[l].d(),t[51](null),d=!1,gt(x)}}}function Ut(t){let e,r=t[11].skipped+"",l,s,n=t[11].skipped>1?"s":"",a;return{c(){e=O("· "),l=O(r),s=O(" ignorée"),a=O(n)},l(u){e=S(u,"· "),l=S(u,r),s=S(u," ignorée"),a=S(u,n)},m(u,i){B(u,e,i),B(u,l,i),B(u,s,i),B(u,a,i)},p(u,i){i[0]&2048&&r!==(r=u[11].skipped+"")&&re(l,r),i[0]&2048&&n!==(n=u[11].skipped>1?"s":"")&&re(a,n)},d(u){u&&(c(e),c(l),c(s),c(a))}}}function Ht(t){let e,r=je(t[11].errors),l=[];for(let s=0;s1?"s":"",u;return{c(){e=_("span"),r=O("· "),s=O(l),n=O(" ignorée"),u=O(a),this.h()},l(i){e=h(i,"SPAN",{class:!0});var b=k(e);r=S(b,"· "),s=S(b,l),n=S(b," ignorée"),u=S(b,a),b.forEach(c),this.h()},h(){f(e,"class","text-gray-400 text-sm")},m(i,b){B(i,e,b),o(e,r),o(e,s),o(e,n),o(e,u)},p(i,b){b[0]&4194304&&l!==(l=i[22].length+"")&&re(s,l),b[0]&4194304&&a!==(a=i[22].length>1?"s":"")&&re(u,a)},d(i){i&&c(e)}}}function Qt(t){let e,r,l,s,n,a;return r=new gr({props:{size:11}}),{c(){e=_("span"),Xe(r.$$.fragment),l=N(),s=O(t[19]),n=O(" sans bien — import bloqué"),this.h()},l(u){e=h(u,"SPAN",{class:!0});var i=k(e);Je(r.$$.fragment,i),l=D(i),s=S(i,t[19]),n=S(i," sans bien — import bloqué"),i.forEach(c),this.h()},h(){f(e,"class","flex items-center gap-1 text-xs px-2 py-1 rounded-full bg-red-50 dark:bg-red-950/30 text-red-600 dark:text-red-400")},m(u,i){B(u,e,i),Ye(r,e,null),o(e,l),o(e,s),o(e,n),a=!0},p(u,i){(!a||i[0]&524288)&&re(s,u[19])},i(u){a||(te(r.$$.fragment,u),a=!0)},o(u){se(r.$$.fragment,u),a=!1},d(u){u&&c(e),Ge(r)}}}function Gt(t){let e,r,l,s,n,a;return r=new Pr({props:{size:11}}),{c(){e=_("span"),Xe(r.$$.fragment),l=N(),s=O(t[20]),n=O(" sans catégorie — import bloqué"),this.h()},l(u){e=h(u,"SPAN",{class:!0});var i=k(e);Je(r.$$.fragment,i),l=D(i),s=S(i,t[20]),n=S(i," sans catégorie — import bloqué"),i.forEach(c),this.h()},h(){f(e,"class","flex items-center gap-1 text-xs px-2 py-1 rounded-full bg-amber-50 dark:bg-amber-950/30 text-amber-700 dark:text-amber-300")},m(u,i){B(u,e,i),Ye(r,e,null),o(e,l),o(e,s),o(e,n),a=!0},p(u,i){(!a||i[0]&1048576)&&re(s,u[20])},i(u){a||(te(r.$$.fragment,u),a=!0)},o(u){se(r.$$.fragment,u),a=!1},d(u){u&&c(e),Ge(r)}}}function Yt(t){let e,r=t[89].name+"",l,s;return{c(){e=_("option"),l=O(r),this.h()},l(n){e=h(n,"OPTION",{});var a=k(e);l=S(a,r),a.forEach(c),this.h()},h(){e.__value=s=t[89].id,Ze(e,e.__value)},m(n,a){B(n,e,a),o(e,l)},p(n,a){a[0]&128&&r!==(r=n[89].name+"")&&re(l,r),a[0]&128&&s!==(s=n[89].id)&&(e.__value=s,Ze(e,e.__value))},d(n){n&&c(e)}}}function Mr(t){let e,r;return e=new kt({props:{size:14}}),{c(){Xe(e.$$.fragment)},l(l){Je(e.$$.fragment,l)},m(l,s){Ye(e,l,s),r=!0},i(l){r||(te(e.$$.fragment,l),r=!0)},o(l){se(e.$$.fragment,l),r=!1},d(l){Ge(e,l)}}}function jr(t){let e;return{c(){e=_("div"),this.h()},l(r){e=h(r,"DIV",{class:!0}),k(e).forEach(c),this.h()},h(){f(e,"class","w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin")},m(r,l){B(r,e,l)},i:it,o:it,d(r){r&&c(e)}}}function Jt(t){let e,r,l,s,n,a,u,i,b,g,y,d,x,T,I,v,U,R,P,J=t[44](t[98].date)+"",X,ee,H,A,m,E,z,q,Y,K,ie,G,Q=t[98].type==="income"?"+":"−",ae,Ce=t[43](t[98].amount)+"",ve,Te,_e,tt,Re,oe,ue,Le,qe;n=new kt({props:{size:12}});function Fe(){return t[53](t[85])}const Ve=[Br,qr],Ae=[];function We(C,L){return L[0]&1&&(i=null),i==null&&(i=!!(C[98].status!=="ignore"&&C[25](C[98].amount))),i?0:1}b=We(t,[-1,-1,-1,-1]),g=Ae[b]=Ve[b](t);const Pe=[Hr,Ur],Be=[];function Ue(C,L){return C[98]._mergedWithIdx!=null?0:1}d=Ue(t),x=Be[d]=Pe[d](t),v=new xt({props:{size:12}});function Se(){return t[58](t[85])}let ye=t[98].alreadyImported&&Xt();function Ke(C,L){return C[98].status==="split"?Wr:Rr}let Ie=Ke(t),ze=Ie(t);function Me(C,L){return C[98].status==="import"?Yr:C[98].status==="split"?Gr:Qr}let pe=Me(t),ke=pe(t),fe=t[98].status==="import"&&$t(t);function ge(C,L){return C[98].status==="import"&&C[98].type==="income"?Xr:Jr}let $e=ge(t),Ne=$e(t),M=t[98]._mergedWithIdx!=null&&tr(),j=(t[98].agencyFee||0)>0&&rr(t);return{c(){e=_("tr"),r=_("td"),l=_("div"),s=_("button"),Xe(n.$$.fragment),u=N(),g.c(),y=N(),x.c(),T=N(),I=_("button"),Xe(v.$$.fragment),R=N(),P=_("td"),X=O(J),ee=N(),ye&&ye.c(),H=N(),A=_("td"),ze.c(),m=N(),E=_("td"),ke.c(),z=N(),q=_("td"),fe&&fe.c(),Y=N(),K=_("td"),Ne.c(),ie=N(),G=_("td"),ae=O(Q),ve=O(Ce),Te=N(),M&&M.c(),_e=N(),j&&j.c(),Re=N(),this.h()},l(C){e=h(C,"TR",{class:!0});var L=k(e);r=h(L,"TD",{class:!0});var xe=k(r);l=h(xe,"DIV",{class:!0});var He=k(l);s=h(He,"BUTTON",{title:!0,class:!0});var we=k(s);Je(n.$$.fragment,we),we.forEach(c),u=D(He),g.l(He),y=D(He),x.l(He),T=D(He),I=h(He,"BUTTON",{title:!0,class:!0});var Qe=k(I);Je(v.$$.fragment,Qe),Qe.forEach(c),He.forEach(c),xe.forEach(c),R=D(L),P=h(L,"TD",{class:!0});var he=k(P);X=S(he,J),ee=D(he),ye&&ye.l(he),he.forEach(c),H=D(L),A=h(L,"TD",{class:!0});var rt=k(A);ze.l(rt),rt.forEach(c),m=D(L),E=h(L,"TD",{class:!0});var F=k(E);ke.l(F),F.forEach(c),z=D(L),q=h(L,"TD",{class:!0});var W=k(q);fe&&fe.l(W),W.forEach(c),Y=D(L),K=h(L,"TD",{class:!0});var V=k(K);Ne.l(V),V.forEach(c),ie=D(L),G=h(L,"TD",{class:!0});var $=k(G);ae=S($,Q),ve=S($,Ce),Te=D($),M&&M.l($),_e=D($),j&&j.l($),$.forEach(c),Re=D(L),L.forEach(c),this.h()},h(){f(s,"title","Importer"),f(s,"class",a="px-2.5 py-1 text-xs transition-colors "+(t[98].status==="import"||t[98].status==="split"?"bg-blue-600 text-white":"text-gray-400 hover:bg-gray-50 dark:hover:bg-gray-800")),f(I,"title","Ignorer"),f(I,"class",U="px-2.5 py-1 text-xs border-l border-gray-200 dark:border-gray-700 transition-colors "+(t[98].status==="ignore"?"bg-gray-500 text-white":"text-gray-400 hover:bg-gray-50 dark:hover:bg-gray-800")),f(l,"class","inline-flex rounded-lg border border-gray-200 dark:border-gray-700 overflow-hidden"),f(r,"class","px-3 py-2 text-center"),f(P,"class","px-3 py-2 text-gray-400 dark:text-gray-500 text-xs whitespace-nowrap"),f(A,"class","px-3 py-2"),f(E,"class","px-3 py-2"),f(q,"class","px-3 py-2"),f(K,"class","px-3 py-2 text-right"),f(G,"class",tt="px-3 py-2 text-right font-semibold whitespace-nowrap text-xs "+(t[98].type==="income"?"text-green-600 dark:text-green-400":"text-red-500 dark:text-red-400")),f(e,"class",oe="transition-colors "+(t[98].alreadyImported?"opacity-40 bg-gray-50 dark:bg-gray-800/30":"")+" "+(!t[98].alreadyImported&&t[98].status==="ignore"?"opacity-30":"")+" "+(t[98].status==="split"?"bg-purple-50/40 dark:bg-purple-950/10":"")+" "+(t[98]._mergedWithIdx!=null?"bg-amber-50/30 dark:bg-amber-950/10":"")+" "+(t[18]===t[85]?"ring-2 ring-inset ring-amber-400":"")+" "+(!t[98].alreadyImported&&t[98].status==="import"&&!t[98].property_id?"bg-red-50/40 dark:bg-red-950/10":!t[98].alreadyImported&&t[98].status==="import"&&!t[98].category_id?"bg-amber-50/40 dark:bg-amber-950/10":!t[98].alreadyImported&&t[98].status==="import"?"hover:bg-gray-50 dark:hover:bg-gray-800/40":""))},m(C,L){B(C,e,L),o(e,r),o(r,l),o(l,s),Ye(n,s,null),o(l,u),Ae[b].m(l,null),o(l,y),Be[d].m(l,null),o(l,T),o(l,I),Ye(v,I,null),o(e,R),o(e,P),o(P,X),o(P,ee),ye&&ye.m(P,null),o(e,H),o(e,A),ze.m(A,null),o(e,m),o(e,E),ke.m(E,null),o(e,z),o(e,q),fe&&fe.m(q,null),o(e,Y),o(e,K),Ne.m(K,null),o(e,ie),o(e,G),o(G,ae),o(G,ve),o(G,Te),M&&M.m(G,null),o(G,_e),j&&j.m(G,null),o(e,Re),ue=!0,Le||(qe=[me(s,"click",Fe),me(I,"click",Se)],Le=!0)},p(C,L){t=C,(!ue||L[0]&129&&a!==(a="px-2.5 py-1 text-xs transition-colors "+(t[98].status==="import"||t[98].status==="split"?"bg-blue-600 text-white":"text-gray-400 hover:bg-gray-50 dark:hover:bg-gray-800")))&&f(s,"class",a);let xe=b;b=We(t,L),b===xe?Ae[b].p(t,L):(ot(),se(Ae[xe],1,1,()=>{Ae[xe]=null}),at(),g=Ae[b],g?g.p(t,L):(g=Ae[b]=Ve[b](t),g.c()),te(g,1),g.m(l,y));let He=d;d=Ue(t),d===He?Be[d].p(t,L):(ot(),se(Be[He],1,1,()=>{Be[He]=null}),at(),x=Be[d],x?x.p(t,L):(x=Be[d]=Pe[d](t),x.c()),te(x,1),x.m(l,T)),(!ue||L[0]&129&&U!==(U="px-2.5 py-1 text-xs border-l border-gray-200 dark:border-gray-700 transition-colors "+(t[98].status==="ignore"?"bg-gray-500 text-white":"text-gray-400 hover:bg-gray-50 dark:hover:bg-gray-800")))&&f(I,"class",U),(!ue||L[0]&1)&&J!==(J=t[44](t[98].date)+"")&&re(X,J),t[98].alreadyImported?ye||(ye=Xt(),ye.c(),ye.m(P,null)):ye&&(ye.d(1),ye=null),Ie===(Ie=Ke(t))&&ze?ze.p(t,L):(ze.d(1),ze=Ie(t),ze&&(ze.c(),ze.m(A,null))),pe===(pe=Me(t))&&ke?ke.p(t,L):(ke.d(1),ke=pe(t),ke&&(ke.c(),ke.m(E,null))),t[98].status==="import"?fe?fe.p(t,L):(fe=$t(t),fe.c(),fe.m(q,null)):fe&&(fe.d(1),fe=null),$e===($e=ge(t))&&Ne?Ne.p(t,L):(Ne.d(1),Ne=$e(t),Ne&&(Ne.c(),Ne.m(K,null))),(!ue||L[0]&1)&&Q!==(Q=t[98].type==="income"?"+":"−")&&re(ae,Q),(!ue||L[0]&1)&&Ce!==(Ce=t[43](t[98].amount)+"")&&re(ve,Ce),t[98]._mergedWithIdx!=null?M||(M=tr(),M.c(),M.m(G,_e)):M&&(M.d(1),M=null),(t[98].agencyFee||0)>0?j?j.p(t,L):(j=rr(t),j.c(),j.m(G,null)):j&&(j.d(1),j=null),(!ue||L[0]&129&&tt!==(tt="px-3 py-2 text-right font-semibold whitespace-nowrap text-xs "+(t[98].type==="income"?"text-green-600 dark:text-green-400":"text-red-500 dark:text-red-400")))&&f(G,"class",tt),(!ue||L[0]&262273&&oe!==(oe="transition-colors "+(t[98].alreadyImported?"opacity-40 bg-gray-50 dark:bg-gray-800/30":"")+" "+(!t[98].alreadyImported&&t[98].status==="ignore"?"opacity-30":"")+" "+(t[98].status==="split"?"bg-purple-50/40 dark:bg-purple-950/10":"")+" "+(t[98]._mergedWithIdx!=null?"bg-amber-50/30 dark:bg-amber-950/10":"")+" "+(t[18]===t[85]?"ring-2 ring-inset ring-amber-400":"")+" "+(!t[98].alreadyImported&&t[98].status==="import"&&!t[98].property_id?"bg-red-50/40 dark:bg-red-950/10":!t[98].alreadyImported&&t[98].status==="import"&&!t[98].category_id?"bg-amber-50/40 dark:bg-amber-950/10":!t[98].alreadyImported&&t[98].status==="import"?"hover:bg-gray-50 dark:hover:bg-gray-800/40":"")))&&f(e,"class",oe)},i(C){ue||(te(n.$$.fragment,C),te(g),te(x),te(v.$$.fragment,C),ue=!0)},o(C){se(n.$$.fragment,C),se(g),se(x),se(v.$$.fragment,C),ue=!1},d(C){C&&c(e),Ge(n),Ae[b].d(),Be[d].d(),Ge(v),ye&&ye.d(),ze.d(),ke.d(),fe&&fe.d(),Ne.d(),M&&M.d(),j&&j.d(),Le=!1,gt(qe)}}}function qr(t){let e,r,l,s,n,a;r=new Et({props:{size:12}});function u(){return t[55](t[85])}return{c(){e=_("button"),Xe(r.$$.fragment),this.h()},l(i){e=h(i,"BUTTON",{title:!0,class:!0});var b=k(e);Je(r.$$.fragment,b),b.forEach(c),this.h()},h(){f(e,"title","Ventiler sur plusieurs biens"),f(e,"class",l="px-2.5 py-1 text-xs border-l border-gray-200 dark:border-gray-700 transition-colors "+(t[98].status==="split"?"bg-purple-600 text-white":"text-gray-400 hover:bg-purple-50 dark:hover:bg-purple-900"))},m(i,b){B(i,e,b),Ye(r,e,null),s=!0,n||(a=me(e,"click",u),n=!0)},p(i,b){t=i,(!s||b[0]&129&&l!==(l="px-2.5 py-1 text-xs border-l border-gray-200 dark:border-gray-700 transition-colors "+(t[98].status==="split"?"bg-purple-600 text-white":"text-gray-400 hover:bg-purple-50 dark:hover:bg-purple-900")))&&f(e,"class",l)},i(i){s||(te(r.$$.fragment,i),s=!0)},o(i){se(r.$$.fragment,i),s=!1},d(i){i&&c(e),Ge(r),n=!1,a()}}}function Br(t){let e,r,l,s,n;function a(){return t[54](t[85])}return{c(){e=_("button"),r=O("✂ auto"),this.h()},l(u){e=h(u,"BUTTON",{title:!0,class:!0});var i=k(e);r=S(i,"✂ auto"),i.forEach(c),this.h()},h(){f(e,"title","Split automatique intérêts/capital"),f(e,"class",l="px-2.5 py-1 text-xs border-l border-gray-200 dark:border-gray-700 transition-colors "+(t[98].status==="split"?"bg-purple-600 text-white":"text-yellow-600 bg-yellow-50 hover:bg-yellow-100 dark:bg-yellow-950/30 dark:hover:bg-yellow-950/50"))},m(u,i){B(u,e,i),o(e,r),s||(n=me(e,"click",a),s=!0)},p(u,i){t=u,i[0]&129&&l!==(l="px-2.5 py-1 text-xs border-l border-gray-200 dark:border-gray-700 transition-colors "+(t[98].status==="split"?"bg-purple-600 text-white":"text-yellow-600 bg-yellow-50 hover:bg-yellow-100 dark:bg-yellow-950/30 dark:hover:bg-yellow-950/50"))&&f(e,"class",l)},i:it,o:it,d(u){u&&c(e),s=!1,n()}}}function Ur(t){let e,r,l,s,n,a,u;r=new Ct({props:{size:12}});function i(){return t[57](t[85])}return{c(){e=_("button"),Xe(r.$$.fragment),this.h()},l(b){e=h(b,"BUTTON",{title:!0,class:!0});var g=k(e);Je(r.$$.fragment,g),g.forEach(c),this.h()},h(){f(e,"title",l=t[18]===null?"Fusionner avec une autre ligne":t[18]===t[85]?"Annuler fusion":"Fusionner avec cette ligne"),f(e,"class",s="px-2.5 py-1 text-xs border-l border-gray-200 dark:border-gray-700 transition-colors "+(t[18]===t[85]?"bg-amber-500 text-white":t[18]!==null?"bg-green-500 text-white hover:bg-green-600":"text-gray-400 hover:bg-amber-50 dark:hover:bg-amber-950/30"))},m(b,g){B(b,e,g),Ye(r,e,null),n=!0,a||(u=me(e,"click",i),a=!0)},p(b,g){t=b,(!n||g[0]&262273&&l!==(l=t[18]===null?"Fusionner avec une autre ligne":t[18]===t[85]?"Annuler fusion":"Fusionner avec cette ligne"))&&f(e,"title",l),(!n||g[0]&262273&&s!==(s="px-2.5 py-1 text-xs border-l border-gray-200 dark:border-gray-700 transition-colors "+(t[18]===t[85]?"bg-amber-500 text-white":t[18]!==null?"bg-green-500 text-white hover:bg-green-600":"text-gray-400 hover:bg-amber-50 dark:hover:bg-amber-950/30")))&&f(e,"class",s)},i(b){n||(te(r.$$.fragment,b),n=!0)},o(b){se(r.$$.fragment,b),n=!1},d(b){b&&c(e),Ge(r),a=!1,u()}}}function Hr(t){let e,r,l,s,n;r=new Ct({props:{size:12}});function a(){return t[56](t[85])}return{c(){e=_("button"),Xe(r.$$.fragment),this.h()},l(u){e=h(u,"BUTTON",{title:!0,class:!0});var i=k(e);Je(r.$$.fragment,i),i.forEach(c),this.h()},h(){f(e,"title","Défusionner"),f(e,"class","px-2.5 py-1 text-xs border-l border-gray-200 dark:border-gray-700 bg-amber-500 text-white hover:bg-amber-600 transition-colors")},m(u,i){B(u,e,i),Ye(r,e,null),l=!0,s||(n=me(e,"click",a),s=!0)},p(u,i){t=u},i(u){l||(te(r.$$.fragment,u),l=!0)},o(u){se(r.$$.fragment,u),l=!1},d(u){u&&c(e),Ge(r),s=!1,n()}}}function Xt(t){let e,r="déjà importée";return{c(){e=_("div"),e.textContent=r,this.h()},l(l){e=h(l,"DIV",{class:!0,"data-svelte-h":!0}),de(e)!=="svelte-q2xtd8"&&(e.textContent=r),this.h()},h(){f(e,"class","text-xs text-gray-400 italic")},m(l,s){B(l,e,s)},d(l){l&&c(e)}}}function Rr(t){let e,r,l,s;function n(){t[61].call(e,t[85])}return{c(){e=_("input"),this.h()},l(a){e=h(a,"INPUT",{placeholder:!0,class:!0}),this.h()},h(){e.disabled=r=t[98].status==="ignore",f(e,"placeholder","Description..."),f(e,"class","w-full px-2 py-1 rounded border border-transparent hover:border-gray-200 dark:hover:border-gray-700 focus:border-blue-400 bg-transparent focus:bg-white dark:focus:bg-gray-800 text-gray-900 dark:text-white text-xs focus:outline-none transition-colors min-w-[180px] disabled:cursor-not-allowed")},m(a,u){B(a,e,u),Ze(e,t[0][t[85]].description),l||(s=me(e,"input",n),l=!0)},p(a,u){t=a,u[0]&129&&r!==(r=t[98].status==="ignore")&&(e.disabled=r),u[0]&129&&e.value!==t[0][t[85]].description&&Ze(e,t[0][t[85]].description)},d(a){a&&c(e),l=!1,s()}}}function Wr(t){let e,r,l,s="× annuler ventilation",n,a,u=je(t[98].splits),i=[];for(let g=0;g{n=null}),at())},i(a){s||(te(n),s=!0)},o(a){se(n),s=!1},d(a){a&&(c(r),c(l)),n&&n.d(a)}}}function Kr(t){let e,r,l,s="Glissez votre fichier QIF ici",n,a,u="ou cliquez pour choisir — formats .qif, .qfx",i;return e=new Nr({props:{size:28,class:"mx-auto mb-3 text-gray-300 dark:text-gray-600"}}),{c(){Xe(e.$$.fragment),r=N(),l=_("p"),l.textContent=s,n=N(),a=_("p"),a.textContent=u,this.h()},l(b){Je(e.$$.fragment,b),r=D(b),l=h(b,"P",{class:!0,"data-svelte-h":!0}),de(l)!=="svelte-ovg28c"&&(l.textContent=s),n=D(b),a=h(b,"P",{class:!0,"data-svelte-h":!0}),de(a)!=="svelte-uptlqq"&&(a.textContent=u),this.h()},h(){f(l,"class","text-sm font-medium text-gray-600 dark:text-gray-400"),f(a,"class","text-xs text-gray-400 mt-1")},m(b,g){Ye(e,b,g),B(b,r,g),B(b,l,g),B(b,n,g),B(b,a,g),i=!0},i(b){i||(te(e.$$.fragment,b),i=!0)},o(b){se(e.$$.fragment,b),i=!1},d(b){b&&(c(r),c(l),c(n),c(a)),Ge(e,b)}}}function Zr(t){let e,r=`
- Analyse du fichier...`;return{c(){e=_("div"),e.innerHTML=r,this.h()},l(l){e=h(l,"DIV",{class:!0,"data-svelte-h":!0}),de(e)!=="svelte-12x8kjj"&&(e.innerHTML=r),this.h()},h(){f(e,"class","flex items-center justify-center gap-2 text-blue-600")},m(l,s){B(l,e,s)},i:it,o:it,d(l){l&&c(e)}}}function sr(t){var E,z;let e,r,l,s,n,a="Choisir la ligne d'amortissement",u,i,b=(((E=t[0][t[15]])==null?void 0:E.description)||"—")+"",g,y,d,x=t[43]((z=t[0][t[15]])==null?void 0:z.amount)+"",T,I,v,U,R,P,J,X,ee;U=new xt({props:{size:18}});function H(q,Y){return q[17]?el:$r}let A=H(t),m=A(t);return{c(){e=_("div"),r=_("div"),l=_("div"),s=_("div"),n=_("h2"),n.textContent=a,u=N(),i=_("p"),g=O(b),y=O(` ·\r - `),d=_("span"),T=O(x),I=N(),v=_("button"),Xe(U.$$.fragment),R=N(),P=_("div"),m.c(),this.h()},l(q){e=h(q,"DIV",{class:!0});var Y=k(e);r=h(Y,"DIV",{class:!0});var K=k(r);l=h(K,"DIV",{class:!0});var ie=k(l);s=h(ie,"DIV",{});var G=k(s);n=h(G,"H2",{class:!0,"data-svelte-h":!0}),de(n)!=="svelte-17le5tr"&&(n.textContent=a),u=D(G),i=h(G,"P",{class:!0});var Q=k(i);g=S(Q,b),y=S(Q,` ·\r - `),d=h(Q,"SPAN",{class:!0});var ae=k(d);T=S(ae,x),ae.forEach(c),Q.forEach(c),G.forEach(c),I=D(ie),v=h(ie,"BUTTON",{class:!0});var Ce=k(v);Je(U.$$.fragment,Ce),Ce.forEach(c),ie.forEach(c),R=D(K),P=h(K,"DIV",{class:!0});var ve=k(P);m.l(ve),ve.forEach(c),K.forEach(c),Y.forEach(c),this.h()},h(){f(n,"class","font-semibold text-gray-900 dark:text-white"),f(d,"class","font-medium text-red-500"),f(i,"class","text-xs text-gray-400 mt-0.5"),f(v,"class","text-gray-400 hover:text-gray-600"),f(l,"class","flex items-center justify-between px-6 py-4 border-b border-gray-100 dark:border-gray-800"),f(P,"class","overflow-y-auto flex-1 px-6 py-4 space-y-5"),f(r,"class","bg-white dark:bg-gray-900 rounded-2xl w-full max-w-2xl shadow-xl border border-gray-100 dark:border-gray-800 flex flex-col max-h-[80vh]"),f(e,"class","fixed inset-0 bg-black/40 flex items-center justify-center z-50 p-4")},m(q,Y){B(q,e,Y),o(e,r),o(r,l),o(l,s),o(s,n),o(s,u),o(s,i),o(i,g),o(i,y),o(i,d),o(d,T),o(l,I),o(l,v),Ye(U,v,null),o(r,R),o(r,P),m.m(P,null),J=!0,X||(ee=me(v,"click",t[35]),X=!0)},p(q,Y){var K,ie;(!J||Y[0]&32769)&&b!==(b=(((K=q[0][q[15]])==null?void 0:K.description)||"—")+"")&&re(g,b),(!J||Y[0]&32769)&&x!==(x=q[43]((ie=q[0][q[15]])==null?void 0:ie.amount)+"")&&re(T,x),A===(A=H(q))&&m?m.p(q,Y):(m.d(1),m=A(q),m&&(m.c(),m.m(P,null)))},i(q){J||(te(U.$$.fragment,q),J=!0)},o(q){se(U.$$.fragment,q),J=!1},d(q){q&&c(e),Ge(U),m.d(),X=!1,ee()}}}function $r(t){let e,r=je(t[16]),l=[];for(let s=0;s.01,f(Ne,"class","flex items-center gap-2 px-4 py-2 bg-purple-600 hover:bg-purple-700 disabled:opacity-50 text-white rounded-lg text-sm font-medium transition-colors"),f(ke,"class","flex justify-end gap-3 px-6 py-4 border-t border-gray-100 dark:border-gray-800"),f(r,"class","bg-white dark:bg-gray-900 rounded-2xl w-full max-w-xl shadow-xl border border-gray-100 dark:border-gray-800"),f(e,"class","fixed inset-0 bg-black/40 flex items-center justify-center z-50 p-4")},m(V,$){B(V,e,$),o(e,r),o(r,l),o(l,s),o(s,n),o(s,u),o(s,i),o(i,g),o(i,y),o(i,d),o(d,T),o(l,v),o(l,U),Ye(R,U,null),o(r,P),o(r,J),we&&we.m(J,null),o(J,X),o(J,ee),o(J,A);for(let le=0;le.01))&&(Ne.disabled=C)},i(V){L||(te(R.$$.fragment,V),te(M.$$.fragment,V),L=!0)},o(V){se(R.$$.fragment,V),se(M.$$.fragment,V),L=!1},d(V){V&&c(e),Ge(R),we&&we.d(),ut(he,V),W.d(),Ge(M),xe=!1,gt(He)}}}function ir(t){let e,r;return{c(){e=_("p"),r=O(t[14]),this.h()},l(l){e=h(l,"P",{class:!0});var s=k(e);r=S(s,t[14]),s.forEach(c),this.h()},h(){f(e,"class","text-red-500 text-sm")},m(l,s){B(l,e,s),o(e,r)},p(l,s){s[0]&16384&&re(r,l[14])},d(l){l&&c(e)}}}function ur(t){let e,r,l,s,n,a,u,i,b,g="%",y,d;function x(...I){return t[68](t[85],...I)}function T(...I){return t[69](t[85],...I)}return{c(){e=_("div"),r=_("input"),s=N(),n=_("div"),a=_("input"),i=N(),b=_("span"),b.textContent=g,this.h()},l(I){e=h(I,"DIV",{class:!0});var v=k(e);r=h(v,"INPUT",{type:!0,min:!0,max:!0,step:!0,class:!0}),s=D(v),n=h(v,"DIV",{class:!0});var U=k(n);a=h(U,"INPUT",{type:!0,min:!0,max:!0,step:!0,class:!0}),i=D(U),b=h(U,"SPAN",{class:!0,"data-svelte-h":!0}),de(b)!=="svelte-9v88xb"&&(b.textContent=g),U.forEach(c),v.forEach(c),this.h()},h(){f(r,"type","range"),f(r,"min","0"),f(r,"max","100"),f(r,"step","0.5"),r.value=l=t[83].pct,f(r,"class","flex-1 accent-blue-600"),f(a,"type","number"),f(a,"min","0"),f(a,"max","100"),f(a,"step","0.5"),a.value=u=t[83].pct,f(a,"class","w-14 px-2 py-1 rounded border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-900 text-gray-900 dark:text-white text-xs text-right focus:outline-none focus:ring-2 focus:ring-blue-500"),f(b,"class","text-xs text-gray-400"),f(n,"class","flex items-center gap-1"),f(e,"class","flex items-center gap-3")},m(I,v){B(I,e,v),o(e,r),o(e,s),o(e,n),o(n,a),o(n,i),o(n,b),y||(d=[me(r,"input",x),me(a,"change",T)],y=!0)},p(I,v){t=I,v[0]&132&&l!==(l=t[83].pct)&&(r.value=l),v[0]&132&&u!==(u=t[83].pct)&&a.value!==u&&(a.value=u)},d(I){I&&c(e),y=!1,gt(d)}}}function fr(t){let e,r=t[89].name+"",l,s;return{c(){e=_("option"),l=O(r),this.h()},l(n){e=h(n,"OPTION",{});var a=k(e);l=S(a,r),a.forEach(c),this.h()},h(){e.__value=s=t[89].id,Ze(e,e.__value)},m(n,a){B(n,e,a),o(e,l)},p(n,a){a[0]&128&&r!==(r=n[89].name+"")&&re(l,r),a[0]&128&&s!==(s=n[89].id)&&(e.__value=s,Ze(e,e.__value))},d(n){n&&c(e)}}}function cr(t){let e,r=t[86].name+"",l,s=t[86].tax_deductible?" ✓":"",n,a;return{c(){e=_("option"),l=O(r),n=O(s),this.h()},l(u){e=h(u,"OPTION",{});var i=k(e);l=S(i,r),n=S(i,s),i.forEach(c),this.h()},h(){e.__value=a=t[86].id,Ze(e,e.__value)},m(u,i){B(u,e,i),o(e,l),o(e,n)},p(u,i){i[0]&4&&r!==(r=u[86].name+"")&&re(l,r),i[0]&4&&s!==(s=u[86].tax_deductible?" ✓":"")&&re(n,s),i[0]&132&&a!==(a=u[86].id)&&(e.__value=a,Ze(e,e.__value))},d(u){u&&c(e)}}}function dr(t){let e,r,l,s,n,a,u,i,b,g,y,d,x=t[83].type==="income"?"+":"−",T,I=t[43](Math.abs(t[83].amount))+"",v,U,R,P=t[2].every(t[46]),J,X,ee,H,A="Montant (€)",m,E,z,q,Y,K,ie="Bien *",G,Q,ae,Ce="Choisir...",ve,Te,_e,tt="Catégorie",Re,oe,ue,Le="—",qe,Fe,Ve,Ae="Description",We,Pe,Be,Ue,Se;function ye(){return t[66](t[85])}function Ke(){return t[67](t[85])}let Ie=P&&ur(t);function ze(...M){return t[70](t[85],...M)}let Me=je(t[7]),pe=[];for(let M=0;M{P=null}),at());let z=y;y=ee(m),y===z?~y&&X[y].p(m,E):(d&&(ot(),se(X[z],1,1,()=>{X[z]=null}),at()),~y?(d=X[y],d?d.p(m,E):(d=X[y]=J[y](m),d.c()),te(d,1),d.m(e,null)):d=null),m[15]!==null?H?(H.p(m,E),E[0]&32768&&te(H,1)):(H=sr(m),H.c(),te(H,1),H.m(T.parentNode,T)):H&&(ot(),se(H,1,1,()=>{H=null}),at()),m[1]!==null&&m[3]?A?(A.p(m,E),E[0]&10&&te(A,1)):(A=or(m),A.c(),te(A,1),A.m(I.parentNode,I)):A&&(ot(),se(A,1,1,()=>{A=null}),at())},i(m){v||(te(l.$$.fragment,m),te(P),te(d),te(H),te(A),v=!0)},o(m){se(l.$$.fragment,m),se(P),se(d),se(H),se(A),v=!1},d(m){m&&(c(e),c(x),c(T),c(I)),Ge(l),ut(R,m),P&&P.d(),~y&&X[y].d(),H&&H.d(m),A&&A.d(m)}}}function al(t,e,r){let l,s,n,a,u,i,b,g,y,d,x,T=[],I=[],v=[],U="upload",R=!1,P="",J=null,X,ee=!1,H="",A=null,m=[],E="",z=[];function q(p){return l.some(w=>Math.abs(w-p)<.1)}kr(async()=>{r(7,[T,I,z]=await Promise.all([bt.properties.list(),bt.categories.list(),bt.loans.list()]),T,r(45,z)),r(7,T=T||[]),I=I||[],r(45,z=z||[]),T.length>0&&(H=T[0].id)});function Y(p){return I.filter(w=>w.type===p)}async function K(p){if(!p)return;if(!p.name.toLowerCase().match(/\.(qif|qfx)$/)){r(10,P="Fichier QIF ou QFX requis.");return}r(10,P=""),r(9,R=!0);const w=new FormData;w.append("file",p);try{const Z=await fetch("/api/import/preview",{method:"POST",body:w,credentials:"include"});if(!Z.ok)throw new Error(await Z.text());const Ee=await Z.json()||[];r(0,v=Ee.map(be=>({...be,status:"import",property_id:H,category_id:"",splits:null,agencyFee:0,alreadyImported:!1})));try{const be=await fetch("/api/import/check",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(Ee)});if(be.ok){const ce=await be.json();r(0,v=v.map((Oe,ne)=>({...Oe,alreadyImported:ce[ne]===!0,status:ce[ne]?"ignore":"import"})))}}catch{}r(8,U="preview")}catch(Z){r(10,P=Z.message)}r(9,R=!1)}function ie(p){r(13,ee=!1),K(p.dataTransfer.files[0])}function G(p){K(p.target.files[0]),p.target.value=""}function Q(p){p&&r(0,v=v.map(w=>w.status==="import"?{...w,property_id:p}:w))}function ae(p){const w=v[p];r(1,A=p),r(14,E=""),r(2,m=T.slice(0,2).map(Z=>({property_id:Z.id,category_id:w.category_id||"",type:w.type,amount:parseFloat((w.amount/2).toFixed(2)),description:w.description||"",pct:50}))),m.length<2&&m.push({property_id:"",category_id:"",type:w.type,amount:parseFloat((w.amount/2).toFixed(2)),description:w.description||"",pct:50})}function Ce(){r(1,A=null),r(2,m=[]),r(14,E="")}function ve(p,w){const Z=v[A].amount;if(w=Math.min(100,Math.max(0,parseFloat(w)||0)),r(2,m[p].pct=w,m),r(2,m[p].amount=parseFloat((Z*w/100).toFixed(2)),m),m.length===2){const Ee=100-w;r(2,m[1-p].pct=Ee,m),r(2,m[1-p].amount=parseFloat((Z*Ee/100).toFixed(2)),m)}r(2,m=[...m])}function Te(p,w){const Z=v[A].amount;if(w=Math.abs(parseFloat(w)||0),r(2,m[p].amount=w,m),r(2,m[p].pct=parseFloat((w/Z*100).toFixed(1)),m),m.length===2){const Ee=1-p,be=v[A].type,ce=m.every(ne=>ne.type===be);let Oe;ce?Oe=parseFloat((Z-w).toFixed(2)):(Oe=m[p].type===be?parseFloat((w-Z).toFixed(2)):parseFloat((Z+w).toFixed(2)),Oe=Math.max(0,Oe)),r(2,m[Ee].amount=Oe,m),r(2,m[Ee].pct=parseFloat((Oe/Z*100).toFixed(1)),m)}r(2,m=[...m])}function _e(){return I.find(p=>{const w=p.name.toLowerCase();return w.includes("intérêt")||w.includes("interet")})}function tt(){return I.find(p=>{const w=p.name.toLowerCase();return w.includes("capital")||w.includes("remboursement")})}function Re(){return I.find(p=>{const w=p.name.toLowerCase();return w.includes("gestion")||w.includes("honoraire")||w.includes("agence")})}function oe(p,w){const Z=_e(),Ee=tt(),be=[];for(const ce of p)be.push({property_id:ce.property_id||H,category_id:(Z==null?void 0:Z.id)||"",type:"expense",amount:parseFloat(ce.interest.toFixed(2)),description:"Intérêts "+ce.loan_ref+" — éch. "+ce.rank,pct:parseFloat((ce.interest/w*100).toFixed(1))}),be.push({property_id:ce.property_id||H,category_id:(Ee==null?void 0:Ee.id)||"",type:"expense",amount:parseFloat(ce.capital.toFixed(2)),description:"Capital "+ce.loan_ref+" — éch. "+ce.rank,pct:parseFloat((ce.capital/w*100).toFixed(1))});return{parts:be,interestCat:Z,capitalCat:Ee}}async function ue(p){const w=v[p];r(1,A=p),r(2,m=[]),r(14,E="");try{const Z=await bt.loans.splitForDate(w.date);if(Z&&Z.length>0){const Ee=Z.filter(De=>Math.abs(De.total-w.amount)<.1),be=Ee.length>0?Ee:Z,{parts:ce,interestCat:Oe,capitalCat:ne}=oe(be,w.amount);r(2,m=ce),Oe||r(14,E='⚠ Créez une catégorie "Intérêts emprunt".'),ne||r(14,E+=(E?" ":"")+'⚠ Créez une catégorie "Remboursement emprunt".');return}}catch{}Ve(p)}let Le=null,qe=[],Fe=!1;async function Ve(p){r(15,Le=p),r(16,qe=[]),r(17,Fe=!0),r(1,A=null);const w=v[p],Z=w.date?w.date.split("-")[0]:String(new Date().getFullYear()),Ee=z.filter(ce=>Math.abs(ce.monthly_payment-w.amount)<.1),be=Ee.length>0?Ee:z;r(16,qe=await Promise.all(be.map(async ce=>{const Oe=await bt.loans.lines(ce.id,{year:Z});return{loan:ce,lines:Oe||[]}}))),r(17,Fe=!1)}function Ae(){r(15,Le=null),r(16,qe=[])}function We(p,w){const Z=v[Le],{parts:Ee,interestCat:be,capitalCat:ce}=oe([{property_id:p.loan.property_id,loan_ref:p.loan.reference||p.loan.label,rank:w.rank,interest:w.interest,capital:w.capital}],Z.amount);r(1,A=Le),r(2,m=Ee),r(14,E=""),be||r(14,E='⚠ Créez une catégorie "Intérêts emprunt".'),ce||r(14,E+=(E?" ":"")+'⚠ Créez une catégorie "Remboursement emprunt".'),Ae()}function Pe(){if(r(14,E=""),Math.abs(i)>.01){r(14,E="Le total ne correspond pas au montant.");return}for(const p of m){if(!p.property_id){r(14,E="Chaque part doit avoir un bien.");return}if(!p.category_id){r(14,E="Chaque part doit avoir une catégorie.");return}}r(0,v[A]={...v[A],status:"split",splits:m.map(p=>({...p}))},v),r(0,v=[...v]),Ce()}function Be(p){r(0,v[p]={...v[p],status:"import",splits:null},v),r(0,v=[...v])}let Ue=null;function Se(p){if(Ue===null)r(18,Ue=p);else if(Ue===p)r(18,Ue=null);else{const w=v[Ue],Z=v[p],Ee=Math.abs(w.amount)+Math.abs(Z.amount),be=w.amount<0?-Ee:Ee;r(0,v[Ue]={...w,status:"import",amount:be,splits:null,_mergedWithIdx:p,_origAmount:w.amount,description:w.description},v),r(0,v[p]={...Z,status:"absorbed"},v),r(0,v=[...v]),r(18,Ue=null)}}function ye(p){const w=v[p];w._mergedWithIdx!=null&&(r(0,v[w._mergedWithIdx]={...v[w._mergedWithIdx],status:"import"},v),r(0,v[p]={...w,amount:w._origAmount,_mergedWithIdx:null,_origAmount:null,status:"import",splits:null},v),r(0,v=[...v]))}async function Ke(){r(10,P="");const p=v.filter(Z=>Z.status==="split"||Z.status==="import"&&Z.property_id&&Z.category_id);if(p.length===0){r(10,P="Aucune transaction prête à importer.");return}const w=p;r(9,R=!0);try{const Z=[];for(const ne of w){if(ne.status==="split"&&ne.splits)for(const De of ne.splits)Z.push({...ne,property_id:De.property_id,category_id:De.category_id,type:De.type||ne.type,amount:De.amount,description:De.description});else Z.push(ne);if((ne.agencyFee||0)>0){const De=Re();Z.push({...ne,type:"expense",amount:parseFloat(ne.agencyFee),category_id:(De==null?void 0:De.id)||"",description:"Frais de gestion — "+(ne.description||""),splits:null})}}const Ee=Z.reduce((ne,De)=>(ne[De.property_id]||(ne[De.property_id]=[]),ne[De.property_id].push(De),ne),{});let be=0,ce=0,Oe=[];for(const[ne,De]of Object.entries(Ee)){const _t=await fetch("/api/import/qif",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({property_id:ne,transactions:De})});if(!_t.ok)throw new Error(await _t.text());const mt=await _t.json();be+=mt.imported,ce+=mt.skipped,mt.errors&&(Oe=[...Oe,...mt.errors])}r(11,J={imported:be,skipped:ce,errors:Oe}),r(0,v=v.filter(ne=>!(ne.status==="split"||ne.status==="import"&&ne.property_id&&ne.category_id))),v.length===0?r(8,U="done"):r(10,P=`✓ ${be} importée${be>1?"s":""}${ce>0?` · ${ce} ignorée${ce>1?"s":""}`:""} — ${v.filter(ne=>ne.status!=="ignore").length} transaction${v.filter(ne=>ne.status!=="ignore").length>1?"s":""} à compléter`)}catch(Z){r(10,P=Z.message)}r(9,R=!1)}function Ie(){r(8,U="upload"),r(0,v=[]),r(11,J=null),r(10,P=""),Ce()}const ze=p=>Number(p).toLocaleString("fr-FR",{minimumFractionDigits:2})+" €",Me=p=>{if(!p)return"—";const w=p.split("-");return w.length===3?`${w[2]}/${w[1]}/${w[0]}`:p},pe=p=>p.type===s.type,ke=()=>r(13,ee=!0),fe=()=>r(13,ee=!1),ge=()=>X.click(),$e=p=>p.key==="Enter"&&X.click();function Ne(p){xr[p?"unshift":"push"](()=>{X=p,r(12,X)})}const M=p=>{Q(p.target.value),p.target.value=""},j=p=>r(0,v[p].status=v[p].status==="ignore"?"import":v[p].status==="split"?"split":"import",v),C=p=>ue(p),L=p=>ae(p),xe=p=>ye(p),He=p=>Se(p),we=p=>r(0,v[p].status="ignore",v),Qe=(p,w)=>w.id===p.property_id,he=p=>Be(p);function rt(p){v[p].description=this.value,r(0,v),r(7,T)}function F(p){v[p].property_id=vt(this),r(0,v),r(7,T)}function W(p){v[p].category_id=vt(this),r(0,v),r(7,T)}const V=(p,w)=>{r(0,v[p].agencyFee=parseFloat(w.target.value)||0,v),r(0,v=[...v])},$=(p,w)=>We(p,w),le=p=>{r(2,m[p].type="income",m),r(2,m[p].category_id="",m),r(2,m=[...m])},lt=p=>{r(2,m[p].type="expense",m),r(2,m[p].category_id="",m),r(2,m=[...m])},nt=(p,w)=>ve(p,w.target.value),ct=(p,w)=>ve(p,w.target.value),ht=(p,w)=>Te(p,w.target.value);function dt(p){m[p].property_id=vt(this),r(2,m),r(7,T)}function st(p){m[p].category_id=vt(this),r(2,m),r(7,T)}function et(p){m[p].description=this.value,r(2,m),r(7,T)}return t.$$.update=()=>{t.$$.dirty[1]&16384&&(l=z.map(p=>p.monthly_payment)),t.$$.dirty[0]&3&&r(3,s=A!==null?v[A]:null),t.$$.dirty[0]&4&&r(6,n=m.filter(p=>p.type==="expense").reduce((p,w)=>p+(parseFloat(w.amount)||0),0)),t.$$.dirty[0]&4&&r(5,a=m.filter(p=>p.type==="income").reduce((p,w)=>p+(parseFloat(w.amount)||0),0)),t.$$.dirty[0]&104&&r(4,u=s?parseFloat((s.type==="income"?a-n:n-a).toFixed(2)):0),t.$$.dirty[0]&24&&r(24,i=s?parseFloat((u-s.amount).toFixed(2)):0),t.$$.dirty[0]&1&&r(23,b=v.filter(p=>p.status==="import"||p.status==="split")),t.$$.dirty[0]&1&&r(22,g=v.filter(p=>p.status==="ignore")),t.$$.dirty[0]&1&&r(21,y=v.filter(p=>p.status==="split"||p.status==="import"&&p.property_id&&p.category_id).length),t.$$.dirty[0]&1&&r(20,d=v.filter(p=>p.status==="import"&&!p.category_id).length),t.$$.dirty[0]&1&&r(19,x=v.filter(p=>p.status==="import"&&!p.property_id).length)},[v,A,m,s,u,a,n,T,U,R,P,J,X,ee,E,Le,qe,Fe,Ue,x,d,y,g,b,i,q,Y,ie,G,Q,ae,Ce,ve,Te,ue,Ae,We,Pe,Be,Se,ye,Ke,Ie,ze,Me,z,pe,ke,fe,ge,$e,Ne,M,j,C,L,xe,He,we,Qe,he,rt,F,W,V,$,le,lt,nt,ct,ht,dt,st,et]}class ml extends hr{constructor(e){super(),_r(this,e,al,nl,pr,{},null,[-1,-1,-1,-1])}}export{ml as component}; diff --git a/web/build/_app/immutable/nodes/8.By7Q-xW8.js b/web/build/_app/immutable/nodes/8.By7Q-xW8.js deleted file mode 100644 index 42c0cfd..0000000 --- a/web/build/_app/immutable/nodes/8.By7Q-xW8.js +++ /dev/null @@ -1,5 +0,0 @@ -import{s as rt,o as at,n as xe,r as Ne,f as Ze}from"../chunks/DHedsUi_.js";import{S as st,i as nt,d as i,k as me,l as le,m as ee,q as Ce,a as ae,b as l,n as be,r as fe,u as p,c,e as m,o as ve,g as j,v as ue,f as Y,w as je,h as u,p as ye,j as z,t as K,x as Ve,y as we,A as Pe,s as re,B as ze,C as ot,z as $e}from"../chunks/G8UKEBBn.js";import{e as _e,u as et,d as it,o as ct}from"../chunks/C1tDbyYL.js";import{a as ge}from"../chunks/DjUyxgK6.js";import{B as Ae}from"../chunks/D3KWQg4I.js";import{X as tt}from"../chunks/C_l6I72z.js";import{T as ut}from"../chunks/7MWtQ_HQ.js";import{A as dt}from"../chunks/eC_GsYA7.js";import{C as lt}from"../chunks/zQrtb5Kq.js";function Be(a,e,t){const r=a.slice();return r[35]=e[t],r}function Oe(a,e,t){const r=a.slice();return r[38]=e[t],r}function Se(a,e,t){const r=a.slice();return r[41]=e[t],r}function Me(a,e,t){const r=a.slice();return r[44]=e[t],r}function He(a,e,t){const r=a.slice();return r[44]=e[t],r}function ft(a,e,t){const r=a.slice();return r[47]=e[t],r}function ht(a){let e,t=[],r=new Map,s,o=_e(a[0]);const n=d=>d[44].id;for(let d=0;da[29].call(S)),p(L,"class","text-xs text-gray-400 dark:text-gray-500"),p(_,"class","px-6 py-5 space-y-5"),p(b,"class","px-4 py-2 text-sm text-gray-600 dark:text-gray-400"),M.disabled=a[5],p(M,"class","flex items-center gap-2 px-4 py-2 bg-blue-600 hover:bg-blue-700 disabled:opacity-50 text-white rounded-lg text-sm font-medium transition-colors"),p(E,"class","flex justify-end gap-3 px-6 py-4 border-t border-gray-100 dark:border-gray-800"),p(t,"class","bg-white dark:bg-gray-900 rounded-2xl w-full max-w-md shadow-xl border border-gray-100 dark:border-gray-800"),p(e,"class","fixed inset-0 bg-black/40 flex items-center justify-center z-50 p-4")},m($,ne){ae($,e,ne),l(e,t),l(t,r),l(r,s),l(r,n),l(r,d),be(h,d,null),l(t,f),l(t,_),g&&g.m(_,null),l(_,k),l(_,C),l(C,x),l(C,X),l(C,D);for(let Z=0;Z{g=null}),Ce()),ne[0]&46080){y=_e($[13]);let R;for(R=0;R{ie[Z]=null}),Ce(),T=ie[W],T||(T=ie[W]=se[W]($),T.c()),ee(T,1),T.m(M,N)),(!te||ne[0]&32)&&(M.disabled=$[5])},i($){te||(ee(h.$$.fragment,$),ee(g),ee(T),te=!0)},o($){le(h.$$.fragment,$),le(g),le(T),te=!1},d($){$&&i(e),me(h),g&&g.d(),Ve(H,$),Ve(q,$),ie[W].d(),oe=!1,Ne(Q)}}}function Re(a){let e,t,r,s,o;return t=new dt({props:{size:13}}),{c(){e=u("div"),ye(t.$$.fragment),r=z(),s=K(a[6]),this.h()},l(n){e=c(n,"DIV",{class:!0});var d=m(e);ve(t.$$.fragment,d),r=j(d),s=Y(d,a[6]),d.forEach(i),this.h()},h(){p(e,"class","flex items-center gap-2 text-sm px-3 py-2 rounded-lg bg-red-50 dark:bg-red-950/30 text-red-600 dark:text-red-400")},m(n,d){ae(n,e,d),be(t,e,null),l(e,r),l(e,s),o=!0},p(n,d){(!o||d[0]&64)&&re(s,n[6])},i(n){o||(ee(t.$$.fragment,n),o=!0)},o(n){le(t.$$.fragment,n),o=!1},d(n){n&&i(e),me(t)}}}function Fe(a){let e,t="Déjà ajouté";return{c(){e=u("span"),e.textContent=t,this.h()},l(r){e=c(r,"SPAN",{class:!0,"data-svelte-h":!0}),ue(e)!=="svelte-1a5so0j"&&(e.textContent=t),this.h()},h(){p(e,"class","text-xs text-gray-400")},m(r,s){ae(r,e,s)},d(r){r&&i(e)}}}function Ge(a){let e,t,r,s,o,n,d=a[44].reference+"",h,f,_,k,C=a[15](a[44].initial_amount)+"",x,F,X=a[15](a[44].monthly_payment)+"",D,w,O=a[12].includes(a[44].reference),B,U,J,S,G,L=O&&Fe();return J=ot(a[28][0]),{c(){e=u("label"),t=u("input"),s=z(),o=u("div"),n=u("p"),h=K(d),f=z(),_=u("p"),k=K("Capital "),x=K(C),F=K(" · Mensualité "),D=K(X),w=z(),L&&L.c(),B=z(),this.h()},l(I){e=c(I,"LABEL",{class:!0});var P=m(e);t=c(P,"INPUT",{type:!0,class:!0}),s=j(P),o=c(P,"DIV",{class:!0});var E=m(o);n=c(E,"P",{class:!0});var b=m(n);h=Y(b,d),b.forEach(i),f=j(E),_=c(E,"P",{class:!0});var v=m(_);k=Y(v,"Capital "),x=Y(v,C),F=Y(v," · Mensualité "),D=Y(v,X),v.forEach(i),E.forEach(i),w=j(P),L&&L.l(P),B=j(P),P.forEach(i),this.h()},h(){p(t,"type","radio"),t.__value=a[44],$e(t,t.__value),t.disabled=r=a[12].includes(a[44].reference),p(t,"class","accent-blue-600"),p(n,"class","text-sm font-medium text-gray-900 dark:text-white"),p(_,"class","text-xs text-gray-400 dark:text-gray-500"),p(o,"class","flex-1 min-w-0"),p(e,"class",U="flex items-center gap-3 p-3 rounded-xl border cursor-pointer transition-colors "+(a[10].reference===a[44].reference?"border-blue-400 bg-blue-50 dark:bg-blue-950/30":"border-gray-200 dark:border-gray-700 hover:border-gray-300 dark:hover:border-gray-600")+" "+(a[12].includes(a[44].reference)?"opacity-40 cursor-not-allowed":"")),J.p(t)},m(I,P){ae(I,e,P),l(e,t),t.checked=t.__value===a[10],l(e,s),l(e,o),l(o,n),l(n,h),l(o,f),l(o,_),l(_,k),l(_,x),l(_,F),l(_,D),l(e,w),L&&L.m(e,null),l(e,B),S||(G=fe(t,"change",a[27]),S=!0)},p(I,P){P[0]&4096&&r!==(r=I[12].includes(I[44].reference))&&(t.disabled=r),P[0]&1024&&(t.checked=t.__value===I[10]),P[0]&4096&&(O=I[12].includes(I[44].reference)),O?L||(L=Fe(),L.c(),L.m(e,B)):L&&(L.d(1),L=null),P[0]&5120&&U!==(U="flex items-center gap-3 p-3 rounded-xl border cursor-pointer transition-colors "+(I[10].reference===I[44].reference?"border-blue-400 bg-blue-50 dark:bg-blue-950/30":"border-gray-200 dark:border-gray-700 hover:border-gray-300 dark:hover:border-gray-600")+" "+(I[12].includes(I[44].reference)?"opacity-40 cursor-not-allowed":""))&&p(e,"class",U)},d(I){I&&i(e),L&&L.d(),J.r(),S=!1,G()}}}function We(a){let e,t=a[41].name+"",r,s;return{c(){e=u("option"),r=K(t),this.h()},l(o){e=c(o,"OPTION",{});var n=m(e);r=Y(n,t),n.forEach(i),this.h()},h(){e.__value=s=a[41].id,$e(e,e.__value)},m(o,n){ae(o,e,n),l(e,r)},p(o,n){n[0]&2&&t!==(t=o[41].name+"")&&re(r,t),n[0]&2&&s!==(s=o[41].id)&&(e.__value=s,$e(e,e.__value))},d(o){o&&i(e)}}}function mt(a){let e,t;return e=new lt({props:{size:15}}),{c(){ye(e.$$.fragment)},l(r){ve(e.$$.fragment,r)},m(r,s){be(e,r,s),t=!0},i(r){t||(ee(e.$$.fragment,r),t=!0)},o(r){le(e.$$.fragment,r),t=!1},d(r){me(e,r)}}}function bt(a){let e;return{c(){e=u("div"),this.h()},l(t){e=c(t,"DIV",{class:!0}),m(e).forEach(i),this.h()},h(){p(e,"class","w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin")},m(t,r){ae(t,e,r)},i:xe,o:xe,d(t){t&&i(e)}}}function Ye(a){let e,t,r,s,o,n=a[4].label+"",d,h,f,_=a[4].property_name+"",k,C,x=a[4].reference+"",F,X,D,w,O,B,U,J,S,G,L,I,P,E='Les intérêts en bleu sont déductibles — nécessite catégorie "Intérêts emprunt".',b,v,A,M,W=_e(a[14]),T=[];for(let y=0;y0&&Xe(a);function te(y,H){return y[8].length===0?yt:vt}let oe=te(a),Q=oe(a),g=a[8].length>0&&Qe(a);return{c(){e=u("div"),t=u("div"),r=u("div"),s=u("div"),o=u("h2"),d=K(n),h=z(),f=u("p"),k=K(_),C=K(" · "),F=K(x),X=z(),D=u("div"),w=u("select");for(let y=0;ya[31].call(w)),p(B,"class","text-gray-400 hover:text-gray-600"),p(D,"class","flex items-center gap-3"),p(r,"class","flex items-center justify-between px-6 py-4 border-b border-gray-100 dark:border-gray-800 shrink-0"),p(G,"class","flex-1 overflow-auto"),p(P,"class","text-xs text-gray-400 dark:text-gray-500"),p(I,"class","flex items-center justify-between px-6 py-4 border-t border-gray-100 dark:border-gray-800 shrink-0"),p(t,"class","bg-white dark:bg-gray-900 rounded-2xl w-full max-w-4xl max-h-[90vh] flex flex-col shadow-xl border border-gray-100 dark:border-gray-800"),p(e,"class","fixed inset-0 bg-black/40 flex items-center justify-center z-50 p-4")},m(y,H){ae(y,e,H),l(e,t),l(t,r),l(r,s),l(s,o),l(o,d),l(s,h),l(s,f),l(f,k),l(f,C),l(f,F),l(r,X),l(r,D),l(D,w);for(let V=0;V0?N?N.p(y,H):(N=Xe(y),N.c(),N.m(t,S)):N&&(N.d(1),N=null),oe===(oe=te(y))&&Q?Q.p(y,H):(Q.d(1),Q=oe(y),Q&&(Q.c(),Q.m(G,null))),y[8].length>0?g?(g.p(y,H),H[0]&256&&ee(g,1)):(g=Qe(y),g.c(),ee(g,1),g.m(I,null)):g&&(we(),le(g,1,1,()=>{g=null}),Ce())},i(y){v||(ee(U.$$.fragment,y),ee(g),v=!0)},o(y){le(U.$$.fragment,y),le(g),v=!1},d(y){y&&i(e),Ve(T,y),me(U),N&&N.d(),Q.d(),g&&g.d(),A=!1,Ne(M)}}}function Ke(a){let e,t=a[38]+"",r;return{c(){e=u("option"),r=K(t),this.h()},l(s){e=c(s,"OPTION",{});var o=m(e);r=Y(o,t),o.forEach(i),this.h()},h(){e.__value=a[38],$e(e,e.__value)},m(s,o){ae(s,e,o),l(e,r)},p:xe,d(s){s&&i(e)}}}function Xe(a){let e,t,r,s="Échéances",o,n,d=a[9].months+"",h,f,_,k,C="Total payé",x,F,X=a[15](a[9].total_payment)+"",D,w,O,B,U='Intérêts ✓ déductibles',J,S,G=a[15](a[9].total_interest)+"",L,I,P,E,b="Capital remboursé",v,A,M=a[15](a[9].total_capital)+"",W;return{c(){e=u("div"),t=u("div"),r=u("p"),r.textContent=s,o=z(),n=u("p"),h=K(d),f=z(),_=u("div"),k=u("p"),k.textContent=C,x=z(),F=u("p"),D=K(X),w=z(),O=u("div"),B=u("p"),B.innerHTML=U,J=z(),S=u("p"),L=K(G),I=z(),P=u("div"),E=u("p"),E.textContent=b,v=z(),A=u("p"),W=K(M),this.h()},l(T){e=c(T,"DIV",{class:!0});var N=m(e);t=c(N,"DIV",{class:!0});var te=m(t);r=c(te,"P",{class:!0,"data-svelte-h":!0}),ue(r)!=="svelte-k78fl"&&(r.textContent=s),o=j(te),n=c(te,"P",{class:!0});var oe=m(n);h=Y(oe,d),oe.forEach(i),te.forEach(i),f=j(N),_=c(N,"DIV",{class:!0});var Q=m(_);k=c(Q,"P",{class:!0,"data-svelte-h":!0}),ue(k)!=="svelte-1jludid"&&(k.textContent=C),x=j(Q),F=c(Q,"P",{class:!0});var g=m(F);D=Y(g,X),g.forEach(i),Q.forEach(i),w=j(N),O=c(N,"DIV",{class:!0});var y=m(O);B=c(y,"P",{class:!0,"data-svelte-h":!0}),ue(B)!=="svelte-17ufr5v"&&(B.innerHTML=U),J=j(y),S=c(y,"P",{class:!0});var H=m(S);L=Y(H,G),H.forEach(i),y.forEach(i),I=j(N),P=c(N,"DIV",{class:!0});var V=m(P);E=c(V,"P",{class:!0,"data-svelte-h":!0}),ue(E)!=="svelte-18gp8jo"&&(E.textContent=b),v=j(V),A=c(V,"P",{class:!0});var q=m(A);W=Y(q,M),q.forEach(i),V.forEach(i),N.forEach(i),this.h()},h(){p(r,"class","text-xs text-gray-500 dark:text-gray-400 mb-1"),p(n,"class","text-xl font-semibold text-gray-900 dark:text-white"),p(t,"class","text-center"),p(k,"class","text-xs text-gray-500 dark:text-gray-400 mb-1"),p(F,"class","text-xl font-semibold text-gray-700 dark:text-gray-300"),p(_,"class","text-center"),p(B,"class","text-xs text-gray-500 dark:text-gray-400 mb-1"),p(S,"class","text-xl font-semibold text-blue-600 dark:text-blue-400"),p(O,"class","text-center"),p(E,"class","text-xs text-gray-500 dark:text-gray-400 mb-1"),p(A,"class","text-xl font-semibold text-gray-400 dark:text-gray-500"),p(P,"class","text-center"),p(e,"class","grid grid-cols-4 gap-4 px-6 py-4 border-b border-gray-100 dark:border-gray-800 shrink-0 bg-gray-50 dark:bg-gray-800/50")},m(T,N){ae(T,e,N),l(e,t),l(t,r),l(t,o),l(t,n),l(n,h),l(e,f),l(e,_),l(_,k),l(_,x),l(_,F),l(F,D),l(e,w),l(e,O),l(O,B),l(O,J),l(O,S),l(S,L),l(e,I),l(e,P),l(P,E),l(P,v),l(P,A),l(A,W)},p(T,N){N[0]&512&&d!==(d=T[9].months+"")&&re(h,d),N[0]&512&&X!==(X=T[15](T[9].total_payment)+"")&&re(D,X),N[0]&512&&G!==(G=T[15](T[9].total_interest)+"")&&re(L,G),N[0]&512&&M!==(M=T[15](T[9].total_capital)+"")&&re(W,M)},d(T){T&&i(e)}}}function vt(a){let e,t,r='Rang Échéance Mensualité Intérêts ✓ Capital Capital restant',s,o,n=[],d=new Map,h=_e(a[8]);const f=_=>_[35].id;for(let _=0;_Pourquoi gérer les prêts ici ?

Vos remboursements mensuels mélangent capital (non déductible) et intérêts (déductibles fiscalement). - Ce module connaît la décomposition exacte pour chaque mois et peut créer automatiquement - les transactions séparées pour la liasse fiscale.

`,X,D,w,O,B,U,J,S,G;s=new Ae({props:{size:22,class:"text-gray-400"}}),_=new Ae({props:{size:15}});const L=[pt,_t,ht],I=[];function P(v,A){return v[2]?0:v[0].length===0?1:2}D=P(a),w=I[D]=L[D](a);let E=a[3]&&qe(a),b=a[4]&&Ye(a);return{c(){e=u("div"),t=u("div"),r=u("div"),ye(s.$$.fragment),o=z(),n=u("div"),n.innerHTML=d,h=z(),f=u("button"),ye(_.$$.fragment),k=K(" Ajouter un prêt"),C=z(),x=u("div"),x.innerHTML=F,X=z(),w.c(),O=z(),E&&E.c(),B=z(),b&&b.c(),U=je(),this.h()},l(v){e=c(v,"DIV",{class:!0});var A=m(e);t=c(A,"DIV",{class:!0});var M=m(t);r=c(M,"DIV",{class:!0});var W=m(r);ve(s.$$.fragment,W),o=j(W),n=c(W,"DIV",{"data-svelte-h":!0}),ue(n)!=="svelte-zf0c1x"&&(n.innerHTML=d),W.forEach(i),h=j(M),f=c(M,"BUTTON",{class:!0});var T=m(f);ve(_.$$.fragment,T),k=Y(T," Ajouter un prêt"),T.forEach(i),M.forEach(i),C=j(A),x=c(A,"DIV",{class:!0,"data-svelte-h":!0}),ue(x)!=="svelte-kq3a2a"&&(x.innerHTML=F),X=j(A),w.l(A),A.forEach(i),O=j(v),E&&E.l(v),B=j(v),b&&b.l(v),U=je(),this.h()},h(){p(r,"class","flex items-center gap-3"),p(f,"class","flex items-center gap-2 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg text-sm font-medium transition-colors"),p(t,"class","flex items-center justify-between mb-6"),p(x,"class","bg-blue-50 dark:bg-blue-950/30 border border-blue-100 dark:border-blue-900 rounded-xl p-4 mb-6 text-sm text-blue-700 dark:text-blue-300"),p(e,"class","p-6 max-w-5xl mx-auto")},m(v,A){ae(v,e,A),l(e,t),l(t,r),be(s,r,null),l(r,o),l(r,n),l(t,h),l(t,f),be(_,f,null),l(f,k),l(e,C),l(e,x),l(e,X),I[D].m(e,null),ae(v,O,A),E&&E.m(v,A),ae(v,B,A),b&&b.m(v,A),ae(v,U,A),J=!0,S||(G=fe(f,"click",a[22]),S=!0)},p(v,A){let M=D;D=P(v),D===M?I[D].p(v,A):(we(),le(I[M],1,1,()=>{I[M]=null}),Ce(),w=I[D],w?w.p(v,A):(w=I[D]=L[D](v),w.c()),ee(w,1),w.m(e,null)),v[3]?E?(E.p(v,A),A[0]&8&&ee(E,1)):(E=qe(v),E.c(),ee(E,1),E.m(B.parentNode,B)):E&&(we(),le(E,1,1,()=>{E=null}),Ce()),v[4]?b?(b.p(v,A),A[0]&16&&ee(b,1)):(b=Ye(v),b.c(),ee(b,1),b.m(U.parentNode,U)):b&&(we(),le(b,1,1,()=>{b=null}),Ce())},i(v){J||(ee(s.$$.fragment,v),ee(_.$$.fragment,v),ee(w),ee(E),ee(b),J=!0)},o(v){le(s.$$.fragment,v),le(_.$$.fragment,v),le(w),le(E),le(b),J=!1},d(v){v&&(i(e),i(O),i(B),i(U)),me(s),me(_),I[D].d(),E&&E.d(v),b&&b.d(v),S=!1,G()}}}function xt(a,e,t){let r,s=[],o=[],n=[],d=!0,h=!1,f=null,_=!1,k="",C=String(new Date().getFullYear()),x=[],F=null;const X=[{reference:"781495E",label:"Prêt CE 781495E",initial_amount:183765,monthly_payment:1084.75},{reference:"781728E",label:"Prêt CE 781728E",initial_amount:122946,monthly_payment:725.74}];let D=X[0],w="";const O=Array.from({length:8},(g,y)=>String(2024+y)),B=g=>Number(g||0).toLocaleString("fr-FR",{minimumFractionDigits:2})+" €",U=g=>{if(!g)return"—";const y=g.split("-");return`${y[2]}/${y[1]}/${y[0]}`};at(async()=>{t(1,[o,n]=await Promise.all([ge.properties.list(),ge.categories.list()]),o),t(1,o=o||[]),n=n||[],o.length>0&&t(11,w=o[0].id),await J()});async function J(){t(2,d=!0),t(0,s=await ge.loans.list()||[]),t(2,d=!1)}async function S(g){t(4,f=g),await G()}async function G(){f&&(t(8,[x,F]=await Promise.all([ge.loans.lines(f.id,{year:C}),ge.loans.annualSummary(f.id,{year:C})]),x,t(9,F)),t(8,x=x||[]),t(9,F=F||null))}async function L(){if(!w){t(6,k="Sélectionnez un bien.");return}t(6,k=""),t(5,_=!0);try{const g=await ge.loans.createWithData({property_id:w,label:D.label,reference:D.reference,initial_amount:D.initial_amount,monthly_payment:D.monthly_payment});t(3,h=!1),await J()}catch(g){t(6,k=g.message)}t(5,_=!1)}async function I(g,y){confirm(`Supprimer le prêt "${y}" ?`)&&(await ge.loans.delete(g),(f==null?void 0:f.id)===g&&t(4,f=null),await J())}async function P(){if(!f||!x.length)return;const g=n.find(V=>V.name.toLowerCase().includes("intérêt")||V.name.toLowerCase().includes("interet")),y=n.find(V=>V.name.toLowerCase().includes("capital"));if(!g){alert(`Créez d'abord une catégorie "Intérêts emprunt" (déductible) dans la page Catégories.`);return}let H=0;for(const V of x)V.capital<=0||(await ge.transactions.create({property_id:f.property_id,category_id:g.id,type:"expense",amount:V.interest,date:V.due_date,description:`Intérêts ${f.reference} — échéance ${V.rank}`}),y&&await ge.transactions.create({property_id:f.property_id,category_id:y.id,type:"expense",amount:V.capital,date:V.due_date,description:`Capital ${f.reference} — échéance ${V.rank}`}),H++);alert(`✓ ${H} échéances créées en transactions pour ${C}.`)}const E=[[]],b=()=>{t(3,h=!0),t(6,k="")},v=()=>t(3,h=!0),A=g=>S(g),M=g=>I(g.id,g.label),W=()=>t(3,h=!1);function T(){D=this.__value,t(10,D)}function N(){w=ze(this),t(11,w),t(1,o)}const te=()=>t(3,h=!1);function oe(){C=ze(this),t(7,C),t(14,O)}const Q=()=>t(4,f=null);return a.$$.update=()=>{a.$$.dirty[0]&1&&t(12,r=s.map(g=>g.reference))},[s,o,d,h,f,_,k,C,x,F,D,w,r,X,O,B,U,S,G,L,I,P,b,v,A,M,W,T,E,N,te,oe,Q]}class Lt extends st{constructor(e){super(),nt(this,e,xt,kt,rt,{},null,[-1,-1])}}export{Lt as component}; diff --git a/web/build/_app/immutable/nodes/9.DcGrZhBA.js b/web/build/_app/immutable/nodes/9.DcGrZhBA.js deleted file mode 100644 index 3f8887b..0000000 --- a/web/build/_app/immutable/nodes/9.DcGrZhBA.js +++ /dev/null @@ -1 +0,0 @@ -import{s as M,n as D,r as q}from"../chunks/DHedsUi_.js";import{S as z,i as B,d as v,z as w,a as V,b as c,r as x,u as d,c as h,e as I,v as N,g as C,h as m,j as E,s as H,f as L,t as O}from"../chunks/G8UKEBBn.js";import{g as A}from"../chunks/6cgBTYw-.js";import{a as F,b as G,c as J}from"../chunks/DjUyxgK6.js";function S(n){let s,e;return{c(){s=m("p"),e=O(n[2]),this.h()},l(t){s=h(t,"P",{class:!0});var l=I(s);e=L(l,n[2]),l.forEach(v),this.h()},h(){d(s,"class","text-red-500 text-sm mb-4")},m(t,l){V(t,s,l),c(s,e)},p(t,l){l&4&&H(e,t[2])},d(t){t&&v(s)}}}function K(n){let s,e,t,l="🏠 Mes Locations",g,b,i,u,k,r,T,p,U="Se connecter",P,j,a=n[2]&&S(n);return{c(){s=m("div"),e=m("div"),t=m("h1"),t.textContent=l,g=E(),a&&a.c(),b=E(),i=m("div"),u=m("input"),k=E(),r=m("input"),T=E(),p=m("button"),p.textContent=U,this.h()},l(o){s=h(o,"DIV",{class:!0});var f=I(s);e=h(f,"DIV",{class:!0});var y=I(e);t=h(y,"H1",{class:!0,"data-svelte-h":!0}),N(t)!=="svelte-b0jrt"&&(t.textContent=l),g=C(y),a&&a.l(y),b=C(y),i=h(y,"DIV",{class:!0});var _=I(i);u=h(_,"INPUT",{type:!0,placeholder:!0,class:!0}),k=C(_),r=h(_,"INPUT",{type:!0,placeholder:!0,class:!0}),T=C(_),p=h(_,"BUTTON",{class:!0,"data-svelte-h":!0}),N(p)!=="svelte-frpi80"&&(p.textContent=U),_.forEach(v),y.forEach(v),f.forEach(v),this.h()},h(){d(t,"class","text-xl font-semibold text-gray-900 dark:text-white mb-6"),d(u,"type","email"),d(u,"placeholder","Email"),d(u,"class","w-full px-4 py-2.5 rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"),d(r,"type","password"),d(r,"placeholder","Mot de passe"),d(r,"class","w-full px-4 py-2.5 rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"),d(p,"class","w-full py-2.5 bg-blue-600 hover:bg-blue-700 text-white rounded-lg text-sm font-medium transition-colors"),d(i,"class","space-y-4"),d(e,"class","bg-white dark:bg-gray-900 rounded-2xl p-8 w-full max-w-sm border border-gray-100 dark:border-gray-800 shadow-sm"),d(s,"class","min-h-screen flex items-center justify-center bg-gray-50 dark:bg-gray-950")},m(o,f){V(o,s,f),c(s,e),c(e,t),c(e,g),a&&a.m(e,null),c(e,b),c(e,i),c(i,u),w(u,n[0]),c(i,k),c(i,r),w(r,n[1]),c(i,T),c(i,p),P||(j=[x(u,"input",n[4]),x(r,"input",n[5]),x(r,"keydown",n[6]),x(p,"click",n[3])],P=!0)},p(o,[f]){o[2]?a?a.p(o,f):(a=S(o),a.c(),a.m(e,b)):a&&(a.d(1),a=null),f&1&&u.value!==o[0]&&w(u,o[0]),f&2&&r.value!==o[1]&&w(r,o[1])},i:D,o:D,d(o){o&&v(s),a&&a.d(),P=!1,q(j)}}}function Q(n,s,e){let t="",l="",g="";async function b(){e(2,g="");try{const r=await F.auth.login(t,l);G.set(r.token),J.set(r.user),A("/")}catch(r){e(2,g=r.message)}}function i(){t=this.value,e(0,t)}function u(){l=this.value,e(1,l)}return[t,l,g,b,i,u,r=>r.key==="Enter"&&b()]}class Z extends z{constructor(s){super(),B(this,s,Q,K,M,{})}}export{Z as component}; diff --git a/web/build/_app/version.json b/web/build/_app/version.json deleted file mode 100644 index a654f16..0000000 --- a/web/build/_app/version.json +++ /dev/null @@ -1 +0,0 @@ -{"version":"1775902055626"} \ No newline at end of file diff --git a/web/build/index.html b/web/build/index.html deleted file mode 100644 index 034be75..0000000 --- a/web/build/index.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - Rental Manager - - - - - - - - - -
- -
- -