@deepfrog/pangents-widget 4.3.0 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ui/date-picker.d.ts +9 -0
- package/dist/index.cjs.js +2 -2
- package/dist/index.es.js +2 -2
- package/dist/pages/TeamView/TeamLeadDetail.d.ts +1 -0
- package/dist/pages/TeamView/components/LeadsTab.d.ts +5 -0
- package/dist/pages/TeamView/components/MemberBarChart.d.ts +7 -0
- package/dist/pages/TeamView/components/MemberRow.d.ts +7 -0
- package/dist/pages/TeamView/components/MemberSelect.d.ts +9 -0
- package/dist/pages/TeamView/components/OverviewTab.d.ts +5 -0
- package/dist/pages/TeamView/components/Pagination.d.ts +8 -0
- package/dist/pages/TeamView/components/SegmentTabs.d.ts +7 -0
- package/dist/pages/TeamView/components/StatPill.d.ts +9 -0
- package/dist/pages/TeamView/components/TeamLeadCard.d.ts +7 -0
- package/dist/pages/TeamView/index.d.ts +1 -0
- package/dist/pages/TeamView/utils.d.ts +1 -0
- package/dist/pangents-widget.css +1 -1
- package/dist/services/api/dashboardService.d.ts +10 -2
- package/dist/services/api/teamService.d.ts +44 -0
- package/dist/stores/teamViewStore.d.ts +54 -0
- package/dist/types/email.d.ts +2 -0
- package/dist/types/team.d.ts +121 -0
- package/dist/{widget-embed-D3Fzr3SK.es.js → widget-embed-Dc2S0eSv.es.js} +1867 -274
- package/dist/widget-embed-Dc2S0eSv.es.js.map +1 -0
- package/dist/widget-embed-fsYKtB9Z.cjs.js +90 -0
- package/dist/widget-embed-fsYKtB9Z.cjs.js.map +1 -0
- package/dist/widget-embed.cjs.js +2 -2
- package/dist/widget-embed.es.js +2 -2
- package/dist/widget.js +1866 -273
- package/package.json +1 -1
- package/dist/widget-embed-CLUVAC44.cjs.js +0 -90
- package/dist/widget-embed-CLUVAC44.cjs.js.map +0 -1
- package/dist/widget-embed-D3Fzr3SK.es.js.map +0 -1
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
|
|
2
|
+
(function() {
|
|
3
|
+
try {
|
|
4
|
+
if (typeof window !== 'undefined') {
|
|
5
|
+
window.__PANGENTS_WIDGET_CSS = "*,: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:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol,\"Noto Color Emoji\";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}:host,.pg-widget-root{--background: 0 0% 100%;--foreground: 0 0% 3.9%;--card: 0 0% 100%;--card-foreground: 0 0% 3.9%;--popover: 0 0% 100%;--popover-foreground: 0 0% 3.9%;--primary: 0 0% 9%;--primary-foreground: 0 0% 98%;--secondary: 0 0% 96.1%;--secondary-foreground: 0 0% 9%;--muted: 0 0% 96.1%;--muted-foreground: 0 0% 45.1%;--accent: 0 0% 96.1%;--accent-foreground: 0 0% 9%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 0 0% 98%;--border: 0 0% 89.8%;--input: 0 0% 89.8%;--ring: 0 0% 3.9%;--chart-1: 12 76% 61%;--chart-2: 173 58% 39%;--chart-3: 197 37% 24%;--chart-4: 43 74% 66%;--chart-5: 27 87% 67%;--radius: .5rem}:host(.pg-dark),.pg-widget-root.pg-dark{--background: 0 0% 3.9%;--foreground: 0 0% 98%;--card: 0 0% 3.9%;--card-foreground: 0 0% 98%;--popover: 0 0% 3.9%;--popover-foreground: 0 0% 98%;--primary: 0 0% 98%;--primary-foreground: 0 0% 9%;--secondary: 0 0% 14.9%;--secondary-foreground: 0 0% 98%;--muted: 0 0% 14.9%;--muted-foreground: 0 0% 63.9%;--accent: 0 0% 14.9%;--accent-foreground: 0 0% 98%;--destructive: 0 62.8% 30.6%;--destructive-foreground: 0 0% 98%;--border: 0 0% 14.9%;--input: 0 0% 14.9%;--ring: 0 0% 83.1%;--chart-1: 220 70% 50%;--chart-2: 160 60% 45%;--chart-3: 30 80% 55%;--chart-4: 280 65% 60%;--chart-5: 340 75% 55%}*{border-color:hsl(var(--border))}.pg-widget-root{background-color:hsl(var(--background));color:hsl(var(--foreground))}.\\!container{width:100%!important;margin-right:auto!important;margin-left:auto!important}.container{width:100%;margin-right:auto;margin-left:auto}@media(min-width:640px){.\\!container{max-width:640px!important}.container{max-width:640px}}@media(min-width:768px){.\\!container{max-width:768px!important}.container{max-width:768px}}@media(min-width:1024px){.\\!container{max-width:1024px!important}.container{max-width:1024px}}@media(min-width:1280px){.\\!container{max-width:1280px!important}.container{max-width:1280px}}@media(min-width:1536px){.\\!container{max-width:1536px!important}.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-\\[-4px\\]{top:-4px;right:-4px;bottom:-4px;left:-4px}.-right-1{right:-.25rem}.-top-1{top:-.25rem}.bottom-0{bottom:0}.bottom-6{bottom:1.5rem}.bottom-full{bottom:100%}.left-0{left:0}.left-2\\.5{left:.625rem}.left-3{left:.75rem}.left-6{left:1.5rem}.right-0{right:0}.right-2{right:.5rem}.right-3{right:.75rem}.right-6{right:1.5rem}.top-0{top:0}.top-1\\/2{top:50%}.top-6{top:1.5rem}.top-full{top:100%}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\\[9998\\]{z-index:9998}.col-span-2{grid-column:span 2 / span 2}.col-span-full{grid-column:1 / -1}.mx-0\\.5{margin-left:.125rem;margin-right:.125rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-3{margin-top:.75rem;margin-bottom:.75rem}.my-4{margin-top:1rem;margin-bottom:1rem}.-ml-1{margin-left:-.25rem}.-mt-0\\.5{margin-top:-.125rem}.mb-0\\.5{margin-bottom:.125rem}.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-0\\.5{margin-left:.125rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mt-0\\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-2\\.5{margin-top:.625rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-auto{margin-top:auto}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.h-0\\.5{height:.125rem}.h-1{height:.25rem}.h-1\\.5{height:.375rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\\.5{height:.625rem}.h-20{height:5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\\[18px\\]{height:18px}.h-\\[1px\\]{height:1px}.h-\\[2px\\]{height:2px}.h-\\[3px\\]{height:3px}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.max-h-40{max-height:10rem}.max-h-48{max-height:12rem}.max-h-60{max-height:15rem}.max-h-64{max-height:16rem}.max-h-80{max-height:20rem}.max-h-96{max-height:24rem}.max-h-\\[120px\\]{max-height:120px}.min-h-0{min-height:0px}.min-h-\\[110px\\]{min-height:110px}.min-h-\\[120px\\]{min-height:120px}.min-h-\\[130px\\]{min-height:130px}.min-h-\\[140px\\]{min-height:140px}.min-h-\\[36px\\]{min-height:36px}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-1\\.5{width:.375rem}.w-10{width:2.5rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\\.5{width:.625rem}.w-20{width:5rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\\.5{width:.875rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-\\[18px\\]{width:18px}.w-\\[3px\\]{width:3px}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:0px}.min-w-\\[20px\\]{min-width:20px}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-4xl{max-width:56rem}.max-w-6xl{max-width:72rem}.max-w-\\[100px\\]{max-width:100px}.max-w-\\[220px\\]{max-width:220px}.max-w-\\[80\\%\\]{max-width:80%}.max-w-\\[85\\%\\]{max-width:85%}.max-w-full{max-width:100%}.max-w-md{max-width:28rem}.max-w-none{max-width:none}.max-w-sm{max-width:24rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-105{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@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-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.resize{resize:both}.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-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.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-2\\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-\\[2px\\]{gap:2px}.gap-y-2{row-gap:.5rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.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-1\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * 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))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.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}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.rounded-tl-md{border-top-left-radius:calc(var(--radius) - 2px)}.rounded-tr-md{border-top-right-radius:calc(var(--radius) - 2px)}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-none{border-style:none}.border-amber-200{--tw-border-opacity: 1;border-color:rgb(253 230 138 / 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-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-blue-600{--tw-border-opacity: 1;border-color:rgb(37 99 235 / 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-green-200{--tw-border-opacity: 1;border-color:rgb(187 247 208 / var(--tw-border-opacity, 1))}.border-input{border-color:hsl(var(--input))}.border-orange-200{--tw-border-opacity: 1;border-color:rgb(254 215 170 / var(--tw-border-opacity, 1))}.border-orange-500{--tw-border-opacity: 1;border-color:rgb(249 115 22 / var(--tw-border-opacity, 1))}.border-primary{border-color:hsl(var(--primary))}.border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity, 1))}.border-red-300{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity, 1))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / 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-yellow-200{--tw-border-opacity: 1;border-color:rgb(254 240 138 / var(--tw-border-opacity, 1))}.border-t-blue-500{--tw-border-opacity: 1;border-top-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.bg-amber-100{--tw-bg-opacity: 1;background-color:rgb(254 243 199 / 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-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity, 1))}.bg-background{background-color:hsl(var(--background))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-black\\/10{background-color:#0000001a}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 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-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / 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-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / 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-indigo-50{--tw-bg-opacity: 1;background-color:rgb(238 242 255 / var(--tw-bg-opacity, 1))}.bg-muted{background-color:hsl(var(--muted))}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(255 237 213 / var(--tw-bg-opacity, 1))}.bg-orange-50{--tw-bg-opacity: 1;background-color:rgb(255 247 237 / var(--tw-bg-opacity, 1))}.bg-orange-500{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity, 1))}.bg-purple-100{--tw-bg-opacity: 1;background-color:rgb(243 232 255 / var(--tw-bg-opacity, 1))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / 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-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\\/20{background-color:#fff3}.bg-white\\/30{background-color:#ffffff4d}.bg-white\\/80{background-color:#fffc}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.bg-yellow-200{--tw-bg-opacity: 1;background-color:rgb(254 240 138 / var(--tw-bg-opacity, 1))}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity, 1))}.bg-yellow-600{--tw-bg-opacity: 1;background-color:rgb(202 138 4 / var(--tw-bg-opacity, 1))}.bg-opacity-50{--tw-bg-opacity: .5}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.from-amber-50{--tw-gradient-from: #fffbeb var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 251 235 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-gray-100{--tw-gradient-from: #f3f4f6 var(--tw-gradient-from-position);--tw-gradient-to: rgb(243 244 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-gray-50{--tw-gradient-from: #f9fafb var(--tw-gradient-from-position);--tw-gradient-to: rgb(249 250 251 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-gray-200{--tw-gradient-to: #e5e7eb var(--tw-gradient-to-position)}.to-orange-50{--tw-gradient-to: #fff7ed var(--tw-gradient-to-position)}.to-white{--tw-gradient-to: #fff var(--tw-gradient-to-position)}.fill-current{fill:currentColor}.fill-yellow-400{fill:#facc15}.object-contain{-o-object-fit:contain;object-fit:contain}.p-0{padding:0}.p-0\\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\\.5{padding:.375rem}.p-2{padding:.5rem}.p-2\\.5{padding:.625rem}.p-3{padding:.75rem}.p-3\\.5{padding:.875rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1{padding-left:.25rem;padding-right:.25rem}.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}.px-8{padding-left:2rem;padding-right:2rem}.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-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-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pb-8{padding-bottom:2rem}.pl-10{padding-left:2.5rem}.pl-8{padding-left:2rem}.pl-9{padding-left:2.25rem}.pr-10{padding-right:2.5rem}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pt-0{padding-top:0}.pt-0\\.5{padding-top:.125rem}.pt-2{padding-top:.5rem}.pt-2\\.5{padding-top:.625rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.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-3xl{font-size:1.875rem;line-height:2.25rem}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[13px\\]{font-size:13px}.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-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-6{line-height:1.5rem}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.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-400{--tw-text-opacity: 1;color:rgb(96 165 250 / 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-800{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.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-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-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity, 1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-orange-600{--tw-text-opacity: 1;color:rgb(234 88 12 / var(--tw-text-opacity, 1))}.text-orange-700{--tw-text-opacity: 1;color:rgb(194 65 12 / var(--tw-text-opacity, 1))}.text-primary{color:hsl(var(--primary))}.text-purple-800{--tw-text-opacity: 1;color:rgb(107 33 168 / 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-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity, 1))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.placeholder-gray-400::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}.placeholder-gray-400::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}.opacity-25{opacity:.25}.opacity-50{opacity:.5}.opacity-75{opacity:.75}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px 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-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px 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-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px 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-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px 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-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)}.shadow-blue-50{--tw-shadow-color: #eff6ff;--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-1{--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)}.ring-inset{--tw-ring-inset: inset}.ring-gray-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity, 1))}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-lg{--tw-drop-shadow: drop-shadow(0 10px 8px rgb(0 0 0 / .04)) drop-shadow(0 4px 3px rgb(0 0 0 / .1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.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}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.duration-150{animation-duration:.15s}.duration-200{animation-duration:.2s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.running{animation-play-state:running}:root{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\";line-height:1.5;font-weight:400;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.widget-bubble-button svg{width:2rem!important;height:2rem!important}.widget-bubble-button img{width:2rem!important;height:2rem!important;max-width:2rem!important}.widget-toast{position:relative!important;max-width:calc(100% - 20px)!important;margin:0 auto!important}[data-sonner-toaster]{position:absolute!important;width:100%!important;max-width:100%!important}[data-sonner-toaster] [data-sonner-toast]{max-width:calc(100% - 20px)!important;margin:0 auto!important}@media screen and (-webkit-min-device-pixel-ratio:2){.widget-container{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*{text-rendering:optimizeLegibility}.mac-optimized-padding{padding:.75rem!important}button{letter-spacing:.025em}}@supports (-webkit-appearance: none){input[type=text],input[type=email],input[type=password],input[type=date],input[type=time],select{-webkit-appearance:none;border-radius:.375rem}.flex{display:flex}}@media(max-width:450px){html{font-size:14px}.text-xs{font-size:.7rem!important}.text-sm{font-size:.8rem!important}}@media(max-width:380px){html{font-size:13px}.text-xs{font-size:.65rem!important}.text-sm{font-size:.75rem!important}}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:#0000001a;border-radius:10px}::-webkit-scrollbar-thumb:hover{background:#0003}.dark ::-webkit-scrollbar-thumb{background:#ffffff1a}.dark ::-webkit-scrollbar-thumb:hover{background:#fff3}@keyframes shimmer{0%{transform:translate(-100%)}to{transform:translate(100%)}}@keyframes shimmerVertical{0%{transform:translateY(100%)}to{transform:translateY(-100%)}}@keyframes sidebarShimmer{0%{transform:translateY(100%)}to{transform:translateY(-100%)}}@keyframes headerShimmer{0%{background-position:0% 0%}to{background-position:100% 0%}}.ai-answer-container{line-height:1.6}.table-scroll{width:100%;max-width:100%;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}.ai-table{width:-moz-max-content;width:max-content;min-width:100%;border-collapse:collapse}.shaky-gradient{filter:blur(24px);transform-origin:center;background-size:200% 200%;animation:shakyMotion 2s steps(1) infinite}@keyframes shakyMotion{0%{background-position:40% 60%;transform:scale(1.1) translate(0) rotate(0)}10%{background-position:45% 55%;transform:scale(1.12) translate(-6px,4px) rotate(.3deg)}20%{background-position:50% 65%;transform:scale(1.15) translate(8px,-6px) rotate(-.4deg)}30%{background-position:55% 50%;transform:scale(1.13) translate(-10px,8px) rotate(.6deg)}40%{background-position:48% 58%;transform:scale(1.14) translate(6px,-4px) rotate(-.5deg)}50%{background-position:60% 45%;transform:scale(1.16) translate(-8px,6px) rotate(.4deg)}70%{background-position:52% 62%;transform:scale(1.13) translate(10px,-6px) rotate(-.3deg)}to{background-position:40% 60%;transform:scale(1.1) translate(0) rotate(0)}}.file\\:border-0::file-selector-button{border-width:0px}.file\\:bg-transparent::file-selector-button{background-color:transparent}.file\\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:font-medium::file-selector-button{font-weight:500}.file\\:text-foreground::file-selector-button{color:hsl(var(--foreground))}.placeholder\\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.focus-within\\:border-gray-300:focus-within{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.focus-within\\:shadow-md:focus-within{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\\:scale-105:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.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\\:border-transparent:hover{border-color:transparent}.hover\\:bg-accent:hover{background-color:hsl(var(--accent))}.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-600:hover{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / 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-destructive\\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.hover\\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.hover\\:bg-gray-200\\/60:hover{background-color:#e5e7eb99}.hover\\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\\:bg-green-50:hover{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / 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-red-700:hover{--tw-bg-opacity: 1;background-color:rgb(185 28 28 / var(--tw-bg-opacity, 1))}.hover\\:bg-secondary\\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\\:bg-white:hover{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.hover\\:bg-white\\/10:hover{background-color:#ffffff1a}.hover\\:bg-white\\/40:hover{background-color:#fff6}.hover\\:bg-white\\/60:hover{background-color:#fff9}.hover\\:bg-yellow-700:hover{--tw-bg-opacity: 1;background-color:rgb(161 98 7 / var(--tw-bg-opacity, 1))}.hover\\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\\:text-blue-800:hover{--tw-text-opacity: 1;color:rgb(30 64 175 / 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-800:hover{--tw-text-opacity: 1;color:rgb(31 41 55 / 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-green-600:hover{--tw-text-opacity: 1;color:rgb(22 163 74 / 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\\:text-red-800:hover{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-90:hover{opacity:.9}.hover\\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\\:shadow-sm:hover{--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)}.hover\\:shadow-xl:hover{--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)}.hover\\:\\[background-color\\:var\\(--hover-bg\\)\\]:hover{background-color:var(--hover-bg)}.focus\\:border-gray-300:focus{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.focus\\:border-gray-400:focus{--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity, 1))}.focus\\:border-transparent:focus{border-color:transparent}.focus\\:bg-blue-500\\/60:focus{background-color:#3b82f699}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.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))}.focus\\:ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity, 1))}.focus\\:ring-red-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity, 1))}.focus\\:ring-yellow-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(234 179 8 / var(--tw-ring-opacity, 1))}.focus\\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:ring-1:focus-visible{--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-visible\\:ring-2:focus-visible{--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-visible\\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.active\\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\\:bg-accent\\/80:active{background-color:hsl(var(--accent) / .8)}.active\\:bg-destructive\\/95:active{background-color:hsl(var(--destructive) / .95)}.active\\:bg-secondary\\/90:active{background-color:hsl(var(--secondary) / .9)}.active\\:underline:active{text-decoration-line:underline}.active\\:\\[background-color\\:var\\(--active-bg\\)\\]:active{background-color:var(--active-bg)}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-40:disabled{opacity:.4}.disabled\\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\\:scale-105{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\\:bg-amber-200{--tw-bg-opacity: 1;background-color:rgb(253 230 138 / var(--tw-bg-opacity, 1))}.group:hover .group-hover\\:bg-orange-200{--tw-bg-opacity: 1;background-color:rgb(254 215 170 / var(--tw-bg-opacity, 1))}.group:hover .group-hover\\:text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.data-\\[state\\=active\\]\\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\\[state\\=active\\]\\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\\[state\\=active\\]\\:shadow[data-state=active]{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}@media(min-width:640px){.sm\\:mx-0{margin-left:0;margin-right:0}.sm\\:my-8{margin-top:2rem;margin-bottom:2rem}.sm\\:ml-3{margin-left:.75rem}.sm\\:ml-4{margin-left:1rem}.sm\\:mt-0{margin-top:0}.sm\\:inline{display:inline}.sm\\:flex{display:flex}.sm\\:hidden{display:none}.sm\\:h-10{height:2.5rem}.sm\\:w-10{width:2.5rem}.sm\\:w-auto{width:auto}.sm\\:w-full{width:100%}.sm\\:max-w-lg{max-width:32rem}.sm\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\\:flex-row-reverse{flex-direction:row-reverse}.sm\\:items-start{align-items:flex-start}.sm\\:items-center{align-items:center}.sm\\:p-0{padding:0}.sm\\:p-4{padding:1rem}.sm\\:p-6{padding:1.5rem}.sm\\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\\:pb-4{padding-bottom:1rem}.sm\\:text-left{text-align:left}}@media(min-width:768px){.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.md\\:text-sm{font-size:.875rem;line-height:1.25rem}}@media(min-width:1024px){.lg\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}.\\[\\&_svg\\]\\:pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:size-4 svg{width:1rem;height:1rem}.\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}\n";
|
|
6
|
+
}
|
|
7
|
+
} catch (error) {}
|
|
8
|
+
})();
|
|
9
|
+
"use strict";var e,t,r,n,i,a,o,s,A,l,c,u,d,h,p,f,m,g,y,v,x,w,b,B,C,E,k,S,j,F,Q,N,U,O,I,T,P,M,D,L,H,_,R,K,z,V,$,W,G,q,Y,X,J,Z,ee,te,re,ne,ie,ae,oe,se,Ae,le,ce,ue,de,he,pe,fe,me,ge,ye,ve,xe,we,be,Be,Ce,Ee=Object.defineProperty,ke=e=>{throw TypeError(e)},Se=(e,t,r)=>((e,t,r)=>t in e?Ee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),je=(e,t,r)=>t.has(e)||ke("Cannot "+r),Fe=(e,t,r)=>(je(e,t,"read from private field"),r?r.call(e):t.get(e)),Qe=(e,t,r)=>t.has(e)?ke("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Ne=(e,t,r,n)=>(je(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Ue=(e,t,r)=>(je(e,t,"access private method"),r),Oe=(e,t,r,n)=>({set _(n){Ne(e,t,n,r)},get _(){return Fe(e,t,n)}});const Ie=require("react/jsx-runtime"),Te=require("react"),Pe=require("react-dom");function Me(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const r in e)if("default"!==r){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}return t.default=e,Object.freeze(t)}const De=Me(Te);var Le=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},He={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},_e=new(r=class{constructor(){Qe(this,e,He),Qe(this,t,!1)}setTimeoutProvider(r){"production"!==process.env.NODE_ENV&&Fe(this,t)&&r!==Fe(this,e)&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:Fe(this,e),provider:r}),Ne(this,e,r),"production"!==process.env.NODE_ENV&&Ne(this,t,!1)}setTimeout(r,n){return"production"!==process.env.NODE_ENV&&Ne(this,t,!0),Fe(this,e).setTimeout(r,n)}clearTimeout(t){Fe(this,e).clearTimeout(t)}setInterval(r,n){return"production"!==process.env.NODE_ENV&&Ne(this,t,!0),Fe(this,e).setInterval(r,n)}clearInterval(t){Fe(this,e).clearInterval(t)}},e=new WeakMap,t=new WeakMap,r);var Re="undefined"==typeof window||"Deno"in globalThis;function Ke(){}function ze(e){return"number"==typeof e&&e>=0&&e!==1/0}function Ve(e,t){return Math.max(e+(t||0)-Date.now(),0)}function $e(e,t){return"function"==typeof e?e(t):e}function We(e,t){return"function"==typeof e?e(t):e}function Ge(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o)if(n){if(t.queryHash!==Ye(o,t.options))return!1}else if(!Je(t.queryKey,o))return!1;if("all"!==r){const e=t.isActive();if("active"===r&&!e)return!1;if("inactive"===r&&e)return!1}return("boolean"!=typeof s||t.isStale()===s)&&((!i||i===t.state.fetchStatus)&&!(a&&!a(t)))}function qe(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(Xe(t.options.mutationKey)!==Xe(a))return!1}else if(!Je(t.options.mutationKey,a))return!1}return(!n||t.state.status===n)&&!(i&&!i(t))}function Ye(e,t){return((null==t?void 0:t.queryKeyHashFn)||Xe)(e)}function Xe(e){return JSON.stringify(e,(e,t)=>nt(t)?Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}):t)}function Je(e,t){return e===t||typeof e==typeof t&&(!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&Object.keys(t).every(r=>Je(e[r],t[r])))}var Ze=Object.prototype.hasOwnProperty;function et(e,t){if(e===t)return e;const r=rt(e)&&rt(t);if(!(r||nt(e)&&nt(t)))return t;const n=(r?e:Object.keys(e)).length,i=r?t:Object.keys(t),a=i.length,o=r?new Array(a):{};let s=0;for(let A=0;A<a;A++){const a=r?A:i[A],l=e[a],c=t[a];if(l===c){o[a]=l,(r?A<n:Ze.call(e,a))&&s++;continue}if(null===l||null===c||"object"!=typeof l||"object"!=typeof c){o[a]=c;continue}const u=et(l,c);o[a]=u,u===l&&s++}return n===a&&s===n?e:o}function tt(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function rt(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function nt(e){if(!it(e))return!1;const t=e.constructor;if(void 0===t)return!0;const r=t.prototype;return!!it(r)&&(!!r.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype)}function it(e){return"[object Object]"===Object.prototype.toString.call(e)}function at(e,t,r){if("function"==typeof r.structuralSharing)return r.structuralSharing(e,t);if(!1!==r.structuralSharing){if("production"!==process.env.NODE_ENV)try{return et(e,t)}catch(n){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${r.queryHash}]: ${n}`),n}return et(e,t)}return t}function ot(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function st(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var At=Symbol();function lt(e,t){return"production"!==process.env.NODE_ENV&&e.queryFn===At&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(null==t?void 0:t.initialPromise)?()=>t.initialPromise:e.queryFn&&e.queryFn!==At?e.queryFn:()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`))}function ct(e,t){return"function"==typeof e?e(...t):!!e}var ut=new(o=class extends Le{constructor(){super(),Qe(this,n),Qe(this,i),Qe(this,a),Ne(this,a,e=>{if(!Re&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){Fe(this,i)||this.setEventListener(Fe(this,a))}onUnsubscribe(){var e;this.hasListeners()||(null==(e=Fe(this,i))||e.call(this),Ne(this,i,void 0))}setEventListener(e){var t;Ne(this,a,e),null==(t=Fe(this,i))||t.call(this),Ne(this,i,e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()}))}setFocused(e){Fe(this,n)!==e&&(Ne(this,n,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){var e;return"boolean"==typeof Fe(this,n)?Fe(this,n):"hidden"!==(null==(e=globalThis.document)?void 0:e.visibilityState)}},n=new WeakMap,i=new WeakMap,a=new WeakMap,o);function dt(){let e,t;const r=new Promise((r,n)=>{e=r,t=n});function n(e){Object.assign(r,e),delete r.resolve,delete r.reject}return r.status="pending",r.catch(()=>{}),r.resolve=t=>{n({status:"fulfilled",value:t}),e(t)},r.reject=e=>{n({status:"rejected",reason:e}),t(e)},r}var ht=function(e){setTimeout(e,0)};var pt=function(){let e=[],t=0,r=e=>{e()},n=e=>{e()},i=ht;const a=n=>{t?e.push(n):i(()=>{r(n)})};return{batch:a=>{let o;t++;try{o=a()}finally{t--,t||(()=>{const t=e;e=[],t.length&&i(()=>{n(()=>{t.forEach(e=>{r(e)})})})})()}return o},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{r=e},setBatchNotifyFunction:e=>{n=e},setScheduler:e=>{i=e}}}(),ft=new(c=class extends Le{constructor(){super(),Qe(this,s,!0),Qe(this,A),Qe(this,l),Ne(this,l,e=>{if(!Re&&window.addEventListener){const t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}})}onSubscribe(){Fe(this,A)||this.setEventListener(Fe(this,l))}onUnsubscribe(){var e;this.hasListeners()||(null==(e=Fe(this,A))||e.call(this),Ne(this,A,void 0))}setEventListener(e){var t;Ne(this,l,e),null==(t=Fe(this,A))||t.call(this),Ne(this,A,e(this.setOnline.bind(this)))}setOnline(e){Fe(this,s)!==e&&(Ne(this,s,e),this.listeners.forEach(t=>{t(e)}))}isOnline(){return Fe(this,s)}},s=new WeakMap,A=new WeakMap,l=new WeakMap,c);function mt(e){return Math.min(1e3*2**e,3e4)}function gt(e){return"online"!==(e??"online")||ft.isOnline()}var yt=class extends Error{constructor(e){super("CancelledError"),this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent}};function vt(e){let t,r=!1,n=0;const i=dt(),a=()=>"pending"!==i.status,o=()=>ut.isFocused()&&("always"===e.networkMode||ft.isOnline())&&e.canRun(),s=()=>gt(e.networkMode)&&e.canRun(),A=e=>{a()||(null==t||t(),i.resolve(e))},l=e=>{a()||(null==t||t(),i.reject(e))},c=()=>new Promise(r=>{var n;t=e=>{(a()||o())&&r(e)},null==(n=e.onPause)||n.call(e)}).then(()=>{var r;t=void 0,a()||null==(r=e.onContinue)||r.call(e)}),u=()=>{if(a())return;let t;const i=0===n?e.initialPromise:void 0;try{t=i??e.fn()}catch(s){t=Promise.reject(s)}Promise.resolve(t).then(A).catch(t=>{var i;if(a())return;const s=e.retry??(Re?0:3),A=e.retryDelay??mt,d="function"==typeof A?A(n,t):A,h=!0===s||"number"==typeof s&&n<s||"function"==typeof s&&s(n,t);var p;!r&&h?(n++,null==(i=e.onFail)||i.call(e,n,t),(p=d,new Promise(e=>{_e.setTimeout(e,p)})).then(()=>o()?void 0:c()).then(()=>{r?l(t):u()})):l(t)})};return{promise:i,status:()=>i.status,cancel:t=>{var r;if(!a()){const n=new yt(t);l(n),null==(r=e.onCancel)||r.call(e,n)}},continue:()=>(null==t||t(),i),cancelRetry:()=>{r=!0},continueRetry:()=>{r=!1},canStart:s,start:()=>(s()?u():c().then(u),i)}}var xt=(d=class{constructor(){Qe(this,u)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ze(this.gcTime)&&Ne(this,u,_e.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Re?1/0:3e5))}clearGcTimeout(){Fe(this,u)&&(_e.clearTimeout(Fe(this,u)),Ne(this,u,void 0))}},u=new WeakMap,d),wt=(b=class extends xt{constructor(e){super(),Qe(this,x),Qe(this,h),Qe(this,p),Qe(this,f),Qe(this,m),Qe(this,g),Qe(this,y),Qe(this,v),Ne(this,v,!1),Ne(this,y,e.defaultOptions),this.setOptions(e.options),this.observers=[],Ne(this,m,e.client),Ne(this,f,Fe(this,m).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,Ne(this,h,Bt(this.options)),this.state=e.state??Fe(this,h),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return null==(e=Fe(this,g))?void 0:e.promise}setOptions(e){if(this.options={...Fe(this,y),...e},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){const e=Bt(this.options);void 0!==e.data&&(this.setData(e.data,{updatedAt:e.dataUpdatedAt,manual:!0}),Ne(this,h,e))}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||Fe(this,f).remove(this)}setData(e,t){const r=at(this.state.data,e,this.options);return Ue(this,x,w).call(this,{data:r,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt,manual:null==t?void 0:t.manual}),r}setState(e,t){Ue(this,x,w).call(this,{type:"setState",state:e,setStateOptions:t})}cancel(e){var t,r;const n=null==(t=Fe(this,g))?void 0:t.promise;return null==(r=Fe(this,g))||r.cancel(e),n?n.then(Ke).catch(Ke):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(Fe(this,h))}isActive(){return this.observers.some(e=>!1!==We(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===At||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===$e(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(e=0){return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!Ve(this.state.dataUpdatedAt,e))}onFocus(){var e;const t=this.observers.find(e=>e.shouldFetchOnWindowFocus());null==t||t.refetch({cancelRefetch:!1}),null==(e=Fe(this,g))||e.continue()}onOnline(){var e;const t=this.observers.find(e=>e.shouldFetchOnReconnect());null==t||t.refetch({cancelRefetch:!1}),null==(e=Fe(this,g))||e.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),Fe(this,f).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(Fe(this,g)&&(Fe(this,v)?Fe(this,g).cancel({revert:!0}):Fe(this,g).cancelRetry()),this.scheduleGc()),Fe(this,f).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ue(this,x,w).call(this,{type:"invalidate"})}async fetch(e,t){var r,n,i,a,o,s,A,l,c,u,d,h;if("idle"!==this.state.fetchStatus&&"rejected"!==(null==(r=Fe(this,g))?void 0:r.status()))if(void 0!==this.state.data&&(null==t?void 0:t.cancelRefetch))this.cancel({silent:!0});else if(Fe(this,g))return Fe(this,g).continueRetry(),Fe(this,g).promise;if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}"production"!==process.env.NODE_ENV&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const y=new AbortController,b=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(Ne(this,v,!0),y.signal)})},B=()=>{const e=lt(this.options,t),r=(()=>{const e={client:Fe(this,m),queryKey:this.queryKey,meta:this.meta};return b(e),e})();return Ne(this,v,!1),this.options.persister?this.options.persister(e,r,this):e(r)},C=(()=>{const e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:Fe(this,m),state:this.state,fetchFn:B};return b(e),e})();null==(n=this.options.behavior)||n.onFetch(C,this),Ne(this,p,this.state),"idle"!==this.state.fetchStatus&&this.state.fetchMeta===(null==(i=C.fetchOptions)?void 0:i.meta)||Ue(this,x,w).call(this,{type:"fetch",meta:null==(a=C.fetchOptions)?void 0:a.meta}),Ne(this,g,vt({initialPromise:null==t?void 0:t.initialPromise,fn:C.fetchFn,onCancel:e=>{e instanceof yt&&e.revert&&this.setState({...Fe(this,p),fetchStatus:"idle"}),y.abort()},onFail:(e,t)=>{Ue(this,x,w).call(this,{type:"failed",failureCount:e,error:t})},onPause:()=>{Ue(this,x,w).call(this,{type:"pause"})},onContinue:()=>{Ue(this,x,w).call(this,{type:"continue"})},retry:C.options.retry,retryDelay:C.options.retryDelay,networkMode:C.options.networkMode,canRun:()=>!0}));try{const e=await Fe(this,g).start();if(void 0===e)throw"production"!==process.env.NODE_ENV&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),new Error(`${this.queryHash} data is undefined`);return this.setData(e),null==(s=(o=Fe(this,f).config).onSuccess)||s.call(o,e,this),null==(l=(A=Fe(this,f).config).onSettled)||l.call(A,e,this.state.error,this),e}catch(E){if(E instanceof yt){if(E.silent)return Fe(this,g).promise;if(E.revert){if(void 0===this.state.data)throw E;return this.state.data}}throw Ue(this,x,w).call(this,{type:"error",error:E}),null==(u=(c=Fe(this,f).config).onError)||u.call(c,E,this),null==(h=(d=Fe(this,f).config).onSettled)||h.call(d,this.state.data,E,this),E}finally{this.scheduleGc()}}},h=new WeakMap,p=new WeakMap,f=new WeakMap,m=new WeakMap,g=new WeakMap,y=new WeakMap,v=new WeakMap,x=new WeakSet,w=function(e){this.state=(t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...bt(t.data,this.options),fetchMeta:e.meta??null};case"success":const r={...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Ne(this,p,e.manual?r:void 0),r;case"error":const n=e.error;return{...t,error:n,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:n,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),pt.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),Fe(this,f).notify({query:this,type:"updated",action:e})})},b);function bt(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:gt(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}function Bt(e){const t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,n=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Ct=(G=class extends Le{constructor(e,t){super(),Qe(this,D),Qe(this,B),Qe(this,C),Qe(this,E),Qe(this,k),Qe(this,S),Qe(this,j),Qe(this,F),Qe(this,Q),Qe(this,N),Qe(this,U),Qe(this,O),Qe(this,I),Qe(this,T),Qe(this,P),Qe(this,M,new Set),this.options=t,Ne(this,B,e),Ne(this,Q,null),Ne(this,F,dt()),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(Fe(this,C).addObserver(this),Et(Fe(this,C),this.options)?Ue(this,D,L).call(this):this.updateResult(),Ue(this,D,K).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return kt(Fe(this,C),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return kt(Fe(this,C),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ue(this,D,z).call(this),Ue(this,D,V).call(this),Fe(this,C).removeObserver(this)}setOptions(e){const t=this.options,r=Fe(this,C);if(this.options=Fe(this,B).defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof We(this.options.enabled,Fe(this,C)))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ue(this,D,$).call(this),Fe(this,C).setOptions(this.options),t._defaulted&&!tt(this.options,t)&&Fe(this,B).getQueryCache().notify({type:"observerOptionsUpdated",query:Fe(this,C),observer:this});const n=this.hasListeners();n&&St(Fe(this,C),r,this.options,t)&&Ue(this,D,L).call(this),this.updateResult(),!n||Fe(this,C)===r&&We(this.options.enabled,Fe(this,C))===We(t.enabled,Fe(this,C))&&$e(this.options.staleTime,Fe(this,C))===$e(t.staleTime,Fe(this,C))||Ue(this,D,H).call(this);const i=Ue(this,D,_).call(this);!n||Fe(this,C)===r&&We(this.options.enabled,Fe(this,C))===We(t.enabled,Fe(this,C))&&i===Fe(this,P)||Ue(this,D,R).call(this,i)}getOptimisticResult(e){const t=Fe(this,B).getQueryCache().build(Fe(this,B),e),r=this.createResult(t,e);return function(e,t){if(!tt(e.getCurrentResult(),t))return!0;return!1}(this,r)&&(Ne(this,k,r),Ne(this,j,this.options),Ne(this,S,Fe(this,C).state)),r}getCurrentResult(){return Fe(this,k)}trackResult(e,t){return new Proxy(e,{get:(e,r)=>(this.trackProp(r),null==t||t(r),"promise"===r&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==Fe(this,F).status||Fe(this,F).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,r))})}trackProp(e){Fe(this,M).add(e)}getCurrentQuery(){return Fe(this,C)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=Fe(this,B).defaultQueryOptions(e),r=Fe(this,B).getQueryCache().build(Fe(this,B),t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return Ue(this,D,L).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),Fe(this,k)))}createResult(e,t){var r;const n=Fe(this,C),i=this.options,a=Fe(this,k),o=Fe(this,S),s=Fe(this,j),A=e!==n?e.state:Fe(this,E),{state:l}=e;let c,u={...l},d=!1;if(t._optimisticResults){const r=this.hasListeners(),a=!r&&Et(e,t),o=r&&St(e,n,t,i);(a||o)&&(u={...u,...bt(l.data,e.options)}),"isRestoring"===t._optimisticResults&&(u.fetchStatus="idle")}let{error:h,errorUpdatedAt:p,status:f}=u;c=u.data;let m=!1;if(void 0!==t.placeholderData&&void 0===c&&"pending"===f){let e;(null==a?void 0:a.isPlaceholderData)&&t.placeholderData===(null==s?void 0:s.placeholderData)?(e=a.data,m=!0):e="function"==typeof t.placeholderData?t.placeholderData(null==(r=Fe(this,O))?void 0:r.state.data,Fe(this,O)):t.placeholderData,void 0!==e&&(f="success",c=at(null==a?void 0:a.data,e,t),d=!0)}if(t.select&&void 0!==c&&!m)if(a&&c===(null==o?void 0:o.data)&&t.select===Fe(this,N))c=Fe(this,U);else try{Ne(this,N,t.select),c=t.select(c),c=at(null==a?void 0:a.data,c,t),Ne(this,U,c),Ne(this,Q,null)}catch(B){Ne(this,Q,B)}Fe(this,Q)&&(h=Fe(this,Q),c=Fe(this,U),p=Date.now(),f="error");const g="fetching"===u.fetchStatus,y="pending"===f,v="error"===f,x=y&&g,w=void 0!==c,b={status:f,fetchStatus:u.fetchStatus,isPending:y,isSuccess:"success"===f,isError:v,isInitialLoading:x,isLoading:x,data:c,dataUpdatedAt:u.dataUpdatedAt,error:h,errorUpdatedAt:p,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>A.dataUpdateCount||u.errorUpdateCount>A.errorUpdateCount,isFetching:g,isRefetching:g&&!y,isLoadingError:v&&!w,isPaused:"paused"===u.fetchStatus,isPlaceholderData:d,isRefetchError:v&&w,isStale:jt(e,t),refetch:this.refetch,promise:Fe(this,F),isEnabled:!1!==We(t.enabled,e)};if(this.options.experimental_prefetchInRender){const t=e=>{"error"===b.status?e.reject(b.error):void 0!==b.data&&e.resolve(b.data)},r=()=>{const e=Ne(this,F,b.promise=dt());t(e)},i=Fe(this,F);switch(i.status){case"pending":e.queryHash===n.queryHash&&t(i);break;case"fulfilled":"error"!==b.status&&b.data===i.value||r();break;case"rejected":"error"===b.status&&b.error===i.reason||r()}}return b}updateResult(){const e=Fe(this,k),t=this.createResult(Fe(this,C),this.options);if(Ne(this,S,Fe(this,C).state),Ne(this,j,this.options),void 0!==Fe(this,S).data&&Ne(this,O,Fe(this,C)),tt(t,e))return;Ne(this,k,t);Ue(this,D,W).call(this,{listeners:(()=>{if(!e)return!0;const{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!Fe(this,M).size)return!0;const n=new Set(r??Fe(this,M));return this.options.throwOnError&&n.add("error"),Object.keys(Fe(this,k)).some(t=>{const r=t;return Fe(this,k)[r]!==e[r]&&n.has(r)})})()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ue(this,D,K).call(this)}},B=new WeakMap,C=new WeakMap,E=new WeakMap,k=new WeakMap,S=new WeakMap,j=new WeakMap,F=new WeakMap,Q=new WeakMap,N=new WeakMap,U=new WeakMap,O=new WeakMap,I=new WeakMap,T=new WeakMap,P=new WeakMap,M=new WeakMap,D=new WeakSet,L=function(e){Ue(this,D,$).call(this);let t=Fe(this,C).fetch(this.options,e);return(null==e?void 0:e.throwOnError)||(t=t.catch(Ke)),t},H=function(){Ue(this,D,z).call(this);const e=$e(this.options.staleTime,Fe(this,C));if(Re||Fe(this,k).isStale||!ze(e))return;const t=Ve(Fe(this,k).dataUpdatedAt,e)+1;Ne(this,I,_e.setTimeout(()=>{Fe(this,k).isStale||this.updateResult()},t))},_=function(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(Fe(this,C)):this.options.refetchInterval)??!1},R=function(e){Ue(this,D,V).call(this),Ne(this,P,e),!Re&&!1!==We(this.options.enabled,Fe(this,C))&&ze(Fe(this,P))&&0!==Fe(this,P)&&Ne(this,T,_e.setInterval(()=>{(this.options.refetchIntervalInBackground||ut.isFocused())&&Ue(this,D,L).call(this)},Fe(this,P)))},K=function(){Ue(this,D,H).call(this),Ue(this,D,R).call(this,Ue(this,D,_).call(this))},z=function(){Fe(this,I)&&(_e.clearTimeout(Fe(this,I)),Ne(this,I,void 0))},V=function(){Fe(this,T)&&(_e.clearInterval(Fe(this,T)),Ne(this,T,void 0))},$=function(){const e=Fe(this,B).getQueryCache().build(Fe(this,B),this.options);if(e===Fe(this,C))return;const t=Fe(this,C);Ne(this,C,e),Ne(this,E,e.state),this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))},W=function(e){pt.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(Fe(this,k))}),Fe(this,B).getQueryCache().notify({query:Fe(this,C),type:"observerResultsUpdated"})})},G);function Et(e,t){return function(e,t){return!1!==We(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)}(e,t)||void 0!==e.state.data&&kt(e,t,t.refetchOnMount)}function kt(e,t,r){if(!1!==We(t.enabled,e)&&"static"!==$e(t.staleTime,e)){const n="function"==typeof r?r(e):r;return"always"===n||!1!==n&&jt(e,t)}return!1}function St(e,t,r,n){return(e!==t||!1===We(n.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&jt(e,r)}function jt(e,t){return!1!==We(t.enabled,e)&&e.isStaleByTime($e(t.staleTime,e))}function Ft(e){return{onFetch:(t,r)=>{var n,i,a,o,s;const A=t.options,l=null==(a=null==(i=null==(n=t.fetchOptions)?void 0:n.meta)?void 0:i.fetchMore)?void 0:a.direction,c=(null==(o=t.state.data)?void 0:o.pages)||[],u=(null==(s=t.state.data)?void 0:s.pageParams)||[];let d={pages:[],pageParams:[]},h=0;const p=async()=>{let r=!1;const n=lt(t.options,t.fetchOptions),i=async(e,i,a)=>{if(r)return Promise.reject();if(null==i&&e.pages.length)return Promise.resolve(e);const o=(()=>{const e={client:t.client,queryKey:t.queryKey,pageParam:i,direction:a?"backward":"forward",meta:t.options.meta};var n;return n=e,Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(t.signal.aborted?r=!0:t.signal.addEventListener("abort",()=>{r=!0}),t.signal)}),e})(),s=await n(o),{maxPages:A}=t.options,l=a?st:ot;return{pages:l(e.pages,s,A),pageParams:l(e.pageParams,i,A)}};if(l&&c.length){const e="backward"===l,t={pages:c,pageParams:u},r=(e?Nt:Qt)(A,t);d=await i(t,r,e)}else{const t=e??c.length;do{const e=0===h?u[0]??A.initialPageParam:Qt(A,d);if(h>0&&null==e)break;d=await i(d,e),h++}while(h<t)}return d};t.options.persister?t.fetchFn=()=>{var e,n;return null==(n=(e=t.options).persister)?void 0:n.call(e,p,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=p}}}function Qt(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function Nt(e,{pages:t,pageParams:r}){var n;return t.length>0?null==(n=e.getPreviousPageParam)?void 0:n.call(e,t[0],t,r[0],r):void 0}var Ut=(te=class extends xt{constructor(e){super(),Qe(this,Z),Qe(this,q),Qe(this,Y),Qe(this,X),Qe(this,J),Ne(this,q,e.client),this.mutationId=e.mutationId,Ne(this,X,e.mutationCache),Ne(this,Y,[]),this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){Fe(this,Y).includes(e)||(Fe(this,Y).push(e),this.clearGcTimeout(),Fe(this,X).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){Ne(this,Y,Fe(this,Y).filter(t=>t!==e)),this.scheduleGc(),Fe(this,X).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){Fe(this,Y).length||("pending"===this.state.status?this.scheduleGc():Fe(this,X).remove(this))}continue(){var e;return(null==(e=Fe(this,J))?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var t,r,n,i,a,o,s,A,l,c,u,d,h,p,f,m,g,y,v,x;const w=()=>{Ue(this,Z,ee).call(this,{type:"continue"})},b={client:Fe(this,q),meta:this.options.meta,mutationKey:this.options.mutationKey};Ne(this,J,vt({fn:()=>this.options.mutationFn?this.options.mutationFn(e,b):Promise.reject(new Error("No mutationFn found")),onFail:(e,t)=>{Ue(this,Z,ee).call(this,{type:"failed",failureCount:e,error:t})},onPause:()=>{Ue(this,Z,ee).call(this,{type:"pause"})},onContinue:w,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>Fe(this,X).canRun(this)}));const B="pending"===this.state.status,C=!Fe(this,J).canStart();try{if(B)w();else{Ue(this,Z,ee).call(this,{type:"pending",variables:e,isPaused:C}),await(null==(r=(t=Fe(this,X).config).onMutate)?void 0:r.call(t,e,this,b));const a=await(null==(i=(n=this.options).onMutate)?void 0:i.call(n,e,b));a!==this.state.context&&Ue(this,Z,ee).call(this,{type:"pending",context:a,variables:e,isPaused:C})}const h=await Fe(this,J).start();return await(null==(o=(a=Fe(this,X).config).onSuccess)?void 0:o.call(a,h,e,this.state.context,this,b)),await(null==(A=(s=this.options).onSuccess)?void 0:A.call(s,h,e,this.state.context,b)),await(null==(c=(l=Fe(this,X).config).onSettled)?void 0:c.call(l,h,null,this.state.variables,this.state.context,this,b)),await(null==(d=(u=this.options).onSettled)?void 0:d.call(u,h,null,e,this.state.context,b)),Ue(this,Z,ee).call(this,{type:"success",data:h}),h}catch(E){try{throw await(null==(p=(h=Fe(this,X).config).onError)?void 0:p.call(h,E,e,this.state.context,this,b)),await(null==(m=(f=this.options).onError)?void 0:m.call(f,E,e,this.state.context,b)),await(null==(y=(g=Fe(this,X).config).onSettled)?void 0:y.call(g,void 0,E,this.state.variables,this.state.context,this,b)),await(null==(x=(v=this.options).onSettled)?void 0:x.call(v,void 0,E,e,this.state.context,b)),E}finally{Ue(this,Z,ee).call(this,{type:"error",error:E})}}finally{Fe(this,X).runNext(this)}}},q=new WeakMap,Y=new WeakMap,X=new WeakMap,J=new WeakMap,Z=new WeakSet,ee=function(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),pt.batch(()=>{Fe(this,Y).forEach(t=>{t.onMutationUpdate(e)}),Fe(this,X).notify({mutation:this,type:"updated",action:e})})},te);var Ot=(ae=class extends Le{constructor(e={}){super(),Qe(this,re),Qe(this,ne),Qe(this,ie),this.config=e,Ne(this,re,new Set),Ne(this,ne,new Map),Ne(this,ie,0)}build(e,t,r){const n=new Ut({client:e,mutationCache:this,mutationId:++Oe(this,ie)._,options:e.defaultMutationOptions(t),state:r});return this.add(n),n}add(e){Fe(this,re).add(e);const t=It(e);if("string"==typeof t){const r=Fe(this,ne).get(t);r?r.push(e):Fe(this,ne).set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(Fe(this,re).delete(e)){const t=It(e);if("string"==typeof t){const r=Fe(this,ne).get(t);if(r)if(r.length>1){const t=r.indexOf(e);-1!==t&&r.splice(t,1)}else r[0]===e&&Fe(this,ne).delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=It(e);if("string"==typeof t){const r=Fe(this,ne).get(t),n=null==r?void 0:r.find(e=>"pending"===e.state.status);return!n||n===e}return!0}runNext(e){var t;const r=It(e);if("string"==typeof r){const n=null==(t=Fe(this,ne).get(r))?void 0:t.find(t=>t!==e&&t.state.isPaused);return(null==n?void 0:n.continue())??Promise.resolve()}return Promise.resolve()}clear(){pt.batch(()=>{Fe(this,re).forEach(e=>{this.notify({type:"removed",mutation:e})}),Fe(this,re).clear(),Fe(this,ne).clear()})}getAll(){return Array.from(Fe(this,re))}find(e){const t={exact:!0,...e};return this.getAll().find(e=>qe(t,e))}findAll(e={}){return this.getAll().filter(t=>qe(e,t))}notify(e){pt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(e=>e.state.isPaused);return pt.batch(()=>Promise.all(e.map(e=>e.continue().catch(Ke))))}},re=new WeakMap,ne=new WeakMap,ie=new WeakMap,ae);function It(e){var t;return null==(t=e.options.scope)?void 0:t.id}var Tt=(he=class extends Le{constructor(e,t){super(),Qe(this,ce),Qe(this,oe),Qe(this,se),Qe(this,Ae),Qe(this,le),Ne(this,oe,e),this.setOptions(t),this.bindMethods(),Ue(this,ce,ue).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var t;const r=this.options;this.options=Fe(this,oe).defaultMutationOptions(e),tt(this.options,r)||Fe(this,oe).getMutationCache().notify({type:"observerOptionsUpdated",mutation:Fe(this,Ae),observer:this}),(null==r?void 0:r.mutationKey)&&this.options.mutationKey&&Xe(r.mutationKey)!==Xe(this.options.mutationKey)?this.reset():"pending"===(null==(t=Fe(this,Ae))?void 0:t.state.status)&&Fe(this,Ae).setOptions(this.options)}onUnsubscribe(){var e;this.hasListeners()||null==(e=Fe(this,Ae))||e.removeObserver(this)}onMutationUpdate(e){Ue(this,ce,ue).call(this),Ue(this,ce,de).call(this,e)}getCurrentResult(){return Fe(this,se)}reset(){var e;null==(e=Fe(this,Ae))||e.removeObserver(this),Ne(this,Ae,void 0),Ue(this,ce,ue).call(this),Ue(this,ce,de).call(this)}mutate(e,t){var r;return Ne(this,le,t),null==(r=Fe(this,Ae))||r.removeObserver(this),Ne(this,Ae,Fe(this,oe).getMutationCache().build(Fe(this,oe),this.options)),Fe(this,Ae).addObserver(this),Fe(this,Ae).execute(e)}},oe=new WeakMap,se=new WeakMap,Ae=new WeakMap,le=new WeakMap,ce=new WeakSet,ue=function(){var e;const t=(null==(e=Fe(this,Ae))?void 0:e.state)??{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0};Ne(this,se,{...t,isPending:"pending"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset})},de=function(e){pt.batch(()=>{var t,r,n,i,a,o,s,A;if(Fe(this,le)&&this.hasListeners()){const l=Fe(this,se).variables,c=Fe(this,se).context,u={client:Fe(this,oe),meta:this.options.meta,mutationKey:this.options.mutationKey};"success"===(null==e?void 0:e.type)?(null==(r=(t=Fe(this,le)).onSuccess)||r.call(t,e.data,l,c,u),null==(i=(n=Fe(this,le)).onSettled)||i.call(n,e.data,null,l,c,u)):"error"===(null==e?void 0:e.type)&&(null==(o=(a=Fe(this,le)).onError)||o.call(a,e.error,l,c,u),null==(A=(s=Fe(this,le)).onSettled)||A.call(s,void 0,e.error,l,c,u))}this.listeners.forEach(e=>{e(Fe(this,se))})})},he),Pt=(fe=class extends Le{constructor(e={}){super(),Qe(this,pe),this.config=e,Ne(this,pe,new Map)}build(e,t,r){const n=t.queryKey,i=t.queryHash??Ye(n,t);let a=this.get(i);return a||(a=new wt({client:e,queryKey:n,queryHash:i,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(n)}),this.add(a)),a}add(e){Fe(this,pe).has(e.queryHash)||(Fe(this,pe).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=Fe(this,pe).get(e.queryHash);t&&(e.destroy(),t===e&&Fe(this,pe).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){pt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return Fe(this,pe).get(e)}getAll(){return[...Fe(this,pe).values()]}find(e){const t={exact:!0,...e};return this.getAll().find(e=>Ge(t,e))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(t=>Ge(e,t)):t}notify(e){pt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){pt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){pt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},pe=new WeakMap,fe),Mt=(Ce=class{constructor(e={}){Qe(this,me),Qe(this,ge),Qe(this,ye),Qe(this,ve),Qe(this,xe),Qe(this,we),Qe(this,be),Qe(this,Be),Ne(this,me,e.queryCache||new Pt),Ne(this,ge,e.mutationCache||new Ot),Ne(this,ye,e.defaultOptions||{}),Ne(this,ve,new Map),Ne(this,xe,new Map),Ne(this,we,0)}mount(){Oe(this,we)._++,1===Fe(this,we)&&(Ne(this,be,ut.subscribe(async e=>{e&&(await this.resumePausedMutations(),Fe(this,me).onFocus())})),Ne(this,Be,ft.subscribe(async e=>{e&&(await this.resumePausedMutations(),Fe(this,me).onOnline())})))}unmount(){var e,t;Oe(this,we)._--,0===Fe(this,we)&&(null==(e=Fe(this,be))||e.call(this),Ne(this,be,void 0),null==(t=Fe(this,Be))||t.call(this),Ne(this,Be,void 0))}isFetching(e){return Fe(this,me).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return Fe(this,ge).findAll({...e,status:"pending"}).length}getQueryData(e){var t;const r=this.defaultQueryOptions({queryKey:e});return null==(t=Fe(this,me).get(r.queryHash))?void 0:t.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=Fe(this,me).build(this,t),n=r.state.data;return void 0===n?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime($e(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return Fe(this,me).findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=Fe(this,me).get(n.queryHash),a=function(e,t){return"function"==typeof e?e(t):e}(t,null==i?void 0:i.state.data);if(void 0!==a)return Fe(this,me).build(this,n).setData(a,{...r,manual:!0})}setQueriesData(e,t,r){return pt.batch(()=>Fe(this,me).findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,r)]))}getQueryState(e){var t;const r=this.defaultQueryOptions({queryKey:e});return null==(t=Fe(this,me).get(r.queryHash))?void 0:t.state}removeQueries(e){const t=Fe(this,me);pt.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){const r=Fe(this,me);return pt.batch(()=>(r.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=pt.batch(()=>Fe(this,me).findAll(e).map(e=>e.cancel(r)));return Promise.all(n).then(Ke).catch(Ke)}invalidateQueries(e,t={}){return pt.batch(()=>(Fe(this,me).findAll(e).forEach(e=>{e.invalidate()}),"none"===(null==e?void 0:e.refetchType)?Promise.resolve():this.refetchQueries({...e,type:(null==e?void 0:e.refetchType)??(null==e?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=pt.batch(()=>Fe(this,me).findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,r);return r.throwOnError||(t=t.catch(Ke)),"paused"===e.state.fetchStatus?Promise.resolve():t}));return Promise.all(n).then(Ke)}fetchQuery(e){const t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);const r=Fe(this,me).build(this,t);return r.isStaleByTime($e(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ke).catch(Ke)}fetchInfiniteQuery(e){return e.behavior=Ft(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ke).catch(Ke)}ensureInfiniteQueryData(e){return e.behavior=Ft(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ft.isOnline()?Fe(this,ge).resumePausedMutations():Promise.resolve()}getQueryCache(){return Fe(this,me)}getMutationCache(){return Fe(this,ge)}getDefaultOptions(){return Fe(this,ye)}setDefaultOptions(e){Ne(this,ye,e)}setQueryDefaults(e,t){Fe(this,ve).set(Xe(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...Fe(this,ve).values()],r={};return t.forEach(t=>{Je(e,t.queryKey)&&Object.assign(r,t.defaultOptions)}),r}setMutationDefaults(e,t){Fe(this,xe).set(Xe(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...Fe(this,xe).values()],r={};return t.forEach(t=>{Je(e,t.mutationKey)&&Object.assign(r,t.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...Fe(this,ye).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ye(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===At&&(t.enabled=!1),t}defaultMutationOptions(e){return(null==e?void 0:e._defaulted)?e:{...Fe(this,ye).mutations,...(null==e?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){Fe(this,me).clear(),Fe(this,ge).clear()}},me=new WeakMap,ge=new WeakMap,ye=new WeakMap,ve=new WeakMap,xe=new WeakMap,we=new WeakMap,be=new WeakMap,Be=new WeakMap,Ce),Dt=De.createContext(void 0),Lt=e=>{const t=De.useContext(Dt);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Ht=({client:e,children:t})=>(De.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),Ie.jsx(Dt.Provider,{value:e,children:t})),_t=De.createContext(!1);_t.Provider;var Rt=De.createContext(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}()),Kt=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function zt(e,t,r){var n,i,a,o,s;if("production"!==process.env.NODE_ENV&&("object"!=typeof e||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const A=De.useContext(_t),l=De.useContext(Rt),c=Lt(),u=c.defaultQueryOptions(e);null==(i=null==(n=c.getDefaultOptions().queries)?void 0:n._experimental_beforeQuery)||i.call(n,u),"production"!==process.env.NODE_ENV&&(u.queryFn||console.error(`[${u.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),u._optimisticResults=A?"isRestoring":"optimistic",(e=>{if(e.suspense){const t=1e3,r=e=>"static"===e?e:Math.max(e??t,t),n=e.staleTime;e.staleTime="function"==typeof n?(...e)=>r(n(...e)):r(n),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,t))}})(u),((e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))})(u,l),(e=>{De.useEffect(()=>{e.clearReset()},[e])})(l);const d=!c.getQueryCache().get(u.queryHash),[h]=De.useState(()=>new t(c,u)),p=h.getOptimisticResult(u),f=!A&&!1!==e.subscribed;if(De.useSyncExternalStore(De.useCallback(e=>{const t=f?h.subscribe(pt.batchCalls(e)):Ke;return h.updateResult(),t},[h,f]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),De.useEffect(()=>{h.setOptions(u)},[u,h]),((e,t)=>(null==e?void 0:e.suspense)&&t.isPending)(u,p))throw Kt(u,h,l);if((({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&void 0===e.data||ct(r,[e.error,n])))({result:p,errorResetBoundary:l,throwOnError:u.throwOnError,query:c.getQueryCache().get(u.queryHash),suspense:u.suspense}))throw p.error;if(null==(o=null==(a=c.getDefaultOptions().queries)?void 0:a._experimental_afterQuery)||o.call(a,u,p),u.experimental_prefetchInRender&&!Re&&((e,t)=>e.isLoading&&e.isFetching&&!t)(p,A)){const e=d?Kt(u,h,l):null==(s=c.getQueryCache().get(u.queryHash))?void 0:s.promise;null==e||e.catch(Ke).finally(()=>{h.updateResult()})}return u.notifyOnChangeProps?p:h.trackResult(p)}function Vt(e,t){const r=Lt(),[n]=De.useState(()=>new Tt(r,e));De.useEffect(()=>{n.setOptions(e)},[n,e]);const i=De.useSyncExternalStore(De.useCallback(e=>n.subscribe(pt.batchCalls(e)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),a=De.useCallback((e,t)=>{n.mutate(e,t).catch(Ke)},[n]);if(i.error&&ct(n.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}function $t(e,t){return function(){return e.apply(t,arguments)}}const{toString:Wt}=Object.prototype,{getPrototypeOf:Gt}=Object,{iterator:qt,toStringTag:Yt}=Symbol,Xt=(e=>t=>{const r=Wt.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Jt=e=>(e=e.toLowerCase(),t=>Xt(t)===e),Zt=e=>t=>typeof t===e,{isArray:er}=Array,tr=Zt("undefined");function rr(e){return null!==e&&!tr(e)&&null!==e.constructor&&!tr(e.constructor)&&ar(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const nr=Jt("ArrayBuffer");const ir=Zt("string"),ar=Zt("function"),or=Zt("number"),sr=e=>null!==e&&"object"==typeof e,Ar=e=>{if("object"!==Xt(e))return!1;const t=Gt(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Yt in e||qt in e)},lr=Jt("Date"),cr=Jt("File"),ur=Jt("Blob"),dr=Jt("FileList"),hr=Jt("URLSearchParams"),[pr,fr,mr,gr]=["ReadableStream","Request","Response","Headers"].map(Jt);function yr(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,i;if("object"!=typeof e&&(e=[e]),er(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{if(rr(e))return;const i=r?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length;let o;for(n=0;n<a;n++)o=i[n],t.call(null,e[o],o,e)}}function vr(e,t){if(rr(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n,i=r.length;for(;i-- >0;)if(n=r[i],t===n.toLowerCase())return n;return null}const xr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,wr=e=>!tr(e)&&e!==xr;const br=(e=>t=>e&&t instanceof e)("undefined"!=typeof Uint8Array&&Gt(Uint8Array)),Br=Jt("HTMLFormElement"),Cr=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Er=Jt("RegExp"),kr=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};yr(r,(r,i)=>{let a;!1!==(a=t(r,i,e))&&(n[i]=a||r)}),Object.defineProperties(e,n)};const Sr=Jt("AsyncFunction"),jr=(Fr="function"==typeof setImmediate,Qr=ar(xr.postMessage),Fr?setImmediate:Qr?(Nr=`axios@${Math.random()}`,Ur=[],xr.addEventListener("message",({source:e,data:t})=>{e===xr&&t===Nr&&Ur.length&&Ur.shift()()},!1),e=>{Ur.push(e),xr.postMessage(Nr,"*")}):e=>setTimeout(e));var Fr,Qr,Nr,Ur;const Or="undefined"!=typeof queueMicrotask?queueMicrotask.bind(xr):"undefined"!=typeof process&&process.nextTick||jr,Ir={isArray:er,isArrayBuffer:nr,isBuffer:rr,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||ar(e.append)&&("formdata"===(t=Xt(e))||"object"===t&&ar(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&nr(e.buffer),t},isString:ir,isNumber:or,isBoolean:e=>!0===e||!1===e,isObject:sr,isPlainObject:Ar,isEmptyObject:e=>{if(!sr(e)||rr(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(eX){return!1}},isReadableStream:pr,isRequest:fr,isResponse:mr,isHeaders:gr,isUndefined:tr,isDate:lr,isFile:cr,isBlob:ur,isRegExp:Er,isFunction:ar,isStream:e=>sr(e)&&ar(e.pipe),isURLSearchParams:hr,isTypedArray:br,isFileList:dr,forEach:yr,merge:function e(){const{caseless:t,skipUndefined:r}=wr(this)&&this||{},n={},i=(i,a)=>{const o=t&&vr(n,a)||a;Ar(n[o])&&Ar(i)?n[o]=e(n[o],i):Ar(i)?n[o]=e({},i):er(i)?n[o]=i.slice():r&&tr(i)||(n[o]=i)};for(let a=0,o=arguments.length;a<o;a++)arguments[a]&&yr(arguments[a],i);return n},extend:(e,t,r,{allOwnKeys:n}={})=>(yr(t,(t,n)=>{r&&ar(t)?e[n]=$t(t,r):e[n]=t},{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let i,a,o;const s={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],n&&!n(o,e,t)||s[o]||(t[o]=e[o],s[o]=!0);e=!1!==r&&Gt(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:Xt,kindOfTest:Jt,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(er(e))return e;let t=e.length;if(!or(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[qt]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:Br,hasOwnProperty:Cr,hasOwnProp:Cr,reduceDescriptors:kr,freezeMethods:e=>{kr(e,(t,r)=>{if(ar(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];ar(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))})},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach(e=>{r[e]=!0})};return er(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:vr,global:xr,isContextDefined:wr,isSpecCompliantForm:function(e){return!!(e&&ar(e.append)&&"FormData"===e[Yt]&&e[qt])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(sr(e)){if(t.indexOf(e)>=0)return;if(rr(e))return e;if(!("toJSON"in e)){t[n]=e;const i=er(e)?[]:{};return yr(e,(e,t)=>{const a=r(e,n+1);!tr(a)&&(i[t]=a)}),t[n]=void 0,i}}return e};return r(e,0)},isAsyncFn:Sr,isThenable:e=>e&&(sr(e)||ar(e))&&ar(e.then)&&ar(e.catch),setImmediate:jr,asap:Or,isIterable:e=>null!=e&&ar(e[qt])};function Tr(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}Ir.inherits(Tr,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ir.toJSONObject(this.config),code:this.code,status:this.status}}});const Pr=Tr.prototype,Mr={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Mr[e]={value:e}}),Object.defineProperties(Tr,Mr),Object.defineProperty(Pr,"isAxiosError",{value:!0}),Tr.from=(e,t,r,n,i,a)=>{const o=Object.create(Pr);Ir.toFlatObject(e,o,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e);const s=e&&e.message?e.message:"Error",A=null==t&&e?e.code:t;return Tr.call(o,s,A,r,n,i),e&&null==o.cause&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",a&&Object.assign(o,a),o};function Dr(e){return Ir.isPlainObject(e)||Ir.isArray(e)}function Lr(e){return Ir.endsWith(e,"[]")?e.slice(0,-2):e}function Hr(e,t,r){return e?e.concat(t).map(function(e,t){return e=Lr(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}const _r=Ir.toFlatObject(Ir,{},null,function(e){return/^is[A-Z]/.test(e)});function Rr(e,t,r){if(!Ir.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=Ir.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!Ir.isUndefined(t[e])})).metaTokens,i=r.visitor||l,a=r.dots,o=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&Ir.isSpecCompliantForm(t);if(!Ir.isFunction(i))throw new TypeError("visitor must be a function");function A(e){if(null===e)return"";if(Ir.isDate(e))return e.toISOString();if(Ir.isBoolean(e))return e.toString();if(!s&&Ir.isBlob(e))throw new Tr("Blob is not supported. Use a Buffer instead.");return Ir.isArrayBuffer(e)||Ir.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,r,i){let s=e;if(e&&!i&&"object"==typeof e)if(Ir.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(Ir.isArray(e)&&function(e){return Ir.isArray(e)&&!e.some(Dr)}(e)||(Ir.isFileList(e)||Ir.endsWith(r,"[]"))&&(s=Ir.toArray(e)))return r=Lr(r),s.forEach(function(e,n){!Ir.isUndefined(e)&&null!==e&&t.append(!0===o?Hr([r],n,a):null===o?r:r+"[]",A(e))}),!1;return!!Dr(e)||(t.append(Hr(i,r,a),A(e)),!1)}const c=[],u=Object.assign(_r,{defaultVisitor:l,convertValue:A,isVisitable:Dr});if(!Ir.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!Ir.isUndefined(r)){if(-1!==c.indexOf(r))throw Error("Circular reference detected in "+n.join("."));c.push(r),Ir.forEach(r,function(r,a){!0===(!(Ir.isUndefined(r)||null===r)&&i.call(t,r,Ir.isString(a)?a.trim():a,n,u))&&e(r,n?n.concat(a):[a])}),c.pop()}}(e),t}function Kr(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function zr(e,t){this._pairs=[],e&&Rr(e,this,t)}const Vr=zr.prototype;function $r(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Wr(e,t,r){if(!t)return e;const n=r&&r.encode||$r;Ir.isFunction(r)&&(r={serialize:r});const i=r&&r.serialize;let a;if(a=i?i(t,r):Ir.isURLSearchParams(t)?t.toString():new zr(t,r).toString(n),a){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}Vr.append=function(e,t){this._pairs.push([e,t])},Vr.toString=function(e){const t=e?function(t){return e.call(this,t,Kr)}:Kr;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};class Gr{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Ir.forEach(this.handlers,function(t){null!==t&&e(t)})}}const qr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Yr={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:zr,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Xr="undefined"!=typeof window&&"undefined"!=typeof document,Jr="object"==typeof navigator&&navigator||void 0,Zr=Xr&&(!Jr||["ReactNative","NativeScript","NS"].indexOf(Jr.product)<0),en="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,tn=Xr&&window.location.href||"http://localhost",rn={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Xr,hasStandardBrowserEnv:Zr,hasStandardBrowserWebWorkerEnv:en,navigator:Jr,origin:tn},Symbol.toStringTag,{value:"Module"})),...Yr};function nn(e){function t(e,r,n,i){let a=e[i++];if("__proto__"===a)return!0;const o=Number.isFinite(+a),s=i>=e.length;if(a=!a&&Ir.isArray(n)?n.length:a,s)return Ir.hasOwnProp(n,a)?n[a]=[n[a],r]:n[a]=r,!o;n[a]&&Ir.isObject(n[a])||(n[a]=[]);return t(e,r,n[a],i)&&Ir.isArray(n[a])&&(n[a]=function(e){const t={},r=Object.keys(e);let n;const i=r.length;let a;for(n=0;n<i;n++)a=r[n],t[a]=e[a];return t}(n[a])),!o}if(Ir.isFormData(e)&&Ir.isFunction(e.entries)){const r={};return Ir.forEachEntry(e,(e,n)=>{t(function(e){return Ir.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),n,r,0)}),r}return null}const an={transitional:qr,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,i=Ir.isObject(e);i&&Ir.isHTMLForm(e)&&(e=new FormData(e));if(Ir.isFormData(e))return n?JSON.stringify(nn(e)):e;if(Ir.isArrayBuffer(e)||Ir.isBuffer(e)||Ir.isStream(e)||Ir.isFile(e)||Ir.isBlob(e)||Ir.isReadableStream(e))return e;if(Ir.isArrayBufferView(e))return e.buffer;if(Ir.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Rr(e,new rn.classes.URLSearchParams,{visitor:function(e,t,r,n){return rn.isNode&&Ir.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((a=Ir.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Rr(a?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||n?(t.setContentType("application/json",!1),function(e,t,r){if(Ir.isString(e))try{return(t||JSON.parse)(e),Ir.trim(e)}catch(eX){if("SyntaxError"!==eX.name)throw eX}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||an.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(Ir.isResponse(e)||Ir.isReadableStream(e))return e;if(e&&Ir.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e,this.parseReviver)}catch(eX){if(r){if("SyntaxError"===eX.name)throw Tr.from(eX,Tr.ERR_BAD_RESPONSE,this,null,this.response);throw eX}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:rn.classes.FormData,Blob:rn.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ir.forEach(["delete","get","head","post","put","patch"],e=>{an.headers[e]={}});const on=Ir.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),sn=Symbol("internals");function An(e){return e&&String(e).trim().toLowerCase()}function ln(e){return!1===e||null==e?e:Ir.isArray(e)?e.map(ln):String(e)}function cn(e,t,r,n,i){return Ir.isFunction(n)?n.call(this,t,r):(i&&(t=r),Ir.isString(t)?Ir.isString(n)?-1!==t.indexOf(n):Ir.isRegExp(n)?n.test(t):void 0:void 0)}let un=class{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function i(e,t,r){const i=An(t);if(!i)throw new Error("header name must be a non-empty string");const a=Ir.findKey(n,i);(!a||void 0===n[a]||!0===r||void 0===r&&!1!==n[a])&&(n[a||t]=ln(e))}const a=(e,t)=>Ir.forEach(e,(e,r)=>i(e,r,t));if(Ir.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(Ir.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))a((e=>{const t={};let r,n,i;return e&&e.split("\n").forEach(function(e){i=e.indexOf(":"),r=e.substring(0,i).trim().toLowerCase(),n=e.substring(i+1).trim(),!r||t[r]&&on[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t})(e),t);else if(Ir.isObject(e)&&Ir.isIterable(e)){let r,n,i={};for(const t of e){if(!Ir.isArray(t))throw TypeError("Object iterator must return a key-value pair");i[n=t[0]]=(r=i[n])?Ir.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}a(i,t)}else null!=e&&i(t,e,r);return this}get(e,t){if(e=An(e)){const r=Ir.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(Ir.isFunction(t))return t.call(this,e,r);if(Ir.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=An(e)){const r=Ir.findKey(this,e);return!(!r||void 0===this[r]||t&&!cn(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function i(e){if(e=An(e)){const i=Ir.findKey(r,e);!i||t&&!cn(0,r[i],i,t)||(delete r[i],n=!0)}}return Ir.isArray(e)?e.forEach(i):i(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const i=t[r];e&&!cn(0,this[i],i,e,!0)||(delete this[i],n=!0)}return n}normalize(e){const t=this,r={};return Ir.forEach(this,(n,i)=>{const a=Ir.findKey(r,i);if(a)return t[a]=ln(n),void delete t[i];const o=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}(i):String(i).trim();o!==i&&delete t[i],t[o]=ln(n),r[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Ir.forEach(this,(r,n)=>{null!=r&&!1!==r&&(t[n]=e&&Ir.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach(e=>r.set(e)),r}static accessor(e){const t=(this[sn]=this[sn]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=An(e);t[n]||(!function(e,t){const r=Ir.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:!0})})}(r,e),t[n]=!0)}return Ir.isArray(e)?e.forEach(n):n(e),this}};function dn(e,t){const r=this||an,n=t||r,i=un.from(n.headers);let a=n.data;return Ir.forEach(e,function(e){a=e.call(r,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function hn(e){return!(!e||!e.__CANCEL__)}function pn(e,t,r){Tr.call(this,null==e?"canceled":e,Tr.ERR_CANCELED,t,r),this.name="CanceledError"}function fn(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new Tr("Request failed with status code "+r.status,[Tr.ERR_BAD_REQUEST,Tr.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}un.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ir.reduceDescriptors(un.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}),Ir.freezeMethods(un),Ir.inherits(pn,Tr,{__CANCEL__:!0});const mn=(e,t,r=3)=>{let n=0;const i=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i,a=0,o=0;return t=void 0!==t?t:1e3,function(s){const A=Date.now(),l=n[o];i||(i=A),r[a]=s,n[a]=A;let c=o,u=0;for(;c!==a;)u+=r[c++],c%=e;if(a=(a+1)%e,a===o&&(o=(o+1)%e),A-i<t)return;const d=l&&A-l;return d?Math.round(1e3*u/d):void 0}}(50,250);return function(e,t){let r,n,i=0,a=1e3/t;const o=(t,a=Date.now())=>{i=a,r=null,n&&(clearTimeout(n),n=null),e(...t)};return[(...e)=>{const t=Date.now(),s=t-i;s>=a?o(e,t):(r=e,n||(n=setTimeout(()=>{n=null,o(r)},a-s)))},()=>r&&o(r)]}(r=>{const a=r.loaded,o=r.lengthComputable?r.total:void 0,s=a-n,A=i(s);n=a;e({loaded:a,total:o,progress:o?a/o:void 0,bytes:s,rate:A||void 0,estimated:A&&o&&a<=o?(o-a)/A:void 0,event:r,lengthComputable:null!=o,[t?"download":"upload"]:!0})},r)},gn=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},yn=e=>(...t)=>Ir.asap(()=>e(...t)),vn=rn.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,rn.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(rn.origin),rn.navigator&&/(msie|trident)/i.test(rn.navigator.userAgent)):()=>!0,xn=rn.hasStandardBrowserEnv?{write(e,t,r,n,i,a){const o=[e+"="+encodeURIComponent(t)];Ir.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),Ir.isString(n)&&o.push("path="+n),Ir.isString(i)&&o.push("domain="+i),!0===a&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function wn(e,t,r){let n=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(n||0==r)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const bn=e=>e instanceof un?{...e}:e;function Bn(e,t){t=t||{};const r={};function n(e,t,r,n){return Ir.isPlainObject(e)&&Ir.isPlainObject(t)?Ir.merge.call({caseless:n},e,t):Ir.isPlainObject(t)?Ir.merge({},t):Ir.isArray(t)?t.slice():t}function i(e,t,r,i){return Ir.isUndefined(t)?Ir.isUndefined(e)?void 0:n(void 0,e,0,i):n(e,t,0,i)}function a(e,t){if(!Ir.isUndefined(t))return n(void 0,t)}function o(e,t){return Ir.isUndefined(t)?Ir.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function s(r,i,a){return a in t?n(r,i):a in e?n(void 0,r):void 0}const A={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(e,t,r)=>i(bn(e),bn(t),0,!0)};return Ir.forEach(Object.keys({...e,...t}),function(n){const a=A[n]||i,o=a(e[n],t[n],n);Ir.isUndefined(o)&&a!==s||(r[n]=o)}),r}const Cn=e=>{const t=Bn({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:a,headers:o,auth:s}=t;if(t.headers=o=un.from(o),t.url=Wr(wn(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&o.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),Ir.isFormData(r))if(rn.hasStandardBrowserEnv||rn.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(Ir.isFunction(r.getHeaders)){const e=r.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,r])=>{t.includes(e.toLowerCase())&&o.set(e,r)})}if(rn.hasStandardBrowserEnv&&(n&&Ir.isFunction(n)&&(n=n(t)),n||!1!==n&&vn(t.url))){const e=i&&a&&xn.read(a);e&&o.set(i,e)}return t},En="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,r){const n=Cn(e);let i=n.data;const a=un.from(n.headers).normalize();let o,s,A,l,c,{responseType:u,onUploadProgress:d,onDownloadProgress:h}=n;function p(){l&&l(),c&&c(),n.cancelToken&&n.cancelToken.unsubscribe(o),n.signal&&n.signal.removeEventListener("abort",o)}let f=new XMLHttpRequest;function m(){if(!f)return;const n=un.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders());fn(function(e){t(e),p()},function(e){r(e),p()},{data:u&&"text"!==u&&"json"!==u?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:n,config:e,request:f}),f=null}f.open(n.method.toUpperCase(),n.url,!0),f.timeout=n.timeout,"onloadend"in f?f.onloadend=m:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(m)},f.onabort=function(){f&&(r(new Tr("Request aborted",Tr.ECONNABORTED,e,f)),f=null)},f.onerror=function(t){const n=new Tr(t&&t.message?t.message:"Network Error",Tr.ERR_NETWORK,e,f);n.event=t||null,r(n),f=null},f.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const i=n.transitional||qr;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new Tr(t,i.clarifyTimeoutError?Tr.ETIMEDOUT:Tr.ECONNABORTED,e,f)),f=null},void 0===i&&a.setContentType(null),"setRequestHeader"in f&&Ir.forEach(a.toJSON(),function(e,t){f.setRequestHeader(t,e)}),Ir.isUndefined(n.withCredentials)||(f.withCredentials=!!n.withCredentials),u&&"json"!==u&&(f.responseType=n.responseType),h&&([A,c]=mn(h,!0),f.addEventListener("progress",A)),d&&f.upload&&([s,l]=mn(d),f.upload.addEventListener("progress",s),f.upload.addEventListener("loadend",l)),(n.cancelToken||n.signal)&&(o=t=>{f&&(r(!t||t.type?new pn(null,e,f):t),f.abort(),f=null)},n.cancelToken&&n.cancelToken.subscribe(o),n.signal&&(n.signal.aborted?o():n.signal.addEventListener("abort",o)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);g&&-1===rn.protocols.indexOf(g)?r(new Tr("Unsupported protocol "+g+":",Tr.ERR_BAD_REQUEST,e)):f.send(i||null)})},kn=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const i=function(e){if(!r){r=!0,o();const t=e instanceof Error?e:this.reason;n.abort(t instanceof Tr?t:new pn(t instanceof Error?t.message:t))}};let a=t&&setTimeout(()=>{a=null,i(new Tr(`timeout ${t} of ms exceeded`,Tr.ETIMEDOUT))},t);const o=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener("abort",i)}),e=null)};e.forEach(e=>e.addEventListener("abort",i));const{signal:s}=n;return s.unsubscribe=()=>Ir.asap(o),s}},Sn=function*(e,t){let r=e.byteLength;if(r<t)return void(yield e);let n,i=0;for(;i<r;)n=i+t,yield e.slice(i,n),i=n},jn=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},Fn=(e,t,r,n)=>{const i=async function*(e,t){for await(const r of jn(e))yield*Sn(r,t)}(e,t);let a,o=0,s=e=>{a||(a=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await i.next();if(t)return s(),void e.close();let a=n.byteLength;if(r){let e=o+=a;r(e)}e.enqueue(new Uint8Array(n))}catch(t){throw s(t),t}},cancel:e=>(s(e),i.return())},{highWaterMark:2})},{isFunction:Qn}=Ir,Nn=(({Request:e,Response:t})=>({Request:e,Response:t}))(Ir.global),{ReadableStream:Un,TextEncoder:On}=Ir.global,In=(e,...t)=>{try{return!!e(...t)}catch(eX){return!1}},Tn=e=>{e=Ir.merge.call({skipUndefined:!0},Nn,e);const{fetch:t,Request:r,Response:n}=e,i=t?Qn(t):"function"==typeof fetch,a=Qn(r),o=Qn(n);if(!i)return!1;const s=i&&Qn(Un),A=i&&("function"==typeof On?(e=>t=>e.encode(t))(new On):async e=>new Uint8Array(await new r(e).arrayBuffer())),l=a&&s&&In(()=>{let e=!1;const t=new r(rn.origin,{body:new Un,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),c=o&&s&&In(()=>Ir.isReadableStream(new n("").body)),u={stream:c&&(e=>e.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!u[e]&&(u[e]=(t,r)=>{let n=t&&t[e];if(n)return n.call(t);throw new Tr(`Response type '${e}' is not supported`,Tr.ERR_NOT_SUPPORT,r)})});const d=async(e,t)=>{const n=Ir.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(Ir.isBlob(e))return e.size;if(Ir.isSpecCompliantForm(e)){const t=new r(rn.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Ir.isArrayBufferView(e)||Ir.isArrayBuffer(e)?e.byteLength:(Ir.isURLSearchParams(e)&&(e+=""),Ir.isString(e)?(await A(e)).byteLength:void 0)})(t):n};return async e=>{let{url:i,method:o,data:s,signal:A,cancelToken:h,timeout:p,onDownloadProgress:f,onUploadProgress:m,responseType:g,headers:y,withCredentials:v="same-origin",fetchOptions:x}=Cn(e),w=t||fetch;g=g?(g+"").toLowerCase():"text";let b=kn([A,h&&h.toAbortSignal()],p),B=null;const C=b&&b.unsubscribe&&(()=>{b.unsubscribe()});let E;try{if(m&&l&&"get"!==o&&"head"!==o&&0!==(E=await d(y,s))){let e,t=new r(i,{method:"POST",body:s,duplex:"half"});if(Ir.isFormData(s)&&(e=t.headers.get("content-type"))&&y.setContentType(e),t.body){const[e,r]=gn(E,mn(yn(m)));s=Fn(t.body,65536,e,r)}}Ir.isString(v)||(v=v?"include":"omit");const t=a&&"credentials"in r.prototype,A={...x,signal:b,method:o.toUpperCase(),headers:y.normalize().toJSON(),body:s,duplex:"half",credentials:t?v:void 0};B=a&&new r(i,A);let h=await(a?w(B,x):w(i,A));const p=c&&("stream"===g||"response"===g);if(c&&(f||p&&C)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=h[t]});const t=Ir.toFiniteNumber(h.headers.get("content-length")),[r,i]=f&&gn(t,mn(yn(f),!0))||[];h=new n(Fn(h.body,65536,r,()=>{i&&i(),C&&C()}),e)}g=g||"text";let k=await u[Ir.findKey(u,g)||"text"](h,e);return!p&&C&&C(),await new Promise((t,r)=>{fn(t,r,{data:k,headers:un.from(h.headers),status:h.status,statusText:h.statusText,config:e,request:B})})}catch(k){if(C&&C(),k&&"TypeError"===k.name&&/Load failed|fetch/i.test(k.message))throw Object.assign(new Tr("Network Error",Tr.ERR_NETWORK,e,B),{cause:k.cause||k});throw Tr.from(k,k&&k.code,e,B)}}},Pn=new Map,Mn=e=>{let t=e?e.env:{};const{fetch:r,Request:n,Response:i}=t,a=[n,i,r];let o,s,A=a.length,l=Pn;for(;A--;)o=a[A],s=l.get(o),void 0===s&&l.set(o,s=A?new Map:Tn(t)),l=s;return s};Mn();const Dn={http:null,xhr:En,fetch:{get:Mn}};Ir.forEach(Dn,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(eX){}Object.defineProperty(e,"adapterName",{value:t})}});const Ln=e=>`- ${e}`,Hn=e=>Ir.isFunction(e)||null===e||!1===e,_n=(e,t)=>{e=Ir.isArray(e)?e:[e];const{length:r}=e;let n,i;const a={};for(let o=0;o<r;o++){let r;if(n=e[o],i=n,!Hn(n)&&(i=Dn[(r=String(n)).toLowerCase()],void 0===i))throw new Tr(`Unknown adapter '${r}'`);if(i&&(Ir.isFunction(i)||(i=i.get(t))))break;a[r||"#"+o]=i}if(!i){const e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new Tr("There is no suitable adapter to dispatch the request "+(r?e.length>1?"since :\n"+e.map(Ln).join("\n"):" "+Ln(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return i};function Rn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new pn(null,e)}function Kn(e){Rn(e),e.headers=un.from(e.headers),e.data=dn.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return _n(e.adapter||an.adapter,e)(e).then(function(t){return Rn(e),t.data=dn.call(e,e.transformResponse,t),t.headers=un.from(t.headers),t},function(t){return hn(t)||(Rn(e),t&&t.response&&(t.response.data=dn.call(e,e.transformResponse,t.response),t.response.headers=un.from(t.response.headers))),Promise.reject(t)})}const zn="1.12.2",Vn={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Vn[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const $n={};Vn.transitional=function(e,t,r){function n(e,t){return"[Axios v"+zn+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,i,a)=>{if(!1===e)throw new Tr(n(i," has been removed"+(t?" in "+t:"")),Tr.ERR_DEPRECATED);return t&&!$n[i]&&($n[i]=!0,console.warn(n(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,i,a)}},Vn.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};const Wn={assertOptions:function(e,t,r){if("object"!=typeof e)throw new Tr("options must be an object",Tr.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const a=n[i],o=t[a];if(o){const t=e[a],r=void 0===t||o(t,a,e);if(!0!==r)throw new Tr("option "+a+" must be "+r,Tr.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new Tr("Unknown option "+a,Tr.ERR_BAD_OPTION)}},validators:Vn},Gn=Wn.validators;let qn=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Gr,response:new Gr}}async request(e,t){try{return await this._request(e,t)}catch(r){if(r instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const t=e.stack?e.stack.replace(/^.+\n/,""):"";try{r.stack?t&&!String(r.stack).endsWith(t.replace(/^.+\n.+\n/,""))&&(r.stack+="\n"+t):r.stack=t}catch(eX){}}throw r}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Bn(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:i}=t;void 0!==r&&Wn.assertOptions(r,{silentJSONParsing:Gn.transitional(Gn.boolean),forcedJSONParsing:Gn.transitional(Gn.boolean),clarifyTimeoutError:Gn.transitional(Gn.boolean)},!1),null!=n&&(Ir.isFunction(n)?t.paramsSerializer={serialize:n}:Wn.assertOptions(n,{encode:Gn.function,serialize:Gn.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Wn.assertOptions(t,{baseUrl:Gn.spelling("baseURL"),withXsrfToken:Gn.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=i&&Ir.merge(i.common,i[t.method]);i&&Ir.forEach(["delete","get","head","post","put","patch","common"],e=>{delete i[e]}),t.headers=un.concat(a,i);const o=[];let s=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,o.unshift(e.fulfilled,e.rejected))});const A=[];let l;this.interceptors.response.forEach(function(e){A.push(e.fulfilled,e.rejected)});let c,u=0;if(!s){const e=[Kn.bind(this),void 0];for(e.unshift(...o),e.push(...A),c=e.length,l=Promise.resolve(t);u<c;)l=l.then(e[u++],e[u++]);return l}c=o.length;let d=t;for(;u<c;){const e=o[u++],t=o[u++];try{d=e(d)}catch(h){t.call(this,h);break}}try{l=Kn.call(this,d)}catch(h){return Promise.reject(h)}for(u=0,c=A.length;u<c;)l=l.then(A[u++],A[u++]);return l}getUri(e){return Wr(wn((e=Bn(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};Ir.forEach(["delete","get","head","options"],function(e){qn.prototype[e]=function(t,r){return this.request(Bn(r||{},{method:e,url:t,data:(r||{}).data}))}}),Ir.forEach(["post","put","patch"],function(e){function t(t){return function(r,n,i){return this.request(Bn(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}qn.prototype[e]=t(),qn.prototype[e+"Form"]=t(!0)});const Yn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Yn).forEach(([e,t])=>{Yn[t]=e});const Xn=function e(t){const r=new qn(t),n=$t(qn.prototype.request,r);return Ir.extend(n,qn.prototype,r,{allOwnKeys:!0}),Ir.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(Bn(t,r))},n}(an);Xn.Axios=qn,Xn.CanceledError=pn,Xn.CancelToken=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const r=this;this.promise.then(e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null}),this.promise.then=e=>{let t;const n=new Promise(e=>{r.subscribe(e),t=e}).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e(function(e,n,i){r.reason||(r.reason=new pn(e,n,i),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}},Xn.isCancel=hn,Xn.VERSION=zn,Xn.toFormData=Rr,Xn.AxiosError=Tr,Xn.Cancel=Xn.CanceledError,Xn.all=function(e){return Promise.all(e)},Xn.spread=function(e){return function(t){return e.apply(null,t)}},Xn.isAxiosError=function(e){return Ir.isObject(e)&&!0===e.isAxiosError},Xn.mergeConfig=Bn,Xn.AxiosHeaders=un,Xn.formToJSON=e=>nn(Ir.isHTMLForm(e)?new FormData(e):e),Xn.getAdapter=_n,Xn.HttpStatusCode=Yn,Xn.default=Xn;const{Axios:Jn,AxiosError:Zn,CanceledError:ei,isCancel:ti,CancelToken:ri,VERSION:ni,all:ii,Cancel:ai,isAxiosError:oi,spread:si,toFormData:Ai,AxiosHeaders:li,HttpStatusCode:ci,formToJSON:ui,getAdapter:di,mergeConfig:hi}=Xn;class pi extends Error{}function fi(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return function(e){return decodeURIComponent(atob(e).replace(/(.)/g,(e,t)=>{let r=t.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}(t)}catch(r){return atob(t)}}function mi(e,t){if("string"!=typeof e)throw new pi("Invalid token specified: must be a string");t||(t={});const r=!0===t.header?0:1,n=e.split(".")[r];if("string"!=typeof n)throw new pi(`Invalid token specified: missing part #${r+1}`);let i;try{i=fi(n)}catch(eX){throw new pi(`Invalid token specified: invalid base64 for part #${r+1} (${eX.message})`)}try{return JSON.parse(i)}catch(eX){throw new pi(`Invalid token specified: invalid json for part #${r+1} (${eX.message})`)}}pi.prototype.name="InvalidTokenError";const gi="pangents_bearer_token",yi="pangents_refresh_token",vi="pangents_token_expiry",xi=()=>{try{return localStorage.getItem(gi)}catch(e){return console.error("[Token Storage] Failed to get access token:",e),null}},wi=()=>{try{return localStorage.getItem(yi)}catch(e){return console.error("[Token Storage] Failed to get refresh token:",e),null}},bi=(e,t)=>{try{localStorage.setItem(gi,e),t&&localStorage.setItem(yi,t);const r=mi(e);localStorage.setItem(vi,r.exp.toString()),console.log("[Token Storage] Tokens stored successfully")}catch(r){console.error("[Token Storage] Failed to store tokens:",r)}},Bi=e=>{try{localStorage.setItem(gi,e);const t=mi(e);localStorage.setItem(vi,t.exp.toString()),console.log("[Token Storage] Bearer token stored successfully")}catch(t){console.error("[Token Storage] Failed to store bearer token:",t),localStorage.setItem(gi,e)}},Ci=()=>{try{localStorage.removeItem(gi),localStorage.removeItem(yi),localStorage.removeItem(vi),console.log("[Token Storage] Tokens cleared successfully")}catch(e){console.error("[Token Storage] Failed to clear tokens:",e)}},Ei=e=>{try{const t=e||xi();if(!t)return!0;const r=mi(t),n=Date.now()/1e3;return r.exp<n+300}catch(t){return console.error("[Token Validation] Failed to check token expiry:",t),!0}},ki=()=>{try{const e=localStorage.getItem(vi);return e?parseInt(e,10):null}catch(e){return console.error("[Token Storage] Failed to get token expiry:",e),null}},Si=async()=>{try{const e=wi();if(!e)throw new Error("No refresh token available");if(Ei(e))throw new Error("Refresh token is expired");const{api:t}=await Promise.resolve().then(()=>$i),r=await t.post("/auth/refresh",{refreshToken:e}),{accessToken:n,refreshToken:i}=r.data;if(n&&i)return bi(n,i),console.log("[Token Refresh] Tokens refreshed successfully"),n;throw new Error("Invalid refresh response")}catch(e){return console.error("[Token Refresh] Failed to refresh tokens:",e),Ci(),null}};let ji=null;const Fi=()=>{const e=()=>{const t=ki();if(!t)return;const r=t-Date.now()/1e3,n=Math.max(0,1e3*(r-600));ji&&clearTimeout(ji),ji=setTimeout(async()=>{console.log("[Auto Refresh] Attempting to refresh tokens");await Si()?e():window.dispatchEvent(new CustomEvent("auth:logout",{detail:{reason:"auto_refresh_failed"}}))},n),console.log(`[Auto Refresh] Scheduled for ${new Date(Date.now()+n).toISOString()}`)};e()},Qi=Object.freeze(Object.defineProperty({__proto__:null,clearAutoRefresh:()=>{ji&&(clearTimeout(ji),ji=null,console.log("[Auto Refresh] Cleared refresh timer"))},clearTokens:Ci,getAccessToken:xi,getRefreshToken:wi,getTokenExpiry:ki,isTokenExpired:Ei,refreshAccessToken:Si,setBearerToken:Bi,setTokens:bi,setupAutoRefresh:Fi},Symbol.toStringTag,{value:"Module"}));class Ni{constructor(){Se(this,"failures",0),Se(this,"lastFailureTime",0),Se(this,"state","closed"),Se(this,"failureThreshold",5),Se(this,"recoveryTimeout",6e4),Se(this,"halfOpenMaxCalls",3),Se(this,"halfOpenCalls",0)}canExecute(){const e=Date.now();switch(this.state){case"closed":return!0;case"open":return e-this.lastFailureTime>=this.recoveryTimeout&&(this.state="half-open",this.halfOpenCalls=0,!0);case"half-open":return this.halfOpenCalls<this.halfOpenMaxCalls;default:return!1}}onSuccess(){this.failures=0,this.state="closed",this.halfOpenCalls=0}onFailure(){this.failures++,this.lastFailureTime=Date.now(),"half-open"===this.state?(this.state="open",this.halfOpenCalls=0):this.failures>=this.failureThreshold&&(this.state="open")}getState(){return this.state}}class Ui{constructor(){Se(this,"requests",[]),Se(this,"maxRequests",10),Se(this,"windowMs",6e4)}canMakeRequest(){const e=Date.now();return this.requests=this.requests.filter(t=>e-t<this.windowMs),this.requests.length<this.maxRequests}recordRequest(){this.requests.push(Date.now())}getRemainingRequests(){const e=Date.now();return this.requests=this.requests.filter(t=>e-t<this.windowMs),Math.max(0,this.maxRequests-this.requests.length)}}const Oi=new class{constructor(){Se(this,"errorQueue",[]),Se(this,"isOnline","undefined"==typeof navigator||navigator.onLine),Se(this,"maxQueueSize",50),Se(this,"retryAttempts",2),Se(this,"retryDelay",2e3),Se(this,"circuitBreaker",new Ni),Se(this,"rateLimiter",new Ui),Se(this,"reportingEnabled",!0),Se(this,"duplicateErrorCache",new Map),Se(this,"duplicateTimeWindow",3e4),this.setupEventListeners()}setupEventListeners(){"undefined"!=typeof window&&(window.addEventListener("online",()=>{this.isOnline=!0,this.flushErrorQueue()}),window.addEventListener("offline",()=>{this.isOnline=!1}),window.addEventListener("error",e=>{this.handleJavaScriptError(e.error,{component:"Global",action:"Runtime Error"})}),window.addEventListener("unhandledrejection",e=>{this.handleJavaScriptError(new Error(e.reason),{component:"Global",action:"Unhandled Promise Rejection"})}))}async validateApiKeyBeforeRequest(e){return!!e||(console.warn("[Enhanced Error Handler] No API key provided for validation"),!1)}generateErrorFingerprint(e,t){return`${e.message}-${e.status}-${t.component}-${t.action}`}isDuplicateError(e){const t=Date.now(),r=this.duplicateErrorCache.get(e);if(r&&t-r<this.duplicateTimeWindow)return!0;this.duplicateErrorCache.set(e,t);for(const[n,i]of this.duplicateErrorCache.entries())t-i>this.duplicateTimeWindow&&this.duplicateErrorCache.delete(n);return!1}handleApiError(e,t){var r,n,i,a,o;const s={message:e.message||"An unexpected error occurred",status:e.status||(null==(r=e.response)?void 0:r.status)||0,code:e.code||(null==(i=null==(n=e.response)?void 0:n.data)?void 0:i.code),details:(null==(o=null==(a=e.response)?void 0:a.data)?void 0:o.details)||e.details,timestamp:(new Date).toISOString()},A={component:(null==t?void 0:t.component)||"Unknown",action:(null==t?void 0:t.action)||"Unknown",userId:null==t?void 0:t.userId,timestamp:(new Date).toISOString(),userAgent:"undefined"!=typeof navigator?navigator.userAgent:"server",url:"undefined"!=typeof window?window.location.href:"",apiKey:(null==t?void 0:t.apiKey)?t.apiKey.substring(0,20)+"...":void 0},l=this.determineSeverity(s),c={error:s,context:A,stack:e.stack,severity:l},u=this.generateErrorFingerprint(s,A);return this.isDuplicateError(u)?(console.log("[Enhanced Error Handler] Duplicate error detected, skipping report"),s):(this.reportError(c),this.showUserNotification(s,l),s)}handleJavaScriptError(e,t){const r={error:{message:e.message,status:0,code:"JAVASCRIPT_ERROR",details:{name:e.name},timestamp:(new Date).toISOString()},context:{component:(null==t?void 0:t.component)||"JavaScript",action:(null==t?void 0:t.action)||"Runtime",userId:null==t?void 0:t.userId,timestamp:(new Date).toISOString(),userAgent:"undefined"!=typeof navigator?navigator.userAgent:"server",url:"undefined"!=typeof window?window.location.href:""},stack:e.stack,severity:"medium"};this.reportError(r)}determineSeverity(e){return e.status>=500||"NETWORK_ERROR"===e.code?"critical":401===e.status||403===e.status||429===e.status?"high":e.status>=400&&e.status<500?"medium":"low"}async reportError(e){try{if(!this.reportingEnabled)return void console.log("[Enhanced Error Handler] Error reporting is disabled");if(!this.circuitBreaker.canExecute())return void console.warn("[Enhanced Error Handler] Circuit breaker is open, skipping error report");if(!this.rateLimiter.canMakeRequest())return void console.warn("[Enhanced Error Handler] Rate limit exceeded, skipping error report");if(this.errorQueue.push(e),this.errorQueue.length>this.maxQueueSize){const e=this.errorQueue.shift();console.warn("[Enhanced Error Handler] Queue full, removed oldest error:",null==e?void 0:e.error.message)}this.isOnline&&await this.flushErrorQueue()}catch(t){console.error("[Enhanced Error Handler] Failed to report error:",t)}}async flushErrorQueue(){var e,t,r,n;if(0===this.errorQueue.length)return;if(!this.circuitBreaker.canExecute())return void console.warn("[Enhanced Error Handler] Circuit breaker prevents error reporting");const i=[...this.errorQueue];this.errorQueue=[];for(let o=1;o<=this.retryAttempts;o++)try{const r=null==(t=null==(e=i[0])?void 0:e.context)?void 0:t.apiKey;if(!(await this.validateApiKeyBeforeRequest(r)))return console.warn("[Enhanced Error Handler] Invalid API key, skipping error report"),void this.circuitBreaker.onFailure();if(!this.rateLimiter.canMakeRequest())return console.warn("[Enhanced Error Handler] Rate limit exceeded during flush"),void this.errorQueue.unshift(...i);this.rateLimiter.recordRequest();const{api:n}=await Promise.resolve().then(()=>$i);return await n.post("/errors/report",{errors:i,clientInfo:{userAgent:"undefined"!=typeof navigator?navigator.userAgent:"server",timestamp:(new Date).toISOString(),url:"undefined"!=typeof window?window.location.href:"",circuitBreakerState:this.circuitBreaker.getState(),remainingRateLimit:this.rateLimiter.getRemainingRequests()}},{timeout:15e3}),console.log(`[Enhanced Error Handler] Successfully reported ${i.length} errors`),void this.circuitBreaker.onSuccess()}catch(a){if(console.warn(`[Enhanced Error Handler] Failed to send errors (attempt ${o}):`,a),401===(null==(r=a.response)?void 0:r.status)||403===(null==(n=a.response)?void 0:n.status))return console.error("[Enhanced Error Handler] Authentication error, stopping retries"),void this.circuitBreaker.onFailure();if(o===this.retryAttempts){this.circuitBreaker.onFailure();const e=i.filter(e=>"critical"===e.severity);e.length>0&&(this.errorQueue.unshift(...e),console.error(`[Enhanced Error Handler] Re-queued ${e.length} critical errors`)),console.error("[Enhanced Error Handler] All retry attempts failed")}else await new Promise(e=>setTimeout(e,this.retryDelay*Math.pow(2,o-1)))}}showUserNotification(e,t){const r=this.getUserFriendlyMessage(e);"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("error:notification",{detail:{message:r,severity:t,error:e,timestamp:(new Date).toISOString(),canRetry:this.canRetryError(e)}}))}canRetryError(e){return 401!==e.status&&403!==e.status&&!(e.status>=400&&e.status<500&&429!==e.status)}getUserFriendlyMessage(e){switch(e.status){case 400:return"Please check your input and try again.";case 401:return"Invalid API key. Please check your credentials.";case 403:return"Access denied. Please check your API key permissions.";case 404:return"The requested resource was not found.";case 422:return"Please check your data and try again.";case 429:return"Too many requests. Please wait a moment and try again.";case 500:return"A server error occurred. Our team has been notified.";case 503:return"The service is temporarily unavailable. Please try again later.";default:return"NETWORK_ERROR"===e.code?"Network connection error. Please check your internet connection.":e.message||"An unexpected error occurred."}}enableReporting(){this.reportingEnabled=!0,console.log("[Enhanced Error Handler] Error reporting enabled")}disableReporting(){this.reportingEnabled=!1,console.log("[Enhanced Error Handler] Error reporting disabled")}getQueueSize(){return this.errorQueue.length}getCircuitBreakerState(){return this.circuitBreaker.getState()}getRemainingRateLimit(){return this.rateLimiter.getRemainingRequests()}clearQueue(){this.errorQueue=[],console.log("[Enhanced Error Handler] Error queue cleared")}async forceFlush(){await this.flushErrorQueue()}};const Ii=new class{formatResponse(e){return e&&"object"==typeof e&&"success"in e?e:{success:!0,data:e,message:"Request completed successfully",status:200,timestamp:(new Date).toISOString()}}formatPaginatedResponse(e,t){const r=t.totalPages||Math.ceil(t.total/t.limit);return{success:!0,data:e,pagination:{page:t.page,limit:t.limit,total:t.total,totalPages:r,hasNext:t.page<r,hasPrev:t.page>1},message:"Request completed successfully",status:200,timestamp:(new Date).toISOString()}}formatErrorResponse(e){return{success:!1,data:null,error:{message:e.message||"An error occurred",status:e.status||500,code:e.code,details:e.details,timestamp:(new Date).toISOString()},message:e.message||"Request failed",status:e.status||500,timestamp:(new Date).toISOString()}}transformResponseData(e){if(null==e)return e;if(Array.isArray(e))return e.map(e=>this.transformResponseData(e));if("object"==typeof e&&e.constructor===Object){const t={};for(const[r,n]of Object.entries(e)){t[this.toCamelCase(r)]=this.transformResponseData(n)}return t}return e}transformRequestData(e){if(null==e)return e;if(Array.isArray(e))return e.map(e=>this.transformRequestData(e));if("object"==typeof e&&e.constructor===Object){const t={};for(const[r,n]of Object.entries(e)){t[this.toSnakeCase(r)]=this.transformRequestData(n)}return t}return e}toCamelCase(e){return e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase())}toSnakeCase(e){return e.replace(/[A-Z]/g,e=>`_${e.toLowerCase()}`)}validateResponse(e){return"object"==typeof e&&null!==e&&"boolean"==typeof e.success&&"data"in e&&"message"in e&&"timestamp"in e}validatePaginatedResponse(e){return this.validateResponse(e)&&"pagination"in e&&"object"==typeof e.pagination&&null!==e.pagination&&"page"in e.pagination&&"limit"in e.pagination&&"total"in e.pagination&&"number"==typeof e.pagination.page&&"number"==typeof e.pagination.limit&&"number"==typeof e.pagination.total}extractData(e){var t;if(!e.success)throw new Error((null==(t=e.error)?void 0:t.message)||"Request failed");return e.data}extractPaginatedData(e){var t;if(!e.success)throw new Error((null==(t=e.error)?void 0:t.message)||"Request failed");return{data:e.data,pagination:e.pagination}}mergeResponses(e){const t=e.filter(e=>e.success),r=e.filter(e=>!e.success);return r.length>0?{success:!1,data:null,status:400,error:{message:`${r.length} out of ${e.length} requests failed`,status:400,code:"BATCH_PARTIAL_FAILURE",details:{successful:t.length,failed:r.length,errors:r.map(e=>e.error)},timestamp:(new Date).toISOString()},message:"Batch operation partially failed",timestamp:(new Date).toISOString()}:{success:!0,data:t.map(e=>e.data),status:200,message:`All ${e.length} requests completed successfully`,timestamp:(new Date).toISOString()}}createResponseWithMetadata(e,t={}){return{...this.formatResponse(e),metadata:t}}formatFileUploadResponse(e,t){return this.formatResponse({filename:t.filename||e.name,originalName:e.name,size:e.size,mimeType:e.type,url:t.url,id:t.id})}formatSearchResponse(e,t,r){return{...this.formatPaginatedResponse(e,r),filters:t}}},Ti=e=>Ii.transformRequestData(e),Pi=e=>{var t;return(e=>Ii.validateResponse(e))(e.data)||(e.data=(t=e.data,Ii.formatResponse(t))),e},Mi={SESSIONS:"chatbot-sessions",THEME:"chatbot-theme",CURRENT_SESSION:"chatbot-current-session",AUTH:"chatbot-auth",API_KEY:"pangents_current_api_key",CURRENT_ROUTE:"chatbot-current-route"},Di=e=>({...e,createdAt:new Date(e.createdAt),updatedAt:new Date(e.updatedAt),messages:e.messages.map(e=>({...e,timestamp:new Date(e.timestamp)}))}),Li={getAuth(){try{const e=localStorage.getItem(Mi.AUTH);return e?JSON.parse(e):null}catch(e){return console.error("Failed to get auth data:",e),null}},saveAuth(e){try{localStorage.setItem(Mi.AUTH,JSON.stringify(e))}catch(t){console.error("Failed to save auth data:",t)}},clearAuth(){try{localStorage.removeItem(Mi.AUTH)}catch(e){console.error("Failed to clear auth data:",e)}},getApiKey(){try{return localStorage.getItem(Mi.API_KEY)}catch(e){return console.error("Failed to get API key:",e),null}},saveApiKey(e){try{localStorage.setItem(Mi.API_KEY,e)}catch(t){console.error("Failed to save API key:",t)}},clearApiKey(){try{localStorage.removeItem(Mi.API_KEY)}catch(e){console.error("Failed to clear API key:",e)}},getSessions(){try{const e=localStorage.getItem(Mi.SESSIONS);if(!e)return[];return JSON.parse(e).map(Di)}catch(e){return console.error("Failed to get sessions:",e),[]}},saveSessions(e){try{localStorage.setItem(Mi.SESSIONS,JSON.stringify(e))}catch(t){console.error("Failed to save sessions:",t)}},getCurrentSession(){try{const e=localStorage.getItem(Mi.CURRENT_SESSION);if(!e)return null;const t=JSON.parse(e);return Di(t)}catch(e){return console.error("Failed to get current session:",e),null}},saveCurrentSession(e){try{e?localStorage.setItem(Mi.CURRENT_SESSION,JSON.stringify(e)):localStorage.removeItem(Mi.CURRENT_SESSION)}catch(t){console.error("Failed to save current session:",t)}},getTheme(){try{const e=localStorage.getItem(Mi.THEME);return e?JSON.parse(e):null}catch{return null}},saveTheme(e){try{localStorage.setItem(Mi.THEME,JSON.stringify(e))}catch(t){console.error("Failed to save theme:",t)}},getCurrentRoute(){try{return localStorage.getItem(Mi.CURRENT_ROUTE)}catch(e){return console.error("Failed to get current route:",e),null}},saveCurrentRoute(e){try{localStorage.setItem(Mi.CURRENT_ROUTE,e)}catch(t){console.error("Failed to save current route:",t)}},clearAll(){try{Object.values(Mi).forEach(e=>{localStorage.removeItem(e)})}catch(e){console.error("Failed to clear storage:",e)}}},Hi={development:"https://dev.backend.pangents.ai",staging:"https://stage.backend.pangents.ai",production:"https://app.backend.pangents.ai"};function _i(e){return e&&Hi[e]?Hi[e]:"https://dev.backend.pangents.ai/"}const Ri={baseURL:_i(),timeout:1e6,headers:{"Content-Type":"application/json",Accept:"application/json"}},Ki=Xn.create(Ri);function zi(e){Ki.defaults.baseURL=_i(e)}Ki.interceptors.request.use(e=>{var t,r;e=(e=>(e.data&&(e.data=Ti(e.data)),e.params&&(e.params=Ti(e.params)),e))(e);const n=xi();n&&e.headers&&(e.headers.Authorization=`Bearer ${n}`);const i=Li.getApiKey();return i&&e.headers&&(e.headers.api_key=i,e.headers.request_origin="tenant"),e.metadata={...e.metadata,requestTime:Date.now(),url:e.url,method:null==(t=e.method)?void 0:t.toUpperCase()},"development"===process.env.NODE_ENV&&console.log(`🚀 API Request: ${null==(r=e.method)?void 0:r.toUpperCase()} ${e.url}`,{headers:e.headers,data:e.data,params:e.params}),e}),Ki.interceptors.response.use(e=>{var t,r;const n=null==(t=(e=Pi(e)).config.metadata)?void 0:t.requestTime,i=n?Date.now()-n:0;return"development"===process.env.NODE_ENV&&console.log(`✅ API Response: ${null==(r=e.config.method)?void 0:r.toUpperCase()} ${e.config.url}`,{status:e.status,responseTime:`${i}ms`,data:e.data}),e.metadata={...e.config.metadata,responseTime:i,status:e.status,timestamp:(new Date).toISOString()},e},async e=>{var t,r,n,i,a,o,s,A,l,c,u,d;const h=e.config,p=null==(t=null==h?void 0:h.metadata)?void 0:t.requestTime,f=p?Date.now()-p:0;if("development"===process.env.NODE_ENV&&console.error(`❌ API Error: ${null==(r=null==h?void 0:h.method)?void 0:r.toUpperCase()} ${null==h?void 0:h.url}`,{status:null==(n=e.response)?void 0:n.status,responseTime:`${f}ms`,message:e.message,data:null==(i=e.response)?void 0:i.data}),401===(null==(a=e.response)?void 0:a.status)&&!h._retry){h._retry=!0;try{const e=await Si();if(e&&h.headers){h.headers.Authorization=`Bearer ${e}`;return(await Promise.resolve().then(()=>$i)).default.request(h)}}catch(g){console.error("[Token Refresh Failed]",g),Ci(),window.dispatchEvent(new CustomEvent("auth:logout",{detail:{reason:"token_refresh_failed"}}))}}const m=((e,t)=>Oi.handleApiError(e,t))(e,{component:"API",action:`${null==(o=null==h?void 0:h.method)?void 0:o.toUpperCase()} ${null==h?void 0:h.url}`});return 401!==(null==(s=e.response)?void 0:s.status)&&403!==(null==(A=e.response)?void 0:A.status)||!(null==(l=null==h?void 0:h.headers)?void 0:l.api_key)||(console.warn("[API Key Invalid] Clearing stored API key"),Li.clearApiKey(),window.dispatchEvent(new CustomEvent("api:key_invalid",{detail:{error:m,url:null==h?void 0:h.url}}))),401===(null==(c=e.response)?void 0:c.status)?window.dispatchEvent(new CustomEvent("auth:unauthorized",{detail:{error:m,url:null==h?void 0:h.url}})):403===(null==(u=e.response)?void 0:u.status)?window.dispatchEvent(new CustomEvent("auth:forbidden",{detail:{error:m,url:null==h?void 0:h.url}})):(null==(d=e.response)?void 0:d.status)>=500?window.dispatchEvent(new CustomEvent("api:server_error",{detail:{error:m,url:null==h?void 0:h.url}})):e.response||window.dispatchEvent(new CustomEvent("api:network_error",{detail:{error:m,url:null==h?void 0:h.url}})),Promise.reject(m)});Ki.defaults.transformRequest=[e=>e&&"object"==typeof e?Object.keys(e).reduce((t,r)=>(t[r.replace(/[A-Z]/g,e=>`_${e.toLowerCase()}`)]=e[r],t),{}):e,...Xn.defaults.transformRequest],Ki.defaults.transformResponse=[e=>e&&"object"==typeof e?Object.keys(e).reduce((t,r)=>(t[r.replace(/_([a-z])/g,(e,t)=>t.toUpperCase())]=e[r],t),{}):e,...Xn.defaults.transformResponse];const Vi={get:(e,t)=>Ki.get(e,t),post:(e,t,r)=>Ki.post(e,t,r),put:(e,t,r)=>Ki.put(e,t,r),patch:(e,t,r)=>Ki.patch(e,t,r),delete:(e,t)=>Ki.delete(e,t),updateProfile:async e=>(await Ki.patch("/profile",e)).data,initiateWorkflow:async e=>(await Ki.post("/workflow/initiate",e)).data,createCall:async e=>(await Ki.post("/calls",e)).data,updateCall:async(e,t)=>(await Ki.patch(`/calls/${e}`,t)).data,deleteCall:async e=>{await Ki.delete(`/calls/${e}`)},searchCarriers:async e=>(await Ki.get("/carriers/search",{params:e})).data,bulkUpdateCalls:async(e,t)=>(await Ki.patch("/calls/bulk",{ids:e,data:t})).data,getWorkflowList:async(e=1,t=10)=>(await Ki.get("/workflow/list",{params:{page:e,page_size:t}})).data.data,deleteWorkflow:async e=>(await Vi.delete(`/workflow/${e}`)).data,getWorkflowStatus:async e=>(await Vi.get(`/workflow/status/${e}`)).data.data,enqueueCallQueue:async e=>(await Vi.post("/agents/livekit/queue/enqueue",{queue:e})).data,getQueueStatus:async e=>(await Vi.get(`/agents/livekit/queue/${e}/status`)).data},$i=Object.freeze(Object.defineProperty({__proto__:null,api:Vi,default:Ki,resolveBaseUrl:_i,setApiBaseUrl:zi},Symbol.toStringTag,{value:"Module"})),Wi=["That's a great question! Let me help you with that.","I understand your concern. Here's what I can suggest...","Thanks for reaching out! I'm here to assist you.","Let me provide you with some helpful information.","I'd be happy to clarify that for you.","That's an interesting point. Here's my perspective...","I can definitely help you with that request.","Thanks for your patience. Here's what you need to know..."];function Gi(e){e=e.replace("#","");const t=parseInt(e.substr(0,2),16)/255,r=parseInt(e.substr(2,2),16)/255,n=parseInt(e.substr(4,2),16)/255,i=Math.max(t,r,n),a=Math.min(t,r,n);let o=0,s=0;const A=(i+a)/2;if(i!==a){const e=i-a;switch(s=A>.5?e/(2-i-a):e/(i+a),i){case t:o=(r-n)/e+(r<n?6:0);break;case r:o=(n-t)/e+2;break;case n:o=(t-r)/e+4}o/=6}return`${Math.round(360*o)} ${Math.round(100*s)}% ${Math.round(100*A)}%`}const qi={primaryColor:"#b07e48",headerBg:"#1f2937",headerText:"#ffffff",userBubble:"#3b82f6",botBubble:"#f3f4f6",fontFamily:"Inter, system-ui, sans-serif"},Yi={isOpen:!1,currentSession:null,sessions:[],isLoading:!1,error:null,currentScreen:"chat",theme:qi,isAuthenticated:!1,user:null,authLoading:!1};function Xi(e,t){var r;switch(console.log("ChatReducer: Action received:",t.type),console.log("ChatReducer: Current state:",e),t.type){case"OPEN_WIDGET":console.log("ChatReducer: Processing OPEN_WIDGET");const n={...e,isOpen:!0};return console.log("ChatReducer: New state after OPEN_WIDGET:",n),n;case"CLOSE_WIDGET":return{...e,isOpen:!1};case"SET_SCREEN":return{...e,currentScreen:t.payload};case"SET_LOADING":return{...e,isLoading:t.payload};case"SET_ERROR":return{...e,error:t.payload};case"SET_AUTH_LOADING":return{...e,authLoading:t.payload};case"SET_AUTHENTICATED":return{...e,isAuthenticated:!0,user:t.payload,authLoading:!1};case"LOGOUT":return{...e,isAuthenticated:!1,user:null,currentSession:null,sessions:[],currentScreen:"chat"};case"ADD_MESSAGE":if(!e.currentSession)return e;const i={...e.currentSession,messages:[...e.currentSession.messages,t.payload],updatedAt:new Date},a=e.sessions.map(e=>e.id===i.id?i:e);return{...e,currentSession:i,sessions:a};case"CREATE_SESSION":return{...e,currentSession:t.payload,sessions:[t.payload,...e.sessions]};case"LOAD_SESSION":return{...e,currentSession:t.payload};case"UPDATE_SESSIONS":return{...e,sessions:t.payload};case"DELETE_SESSION":const o=e.sessions.filter(e=>e.id!==t.payload),s=(null==(r=e.currentSession)?void 0:r.id)===t.payload?null:e.currentSession;return{...e,sessions:o,currentSession:s};case"UPDATE_THEME":return{...e,theme:{...e.theme,...t.payload}};case"CLEAR_DATA":return{...Yi,theme:e.theme};default:return console.log("ChatReducer: Unknown action type:",t),e}}const Ji=Te.createContext(void 0);function Zi({children:e,initialTheme:t,apiKey:r,tenantId:n,email:i,themeTarget:a,environment:o}){const[s,A]=Te.useReducer(Xi,Yi),l=Te.useRef({initialized:!1}),c=Te.useRef(null);Te.useEffect(()=>{c.current=a||null},[a]),Te.useEffect(()=>{zi(o)},[o]),Te.useEffect(()=>{const e=Li.getAuth(),r=Li.getSessions(),n=Li.getCurrentSession(),i=Li.getTheme();e&&e.email&&(A({type:"SET_AUTHENTICATED",payload:e}),r.length>0&&A({type:"UPDATE_SESSIONS",payload:r}),n&&A({type:"LOAD_SESSION",payload:n})),i?A({type:"UPDATE_THEME",payload:i}):t&&A({type:"UPDATE_THEME",payload:t})},[]),Te.useEffect(()=>{t&&A({type:"UPDATE_THEME",payload:t})},[t]),Te.useEffect(()=>{s.isAuthenticated&&Li.saveSessions(s.sessions)},[s.sessions,s.isAuthenticated]),Te.useEffect(()=>{s.isAuthenticated&&Li.saveCurrentSession(s.currentSession)},[s.currentSession,s.isAuthenticated]),Te.useEffect(()=>{Li.saveTheme(s.theme),function(e,t){const r=t||document.documentElement;if(e.primaryColor){const t=Gi(e.primaryColor);r.style.setProperty("--primary",t);const n=parseInt(t.split(" ")[2])>50?"0 0% 98%":"0 0% 9%";r.style.setProperty("--primary-foreground",n)}if(e.userBubble){const t=Gi(e.userBubble);r.style.setProperty("--user-bubble",t)}if(e.botBubble){const t=Gi(e.botBubble);r.style.setProperty("--bot-bubble",t)}}(s.theme,c.current)},[s.theme]),Te.useEffect(()=>{s.user&&Li.saveAuth(s.user)},[s.user]);const u=e=>A({type:"SET_SCREEN",payload:e}),d=async e=>{if(!e.trim())return;if(!s.currentSession)return h(),void setTimeout(()=>d(e),100);const t={id:`msg-${Date.now()}-user`,content:e.trim(),sender:"user",timestamp:new Date};A({type:"ADD_MESSAGE",payload:t}),A({type:"SET_LOADING",payload:!0}),setTimeout(()=>{const e={id:`msg-${Date.now()}-bot`,content:Wi[Math.floor(Math.random()*Wi.length)],sender:"bot",timestamp:new Date};A({type:"ADD_MESSAGE",payload:e}),A({type:"SET_LOADING",payload:!1})},1e3+2e3*Math.random())},h=()=>{const e={id:`session-${Date.now()}`,title:"New Conversation",messages:[],createdAt:new Date,updatedAt:new Date};A({type:"CREATE_SESSION",payload:e})};Te.useEffect(()=>{const e=Li.getApiKey();if(r&&r!==e&&Li.saveApiKey(r),!r&&e&&Li.clearApiKey(),l.current.initialized){const e=Li.getAuth(),t=null==e?void 0:e.email;i&&l.current.email!==i&&i!==t&&(Li.clearAuth(),Li.saveSessions([]),Li.saveCurrentSession(null)),n&&l.current.tenantId&&l.current.tenantId!==n&&(Li.clearAuth(),Li.saveSessions([]),Li.saveCurrentSession(null))}l.current={apiKey:r,tenantId:n,email:i,initialized:!0}},[r,n,i]);const p={...s,openWidget:()=>{console.log("ChatContext: openWidget called"),console.log("ChatContext: Current state before dispatch:",s),A({type:"OPEN_WIDGET"}),console.log("ChatContext: OPEN_WIDGET dispatched")},closeWidget:()=>A({type:"CLOSE_WIDGET"}),setCurrentScreen:u,authenticate:async(e,t)=>{A({type:"SET_AUTH_LOADING",payload:!0});try{if(await new Promise(e=>setTimeout(e,1500)),e&&6===t.length){const t=`token_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;return A({type:"SET_AUTHENTICATED",payload:{email:e,token:t}}),!0}return!1}catch(r){return A({type:"SET_AUTH_LOADING",payload:!1}),!1}},login:e=>{const t=`token_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;A({type:"SET_AUTHENTICATED",payload:{email:e,token:t}})},logout:()=>{Promise.resolve().then(()=>Qi).then(({clearTokens:e,clearAutoRefresh:t})=>{t(),e()}),Li.clearAuth(),Li.saveSessions([]),Li.saveCurrentSession(null),A({type:"LOGOUT"})},sendMessage:d,createNewSession:h,loadSession:e=>{const t=s.sessions.find(t=>t.id===e);t&&(A({type:"LOAD_SESSION",payload:t}),u("chat"))},deleteSession:e=>{A({type:"DELETE_SESSION",payload:e})},updateTheme:e=>{A({type:"UPDATE_THEME",payload:e})},resetTheme:()=>{A({type:"UPDATE_THEME",payload:qi})},clearAllData:()=>{Li.clearAll(),A({type:"CLEAR_DATA"})},apiKey:r,tenantId:n,email:i,environment:o};return Ie.jsx(Ji.Provider,{value:p,children:e})}function ea(){const e=Te.useContext(Ji);if(void 0===e)throw new Error("useChatContext must be used within a ChatProvider");return e}const ta=Te.createContext({});function ra(e){const t=Te.useRef(null);return null===t.current&&(t.current=e()),t.current}const na="undefined"!=typeof window,ia=na?Te.useLayoutEffect:Te.useEffect,aa=Te.createContext(null);function oa(e,t){-1===e.indexOf(t)&&e.push(t)}function sa(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}const Aa=(e,t,r)=>r>t?t:r<e?e:r;function la(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let ca=()=>{},ua=()=>{};"production"!==process.env.NODE_ENV&&(ca=(e,t,r)=>{e||"undefined"==typeof console||console.warn(la(t,r))},ua=(e,t,r)=>{if(!e)throw new Error(la(t,r))});const da={},ha=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function pa(e){return"object"==typeof e&&null!==e}const fa=e=>/^0[^.\s]+$/u.test(e);function ma(e){let t;return()=>(void 0===t&&(t=e()),t)}const ga=e=>e,ya=(e,t)=>r=>t(e(r)),va=(...e)=>e.reduce(ya),xa=(e,t,r)=>{const n=t-e;return 0===n?1:(r-e)/n};class wa{constructor(){this.subscriptions=[]}add(e){return oa(this.subscriptions,e),()=>sa(this.subscriptions,e)}notify(e,t,r){const n=this.subscriptions.length;if(n)if(1===n)this.subscriptions[0](e,t,r);else for(let i=0;i<n;i++){const n=this.subscriptions[i];n&&n(e,t,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ba=e=>1e3*e,Ba=e=>e/1e3;function Ca(e,t){return t?e*(1e3/t):0}const Ea=new Set;function ka(e,t,r){e||Ea.has(t)||(console.warn(la(t,r)),Ea.add(t))}const Sa=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e;function ja(e,t,r,n){if(e===t&&r===n)return ga;const i=t=>function(e,t,r,n,i){let a,o,s=0;do{o=t+(r-t)/2,a=Sa(o,n,i)-e,a>0?r=o:t=o}while(Math.abs(a)>1e-7&&++s<12);return o}(t,0,1,e,r);return e=>0===e||1===e?e:Sa(i(e),t,n)}const Fa=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Qa=e=>t=>1-e(1-t),Na=ja(.33,1.53,.69,.99),Ua=Qa(Na),Oa=Fa(Ua),Ia=e=>(e*=2)<1?.5*Ua(e):.5*(2-Math.pow(2,-10*(e-1))),Ta=e=>1-Math.sin(Math.acos(e)),Pa=Qa(Ta),Ma=Fa(Ta),Da=ja(.42,0,1,1),La=ja(0,0,.58,1),Ha=ja(.42,0,.58,1),_a=e=>Array.isArray(e)&&"number"==typeof e[0],Ra={linear:ga,easeIn:Da,easeInOut:Ha,easeOut:La,circIn:Ta,circInOut:Ma,circOut:Pa,backIn:Ua,backInOut:Oa,backOut:Na,anticipate:Ia},Ka=e=>{if(_a(e)){ua(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,r,n,i]=e;return ja(t,r,n,i)}return"string"==typeof e?(ua(void 0!==Ra[e],`Invalid easing type '${e}'`,"invalid-easing-type"),Ra[e]):e},za=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Va(e,t){let r=!1,n=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>r=!0,o=za.reduce((e,t)=>(e[t]=function(e){let t=new Set,r=new Set,n=!1,i=!1;const a=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(A.schedule(t),e()),t(o)}const A={schedule:(e,i=!1,o=!1)=>{const s=o&&n?t:r;return i&&a.add(e),s.has(e)||s.add(e),e},cancel:e=>{r.delete(e),a.delete(e)},process:e=>{o=e,n?i=!0:(n=!0,[t,r]=[r,t],t.forEach(s),t.clear(),n=!1,i&&(i=!1,A.process(e)))}};return A}(a),e),{}),{setup:s,read:A,resolveKeyframes:l,preUpdate:c,update:u,preRender:d,render:h,postRender:p}=o,f=()=>{const a=da.useManualTiming?i.timestamp:performance.now();r=!1,da.useManualTiming||(i.delta=n?1e3/60:Math.max(Math.min(a-i.timestamp,40),1)),i.timestamp=a,i.isProcessing=!0,s.process(i),A.process(i),l.process(i),c.process(i),u.process(i),d.process(i),h.process(i),p.process(i),i.isProcessing=!1,r&&t&&(n=!1,e(f))};return{schedule:za.reduce((t,a)=>{const s=o[a];return t[a]=(t,a=!1,o=!1)=>(r||(r=!0,n=!0,i.isProcessing||e(f)),s.schedule(t,a,o)),t},{}),cancel:e=>{for(let t=0;t<za.length;t++)o[za[t]].cancel(e)},state:i,steps:o}}const{schedule:$a,cancel:Wa,state:Ga,steps:qa}=Va("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:ga,!0);let Ya;function Xa(){Ya=void 0}const Ja={now:()=>(void 0===Ya&&Ja.set(Ga.isProcessing||da.useManualTiming?Ga.timestamp:performance.now()),Ya),set:e=>{Ya=e,queueMicrotask(Xa)}},Za=e=>t=>"string"==typeof t&&t.startsWith(e),eo=Za("--"),to=Za("var(--"),ro=e=>!!to(e)&&no.test(e.split("/*")[0].trim()),no=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,io={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},ao={...io,transform:e=>Aa(0,1,e)},oo={...io,default:1},so=e=>Math.round(1e5*e)/1e5,Ao=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const lo=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,co=(e,t)=>r=>Boolean("string"==typeof r&&lo.test(r)&&r.startsWith(e)||t&&!function(e){return null==e}(r)&&Object.prototype.hasOwnProperty.call(r,t)),uo=(e,t,r)=>n=>{if("string"!=typeof n)return n;const[i,a,o,s]=n.match(Ao);return{[e]:parseFloat(i),[t]:parseFloat(a),[r]:parseFloat(o),alpha:void 0!==s?parseFloat(s):1}},ho={...io,transform:e=>Math.round((e=>Aa(0,255,e))(e))},po={test:co("rgb","red"),parse:uo("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+ho.transform(e)+", "+ho.transform(t)+", "+ho.transform(r)+", "+so(ao.transform(n))+")"};const fo={test:co("#"),parse:function(e){let t="",r="",n="",i="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),i=e.substring(4,5),t+=t,r+=r,n+=n,i+=i),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}},transform:po.transform},mo=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),go=mo("deg"),yo=mo("%"),vo=mo("px"),xo=mo("vh"),wo=mo("vw"),bo=(()=>({...yo,parse:e=>yo.parse(e)/100,transform:e=>yo.transform(100*e)}))(),Bo={test:co("hsl","hue"),parse:uo("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+yo.transform(so(t))+", "+yo.transform(so(r))+", "+so(ao.transform(n))+")"},Co={test:e=>po.test(e)||fo.test(e)||Bo.test(e),parse:e=>po.test(e)?po.parse(e):Bo.test(e)?Bo.parse(e):fo.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?po.transform(e):Bo.transform(e),getAnimatableNone:e=>{const t=Co.parse(e);return t.alpha=0,Co.transform(t)}},Eo=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const ko="number",So="color",jo=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Fo(e){const t=e.toString(),r=[],n={color:[],number:[],var:[]},i=[];let a=0;const o=t.replace(jo,e=>(Co.test(e)?(n.color.push(a),i.push(So),r.push(Co.parse(e))):e.startsWith("var(")?(n.var.push(a),i.push("var"),r.push(e)):(n.number.push(a),i.push(ko),r.push(parseFloat(e))),++a,"${}")).split("${}");return{values:r,split:o,indexes:n,types:i}}function Qo(e){return Fo(e).values}function No(e){const{split:t,types:r}=Fo(e),n=t.length;return e=>{let i="";for(let a=0;a<n;a++)if(i+=t[a],void 0!==e[a]){const t=r[a];i+=t===ko?so(e[a]):t===So?Co.transform(e[a]):e[a]}return i}}const Uo=e=>"number"==typeof e?0:Co.test(e)?Co.getAnimatableNone(e):e;const Oo={test:function(e){var t,r;return isNaN(e)&&"string"==typeof e&&((null==(t=e.match(Ao))?void 0:t.length)||0)+((null==(r=e.match(Eo))?void 0:r.length)||0)>0},parse:Qo,createTransformer:No,getAnimatableNone:function(e){const t=Qo(e);return No(e)(t.map(Uo))}};function Io(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function To(e,t){return r=>r>0?t:e}const Po=(e,t,r)=>e+(t-e)*r,Mo=(e,t,r)=>{const n=e*e,i=r*(t*t-n)+n;return i<0?0:Math.sqrt(i)},Do=[fo,po,Bo];function Lo(e){const t=(r=e,Do.find(e=>e.test(r)));var r;if(ca(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!Boolean(t))return!1;let n=t.parse(e);return t===Bo&&(n=function({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,r/=100;let i=0,a=0,o=0;if(t/=100){const n=r<.5?r*(1+t):r+t-r*t,s=2*r-n;i=Io(s,n,e+1/3),a=Io(s,n,e),o=Io(s,n,e-1/3)}else i=a=o=r;return{red:Math.round(255*i),green:Math.round(255*a),blue:Math.round(255*o),alpha:n}}(n)),n}const Ho=(e,t)=>{const r=Lo(e),n=Lo(t);if(!r||!n)return To(e,t);const i={...r};return e=>(i.red=Mo(r.red,n.red,e),i.green=Mo(r.green,n.green,e),i.blue=Mo(r.blue,n.blue,e),i.alpha=Po(r.alpha,n.alpha,e),po.transform(i))},_o=new Set(["none","hidden"]);function Ro(e,t){return r=>Po(e,t,r)}function Ko(e){return"number"==typeof e?Ro:"string"==typeof e?ro(e)?To:Co.test(e)?Ho:$o:Array.isArray(e)?zo:"object"==typeof e?Co.test(e)?Ho:Vo:To}function zo(e,t){const r=[...e],n=r.length,i=e.map((e,r)=>Ko(e)(e,t[r]));return e=>{for(let t=0;t<n;t++)r[t]=i[t](e);return r}}function Vo(e,t){const r={...e,...t},n={};for(const i in r)void 0!==e[i]&&void 0!==t[i]&&(n[i]=Ko(e[i])(e[i],t[i]));return e=>{for(const t in n)r[t]=n[t](e);return r}}const $o=(e,t)=>{const r=Oo.createTransformer(t),n=Fo(e),i=Fo(t);return n.indexes.var.length===i.indexes.var.length&&n.indexes.color.length===i.indexes.color.length&&n.indexes.number.length>=i.indexes.number.length?_o.has(e)&&!i.values.length||_o.has(t)&&!n.values.length?function(e,t){return _o.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}(e,t):va(zo(function(e,t){const r=[],n={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],o=e.indexes[a][n[a]],s=e.values[o]??0;r[i]=s,n[a]++}return r}(n,i),i.values),r):(ca(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),To(e,t))};function Wo(e,t,r){if("number"==typeof e&&"number"==typeof t&&"number"==typeof r)return Po(e,t,r);return Ko(e)(e,t)}const Go=e=>{const t=({timestamp:t})=>e(t);return{start:(e=!0)=>$a.update(t,e),stop:()=>Wa(t),now:()=>Ga.isProcessing?Ga.timestamp:Ja.now()}},qo=(e,t,r=10)=>{let n="";const i=Math.max(Math.round(t/r),2);for(let a=0;a<i;a++)n+=Math.round(1e4*e(a/(i-1)))/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},Yo=2e4;function Xo(e){let t=0;let r=e.next(t);for(;!r.done&&t<Yo;)t+=50,r=e.next(t);return t>=Yo?1/0:t}function Jo(e,t,r){const n=Math.max(t-5,0);return Ca(r-e(n),t-n)}const Zo=100,es=10,ts=1,rs=0,ns=800,is=.3,as=.3,os={granular:.01,default:2},ss={granular:.005,default:.5},As=.01,ls=10,cs=.05,us=1,ds=.001;function hs({duration:e=ns,bounce:t=is,velocity:r=rs,mass:n=ts}){let i,a;ca(e<=ba(ls),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=Aa(cs,us,o),e=Aa(As,ls,Ba(e)),o<1?(i=t=>{const n=t*o,i=n*e,a=n-r,s=fs(t,o),A=Math.exp(-i);return ds-a/s*A},a=t=>{const n=t*o*e,a=n*r+r,s=Math.pow(o,2)*Math.pow(t,2)*e,A=Math.exp(-n),l=fs(Math.pow(t,2),o);return(-i(t)+ds>0?-1:1)*((a-s)*A)/l}):(i=t=>Math.exp(-t*e)*((t-r)*e+1)-.001,a=t=>Math.exp(-t*e)*(e*e*(r-t)));const s=function(e,t,r){let n=r;for(let i=1;i<ps;i++)n-=e(n)/t(n);return n}(i,a,5/e);if(e=ba(e),isNaN(s))return{stiffness:Zo,damping:es,duration:e};{const t=Math.pow(s,2)*n;return{stiffness:t,damping:2*o*Math.sqrt(n*t),duration:e}}}const ps=12;function fs(e,t){return e*Math.sqrt(1-t*t)}const ms=["duration","bounce"],gs=["stiffness","damping","mass"];function ys(e,t){return t.some(t=>void 0!==e[t])}function vs(e=as,t=is){const r="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:n,restDelta:i}=r;const a=r.keyframes[0],o=r.keyframes[r.keyframes.length-1],s={done:!1,value:a},{stiffness:A,damping:l,mass:c,duration:u,velocity:d,isResolvedFromDuration:h}=function(e){let t={velocity:rs,stiffness:Zo,damping:es,mass:ts,isResolvedFromDuration:!1,...e};if(!ys(e,gs)&&ys(e,ms))if(e.visualDuration){const r=e.visualDuration,n=2*Math.PI/(1.2*r),i=n*n,a=2*Aa(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:ts,stiffness:i,damping:a}}else{const r=hs(e);t={...t,...r,mass:ts},t.isResolvedFromDuration=!0}return t}({...r,velocity:-Ba(r.velocity||0)}),p=d||0,f=l/(2*Math.sqrt(A*c)),m=o-a,g=Ba(Math.sqrt(A/c)),y=Math.abs(m)<5;let v;if(n||(n=y?os.granular:os.default),i||(i=y?ss.granular:ss.default),f<1){const e=fs(g,f);v=t=>{const r=Math.exp(-f*g*t);return o-r*((p+f*g*m)/e*Math.sin(e*t)+m*Math.cos(e*t))}}else if(1===f)v=e=>o-Math.exp(-g*e)*(m+(p+g*m)*e);else{const e=g*Math.sqrt(f*f-1);v=t=>{const r=Math.exp(-f*g*t),n=Math.min(e*t,300);return o-r*((p+f*g*m)*Math.sinh(n)+e*m*Math.cosh(n))/e}}const x={calculatedDuration:h&&u||null,next:e=>{const t=v(e);if(h)s.done=e>=u;else{let r=0===e?p:0;f<1&&(r=0===e?ba(p):Jo(v,e,t));const a=Math.abs(r)<=n,A=Math.abs(o-t)<=i;s.done=a&&A}return s.value=s.done?o:t,s},toString:()=>{const e=Math.min(Xo(x),Yo),t=qo(t=>x.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return x}function xs({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:A,restDelta:l=.5,restSpeed:c}){const u=e[0],d={done:!1,value:u},h=e=>void 0===s?A:void 0===A||Math.abs(s-e)<Math.abs(A-e)?s:A;let p=r*t;const f=u+p,m=void 0===o?f:o(f);m!==f&&(p=m-u);const g=e=>-p*Math.exp(-e/n),y=e=>m+g(e),v=e=>{const t=g(e),r=y(e);d.done=Math.abs(t)<=l,d.value=d.done?m:r};let x,w;const b=e=>{var t;(t=d.value,void 0!==s&&t<s||void 0!==A&&t>A)&&(x=e,w=vs({keyframes:[d.value,h(d.value)],velocity:Jo(y,e,d.value),damping:i,stiffness:a,restDelta:l,restSpeed:c}))};return b(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==x||(t=!0,v(e),b(e)),void 0!==x&&e>=x?w.next(e-x):(!t&&v(e),d)}}}function ws(e,t,{clamp:r=!0,ease:n,mixer:i}={}){const a=e.length;if(ua(a===t.length,"Both input and output ranges must be the same length","range-length"),1===a)return()=>t[0];if(2===a&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=function(e,t,r){const n=[],i=r||da.mix||Wo,a=e.length-1;for(let o=0;o<a;o++){let r=i(e[o],e[o+1]);if(t){const e=Array.isArray(t)?t[o]||ga:t;r=va(e,r)}n.push(r)}return n}(t,n,i),A=s.length,l=r=>{if(o&&r<e[0])return t[0];let n=0;if(A>1)for(;n<e.length-2&&!(r<e[n+1]);n++);const i=xa(e[n],e[n+1],r);return s[n](i)};return r?t=>l(Aa(e[0],e[a-1],t)):l}function bs(e){const t=[0];return function(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const i=xa(0,t,n);e.push(Po(r,1,i))}}(t,e.length-1),t}function Bs({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){const i=(e=>Array.isArray(e)&&"number"!=typeof e[0])(n)?n.map(Ka):Ka(n),a={done:!1,value:t[0]},o=function(e,t){return e.map(e=>e*t)}(r&&r.length===t.length?r:bs(t),e),s=ws(o,t,{ease:Array.isArray(i)?i:(A=t,l=i,A.map(()=>l||Ha).splice(0,A.length-1))});var A,l;return{calculatedDuration:e,next:t=>(a.value=s(t),a.done=t>=e,a)}}vs.applyToOptions=e=>{const t=function(e,t=100,r){const n=r({...e,keyframes:[0,t]}),i=Math.min(Xo(n),Yo);return{type:"keyframes",ease:e=>n.next(i*e).value/t,duration:Ba(i)}}(e,100,vs);return e.ease=t.ease,e.duration=ba(t.duration),e.type="keyframes",e};const Cs=e=>null!==e;function Es(e,{repeat:t,repeatType:r="loop"},n,i=1){const a=e.filter(Cs),o=i<0||t&&"loop"!==r&&t%2==1?0:a.length-1;return o&&void 0!==n?n:a[o]}const ks={decay:xs,inertia:xs,tween:Bs,keyframes:Bs,spring:vs};function Ss(e){"string"==typeof e.type&&(e.type=ks[e.type])}class js{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}const Fs=e=>e/100;class Qs extends js{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var e,t;const{motionValue:r}=this.options;r&&r.updatedAt!==Ja.now()&&this.tick(Ja.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),null==(t=(e=this.options).onStop)||t.call(e))},this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){const{options:e}=this;Ss(e);const{type:t=Bs,repeat:r=0,repeatDelay:n=0,repeatType:i,velocity:a=0}=e;let{keyframes:o}=e;const s=t||Bs;"production"!==process.env.NODE_ENV&&s!==Bs&&ua(o.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`,"spring-two-frames"),s!==Bs&&"number"!=typeof o[0]&&(this.mixKeyframes=va(Fs,Wo(o[0],o[1])),o=[0,100]);const A=s({...e,keyframes:o});"mirror"===i&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),null===A.calculatedDuration&&(A.calculatedDuration=Xo(A));const{calculatedDuration:l}=A;this.calculatedDuration=l,this.resolvedDuration=l+n,this.totalDuration=this.resolvedDuration*(r+1)-n,this.generator=A}updateTime(e){const t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){const{generator:r,totalDuration:n,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(null===this.startTime)return r.next(0);const{delay:A=0,keyframes:l,repeat:c,repeatType:u,repeatDelay:d,type:h,onUpdate:p,finalKeyframe:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-n/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);const m=this.currentTime-A*(this.playbackSpeed>=0?1:-1),g=this.playbackSpeed>=0?m<0:m>n;this.currentTime=Math.max(m,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=n);let y=this.currentTime,v=r;if(c){const e=Math.min(this.currentTime,n)/o;let t=Math.floor(e),r=e%1;!r&&e>=1&&(r=1),1===r&&t--,t=Math.min(t,c+1);Boolean(t%2)&&("reverse"===u?(r=1-r,d&&(r-=d/o)):"mirror"===u&&(v=a)),y=Aa(0,1,r)*o}const x=g?{done:!1,value:l[0]}:v.next(y);i&&(x.value=i(x.value));let{done:w}=x;g||null===s||(w=this.playbackSpeed>=0?this.currentTime>=n:this.currentTime<=0);const b=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return b&&h!==xs&&(x.value=Es(l,this.options,f,this.speed)),p&&p(x.value),b&&this.finish(),x}then(e,t){return this.finished.then(e,t)}get duration(){return Ba(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Ba(e)}get time(){return Ba(this.currentTime)}set time(e){var t;e=ba(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),null==(t=this.driver)||t.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(Ja.now());const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=Ba(this.currentTime))}play(){var e,t;if(this.isStopped)return;const{driver:r=Go,startTime:n}=this.options;this.driver||(this.driver=r(e=>this.tick(e))),null==(t=(e=this.options).onPlay)||t.call(e);const i=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=i):null!==this.holdTime?this.startTime=i-this.holdTime:this.startTime||(this.startTime=n??i),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ja.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,t;this.notifyFinished(),this.teardown(),this.state="finished",null==(t=(e=this.options).onComplete)||t.call(e)}cancel(){var e,t;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),null==(t=(e=this.options).onCancel)||t.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var t;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),null==(t=this.driver)||t.stop(),e.observe(this)}}const Ns=e=>180*e/Math.PI,Us=e=>{const t=Ns(Math.atan2(e[1],e[0]));return Is(t)},Os={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Us,rotateZ:Us,skewX:e=>Ns(Math.atan(e[1])),skewY:e=>Ns(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Is=e=>((e%=360)<0&&(e+=360),e),Ts=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Ps=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Ms={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ts,scaleY:Ps,scale:e=>(Ts(e)+Ps(e))/2,rotateX:e=>Is(Ns(Math.atan2(e[6],e[5]))),rotateY:e=>Is(Ns(Math.atan2(-e[2],e[0]))),rotateZ:Us,rotate:Us,skewX:e=>Ns(Math.atan(e[4])),skewY:e=>Ns(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Ds(e){return e.includes("scale")?1:0}function Ls(e,t){if(!e||"none"===e)return Ds(t);const r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,i;if(r)n=Ms,i=r;else{const t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=Os,i=t}if(!i)return Ds(t);const a=n[t],o=i[1].split(",").map(Hs);return"function"==typeof a?a(o):o[a]}function Hs(e){return parseFloat(e.trim())}const _s=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Rs=(()=>new Set(_s))(),Ks=e=>e===io||e===vo,zs=new Set(["x","y","z"]),Vs=_s.filter(e=>!zs.has(e));const $s={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Ls(t,"x"),y:(e,{transform:t})=>Ls(t,"y")};$s.translateX=$s.x,$s.translateY=$s.y;const Ws=new Set;let Gs=!1,qs=!1,Ys=!1;function Xs(){if(qs){const e=Array.from(Ws).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),r=new Map;t.forEach(e=>{const t=function(e){const t=[];return Vs.forEach(r=>{const n=e.getValue(r);void 0!==n&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t}(e);t.length&&(r.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();const t=r.get(e);t&&t.forEach(([t,r])=>{var n;null==(n=e.getValue(t))||n.set(r)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}qs=!1,Gs=!1,Ws.forEach(e=>e.complete(Ys)),Ws.clear()}function Js(){Ws.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(qs=!0)})}class Zs{constructor(e,t,r,n,i,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=r,this.motionValue=n,this.element=i,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(Ws.add(this),Gs||(Gs=!0,$a.read(Js),$a.resolveKeyframes(Xs))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:r,motionValue:n}=this;if(null===e[0]){const i=null==n?void 0:n.get(),a=e[e.length-1];if(void 0!==i)e[0]=i;else if(r&&t){const n=r.readValue(t,a);null!=n&&(e[0]=n)}void 0===e[0]&&(e[0]=a),n&&void 0===i&&n.set(e[0])}!function(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Ws.delete(this)}cancel(){"scheduled"===this.state&&(Ws.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const eA=ma(()=>void 0!==window.ScrollTimeline),tA={};function rA(e,t){const r=ma(e);return()=>tA[t]??r()}const nA=rA(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(eX){return!1}return!0},"linearEasing"),iA=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,aA={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:iA([0,.65,.55,1]),circOut:iA([.55,0,1,.45]),backIn:iA([.31,.01,.66,-.59]),backOut:iA([.33,1.53,.69,.99])};function oA(e,t){return e?"function"==typeof e?nA()?qo(e,t):"ease-out":_a(e)?iA(e):Array.isArray(e)?e.map(e=>oA(e,t)||aA.easeOut):aA[e]:void 0}function sA(e,t,r,{delay:n=0,duration:i=300,repeat:a=0,repeatType:o="loop",ease:s="easeOut",times:A}={},l=void 0){const c={[t]:r};A&&(c.offset=A);const u=oA(s,i);Array.isArray(u)&&(c.easing=u);const d={delay:n,duration:i,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:a+1,direction:"reverse"===o?"alternate":"normal"};l&&(d.pseudoElement=l);return e.animate(c,d)}function AA(e){return"function"==typeof e&&"applyToOptions"in e}class lA extends js{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:t,name:r,keyframes:n,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=Boolean(i),this.allowFlatten=a,this.options=e,ua("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const A=function({type:e,...t}){return AA(e)&&nA()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=sA(t,r,n,A,i),!1===A.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const e=Es(n,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(e):function(e,t,r){(e=>e.startsWith("--"))(t)?e.style.setProperty(t,r):e.style[t]=r}(t,r,e),this.animation.cancel()}null==s||s(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,t;null==(t=(e=this.animation).finish)||t.call(e)}cancel(){try{this.animation.cancel()}catch(eX){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var e,t;this.isPseudoElement||null==(t=(e=this.animation).commitStyles)||t.call(e)}get duration(){var e,t;const r=(null==(t=null==(e=this.animation.effect)?void 0:e.getComputedTiming)?void 0:t.call(e).duration)||0;return Ba(Number(r))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Ba(e)}get time(){return Ba(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=ba(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:t}){var r;return this.allowFlatten&&(null==(r=this.animation.effect)||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&eA()?(this.animation.timeline=e,ga):t(this)}}const cA={anticipate:Ia,backInOut:Oa,circInOut:Ma};function uA(e){"string"==typeof e.ease&&e.ease in cA&&(e.ease=cA[e.ease])}class dA extends lA{constructor(e){uA(e),Ss(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:t,onUpdate:r,onComplete:n,element:i,...a}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);const o=new Qs({...a,autoplay:!1}),s=ba(this.finishedTime??this.time);t.setWithVelocity(o.sample(s-10).value,o.sample(s).value,10),o.stop()}}const hA=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!Oo.test(e)&&"0"!==e||e.startsWith("url(")));function pA(e){e.duration=0,e.type="keyframes"}const fA=new Set(["opacity","clipPath","filter","transform"]),mA=ma(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class gA extends js{constructor({autoplay:e=!0,delay:t=0,type:r="keyframes",repeat:n=0,repeatDelay:i=0,repeatType:a="loop",keyframes:o,name:s,motionValue:A,element:l,...c}){var u;super(),this.stop=()=>{var e,t;this._animation&&(this._animation.stop(),null==(e=this.stopTimeline)||e.call(this)),null==(t=this.keyframeResolver)||t.cancel()},this.createdAt=Ja.now();const d={autoplay:e,delay:t,type:r,repeat:n,repeatDelay:i,repeatType:a,name:s,motionValue:A,element:l,...c},h=(null==l?void 0:l.KeyframeResolver)||Zs;this.keyframeResolver=new h(o,(e,t,r)=>this.onKeyframesResolved(e,t,d,!r),s,A,l),null==(u=this.keyframeResolver)||u.scheduleResolve()}onKeyframesResolved(e,t,r,n){this.keyframeResolver=void 0;const{name:i,type:a,velocity:o,delay:s,isHandoff:A,onUpdate:l}=r;this.resolvedAt=Ja.now(),function(e,t,r,n){const i=e[0];if(null===i)return!1;if("display"===t||"visibility"===t)return!0;const a=e[e.length-1],o=hA(i,t),s=hA(a,t);return ca(o===s,`You are trying to animate ${t} from "${i}" to "${a}". "${o?a:i}" is not an animatable value.`,"value-not-animatable"),!(!o||!s)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}(e)||("spring"===r||AA(r))&&n)}(e,i,a,o)||(!da.instantAnimations&&s||null==l||l(Es(e,r,t)),e[0]=e[e.length-1],pA(r),r.repeat=0);const c={startTime:n?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...r,keyframes:e},u=!A&&function(e){var t;const{motionValue:r,name:n,repeatDelay:i,repeatType:a,damping:o,type:s}=e;if(!((null==(t=null==r?void 0:r.owner)?void 0:t.current)instanceof HTMLElement))return!1;const{onUpdate:A,transformTemplate:l}=r.owner.getProps();return mA()&&n&&fA.has(n)&&("transform"!==n||!l)&&!A&&!i&&"mirror"!==a&&0!==o&&"inertia"!==s}(c)?new dA({...c,element:c.motionValue.owner.current}):new Qs(c);u.finished.then(()=>this.notifyFinished()).catch(ga),this.pendingTimeline&&(this.stopTimeline=u.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=u}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||(null==(e=this.keyframeResolver)||e.resume(),Ys=!0,Js(),Xs(),Ys=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),null==(e=this.keyframeResolver)||e.cancel()}}const yA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function vA(e,t,r=1){ua(r<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[n,i]=function(e){const t=yA.exec(e);if(!t)return[,];const[,r,n,i]=t;return[`--${r??n}`,i]}(e);if(!n)return;const a=window.getComputedStyle(t).getPropertyValue(n);if(a){const e=a.trim();return ha(e)?parseFloat(e):e}return ro(i)?vA(i,t,r+1):i}function xA(e,t){return(null==e?void 0:e[t])??(null==e?void 0:e.default)??e}const wA=new Set(["width","height","top","left","right","bottom",..._s]),bA=e=>t=>t.test(e),BA=[io,vo,yo,go,wo,xo,{test:e=>"auto"===e,parse:e=>e}],CA=e=>BA.find(bA(e));function EA(e){return"number"==typeof e?0===e:null===e||("none"===e||"0"===e||fa(e))}const kA=new Set(["brightness","contrast","saturate","opacity"]);function SA(e){const[t,r]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[n]=r.match(Ao)||[];if(!n)return e;const i=r.replace(n,"");let a=kA.has(t)?1:0;return n!==r&&(a*=100),t+"("+a+i+")"}const jA=/\b([a-z-]*)\(.*?\)/gu,FA={...Oo,getAnimatableNone:e=>{const t=e.match(jA);return t?t.map(SA).join(" "):e}},QA={...io,transform:Math.round},NA={borderWidth:vo,borderTopWidth:vo,borderRightWidth:vo,borderBottomWidth:vo,borderLeftWidth:vo,borderRadius:vo,radius:vo,borderTopLeftRadius:vo,borderTopRightRadius:vo,borderBottomRightRadius:vo,borderBottomLeftRadius:vo,width:vo,maxWidth:vo,height:vo,maxHeight:vo,top:vo,right:vo,bottom:vo,left:vo,padding:vo,paddingTop:vo,paddingRight:vo,paddingBottom:vo,paddingLeft:vo,margin:vo,marginTop:vo,marginRight:vo,marginBottom:vo,marginLeft:vo,backgroundPositionX:vo,backgroundPositionY:vo,...{rotate:go,rotateX:go,rotateY:go,rotateZ:go,scale:oo,scaleX:oo,scaleY:oo,scaleZ:oo,skew:go,skewX:go,skewY:go,distance:vo,translateX:vo,translateY:vo,translateZ:vo,x:vo,y:vo,z:vo,perspective:vo,transformPerspective:vo,opacity:ao,originX:bo,originY:bo,originZ:vo},zIndex:QA,fillOpacity:ao,strokeOpacity:ao,numOctaves:QA},UA={...NA,color:Co,backgroundColor:Co,outlineColor:Co,fill:Co,stroke:Co,borderColor:Co,borderTopColor:Co,borderRightColor:Co,borderBottomColor:Co,borderLeftColor:Co,filter:FA,WebkitFilter:FA},OA=e=>UA[e];function IA(e,t){let r=OA(e);return r!==FA&&(r=Oo),r.getAnimatableNone?r.getAnimatableNone(t):void 0}const TA=new Set(["auto","none","0"]);class PA extends Zs{constructor(e,t,r,n,i){super(e,t,r,n,i,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:r}=this;if(!t||!t.current)return;super.readKeyframes();for(let s=0;s<e.length;s++){let r=e[s];if("string"==typeof r&&(r=r.trim(),ro(r))){const n=vA(r,t.current);void 0!==n&&(e[s]=n),s===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!wA.has(r)||2!==e.length)return;const[n,i]=e,a=CA(n),o=CA(i);if(a!==o)if(Ks(a)&&Ks(o))for(let s=0;s<e.length;s++){const t=e[s];"string"==typeof t&&(e[s]=parseFloat(t))}else $s[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,r=[];for(let n=0;n<e.length;n++)(null===e[n]||EA(e[n]))&&r.push(n);r.length&&function(e,t,r){let n,i=0;for(;i<e.length&&!n;){const t=e[i];"string"==typeof t&&!TA.has(t)&&Fo(t).values.length&&(n=e[i]),i++}if(n&&r)for(const a of t)e[a]=IA(r,n)}(e,r,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:r}=this;if(!e||!e.current)return;"height"===r&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=$s[r](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const n=t[t.length-1];void 0!==n&&e.getValue(r,n).jump(n,!1)}measureEndState(){var e;const{element:t,name:r,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const i=t.getValue(r);i&&i.jump(this.measuredOrigin,!1);const a=n.length-1,o=n[a];n[a]=$s[r](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),(null==(e=this.removedTransforms)?void 0:e.length)&&this.removedTransforms.forEach(([e,r])=>{t.getValue(e).set(r)}),this.resolveNoneKeyframes()}}const MA=(e,t)=>t&&"number"==typeof e?t.transform(e):e;function DA(e){return pa(e)&&"offsetHeight"in e}class LA{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{var t;const r=Ja.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(null==(t=this.events.change)||t.notify(this.current),this.dependents))for(const n of this.dependents)n.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=Ja.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return"production"!==process.env.NODE_ENV&&ka(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new wa);const r=this.events[e].add(t);return"change"===e?()=>{r(),$a.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,r){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;null==(e=this.events.change)||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=Ja.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Ca(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var e,t;null==(e=this.dependents)||e.clear(),null==(t=this.events.destroy)||t.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function HA(e,t){return new LA(e,t)}const{schedule:_A}=Va(queueMicrotask,!1),RA={x:!1,y:!1};function KA(){return RA.x||RA.y}function zA(e,t){const r=function(e,t,r){if(e instanceof EventTarget)return[e];if("string"==typeof e){let t=document;const n=(null==r?void 0:r[e])??t.querySelectorAll(e);return n?Array.from(n):[]}return Array.from(e)}(e),n=new AbortController;return[r,{passive:!0,...t,signal:n.signal},()=>n.abort()]}function VA(e){return!("touch"===e.pointerType||KA())}const $A=(e,t)=>!!t&&(e===t||$A(e,t.parentElement)),WA=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,GA=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const qA=new WeakSet;function YA(e){return t=>{"Enter"===t.key&&e(t)}}function XA(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function JA(e){return WA(e)&&!KA()}function ZA(e,t,r={}){const[n,i,a]=zA(e,r),o=e=>{const n=e.currentTarget;if(!JA(e))return;qA.add(n);const a=t(n,e),o=(e,t)=>{window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",A),qA.has(n)&&qA.delete(n),JA(e)&&"function"==typeof a&&a(e,{success:t})},s=e=>{o(e,n===window||n===document||r.useGlobalTarget||$A(n,e.target))},A=e=>{o(e,!1)};window.addEventListener("pointerup",s,i),window.addEventListener("pointercancel",A,i)};return n.forEach(e=>{var t;(r.useGlobalTarget?window:e).addEventListener("pointerdown",o,i),DA(e)&&(e.addEventListener("focus",e=>((e,t)=>{const r=e.currentTarget;if(!r)return;const n=YA(()=>{if(qA.has(r))return;XA(r,"down");const e=YA(()=>{XA(r,"up")});r.addEventListener("keyup",e,t),r.addEventListener("blur",()=>XA(r,"cancel"),t)});r.addEventListener("keydown",n,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",n),t)})(e,i)),t=e,GA.has(t.tagName)||-1!==t.tabIndex||e.hasAttribute("tabindex")||(e.tabIndex=0))}),a}function el(e){return pa(e)&&"ownerSVGElement"in e}const tl=e=>Boolean(e&&e.getVelocity),rl=[...BA,Co,Oo],nl=Te.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function il(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function al(...e){return De.useCallback(function(...e){return t=>{let r=!1;const n=e.map(e=>{const n=il(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){const r=n[t];"function"==typeof r?r():il(e[t],null)}}}}(...e),e)}class ol extends De.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=t.offsetParent,r=DA(e)&&e.offsetWidth||0,n=this.props.sizeRef.current;n.height=t.offsetHeight||0,n.width=t.offsetWidth||0,n.top=t.offsetTop,n.left=t.offsetLeft,n.right=r-n.width-n.left}return null}componentDidUpdate(){}render(){return this.props.children}}function sl({children:e,isPresent:t,anchorX:r,root:n}){const i=Te.useId(),a=Te.useRef(null),o=Te.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:s}=Te.useContext(nl),A=al(a,null==e?void 0:e.ref);return Te.useInsertionEffect(()=>{const{width:e,height:A,top:l,left:c,right:u}=o.current;if(t||!a.current||!e||!A)return;const d="left"===r?`left: ${c}`:`right: ${u}`;a.current.dataset.motionPopId=i;const h=document.createElement("style");s&&(h.nonce=s);const p=n??document.head;return p.appendChild(h),h.sheet&&h.sheet.insertRule(`\n [data-motion-pop-id="${i}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${A}px !important;\n ${d}px !important;\n top: ${l}px !important;\n }\n `),()=>{p.contains(h)&&p.removeChild(h)}},[t]),Ie.jsx(ol,{isPresent:t,childRef:a,sizeRef:o,children:De.cloneElement(e,{ref:A})})}const Al=({children:e,initial:t,isPresent:r,onExitComplete:n,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,root:A})=>{const l=ra(ll),c=Te.useId();let u=!0,d=Te.useMemo(()=>(u=!1,{id:c,initial:t,isPresent:r,custom:i,onExitComplete:e=>{l.set(e,!0);for(const t of l.values())if(!t)return;n&&n()},register:e=>(l.set(e,!1),()=>l.delete(e))}),[r,l,n]);return a&&u&&(d={...d}),Te.useMemo(()=>{l.forEach((e,t)=>l.set(t,!1))},[r]),De.useEffect(()=>{!r&&!l.size&&n&&n()},[r]),"popLayout"===o&&(e=Ie.jsx(sl,{isPresent:r,anchorX:s,root:A,children:e})),Ie.jsx(aa.Provider,{value:d,children:e})};function ll(){return new Map}function cl(e=!0){const t=Te.useContext(aa);if(null===t)return[!0,null];const{isPresent:r,onExitComplete:n,register:i}=t,a=Te.useId();Te.useEffect(()=>{if(e)return i(a)},[e]);const o=Te.useCallback(()=>e&&n&&n(a),[a,n,e]);return!r&&n?[!1,o]:[!0]}const ul=e=>e.key||"";function dl(e){const t=[];return Te.Children.forEach(e,e=>{Te.isValidElement(e)&&t.push(e)}),t}const hl=({children:e,custom:t,initial:r=!0,onExitComplete:n,presenceAffectsLayout:i=!0,mode:a="sync",propagate:o=!1,anchorX:s="left",root:A})=>{const[l,c]=cl(o),u=Te.useMemo(()=>dl(e),[e]),d=o&&!l?[]:u.map(ul),h=Te.useRef(!0),p=Te.useRef(u),f=ra(()=>new Map),[m,g]=Te.useState(u),[y,v]=Te.useState(u);ia(()=>{h.current=!1,p.current=u;for(let e=0;e<y.length;e++){const t=ul(y[e]);d.includes(t)?f.delete(t):!0!==f.get(t)&&f.set(t,!1)}},[y,d.length,d.join("-")]);const x=[];if(u!==m){let e=[...u];for(let t=0;t<y.length;t++){const r=y[t],n=ul(r);d.includes(n)||(e.splice(t,0,r),x.push(r))}return"wait"===a&&x.length&&(e=x),v(dl(e)),g(u),null}"production"!==process.env.NODE_ENV&&"wait"===a&&y.length>1&&console.warn('You\'re attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.');const{forceRender:w}=Te.useContext(ta);return Ie.jsx(Ie.Fragment,{children:y.map(e=>{const m=ul(e),g=!(o&&!l)&&(u===y||d.includes(m));return Ie.jsx(Al,{isPresent:g,initial:!(h.current&&!r)&&void 0,custom:t,presenceAffectsLayout:i,mode:a,root:A,onExitComplete:g?void 0:()=>{if(!f.has(m))return;f.set(m,!0);let e=!0;f.forEach(t=>{t||(e=!1)}),e&&(null==w||w(),v(p.current),o&&(null==c||c()),n&&n())},anchorX:s,children:e},m)})})},pl=Te.createContext({strict:!1}),fl={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},ml={};for(const Aoe in fl)ml[Aoe]={isEnabled:e=>fl[Aoe].some(t=>!!e[t])};const gl=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function yl(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||gl.has(e)}let vl=e=>!yl(e);try{"function"==typeof(xl=require("@emotion/is-prop-valid").default)&&(vl=e=>e.startsWith("on")?!yl(e):xl(e))}catch{}var xl;const wl=Te.createContext({});function bl(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function Bl(e){return"string"==typeof e||Array.isArray(e)}const Cl=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],El=["initial",...Cl];function kl(e){return bl(e.animate)||El.some(t=>Bl(e[t]))}function Sl(e){return Boolean(kl(e)||e.variants)}function jl(e){const{initial:t,animate:r}=function(e,t){if(kl(e)){const{initial:t,animate:r}=e;return{initial:!1===t||Bl(t)?t:void 0,animate:Bl(r)?r:void 0}}return!1!==e.inherit?t:{}}(e,Te.useContext(wl));return Te.useMemo(()=>({initial:t,animate:r}),[Fl(t),Fl(r)])}function Fl(e){return Array.isArray(e)?e.join(" "):e}const Ql={};function Nl(e,{layout:t,layoutId:r}){return Rs.has(e)||e.startsWith("origin")||(t||void 0!==r)&&(!!Ql[e]||"opacity"===e)}const Ul={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Ol=_s.length;function Il(e,t,r){const{style:n,vars:i,transformOrigin:a}=e;let o=!1,s=!1;for(const A in t){const e=t[A];if(Rs.has(A))o=!0;else if(eo(A))i[A]=e;else{const t=MA(e,NA[A]);A.startsWith("origin")?(s=!0,a[A]=t):n[A]=t}}if(t.transform||(o||r?n.transform=function(e,t,r){let n="",i=!0;for(let a=0;a<Ol;a++){const o=_s[a],s=e[o];if(void 0===s)continue;let A=!0;if(A="number"==typeof s?s===(o.startsWith("scale")?1:0):0===parseFloat(s),!A||r){const e=MA(s,NA[o]);A||(i=!1,n+=`${Ul[o]||o}(${e}) `),r&&(t[o]=e)}}return n=n.trim(),r?n=r(t,i?"":n):i&&(n="none"),n}(t,e.transform,r):n.transform&&(n.transform="none")),s){const{originX:e="50%",originY:t="50%",originZ:r=0}=a;n.transformOrigin=`${e} ${t} ${r}`}}const Tl=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Pl(e,t,r){for(const n in t)tl(t[n])||Nl(n,r)||(e[n]=t[n])}function Ml(e,t){const r={};return Pl(r,e.style||{},e),Object.assign(r,function({transformTemplate:e},t){return Te.useMemo(()=>{const r={style:{},transform:{},transformOrigin:{},vars:{}};return Il(r,t,e),Object.assign({},r.vars,r.style)},[t])}(e,t)),r}function Dl(e,t){const r={},n=Ml(e,t);return e.drag&&!1!==e.dragListener&&(r.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=n,r}const Ll={offset:"stroke-dashoffset",array:"stroke-dasharray"},Hl={offset:"strokeDashoffset",array:"strokeDasharray"};function _l(e,{attrX:t,attrY:r,attrScale:n,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},A,l,c){if(Il(e,s,l),A)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:u,style:d}=e;u.transform&&(d.transform=u.transform,delete u.transform),(d.transform||u.transformOrigin)&&(d.transformOrigin=u.transformOrigin??"50% 50%",delete u.transformOrigin),d.transform&&(d.transformBox=(null==c?void 0:c.transformBox)??"fill-box",delete u.transformBox),void 0!==t&&(u.x=t),void 0!==r&&(u.y=r),void 0!==n&&(u.scale=n),void 0!==i&&function(e,t,r=1,n=0,i=!0){e.pathLength=1;const a=i?Ll:Hl;e[a.offset]=vo.transform(-n);const o=vo.transform(t),s=vo.transform(r);e[a.array]=`${o} ${s}`}(u,i,a,o,!1)}const Rl=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),Kl=e=>"string"==typeof e&&"svg"===e.toLowerCase();function zl(e,t,r,n){const i=Te.useMemo(()=>{const r={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return _l(r,t,Kl(n),e.transformTemplate,e.style),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const t={};Pl(t,e.style,e),i.style={...t,...i.style}}return i}const Vl=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function $l(e){return"string"==typeof e&&!e.includes("-")&&!!(Vl.indexOf(e)>-1||/[A-Z]/u.test(e))}function Wl(e,t,r,{latestValues:n},i,a=!1){const o=($l(e)?zl:Dl)(t,n,i,e),s=function(e,t,r){const n={};for(const i in e)"values"===i&&"object"==typeof e.values||(vl(i)||!0===r&&yl(i)||!t&&!yl(i)||e.draggable&&i.startsWith("onDrag"))&&(n[i]=e[i]);return n}(t,"string"==typeof e,a),A=e!==Te.Fragment?{...s,...o,ref:r}:{},{children:l}=t,c=Te.useMemo(()=>tl(l)?l.get():l,[l]);return Te.createElement(e,{...A,children:c})}function Gl(e){const t=[{},{}];return null==e||e.values.forEach((e,r)=>{t[0][r]=e.get(),t[1][r]=e.getVelocity()}),t}function ql(e,t,r,n){if("function"==typeof t){const[i,a]=Gl(n);t=t(void 0!==r?r:e.custom,i,a)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[i,a]=Gl(n);t=t(void 0!==r?r:e.custom,i,a)}return t}function Yl(e){return tl(e)?e.get():e}function Xl(e,t,r,n){const i={},a=n(e,{});for(const d in a)i[d]=Yl(a[d]);let{initial:o,animate:s}=e;const A=kl(e),l=Sl(e);t&&l&&!A&&!1!==e.inherit&&(void 0===o&&(o=t.initial),void 0===s&&(s=t.animate));let c=!!r&&!1===r.initial;c=c||!1===o;const u=c?s:o;if(u&&"boolean"!=typeof u&&!bl(u)){const t=Array.isArray(u)?u:[u];for(let r=0;r<t.length;r++){const n=ql(e,t[r]);if(n){const{transitionEnd:e,transition:t,...r}=n;for(const n in r){let e=r[n];if(Array.isArray(e)){e=e[c?e.length-1:0]}null!==e&&(i[n]=e)}for(const n in e)i[n]=e[n]}}}return i}const Jl=e=>(t,r)=>{const n=Te.useContext(wl),i=Te.useContext(aa),a=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t},r,n,i){return{latestValues:Xl(r,n,i,e),renderState:t()}}(e,t,n,i);return r?a():ra(a)};function Zl(e,t,r){var n;const{style:i}=e,a={};for(const o in i)(tl(i[o])||t.style&&tl(t.style[o])||Nl(o,e)||void 0!==(null==(n=null==r?void 0:r.getValue(o))?void 0:n.liveStyle))&&(a[o]=i[o]);return a}const ec=Jl({scrapeMotionValuesFromProps:Zl,createRenderState:Tl});function tc(e,t,r){const n=Zl(e,t,r);for(const i in e)if(tl(e[i])||tl(t[i])){n[-1!==_s.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=e[i]}return n}const rc=Jl({scrapeMotionValuesFromProps:tc,createRenderState:Rl}),nc=Symbol.for("motionComponentSymbol");function ic(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function ac(e,t,r){return Te.useCallback(n=>{n&&e.onMount&&e.onMount(n),t&&(n?t.mount(n):t.unmount()),r&&("function"==typeof r?r(n):ic(r)&&(r.current=n))},[t])}const oc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),sc="data-"+oc("framerAppearId"),Ac=Te.createContext({});function lc(e,t,r,n,i){var a,o;const{visualElement:s}=Te.useContext(wl),A=Te.useContext(pl),l=Te.useContext(aa),c=Te.useContext(nl).reducedMotion,u=Te.useRef(null);n=n||A.renderer,!u.current&&n&&(u.current=n(e,{visualState:t,parent:s,props:r,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:c}));const d=u.current,h=Te.useContext(Ac);!d||d.projection||!i||"html"!==d.type&&"svg"!==d.type||function(e,t,r,n){const{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:A,layoutRoot:l,layoutCrossfade:c}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:cc(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:Boolean(o)||s&&ic(s),visualElement:e,animationType:"string"==typeof a?a:"both",initialPromotionConfig:n,crossfade:c,layoutScroll:A,layoutRoot:l})}(u.current,r,i,h);const p=Te.useRef(!1);Te.useInsertionEffect(()=>{d&&p.current&&d.update(r,l)});const f=r[sc],m=Te.useRef(Boolean(f)&&!(null==(a=window.MotionHandoffIsComplete)?void 0:a.call(window,f))&&(null==(o=window.MotionHasOptimisedAnimation)?void 0:o.call(window,f)));return ia(()=>{d&&(p.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),m.current&&d.animationState&&d.animationState.animateChanges())}),Te.useEffect(()=>{d&&(!m.current&&d.animationState&&d.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var e;null==(e=window.MotionHandoffMarkAsComplete)||e.call(window,f)}),m.current=!1),d.enteringChildren=void 0)}),d}function cc(e){if(e)return!1!==e.options.allowProjection?e.projection:cc(e.parent)}function uc(e,{forwardMotionProps:t=!1}={},r,n){r&&function(e){for(const t in e)ml[t]={...ml[t],...e[t]}}(r);const i=$l(e)?rc:ec;function a(a,o){let s;const A={...Te.useContext(nl),...a,layoutId:dc(a)},{isStatic:l}=A,c=jl(a),u=i(a,l);if(!l&&na){!function(e,t){const r=Te.useContext(pl).strict;if("production"!==process.env.NODE_ENV&&t&&r){const t="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?ca(!1,t,"lazy-strict-mode"):ua(!1,t,"lazy-strict-mode")}}(A,r);const t=function(e){const{drag:t,layout:r}=ml;if(!t&&!r)return{};const n={...t,...r};return{MeasureLayout:(null==t?void 0:t.isEnabled(e))||(null==r?void 0:r.isEnabled(e))?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}(A);s=t.MeasureLayout,c.visualElement=lc(e,u,A,n,t.ProjectionNode)}return Ie.jsxs(wl.Provider,{value:c,children:[s&&c.visualElement?Ie.jsx(s,{visualElement:c.visualElement,...A}):null,Wl(e,a,ac(u,c.visualElement,o),u,l,t)]})}a.displayName=`motion.${"string"==typeof e?e:`create(${e.displayName??e.name??""})`}`;const o=Te.forwardRef(a);return o[nc]=e,o}function dc({layoutId:e}){const t=Te.useContext(ta).id;return t&&void 0!==e?t+"-"+e:e}function hc(e,t){if("undefined"==typeof Proxy)return uc;const r=new Map,n=(r,n)=>uc(r,n,e,t);return new Proxy((e,t)=>("production"!==process.env.NODE_ENV&&ka(!1,"motion() is deprecated. Use motion.create() instead."),n(e,t)),{get:(i,a)=>"create"===a?n:(r.has(a)||r.set(a,uc(a,void 0,e,t)),r.get(a))})}function pc({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function fc(e){return void 0===e||1===e}function mc({scale:e,scaleX:t,scaleY:r}){return!fc(e)||!fc(t)||!fc(r)}function gc(e){return mc(e)||yc(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function yc(e){return vc(e.x)||vc(e.y)}function vc(e){return e&&"0%"!==e}function xc(e,t,r){return r+t*(e-r)}function wc(e,t,r,n,i){return void 0!==i&&(e=xc(e,i,n)),xc(e,r,n)+t}function bc(e,t=0,r=1,n,i){e.min=wc(e.min,t,r,n,i),e.max=wc(e.max,t,r,n,i)}function Bc(e,{x:t,y:r}){bc(e.x,t.translate,t.scale,t.originPoint),bc(e.y,r.translate,r.scale,r.originPoint)}const Cc=.999999999999,Ec=1.0000000000001;function kc(e,t){e.min=e.min+t,e.max=e.max+t}function Sc(e,t,r,n,i=.5){bc(e,t,r,Po(e.min,e.max,i),n)}function jc(e,t){Sc(e.x,t.x,t.scaleX,t.scale,t.originX),Sc(e.y,t.y,t.scaleY,t.scale,t.originY)}function Fc(e,t){return pc(function(e,t){if(!t)return e;const r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}(e.getBoundingClientRect(),t))}const Qc=()=>({x:{min:0,max:0},y:{min:0,max:0}}),Nc={current:null},Uc={current:!1};const Oc=new WeakMap;const Ic=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Tc{scrapeMotionValuesFromProps(e,t,r){return{}}constructor({parent:e,props:t,presenceContext:r,reducedMotionConfig:n,blockInitialAnimation:i,visualState:a},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Zs,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const e=Ja.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,$a.render(this.render,!1,!0))};const{latestValues:s,renderState:A}=a;this.latestValues=s,this.baseTarget={...s},this.initialValues=t.initial?{...s}:{},this.renderState=A,this.parent=e,this.props=t,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=n,this.options=o,this.blockInitialAnimation=Boolean(i),this.isControllingVariants=kl(t),this.isVariantNode=Sl(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:l,...c}=this.scrapeMotionValuesFromProps(t,{},this);for(const u in c){const e=c[u];void 0!==s[u]&&tl(e)&&e.set(s[u])}}mount(e){var t;this.current=e,Oc.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),Uc.current||function(){if(Uc.current=!0,na)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Nc.current=e.matches;e.addEventListener("change",t),t()}else Nc.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Nc.current),"production"!==process.env.NODE_ENV&&ka(!0!==this.shouldReduceMotion,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),null==(t=this.parent)||t.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var e;this.projection&&this.projection.unmount(),Wa(this.notifyUpdate),Wa(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),null==(e=this.parent)||e.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const r=Rs.has(e);r&&this.onBindTransform&&this.onBindTransform();const n=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&$a.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{n(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in ml){const t=ml[e];if(!t)continue;const{isEnabled:r,Feature:n}=t;if(!this.features[e]&&n&&r(this.props)&&(this.features[e]=new n(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let r=0;r<Ic.length;r++){const t=Ic[r];this.propEventSubscriptions[t]&&(this.propEventSubscriptions[t](),delete this.propEventSubscriptions[t]);const n=e["on"+t];n&&(this.propEventSubscriptions[t]=this.on(t,n))}this.prevMotionValues=function(e,t,r){for(const n in t){const i=t[n],a=r[n];if(tl(i))e.addValue(n,i);else if(tl(a))e.addValue(n,HA(i,{owner:e}));else if(a!==i)if(e.hasValue(n)){const t=e.getValue(n);!0===t.liveStyle?t.jump(i):t.hasAnimated||t.set(i)}else{const t=e.getStaticValue(n);e.addValue(n,HA(void 0!==t?t:i,{owner:e}))}}for(const n in r)void 0===t[n]&&e.removeValue(n);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const r=this.values.get(e);t!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return void 0===r&&void 0!==t&&(r=HA(null===t?void 0:t,{owner:this}),this.addValue(e,r)),r}readValue(e,t){let r=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];var n;return null!=r&&("string"==typeof r&&(ha(r)||fa(r))?r=parseFloat(r):(n=r,!rl.find(bA(n))&&Oo.test(t)&&(r=IA(e,t))),this.setBaseTarget(e,tl(r)?r.get():r)),tl(r)?r.get():r}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:r}=this.props;let n;if("string"==typeof r||"object"==typeof r){const i=ql(this.props,r,null==(t=this.presenceContext)?void 0:t.custom);i&&(n=i[e])}if(r&&void 0!==n)return n;const i=this.getBaseTargetFromProps(this.props,e);return void 0===i||tl(i)?void 0!==this.initialValues[e]&&void 0===n?void 0:this.baseTarget[e]:i}on(e,t){return this.events[e]||(this.events[e]=new wa),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){_A.render(this.render)}}class Pc extends Tc{constructor(){super(...arguments),this.KeyframeResolver=PA}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:r}){delete t[e],delete r[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;tl(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}function Mc(e,{style:t,vars:r},n,i){const a=e.style;let o;for(o in t)a[o]=t[o];for(o in null==i||i.applyProjectionStyles(a,n),r)a.setProperty(o,r[o])}class Dc extends Pc{constructor(){super(...arguments),this.type="html",this.renderInstance=Mc}readValueFromInstance(e,t){var r,n;if(Rs.has(t))return(null==(r=this.projection)?void 0:r.isProjecting)?Ds(t):((e,t)=>{const{transform:r="none"}=getComputedStyle(e);return Ls(r,t)})(e,t);{const r=(n=e,window.getComputedStyle(n)),i=(eo(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof i?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Fc(e,t)}build(e,t,r){Il(e,t,r.transformTemplate)}scrapeMotionValuesFromProps(e,t,r){return Zl(e,t,r)}}const Lc=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);class Hc extends Pc{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Qc}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Rs.has(t)){const e=OA(t);return e&&e.default||0}return t=Lc.has(t)?t:oc(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,r){return tc(e,t,r)}build(e,t,r){_l(e,t,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(e,t,r,n){!function(e,t,r,n){Mc(e,t,void 0,n);for(const i in t.attrs)e.setAttribute(Lc.has(i)?i:oc(i),t.attrs[i])}(e,t,0,n)}mount(e){this.isSVGTag=Kl(e.tagName),super.mount(e)}}const _c=(e,t)=>$l(e)?new Hc(t):new Dc(t,{allowProjection:e!==Te.Fragment});function Rc(e,t,r){const n=e.getProps();return ql(n,t,void 0!==r?r:n.custom,e)}const Kc=e=>Array.isArray(e);function zc(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,HA(r))}function Vc(e){return Kc(e)?e[e.length-1]||0:e}function $c(e,t){const r=e.getValue("willChange");if(n=r,Boolean(tl(n)&&n.add))return r.add(t);if(!r&&da.WillChange){const r=new da.WillChange("auto");e.addValue("willChange",r),r.add(t)}var n}function Wc(e){return e.props[sc]}const Gc=e=>null!==e;const qc={type:"spring",stiffness:500,damping:25,restSpeed:10},Yc={type:"keyframes",duration:.8},Xc={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Jc=(e,{keyframes:t})=>t.length>2?Yc:Rs.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:qc:Xc;const Zc=(e,t,r,n={},i,a)=>o=>{const s=xA(n,e)||{},A=s.delay||n.delay||0;let{elapsed:l=0}=n;l-=ba(A);const c={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};(function({when:e,delay:t,delayChildren:r,staggerChildren:n,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:A,elapsed:l,...c}){return!!Object.keys(c).length})(s)||Object.assign(c,Jc(e,c)),c.duration&&(c.duration=ba(c.duration)),c.repeatDelay&&(c.repeatDelay=ba(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let u=!1;if((!1===c.type||0===c.duration&&!c.repeatDelay)&&(pA(c),0===c.delay&&(u=!0)),(da.instantAnimations||da.skipAnimations)&&(u=!0,pA(c),c.delay=0),c.allowFlatten=!s.type&&!s.ease,u&&!a&&void 0!==t.get()){const e=function(e,{repeat:t,repeatType:r="loop"}){const n=e.filter(Gc);return n[t&&"loop"!==r&&t%2==1?0:n.length-1]}(c.keyframes,s);if(void 0!==e)return void $a.update(()=>{c.onUpdate(e),c.onComplete()})}return s.isSync?new Qs(c):new gA(c)};function eu({protectedKeys:e,needsAnimating:t},r){const n=e.hasOwnProperty(r)&&!0!==t[r];return t[r]=!1,n}function tu(e,t,{delay:r=0,transitionOverride:n,type:i}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:o,...s}=t;n&&(a=n);const A=[],l=i&&e.animationState&&e.animationState.getState()[i];for(const c in s){const t=e.getValue(c,e.latestValues[c]??null),n=s[c];if(void 0===n||l&&eu(l,c))continue;const i={delay:r,...xA(a||{},c)},o=t.get();if(void 0!==o&&!t.isAnimating&&!Array.isArray(n)&&n===o&&!i.velocity)continue;let u=!1;if(window.MotionHandoffAnimation){const t=Wc(e);if(t){const e=window.MotionHandoffAnimation(t,c,$a);null!==e&&(i.startTime=e,u=!0)}}$c(e,c),t.start(Zc(c,t,n,e.shouldReduceMotion&&wA.has(c)?{type:!1}:i,e,u));const d=t.animation;d&&A.push(d)}return o&&Promise.all(A).then(()=>{$a.update(()=>{o&&function(e,t){const r=Rc(e,t);let{transitionEnd:n={},transition:i={},...a}=r||{};a={...a,...n};for(const o in a)zc(e,o,Vc(a[o]))}(e,o)})}),A}function ru(e,t,r,n=0,i=1){const a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*n;return"function"==typeof r?r(a,o):1===i?a*n:s-a*n}function nu(e,t,r={}){var n;const i=Rc(e,t,"exit"===r.type?null==(n=e.presenceContext)?void 0:n.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=i||{};r.transitionOverride&&(a=r.transitionOverride);const o=i?()=>Promise.all(tu(e,i,r)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(n=0)=>{const{delayChildren:i=0,staggerChildren:o,staggerDirection:s}=a;return function(e,t,r=0,n=0,i=0,a=1,o){const s=[];for(const A of e.variantChildren)A.notify("AnimationStart",t),s.push(nu(A,t,{...o,delay:r+("function"==typeof n?0:n)+ru(e.variantChildren,A,n,i,a)}).then(()=>A.notify("AnimationComplete",t)));return Promise.all(s)}(e,t,n,i,o,s,r)}:()=>Promise.resolve(),{when:A}=a;if(A){const[e,t]="beforeChildren"===A?[o,s]:[s,o];return e().then(()=>t())}return Promise.all([o(),s(r.delay)])}function iu(e,t){if(!Array.isArray(t))return!1;const r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}const au=El.length;function ou(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&ou(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let r=0;r<au;r++){const n=El[r],i=e.props[n];(Bl(i)||!1===i)&&(t[n]=i)}return t}const su=[...Cl].reverse(),Au=Cl.length;function lu(e){return t=>Promise.all(t.map(({animation:t,options:r})=>function(e,t,r={}){let n;if(e.notify("AnimationStart",t),Array.isArray(t)){const i=t.map(t=>nu(e,t,r));n=Promise.all(i)}else if("string"==typeof t)n=nu(e,t,r);else{const i="function"==typeof t?Rc(e,t,r.custom):t;n=Promise.all(tu(e,i,r))}return n.then(()=>{e.notify("AnimationComplete",t)})}(e,t,r)))}function cu(e){let t=lu(e),r=hu(),n=!0;const i=t=>(r,n)=>{var i;const a=Rc(e,n,"exit"===t?null==(i=e.presenceContext)?void 0:i.custom:void 0);if(a){const{transition:e,transitionEnd:t,...n}=a;r={...r,...n,...t}}return r};function a(a){const{props:o}=e,s=ou(e.parent)||{},A=[],l=new Set;let c={},u=1/0;for(let t=0;t<Au;t++){const d=su[t],h=r[d],p=void 0!==o[d]?o[d]:s[d],f=Bl(p),m=d===a?h.isActive:null;!1===m&&(u=t);let g=p===s[d]&&p!==o[d]&&f;if(g&&n&&e.manuallyAnimateOnMount&&(g=!1),h.protectedKeys={...c},!h.isActive&&null===m||!p&&!h.prevProp||bl(p)||"boolean"==typeof p)continue;const y=uu(h.prevProp,p);let v=y||d===a&&h.isActive&&!g&&f||t>u&&f,x=!1;const w=Array.isArray(p)?p:[p];let b=w.reduce(i(d),{});!1===m&&(b={});const{prevResolvedValues:B={}}=h,C={...B,...b},E=t=>{v=!0,l.has(t)&&(x=!0,l.delete(t)),h.needsAnimating[t]=!0;const r=e.getValue(t);r&&(r.liveStyle=!1)};for(const e in C){const t=b[e],r=B[e];if(c.hasOwnProperty(e))continue;let n=!1;n=Kc(t)&&Kc(r)?!iu(t,r):t!==r,n?null!=t?E(e):l.add(e):void 0!==t&&l.has(e)?E(e):h.protectedKeys[e]=!0}h.prevProp=p,h.prevResolvedValues=b,h.isActive&&(c={...c,...b}),n&&e.blockInitialAnimation&&(v=!1);const k=g&&y;v&&(!k||x)&&A.push(...w.map(t=>{const r={type:d};if("string"==typeof t&&n&&!k&&e.manuallyAnimateOnMount&&e.parent){const{parent:n}=e,i=Rc(n,t);if(n.enteringChildren&&i){const{delayChildren:t}=i.transition||{};r.delay=ru(n.enteringChildren,e,t)}}return{animation:t,options:r}}))}if(l.size){const t={};if("boolean"!=typeof o.initial){const r=Rc(e,Array.isArray(o.initial)?o.initial[0]:o.initial);r&&r.transition&&(t.transition=r.transition)}l.forEach(r=>{const n=e.getBaseTarget(r),i=e.getValue(r);i&&(i.liveStyle=!0),t[r]=n??null}),A.push({animation:t})}let d=Boolean(A.length);return!n||!1!==o.initial&&o.initial!==o.animate||e.manuallyAnimateOnMount||(d=!1),n=!1,d?t(A):Promise.resolve()}return{animateChanges:a,setActive:function(t,n){var i;if(r[t].isActive===n)return Promise.resolve();null==(i=e.variantChildren)||i.forEach(e=>{var r;return null==(r=e.animationState)?void 0:r.setActive(t,n)}),r[t].isActive=n;const o=a(t);for(const e in r)r[e].protectedKeys={};return o},setAnimateFunction:function(r){t=r(e)},getState:()=>r,reset:()=>{r=hu()}}}function uu(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!iu(t,e)}function du(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function hu(){return{animate:du(!0),whileInView:du(),whileHover:du(),whileTap:du(),whileDrag:du(),whileFocus:du(),exit:du()}}class pu{constructor(e){this.isMounted=!1,this.node=e}update(){}}let fu=0;const mu={animation:{Feature:class extends pu{constructor(e){super(e),e.animationState||(e.animationState=cu(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();bl(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null==(e=this.unmountControls)||e.call(this)}}},exit:{Feature:class extends pu{constructor(){super(...arguments),this.id=fu++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const n=this.node.animationState.setActive("exit",!e);t&&!e&&n.then(()=>{t(this.id)})}mount(){const{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function gu(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}function yu(e){return{point:{x:e.pageX,y:e.pageY}}}function vu(e,t,r,n){return gu(e,t,(e=>t=>WA(t)&&e(t,yu(t)))(r),n)}function xu(e){return e.max-e.min}function wu(e,t,r,n=.5){e.origin=n,e.originPoint=Po(t.min,t.max,e.origin),e.scale=xu(r)/xu(t),e.translate=Po(r.min,r.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function bu(e,t,r,n){wu(e.x,t.x,r.x,n?n.originX:void 0),wu(e.y,t.y,r.y,n?n.originY:void 0)}function Bu(e,t,r){e.min=r.min+t.min,e.max=e.min+xu(t)}function Cu(e,t,r){e.min=t.min-r.min,e.max=e.min+xu(t)}function Eu(e,t,r){Cu(e.x,t.x,r.x),Cu(e.y,t.y,r.y)}function ku(e){return[e("x"),e("y")]}const Su=({current:e})=>e?e.ownerDocument.defaultView:null,ju=(e,t)=>Math.abs(e-t);class Fu{constructor(e,t,{transformPagePoint:r,contextWindow:n=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=Uu(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,r=function(e,t){const r=ju(e.x,t.x),n=ju(e.y,t.y);return Math.sqrt(r**2+n**2)}(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!r)return;const{point:n}=e,{timestamp:i}=Ga;this.history.push({...n,timestamp:i});const{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=Qu(t,this.transformPagePoint),$a.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:r,onSessionEnd:n,resumeAnimation:i}=this.handlers;if(this.dragSnapToOrigin&&i&&i(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const a=Uu("pointercancel"===e.type?this.lastMoveEventInfo:Qu(t,this.transformPagePoint),this.history);this.startEvent&&r&&r(e,a),n&&n(e,a)},!WA(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=n||window;const o=Qu(yu(e),this.transformPagePoint),{point:s}=o,{timestamp:A}=Ga;this.history=[{...s,timestamp:A}];const{onSessionStart:l}=t;l&&l(e,Uu(o,this.history)),this.removeListeners=va(vu(this.contextWindow,"pointermove",this.handlePointerMove),vu(this.contextWindow,"pointerup",this.handlePointerUp),vu(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Wa(this.updatePoint)}}function Qu(e,t){return t?{point:t(e.point)}:e}function Nu(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Uu({point:e},t){return{point:e,delta:Nu(e,Iu(t)),offset:Nu(e,Ou(t)),velocity:Tu(t,.1)}}function Ou(e){return e[0]}function Iu(e){return e[e.length-1]}function Tu(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null;const i=Iu(e);for(;r>=0&&(n=e[r],!(i.timestamp-n.timestamp>ba(t)));)r--;if(!n)return{x:0,y:0};const a=Ba(i.timestamp-n.timestamp);if(0===a)return{x:0,y:0};const o={x:(i.x-n.x)/a,y:(i.y-n.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Pu(e,t,r){return{min:void 0!==t?e.min+t:void 0,max:void 0!==r?e.max+r-(e.max-e.min):void 0}}function Mu(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,n]=[n,r]),{min:r,max:n}}const Du=.35;function Lu(e,t,r){return{min:Hu(e,t),max:Hu(e,r)}}function Hu(e,t){return"number"==typeof e?e:e[t]||0}const _u=new WeakMap;class Ru{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:r}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:i}=this.getProps();this.panSession=new Fu(e,{onSessionStart:e=>{const{dragSnapToOrigin:r}=this.getProps();r?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(yu(e).point)},onStart:(e,t)=>{const{drag:r,dragPropagation:n,onDragStart:i}=this.getProps();if(r&&!n&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(a=r)||"y"===a?RA[a]?null:(RA[a]=!0,()=>{RA[a]=!1}):RA.x||RA.y?null:(RA.x=RA.y=!0,()=>{RA.x=RA.y=!1}),!this.openDragLock))return;var a;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ku(e=>{let t=this.getAxisMotionValue(e).get()||0;if(yo.test(t)){const{projection:r}=this.visualElement;if(r&&r.layout){const n=r.layout.layoutBox[e];if(n){t=xu(n)*(parseFloat(t)/100)}}}this.originPoint[e]=t}),i&&$a.postRender(()=>i(e,t)),$c(this.visualElement,"transform");const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;const{dragPropagation:r,dragDirectionLock:n,onDirectionLock:i,onDrag:a}=this.getProps();if(!r&&!this.openDragLock)return;const{offset:o}=t;if(n&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let r=null;Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x");return r}(o),void(null!==this.currentDirection&&i&&i(this.currentDirection));this.updateAxis("x",t.point,o),this.updateAxis("y",t.point,o),this.visualElement.render(),a&&a(e,t)},onSessionEnd:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>ku(e=>{var t;return"paused"===this.getAnimationState(e)&&(null==(t=this.getAxisMotionValue(e).animation)?void 0:t.play())})},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,distanceThreshold:r,contextWindow:Su(this.visualElement)})}stop(e,t){const r=e||this.latestPointerEvent,n=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!n||!r)return;const{velocity:a}=n;this.startAnimation(a);const{onDragEnd:o}=this.getProps();o&&$a.postRender(()=>o(r,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,r){const{drag:n}=this.getProps();if(!r||!Ku(e,n,this.currentDirection))return;const i=this.getAxisMotionValue(e);let a=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(a=function(e,{min:t,max:r},n){return void 0!==t&&e<t?e=n?Po(t,e,n.min):Math.max(e,t):void 0!==r&&e>r&&(e=n?Po(r,e,n.max):Math.min(e,r)),e}(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:r}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null==(e=this.visualElement.projection)?void 0:e.layout,i=this.constraints;t&&ic(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!n)&&function(e,{top:t,left:r,bottom:n,right:i}){return{x:Pu(e.x,r,i),y:Pu(e.y,t,n)}}(n.layoutBox,t),this.elastic=function(e=Du){return!1===e?e=0:!0===e&&(e=Du),{x:Lu(e,"left","right"),y:Lu(e,"top","bottom")}}(r),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&ku(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const r={};return void 0!==t.min&&(r.min=t.min-e.min),void 0!==t.max&&(r.max=t.max-e.min),r}(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!ic(e))return!1;const r=e.current;ua(null!==r,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:n}=this.visualElement;if(!n||!n.layout)return!1;const i=function(e,t,r){const n=Fc(e,r),{scroll:i}=t;return i&&(kc(n.x,i.offset.x),kc(n.y,i.offset.y)),n}(r,n.root,this.visualElement.getTransformPagePoint());let a=function(e,t){return{x:Mu(e.x,t.x),y:Mu(e.y,t.y)}}(n.layout.layoutBox,i);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(a));this.hasMutatedConstraints=!!e,e&&(a=pc(e))}return a}startAnimation(e){const{drag:t,dragMomentum:r,dragElastic:n,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},A=ku(o=>{if(!Ku(o,t,this.currentDirection))return;let A=s&&s[o]||{};a&&(A={min:0,max:0});const l=n?200:1e6,c=n?40:1e7,u={type:"inertia",velocity:r?e[o]:0,bounceStiffness:l,bounceDamping:c,timeConstant:750,restDelta:1,restSpeed:10,...i,...A};return this.startAxisValueAnimation(o,u)});return Promise.all(A).then(o)}startAxisValueAnimation(e,t){const r=this.getAxisMotionValue(e);return $c(this.visualElement,e),r.start(Zc(e,r,0,t,this.visualElement,!1))}stopAnimation(){ku(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){ku(e=>{var t;return null==(t=this.getAxisMotionValue(e).animation)?void 0:t.pause()})}getAnimationState(e){var t;return null==(t=this.getAxisMotionValue(e).animation)?void 0:t.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps(),n=r[t];return n||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){ku(t=>{const{drag:r}=this.getProps();if(!Ku(t,r,this.currentDirection))return;const{projection:n}=this.visualElement,i=this.getAxisMotionValue(t);if(n&&n.layout){const{min:r,max:a}=n.layout.layoutBox[t];i.set(e[t]-Po(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:r}=this.visualElement;if(!ic(t)||!r||!this.constraints)return;this.stopAnimation();const n={x:0,y:0};ku(e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const r=t.get();n[e]=function(e,t){let r=.5;const n=xu(e),i=xu(t);return i>n?r=xa(t.min,t.max-n,e.min):n>i&&(r=xa(e.min,e.max-i,t.min)),Aa(0,1,r)}({min:r,max:r},this.constraints[e])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),ku(t=>{if(!Ku(t,e,null))return;const r=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];r.set(Po(i,a,n[t]))})}addListeners(){if(!this.visualElement.current)return;_u.set(this.visualElement,this);const e=vu(this.visualElement.current,"pointerdown",e=>{const{drag:t,dragListener:r=!0}=this.getProps();t&&r&&this.start(e)}),t=()=>{const{dragConstraints:e}=this.getProps();ic(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,n=r.addEventListener("measure",t);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),$a.read(t);const i=gu(window,"resize",()=>this.scalePositionWithinConstraints()),a=r.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(ku(t=>{const r=this.getAxisMotionValue(t);r&&(this.originPoint[t]+=e[t].translate,r.set(r.get()+e[t].translate))}),this.visualElement.render())});return()=>{i(),e(),n(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:r=!1,dragPropagation:n=!1,dragConstraints:i=!1,dragElastic:a=Du,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:r,dragPropagation:n,dragConstraints:i,dragElastic:a,dragMomentum:o}}}function Ku(e,t,r){return!(!0!==t&&t!==e||null!==r&&r!==e)}const zu=e=>(t,r)=>{e&&$a.postRender(()=>e(t,r))};const Vu={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function $u(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Wu={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!vo.test(e))return e;e=parseFloat(e)}return`${$u(e,t.target.x)}% ${$u(e,t.target.y)}%`}},Gu={correct:(e,{treeScale:t,projectionDelta:r})=>{const n=e,i=Oo.parse(e);if(i.length>5)return n;const a=Oo.createTransformer(e),o="number"!=typeof i[0]?1:0,s=r.x.scale*t.x,A=r.y.scale*t.y;i[0+o]/=s,i[1+o]/=A;const l=Po(s,A,.5);return"number"==typeof i[2+o]&&(i[2+o]/=l),"number"==typeof i[3+o]&&(i[3+o]/=l),a(i)}};let qu=!1;class Yu extends Te.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:r,layoutId:n}=this.props,{projection:i}=e;!function(e){for(const t in e)Ql[t]=e[t],eo(t)&&(Ql[t].isCSSVariable=!0)}(Ju),i&&(t.group&&t.group.add(i),r&&r.register&&n&&r.register(i),qu&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Vu.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:r,drag:n,isPresent:i}=this.props,{projection:a}=r;return a?(a.isPresent=i,qu=!0,n||e.layoutDependency!==t||void 0===t||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||$a.postRender(()=>{const e=a.getStack();e&&e.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),_A.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:r}=this.props,{projection:n}=e;qu=!0,n&&(n.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(n),r&&r.deregister&&r.deregister(n))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Xu(e){const[t,r]=cl(),n=Te.useContext(ta);return Ie.jsx(Yu,{...e,layoutGroup:n,switchLayoutGroup:Te.useContext(Ac),isPresent:t,safeToRemove:r})}const Ju={borderRadius:{...Wu,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Wu,borderTopRightRadius:Wu,borderBottomLeftRadius:Wu,borderBottomRightRadius:Wu,boxShadow:Gu};const Zu=(e,t)=>e.depth-t.depth;class ed{constructor(){this.children=[],this.isDirty=!1}add(e){oa(this.children,e),this.isDirty=!0}remove(e){sa(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Zu),this.isDirty=!1,this.children.forEach(e)}}const td=["TopLeft","TopRight","BottomLeft","BottomRight"],rd=td.length,nd=e=>"string"==typeof e?parseFloat(e):e,id=e=>"number"==typeof e||vo.test(e);function ad(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const od=Ad(0,.5,Pa),sd=Ad(.5,.95,ga);function Ad(e,t,r){return n=>n<e?0:n>t?1:r(xa(e,t,n))}function ld(e,t){e.min=t.min,e.max=t.max}function cd(e,t){ld(e.x,t.x),ld(e.y,t.y)}function ud(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function dd(e,t,r,n,i){return e=xc(e-=t,1/r,n),void 0!==i&&(e=xc(e,1/i,n)),e}function hd(e,t,[r,n,i],a,o){!function(e,t=0,r=1,n=.5,i,a=e,o=e){yo.test(t)&&(t=parseFloat(t),t=Po(o.min,o.max,t/100)-o.min);if("number"!=typeof t)return;let s=Po(a.min,a.max,n);e===a&&(s-=t),e.min=dd(e.min,t,r,s,i),e.max=dd(e.max,t,r,s,i)}(e,t[r],t[n],t[i],t.scale,a,o)}const pd=["x","scaleX","originX"],fd=["y","scaleY","originY"];function md(e,t,r,n){hd(e.x,t,pd,r?r.x:void 0,n?n.x:void 0),hd(e.y,t,fd,r?r.y:void 0,n?n.y:void 0)}function gd(e){return 0===e.translate&&1===e.scale}function yd(e){return gd(e.x)&&gd(e.y)}function vd(e,t){return e.min===t.min&&e.max===t.max}function xd(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function wd(e,t){return xd(e.x,t.x)&&xd(e.y,t.y)}function bd(e){return xu(e.x)/xu(e.y)}function Bd(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Cd{constructor(){this.members=[]}add(e){oa(this.members,e),e.scheduleRender()}remove(e){if(sa(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex(t=>e===t);if(0===t)return!1;let r;for(let n=t;n>=0;n--){const e=this.members[n];if(!1!==e.isPresent){r=e;break}}return!!r&&(this.promote(r),!0)}promote(e,t){const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,t&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:n}=e.options;!1===n&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:t,resumingFrom:r}=e;t.onExitComplete&&t.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Ed=["","X","Y","Z"];let kd=0;function Sd(e,t,r,n){const{latestValues:i}=t;i[e]&&(r[e]=i[e],t.setStaticValue(e,0),n&&(n[e]=0))}function jd(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const r=Wc(t);if(window.MotionHasOptimisedAnimation(r,"transform")){const{layout:t,layoutId:n}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",$a,!(t||n))}const{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&jd(n)}function Fd({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(e={},r=(null==t?void 0:t())){this.id=kd++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Ud),this.nodes.forEach(Ld),this.nodes.forEach(Hd),this.nodes.forEach(Od)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=r?r.root||r:this,this.path=r?[...r.path,r]:[],this.parent=r,this.depth=r?r.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new ed)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new wa),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const r=this.eventHandlers.get(e);r&&r.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;var r;this.isSVG=el(t)&&!(el(r=t)&&"svg"===r.tagName),this.instance=t;const{layoutId:n,layout:i,visualElement:a}=this.options;if(a&&!a.current&&a.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(i||n)&&(this.isLayoutDirty=!0),e){let r,n=0;const i=()=>this.root.updateBlockedByResize=!1;$a.read(()=>{n=window.innerWidth}),e(t,()=>{const e=window.innerWidth;e!==n&&(n=e,this.root.updateBlockedByResize=!0,r&&r(),r=function(e,t){const r=Ja.now(),n=({timestamp:i})=>{const a=i-r;a>=t&&(Wa(n),e(a-t))};return $a.setup(n,!0),()=>Wa(n)}(i,250),Vu.hasAnimatedSinceResize&&(Vu.hasAnimatedSinceResize=!1,this.nodes.forEach(Dd)))})}n&&this.root.registerSharedNode(n,this),!1!==this.options.animate&&a&&(n||i)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:r,layout:n})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const i=this.options.transition||a.getDefaultTransition()||$d,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=a.getProps(),A=!this.targetLayout||!wd(this.targetLayout,n),l=!t&&r;if(this.options.layoutRoot||this.resumeFrom||l||t&&(A||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const t={...xA(i,"layout"),onPlay:o,onComplete:s};(a.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l)}else t||Dd(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=n})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Wa(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(_d),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&jd(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let i=0;i<this.path.length;i++){const e=this.path[i];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:t,layout:r}=this.options;if(void 0===t&&!r)return;const n=this.getTransformTemplate();this.prevTransformTemplateValue=n?n(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Td);if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(Pd);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Md),this.nodes.forEach(Qd),this.nodes.forEach(Nd)):this.nodes.forEach(Pd),this.clearAllSnapshots();const e=Ja.now();Ga.delta=Aa(0,1e3/60,e-Ga.timestamp),Ga.timestamp=e,Ga.isProcessing=!0,qa.update.process(Ga),qa.preRender.process(Ga),qa.render.process(Ga),Ga.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,_A.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Id),this.sharedNodes.forEach(Rd)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,$a.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){$a.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||xu(this.snapshot.measuredBox.x)||xu(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let r=0;r<this.path.length;r++){this.path[r].updateScroll()}const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){const t=n(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!yd(this.projectionDelta),r=this.getTransformTemplate(),n=r?r(this.latestValues,""):void 0,a=n!==this.prevTransformTemplateValue;e&&this.instance&&(t||gc(this.latestValues)||a)&&(i(this.instance,n),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let r=this.removeElementScroll(t);var n;return e&&(r=this.removeTransform(r)),qd((n=r).x),qd(n.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:r,latestValues:{},source:this.id}}measurePageBox(){var e;const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const r=t.measureViewportBox();if(!((null==(e=this.scroll)?void 0:e.wasRoot)||this.path.some(Xd))){const{scroll:e}=this.root;e&&(kc(r.x,e.offset.x),kc(r.y,e.offset.y))}return r}removeElementScroll(e){var t;const r={x:{min:0,max:0},y:{min:0,max:0}};if(cd(r,e),null==(t=this.scroll)?void 0:t.wasRoot)return r;for(let n=0;n<this.path.length;n++){const t=this.path[n],{scroll:i,options:a}=t;t!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&cd(r,e),kc(r.x,i.offset.x),kc(r.y,i.offset.y))}return r}applyTransform(e,t=!1){const r={x:{min:0,max:0},y:{min:0,max:0}};cd(r,e);for(let n=0;n<this.path.length;n++){const e=this.path[n];!t&&e.options.layoutScroll&&e.scroll&&e!==e.root&&jc(r,{x:-e.scroll.offset.x,y:-e.scroll.offset.y}),gc(e.latestValues)&&jc(r,e.latestValues)}return gc(this.latestValues)&&jc(r,this.latestValues),r}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};cd(t,e);for(let r=0;r<this.path.length;r++){const e=this.path[r];if(!e.instance)continue;if(!gc(e.latestValues))continue;mc(e.latestValues)&&e.updateSnapshot();const n=Qc();cd(n,e.measurePageBox()),md(t,e.latestValues,e.snapshot?e.snapshot.layoutBox:void 0,n)}return gc(this.latestValues)&&md(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ga.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;const r=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=r.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=r.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=r.isSharedProjectionDirty);const n=Boolean(this.resumingFrom)||this!==r;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||(null==(t=this.parent)?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:i,layoutId:a}=this.options;if(this.layout&&(i||a)){if(this.resolvedRelativeTargetAt=Ga.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Eu(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),cd(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}var o,s,A;if(this.relativeTarget||this.targetDelta)if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),o=this.target,s=this.relativeTarget,A=this.relativeParent.target,Bu(o.x,s.x,A.x),Bu(o.y,s.y,A.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):cd(this.target,this.layout.layoutBox),Bc(this.target,this.targetDelta)):cd(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Eu(this.relativeTargetOrigin,this.target,e.target),cd(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(this.parent&&!mc(this.parent.latestValues)&&!yc(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;const t=this.getLead(),r=Boolean(this.resumingFrom)||this!==t;let n=!0;if((this.isProjectionDirty||(null==(e=this.parent)?void 0:e.isProjectionDirty))&&(n=!1),r&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===Ga.timestamp&&(n=!1),n)return;const{layout:i,layoutId:a}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!a)return;cd(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,s=this.treeScale.y;!function(e,t,r,n=!1){const i=r.length;if(!i)return;let a,o;t.x=t.y=1;for(let s=0;s<i;s++){a=r[s],o=a.projectionDelta;const{visualElement:i}=a.options;i&&i.props.style&&"contents"===i.props.style.display||(n&&a.options.layoutScroll&&a.scroll&&a!==a.root&&jc(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Bc(e,o)),n&&gc(a.latestValues)&&jc(e,a.latestValues))}t.x<Ec&&t.x>Cc&&(t.x=1),t.y<Ec&&t.y>Cc&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,r),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:A}=t;A?(this.projectionDelta&&this.prevProjectionDelta?(ud(this.prevProjectionDelta.x,this.projectionDelta.x),ud(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),bu(this.projectionDelta,this.layoutCorrected,A,this.latestValues),this.treeScale.x===o&&this.treeScale.y===s&&Bd(this.projectionDelta.x,this.prevProjectionDelta.x)&&Bd(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",A))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null==(t=this.options.visualElement)||t.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,t=!1){const r=this.snapshot,n=r?r.latestValues:{},i={...this.latestValues},a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const o={x:{min:0,max:0},y:{min:0,max:0}},s=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),A=this.getStack(),l=!A||A.members.length<=1,c=Boolean(s&&!l&&!0===this.options.crossfade&&!this.path.some(Vd));let u;this.animationProgress=0,this.mixTargetDelta=t=>{const r=t/1e3;var A,d,h,p,f,m;Kd(a.x,e.x,r),Kd(a.y,e.y,r),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Eu(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),h=this.relativeTarget,p=this.relativeTargetOrigin,f=o,m=r,zd(h.x,p.x,f.x,m),zd(h.y,p.y,f.y,m),u&&(A=this.relativeTarget,d=u,vd(A.x,d.x)&&vd(A.y,d.y))&&(this.isProjectionDirty=!1),u||(u={x:{min:0,max:0},y:{min:0,max:0}}),cd(u,this.relativeTarget)),s&&(this.animationValues=i,function(e,t,r,n,i,a){i?(e.opacity=Po(0,r.opacity??1,od(n)),e.opacityExit=Po(t.opacity??1,0,sd(n))):a&&(e.opacity=Po(t.opacity??1,r.opacity??1,n));for(let o=0;o<rd;o++){const i=`border${td[o]}Radius`;let a=ad(t,i),s=ad(r,i);void 0===a&&void 0===s||(a||(a=0),s||(s=0),0===a||0===s||id(a)===id(s)?(e[i]=Math.max(Po(nd(a),nd(s),n),0),(yo.test(s)||yo.test(a))&&(e[i]+="%")):e[i]=s)}(t.rotate||r.rotate)&&(e.rotate=Po(t.rotate||0,r.rotate||0,n))}(i,n,this.latestValues,r,c,l)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=r},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){var t,r,n;this.notifyListeners("animationStart"),null==(t=this.currentAnimation)||t.stop(),null==(n=null==(r=this.resumingFrom)?void 0:r.currentAnimation)||n.stop(),this.pendingAnimation&&(Wa(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=$a.update(()=>{Vu.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=HA(0)),this.currentAnimation=function(e,t,r){const n=tl(e)?e:HA(e);return n.start(Zc("",n,t,r)),n.animation}(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:r,layout:n,latestValues:i}=e;if(t&&r&&n){if(this!==e&&this.layout&&n&&Yd(this.options.animationType,this.layout.layoutBox,n.layoutBox)){r=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=xu(this.layout.layoutBox.x);r.x.min=e.target.x.min,r.x.max=r.x.min+t;const n=xu(this.layout.layoutBox.y);r.y.min=e.target.y.min,r.y.max=r.y.min+n}cd(t,r),jc(t,i),bu(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Cd);this.sharedNodes.get(e).add(t);const r=t.options.initialPromotionConfig;t.promote({transition:r?r.transition:void 0,preserveFollowOpacity:r&&r.shouldPreserveFollowOpacity?r.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null==(e=this.getStack())?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null==(e=this.getStack())?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:r}={}){const n=this.getStack();n&&n.promote(this,r),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:r}=e;if((r.z||r.rotate||r.rotateX||r.rotateY||r.rotateZ||r.skewX||r.skewY)&&(t=!0),!t)return;const n={};r.z&&Sd("z",e,n,this.animationValues);for(let i=0;i<Ed.length;i++)Sd(`rotate${Ed[i]}`,e,n,this.animationValues),Sd(`skew${Ed[i]}`,e,n,this.animationValues);e.render();for(const i in n)e.setStaticValue(i,n[i]),this.animationValues&&(this.animationValues[i]=n[i]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(e.visibility="hidden");const r=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,e.visibility="",e.opacity="",e.pointerEvents=Yl(null==t?void 0:t.pointerEvents)||"",void(e.transform=r?r(this.latestValues,""):"none");const n=this.getLead();if(!this.projectionDelta||!this.layout||!n.target)return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=Yl(null==t?void 0:t.pointerEvents)||""),void(this.hasProjected&&!gc(this.latestValues)&&(e.transform=r?r({},""):"none",this.hasProjected=!1));e.visibility="";const i=n.animationValues||n.latestValues;this.applyTransformsToTarget();let a=function(e,t,r){let n="";const i=e.x.translate/t.x,a=e.y.translate/t.y,o=(null==r?void 0:r.z)||0;if((i||a||o)&&(n=`translate3d(${i}px, ${a}px, ${o}px) `),1===t.x&&1===t.y||(n+=`scale(${1/t.x}, ${1/t.y}) `),r){const{transformPerspective:e,rotate:t,rotateX:i,rotateY:a,skewX:o,skewY:s}=r;e&&(n=`perspective(${e}px) ${n}`),t&&(n+=`rotate(${t}deg) `),i&&(n+=`rotateX(${i}deg) `),a&&(n+=`rotateY(${a}deg) `),o&&(n+=`skewX(${o}deg) `),s&&(n+=`skewY(${s}deg) `)}const s=e.x.scale*t.x,A=e.y.scale*t.y;return 1===s&&1===A||(n+=`scale(${s}, ${A})`),n||"none"}(this.projectionDeltaWithTransform,this.treeScale,i);r&&(a=r(i,a)),e.transform=a;const{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${100*o.origin}% ${100*s.origin}% 0`,n.animationValues?e.opacity=n===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=n===this?void 0!==i.opacity?i.opacity:"":void 0!==i.opacityExit?i.opacityExit:0;for(const A in Ql){if(void 0===i[A])continue;const{correct:t,applyTo:r,isCSSVariable:o}=Ql[A],s="none"===a?i[A]:t(i[A],n);if(r){const t=r.length;for(let n=0;n<t;n++)e[r[n]]=s}else o?this.options.visualElement.renderState.vars[A]=s:e[A]=s}this.options.layoutId&&(e.pointerEvents=n===this?Yl(null==t?void 0:t.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>{var t;return null==(t=e.currentAnimation)?void 0:t.stop()}),this.root.nodes.forEach(Td),this.root.sharedNodes.clear()}}}function Qd(e){e.updateLayout()}function Nd(e){var t;const r=(null==(t=e.resumeFrom)?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&r&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:n}=e.layout,{animationType:i}=e.options,a=r.source!==e.layout.source;"size"===i?ku(e=>{const n=a?r.measuredBox[e]:r.layoutBox[e],i=xu(n);n.min=t[e].min,n.max=n.min+i}):Yd(i,r.layoutBox,t)&&ku(n=>{const i=a?r.measuredBox[n]:r.layoutBox[n],o=xu(t[n]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[n].max=e.relativeTarget[n].min+o)});const o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};bu(o,t,r.layoutBox);const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};a?bu(s,e.applyTransform(n,!0),r.measuredBox):bu(s,t,r.layoutBox);const A=!yd(o);let l=!1;if(!e.resumeFrom){const n=e.getClosestProjectingParent();if(n&&!n.resumeFrom){const{snapshot:i,layout:a}=n;if(i&&a){const o={x:{min:0,max:0},y:{min:0,max:0}};Eu(o,r.layoutBox,i.layoutBox);const s={x:{min:0,max:0},y:{min:0,max:0}};Eu(s,t,a.layoutBox),wd(o,s)||(l=!0),n.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=o,e.relativeParent=n)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:r,delta:s,layoutDelta:o,hasLayoutChanged:A,hasRelativeLayoutChanged:l})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Ud(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Od(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Id(e){e.clearSnapshot()}function Td(e){e.clearMeasurements()}function Pd(e){e.isLayoutDirty=!1}function Md(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Dd(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Ld(e){e.resolveTargetDelta()}function Hd(e){e.calcProjection()}function _d(e){e.resetSkewAndRotation()}function Rd(e){e.removeLeadSnapshot()}function Kd(e,t,r){e.translate=Po(t.translate,0,r),e.scale=Po(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function zd(e,t,r,n){e.min=Po(t.min,r.min,n),e.max=Po(t.max,r.max,n)}function Vd(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const $d={duration:.45,ease:[.4,0,.1,1]},Wd=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Gd=Wd("applewebkit/")&&!Wd("chrome/")?Math.round:ga;function qd(e){e.min=Gd(e.min),e.max=Gd(e.max)}function Yd(e,t,r){return"position"===e||"preserve-aspect"===e&&(n=bd(t),i=bd(r),a=.2,!(Math.abs(n-i)<=a));var n,i,a}function Xd(e){var t;return e!==e.root&&(null==(t=e.scroll)?void 0:t.wasRoot)}const Jd=Fd({attachResizeListener:(e,t)=>gu(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Zd={current:void 0},eh=Fd({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Zd.current){const e=new Jd({});e.mount(window),e.setOptions({layoutScroll:!0}),Zd.current=e}return Zd.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),th={pan:{Feature:class extends pu{constructor(){super(...arguments),this.removePointerDownListener=ga}onPointerDown(e){this.session=new Fu(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Su(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:r,onPanEnd:n}=this.node.getProps();return{onSessionStart:zu(e),onStart:zu(t),onMove:r,onEnd:(e,t)=>{delete this.session,n&&$a.postRender(()=>n(e,t))}}}mount(){this.removePointerDownListener=vu(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends pu{constructor(e){super(e),this.removeGroupControls=ga,this.removeListeners=ga,this.controls=new Ru(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ga}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:eh,MeasureLayout:Xu}};function rh(e,t,r){const{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover","Start"===r);const i=n["onHover"+r];i&&$a.postRender(()=>i(t,yu(t)))}function nh(e,t,r){const{props:n}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap","Start"===r);const i=n["onTap"+("End"===r?"":r)];i&&$a.postRender(()=>i(t,yu(t)))}const ih=new WeakMap,ah=new WeakMap,oh=e=>{const t=ih.get(e.target);t&&t(e)},sh=e=>{e.forEach(oh)};function Ah(e,t,r){const n=function({root:e,...t}){const r=e||document;ah.has(r)||ah.set(r,{});const n=ah.get(r),i=JSON.stringify(t);return n[i]||(n[i]=new IntersectionObserver(sh,{root:e,...t})),n[i]}(t);return ih.set(e,r),n.observe(e),()=>{ih.delete(e),n.unobserve(e)}}const lh={some:0,all:1};const ch=hc({...mu,...{inView:{Feature:class extends pu{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:r,amount:n="some",once:i}=e,a={root:t?t.current:void 0,rootMargin:r,threshold:"number"==typeof n?n:lh[n]};return Ah(this.node.current,a,e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,i&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:r,onViewportLeave:n}=this.node.getProps(),a=t?r:n;a&&a(e)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends pu{mount(){const{current:e}=this.node;e&&(this.unmount=ZA(e,(e,t)=>(nh(this.node,t,"Start"),(e,{success:t})=>nh(this.node,e,t?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends pu{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(eX){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=va(gu(this.node.current,"focus",()=>this.onFocus()),gu(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends pu{mount(){const{current:e}=this.node;e&&(this.unmount=function(e,t,r={}){const[n,i,a]=zA(e,r),o=e=>{if(!VA(e))return;const{target:r}=e,n=t(r,e);if("function"!=typeof n||!r)return;const a=e=>{VA(e)&&(n(e),r.removeEventListener("pointerleave",a))};r.addEventListener("pointerleave",a,i)};return n.forEach(e=>{e.addEventListener("pointerenter",o,i)}),a}(e,(e,t)=>(rh(this.node,t,"Start"),e=>rh(this.node,e,"End"))))}unmount(){}}}},...th,...{layout:{ProjectionNode:eh,MeasureLayout:Xu}}},_c);function uh(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function dh(e){const t=ph(e),r=De.forwardRef((e,r)=>{const{children:n,...i}=e,a=De.Children.toArray(n),o=a.find(mh);if(o){const e=o.props.children,n=a.map(t=>t===o?De.Children.count(e)>1?De.Children.only(null):De.isValidElement(e)?e.props.children:null:t);return Ie.jsx(t,{...i,ref:r,children:De.isValidElement(e)?De.cloneElement(e,void 0,n):null})}return Ie.jsx(t,{...i,ref:r,children:n})});return r.displayName=`${e}.Slot`,r}var hh=dh("Slot");function ph(e){const t=De.forwardRef((e,t)=>{const{children:r,...n}=e;if(De.isValidElement(r)){const e=function(e){var t,r;let n=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,i=n&&"isReactWarning"in n&&n.isReactWarning;if(i)return e.ref;if(n=null==(r=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:r.get,i=n&&"isReactWarning"in n&&n.isReactWarning,i)return e.props.ref;return e.props.ref||e.ref}(r),i=function(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...e)=>{const t=a(...e);return i(...e),t}:i&&(r[n]=i):"style"===n?r[n]={...i,...a}:"className"===n&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props);return r.type!==De.Fragment&&(i.ref=t?function(...e){return t=>{let r=!1;const n=e.map(e=>{const n=uh(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){const r=n[t];"function"==typeof r?r():uh(e[t],null)}}}}(t,e):e),De.cloneElement(r,i)}return De.Children.count(r)>1?De.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var fh=Symbol("radix.slottable");function mh(e){return De.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===fh}function gh(e){var t,r,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=gh(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function yh(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=gh(e))&&(n&&(n+=" "),n+=t);return n}const vh=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,xh=yh,wh=e=>{const t=Eh(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:e=>{const r=e.split("-");return""===r[0]&&1!==r.length&&r.shift(),bh(r,t)||Ch(e)},getConflictingClassGroupIds:(e,t)=>{const i=r[e]||[];return t&&n[e]?[...i,...n[e]]:i}}},bh=(e,t)=>{var r;if(0===e.length)return t.classGroupId;const n=e[0],i=t.nextPart.get(n),a=i?bh(e.slice(1),i):void 0;if(a)return a;if(0===t.validators.length)return;const o=e.join("-");return null==(r=t.validators.find(({validator:e})=>e(o)))?void 0:r.classGroupId},Bh=/^\[(.+)\]$/,Ch=e=>{if(Bh.test(e)){const t=Bh.exec(e)[1],r=null==t?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Eh=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const i in r)kh(r[i],n,i,t);return n},kh=(e,t,r,n)=>{e.forEach(e=>{if("string"==typeof e){return void((""===e?t:Sh(t,e)).classGroupId=r)}if("function"==typeof e)return jh(e)?void kh(e(n),t,r,n):void t.validators.push({validator:e,classGroupId:r});Object.entries(e).forEach(([e,i])=>{kh(i,Sh(t,e),r,n)})})},Sh=(e,t)=>{let r=e;return t.split("-").forEach(e=>{r.nextPart.has(e)||r.nextPart.set(e,{nextPart:new Map,validators:[]}),r=r.nextPart.get(e)}),r},jh=e=>e.isThemeGetter,Fh=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const i=(i,a)=>{r.set(i,a),t++,t>e&&(t=0,n=r,r=new Map)};return{get(e){let t=r.get(e);return void 0!==t?t:void 0!==(t=n.get(e))?(i(e,t),t):void 0},set(e,t){r.has(e)?r.set(e,t):i(e,t)}}},Qh=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=e=>{const t=[];let r,n=0,i=0,a=0;for(let A=0;A<e.length;A++){let o=e[A];if(0===n&&0===i){if(":"===o){t.push(e.slice(a,A)),a=A+1;continue}if("/"===o){r=A;continue}}"["===o?n++:"]"===o?n--:"("===o?i++:")"===o&&i--}const o=0===t.length?e:e.substring(a),s=Nh(o);return{modifiers:t,hasImportantModifier:s!==o,baseClassName:s,maybePostfixModifierPosition:r&&r>a?r-a:void 0}};if(t){const e=t+":",r=n;n=t=>t.startsWith(e)?r(t.substring(e.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:t,maybePostfixModifierPosition:void 0}}if(r){const e=n;n=t=>r({className:t,parseClassName:e})}return n},Nh=e=>e.endsWith("!")?e.substring(0,e.length-1):e.startsWith("!")?e.substring(1):e,Uh=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(e=>[e,!0]));return e=>{if(e.length<=1)return e;const r=[];let n=[];return e.forEach(e=>{"["===e[0]||t[e]?(r.push(...n.sort(),e),n=[]):n.push(e)}),r.push(...n.sort()),r}},Oh=/\s+/;function Ih(){let e,t,r=0,n="";for(;r<arguments.length;)(e=arguments[r++])&&(t=Th(e))&&(n&&(n+=" "),n+=t);return n}const Th=e=>{if("string"==typeof e)return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Th(e[n]))&&(r&&(r+=" "),r+=t);return r};function Ph(e,...t){let r,n,i,a=function(s){const A=t.reduce((e,t)=>t(e),e());return r=(e=>({cache:Fh(e.cacheSize),parseClassName:Qh(e),sortModifiers:Uh(e),...wh(e)}))(A),n=r.cache.get,i=r.cache.set,a=o,o(s)};function o(e){const t=n(e);if(t)return t;const a=((e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(Oh);let A="";for(let l=s.length-1;l>=0;l-=1){const e=s[l],{isExternal:t,modifiers:c,hasImportantModifier:u,baseClassName:d,maybePostfixModifierPosition:h}=r(e);if(t){A=e+(A.length>0?" "+A:A);continue}let p=!!h,f=n(p?d.substring(0,h):d);if(!f){if(!p){A=e+(A.length>0?" "+A:A);continue}if(f=n(d),!f){A=e+(A.length>0?" "+A:A);continue}p=!1}const m=a(c).join(":"),g=u?m+"!":m,y=g+f;if(o.includes(y))continue;o.push(y);const v=i(f,p);for(let r=0;r<v.length;++r){const e=v[r];o.push(g+e)}A=e+(A.length>0?" "+A:A)}return A})(e,r);return i(e,a),a}return function(){return a(Ih.apply(null,arguments))}}const Mh=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},Dh=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Lh=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Hh=/^\d+\/\d+$/,_h=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Rh=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Kh=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,zh=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Vh=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$h=e=>Hh.test(e),Wh=e=>!!e&&!Number.isNaN(Number(e)),Gh=e=>!!e&&Number.isInteger(Number(e)),qh=e=>e.endsWith("%")&&Wh(e.slice(0,-1)),Yh=e=>_h.test(e),Xh=()=>!0,Jh=e=>Rh.test(e)&&!Kh.test(e),Zh=()=>!1,ep=e=>zh.test(e),tp=e=>Vh.test(e),rp=e=>!ip(e)&&!cp(e),np=e=>gp(e,wp,Zh),ip=e=>Dh.test(e),ap=e=>gp(e,bp,Jh),op=e=>gp(e,Bp,Wh),sp=e=>gp(e,vp,Zh),Ap=e=>gp(e,xp,tp),lp=e=>gp(e,Ep,ep),cp=e=>Lh.test(e),up=e=>yp(e,bp),dp=e=>yp(e,Cp),hp=e=>yp(e,vp),pp=e=>yp(e,wp),fp=e=>yp(e,xp),mp=e=>yp(e,Ep,!0),gp=(e,t,r)=>{const n=Dh.exec(e);return!!n&&(n[1]?t(n[1]):r(n[2]))},yp=(e,t,r=!1)=>{const n=Lh.exec(e);return!!n&&(n[1]?t(n[1]):r)},vp=e=>"position"===e||"percentage"===e,xp=e=>"image"===e||"url"===e,wp=e=>"length"===e||"size"===e||"bg-size"===e,bp=e=>"length"===e,Bp=e=>"number"===e,Cp=e=>"family-name"===e,Ep=e=>"shadow"===e,kp=Ph(()=>{const e=Mh("color"),t=Mh("font"),r=Mh("text"),n=Mh("font-weight"),i=Mh("tracking"),a=Mh("leading"),o=Mh("breakpoint"),s=Mh("container"),A=Mh("spacing"),l=Mh("radius"),c=Mh("shadow"),u=Mh("inset-shadow"),d=Mh("text-shadow"),h=Mh("drop-shadow"),p=Mh("blur"),f=Mh("perspective"),m=Mh("aspect"),g=Mh("ease"),y=Mh("animate"),v=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",cp,ip],x=()=>[cp,ip,A],w=()=>[$h,"full","auto",...x()],b=()=>[Gh,"none","subgrid",cp,ip],B=()=>["auto",{span:["full",Gh,cp,ip]},Gh,cp,ip],C=()=>[Gh,"auto",cp,ip],E=()=>["auto","min","max","fr",cp,ip],k=()=>["auto",...x()],S=()=>[$h,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...x()],j=()=>[e,cp,ip],F=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",hp,sp,{position:[cp,ip]}],Q=()=>["auto","cover","contain",pp,np,{size:[cp,ip]}],N=()=>[qh,up,ap],U=()=>["","none","full",l,cp,ip],O=()=>["",Wh,up,ap],I=()=>[Wh,qh,hp,sp],T=()=>["","none",p,cp,ip],P=()=>["none",Wh,cp,ip],M=()=>["none",Wh,cp,ip],D=()=>[Wh,cp,ip],L=()=>[$h,"full",...x()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Yh],breakpoint:[Yh],color:[Xh],container:[Yh],"drop-shadow":[Yh],ease:["in","out","in-out"],font:[rp],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Yh],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Yh],shadow:[Yh],spacing:["px",Wh],text:[Yh],"text-shadow":[Yh],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",$h,ip,cp,m]}],container:["container"],columns:[{columns:[Wh,ip,cp,s]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:v()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:w()}],"inset-x":[{"inset-x":w()}],"inset-y":[{"inset-y":w()}],start:[{start:w()}],end:[{end:w()}],top:[{top:w()}],right:[{right:w()}],bottom:[{bottom:w()}],left:[{left:w()}],visibility:["visible","invisible","collapse"],z:[{z:[Gh,"auto",cp,ip]}],basis:[{basis:[$h,"full","auto",s,...x()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Wh,$h,"auto","initial","none",ip]}],grow:[{grow:["",Wh,cp,ip]}],shrink:[{shrink:["",Wh,cp,ip]}],order:[{order:[Gh,"first","last","none",cp,ip]}],"grid-cols":[{"grid-cols":b()}],"col-start-end":[{col:B()}],"col-start":[{"col-start":C()}],"col-end":[{"col-end":C()}],"grid-rows":[{"grid-rows":b()}],"row-start-end":[{row:B()}],"row-start":[{"row-start":C()}],"row-end":[{"row-end":C()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":E()}],"auto-rows":[{"auto-rows":E()}],gap:[{gap:x()}],"gap-x":[{"gap-x":x()}],"gap-y":[{"gap-y":x()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],p:[{p:x()}],px:[{px:x()}],py:[{py:x()}],ps:[{ps:x()}],pe:[{pe:x()}],pt:[{pt:x()}],pr:[{pr:x()}],pb:[{pb:x()}],pl:[{pl:x()}],m:[{m:k()}],mx:[{mx:k()}],my:[{my:k()}],ms:[{ms:k()}],me:[{me:k()}],mt:[{mt:k()}],mr:[{mr:k()}],mb:[{mb:k()}],ml:[{ml:k()}],"space-x":[{"space-x":x()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":x()}],"space-y-reverse":["space-y-reverse"],size:[{size:S()}],w:[{w:[s,"screen",...S()]}],"min-w":[{"min-w":[s,"screen","none",...S()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[o]},...S()]}],h:[{h:["screen","lh",...S()]}],"min-h":[{"min-h":["screen","lh","none",...S()]}],"max-h":[{"max-h":["screen","lh",...S()]}],"font-size":[{text:["base",r,up,ap]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,cp,op]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",qh,ip]}],"font-family":[{font:[dp,ip,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,cp,ip]}],"line-clamp":[{"line-clamp":[Wh,"none",cp,op]}],leading:[{leading:[a,...x()]}],"list-image":[{"list-image":["none",cp,ip]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",cp,ip]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:j()}],"text-color":[{text:j()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[Wh,"from-font","auto",cp,ap]}],"text-decoration-color":[{decoration:j()}],"underline-offset":[{"underline-offset":[Wh,"auto",cp,ip]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:x()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",cp,ip]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",cp,ip]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:Q()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Gh,cp,ip],radial:["",cp,ip],conic:[Gh,cp,ip]},fp,Ap]}],"bg-color":[{bg:j()}],"gradient-from-pos":[{from:N()}],"gradient-via-pos":[{via:N()}],"gradient-to-pos":[{to:N()}],"gradient-from":[{from:j()}],"gradient-via":[{via:j()}],"gradient-to":[{to:j()}],rounded:[{rounded:U()}],"rounded-s":[{"rounded-s":U()}],"rounded-e":[{"rounded-e":U()}],"rounded-t":[{"rounded-t":U()}],"rounded-r":[{"rounded-r":U()}],"rounded-b":[{"rounded-b":U()}],"rounded-l":[{"rounded-l":U()}],"rounded-ss":[{"rounded-ss":U()}],"rounded-se":[{"rounded-se":U()}],"rounded-ee":[{"rounded-ee":U()}],"rounded-es":[{"rounded-es":U()}],"rounded-tl":[{"rounded-tl":U()}],"rounded-tr":[{"rounded-tr":U()}],"rounded-br":[{"rounded-br":U()}],"rounded-bl":[{"rounded-bl":U()}],"border-w":[{border:O()}],"border-w-x":[{"border-x":O()}],"border-w-y":[{"border-y":O()}],"border-w-s":[{"border-s":O()}],"border-w-e":[{"border-e":O()}],"border-w-t":[{"border-t":O()}],"border-w-r":[{"border-r":O()}],"border-w-b":[{"border-b":O()}],"border-w-l":[{"border-l":O()}],"divide-x":[{"divide-x":O()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":O()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:j()}],"border-color-x":[{"border-x":j()}],"border-color-y":[{"border-y":j()}],"border-color-s":[{"border-s":j()}],"border-color-e":[{"border-e":j()}],"border-color-t":[{"border-t":j()}],"border-color-r":[{"border-r":j()}],"border-color-b":[{"border-b":j()}],"border-color-l":[{"border-l":j()}],"divide-color":[{divide:j()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[Wh,cp,ip]}],"outline-w":[{outline:["",Wh,up,ap]}],"outline-color":[{outline:j()}],shadow:[{shadow:["","none",c,mp,lp]}],"shadow-color":[{shadow:j()}],"inset-shadow":[{"inset-shadow":["none",u,mp,lp]}],"inset-shadow-color":[{"inset-shadow":j()}],"ring-w":[{ring:O()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:j()}],"ring-offset-w":[{"ring-offset":[Wh,ap]}],"ring-offset-color":[{"ring-offset":j()}],"inset-ring-w":[{"inset-ring":O()}],"inset-ring-color":[{"inset-ring":j()}],"text-shadow":[{"text-shadow":["none",d,mp,lp]}],"text-shadow-color":[{"text-shadow":j()}],opacity:[{opacity:[Wh,cp,ip]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Wh]}],"mask-image-linear-from-pos":[{"mask-linear-from":I()}],"mask-image-linear-to-pos":[{"mask-linear-to":I()}],"mask-image-linear-from-color":[{"mask-linear-from":j()}],"mask-image-linear-to-color":[{"mask-linear-to":j()}],"mask-image-t-from-pos":[{"mask-t-from":I()}],"mask-image-t-to-pos":[{"mask-t-to":I()}],"mask-image-t-from-color":[{"mask-t-from":j()}],"mask-image-t-to-color":[{"mask-t-to":j()}],"mask-image-r-from-pos":[{"mask-r-from":I()}],"mask-image-r-to-pos":[{"mask-r-to":I()}],"mask-image-r-from-color":[{"mask-r-from":j()}],"mask-image-r-to-color":[{"mask-r-to":j()}],"mask-image-b-from-pos":[{"mask-b-from":I()}],"mask-image-b-to-pos":[{"mask-b-to":I()}],"mask-image-b-from-color":[{"mask-b-from":j()}],"mask-image-b-to-color":[{"mask-b-to":j()}],"mask-image-l-from-pos":[{"mask-l-from":I()}],"mask-image-l-to-pos":[{"mask-l-to":I()}],"mask-image-l-from-color":[{"mask-l-from":j()}],"mask-image-l-to-color":[{"mask-l-to":j()}],"mask-image-x-from-pos":[{"mask-x-from":I()}],"mask-image-x-to-pos":[{"mask-x-to":I()}],"mask-image-x-from-color":[{"mask-x-from":j()}],"mask-image-x-to-color":[{"mask-x-to":j()}],"mask-image-y-from-pos":[{"mask-y-from":I()}],"mask-image-y-to-pos":[{"mask-y-to":I()}],"mask-image-y-from-color":[{"mask-y-from":j()}],"mask-image-y-to-color":[{"mask-y-to":j()}],"mask-image-radial":[{"mask-radial":[cp,ip]}],"mask-image-radial-from-pos":[{"mask-radial-from":I()}],"mask-image-radial-to-pos":[{"mask-radial-to":I()}],"mask-image-radial-from-color":[{"mask-radial-from":j()}],"mask-image-radial-to-color":[{"mask-radial-to":j()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[Wh]}],"mask-image-conic-from-pos":[{"mask-conic-from":I()}],"mask-image-conic-to-pos":[{"mask-conic-to":I()}],"mask-image-conic-from-color":[{"mask-conic-from":j()}],"mask-image-conic-to-color":[{"mask-conic-to":j()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:F()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:Q()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",cp,ip]}],filter:[{filter:["","none",cp,ip]}],blur:[{blur:T()}],brightness:[{brightness:[Wh,cp,ip]}],contrast:[{contrast:[Wh,cp,ip]}],"drop-shadow":[{"drop-shadow":["","none",h,mp,lp]}],"drop-shadow-color":[{"drop-shadow":j()}],grayscale:[{grayscale:["",Wh,cp,ip]}],"hue-rotate":[{"hue-rotate":[Wh,cp,ip]}],invert:[{invert:["",Wh,cp,ip]}],saturate:[{saturate:[Wh,cp,ip]}],sepia:[{sepia:["",Wh,cp,ip]}],"backdrop-filter":[{"backdrop-filter":["","none",cp,ip]}],"backdrop-blur":[{"backdrop-blur":T()}],"backdrop-brightness":[{"backdrop-brightness":[Wh,cp,ip]}],"backdrop-contrast":[{"backdrop-contrast":[Wh,cp,ip]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Wh,cp,ip]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Wh,cp,ip]}],"backdrop-invert":[{"backdrop-invert":["",Wh,cp,ip]}],"backdrop-opacity":[{"backdrop-opacity":[Wh,cp,ip]}],"backdrop-saturate":[{"backdrop-saturate":[Wh,cp,ip]}],"backdrop-sepia":[{"backdrop-sepia":["",Wh,cp,ip]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":x()}],"border-spacing-x":[{"border-spacing-x":x()}],"border-spacing-y":[{"border-spacing-y":x()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",cp,ip]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Wh,"initial",cp,ip]}],ease:[{ease:["linear","initial",g,cp,ip]}],delay:[{delay:[Wh,cp,ip]}],animate:[{animate:["none",y,cp,ip]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[f,cp,ip]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:P()}],"rotate-x":[{"rotate-x":P()}],"rotate-y":[{"rotate-y":P()}],"rotate-z":[{"rotate-z":P()}],scale:[{scale:M()}],"scale-x":[{"scale-x":M()}],"scale-y":[{"scale-y":M()}],"scale-z":[{"scale-z":M()}],"scale-3d":["scale-3d"],skew:[{skew:D()}],"skew-x":[{"skew-x":D()}],"skew-y":[{"skew-y":D()}],transform:[{transform:[cp,ip,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:L()}],"translate-x":[{"translate-x":L()}],"translate-y":[{"translate-y":L()}],"translate-z":[{"translate-z":L()}],"translate-none":["translate-none"],accent:[{accent:j()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:j()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",cp,ip]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-ms":[{"scroll-ms":x()}],"scroll-me":[{"scroll-me":x()}],"scroll-mt":[{"scroll-mt":x()}],"scroll-mr":[{"scroll-mr":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-ps":[{"scroll-ps":x()}],"scroll-pe":[{"scroll-pe":x()}],"scroll-pt":[{"scroll-pt":x()}],"scroll-pr":[{"scroll-pr":x()}],"scroll-pb":[{"scroll-pb":x()}],"scroll-pl":[{"scroll-pl":x()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",cp,ip]}],fill:[{fill:["none",...j()]}],"stroke-w":[{stroke:[Wh,up,ap,op]}],stroke:[{stroke:["none",...j()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function Sp(...e){return kp(yh(e))}const jp=(Fp="inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",Qp={variants:{variant:{default:"text-white shadow",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90 active:bg-destructive/95",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground active:bg-accent/80",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80 active:bg-secondary/90",ghost:"hover:bg-accent hover:text-accent-foreground active:bg-accent/80",link:"text-primary underline-offset-4 hover:underline active:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}},e=>{var t;if(null==(null==Qp?void 0:Qp.variants))return xh(Fp,null==e?void 0:e.class,null==e?void 0:e.className);const{variants:r,defaultVariants:n}=Qp,i=Object.keys(r).map(t=>{const i=null==e?void 0:e[t],a=null==n?void 0:n[t];if(null===i)return null;const o=vh(i)||vh(a);return r[t][o]}),a=e&&Object.entries(e).reduce((e,t)=>{let[r,n]=t;return void 0===n||(e[r]=n),e},{}),o=null==Qp||null===(t=Qp.compoundVariants)||void 0===t?void 0:t.reduce((e,t)=>{let{class:r,className:i,...o}=t;return Object.entries(o).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...n,...a}[t]):{...n,...a}[t]===r})?[...e,r,i]:e},[]);return xh(Fp,i,o,null==e?void 0:e.class,null==e?void 0:e.className)});var Fp,Qp;const Np=De.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,textColor:i,style:a,disabled:o,...s},A)=>{const{theme:l}=ea(),c=n?hh:"button",u=(e,t)=>`rgba(${parseInt(e.slice(1,3),16)}, ${parseInt(e.slice(3,5),16)}, ${parseInt(e.slice(5,7),16)}, ${t})`,d=(()=>{if("default"!==t||!(null==l?void 0:l.primaryColor))return{};const e=l.primaryColor;return{backgroundColor:o?u(e,.5):e,"--hover-bg":u(e,.9),"--active-bg":u(e,.95)}})();return Ie.jsx(c,{className:Sp(jp({variant:t,size:r,className:e}),"default"===t&&(null==l?void 0:l.primaryColor)&&"hover:[background-color:var(--hover-bg)] active:[background-color:var(--active-bg)]"),style:{...d,...i&&{color:i},...a},disabled:o,ref:A,...s})});Np.displayName="Button";const Up=e=>{let t;const r=new Set,n=(e,n)=>{const i="function"==typeof e?e(t):e;if(!Object.is(i,t)){const e=t;t=(null!=n?n:"object"!=typeof i||null===i)?i:Object.assign({},t,i),r.forEach(r=>r(t,e))}},i=()=>t,a={setState:n,getState:i,getInitialState:()=>o,subscribe:e=>(r.add(e),()=>r.delete(e))},o=t=e(n,i,a);return a},Op=e=>e;const Ip=e=>{const t=(e=>e?Up(e):Up)(e),r=e=>function(e,t=Op){const r=Te.useSyncExternalStore(e.subscribe,Te.useCallback(()=>t(e.getState()),[e,t]),Te.useCallback(()=>t(e.getInitialState()),[e,t]));return Te.useDebugValue(r),r}(t,e);return Object.assign(r,t),r},Tp=e=>e?Ip(e):Ip,Pp=e=>(t,r,n)=>{const i=n.subscribe;n.subscribe=(e,t,r)=>{let a=e;if(t){const i=(null==r?void 0:r.equalityFn)||Object.is;let o=e(n.getState());a=r=>{const n=e(r);if(!i(o,n)){const e=o;t(o=n,e)}},(null==r?void 0:r.fireImmediately)&&t(o,o)}return i(a)};return e(t,r,n)};function Mp(e){return{id:e.id,tenantId:e.tenant_id,createdBy:e.created_by,shipperEmail:e.shipper_email,shipperName:e.shipper_name,shipperCompanyName:e.shipper_company_name,shipperPhone:e.shipper_phone,shipperCountryCode:e.shipper_country_code,shipperAddress:e.shipper_address,shipperCity:e.shipper_city,shipperState:e.shipper_state,shipperZipCode:e.shipper_zip_code,shipperLatitude:e.shipper_latitude,shipperLongitude:e.shipper_longitude,origin:e.origin,destination:e.destination,pickupTimestamp:e.pickup_timestamp,deliveryTimestamp:e.delivery_timestamp,loadType:e.load_type,modeOfService:e.mode_of_service,equipmentType:e.equipment_type,grossWeight:e.gross_weight,numberOfPallets:e.number_of_pallets,emailMessageId:e.email_message_id,emailConversationId:e.email_conversation_id,emailSubject:e.email_subject,senderEmail:e.sender_email,senderName:e.sender_name,receiverEmail:e.receiver_email,receivedDatetime:e.received_datetime,status:e.status,actionNeeded:e.action_needed,requiredFields:e.required_fields??!1,prospectCreation:e.prospect_creation??!1,isDuplicate:e.is_duplicate,duplicateOf:e.duplicate_of,notes:e.notes,createdAt:e.created_at,updatedAt:e.updated_at,externalIdentifier:e.external_identifier,equipmentSize:e.equipment_size,shipperTargetPrice:e.shipper_target_price,extLeadStatus:e.ext_lead_status}}class Dp{static async getLeads(e={}){var t,r,n;try{const t={};e.page&&(t.page=e.page),e.size&&(t.size=e.size),e.search&&(t.search=e.search),e.status&&(t.status=e.status),e.date_filter&&(t.date_filter=e.date_filter);const r=(await Vi.get("/crm/public/leads/me",{params:t})).data;return{success:r.success,leads:r.leads.map(Mp),count:r.count,page:r.page,size:r.size}}catch(i){if(console.error("EmailLeadsService.getLeads error:",i),401===(null==(t=i.response)?void 0:t.status))throw new Error("Unauthorized. Please login again.");if(null==(n=null==(r=i.response)?void 0:r.data)?void 0:n.detail)throw new Error(i.response.data.detail);throw new Error("Failed to fetch email leads. Please try again.")}}static async getLeadById(e){var t;try{return Mp((await Vi.get(`/crm/public/leads/${e}`)).data.lead)}catch(r){if(console.error("EmailLeadsService.getLeadById error:",r),404===(null==(t=r.response)?void 0:t.status))throw new Error("Lead not found.");throw new Error("Failed to fetch lead details.")}}static async submitLeadAction(e,t){var r,n,i,a,o,s;try{const r={lead_id:e};t.equipmentType&&(r.equipment_type=t.equipmentType),void 0!==t.equipmentSize&&t.equipmentSize>0&&(r.equipment_size=t.equipmentSize),t.loadType&&(r.load_type=t.loadType),void 0!==t.shipperTargetPrice&&t.shipperTargetPrice>0&&(r.shipper_target_price=t.shipperTargetPrice),t.pickupTimestamp&&(r.pickup_timestamp=t.pickupTimestamp),t.deliveryTimestamp&&(r.delivery_timestamp=t.deliveryTimestamp),t.shipperCompanyName&&(r.shipper_company_name=t.shipperCompanyName),t.shipperName&&(r.shipper_name=t.shipperName),t.shipperEmail&&(r.shipper_email=t.shipperEmail),t.shipperPhone&&(r.shipper_phone=t.shipperPhone),t.shipperAddress&&(r.shipper_address=t.shipperAddress),t.shipperCity&&(r.shipper_city=t.shipperCity),t.shipperState&&(r.shipper_state=t.shipperState),t.shipperZipCode&&(r.shipper_zip_code=t.shipperZipCode),void 0!==t.shipperLatitude&&(r.shipper_latitude=t.shipperLatitude),void 0!==t.shipperLongitude&&(r.shipper_longitude=t.shipperLongitude);const n=await Vi.post("/crm/leads/lead/action/",r);return{success:n.data.success,lead:Mp(n.data.lead)}}catch(A){if(console.error("EmailLeadsService.submitLeadAction error:",A),401===(null==(r=A.response)?void 0:r.status))throw new Error("Unauthorized. Please login again.");if(400===(null==(n=A.response)?void 0:n.status)){const e=null==(i=A.response.data)?void 0:i.detail;if("string"==typeof e)throw new Error(e);throw new Error("Missing required fields. Please fill all required fields.")}if(404===(null==(a=A.response)?void 0:a.status))throw new Error("Lead not found.");if(null==(s=null==(o=A.response)?void 0:o.data)?void 0:s.detail)throw new Error(A.response.data.detail);throw new Error("Failed to submit lead action. Please try again.")}}static async getEquipmentTypes(){var e,t,r;try{const e=await Vi.get("/crm/emails/public/client_db/equipment_types");if(e.data.success)return e.data.data;throw new Error("Failed to fetch equipment types")}catch(n){if(console.error("EmailLeadsService.getEquipmentTypes error:",n),401===(null==(e=n.response)?void 0:e.status))throw new Error("Unauthorized. Please login again.");if(null==(r=null==(t=n.response)?void 0:t.data)?void 0:r.detail)throw new Error(n.response.data.detail);throw new Error("Failed to fetch equipment types. Please try again.")}}}function Lp(e){return{id:e.id,tenantId:e.tenant_id,createdBy:e.created_by,messageId:e.message_id,conversationId:e.conversation_id,conversationIndex:e.conversation_index,senderEmail:e.sender_email,receiverEmail:e.receiver_email,subject:e.subject,receivedDatetime:e.received_datetime,bodyHtml:e.body_html,bodyText:e.body_text,category:e.category,classificationConfidence:e.classification_confidence,status:e.status,userId:e.user_id,metadata:e.metadata,referencedLeadId:e.referenced_lead_id,processedAt:e.processed_at,createdAt:e.created_at,updatedAt:e.updated_at}}class Hp{static async getLeadEmails(e){var t,r,n,i;try{const t=(await Vi.get(`/crm/public/leads/emails/${e}`)).data;return{success:t.success,emails:t.emails.map(Lp),count:t.count}}catch(a){if(console.error("EmailConversationService.getLeadEmails error:",a),401===(null==(t=a.response)?void 0:t.status))throw new Error("Unauthorized. Please login again.");if(404===(null==(r=a.response)?void 0:r.status))throw new Error("Lead emails not found.");if(null==(i=null==(n=a.response)?void 0:n.data)?void 0:i.detail)throw new Error(a.response.data.detail);throw new Error("Failed to fetch lead emails. Please try again.")}}static async sendEmailReply(e,t,r,n){var i,a,o;try{const i={to:e.map(e=>({email:e})),conversation_id:t,subject:r,body_html:n},a=(await Vi.post("/crm/agents/email/send",i)).data;return{success:a.success,reply:a.reply,email:Lp(a.email)}}catch(s){if(console.error("EmailConversationService.sendEmailReply error:",s),401===(null==(i=s.response)?void 0:i.status))throw new Error("Unauthorized. Please login again.");if(null==(o=null==(a=s.response)?void 0:a.data)?void 0:o.detail)throw new Error(s.response.data.detail);throw new Error("Failed to send email. Please try again.")}}}const _p={leads:[],totalCount:0,currentPage:1,pageSize:10,isLoading:!1,isPolling:!1,error:null,searchQuery:"",statusFilter:"",dateFilter:"all",newLeadsCount:0,hasNewLeads:!1,lastFetchedLeadIds:new Set,showNewLeadsAlert:!1,pollingIntervalId:null,isPollingEnabled:!1},Rp=Tp()(Pp((e,t)=>({..._p,fetchLeads:async r=>{const n=t();e({isLoading:!0,error:null});try{const t={page:(null==r?void 0:r.page)??n.currentPage,size:(null==r?void 0:r.size)??n.pageSize,search:(null==r?void 0:r.search)??(n.searchQuery||void 0),status:(null==r?void 0:r.status)??(n.statusFilter||void 0),date_filter:(null==r?void 0:r.date_filter)??("all"!==n.dateFilter?n.dateFilter:void 0)},i=await Dp.getLeads(t),a=new Set(i.leads.map(e=>e.id));e({leads:i.leads,totalCount:i.count,currentPage:i.page,isLoading:!1,lastFetchedLeadIds:a})}catch(i){e({isLoading:!1,error:i.message||"Failed to fetch leads"})}},setPage:r=>{e({currentPage:r}),t().fetchLeads({page:r})},setPageSize:r=>{e({pageSize:r,currentPage:1}),t().fetchLeads({size:r,page:1})},setSearchQuery:t=>{e({searchQuery:t,currentPage:1})},setStatusFilter:r=>{e({statusFilter:r,currentPage:1}),t().fetchLeads({status:r,page:1})},setDateFilter:r=>{e({dateFilter:r,currentPage:1}),t().fetchLeads({date_filter:"all"!==r?r:void 0,page:1})},startPolling:()=>{if(t().pollingIntervalId)return;console.log("[EmailLeadsStore] Starting polling...");const r=setInterval(()=>{t().pollForNewLeads()},6e4);e({pollingIntervalId:r,isPollingEnabled:!0})},stopPolling:()=>{const r=t();r.pollingIntervalId&&(console.log("[EmailLeadsStore] Stopping polling..."),clearInterval(r.pollingIntervalId),e({pollingIntervalId:null,isPollingEnabled:!1}))},pollForNewLeads:async()=>{const r=t();if(r.isPolling||r.isLoading)return;const n=r.lastFetchedLeadIds.size>0;e({isPolling:!0});try{console.log("[EmailLeadsStore] Polling for new leads...");const t=await Dp.getLeads({page:1,size:r.pageSize,search:r.searchQuery||void 0,status:r.statusFilter||void 0,date_filter:"all"!==r.dateFilter?r.dateFilter:void 0}),i=t.leads.map(e=>e.id),a=r.lastFetchedLeadIds,o=i.filter(e=>!a.has(e));o.length>0&&n?(console.log(`[EmailLeadsStore] Found ${o.length} new leads!`),e({newLeadsCount:o.length,hasNewLeads:!0,showNewLeadsAlert:!0,leads:t.leads,totalCount:t.count,lastFetchedLeadIds:new Set(i),isPolling:!1})):e({lastFetchedLeadIds:new Set(i),isPolling:!1})}catch(i){console.error("[EmailLeadsStore] Polling error:",i),e({isPolling:!1})}},clearNewLeadsNotification:()=>{e({newLeadsCount:0,hasNewLeads:!1,showNewLeadsAlert:!1})},acknowledgeNewLeads:()=>{e({showNewLeadsAlert:!1})},reset:()=>{const r=t();r.pollingIntervalId&&clearInterval(r.pollingIntervalId),e({..._p,lastFetchedLeadIds:new Set})}})));function Kp({position:e="bottom-right",margin:t,zIndex:r}){const{openWidget:n,theme:i,isOpen:a,isAuthenticated:o}=ea(),{hasNewLeads:s,newLeadsCount:A,startPolling:l,stopPolling:c,clearNewLeadsNotification:u}=Rp();Te.useEffect(()=>{if(o)return l(),()=>c()},[l,c,o]);return Ie.jsx("div",{className:(()=>{switch(e){case"bottom-right":default:return"fixed bottom-6 right-6 z-50";case"bottom-left":return"fixed bottom-6 left-6 z-50";case"top-right":return"fixed top-6 right-6 z-50";case"top-left":return"fixed top-6 left-6 z-50"}})(),style:{margin:t||void 0,zIndex:r||void 0},children:Ie.jsxs("div",{className:"relative",children:[Ie.jsxs(Np,{onClick:()=>{console.log("WidgetBubble: Button clicked!"),n(),s&&u()},size:"lg",className:"widget-bubble-button h-16 w-16 rounded-full shadow-lg hover:shadow-xl transition-shadow duration-200 bg-pangents-gradient",style:{backgroundColor:i.primaryColor,fontFamily:i.fontFamily},children:[i.bubbleIcon?Ie.jsx("img",{src:i.bubbleIcon,alt:"Chat icon",className:"h-16 w-16 object-contain"}):Ie.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 47 47",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8",children:[Ie.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23.5058 3.63059e-06C12.2974 -0.00618902 2.64601 7.91029 0.455364 18.9069C-1.73528 29.9035 4.14513 40.9165 14.4996 45.2094V23.0524L17.8315 18.762V46.3055C19.6877 46.767 21.5932 47.0002 23.5058 47C24.0838 47.0001 24.6543 46.9725 25.221 46.9307V14.4716L28.553 18.762V46.4539C30.5249 46.0214 32.4323 45.3345 34.2273 44.4105V8.89938L37.5593 13.1898V42.3372C45.6702 36.2805 48.9913 25.7075 45.8012 16.0983C42.6111 6.48908 33.6272 0.00428384 23.5059 0.00510346L23.5058 3.63059e-06Z",fill:"url(#paint0_linear_192_413)"}),Ie.jsx("defs",{children:Ie.jsxs("linearGradient",{id:"paint0_linear_192_413",x1:"-18.3065",y1:"-10.34",x2:"-17.2725",y2:"72.427",gradientUnits:"userSpaceOnUse",children:[Ie.jsx("stop",{stopColor:"white"}),Ie.jsx("stop",{offset:"0.6",stopColor:"white",stopOpacity:"0.968627"}),Ie.jsx("stop",{offset:"1",stopColor:"white",stopOpacity:"0.101961"})]})})]}),Ie.jsx("span",{className:"sr-only",children:"Open chat"})]}),s&&!a&&Ie.jsx(ch.div,{initial:{scale:0},animate:{scale:1},className:"absolute -top-1 -right-1 bg-red-500 text-white text-xs font-bold min-w-[20px] h-5 px-1.5 rounded-full flex items-center justify-center shadow-lg",children:A>99?"99+":A})]})})}
|
|
10
|
+
/**
|
|
11
|
+
* @license lucide-react v0.511.0 - ISC
|
|
12
|
+
*
|
|
13
|
+
* This source code is licensed under the ISC license.
|
|
14
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
15
|
+
*/const zp=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase()))(e);return t.charAt(0).toUpperCase()+t.slice(1)},Vp=(...e)=>e.filter((e,t,r)=>Boolean(e)&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim(),$p=e=>{for(const t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0};
|
|
16
|
+
/**
|
|
17
|
+
* @license lucide-react v0.511.0 - ISC
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the ISC license.
|
|
20
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/
|
|
22
|
+
var Wp={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};
|
|
23
|
+
/**
|
|
24
|
+
* @license lucide-react v0.511.0 - ISC
|
|
25
|
+
*
|
|
26
|
+
* This source code is licensed under the ISC license.
|
|
27
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
28
|
+
*/const Gp=Te.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:a,iconNode:o,...s},A)=>Te.createElement("svg",{ref:A,...Wp,width:t,height:t,stroke:e,strokeWidth:n?24*Number(r)/Number(t):r,className:Vp("lucide",i),...!a&&!$p(s)&&{"aria-hidden":"true"},...s},[...o.map(([e,t])=>Te.createElement(e,t)),...Array.isArray(a)?a:[a]])),qp=(e,t)=>{const r=Te.forwardRef(({className:r,...n},i)=>{return Te.createElement(Gp,{ref:i,iconNode:t,className:Vp(`lucide-${a=zp(e),a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,r),...n});var a});return r.displayName=zp(e),r},Yp=qp("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]),Xp=qp("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]),Jp=qp("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),Zp=qp("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]),ef=qp("bot-message-square",[["path",{d:"M12 6V2H8",key:"1155em"}],["path",{d:"m8 18-4 4V8a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2Z",key:"w2lp3e"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M9 11v2",key:"1ueba0"}],["path",{d:"M15 11v2",key:"i11awn"}],["path",{d:"M20 12h2",key:"1q8mjw"}]]),tf=qp("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]),rf=qp("box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]),nf=qp("brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]),af=qp("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]),of=qp("camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]),sf=qp("chart-column",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]),Af=qp("chart-pie",[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",key:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]]),lf=qp("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),cf=qp("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),uf=qp("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),df=qp("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),hf=qp("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),pf=qp("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]),ff=qp("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]),mf=qp("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]),gf=qp("clipboard-list",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]),yf=qp("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]),vf=qp("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]),xf=qp("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),wf=qp("database-zap",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 15 21.84",key:"14ibmq"}],["path",{d:"M21 5V8",key:"1marbg"}],["path",{d:"M21 12L18 17H22L19 22",key:"zafso"}],["path",{d:"M3 12A9 3 0 0 0 14.59 14.87",key:"1y4wr8"}]]),bf=qp("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]),Bf=qp("dollar-sign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]),Cf=qp("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]),Ef=qp("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),kf=qp("file-text",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]),Sf=qp("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]]),jf=qp("headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]),Ff=qp("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]),Qf=qp("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]),Nf=qp("key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]),Uf=qp("list-checks",[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]),Of=qp("list",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]),If=qp("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),Tf=qp("mail-check",[["path",{d:"M22 13V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h8",key:"12jkf8"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}],["path",{d:"m16 19 2 2 4-4",key:"1b14m6"}]]),Pf=qp("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]),Mf=qp("map-pin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]),Df=qp("maximize-2",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]]),Lf=qp("maximize",[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]]),Hf=qp("message-square",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]),_f=qp("mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]),Rf=qp("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]),Kf=qp("minimize",[["path",{d:"M8 3v3a2 2 0 0 1-2 2H3",key:"hohbtr"}],["path",{d:"M21 8h-3a2 2 0 0 1-2-2V3",key:"5jw1f3"}],["path",{d:"M3 16h3a2 2 0 0 1 2 2v3",key:"198tvr"}],["path",{d:"M16 21v-3a2 2 0 0 1 2-2h3",key:"ph8mxp"}]]),zf=qp("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]),Vf=qp("navigation",[["polygon",{points:"3 11 22 2 13 21 11 13 3 11",key:"1ltx0t"}]]),$f=qp("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]),Wf=qp("phone",[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]),Gf=qp("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),qf=qp("power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]),Yf=qp("presentation",[["path",{d:"M2 3h20",key:"91anmk"}],["path",{d:"M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3",key:"2k9sn8"}],["path",{d:"m7 21 5-5 5 5",key:"bip4we"}]]),Xf=qp("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]),Jf=qp("reply",[["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}],["path",{d:"m9 17-5-5 5-5",key:"nvlc11"}]]),Zf=qp("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]),em=qp("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]),tm=qp("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),rm=qp("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]),nm=qp("share-2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]),im=qp("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),am=qp("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]),om=qp("signal",[["path",{d:"M2 20h.01",key:"4haj6o"}],["path",{d:"M7 20v-4",key:"j294jx"}],["path",{d:"M12 20v-8",key:"i3yub9"}],["path",{d:"M17 20V8",key:"1tkaf5"}],["path",{d:"M22 4v16",key:"sih9yq"}]]),sm=qp("sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]),Am=qp("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]),lm=qp("thumbs-down",[["path",{d:"M17 14V2",key:"8ymqnk"}],["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}]]),cm=qp("thumbs-up",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]]),um=qp("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),dm=qp("trending-down",[["path",{d:"M16 17h6v-6",key:"t6n2it"}],["path",{d:"m22 17-8.5-8.5-5 5L2 7",key:"x473p"}]]),hm=qp("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]]),pm=qp("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),fm=qp("truck",[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]]),mm=qp("user-check",[["path",{d:"m16 11 2 2 4-4",key:"9rsbq5"}],["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]),gm=qp("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),ym=qp("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]),vm=qp("weight",[["circle",{cx:"12",cy:"5",r:"3",key:"rqqgnr"}],["path",{d:"M6.5 8a2 2 0 0 0-1.905 1.46L2.1 18.5A2 2 0 0 0 4 21h16a2 2 0 0 0 1.925-2.54L19.4 9.5A2 2 0 0 0 17.48 8Z",key:"56o5sh"}]]),xm=qp("wifi-off",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]),wm=qp("wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]),bm=qp("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Bm=qp("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),Cm=qp("zoom-in",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),Em=qp("zoom-out",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);
|
|
29
|
+
/**
|
|
30
|
+
* @license lucide-react v0.511.0 - ISC
|
|
31
|
+
*
|
|
32
|
+
* This source code is licensed under the ISC license.
|
|
33
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
34
|
+
*/
|
|
35
|
+
/**
|
|
36
|
+
* react-router v7.9.4
|
|
37
|
+
*
|
|
38
|
+
* Copyright (c) Remix Software Inc.
|
|
39
|
+
*
|
|
40
|
+
* This source code is licensed under the MIT license found in the
|
|
41
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
42
|
+
*
|
|
43
|
+
* @license MIT
|
|
44
|
+
*/
|
|
45
|
+
function km(e={}){let t,{initialEntries:r=["/"],initialIndex:n,v5Compat:i=!1}=e;t=r.map((e,t)=>c(e,"string"==typeof e?null:e.state,0===t?"default":void 0));let a=A(null==n?t.length-1:n),o="POP",s=null;function A(e){return Math.min(Math.max(e,0),t.length-1)}function l(){return t[a]}function c(e,r=null,n){let i=function(e,t,r=null,n){let i={pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?Nm(t):t,state:r,key:t&&t.key||n||Fm()};return i}(t?l().pathname:"/",e,r,n);return jm("/"===i.pathname.charAt(0),`relative pathnames are not supported in memory history: ${JSON.stringify(e)}`),i}function u(e){return"string"==typeof e?e:Qm(e)}return{get index(){return a},get action(){return o},get location(){return l()},createHref:u,createURL:e=>new URL(u(e),"http://localhost"),encodeLocation(e){let t="string"==typeof e?Nm(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,r){o="PUSH";let n=c(e,r);a+=1,t.splice(a,t.length,n),i&&s&&s({action:o,location:n,delta:1})},replace(e,r){o="REPLACE";let n=c(e,r);t[a]=n,i&&s&&s({action:o,location:n,delta:0})},go(e){o="POP";let r=A(a+e),n=t[r];a=r,s&&s({action:o,location:n,delta:e})},listen:e=>(s=e,()=>{s=null})}}function Sm(e,t){if(!1===e||null==e)throw new Error(t)}function jm(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(eX){}}}function Fm(){return Math.random().toString(36).substring(2,10)}function Qm({pathname:e="/",search:t="",hash:r=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),r&&"#"!==r&&(e+="#"===r.charAt(0)?r:"#"+r),e}function Nm(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function Um(e,t,r="/"){return function(e,t,r,n){let i="string"==typeof t?Nm(t):t,a=$m(i.pathname||"/",r);if(null==a)return null;let o=Om(e);!function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let r=e.length===t.length&&e.slice(0,-1).every((e,r)=>e===t[r]);return r?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(o);let s=null;for(let A=0;null==s&&A<o.length;++A){let e=Vm(a);s=Km(o[A],e,n)}return s}(e,t,r,!1)}function Om(e,t=[],r=[],n="",i=!1){let a=(e,a,o=i,s)=>{let A={relativePath:void 0===s?e.path||"":s,caseSensitive:!0===e.caseSensitive,childrenIndex:a,route:e};if(A.relativePath.startsWith("/")){if(!A.relativePath.startsWith(n)&&o)return;Sm(A.relativePath.startsWith(n),`Absolute route path "${A.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),A.relativePath=A.relativePath.slice(n.length)}let l=Ym([n,A.relativePath]),c=r.concat(A);e.children&&e.children.length>0&&(Sm(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),Om(e.children,t,c,l,o)),(null!=e.path||e.index)&&t.push({path:l,score:Rm(l,e.index),routesMeta:c})};return e.forEach((e,t)=>{var r;if(""!==e.path&&(null==(r=e.path)?void 0:r.includes("?")))for(let n of Im(e.path))a(e,t,!0,n);else a(e,t)}),t}function Im(e){let t=e.split("/");if(0===t.length)return[];let[r,...n]=t,i=r.endsWith("?"),a=r.replace(/\?$/,"");if(0===n.length)return i?[a,""]:[a];let o=Im(n.join("/")),s=[];return s.push(...o.map(e=>""===e?a:[a,e].join("/"))),i&&s.push(...o),s.map(t=>e.startsWith("/")&&""===t?"/":t)}var Tm=/^:[\w-]+$/,Pm=3,Mm=2,Dm=1,Lm=10,Hm=-2,_m=e=>"*"===e;function Rm(e,t){let r=e.split("/"),n=r.length;return r.some(_m)&&(n+=Hm),t&&(n+=Mm),r.filter(e=>!_m(e)).reduce((e,t)=>e+(Tm.test(t)?Pm:""===t?Dm:Lm),n)}function Km(e,t,r=!1){let{routesMeta:n}=e,i={},a="/",o=[];for(let s=0;s<n.length;++s){let e=n[s],A=s===n.length-1,l="/"===a?t:t.slice(a.length)||"/",c=zm({path:e.relativePath,caseSensitive:e.caseSensitive,end:A},l),u=e.route;if(!c&&A&&r&&!n[n.length-1].route.index&&(c=zm({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},l)),!c)return null;Object.assign(i,c.params),o.push({params:i,pathname:Ym([a,c.pathname]),pathnameBase:Xm(Ym([a,c.pathnameBase])),route:u}),"/"!==c.pathnameBase&&(a=Ym([a,c.pathnameBase]))}return o}function zm(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=function(e,t=!1,r=!0){jm("*"===e||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,r)=>(n.push({paramName:t,isOptional:null!=r}),r?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");e.endsWith("*")?(n.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))");let a=new RegExp(i,t?void 0:"i");return[a,n]}(e.path,e.caseSensitive,e.end),i=t.match(r);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:n.reduce((e,{paramName:t,isOptional:r},n)=>{if("*"===t){let e=s[n]||"";o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,"$1")}const i=s[n];return e[t]=r&&!i?void 0:(i||"").replace(/%2F/g,"/"),e},{}),pathname:a,pathnameBase:o,pattern:e}}function Vm(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return jm(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function $m(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&"/"!==n?null:e.slice(r)||"/"}function Wm(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Gm(e){let t=function(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}(e);return t.map((e,r)=>r===t.length-1?e.pathname:e.pathnameBase)}function qm(e,t,r,n=!1){let i;"string"==typeof e?i=Nm(e):(i={...e},Sm(!i.pathname||!i.pathname.includes("?"),Wm("?","pathname","search",i)),Sm(!i.pathname||!i.pathname.includes("#"),Wm("#","pathname","hash",i)),Sm(!i.search||!i.search.includes("#"),Wm("#","search","hash",i)));let a,o=""===e||""===i.pathname,s=o?"/":i.pathname;if(null==s)a=r;else{let e=t.length-1;if(!n&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}a=e>=0?t[e]:"/"}let A=function(e,t="/"){let{pathname:r,search:n="",hash:i=""}="string"==typeof e?Nm(e):e,a=r?r.startsWith("/")?r:function(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)}),r.length>1?r.join("/"):"/"}(r,t):t;return{pathname:a,search:Jm(n),hash:Zm(i)}}(i,a),l=s&&"/"!==s&&s.endsWith("/"),c=(o||"."===s)&&r.endsWith("/");return A.pathname.endsWith("/")||!l&&!c||(A.pathname+="/"),A}var Ym=e=>e.join("/").replace(/\/\/+/g,"/"),Xm=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Jm=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Zm=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";var eg=["POST","PUT","PATCH","DELETE"];new Set(eg);var tg=["GET",...eg];new Set(tg);var rg=De.createContext(null);rg.displayName="DataRouter";var ng=De.createContext(null);ng.displayName="DataRouterState",De.createContext(!1);var ig=De.createContext({isTransitioning:!1});ig.displayName="ViewTransition",De.createContext(new Map).displayName="Fetchers",De.createContext(null).displayName="Await";var ag=De.createContext(null);ag.displayName="Navigation";var og=De.createContext(null);og.displayName="Location";var sg=De.createContext({outlet:null,matches:[],isDataRoute:!1});sg.displayName="Route";var Ag=De.createContext(null);function lg(){return null!=De.useContext(og)}function cg(){return Sm(lg(),"useLocation() may be used only in the context of a <Router> component."),De.useContext(og).location}Ag.displayName="RouteError";var ug="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function dg(e){De.useContext(ag).static||De.useLayoutEffect(e)}function hg(){let{isDataRoute:e}=De.useContext(sg);return e?function(){let{router:e}=function(e){let t=De.useContext(rg);return Sm(t,wg(e)),t}("useNavigate"),t=bg("useNavigate"),r=De.useRef(!1);return dg(()=>{r.current=!0}),De.useCallback(async(n,i={})=>{jm(r.current,ug),r.current&&("number"==typeof n?e.navigate(n):await e.navigate(n,{fromRouteId:t,...i}))},[e,t])}():function(){Sm(lg(),"useNavigate() may be used only in the context of a <Router> component.");let e=De.useContext(rg),{basename:t,navigator:r}=De.useContext(ag),{matches:n}=De.useContext(sg),{pathname:i}=cg(),a=JSON.stringify(Gm(n)),o=De.useRef(!1);return dg(()=>{o.current=!0}),De.useCallback((n,s={})=>{if(jm(o.current,ug),!o.current)return;if("number"==typeof n)return void r.go(n);let A=qm(n,JSON.parse(a),i,"path"===s.relative);null==e&&"/"!==t&&(A.pathname="/"===A.pathname?t:Ym([t,A.pathname])),(s.replace?r.replace:r.push)(A,s.state,s)},[t,r,a,i,e])}()}function pg(){let{matches:e}=De.useContext(sg),t=e[e.length-1];return t?t.params:{}}function fg(e,{relative:t}={}){let{matches:r}=De.useContext(sg),{pathname:n}=cg(),i=JSON.stringify(Gm(r));return De.useMemo(()=>qm(e,JSON.parse(i),n,"path"===t),[e,i,n,t])}function mg(e,t,r,n,i){var a;Sm(lg(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=De.useContext(ag),{matches:s}=De.useContext(sg),A=s[s.length-1],l=A?A.params:{},c=A?A.pathname:"/",u=A?A.pathnameBase:"/",d=A&&A.route;{let e=d&&d.path||"";Cg(c,!d||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}let h,p=cg();if(t){let e="string"==typeof t?Nm(t):t;Sm("/"===u||(null==(a=e.pathname)?void 0:a.startsWith(u)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${e.pathname}" was given in the \`location\` prop.`),h=e}else h=p;let f=h.pathname||"/",m=f;if("/"!==u){let e=u.replace(/^\//,"").split("/");m="/"+f.replace(/^\//,"").split("/").slice(e.length).join("/")}let g=Um(e,{pathname:m});jm(d||null!=g,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),jm(null==g||void 0!==g[g.length-1].route.element||void 0!==g[g.length-1].route.Component||void 0!==g[g.length-1].route.lazy,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let y=function(e,t=[],r=null,n=null){if(null==e){if(!r)return null;if(r.errors)e=r.matches;else{if(0!==t.length||r.initialized||!(r.matches.length>0))return null;e=r.matches}}let i=e,a=null==r?void 0:r.errors;if(null!=a){let e=i.findIndex(e=>e.route.id&&void 0!==(null==a?void 0:a[e.route.id]));Sm(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(r)for(let A=0;A<i.length;A++){let e=i[A];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(s=A),e.route.id){let{loaderData:t,errors:n}=r,a=e.route.loader&&!t.hasOwnProperty(e.route.id)&&(!n||void 0===n[e.route.id]);if(e.route.lazy||a){o=!0,i=s>=0?i.slice(0,s+1):[i[0]];break}}}return i.reduceRight((e,A,l)=>{let c,u=!1,d=null,h=null;r&&(c=a&&A.route.id?a[A.route.id]:void 0,d=A.route.errorElement||yg,o&&(s<0&&0===l?(Cg("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),u=!0,h=null):s===l&&(u=!0,h=A.route.hydrateFallbackElement||null)));let p=t.concat(i.slice(0,l+1)),f=()=>{let t;return t=c?d:u?h:A.route.Component?De.createElement(A.route.Component,null):A.route.element?A.route.element:e,De.createElement(xg,{match:A,routeContext:{outlet:e,matches:p,isDataRoute:null!=r},children:t})};return r&&(A.route.ErrorBoundary||A.route.errorElement||0===l)?De.createElement(vg,{location:r.location,revalidation:r.revalidation,component:d,error:c,children:f(),routeContext:{outlet:null,matches:p,isDataRoute:!0},unstable_onError:n}):f()},null)}(g&&g.map(e=>Object.assign({},e,{params:Object.assign({},l,e.params),pathname:Ym([u,o.encodeLocation?o.encodeLocation(e.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?u:Ym([u,o.encodeLocation?o.encodeLocation(e.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])})),s,r,n,i);return t&&y?De.createElement(og.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...h},navigationType:"POP"}},y):y}function gg(){let e=function(){var e;let t=De.useContext(Ag),r=function(e){let t=De.useContext(ng);return Sm(t,wg(e)),t}("useRouteError"),n=bg("useRouteError");if(void 0!==t)return t;return null==(e=r.errors)?void 0:e[n]}(),t=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:n},a={padding:"2px 4px",backgroundColor:n},o=null;return console.error("Error handled by React Router default ErrorBoundary:",e),o=De.createElement(De.Fragment,null,De.createElement("p",null,"💿 Hey developer 👋"),De.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",De.createElement("code",{style:a},"ErrorBoundary")," or"," ",De.createElement("code",{style:a},"errorElement")," prop on your route.")),De.createElement(De.Fragment,null,De.createElement("h2",null,"Unexpected Application Error!"),De.createElement("h3",{style:{fontStyle:"italic"}},t),r?De.createElement("pre",{style:i},r):null,o)}De.createContext(null);var yg=De.createElement(gg,null),vg=class extends De.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.unstable_onError?this.props.unstable_onError(e,t):console.error("React Router caught the following error during render",e)}render(){return void 0!==this.state.error?De.createElement(sg.Provider,{value:this.props.routeContext},De.createElement(Ag.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function xg({routeContext:e,match:t,children:r}){let n=De.useContext(rg);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),De.createElement(sg.Provider,{value:e},r)}function wg(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function bg(e){let t=function(e){let t=De.useContext(sg);return Sm(t,wg(e)),t}(e),r=t.matches[t.matches.length-1];return Sm(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}var Bg={};function Cg(e,t,r){t||Bg[e]||(Bg[e]=!0,jm(!1,r))}function Eg({basename:e,children:t,initialEntries:r,initialIndex:n}){let i=De.useRef();null==i.current&&(i.current=km({initialEntries:r,initialIndex:n,v5Compat:!0}));let a=i.current,[o,s]=De.useState({action:a.action,location:a.location}),A=De.useCallback(e=>{De.startTransition(()=>s(e))},[s]);return De.useLayoutEffect(()=>a.listen(A),[a,A]),De.createElement(jg,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a})}function kg({to:e,replace:t,state:r,relative:n}){Sm(lg(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=De.useContext(ag);jm(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:a}=De.useContext(sg),{pathname:o}=cg(),s=hg(),A=qm(e,Gm(a),o,"path"===n),l=JSON.stringify(A);return De.useEffect(()=>{s(JSON.parse(l),{replace:t,state:r,relative:n})},[s,l,n,t,r]),null}function Sg(e){Sm(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function jg({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:i,static:a=!1}){Sm(!lg(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let o=e.replace(/^\/*/,"/"),s=De.useMemo(()=>({basename:o,navigator:i,static:a,future:{}}),[o,i,a]);"string"==typeof r&&(r=Nm(r));let{pathname:A="/",search:l="",hash:c="",state:u=null,key:d="default"}=r,h=De.useMemo(()=>{let e=$m(A,o);return null==e?null:{location:{pathname:e,search:l,hash:c,state:u,key:d},navigationType:n}},[o,A,l,c,u,d,n]);return jm(null!=h,`<Router basename="${o}"> is not able to match the URL "${A}${l}${c}" because it does not start with the basename, so the <Router> won't render anything.`),null==h?null:De.createElement(ag.Provider,{value:s},De.createElement(og.Provider,{children:t,value:h}))}function Fg({children:e,location:t}){return mg(Qg(e),t)}function Qg(e,t=[]){let r=[];return De.Children.forEach(e,(e,n)=>{if(!De.isValidElement(e))return;let i=[...t,n];if(e.type===De.Fragment)return void r.push.apply(r,Qg(e.props.children,i));Sm(e.type===Sg,`[${"string"==typeof e.type?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Sm(!e.props.index||!e.props.children,"An index route cannot have child routes.");let a={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=Qg(e.props.children,i)),r.push(a)}),r}De.memo(function({routes:e,future:t,state:r,unstable_onError:n}){return mg(e,void 0,r,n,t)});var Ng="get",Ug="application/x-www-form-urlencoded";function Og(e){return null!=e&&"string"==typeof e.tagName}function Ig(e=""){return new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(e=>[r,e]):[[r,n]])},[]))}var Tg=null;var Pg=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Mg(e){return null==e||Pg.has(e)?e:(jm(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ug}"`),null)}function Dg(e,t){let r,n,i,a,o;if(Og(s=e)&&"form"===s.tagName.toLowerCase()){let o=e.getAttribute("action");n=o?$m(o,t):null,r=e.getAttribute("method")||Ng,i=Mg(e.getAttribute("enctype"))||Ug,a=new FormData(e)}else if(function(e){return Og(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return Og(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let o=e.form;if(null==o)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||o.getAttribute("action");if(n=s?$m(s,t):null,r=e.getAttribute("formmethod")||o.getAttribute("method")||Ng,i=Mg(e.getAttribute("formenctype"))||Mg(o.getAttribute("enctype"))||Ug,a=new FormData(o,e),!function(){if(null===Tg)try{new FormData(document.createElement("form"),0),Tg=!1}catch(eX){Tg=!0}return Tg}()){let{name:t,type:r,value:n}=e;if("image"===r){let e=t?`${t}.`:"";a.append(`${e}x`,"0"),a.append(`${e}y`,"0")}else t&&a.append(t,n)}}else{if(Og(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Ng,n=null,i=Ug,o=e}var s;return a&&"text/plain"===i&&(o=a,a=void 0),{action:n,method:r.toLowerCase(),encType:i,formData:a,body:o}}function Lg(e,t){if(!1===e||null==e)throw new Error(t)}function Hg(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}async function _g(e,t,r){return function(e,t){let r=new Set;return new Set(t),e.reduce((e,t)=>{let n=JSON.stringify(function(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}(t));return r.has(n)||(r.add(n),e.push({key:n,link:t})),e},[])}((await Promise.all(e.map(async e=>{let n=t.routes[e.route.id];if(n){let e=await async function(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}(n,r);return e.links?e.links():[]}return[]}))).flat(1).filter(Hg).filter(e=>"stylesheet"===e.rel||"preload"===e.rel).map(e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"}))}function Rg(e,t,r,n,i,a){let o=(e,t)=>!r[t]||e.route.id!==r[t].route.id,s=(e,t)=>{var n;return r[t].pathname!==e.pathname||(null==(n=r[t].route.path)?void 0:n.endsWith("*"))&&r[t].params["*"]!==e.params["*"]};return"assets"===a?t.filter((e,t)=>o(e,t)||s(e,t)):"data"===a?t.filter((t,a)=>{var A;let l=n.routes[t.route.id];if(!l||!l.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:(null==(A=r[0])?void 0:A.params)||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof n)return n}return!0}):[]}function Kg(e,t,{includeHydrateFallback:r}={}){return n=e.map(e=>{let n=t.routes[e.route.id];if(!n)return[];let i=[n.module];return n.clientActionModule&&(i=i.concat(n.clientActionModule)),n.clientLoaderModule&&(i=i.concat(n.clientLoaderModule)),r&&n.hydrateFallbackModule&&(i=i.concat(n.hydrateFallbackModule)),n.imports&&(i=i.concat(n.imports)),i}).flat(1),[...new Set(n)];var n}function zg(){let e=De.useContext(rg);return Lg(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Vg=De.createContext(void 0);function $g(){let e=De.useContext(Vg);return Lg(e,"You must render this element inside a <HydratedRouter> element"),e}function Wg(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Gg({page:e,...t}){let{router:r}=zg(),n=De.useMemo(()=>Um(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?De.createElement(qg,{page:e,matches:n,...t}):null}function qg({page:e,matches:t,...r}){let n=cg(),{manifest:i,routeModules:a}=$g(),{basename:o}=zg(),{loaderData:s,matches:A}=function(){let e=De.useContext(ng);return Lg(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}(),l=De.useMemo(()=>Rg(e,t,A,i,n,"data"),[e,t,A,i,n]),c=De.useMemo(()=>Rg(e,t,A,i,n,"assets"),[e,t,A,i,n]),u=De.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let r=new Set,A=!1;if(t.forEach(e=>{var t;let n=i.routes[e.route.id];n&&n.hasLoader&&(!l.some(t=>t.route.id===e.route.id)&&e.route.id in s&&(null==(t=a[e.route.id])?void 0:t.shouldRevalidate)||n.hasClientLoader?A=!0:r.add(e.route.id))}),0===r.size)return[];let c=function(e,t,r){let n="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return"/"===n.pathname?n.pathname=`_root.${r}`:t&&"/"===$m(n.pathname,t)?n.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:n.pathname=`${n.pathname.replace(/\/$/,"")}.${r}`,n}(e,o,"data");return A&&r.size>0&&c.searchParams.set("_routes",t.filter(e=>r.has(e.route.id)).map(e=>e.route.id).join(",")),[c.pathname+c.search]},[o,s,n,i,l,t,e,a]),d=De.useMemo(()=>Kg(c,i),[c,i]),h=function(e){let{manifest:t,routeModules:r}=$g(),[n,i]=De.useState([]);return De.useEffect(()=>{let n=!1;return _g(e,t,r).then(e=>{n||i(e)}),()=>{n=!0}},[e,t,r]),n}(c);return De.createElement(De.Fragment,null,u.map(e=>De.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...r})),d.map(e=>De.createElement("link",{key:e,rel:"modulepreload",href:e,...r})),h.map(({key:e,link:t})=>De.createElement("link",{key:e,nonce:r.nonce,...t})))}function Yg(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}Vg.displayName="FrameworkContext";var Xg="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{Xg&&(window.__reactRouterVersion="7.9.4")}catch(eX){}var Jg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Zg=De.forwardRef(function({onClick:e,discover:t="render",prefetch:r="none",relative:n,reloadDocument:i,replace:a,state:o,target:s,to:A,preventScrollReset:l,viewTransition:c,...u},d){let h,{basename:p}=De.useContext(ag),f="string"==typeof A&&Jg.test(A),m=!1;if("string"==typeof A&&f&&(h=A,Xg))try{let e=new URL(window.location.href),t=A.startsWith("//")?new URL(e.protocol+A):new URL(A),r=$m(t.pathname,p);t.origin===e.origin&&null!=r?A=r+t.search+t.hash:m=!0}catch(eX){jm(!1,`<Link to="${A}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let g=function(e,{relative:t}={}){Sm(lg(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=De.useContext(ag),{hash:i,pathname:a,search:o}=fg(e,{relative:t}),s=a;return"/"!==r&&(s="/"===a?r:Ym([r,a])),n.createHref({pathname:s,search:o,hash:i})}(A,{relative:n}),[y,v,x]=function(e,t){let r=De.useContext(Vg),[n,i]=De.useState(!1),[a,o]=De.useState(!1),{onFocus:s,onBlur:A,onMouseEnter:l,onMouseLeave:c,onTouchStart:u}=t,d=De.useRef(null);De.useEffect(()=>{if("render"===e&&o(!0),"viewport"===e){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return d.current&&e.observe(d.current),()=>{e.disconnect()}}},[e]),De.useEffect(()=>{if(n){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[n]);let h=()=>{i(!0)},p=()=>{i(!1),o(!1)};return r?"intent"!==e?[a,d,{}]:[a,d,{onFocus:Wg(s,h),onBlur:Wg(A,p),onMouseEnter:Wg(l,h),onMouseLeave:Wg(c,p),onTouchStart:Wg(u,h)}]:[!1,d,{}]}(r,u),w=function(e,{target:t,replace:r,state:n,preventScrollReset:i,relative:a,viewTransition:o}={}){let s=hg(),A=cg(),l=fg(e,{relative:a});return De.useCallback(c=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(c,t)){c.preventDefault();let t=void 0!==r?r:Qm(A)===Qm(l);s(e,{replace:t,state:n,preventScrollReset:i,relative:a,viewTransition:o})}},[A,s,l,r,n,t,e,i,a,o])}(A,{replace:a,state:o,target:s,preventScrollReset:l,relative:n,viewTransition:c});let b=De.createElement("a",{...u,...x,href:h||g,onClick:m||i?e:function(t){e&&e(t),t.defaultPrevented||w(t)},ref:Yg(d,v),target:s,"data-discover":f||"render"!==t?void 0:"true"});return y&&!f?De.createElement(De.Fragment,null,b,De.createElement(Gg,{page:g})):b});Zg.displayName="Link";var ey=De.forwardRef(function({"aria-current":e="page",caseSensitive:t=!1,className:r="",end:n=!1,style:i,to:a,viewTransition:o,children:s,...A},l){let c=fg(a,{relative:A.relative}),u=cg(),d=De.useContext(ng),{navigator:h,basename:p}=De.useContext(ag),f=null!=d&&function(e,{relative:t}={}){let r=De.useContext(ig);Sm(null!=r,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=ty("useViewTransitionState"),i=fg(e,{relative:t});if(!r.isTransitioning)return!1;let a=$m(r.currentLocation.pathname,n)||r.currentLocation.pathname,o=$m(r.nextLocation.pathname,n)||r.nextLocation.pathname;return null!=zm(i.pathname,o)||null!=zm(i.pathname,a)}(c)&&!0===o,m=h.encodeLocation?h.encodeLocation(c).pathname:c.pathname,g=u.pathname,y=d&&d.navigation&&d.navigation.location?d.navigation.location.pathname:null;t||(g=g.toLowerCase(),y=y?y.toLowerCase():null,m=m.toLowerCase()),y&&p&&(y=$m(y,p)||y);const v="/"!==m&&m.endsWith("/")?m.length-1:m.length;let x,w=g===m||!n&&g.startsWith(m)&&"/"===g.charAt(v),b=null!=y&&(y===m||!n&&y.startsWith(m)&&"/"===y.charAt(m.length)),B={isActive:w,isPending:b,isTransitioning:f},C=w?e:void 0;x="function"==typeof r?r(B):[r,w?"active":null,b?"pending":null,f?"transitioning":null].filter(Boolean).join(" ");let E="function"==typeof i?i(B):i;return De.createElement(Zg,{...A,"aria-current":C,className:x,ref:l,style:E,to:a,viewTransition:o},"function"==typeof s?s(B):s)});function ty(e){let t=De.useContext(rg);return Sm(t,function(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}(e)),t}function ry(e){jm("undefined"!=typeof URLSearchParams,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=De.useRef(Ig(e)),r=De.useRef(!1),n=cg(),i=De.useMemo(()=>function(e,t){let r=Ig(e);return t&&t.forEach((e,n)=>{r.has(n)||t.getAll(n).forEach(e=>{r.append(n,e)})}),r}(n.search,r.current?null:t.current),[n.search]),a=hg(),o=De.useCallback((e,t)=>{const n=Ig("function"==typeof e?e(new URLSearchParams(i)):e);r.current=!0,a("?"+n,t)},[a,i]);return[i,o]}ey.displayName="NavLink",De.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:i,state:a,method:o=Ng,action:s,onSubmit:A,relative:l,preventScrollReset:c,viewTransition:u,...d},h)=>{let p=function(){let{router:e}=ty("useSubmit"),{basename:t}=De.useContext(ag),r=bg("useRouteId");return De.useCallback(async(n,i={})=>{let{action:a,method:o,encType:s,formData:A,body:l}=Dg(n,t);if(!1===i.navigate){let t=i.fetcherKey||iy();await e.fetch(t,r,i.action||a,{preventScrollReset:i.preventScrollReset,formData:A,body:l,formMethod:i.method||o,formEncType:i.encType||s,flushSync:i.flushSync})}else await e.navigate(i.action||a,{preventScrollReset:i.preventScrollReset,formData:A,body:l,formMethod:i.method||o,formEncType:i.encType||s,replace:i.replace,state:i.state,fromRouteId:r,flushSync:i.flushSync,viewTransition:i.viewTransition})},[e,t,r])}(),f=function(e,{relative:t}={}){let{basename:r}=De.useContext(ag),n=De.useContext(sg);Sm(n,"useFormAction must be used inside a RouteContext");let[i]=n.matches.slice(-1),a={...fg(e||".",{relative:t})},o=cg();if(null==e){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll("index");if(t.some(e=>""===e)){e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let r=e.toString();a.search=r?`?${r}`:""}}e&&"."!==e||!i.route.index||(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index");"/"!==r&&(a.pathname="/"===a.pathname?r:Ym([r,a.pathname]));return Qm(a)}(s,{relative:l}),m="get"===o.toLowerCase()?"get":"post",g="string"==typeof s&&Jg.test(s);return De.createElement("form",{ref:h,method:m,action:f,onSubmit:n?A:e=>{if(A&&A(e),e.defaultPrevented)return;e.preventDefault();let n=e.nativeEvent.submitter,s=(null==n?void 0:n.getAttribute("formmethod"))||o;p(n||e.currentTarget,{fetcherKey:t,method:s,navigate:r,replace:i,state:a,relative:l,preventScrollReset:c,viewTransition:u})},...d,"data-discover":g||"render"!==e?void 0:"true"})}).displayName="Form";var ny=0,iy=()=>`__${String(++ny)}__`;function ay(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const oy=Array(12).fill(0),sy=({visible:e,className:t})=>Te.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},Te.createElement("div",{className:"sonner-spinner"},oy.map((e,t)=>Te.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${t}`})))),Ay=Te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Te.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),ly=Te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},Te.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),cy=Te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Te.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),uy=Te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Te.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),dy=Te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},Te.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),Te.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}));let hy=1;const py=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;const{message:r,...n}=e,i="number"==typeof(null==e?void 0:e.id)||(null==(t=e.id)?void 0:t.length)>0?e.id:hy++,a=this.toasts.find(e=>e.id===i),o=void 0===e.dismissible||e.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),a?this.toasts=this.toasts.map(t=>t.id===i?(this.publish({...t,...e,id:i,title:r}),{...t,...e,id:i,dismissible:o,title:r}):t):this.addToast({title:r,...n,dismissible:o,id:i}),i},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let r;void 0!==t.loading&&(r=this.create({...t,promise:e,type:"loading",message:t.loading,description:"function"!=typeof t.description?t.description:void 0}));const n=Promise.resolve(e instanceof Function?e():e);let i,a=void 0!==r;const o=n.then(async e=>{i=["resolve",e];if(Te.isValidElement(e))a=!1,this.create({id:r,type:"default",message:e});else if(fy(e)&&!e.ok){a=!1;const n="function"==typeof t.error?await t.error(`HTTP error! status: ${e.status}`):t.error,i="function"==typeof t.description?await t.description(`HTTP error! status: ${e.status}`):t.description,o="object"==typeof n&&!Te.isValidElement(n)?n:{message:n};this.create({id:r,type:"error",description:i,...o})}else if(e instanceof Error){a=!1;const n="function"==typeof t.error?await t.error(e):t.error,i="function"==typeof t.description?await t.description(e):t.description,o="object"==typeof n&&!Te.isValidElement(n)?n:{message:n};this.create({id:r,type:"error",description:i,...o})}else if(void 0!==t.success){a=!1;const n="function"==typeof t.success?await t.success(e):t.success,i="function"==typeof t.description?await t.description(e):t.description,o="object"==typeof n&&!Te.isValidElement(n)?n:{message:n};this.create({id:r,type:"success",description:i,...o})}}).catch(async e=>{if(i=["reject",e],void 0!==t.error){a=!1;const n="function"==typeof t.error?await t.error(e):t.error,i="function"==typeof t.description?await t.description(e):t.description,o="object"==typeof n&&!Te.isValidElement(n)?n:{message:n};this.create({id:r,type:"error",description:i,...o})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),null==t.finally||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>"reject"===i[0]?t(i[1]):e(i[1])).catch(t));return"string"!=typeof r&&"number"!=typeof r?{unwrap:s}:Object.assign(r,{unwrap:s})},this.custom=(e,t)=>{const r=(null==t?void 0:t.id)||hy++;return this.create({jsx:e(r),id:r,...t}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},fy=e=>e&&"object"==typeof e&&"ok"in e&&"boolean"==typeof e.ok&&"status"in e&&"number"==typeof e.status,my=(e,t)=>{const r=(null==t?void 0:t.id)||hy++;return py.addToast({title:e,...t,id:r}),r},gy=Object.assign(my,{success:py.success,info:py.info,warning:py.warning,error:py.error,custom:py.custom,message:py.message,promise:py.promise,dismiss:py.dismiss,loading:py.loading},{getHistory:()=>py.toasts,getToasts:()=>py.getActiveToasts()});function yy(e){return void 0!==e.label}!function(e){if("undefined"==typeof document)return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");const vy=3,xy=14;function wy(...e){return e.filter(Boolean).join(" ")}const by=e=>{var t,r,n,i,a,o,s,A,l;const{invert:c,toast:u,unstyled:d,interacting:h,setHeights:p,visibleToasts:f,heights:m,index:g,toasts:y,expanded:v,removeToast:x,defaultRichColors:w,closeButton:b,style:B,cancelButtonStyle:C,actionButtonStyle:E,className:k="",descriptionClassName:S="",duration:j,position:F,gap:Q,expandByDefault:N,classNames:U,icons:O,closeButtonAriaLabel:I="Close toast"}=e,[T,P]=Te.useState(null),[M,D]=Te.useState(null),[L,H]=Te.useState(!1),[_,R]=Te.useState(!1),[K,z]=Te.useState(!1),[V,$]=Te.useState(!1),[W,G]=Te.useState(!1),[q,Y]=Te.useState(0),[X,J]=Te.useState(0),Z=Te.useRef(u.duration||j||4e3),ee=Te.useRef(null),te=Te.useRef(null),re=0===g,ne=g+1<=f,ie=u.type,ae=!1!==u.dismissible,oe=u.className||"",se=u.descriptionClassName||"",Ae=Te.useMemo(()=>m.findIndex(e=>e.toastId===u.id)||0,[m,u.id]),le=Te.useMemo(()=>{var e;return null!=(e=u.closeButton)?e:b},[u.closeButton,b]),ce=Te.useMemo(()=>u.duration||j||4e3,[u.duration,j]),ue=Te.useRef(0),de=Te.useRef(0),he=Te.useRef(0),pe=Te.useRef(null),[fe,me]=F.split("-"),ge=Te.useMemo(()=>m.reduce((e,t,r)=>r>=Ae?e:e+t.height,0),[m,Ae]),ye=(()=>{const[e,t]=Te.useState(document.hidden);return Te.useEffect(()=>{const e=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",e),()=>window.removeEventListener("visibilitychange",e)},[]),e})(),ve=u.invert||c,xe="loading"===ie;de.current=Te.useMemo(()=>Ae*Q+ge,[Ae,ge]),Te.useEffect(()=>{Z.current=ce},[ce]),Te.useEffect(()=>{H(!0)},[]),Te.useEffect(()=>{const e=te.current;if(e){const t=e.getBoundingClientRect().height;return J(t),p(e=>[{toastId:u.id,height:t,position:u.position},...e]),()=>p(e=>e.filter(e=>e.toastId!==u.id))}},[p,u.id]),Te.useLayoutEffect(()=>{if(!L)return;const e=te.current,t=e.style.height;e.style.height="auto";const r=e.getBoundingClientRect().height;e.style.height=t,J(r),p(e=>e.find(e=>e.toastId===u.id)?e.map(e=>e.toastId===u.id?{...e,height:r}:e):[{toastId:u.id,height:r,position:u.position},...e])},[L,u.title,u.description,p,u.id,u.jsx,u.action,u.cancel]);const we=Te.useCallback(()=>{R(!0),Y(de.current),p(e=>e.filter(e=>e.toastId!==u.id)),setTimeout(()=>{x(u)},200)},[u,x,p,de]);Te.useEffect(()=>{if(u.promise&&"loading"===ie||u.duration===1/0||"loading"===u.type)return;let e;return v||h||ye?(()=>{if(he.current<ue.current){const e=(new Date).getTime()-ue.current;Z.current=Z.current-e}he.current=(new Date).getTime()})():Z.current!==1/0&&(ue.current=(new Date).getTime(),e=setTimeout(()=>{null==u.onAutoClose||u.onAutoClose.call(u,u),we()},Z.current)),()=>clearTimeout(e)},[v,h,u,ie,ye,we]),Te.useEffect(()=>{u.delete&&(we(),null==u.onDismiss||u.onDismiss.call(u,u))},[we,u.delete]);const be=u.icon||(null==O?void 0:O[ie])||(e=>{switch(e){case"success":return Ay;case"info":return cy;case"warning":return ly;case"error":return uy;default:return null}})(ie);var Be,Ce,Ee,ke;return Te.createElement("li",{tabIndex:0,ref:te,className:wy(k,oe,null==U?void 0:U.toast,null==u||null==(t=u.classNames)?void 0:t.toast,null==U?void 0:U.default,null==U?void 0:U[ie],null==u||null==(r=u.classNames)?void 0:r[ie]),"data-sonner-toast":"","data-rich-colors":null!=(Be=u.richColors)?Be:w,"data-styled":!Boolean(u.jsx||u.unstyled||d),"data-mounted":L,"data-promise":Boolean(u.promise),"data-swiped":W,"data-removed":_,"data-visible":ne,"data-y-position":fe,"data-x-position":me,"data-index":g,"data-front":re,"data-swiping":K,"data-dismissible":ae,"data-type":ie,"data-invert":ve,"data-swipe-out":V,"data-swipe-direction":M,"data-expanded":Boolean(v||N&&L),"data-testid":u.testId,style:{"--index":g,"--toasts-before":g,"--z-index":y.length-g,"--offset":`${_?q:de.current}px`,"--initial-height":N?"auto":`${X}px`,...B,...u.style},onDragEnd:()=>{z(!1),P(null),pe.current=null},onPointerDown:e=>{2!==e.button&&!xe&&ae&&(ee.current=new Date,Y(de.current),e.target.setPointerCapture(e.pointerId),"BUTTON"!==e.target.tagName&&(z(!0),pe.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{var e,t,r;if(V||!ae)return;pe.current=null;const n=Number((null==(e=te.current)?void 0:e.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),i=Number((null==(t=te.current)?void 0:t.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),a=(new Date).getTime()-(null==(r=ee.current)?void 0:r.getTime()),o="x"===T?n:i,s=Math.abs(o)/a;if(Math.abs(o)>=45||s>.11)return Y(de.current),null==u.onDismiss||u.onDismiss.call(u,u),D("x"===T?n>0?"right":"left":i>0?"down":"up"),we(),void $(!0);var A,l;null==(A=te.current)||A.style.setProperty("--swipe-amount-x","0px"),null==(l=te.current)||l.style.setProperty("--swipe-amount-y","0px"),G(!1),z(!1),P(null)},onPointerMove:t=>{var r,n,i;if(!pe.current||!ae)return;if((null==(r=window.getSelection())?void 0:r.toString().length)>0)return;const a=t.clientY-pe.current.y,o=t.clientX-pe.current.x;var s;const A=null!=(s=e.swipeDirections)?s:function(e){const[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}(F);!T&&(Math.abs(o)>1||Math.abs(a)>1)&&P(Math.abs(o)>Math.abs(a)?"x":"y");let l={x:0,y:0};const c=e=>1/(1.5+Math.abs(e)/20);if("y"===T){if(A.includes("top")||A.includes("bottom"))if(A.includes("top")&&a<0||A.includes("bottom")&&a>0)l.y=a;else{const e=a*c(a);l.y=Math.abs(e)<Math.abs(a)?e:a}}else if("x"===T&&(A.includes("left")||A.includes("right")))if(A.includes("left")&&o<0||A.includes("right")&&o>0)l.x=o;else{const e=o*c(o);l.x=Math.abs(e)<Math.abs(o)?e:o}(Math.abs(l.x)>0||Math.abs(l.y)>0)&&G(!0),null==(n=te.current)||n.style.setProperty("--swipe-amount-x",`${l.x}px`),null==(i=te.current)||i.style.setProperty("--swipe-amount-y",`${l.y}px`)}},le&&!u.jsx&&"loading"!==ie?Te.createElement("button",{"aria-label":I,"data-disabled":xe,"data-close-button":!0,onClick:xe||!ae?()=>{}:()=>{we(),null==u.onDismiss||u.onDismiss.call(u,u)},className:wy(null==U?void 0:U.closeButton,null==u||null==(n=u.classNames)?void 0:n.closeButton)},null!=(Ce=null==O?void 0:O.close)?Ce:dy):null,(ie||u.icon||u.promise)&&null!==u.icon&&(null!==(null==O?void 0:O[ie])||u.icon)?Te.createElement("div",{"data-icon":"",className:wy(null==U?void 0:U.icon,null==u||null==(i=u.classNames)?void 0:i.icon)},u.promise||"loading"===u.type&&!u.icon?u.icon||((null==O?void 0:O.loading)?Te.createElement("div",{className:wy(null==U?void 0:U.loader,null==u||null==(ke=u.classNames)?void 0:ke.loader,"sonner-loader"),"data-visible":"loading"===ie},O.loading):Te.createElement(sy,{className:wy(null==U?void 0:U.loader,null==u||null==(Ee=u.classNames)?void 0:Ee.loader),visible:"loading"===ie})):null,"loading"!==u.type?be:null):null,Te.createElement("div",{"data-content":"",className:wy(null==U?void 0:U.content,null==u||null==(a=u.classNames)?void 0:a.content)},Te.createElement("div",{"data-title":"",className:wy(null==U?void 0:U.title,null==u||null==(o=u.classNames)?void 0:o.title)},u.jsx?u.jsx:"function"==typeof u.title?u.title():u.title),u.description?Te.createElement("div",{"data-description":"",className:wy(S,se,null==U?void 0:U.description,null==u||null==(s=u.classNames)?void 0:s.description)},"function"==typeof u.description?u.description():u.description):null),Te.isValidElement(u.cancel)?u.cancel:u.cancel&&yy(u.cancel)?Te.createElement("button",{"data-button":!0,"data-cancel":!0,style:u.cancelButtonStyle||C,onClick:e=>{yy(u.cancel)&&ae&&(null==u.cancel.onClick||u.cancel.onClick.call(u.cancel,e),we())},className:wy(null==U?void 0:U.cancelButton,null==u||null==(A=u.classNames)?void 0:A.cancelButton)},u.cancel.label):null,Te.isValidElement(u.action)?u.action:u.action&&yy(u.action)?Te.createElement("button",{"data-button":!0,"data-action":!0,style:u.actionButtonStyle||E,onClick:e=>{yy(u.action)&&(null==u.action.onClick||u.action.onClick.call(u.action,e),e.defaultPrevented||we())},className:wy(null==U?void 0:U.actionButton,null==u||null==(l=u.classNames)?void 0:l.actionButton)},u.action.label):null)};function By(){if("undefined"==typeof window)return"ltr";if("undefined"==typeof document)return"ltr";const e=document.documentElement.getAttribute("dir");return"auto"!==e&&e?e:window.getComputedStyle(document.documentElement).direction}function Cy(e,t){const r={};return[e,t].forEach((e,t)=>{const n=1===t,i=n?"--mobile-offset":"--offset",a=n?"16px":"24px";function o(e){["top","right","bottom","left"].forEach(t=>{r[`${i}-${t}`]="number"==typeof e?`${e}px`:e})}"number"==typeof e||"string"==typeof e?o(e):"object"==typeof e?["top","right","bottom","left"].forEach(t=>{void 0===e[t]?r[`${i}-${t}`]=a:r[`${i}-${t}`]="number"==typeof e[t]?`${e[t]}px`:e[t]}):o(a)}),r}const Ey=Te.forwardRef(function(e,t){const{id:r,invert:n,position:i="bottom-right",hotkey:a=["altKey","KeyT"],expand:o,closeButton:s,className:A,offset:l,mobileOffset:c,theme:u="light",richColors:d,duration:h,style:p,visibleToasts:f=vy,toastOptions:m,dir:g=By(),gap:y=xy,icons:v,containerAriaLabel:x="Notifications"}=e,[w,b]=Te.useState([]),B=Te.useMemo(()=>r?w.filter(e=>e.toasterId===r):w.filter(e=>!e.toasterId),[w,r]),C=Te.useMemo(()=>Array.from(new Set([i].concat(B.filter(e=>e.position).map(e=>e.position)))),[B,i]),[E,k]=Te.useState([]),[S,j]=Te.useState(!1),[F,Q]=Te.useState(!1),[N,U]=Te.useState("system"!==u?u:"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),O=Te.useRef(null),I=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),T=Te.useRef(null),P=Te.useRef(!1),M=Te.useCallback(e=>{b(t=>{var r;return(null==(r=t.find(t=>t.id===e.id))?void 0:r.delete)||py.dismiss(e.id),t.filter(({id:t})=>t!==e.id)})},[]);return Te.useEffect(()=>py.subscribe(e=>{e.dismiss?requestAnimationFrame(()=>{b(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))}):setTimeout(()=>{Pe.flushSync(()=>{b(t=>{const r=t.findIndex(t=>t.id===e.id);return-1!==r?[...t.slice(0,r),{...t[r],...e},...t.slice(r+1)]:[e,...t]})})})}),[w]),Te.useEffect(()=>{if("system"!==u)return void U(u);if("system"===u&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?U("dark"):U("light")),"undefined"==typeof window)return;const e=window.matchMedia("(prefers-color-scheme: dark)");try{e.addEventListener("change",({matches:e})=>{U(e?"dark":"light")})}catch(t){e.addListener(({matches:e})=>{try{U(e?"dark":"light")}catch(eX){console.error(eX)}})}},[u]),Te.useEffect(()=>{w.length<=1&&j(!1)},[w]),Te.useEffect(()=>{const e=e=>{var t;var r;a.every(t=>e[t]||e.code===t)&&(j(!0),null==(r=O.current)||r.focus());"Escape"!==e.code||document.activeElement!==O.current&&!(null==(t=O.current)?void 0:t.contains(document.activeElement))||j(!1)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[a]),Te.useEffect(()=>{if(O.current)return()=>{T.current&&(T.current.focus({preventScroll:!0}),T.current=null,P.current=!1)}},[O.current]),Te.createElement("section",{ref:t,"aria-label":`${x} ${I}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},C.map((t,r)=>{var i;const[a,u]=t.split("-");return B.length?Te.createElement("ol",{key:t,dir:"auto"===g?By():g,tabIndex:-1,ref:O,className:A,"data-sonner-toaster":!0,"data-sonner-theme":N,"data-y-position":a,"data-x-position":u,style:{"--front-toast-height":`${(null==(i=E[0])?void 0:i.height)||0}px`,"--width":"356px","--gap":`${y}px`,...p,...Cy(l,c)},onBlur:e=>{P.current&&!e.currentTarget.contains(e.relatedTarget)&&(P.current=!1,T.current&&(T.current.focus({preventScroll:!0}),T.current=null))},onFocus:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||P.current||(P.current=!0,T.current=e.relatedTarget)},onMouseEnter:()=>j(!0),onMouseMove:()=>j(!0),onMouseLeave:()=>{F||j(!1)},onDragEnd:()=>j(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||Q(!0)},onPointerUp:()=>Q(!1)},B.filter(e=>!e.position&&0===r||e.position===t).map((r,i)=>{var a,A;return Te.createElement(by,{key:r.id,icons:v,index:i,toast:r,defaultRichColors:d,duration:null!=(a=null==m?void 0:m.duration)?a:h,className:null==m?void 0:m.className,descriptionClassName:null==m?void 0:m.descriptionClassName,invert:n,visibleToasts:f,closeButton:null!=(A=null==m?void 0:m.closeButton)?A:s,interacting:F,position:t,style:null==m?void 0:m.style,unstyled:null==m?void 0:m.unstyled,classNames:null==m?void 0:m.classNames,cancelButtonStyle:null==m?void 0:m.cancelButtonStyle,actionButtonStyle:null==m?void 0:m.actionButtonStyle,closeButtonAriaLabel:null==m?void 0:m.closeButtonAriaLabel,removeToast:M,toasts:B.filter(e=>e.position==r.position),heights:E.filter(e=>e.position==r.position),setHeights:k,expandByDefault:o,gap:y,expanded:S,swipeDirections:e.swipeDirections})})):null}))}),ky=De.forwardRef(({className:e,...t},r)=>Ie.jsx("div",{ref:r,className:Sp("rounded-xl border bg-card text-card-foreground shadow",e),...t}));ky.displayName="Card";De.forwardRef(({className:e,...t},r)=>Ie.jsx("div",{ref:r,className:Sp("flex flex-col space-y-1.5 p-6",e),...t})).displayName="CardHeader";De.forwardRef(({className:e,...t},r)=>Ie.jsx("div",{ref:r,className:Sp("font-semibold leading-none tracking-tight",e),...t})).displayName="CardTitle";De.forwardRef(({className:e,...t},r)=>Ie.jsx("div",{ref:r,className:Sp("text-sm text-muted-foreground",e),...t})).displayName="CardDescription";De.forwardRef(({className:e,...t},r)=>Ie.jsx("div",{ref:r,className:Sp("p-6 pt-0",e),...t})).displayName="CardContent";De.forwardRef(({className:e,...t},r)=>Ie.jsx("div",{ref:r,className:Sp("flex items-center p-6 pt-0",e),...t})).displayName="CardFooter";const Sy=De.forwardRef(({className:e,type:t,...r},n)=>Ie.jsx("input",{type:t,className:Sp("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...r}));Sy.displayName="Input";const jy=["Dry Van","Refrigerated","Flatbed","Step Deck","Lowboy","Tanker","Container","Other"];function Fy({onSearch:e,theme:t,isLoading:r=!1}){const[n,i]=Te.useState({origin:"Los Angeles, CA",destination:"New York, NY",pickupEarliest:(()=>{const e=new Date;return e.setDate(e.getDate()+1),e.toISOString().split("T")[0]})(),pickupHours:"09:00",dropoffHours:"17:00",equipmentType:"Dry Van",length:"53",weight:"40000",volume:"2000"}),[a,o]=Te.useState({}),{width:s,containerRef:A}=(()=>{const[e,t]=Te.useState(0),r=Te.useRef(null);return Te.useEffect(()=>{const e=()=>{r.current&&t(r.current.offsetWidth)};e();const n=new ResizeObserver(e);return r.current&&n.observe(r.current),()=>n.disconnect()},[]),{width:e,containerRef:r}})(),l=(e=>e<380?{containerPadding:"p-2",headerPadding:"p-3",formPadding:"p-3",spacing:"space-y-3",titleSize:"text-base",subtitleSize:"text-xs",iconSize:"w-5 h-5",iconSizeSmall:"h-3 w-3",labelSize:"text-xs",buttonSize:"text-xs px-3 py-2",buttonIconSize:"h-3 w-3",maxWidth:"max-w-none",gridCols:{location:"grid-cols-1",datetime:"grid-cols-1",equipment:"grid-cols-1"}}:e<450?{containerPadding:"p-3",headerPadding:"p-4",formPadding:"p-4",spacing:"space-y-4",titleSize:"text-lg",subtitleSize:"text-sm",iconSize:"w-6 h-6",iconSizeSmall:"h-3 w-3",labelSize:"text-xs",buttonSize:"text-sm px-4 py-2",buttonIconSize:"h-4 w-4",maxWidth:"max-w-none",gridCols:{location:"grid-cols-1",datetime:"grid-cols-1",equipment:"grid-cols-2"}}:e<600?{containerPadding:"p-4",headerPadding:"p-5",formPadding:"p-5",spacing:"space-y-5",titleSize:"text-xl",subtitleSize:"text-sm",iconSize:"w-8 h-8",iconSizeSmall:"h-3.5 w-3.5",labelSize:"text-sm",buttonSize:"text-sm px-6 py-2.5",buttonIconSize:"h-4 w-4",maxWidth:"max-w-2xl",gridCols:{location:"grid-cols-1",datetime:"grid-cols-1",equipment:"grid-cols-2"}}:{containerPadding:"p-6",headerPadding:"p-6",formPadding:"p-6",spacing:"space-y-6",titleSize:"text-2xl",subtitleSize:"text-base",iconSize:"w-10 h-10",iconSizeSmall:"h-4 w-4",labelSize:"text-sm",buttonSize:"px-8 py-3",buttonIconSize:"h-5 w-5",maxWidth:"max-w-4xl",gridCols:{location:"grid-cols-1 md:grid-cols-2",datetime:"grid-cols-1 md:grid-cols-3",equipment:"grid-cols-1 md:grid-cols-2 lg:grid-cols-4"}})(s),c=(e,t)=>{i(r=>({...r,[e]:t})),a[e]&&o(t=>({...t,[e]:""}))};return Ie.jsx(ch.div,{ref:A,initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:`${l.maxWidth} mx-auto ${l.containerPadding}`,children:Ie.jsxs("div",{className:"bg-white rounded-lg shadow-lg border",children:[Ie.jsxs("div",{className:`${l.headerPadding} border-b`,children:[Ie.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[Ie.jsx("div",{className:`${l.iconSize} rounded-full flex items-center justify-center`,style:{backgroundColor:t.primaryColor+"20"},children:Ie.jsx(tm,{className:`${l.iconSizeSmall}`,style:{color:t.primaryColor}})}),Ie.jsx("h2",{className:`${l.titleSize} font-bold`,style:{fontFamily:t.fontFamily,color:t.primaryColor},children:"Search Carriers"})]}),Ie.jsx("p",{className:`text-gray-600 ${l.subtitleSize}`,style:{fontFamily:t.fontFamily},children:"Find the best carriers for your shipment needs"})]}),Ie.jsxs("form",{onSubmit:t=>{t.preventDefault(),(()=>{const e={};return n.origin.trim()||(e.origin="Origin is required"),n.destination.trim()||(e.destination="Destination is required"),n.pickupEarliest||(e.pickupEarliest="Pickup date is required"),n.pickupHours||(e.pickupHours="Pickup time is required"),n.dropoffHours||(e.dropoffHours="Drop-off time is required"),n.length.trim()||(e.length="Length is required"),n.weight.trim()||(e.weight="Weight is required"),o(e),0===Object.keys(e).length})()&&e(n)},className:`${l.formPadding} ${l.spacing}`,children:[Ie.jsxs("div",{className:`grid ${l.gridCols.location} gap-4`,children:[Ie.jsxs("div",{children:[Ie.jsxs("label",{className:`block ${l.labelSize} font-medium text-gray-700 mb-2`,style:{fontFamily:t.fontFamily},children:[Ie.jsx(Mf,{className:`${l.iconSizeSmall} inline mr-1`}),"Origin"]}),Ie.jsx(Sy,{value:n.origin,onChange:e=>c("origin",e.target.value),placeholder:"Enter pickup location",className:a.origin?"border-red-500":"",style:{fontFamily:t.fontFamily}}),a.origin&&Ie.jsx("p",{className:"text-red-500 text-xs mt-1",children:a.origin})]}),Ie.jsxs("div",{children:[Ie.jsxs("label",{className:`block ${l.labelSize} font-medium text-gray-700 mb-2`,style:{fontFamily:t.fontFamily},children:[Ie.jsx(Mf,{className:`${l.iconSizeSmall} inline mr-1`}),"Destination"]}),Ie.jsx(Sy,{value:n.destination,onChange:e=>c("destination",e.target.value),placeholder:"Enter delivery location",className:a.destination?"border-red-500":"",style:{fontFamily:t.fontFamily}}),a.destination&&Ie.jsx("p",{className:"text-red-500 text-xs mt-1",children:a.destination})]})]}),Ie.jsxs("div",{className:`grid ${l.gridCols.datetime} gap-4`,children:[Ie.jsxs("div",{children:[Ie.jsxs("label",{className:`block ${l.labelSize} font-medium text-gray-700 mb-2`,style:{fontFamily:t.fontFamily},children:[Ie.jsx(af,{className:`${l.iconSizeSmall} inline mr-1`}),"Pickup Earliest"]}),Ie.jsx(Sy,{type:"date",value:n.pickupEarliest,onChange:e=>c("pickupEarliest",e.target.value),className:a.pickupEarliest?"border-red-500":"",style:{fontFamily:t.fontFamily}}),a.pickupEarliest&&Ie.jsx("p",{className:"text-red-500 text-xs mt-1",children:a.pickupEarliest})]}),Ie.jsxs("div",{children:[Ie.jsxs("label",{className:`block ${l.labelSize} font-medium text-gray-700 mb-2`,style:{fontFamily:t.fontFamily},children:[Ie.jsx(yf,{className:`${l.iconSizeSmall} inline mr-1`}),"Pickup Hours"]}),Ie.jsx(Sy,{type:"time",value:n.pickupHours,onChange:e=>c("pickupHours",e.target.value),className:a.pickupHours?"border-red-500":"",style:{fontFamily:t.fontFamily}}),a.pickupHours&&Ie.jsx("p",{className:"text-red-500 text-xs mt-1",children:a.pickupHours})]}),Ie.jsxs("div",{children:[Ie.jsxs("label",{className:`block ${l.labelSize} font-medium text-gray-700 mb-2`,style:{fontFamily:t.fontFamily},children:[Ie.jsx(yf,{className:`${l.iconSizeSmall} inline mr-1`}),"Drop-off Hours"]}),Ie.jsx(Sy,{type:"time",value:n.dropoffHours,onChange:e=>c("dropoffHours",e.target.value),className:a.dropoffHours?"border-red-500":"",style:{fontFamily:t.fontFamily}}),a.dropoffHours&&Ie.jsx("p",{className:"text-red-500 text-xs mt-1",children:a.dropoffHours})]})]}),Ie.jsxs("div",{className:`grid ${l.gridCols.equipment} gap-4`,children:[Ie.jsxs("div",{children:[Ie.jsxs("label",{className:`block ${l.labelSize} font-medium text-gray-700 mb-2`,style:{fontFamily:t.fontFamily},children:[Ie.jsx(fm,{className:`${l.iconSizeSmall} inline mr-1`}),"Equipment Type"]}),Ie.jsx("select",{value:n.equipmentType,onChange:e=>c("equipmentType",e.target.value),className:`w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 ${l.labelSize}`,style:{fontFamily:t.fontFamily},children:jy.map(e=>Ie.jsx("option",{value:e,children:e},e))})]}),Ie.jsxs("div",{children:[Ie.jsxs("label",{className:`block ${l.labelSize} font-medium text-gray-700 mb-2`,style:{fontFamily:t.fontFamily},children:[Ie.jsx($f,{className:`${l.iconSizeSmall} inline mr-1`}),"Length (ft)"]}),Ie.jsx(Sy,{type:"number",value:n.length,onChange:e=>c("length",e.target.value),placeholder:"e.g., 48",className:a.length?"border-red-500":"",style:{fontFamily:t.fontFamily}}),a.length&&Ie.jsx("p",{className:"text-red-500 text-xs mt-1",children:a.length})]}),Ie.jsxs("div",{children:[Ie.jsxs("label",{className:`block ${l.labelSize} font-medium text-gray-700 mb-2`,style:{fontFamily:t.fontFamily},children:[Ie.jsx(vm,{className:`${l.iconSizeSmall} inline mr-1`}),"Weight (lbs)"]}),Ie.jsx(Sy,{type:"number",value:n.weight,onChange:e=>c("weight",e.target.value),placeholder:"e.g., 40000",className:a.weight?"border-red-500":"",style:{fontFamily:t.fontFamily}}),a.weight&&Ie.jsx("p",{className:"text-red-500 text-xs mt-1",children:a.weight})]}),Ie.jsxs("div",{children:[Ie.jsxs("label",{className:`block ${l.labelSize} font-medium text-gray-700 mb-2`,style:{fontFamily:t.fontFamily},children:[Ie.jsx(rf,{className:`${l.iconSizeSmall} inline mr-1`}),"Volume (cu ft)"]}),Ie.jsx(Sy,{type:"number",value:n.volume||"",onChange:e=>c("volume",e.target.value),placeholder:"e.g., 2000",className:a.volume?"border-red-500":"",style:{fontFamily:t.fontFamily}}),a.volume&&Ie.jsx("p",{className:"text-red-500 text-xs mt-1",children:a.volume})]})]}),Ie.jsx("div",{className:"flex justify-center pt-4",children:Ie.jsx(Np,{type:"submit",size:"lg",disabled:r,className:`${l.buttonSize} text-white font-semibold rounded-lg hover:opacity-90 transition-opacity disabled:opacity-50 disabled:cursor-not-allowed`,style:{backgroundColor:t.primaryColor,fontFamily:t.fontFamily},children:r?Ie.jsxs(Ie.Fragment,{children:[Ie.jsx(If,{className:`${l.buttonIconSize} mr-2 animate-spin`}),"Searching..."]}):Ie.jsxs(Ie.Fragment,{children:[Ie.jsx(tm,{className:`${l.buttonIconSize} mr-2`}),"Search Carriers"]})})})]})]})})}const Qy=async e=>{try{const t=(e=>{const t=`${e.pickupEarliest}T${e.pickupHours}:00`,r=`${e.pickupEarliest}T${e.dropoffHours}:00`;return{origin:e.origin,destination:e.destination,cargo_type:e.equipmentType,weight:parseFloat(e.weight)||0,volume:parseFloat(e.volume||"0")||0,pickup_date:t,delivery_date:r,max_results:10}})(e);return await Vi.initiateWorkflow(t)}catch(t){throw console.error("Error initiating carrier search:",t),t}},Ny=e=>({id:e.workflow_id,title:`${e.input_params.origin} → ${e.input_params.destination}`,origin:e.input_params.origin,destination:e.input_params.destination,cargoType:e.input_params.cargo_type,weight:e.input_params.weight,volume:e.input_params.volume,pickupDate:e.input_params.pickup_date,deliveryDate:e.input_params.delivery_date,status:e.status,totalCarriers:e.total_carriers,createdAt:new Date(e.created_at),completedAt:e.completed_at?new Date(e.completed_at):null,workflowId:e.workflow_id}),Uy=e=>"completed"===e,Oy=new Mt({defaultOptions:{queries:{staleTime:3e5,gcTime:6e5,retry:(e,t)=>!((null==t?void 0:t.status)>=400&&(null==t?void 0:t.status)<500)&&e<3,retryDelay:e=>Math.min(1e3*2**e,3e4),refetchOnWindowFocus:!1,refetchOnReconnect:!0,refetchOnMount:!0},mutations:{retry:(e,t)=>!((null==t?void 0:t.status)>=400&&(null==t?void 0:t.status)<500)&&e<1,retryDelay:1e3}}}),Iy={carriers:{all:()=>["carriers"],lists:()=>[...Iy.carriers.all(),"list"],list:e=>[...Iy.carriers.lists(),e],details:()=>[...Iy.carriers.all(),"detail"],detail:e=>[...Iy.carriers.details(),e],search:e=>[...Iy.carriers.all(),"search",e]}},Ty=e=>{console.error("[Query Error]",e),window.dispatchEvent(new CustomEvent("query:error",{detail:{message:e.message||"An error occurred",status:e.status||0,data:e.data||null}}))},Py=()=>({fetchWorkflowPage:async e=>{const t=await(async(e=1,t=10)=>{try{return await Vi.getWorkflowList(e,t)}catch(r){throw console.error("Error fetching workflow list:",r),r}})(e,10);return{data:t.workflows.map(Ny),hasMore:10===t.workflows.length,total:t.total_count}}}),My=e=>{const t=Lt();return Vt({mutationFn:async e=>await(async e=>{try{return await Vi.deleteWorkflow(e)}catch(t){throw console.error("Error deleting workflow:",t),t}})(e),...e,onSuccess:(r,n,i,a)=>{var o;t.invalidateQueries({queryKey:["workflows"]}),null==(o=null==e?void 0:e.onSuccess)||o.call(e,r,n,i,a)},onError:(t,r,n,i)=>{var a;Ty(t),null==(a=null==e?void 0:e.onError)||a.call(e,t,r,n,i)}})},Dy=(e,t)=>function(e){return zt(e,Ct)}({queryKey:["workflow-status",e],queryFn:async()=>await Vi.getWorkflowStatus(e),enabled:!!e,staleTime:3e4,...t});function Ly(){const{theme:e,isAuthenticated:t}=ea();hg();const r=(e=>{const t=Lt();return Vt({mutationFn:async e=>await Qy(e),...e,onSuccess:(r,n,i,a)=>{var o;t.invalidateQueries({queryKey:Iy.carriers.all()}),null==(o=null==e?void 0:e.onSuccess)||o.call(e,r,n,i,a)},onError:(t,r,n,i)=>{var a;Ty(t),null==(a=null==e?void 0:e.onError)||a.call(e,t,r,n,i)}})})({onSuccess:e=>{gy.success("Workflow Intialted Successfully!",{description:`Workflow ID: ${e.data.workflow_id} and estimated completed time: ${e.data.estimated_completion_time}`,duration:4e3})},onError:e=>{console.error("Carrier search failed:",e),gy.error("Failed to search carriers",{description:e.message||"Please check your connection and try again.",duration:5e3})}});return t?Ie.jsx("div",{className:"flex flex-col h-full",style:{fontFamily:e.fontFamily},children:Ie.jsx("div",{className:"flex-1 overflow-y-auto",children:Ie.jsx(Fy,{onSearch:e=>{const t=(e=>{var t,r,n;const i=[];return(null==(t=e.origin)?void 0:t.trim())||i.push("Origin is required"),(null==(r=e.destination)?void 0:r.trim())||i.push("Destination is required"),e.pickupEarliest||i.push("Pickup date is required"),e.pickupHours||i.push("Pickup time is required"),e.dropoffHours||i.push("Delivery time is required"),e.equipmentType||i.push("Equipment type is required"),(null==(n=e.weight)?void 0:n.trim())?isNaN(parseFloat(e.weight))?i.push("Weight must be a valid number"):parseFloat(e.weight)<=0&&i.push("Weight must be greater than 0"):i.push("Weight is required"),e.volume&&e.volume.trim()&&(isNaN(parseFloat(e.volume))?i.push("Volume must be a valid number"):parseFloat(e.volume)<0&&i.push("Volume must be 0 or greater")),i})(e);t.length>0?gy.error("Please fix the following errors:",{description:t.join(", "),duration:5e3}):r.mutate(e)},theme:e,isLoading:r.isPending})})}):Ie.jsx("div",{className:"flex-1 flex items-center justify-center p-8",children:Ie.jsx("div",{className:"text-center",children:Ie.jsx("p",{className:"text-gray-600",style:{fontFamily:e.fontFamily},children:"Please authenticate to start using the carrier search."})})})}function Hy({carrier:e,isSelected:t,onSelect:r,onCallCarrier:n,theme:i}){const{width:a,containerRef:o}=(()=>{const[e,t]=Te.useState(0),r=Te.useRef(null);return Te.useEffect(()=>{const e=()=>{r.current&&t(r.current.offsetWidth)};e();const n=new ResizeObserver(e);return r.current&&n.observe(r.current),()=>n.disconnect()},[]),{width:e,containerRef:r}})(),s=(e=>e<400?{padding:"p-3",spacing:"gap-2",titleSize:"text-base",textSize:"text-xs",priceSize:"text-lg",iconSize:"h-3 w-3",buttonSize:"text-xs px-2 py-1",buttonIconSize:"h-3 w-3",layout:"mobile",checkboxSize:"h-3 w-3",marginBottom:"mb-1"}:e<600?{padding:"p-3.5",spacing:"gap-2.5",titleSize:"text-lg",textSize:"text-sm",priceSize:"text-xl",iconSize:"h-3.5 w-3.5",buttonSize:"text-sm px-3 py-1.5",buttonIconSize:"h-3.5 w-3.5",layout:"tablet",checkboxSize:"h-3.5 w-3.5",marginBottom:"mb-1.5"}:{padding:"p-4",spacing:"gap-3",titleSize:"text-lg",textSize:"text-sm",priceSize:"text-2xl",iconSize:"h-4 w-4",buttonSize:"text-sm px-4 py-2",buttonIconSize:"h-4 w-4",layout:"desktop",checkboxSize:"h-4 w-4",marginBottom:"mb-2"})(a),A=()=>{r(e.id)},l=t=>{t.stopPropagation(),n(e.id)};return Ie.jsxs(ch.div,{ref:o,initial:{opacity:0,y:20},animate:{opacity:1,y:0},whileHover:{y:-2},className:`bg-white rounded-lg border-2 ${s.padding} cursor-pointer transition-all duration-200 ${t?"border-blue-500 shadow-lg":"border-gray-200 hover:border-gray-300 hover:shadow-md"}`,onClick:A,children:["mobile"===s.layout?Ie.jsxs("div",{className:"space-y-2",children:[Ie.jsxs("div",{className:"flex items-center justify-between",children:[Ie.jsxs("div",{className:"flex items-center gap-2",children:[Ie.jsx("input",{type:"checkbox",checked:t,onChange:A,className:`${s.checkboxSize} rounded border-gray-300 text-blue-600 focus:ring-blue-500`,style:{accentColor:i.primaryColor}}),Ie.jsx("h3",{className:`font-semibold ${s.titleSize}`,style:{fontFamily:i.fontFamily},children:e.name})]}),Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(Am,{className:`${s.iconSize} fill-yellow-400 text-yellow-400`}),Ie.jsx("span",{className:`${s.textSize} text-gray-600`,children:e.rating.toFixed(1)})]})]}),Ie.jsxs("div",{className:"grid grid-cols-2 gap-1 text-xs",children:[Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(Mf,{className:`${s.iconSize} text-gray-500`}),Ie.jsx("span",{className:"text-gray-600 truncate",style:{fontFamily:i.fontFamily},children:e.location||e.source||"Available"})]}),Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(fm,{className:`${s.iconSize} text-gray-500`}),Ie.jsx("span",{className:"text-gray-600 truncate",style:{fontFamily:i.fontFamily},children:e.equipment})]})]}),(e.dotNumber||e.capacity)&&Ie.jsxs("div",{className:"grid grid-cols-2 gap-1 text-xs",children:[e.dotNumber&&Ie.jsxs("div",{className:"text-gray-600 truncate",style:{fontFamily:i.fontFamily},children:["DOT: ",e.dotNumber]}),e.capacity&&Ie.jsxs("div",{className:"text-gray-600 truncate",style:{fontFamily:i.fontFamily},children:["Fleet: ",e.capacity]})]}),(e.vettingResult||e.matchScore)&&Ie.jsxs("div",{className:"flex items-center justify-between text-xs",children:[e.vettingResult&&Ie.jsx("span",{className:"px-2 py-0.5 rounded text-xs font-medium "+("ACCEPT"===e.vettingResult?"bg-green-100 text-green-800":"REJECT"===e.vettingResult?"bg-red-100 text-red-800":"bg-yellow-100 text-yellow-800"),children:e.vettingResult}),e.matchScore&&Ie.jsxs("span",{className:"text-gray-600",style:{fontFamily:i.fontFamily},children:["Match: ",(100*e.matchScore).toFixed(0),"%"]})]}),Ie.jsxs("div",{className:"flex items-center justify-between",children:[Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(yf,{className:`${s.iconSize} text-gray-500`}),Ie.jsx("span",{className:`${s.textSize} text-gray-600`,style:{fontFamily:i.fontFamily},children:e.responseTime||e.estimatedTime||"< 2 hours"})]}),Ie.jsxs("span",{className:`${s.priceSize} font-bold`,style:{fontFamily:i.fontFamily,color:i.primaryColor},children:["$",e.price.toLocaleString()]})]}),Ie.jsxs(Np,{onClick:l,className:`w-full ${s.buttonSize} text-white font-medium hover:opacity-90 transition-opacity`,style:{backgroundColor:i.primaryColor,fontFamily:i.fontFamily},children:[Ie.jsx(Wf,{className:`${s.buttonIconSize} mr-1`}),"Call Carrier"]})]}):Ie.jsxs("div",{className:"flex items-start justify-between",children:[Ie.jsxs("div",{className:`flex items-start ${s.spacing} flex-1`,children:[Ie.jsx("input",{type:"checkbox",checked:t,onChange:A,className:`mt-1 ${s.checkboxSize} rounded border-gray-300 text-blue-600 focus:ring-blue-500`,style:{accentColor:i.primaryColor}}),Ie.jsxs("div",{className:"flex-1",children:[Ie.jsxs("div",{className:`flex items-center gap-2 ${s.marginBottom}`,children:[Ie.jsx("h3",{className:`font-semibold ${s.titleSize}`,style:{fontFamily:i.fontFamily},children:e.name}),Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(Am,{className:`${s.iconSize} fill-yellow-400 text-yellow-400`}),Ie.jsx("span",{className:`${s.textSize} text-gray-600`,children:e.rating.toFixed(1)})]})]}),Ie.jsxs("div",{className:`flex items-center gap-1 ${s.marginBottom}`,children:[Ie.jsx(Mf,{className:`${s.iconSize} text-gray-500`}),Ie.jsxs("span",{className:`${s.textSize} text-gray-600`,style:{fontFamily:i.fontFamily},children:["Source: ",e.source]})]}),Ie.jsxs("div",{className:`flex items-center gap-1 ${s.marginBottom}`,children:[Ie.jsx(fm,{className:`${s.iconSize} text-gray-500`}),Ie.jsx("span",{className:`${s.textSize} text-gray-600`,style:{fontFamily:i.fontFamily},children:e.equipment})]}),Ie.jsxs("div",{className:"flex items-center gap-1 mb-3",children:[Ie.jsx(yf,{className:`${s.iconSize} text-gray-500`}),Ie.jsxs("span",{className:`${s.textSize} text-gray-600`,style:{fontFamily:i.fontFamily},children:["Est. Time: ",e.estimatedTime]})]}),Ie.jsx("div",{className:"mb-3",children:Ie.jsxs("span",{className:`${s.priceSize} font-bold`,style:{fontFamily:i.fontFamily,color:i.primaryColor},children:["$",e.price.toLocaleString()]})})]})]}),Ie.jsxs(Np,{onClick:l,className:`ml-4 ${s.buttonSize} text-white font-medium hover:opacity-90 transition-opacity`,style:{backgroundColor:i.primaryColor,fontFamily:i.fontFamily},children:[Ie.jsx(Wf,{className:`${s.buttonIconSize} mr-1`}),"Call Carrier"]})]}),t&&Ie.jsx(ch.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},className:"mt-3 p-2 rounded-md",style:{backgroundColor:i.primaryColor+"10"},children:Ie.jsx("p",{className:`${s.textSize} text-center`,style:{fontFamily:i.fontFamily,color:i.primaryColor},children:"✓ Selected for bulk action"})})]})}const _y=e=>{switch(e){case"waiting":return"text-yellow-600 bg-yellow-50 border-yellow-200";case"in-progress":return"text-blue-600 bg-blue-50 border-blue-200";case"completed":return"text-green-600 bg-green-50 border-green-200";case"failed":return"text-red-600 bg-red-50 border-red-200";default:return"text-gray-600 bg-gray-50 border-gray-200"}},Ry=e=>{switch(e){case"pending":default:return"text-gray-600 bg-gray-50 border-gray-200";case"negotiating":return"text-orange-600 bg-orange-50 border-orange-200";case"agreed":return"text-green-600 bg-green-50 border-green-200";case"declined":return"text-red-600 bg-red-50 border-red-200"}};function Ky({item:e,onViewDetails:t,theme:r}){(()=>{const[e,t]=Te.useState(0),r=Te.useRef(null);Te.useEffect(()=>{const e=()=>{r.current&&t(r.current.offsetWidth)};e();const n=new ResizeObserver(e);return r.current&&n.observe(r.current),()=>n.disconnect()},[])})();const n=Math.min(e.callDuration/e.maxDuration*100,100),i=t;return Ie.jsxs(ch.div,{onClick:()=>{t&&t(e.id)},whileHover:{y:-2,scale:1.01},transition:{duration:.2},className:"rounded-2xl border border-gray-200 bg-white shadow-sm p-3 \n hover:shadow-md transition-all duration-200 "+(i?"cursor-pointer hover:border-blue-300":""),children:[Ie.jsxs("div",{className:"flex items-center justify-between mb-2",children:[Ie.jsx("h3",{className:"font-semibold text-sm text-gray-800 truncate",style:{fontFamily:r.fontFamily},children:e.carrierName}),Ie.jsx("div",{className:`flex items-center gap-1 px-2 py-0.5 rounded-full border text-xs font-medium ${_y(e.callStatus)}`,children:Ie.jsx("span",{className:"capitalize",children:e.callStatus.replace("-"," ")})})]}),Ie.jsxs("div",{className:"flex items-center justify-between mb-2 text-xs text-gray-600",children:[Ie.jsx("span",{children:e.contactInfo}),Ie.jsxs("span",{className:"font-medium text-gray-500",children:[e.callDuration,"m / ",e.maxDuration,"m"]})]}),Ie.jsx("div",{className:"w-full h-1.5 bg-gray-200 rounded-full overflow-hidden mb-2",children:Ie.jsx(ch.div,{className:"h-1.5 rounded-full",style:{backgroundColor:n>80?"#ef4444":n>60?"#f59e0b":r.primaryColor,width:`${n}%`},initial:{width:0},animate:{width:`${n}%`},transition:{duration:.6,ease:"easeOut"}})}),Ie.jsxs("div",{className:"flex items-center justify-between text-xs text-gray-500",children:[Ie.jsxs("div",{className:"flex items-center gap-1.5",children:[Ie.jsx("div",{className:`px-2 py-0.5 rounded-full border font-medium ${Ry(e.dealStatus)}`,children:e.dealStatus}),e.agreedRate&&Ie.jsxs("div",{className:"flex items-center gap-0.5 text-green-600",children:[Ie.jsx(Bf,{className:"w-3 h-3"}),Ie.jsxs("span",{className:"font-semibold",children:["$",e.agreedRate.toLocaleString()]})]})]}),Ie.jsxs("div",{className:"flex items-center gap-1.5",children:["in-progress"===e.callStatus&&Ie.jsx(ch.div,{animate:{scale:[1,1.3,1]},transition:{duration:1,repeat:1/0},className:"w-1.5 h-1.5 bg-blue-500 rounded-full"}),"agreed"===e.dealStatus&&Ie.jsx(ch.div,{initial:{scale:0},animate:{scale:1},className:"w-1.5 h-1.5 bg-green-500 rounded-full"}),Ie.jsxs("span",{className:"text-gray-400",children:["#",e.id.slice(-4)]})]})]}),e.notes&&Ie.jsx("div",{className:"mt-2 bg-gray-50 border border-gray-100 rounded-lg p-2",children:Ie.jsxs("p",{className:"text-xs text-gray-600 leading-tight",children:[Ie.jsx("span",{className:"font-medium",children:"Note:"})," ",e.notes]})})]})}function zy({searchResults:e,callQueueItems:t,searchMetadata:r,onBack:n,onCallCarrier:i,onBulkCall:a,onViewCallDetails:o,theme:s}){const[A,l]=Te.useState("results"),[c,u]=Te.useState([]),{width:d,containerRef:h}=(()=>{const[e,t]=Te.useState(0),r=Te.useRef(null);return Te.useEffect(()=>{const e=()=>{r.current&&t(r.current.offsetWidth)};e();const n=new ResizeObserver(e);return r.current&&n.observe(r.current),()=>n.disconnect()},[]),{width:e,containerRef:r}})(),p=(e=>e<380?{containerPadding:"p-2",headerPadding:"p-3",contentPadding:"p-3",spacing:"gap-2",titleSize:"text-base",subtitleSize:"text-xs",textSize:"text-xs",iconSize:"h-3 w-3",buttonSize:"text-xs px-2 py-1",buttonIconSize:"h-3 w-3",maxWidth:"max-w-none",gridCols:"grid-cols-1",metadataGrid:"grid-cols-1",tabPadding:"px-2 py-1.5",tabTextSize:"text-xs",headerLayout:"mobile"}:e<450?{containerPadding:"p-3",headerPadding:"p-4",contentPadding:"p-4",spacing:"gap-3",titleSize:"text-lg",subtitleSize:"text-xs",textSize:"text-xs",iconSize:"h-3 w-3",buttonSize:"text-xs px-2 py-1",buttonIconSize:"h-3 w-3",maxWidth:"max-w-none",gridCols:"grid-cols-1",metadataGrid:"grid-cols-1",tabPadding:"px-3 py-2",tabTextSize:"text-xs",headerLayout:"mobile"}:e<600?{containerPadding:"p-4",headerPadding:"p-5",contentPadding:"p-5",spacing:"gap-4",titleSize:"text-xl",subtitleSize:"text-sm",textSize:"text-sm",iconSize:"h-4 w-4",buttonSize:"text-sm px-3 py-1.5",buttonIconSize:"h-4 w-4",maxWidth:"max-w-4xl",gridCols:"grid-cols-1",metadataGrid:"grid-cols-2",tabPadding:"px-4 py-2.5",tabTextSize:"text-sm",headerLayout:"tablet"}:{containerPadding:"p-6",headerPadding:"p-6",contentPadding:"p-6",spacing:"gap-4",titleSize:"text-2xl",subtitleSize:"text-sm",textSize:"text-sm",iconSize:"h-4 w-4",buttonSize:"text-sm px-4 py-2",buttonIconSize:"h-4 w-4",maxWidth:"max-w-6xl",gridCols:"grid-cols-1 lg:grid-cols-2",metadataGrid:"grid-cols-2 md:grid-cols-4",tabPadding:"px-6 py-3",tabTextSize:"text-sm",headerLayout:"desktop"})(d),[f,m]=Te.useState(null),[g,y]=Te.useState([]),[v,x]=Te.useState(null),w=Te.useRef(null),b=e=>{u(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},B=async()=>{if(f)try{const e=await Vi.getQueueStatus(f);x(e.status);const t=(e=>{const t=Array.isArray(e.items)?e.items:[],r=e.currentItem||e.current_item;return t.map(e=>{const t=e.status,n="completed"===t?"completed":"dispatched"===t?"in-progress":"failed"===t?"failed":"waiting";return{id:e.callLogId||e.call_log_id||`${Date.now()}_${Math.random()}`,carrierName:e.carrierName||e.carrier_name||"Unknown Carrier",callDuration:"in-progress"===n?2:"completed"===n?3:0,maxDuration:15,callStatus:n,dealStatus:"pending",agreedRate:null,contactInfo:`${e.contactName||e.contact_name||"Contact"} • ${e.contactPhone||e.contact_phone||""}`,notes:!r||r.callLogId!==e.callLogId&&r.call_log_id!==e.call_log_id?void 0:"Currently being called"}})})(e);y(t),"completed"===e.status&&w.current&&(window.clearInterval(w.current),w.current=null)}catch(eX){gy.error("Failed to fetch queue status",{description:(null==eX?void 0:eX.message)||"Unexpected error"}),w.current&&(window.clearInterval(w.current),w.current=null)}};Te.useEffect(()=>("queue"===A&&f&&!w.current&&(w.current=window.setInterval(B,3e3),B()),"queue"!==A&&w.current&&(window.clearInterval(w.current),w.current=null),()=>{w.current&&(window.clearInterval(w.current),w.current=null)}),[A,f]);const C=c.length;return Ie.jsxs("div",{ref:h,className:`${p.maxWidth} mx-auto ${p.containerPadding}`,children:[Ie.jsxs("div",{className:"bg-white rounded-lg shadow-lg border mb-6",children:[Ie.jsx("div",{className:`${p.headerPadding} border-b`,children:"mobile"===p.headerLayout?Ie.jsxs("div",{className:"space-y-3",children:[Ie.jsxs(Np,{onClick:n,variant:"outline",size:"sm",className:`flex items-center ${p.spacing} ${p.buttonSize}`,style:{fontFamily:s.fontFamily},children:[Ie.jsx(Xp,{className:p.iconSize}),"Back to Search"]}),Ie.jsxs("div",{children:[Ie.jsx("h1",{className:`${p.titleSize} font-bold`,style:{fontFamily:s.fontFamily,color:s.primaryColor},children:"Search Results"}),Ie.jsxs("p",{className:`text-gray-600 ${p.subtitleSize}`,style:{fontFamily:s.fontFamily},children:[r.searchCriteria.origin," → ",r.searchCriteria.destination]})]}),Ie.jsxs("div",{className:`${p.textSize} text-gray-600`,style:{fontFamily:s.fontFamily},children:[Ie.jsxs("p",{children:["ID: ",r.searchId.slice(-8)]}),Ie.jsx("p",{children:r.timestamp.toLocaleString()})]})]}):Ie.jsxs("div",{className:"flex items-center justify-between",children:[Ie.jsxs("div",{className:`flex items-center ${p.spacing}`,children:[Ie.jsxs(Np,{onClick:n,variant:"outline",size:"sm",className:`flex items-center gap-2 ${p.buttonSize}`,style:{fontFamily:s.fontFamily},children:[Ie.jsx(Xp,{className:p.iconSize}),"Back to Search"]}),Ie.jsxs("div",{children:[Ie.jsx("h1",{className:`${p.titleSize} font-bold`,style:{fontFamily:s.fontFamily,color:s.primaryColor},children:"Search Results"}),Ie.jsxs("p",{className:`text-gray-600 ${p.subtitleSize}`,style:{fontFamily:s.fontFamily},children:[r.searchCriteria.origin," → ",r.searchCriteria.destination]})]})]}),Ie.jsxs("div",{className:"text-right",children:[Ie.jsxs("p",{className:`${p.textSize} text-gray-600`,style:{fontFamily:s.fontFamily},children:["Search ID: ",r.searchId.slice(-8)]}),Ie.jsx("p",{className:`${p.textSize} text-gray-600`,style:{fontFamily:s.fontFamily},children:r.timestamp.toLocaleString()})]})]})}),Ie.jsx("div",{className:"p-4 bg-gray-50",children:Ie.jsxs("div",{className:`grid ${p.metadataGrid} gap-4 ${p.textSize}`,children:[Ie.jsxs("div",{children:[Ie.jsx("span",{className:"text-gray-600",children:"Equipment:"}),Ie.jsx("span",{className:"ml-1 font-medium",children:r.searchCriteria.equipmentType})]}),Ie.jsxs("div",{children:[Ie.jsx("span",{className:"text-gray-600",children:"Weight:"}),Ie.jsxs("span",{className:"ml-1 font-medium",children:[r.searchCriteria.weight," lbs"]})]}),r.searchCriteria.volume&&Ie.jsxs("div",{children:[Ie.jsx("span",{className:"text-gray-600",children:"Volume:"}),Ie.jsxs("span",{className:"ml-1 font-medium",children:[r.searchCriteria.volume," cu ft"]})]}),Ie.jsxs("div",{children:[Ie.jsx("span",{className:"text-gray-600",children:"Pickup:"}),Ie.jsx("span",{className:"ml-1 font-medium",children:r.searchCriteria.pickupDate})]})]})})]}),Ie.jsxs("div",{className:"bg-white rounded-lg shadow-lg border",children:[Ie.jsx("div",{className:"border-b",children:Ie.jsxs("nav",{className:"flex",children:[Ie.jsxs("button",{onClick:()=>l("results"),className:`${p.tabPadding} ${p.tabTextSize} font-medium border-b-2 transition-colors ${"results"===A?"border-blue-500 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700"}`,style:{fontFamily:s.fontFamily,..."results"===A&&{borderBottomColor:s.primaryColor,color:s.primaryColor}},children:[Ie.jsx(tm,{className:`${p.iconSize} inline mr-2`}),"Results (",e.length,")"]}),Ie.jsxs("button",{onClick:()=>l("queue"),className:`${p.tabPadding} ${p.tabTextSize} font-medium border-b-2 transition-colors ${"queue"===A?"border-blue-500 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700"}`,style:{fontFamily:s.fontFamily,..."queue"===A&&{borderBottomColor:s.primaryColor,color:s.primaryColor}},children:[Ie.jsx(Wf,{className:`${p.iconSize} inline mr-2`}),"Call Queue (",t.length,")"]})]})}),Ie.jsx("div",{className:p.contentPadding,children:Ie.jsxs(hl,{mode:"wait",children:["results"===A&&Ie.jsxs(ch.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},transition:{duration:.2},children:[Ie.jsxs("div",{className:"flex items-center justify-between mb-6 "+("mobile"===p.headerLayout?"flex-col gap-3":""),children:[Ie.jsxs("div",{className:`flex items-center ${p.spacing} ${"mobile"===p.headerLayout?"w-full justify-between":""}`,children:[Ie.jsx("h3",{className:("text-lg"===p.titleSize?"text-base":"text-lg")+" font-semibold",style:{fontFamily:s.fontFamily},children:"Available Carriers"}),C>0&&Ie.jsxs("span",{className:`px-2 py-1 bg-blue-100 text-blue-800 rounded-full ${p.textSize}`,style:{fontFamily:s.fontFamily},children:[C," selected"]})]}),C>0&&Ie.jsxs(Np,{onClick:async()=>{if(0===c.length)return;const t=e.filter(e=>c.includes(e.id)),n=r.searchCriteria.origin,i=r.searchCriteria.destination,a=r.searchCriteria.volume?`${r.searchCriteria.volume} loads per month`:"Unknown volume",o=t.map(e=>{var t,r;const o="number"==typeof e.price?e.price:0,s=o?`$${(.95*o).toFixed(2)}`:"$0.00",A=o?`$${o.toFixed(2)}`:"$0.00",l=o?`$${(1.1*o).toFixed(2)}`:"$0.00",c=o?`$${(1.02*o).toFixed(2)}`:"$0.00";return{contact_phone:(null==(t=e.contactInfo)?void 0:t.phone)||"",contact_name:(null==(r=e.contactInfo)?void 0:r.contact_person)||e.name,carrier_name:e.name,route:`${n} to ${i}`,volume:a,target_rate:s,market_rate:A,max_rate:l,initiate_call:!0,source:n,destination:i,expected_price:c}});try{const e=await Vi.enqueueCallQueue(o),t=e.queueId||e.queue_id,r=e.status;t?(m(t),x(r||"pending"),gy.success("Call queue triggered",{description:`Queue ID: ${String(t).slice(-8)}`}),l("queue")):gy.error("Failed to trigger call queue",{description:"No queue ID returned"})}catch(eX){gy.error("Failed to trigger call queue",{description:(null==eX?void 0:eX.message)||"Unexpected error"})}finally{u([])}},className:`${p.buttonSize} text-white font-medium hover:opacity-90 transition-opacity ${"mobile"===p.headerLayout?"w-full":""}`,style:{backgroundColor:s.primaryColor,fontFamily:s.fontFamily},children:[Ie.jsx(ym,{className:`${p.buttonIconSize} mr-2`}),"Call Selected (",C,")"]})]}),Ie.jsx("div",{className:`grid ${p.gridCols} gap-4`,children:e.map(e=>Ie.jsx(Hy,{carrier:e,isSelected:c.includes(e.id),onSelect:b,onCallCarrier:i,theme:s},e.id))}),0===e.length&&Ie.jsxs("div",{className:"text-center py-12",children:[Ie.jsx(tm,{className:"h-12 w-12 text-gray-400 mx-auto mb-4"}),Ie.jsx("p",{className:`text-gray-600 ${p.textSize}`,style:{fontFamily:s.fontFamily},children:"No carriers found for your search criteria."})]})]},"results"),"queue"===A&&Ie.jsxs(ch.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.2},children:[Ie.jsxs("div",{className:"flex items-center justify-between mb-6 "+("mobile"===p.headerLayout?"flex-col gap-3":""),children:[Ie.jsx("h3",{className:("text-lg"===p.titleSize?"text-base":"text-lg")+" font-semibold",style:{fontFamily:s.fontFamily},children:"Call Queue"}),Ie.jsxs("div",{className:`flex items-center ${p.spacing} ${p.textSize} text-gray-600 ${"mobile"===p.headerLayout?"flex-col gap-1":""}`,children:[Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(yf,{className:p.iconSize}),Ie.jsxs("span",{children:["In Progress: ",(g.length?g:t).filter(e=>"in-progress"===e.callStatus).length]})]}),Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(ff,{className:p.iconSize}),Ie.jsxs("span",{children:["Completed: ",(g.length?g:t).filter(e=>"completed"===e.callStatus).length]})]})]})]}),Ie.jsx("div",{className:`grid ${p.gridCols} gap-4`,children:(g.length?g:t).map(e=>Ie.jsx(Ky,{item:e,onViewDetails:o,theme:s},e.id))}),0===(g.length?g:t).length&&Ie.jsxs("div",{className:"text-center py-12",children:[Ie.jsx(Wf,{className:"h-12 w-12 text-gray-400 mx-auto mb-4"}),Ie.jsx("p",{className:`text-gray-600 ${p.textSize}`,style:{fontFamily:s.fontFamily},children:"No calls in queue. Start calling carriers to see them here."})]})]},"queue")]})})]})]})}const Vy=[{id:"carrier-001",name:"Swift Transportation",source:"DAT Load Board",rating:4.8,price:2850,estimatedTime:"2-3 days",equipment:"Dry Van",isSelected:!1},{id:"carrier-002",name:"J.B. Hunt Transport",source:"Truckstop.com",rating:4.6,price:3200,estimatedTime:"1-2 days",equipment:"Refrigerated",isSelected:!1},{id:"carrier-003",name:"Schneider National",source:"123Loadboard",rating:4.7,price:2950,estimatedTime:"2-3 days",equipment:"Dry Van",isSelected:!1},{id:"carrier-004",name:"Werner Enterprises",source:"Direct Contact",rating:4.5,price:2750,estimatedTime:"3-4 days",equipment:"Flatbed",isSelected:!1},{id:"carrier-005",name:"Prime Inc.",source:"DAT Load Board",rating:4.9,price:3100,estimatedTime:"2 days",equipment:"Refrigerated",isSelected:!1}],$y=[{id:"call-001",carrierName:"Swift Transportation",callDuration:15,maxDuration:30,callStatus:"in-progress",dealStatus:"negotiating",agreedRate:null,contactInfo:"John Smith - (555) 123-4567",notes:"Discussing pickup time flexibility"},{id:"call-002",carrierName:"Prime Inc.",callDuration:25,maxDuration:30,callStatus:"completed",dealStatus:"agreed",agreedRate:3100,contactInfo:"Sarah Johnson - (555) 987-6543",notes:"Rate agreed, waiting for confirmation email"},{id:"call-003",carrierName:"Werner Enterprises",callDuration:8,maxDuration:30,callStatus:"waiting",dealStatus:"pending",agreedRate:null,contactInfo:"Mike Davis - (555) 456-7890"},{id:"call-004",carrierName:"Schneider National",callDuration:30,maxDuration:30,callStatus:"failed",dealStatus:"declined",agreedRate:null,contactInfo:"Lisa Brown - (555) 321-0987",notes:"Could not reach carrier, voicemail left"}];function Wy(){const{theme:e}=ea(),t=cg(),r=hg(),n=t.state,{data:i,isLoading:a,error:o}=Dy((null==n?void 0:n.workflowId)||""),[s,A]=Te.useState((null==n?void 0:n.searchResults)||[]),[l,c]=Te.useState((null==n?void 0:n.searchMetadata)||null),[u,d]=Te.useState($y);Te.useEffect(()=>{if(i&&(null==n?void 0:n.isFromHistory)){const e=i.carriers.map((e,t)=>({id:e.carrier_id,name:e.carrier_name,price:2500+100*t,rating:Math.min(5,Math.max(1,5*e.vetting_details.overall_score)),responseTime:"< 2 hours",equipment:e.type_of_load,location:"Available",capacity:e.fleet_size.toString(),experience:`${e.years_in_business} years`,dotNumber:e.dot_number,contactInfo:e.contact_info,matchScore:e.match_score,vettingResult:e.vetting_result,vettingDetails:e.vetting_details,rfmScore:e.rfm_score})),t={searchId:i.workflow_id,timestamp:new Date(i.created_at),searchCriteria:{origin:i.input_details.origin,destination:i.input_details.destination,pickupDate:i.input_details.pickup_date,deliveryDate:i.input_details.delivery_date,equipmentType:i.input_details.cargo_type,weight:i.input_details.weight,volume:i.input_details.volume},totalResults:i.total_carriers_found,processingTime:i.processing_time_seconds,status:i.status};A(e),c(t)}},[i,null==n?void 0:n.isFromHistory]),Te.useEffect(()=>{a||(null==n?void 0:n.workflowId)||(null==n?void 0:n.searchResults)&&(null==n?void 0:n.searchMetadata)||r("/search",{replace:!0})},[n,r,a]);const h=e=>{const t=s.find(t=>t.id===e);if(t){const e={id:"call-"+Date.now(),carrierName:t.name,callDuration:0,maxDuration:30,callStatus:"waiting",dealStatus:"pending",agreedRate:null,contactInfo:"Contact info not available",notes:`Called from search results - Rate: $${t.price}`};d(t=>[e,...t]),setTimeout(()=>{d(t=>t.map(t=>t.id===e.id?{...t,callStatus:"in-progress"}:t))},1e3)}};return a&&(null==n?void 0:n.isFromHistory)?Ie.jsxs("div",{className:"flex flex-col h-full items-center justify-center",style:{fontFamily:e.fontFamily},children:[Ie.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-500 mb-4"}),Ie.jsx("p",{className:"text-gray-600",children:"Loading workflow results..."})]}):o&&(null==n?void 0:n.isFromHistory)?Ie.jsxs("div",{className:"flex flex-col h-full items-center justify-center",style:{fontFamily:e.fontFamily},children:[Ie.jsx("div",{className:"text-red-500 mb-4",children:Ie.jsx("p",{children:"Failed to load workflow results"})}),Ie.jsx("button",{onClick:()=>r("/search"),className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600",children:"Back to Search"})]}):l?Ie.jsx("div",{className:"flex flex-col h-full",style:{fontFamily:e.fontFamily},children:Ie.jsx("div",{className:"flex-1 overflow-y-auto",children:Ie.jsx(zy,{searchResults:s,callQueueItems:u,searchMetadata:l,onBack:()=>{r(-1)},onCallCarrier:h,onBulkCall:e=>{e.forEach((e,t)=>{setTimeout(()=>h(e),500*t)})},onViewCallDetails:e=>{r(`/call-details/${e}`,{state:{callQueueItems:u,searchResults:s,searchMetadata:l}})},theme:e})})}):null}const Gy=e=>{const t=Math.floor(e/3600),r=Math.floor(e%3600/60),n=e%60;return t>0?`${t}:${r.toString().padStart(2,"0")}:${n.toString().padStart(2,"0")}`:`${r}:${n.toString().padStart(2,"0")}`},qy=e=>{switch(e){case"excellent":return"text-green-600 bg-green-100";case"good":return"text-blue-600 bg-blue-100";case"fair":return"text-yellow-600 bg-yellow-100";case"poor":return"text-red-600 bg-red-100";default:return"text-gray-600 bg-gray-100"}},Yy=e=>{switch(e){case"positive":return"text-green-600";case"negative":return"text-red-600";default:return"text-gray-600"}},Xy=e=>{switch(e){case"positive":return Ie.jsx(hm,{className:"w-4 h-4"});case"negative":return Ie.jsx(dm,{className:"w-4 h-4"});default:return Ie.jsx(Rf,{className:"w-4 h-4"})}};function Jy({callDetails:e,onBack:t,theme:r}){var n;const{width:i,containerRef:a}=(()=>{const[e,t]=Te.useState(0),r=Te.useRef(null);return Te.useEffect(()=>{const e=()=>{r.current&&t(r.current.offsetWidth)};e();const n=new ResizeObserver(e);return r.current&&n.observe(r.current),()=>n.disconnect()},[]),{width:e,containerRef:r}})(),o=(e=>e<380?{containerPadding:"p-2",headerPadding:"p-3",cardPadding:"p-3",gridCols:"grid-cols-1",textSize:{title:"text-sm",subtitle:"text-xs",body:"text-xs",caption:"text-xs"},spacing:"space-y-2",buttonSize:"px-2 py-1 text-xs",iconSize:"w-3 h-3",maxWidth:"max-w-full",headerLayout:"stacked"}:e<450?{containerPadding:"p-3",headerPadding:"p-3",cardPadding:"p-3",gridCols:"grid-cols-1",textSize:{title:"text-base",subtitle:"text-sm",body:"text-xs",caption:"text-xs"},spacing:"space-y-2",buttonSize:"px-2 py-1 text-xs",iconSize:"w-3 h-3",maxWidth:"max-w-full",tabPadding:"px-2 py-1",sectionSpacing:"space-y-2",metricGrid:"grid-cols-2",transcriptHeight:"max-h-48"}:e<600?{containerPadding:"p-3",headerPadding:"p-4",cardPadding:"p-4",gridCols:"grid-cols-1",textSize:{title:"text-lg",subtitle:"text-base",body:"text-sm",caption:"text-xs"},spacing:"space-y-3",buttonSize:"px-3 py-2 text-sm",iconSize:"w-4 h-4",maxWidth:"max-w-full",tabPadding:"px-3 py-2",sectionSpacing:"space-y-3",metricGrid:"grid-cols-2",transcriptHeight:"max-h-64"}:{containerPadding:"p-4",headerPadding:"p-5",cardPadding:"p-5",gridCols:"grid-cols-1 md:grid-cols-2",textSize:{title:"text-xl",subtitle:"text-lg",body:"text-base",caption:"text-sm"},spacing:"space-y-4",buttonSize:"px-4 py-2 text-base",iconSize:"w-5 h-5",maxWidth:"max-w-full",tabPadding:"px-4 py-2",sectionSpacing:"space-y-4",metricGrid:"grid-cols-3",transcriptHeight:"max-h-80"})(i),[s,A]=Te.useState("metadata"),[l,c]=Te.useState(new Set(["overview"])),[u,d]=Te.useState(""),[h,p]=Te.useState(!1),[f,m]=Te.useState(null),g=e=>{const t=new Set(l);t.has(e)?t.delete(e):t.add(e),c(t)},y=(null==(n=e.transcription)?void 0:n.fullTranscript.filter(e=>e.text.toLowerCase().includes(u.toLowerCase())))||[],v=async t=>{p(!0);try{await new Promise(e=>setTimeout(e,1e3));const r={callId:e.callId,timestamp:e.timestamp,duration:e.duration,participants:e.participants,..."transcript"===t&&{transcription:e.transcription}},n=new Blob([JSON.stringify(r,null,2)],{type:"application/json"}),i=URL.createObjectURL(n),a=document.createElement("a");a.href=i,a.download=`call-${e.callId}-${t}.${"pdf"===t?"pdf":"json"}`,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(i)}catch(r){m("Failed to download file")}finally{p(!1)}};return Ie.jsxs("div",{ref:a,className:`${o.maxWidth} mx-auto ${o.containerPadding}`,children:[Ie.jsxs("div",{className:"bg-white rounded-lg shadow-lg border mb-6",children:[Ie.jsx("div",{className:`${o.headerPadding} border-b`,children:Ie.jsxs("div",{className:"flex items-center justify-between",children:[Ie.jsxs("div",{className:"flex items-center space-x-4",children:[Ie.jsxs("button",{onClick:t,className:`flex items-center space-x-2 text-gray-600 hover:text-gray-800 ${o.buttonSize}`,children:[Ie.jsx(Xp,{className:o.iconSize}),Ie.jsx("span",{children:"Back"})]}),Ie.jsxs("div",{children:[Ie.jsx("h1",{className:`font-bold text-gray-900 ${o.textSize.title}`,children:"Call Details"}),Ie.jsxs("p",{className:`text-gray-600 ${o.textSize.caption}`,children:["Call ID: ",e.callId]})]})]}),Ie.jsxs("div",{className:"flex items-center space-x-2",children:[Ie.jsxs("button",{onClick:()=>v("json"),disabled:h,className:`flex items-center space-x-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50 ${o.buttonSize}`,children:[Ie.jsx(Cf,{className:o.iconSize}),Ie.jsx("span",{className:"hidden sm:inline",children:"Export"})]}),Ie.jsxs("button",{className:`flex items-center space-x-2 bg-gray-100 text-gray-700 rounded-lg hover:bg-gray-200 ${o.buttonSize}`,children:[Ie.jsx(nm,{className:o.iconSize}),Ie.jsx("span",{className:"hidden sm:inline",children:"Share"})]})]})]})}),Ie.jsx("div",{className:`${o.headerPadding} pt-0`,children:Ie.jsx("div",{className:"flex space-x-1 bg-gray-100 rounded-lg p-1",children:[{id:"metadata",label:"Overview",icon:Wf},{id:"details",label:"Technical",icon:zf},{id:"transcription",label:"Transcript",icon:kf}].map(({id:e,label:t,icon:r})=>Ie.jsxs("button",{onClick:()=>A(e),className:`flex items-center space-x-1 ${o.tabPadding} rounded-md transition-colors flex-1 justify-center ${o.textSize.body} ${s===e?"bg-white text-blue-600 shadow-sm":"text-gray-600 hover:text-gray-800"}`,children:[Ie.jsx(r,{className:o.iconSize}),Ie.jsx("span",{className:"hidden sm:inline",children:t}),Ie.jsx("span",{className:"sm:hidden",children:t.charAt(0)})]},e))})})]}),f&&Ie.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4 mb-6",children:Ie.jsxs("div",{className:"flex items-center space-x-2",children:[Ie.jsx(pf,{className:"w-5 h-5 text-red-600"}),Ie.jsx("span",{className:"text-red-800",children:f}),Ie.jsx("button",{onClick:()=>m(null),className:"ml-auto text-red-600 hover:text-red-800",children:Ie.jsx(mf,{className:"w-4 h-4"})})]})}),Ie.jsxs(ch.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:o.spacing,children:["metadata"===s&&Ie.jsx(Zy,{callDetails:e,config:o,expandedSections:l,toggleSection:g}),"details"===s&&Ie.jsx(ev,{callDetails:e,config:o,expandedSections:l,toggleSection:g}),"transcription"===s&&Ie.jsx(tv,{callDetails:e,config:o,searchTerm:u,setSearchTerm:d,filteredTranscript:y,onDownload:v,isLoading:h})]},s)]})}function Zy({callDetails:e,config:t,expandedSections:r,toggleSection:n}){return Ie.jsxs("div",{className:t.spacing,children:[Ie.jsxs("div",{className:"bg-white rounded-lg shadow-lg border",children:[Ie.jsxs("button",{onClick:()=>n("overview"),className:`w-full ${t.cardPadding} flex items-center justify-between text-left`,children:[Ie.jsx("h2",{className:`font-semibold text-gray-900 ${t.textSize.subtitle}`,children:"Call Overview"}),r.has("overview")?Ie.jsx(hf,{className:t.iconSize}):Ie.jsx(cf,{className:t.iconSize})]}),r.has("overview")&&Ie.jsxs("div",{className:`${t.cardPadding} pt-0 border-t`,children:[Ie.jsxs("div",{className:`grid ${t.gridCols} gap-4`,children:[Ie.jsxs("div",{className:"flex items-center space-x-3",children:[Ie.jsx(yf,{className:`${t.iconSize} text-blue-600`}),Ie.jsxs("div",{children:[Ie.jsx("p",{className:`font-medium text-gray-900 ${t.textSize.body}`,children:"Duration"}),Ie.jsx("p",{className:`text-gray-600 ${t.textSize.caption}`,children:Gy(e.duration)})]})]}),Ie.jsxs("div",{className:"flex items-center space-x-3",children:[Ie.jsx(Wf,{className:`${t.iconSize} text-green-600`}),Ie.jsxs("div",{children:[Ie.jsx("p",{className:`font-medium text-gray-900 ${t.textSize.body}`,children:"Direction"}),Ie.jsx("p",{className:`text-gray-600 ${t.textSize.caption} capitalize`,children:e.direction})]})]}),Ie.jsxs("div",{className:"flex items-center space-x-3",children:[Ie.jsx("div",{className:"w-3 h-3 rounded-full "+("completed"===e.status?"bg-green-500":"failed"===e.status?"bg-red-500":"in-progress"===e.status?"bg-blue-500":"bg-yellow-500")}),Ie.jsxs("div",{children:[Ie.jsx("p",{className:`font-medium text-gray-900 ${t.textSize.body}`,children:"Status"}),Ie.jsx("p",{className:`text-gray-600 ${t.textSize.caption} capitalize`,children:e.status.replace("-"," ")})]})]})]}),Ie.jsxs("div",{className:"mt-4 p-4 bg-gray-50 rounded-lg",children:[Ie.jsxs("p",{className:`text-gray-600 ${t.textSize.caption}`,children:["Started: ",e.timestamp.toLocaleString()]}),e.result.outcome&&Ie.jsxs("p",{className:`text-gray-600 ${t.textSize.caption} mt-1`,children:["Outcome: ",Ie.jsx("span",{className:"capitalize",children:e.result.outcome})]})]})]})]}),Ie.jsxs("div",{className:"bg-white rounded-lg shadow-lg border",children:[Ie.jsxs("button",{onClick:()=>n("participants"),className:`w-full ${t.cardPadding} flex items-center justify-between text-left`,children:[Ie.jsxs("h2",{className:`font-semibold text-gray-900 ${t.textSize.subtitle}`,children:["Participants (",e.participants.length,")"]}),r.has("participants")?Ie.jsx(hf,{className:t.iconSize}):Ie.jsx(cf,{className:t.iconSize})]}),r.has("participants")&&Ie.jsx("div",{className:`${t.cardPadding} pt-0 border-t space-y-3`,children:e.participants.map(e=>Ie.jsxs("div",{className:"flex items-center space-x-3 p-3 bg-gray-50 rounded-lg",children:[Ie.jsx(ym,{className:`${t.iconSize} text-blue-600`}),Ie.jsxs("div",{className:"flex-1",children:[Ie.jsx("p",{className:`font-medium text-gray-900 ${t.textSize.body}`,children:e.name}),Ie.jsxs("p",{className:`text-gray-600 ${t.textSize.caption}`,children:[e.role," • ",e.company||"Unknown Company"]}),e.phoneNumber&&Ie.jsx("p",{className:`text-gray-500 ${t.textSize.caption}`,children:e.phoneNumber})]}),Ie.jsx("div",{className:"px-2 py-1 rounded-full text-xs "+("caller"===e.role?"bg-blue-100 text-blue-800":"receiver"===e.role?"bg-green-100 text-green-800":"bg-purple-100 text-purple-800"),children:e.role})]},e.id))})]}),Ie.jsx("div",{className:"bg-white rounded-lg shadow-lg border",children:Ie.jsxs("div",{className:`${t.cardPadding}`,children:[Ie.jsx("h2",{className:`font-semibold text-gray-900 ${t.textSize.subtitle} mb-4`,children:"Call Quality"}),Ie.jsxs("div",{className:"flex items-center space-x-4 mb-4",children:[Ie.jsx("div",{className:"flex items-center space-x-2",children:[1,2,3,4,5].map(t=>Ie.jsx(Am,{className:"w-5 h-5 "+(t<=e.quality.overallScore?"text-yellow-400 fill-current":"text-gray-300")},t))}),Ie.jsxs("span",{className:`font-medium ${t.textSize.body}`,children:[e.quality.overallScore,"/5"]}),Ie.jsx("span",{className:`px-3 py-1 rounded-full text-xs font-medium ${qy(e.quality.audioQuality)}`,children:e.quality.audioQuality})]}),Ie.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[Ie.jsxs("div",{children:[Ie.jsx("p",{className:`text-gray-600 ${t.textSize.caption}`,children:"Signal Strength"}),Ie.jsxs("div",{className:"flex items-center space-x-2",children:[Ie.jsx("div",{className:"flex-1 bg-gray-200 rounded-full h-2",children:Ie.jsx("div",{className:"bg-green-500 h-2 rounded-full",style:{width:`${e.quality.signalStrength}%`}})}),Ie.jsxs("span",{className:`${t.textSize.caption} font-medium`,children:[e.quality.signalStrength,"%"]})]})]}),Ie.jsxs("div",{children:[Ie.jsx("p",{className:`text-gray-600 ${t.textSize.caption}`,children:"Latency"}),Ie.jsxs("p",{className:`font-medium ${t.textSize.body}`,children:[e.quality.latency,"ms"]})]})]})]})})]})}function ev({callDetails:e,config:t,expandedSections:r,toggleSection:n}){return Ie.jsxs("div",{className:t.spacing,children:[Ie.jsxs("div",{className:"bg-white rounded-lg shadow-lg border",children:[Ie.jsxs("button",{onClick:()=>n("network"),className:`w-full ${t.cardPadding} flex items-center justify-between text-left`,children:[Ie.jsx("h2",{className:`font-semibold text-gray-900 ${t.textSize.subtitle}`,children:"Network Information"}),r.has("network")?Ie.jsx(hf,{className:t.iconSize}):Ie.jsx(cf,{className:t.iconSize})]}),r.has("network")&&Ie.jsx("div",{className:`${t.cardPadding} pt-0 border-t`,children:Ie.jsxs("div",{className:`grid ${t.gridCols} gap-4`,children:[Ie.jsxs("div",{className:"flex items-center space-x-3",children:[Ie.jsx(wm,{className:`${t.iconSize} text-blue-600`}),Ie.jsxs("div",{children:[Ie.jsx("p",{className:`font-medium text-gray-900 ${t.textSize.body}`,children:"Connection"}),Ie.jsx("p",{className:`text-gray-600 ${t.textSize.caption} capitalize`,children:e.network.connectionType})]})]}),Ie.jsxs("div",{className:"flex items-center space-x-3",children:[Ie.jsx(om,{className:`${t.iconSize} text-green-600`}),Ie.jsxs("div",{children:[Ie.jsx("p",{className:`font-medium text-gray-900 ${t.textSize.body}`,children:"Bandwidth"}),Ie.jsxs("p",{className:`text-gray-600 ${t.textSize.caption}`,children:[e.network.bandwidth," kbps"]})]})]}),Ie.jsxs("div",{className:"col-span-full",children:[Ie.jsx("p",{className:`font-medium text-gray-900 ${t.textSize.body} mb-2`,children:"Location"}),Ie.jsxs("p",{className:`text-gray-600 ${t.textSize.caption}`,children:[e.network.location.city,", ",e.network.location.state,", ",e.network.location.country]}),Ie.jsxs("p",{className:`text-gray-500 ${t.textSize.caption} mt-1`,children:["IP: ",e.network.ipAddress," • Provider: ",e.network.provider]})]})]})})]}),Ie.jsxs("div",{className:"bg-white rounded-lg shadow-lg border",children:[Ie.jsxs("button",{onClick:()=>n("device"),className:`w-full ${t.cardPadding} flex items-center justify-between text-left`,children:[Ie.jsx("h2",{className:`font-semibold text-gray-900 ${t.textSize.subtitle}`,children:"Device Information"}),r.has("device")?Ie.jsx(hf,{className:t.iconSize}):Ie.jsx(cf,{className:t.iconSize})]}),r.has("device")&&Ie.jsx("div",{className:`${t.cardPadding} pt-0 border-t`,children:Ie.jsxs("div",{className:`grid ${t.gridCols} gap-4`,children:[Ie.jsxs("div",{className:"flex items-center space-x-3",children:[Ie.jsx(zf,{className:`${t.iconSize} text-blue-600`}),Ie.jsxs("div",{children:[Ie.jsx("p",{className:`font-medium text-gray-900 ${t.textSize.body}`,children:"Browser"}),Ie.jsxs("p",{className:`text-gray-600 ${t.textSize.caption}`,children:[e.device.browser," ",e.device.browserVersion]})]})]}),Ie.jsxs("div",{className:"flex items-center space-x-3",children:[Ie.jsx("div",{className:`${t.iconSize} bg-gray-200 rounded flex items-center justify-center`,children:Ie.jsx("span",{className:"text-xs font-bold",children:"OS"})}),Ie.jsxs("div",{children:[Ie.jsx("p",{className:`font-medium text-gray-900 ${t.textSize.body}`,children:"Operating System"}),Ie.jsxs("p",{className:`text-gray-600 ${t.textSize.caption}`,children:[e.device.operatingSystem," ",e.device.osVersion]})]})]}),Ie.jsxs("div",{className:"flex items-center space-x-3",children:[Ie.jsx(jf,{className:`${t.iconSize} text-green-600`}),Ie.jsxs("div",{children:[Ie.jsx("p",{className:`font-medium text-gray-900 ${t.textSize.body}`,children:"Audio Devices"}),Ie.jsxs("p",{className:`text-gray-600 ${t.textSize.caption}`,children:["Mic: ",e.device.microphone]}),Ie.jsxs("p",{className:`text-gray-600 ${t.textSize.caption}`,children:["Speaker: ",e.device.speaker]})]})]})]})})]}),Ie.jsx("div",{className:"bg-white rounded-lg shadow-lg border",children:Ie.jsxs("div",{className:`${t.cardPadding}`,children:[Ie.jsx("h2",{className:`font-semibold text-gray-900 ${t.textSize.subtitle} mb-4`,children:"Codec & Technical Parameters"}),Ie.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[Ie.jsxs("div",{children:[Ie.jsx("p",{className:`text-gray-600 ${t.textSize.caption}`,children:"Audio Codec"}),Ie.jsx("p",{className:`font-medium ${t.textSize.body}`,children:e.codec.audioCodec})]}),Ie.jsxs("div",{children:[Ie.jsx("p",{className:`text-gray-600 ${t.textSize.caption}`,children:"Bitrate"}),Ie.jsxs("p",{className:`font-medium ${t.textSize.body}`,children:[e.codec.bitrate," kbps"]})]}),Ie.jsxs("div",{children:[Ie.jsx("p",{className:`text-gray-600 ${t.textSize.caption}`,children:"Sample Rate"}),Ie.jsxs("p",{className:`font-medium ${t.textSize.body}`,children:[e.codec.sampleRate," Hz"]})]}),Ie.jsxs("div",{children:[Ie.jsx("p",{className:`text-gray-600 ${t.textSize.caption}`,children:"Channels"}),Ie.jsx("p",{className:`font-medium ${t.textSize.body}`,children:e.codec.channels})]})]}),Ie.jsxs("div",{className:"p-4 bg-gray-50 rounded-lg",children:[Ie.jsx("h3",{className:`font-medium text-gray-900 ${t.textSize.body} mb-2`,children:"Performance Metrics"}),Ie.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[Ie.jsxs("div",{children:[Ie.jsx("p",{className:"text-gray-600",children:"RTP Packets Sent"}),Ie.jsx("p",{className:"font-medium",children:e.technicalParams.rtpPackets.sent.toLocaleString()})]}),Ie.jsxs("div",{children:[Ie.jsx("p",{className:"text-gray-600",children:"RTP Packets Lost"}),Ie.jsx("p",{className:"font-medium",children:e.technicalParams.rtpPackets.lost.toLocaleString()})]}),Ie.jsxs("div",{children:[Ie.jsx("p",{className:"text-gray-600",children:"CPU Usage"}),Ie.jsxs("p",{className:"font-medium",children:[e.technicalParams.cpu.usage,"%"]})]}),Ie.jsxs("div",{children:[Ie.jsx("p",{className:"text-gray-600",children:"Memory Used"}),Ie.jsxs("p",{className:"font-medium",children:[e.technicalParams.memory.used," MB"]})]})]})]})]})})]})}function tv({callDetails:e,config:t,searchTerm:r,setSearchTerm:n,filteredTranscript:i,onDownload:a,isLoading:o}){return e.transcription?Ie.jsxs("div",{className:t.spacing,children:[Ie.jsx("div",{className:"bg-white rounded-lg shadow-lg border",children:Ie.jsxs("div",{className:`${t.cardPadding}`,children:[Ie.jsxs("div",{className:"flex items-center justify-between mb-4",children:[Ie.jsx("h2",{className:`font-semibold text-gray-900 ${t.textSize.subtitle}`,children:"Call Transcription"}),Ie.jsxs("button",{onClick:()=>a("transcript"),disabled:o,className:`flex items-center space-x-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50 ${t.buttonSize}`,children:[Ie.jsx(Cf,{className:t.iconSize}),Ie.jsx("span",{children:"Download"})]})]}),Ie.jsxs("div",{className:"relative mb-4",children:[Ie.jsx(tm,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 w-4 h-4"}),Ie.jsx("input",{type:"text",placeholder:"Search transcript...",value:r,onChange:e=>n(e.target.value),className:`w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent ${t.textSize.body}`})]}),Ie.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-4",children:[Ie.jsxs("div",{className:"text-center p-3 bg-gray-50 rounded-lg",children:[Ie.jsxs("p",{className:`font-medium text-gray-900 ${t.textSize.body}`,children:[e.transcription.confidence,"%"]}),Ie.jsx("p",{className:`text-gray-600 ${t.textSize.caption}`,children:"Confidence"})]}),Ie.jsxs("div",{className:"text-center p-3 bg-gray-50 rounded-lg",children:[Ie.jsx("p",{className:`font-medium text-gray-900 ${t.textSize.body}`,children:e.transcription.speakers.length}),Ie.jsx("p",{className:`text-gray-600 ${t.textSize.caption}`,children:"Speakers"})]}),Ie.jsxs("div",{className:"text-center p-3 bg-gray-50 rounded-lg",children:[Ie.jsx("p",{className:`font-medium text-gray-900 ${t.textSize.body}`,children:e.transcription.fullTranscript.length}),Ie.jsx("p",{className:`text-gray-600 ${t.textSize.caption}`,children:"Segments"})]}),Ie.jsxs("div",{className:"text-center p-3 bg-gray-50 rounded-lg",children:[Ie.jsx("p",{className:`font-medium text-gray-900 ${t.textSize.body} capitalize`,children:e.transcription.language}),Ie.jsx("p",{className:`text-gray-600 ${t.textSize.caption}`,children:"Language"})]})]})]})}),Ie.jsx("div",{className:"bg-white rounded-lg shadow-lg border",children:Ie.jsxs("div",{className:`${t.cardPadding}`,children:[Ie.jsx("h3",{className:`font-semibold text-gray-900 ${t.textSize.subtitle} mb-4`,children:"Sentiment Analysis"}),Ie.jsxs("div",{className:"flex items-center space-x-4 mb-4",children:[Ie.jsxs("div",{className:`flex items-center space-x-2 ${Yy(e.transcription.sentimentAnalysis.overall)}`,children:[Xy(e.transcription.sentimentAnalysis.overall),Ie.jsx("span",{className:`font-medium capitalize ${t.textSize.body}`,children:e.transcription.sentimentAnalysis.overall})]}),Ie.jsxs("div",{className:"px-3 py-1 rounded-full text-xs font-medium "+(e.transcription.sentimentAnalysis.score>.3?"bg-green-100 text-green-800":e.transcription.sentimentAnalysis.score<-.3?"bg-red-100 text-red-800":"bg-gray-100 text-gray-800"),children:["Score: ",e.transcription.sentimentAnalysis.score.toFixed(2)]})]}),Ie.jsx("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-2",children:Object.entries(e.transcription.sentimentAnalysis.emotions).map(([e,r])=>Ie.jsxs("div",{className:"text-center",children:[Ie.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2 mb-1",children:Ie.jsx("div",{className:"bg-blue-500 h-2 rounded-full",style:{width:100*r+"%"}})}),Ie.jsx("p",{className:`text-gray-600 ${t.textSize.caption} capitalize`,children:e})]},e))})]})}),Ie.jsx("div",{className:"bg-white rounded-lg shadow-lg border",children:Ie.jsxs("div",{className:`${t.cardPadding}`,children:[Ie.jsx("h3",{className:`font-semibold text-gray-900 ${t.textSize.subtitle} mb-4`,children:"Key Phrases"}),Ie.jsx("div",{className:"flex flex-wrap gap-2",children:e.transcription.keyPhrases.slice(0,10).map((e,t)=>Ie.jsxs("span",{className:"px-3 py-1 rounded-full text-xs font-medium "+(e.importance>7?"bg-red-100 text-red-800":e.importance>5?"bg-yellow-100 text-yellow-800":"bg-blue-100 text-blue-800"),children:[e.phrase," (",e.frequency,")"]},t))})]})}),Ie.jsx("div",{className:"bg-white rounded-lg shadow-lg border",children:Ie.jsxs("div",{className:`${t.cardPadding}`,children:[Ie.jsx("h3",{className:`font-semibold text-gray-900 ${t.textSize.subtitle} mb-4`,children:"Full Transcript"}),Ie.jsx("div",{className:"space-y-3 max-h-96 overflow-y-auto",children:(r?i:e.transcription.fullTranscript).map(n=>{const i=e.transcription.speakers.find(e=>e.id===n.speakerId);return Ie.jsxs("div",{className:"flex space-x-3 p-3 hover:bg-gray-50 rounded-lg",children:[Ie.jsx("div",{className:"flex-shrink-0",children:Ie.jsx("div",{className:"w-8 h-8 bg-blue-100 rounded-full flex items-center justify-center",children:Ie.jsx("span",{className:"text-xs font-medium text-blue-800",children:(null==i?void 0:i.name.charAt(0))||"U"})})}),Ie.jsxs("div",{className:"flex-1",children:[Ie.jsxs("div",{className:"flex items-center space-x-2 mb-1",children:[Ie.jsx("span",{className:`font-medium text-gray-900 ${t.textSize.body}`,children:(null==i?void 0:i.name)||"Unknown"}),Ie.jsx("span",{className:`text-gray-500 ${t.textSize.caption}`,children:(a=n.timestamp,`${Math.floor(a/60)}:${Math.floor(a%60).toString().padStart(2,"0")}`)}),n.sentiment&&Ie.jsx("span",{className:`${Yy(n.sentiment)} ${t.textSize.caption}`,children:Xy(n.sentiment)})]}),Ie.jsx("p",{className:`text-gray-700 ${t.textSize.body}`,children:r?n.text.split(new RegExp(`(${r})`,"gi")).map((e,t)=>e.toLowerCase()===r.toLowerCase()?Ie.jsx("mark",{className:"bg-yellow-200",children:e},t):e):n.text}),Ie.jsx("div",{className:"flex items-center space-x-2 mt-1",children:Ie.jsxs("span",{className:`text-gray-500 ${t.textSize.caption}`,children:["Confidence: ",n.confidence,"%"]})})]})]},n.id);var a})}),r&&0===i.length&&Ie.jsxs("div",{className:"text-center py-8",children:[Ie.jsx(tm,{className:"w-8 h-8 text-gray-400 mx-auto mb-2"}),Ie.jsxs("p",{className:`text-gray-600 ${t.textSize.body}`,children:['No results found for "',r,'"']})]})]})})]}):Ie.jsxs("div",{className:"bg-white rounded-lg shadow-lg border p-8 text-center",children:[Ie.jsx(kf,{className:"w-12 h-12 text-gray-400 mx-auto mb-4"}),Ie.jsx("h3",{className:`font-medium text-gray-900 ${t.textSize.subtitle} mb-2`,children:"No Transcription Available"}),Ie.jsx("p",{className:`text-gray-600 ${t.textSize.body}`,children:"Transcription is not available for this call."})]})}const rv=(e,t)=>{const r=Math.floor(1800*Math.random())+300,n=new Date(Date.now()-864e5*Math.random()),i=[{id:"participant-1",name:"John Smith",role:"caller",phoneNumber:"+1 (555) 123-4567",email:"john.smith@logistics.com",company:"Logistics Solutions Inc.",joinTime:n,leaveTime:new Date(n.getTime()+1e3*r)},{id:"participant-2",name:t.split(" ")[0]+" Representative",role:"receiver",phoneNumber:"+1 (555) 987-6543",email:`contact@${t.toLowerCase().replace(/\s+/g,"")}.com`,company:t,joinTime:new Date(n.getTime()+15e3),leaveTime:new Date(n.getTime()+1e3*r)}],a={overallScore:Math.floor(2*Math.random())+4,signalStrength:Math.floor(20*Math.random())+80,latency:Math.floor(50*Math.random())+20,jitter:Math.floor(10*Math.random())+2,packetLoss:2*Math.random(),audioQuality:["excellent","good","fair"][Math.floor(3*Math.random())],connectionStability:["stable","unstable"][Math.floor(2*Math.random())]},o={ipAddress:`192.168.${Math.floor(255*Math.random())}.${Math.floor(255*Math.random())}`,connectionType:["wifi","ethernet","cellular"][Math.floor(3*Math.random())],bandwidth:Math.floor(500*Math.random())+100,provider:["Verizon","AT&T","Comcast","Spectrum"][Math.floor(4*Math.random())],location:{city:["New York","Los Angeles","Chicago","Houston","Phoenix"][Math.floor(5*Math.random())],state:["NY","CA","IL","TX","AZ"][Math.floor(5*Math.random())],country:"United States"}},s={browser:["Chrome","Firefox","Safari","Edge"][Math.floor(4*Math.random())],browserVersion:`${Math.floor(20*Math.random())+90}.0.${Math.floor(10*Math.random())}.${Math.floor(100*Math.random())}`,operatingSystem:["Windows","macOS","Linux"][Math.floor(3*Math.random())],osVersion:["11","10.15","20.04"][Math.floor(3*Math.random())],microphone:["Built-in Microphone","USB Headset","Bluetooth Headset"][Math.floor(3*Math.random())],speaker:["Built-in Speakers","USB Headset","Bluetooth Headset"][Math.floor(3*Math.random())],camera:Math.random()>.5?"Built-in Camera":void 0,deviceType:["desktop","mobile","tablet"][Math.floor(3*Math.random())]},A={audioCodec:["Opus","G.722","G.711"][Math.floor(3*Math.random())],bitrate:Math.floor(64*Math.random())+32,sampleRate:[8e3,16e3,48e3][Math.floor(3*Math.random())],channels:Math.random()>.5?2:1,compression:["Lossless","Lossy"][Math.floor(2*Math.random())]},l={rtpPackets:{sent:Math.floor(1e4*Math.random())+5e3,received:Math.floor(1e4*Math.random())+5e3,lost:Math.floor(100*Math.random())+10},bandwidth:{upload:Math.floor(100*Math.random())+50,download:Math.floor(200*Math.random())+100},cpu:{usage:Math.floor(30*Math.random())+10,temperature:Math.floor(20*Math.random())+45},memory:{used:Math.floor(2048*Math.random())+512,available:Math.floor(4096*Math.random())+2048}},c={id:`transcript-${e}`,fullTranscript:[{id:"segment-1",speakerId:"participant-1",text:`Hello, this is John from Logistics Solutions. I'm calling about a shipment from ${["Chicago","New York","Los Angeles"][Math.floor(3*Math.random())]} to ${["Miami","Seattle","Denver"][Math.floor(3*Math.random())]}.`,timestamp:5,duration:8,confidence:95,sentiment:"neutral"},{id:"segment-2",speakerId:"participant-2",text:`Hi John, thanks for calling ${t}. I'd be happy to help you with that shipment. Can you tell me more about the cargo details?`,timestamp:15,duration:6,confidence:92,sentiment:"positive"},{id:"segment-3",speakerId:"participant-1",text:`Sure! We have ${Math.floor(20*Math.random())+5} pallets of ${["electronics","automotive parts","consumer goods","machinery"][Math.floor(4*Math.random())]}, total weight around ${Math.floor(3e4*Math.random())+1e4} pounds. We need it delivered by ${new Date(Date.now()+6048e5*Math.random()).toLocaleDateString()}.`,timestamp:23,duration:12,confidence:88,sentiment:"neutral"},{id:"segment-4",speakerId:"participant-2",text:`That sounds manageable. For that route and timeline, we can offer a rate of $${(2e3*Math.random()+1500).toFixed(2)} for the full load. Does that work within your budget?`,timestamp:38,duration:9,confidence:94,sentiment:"positive"},{id:"segment-5",speakerId:"participant-1",text:`That's a bit higher than we were hoping for. Our budget is closer to $${(1500*Math.random()+1200).toFixed(2)}. Is there any flexibility on the pricing?`,timestamp:50,duration:8,confidence:90,sentiment:"negative"},{id:"segment-6",speakerId:"participant-2",text:`I understand your budget constraints. Let me check with my manager... Okay, I can do $${(1800*Math.random()+1400).toFixed(2)} as our best offer. That includes full insurance coverage.`,timestamp:62,duration:11,confidence:87,sentiment:"neutral"},{id:"segment-7",speakerId:"participant-1",text:"That works better for us. Let's move forward with that rate. What's the next step to book this shipment?",timestamp:76,duration:7,confidence:93,sentiment:"positive"},{id:"segment-8",speakerId:"participant-2",text:`Excellent! I'll send you a booking confirmation within the next hour. You'll receive pickup instructions and our driver's contact information. Thank you for choosing ${t}!`,timestamp:85,duration:10,confidence:96,sentiment:"positive"}],speakers:[{id:"participant-1",name:"John Smith",voiceProfile:{pitch:120,tone:"professional",accent:"American Midwest"},speakingTime:Math.floor(.45*r),wordCount:245},{id:"participant-2",name:t.split(" ")[0]+" Representative",voiceProfile:{pitch:140,tone:"friendly",accent:"American South"},speakingTime:Math.floor(.55*r),wordCount:198}],sentimentAnalysis:{overall:"positive",score:.65,emotions:{joy:.3,anger:.1,fear:.05,sadness:.02,surprise:.15},trends:[{timestamp:0,sentiment:"neutral",score:0},{timestamp:20,sentiment:"positive",score:.3},{timestamp:50,sentiment:"negative",score:-.2},{timestamp:70,sentiment:"positive",score:.6},{timestamp:90,sentiment:"positive",score:.8}]},keyPhrases:[{phrase:"shipment",frequency:8,importance:9,category:"business",timestamps:[5,15,23,76]},{phrase:"rate",frequency:6,importance:8,category:"business",timestamps:[38,50,62]},{phrase:"budget",frequency:4,importance:7,category:"business",timestamps:[50,62]},{phrase:"insurance",frequency:2,importance:6,category:"business",timestamps:[62]},{phrase:"delivery",frequency:3,importance:7,category:"business",timestamps:[23,76]},{phrase:"pallets",frequency:2,importance:5,category:"technical",timestamps:[23]},{phrase:"thank you",frequency:2,importance:4,category:"emotional",timestamps:[15,85]}],summary:`Successful negotiation call between John Smith from Logistics Solutions and ${t} representative. Discussed shipment details, negotiated pricing from initial quote to agreed rate, and finalized booking. Call resulted in confirmed shipment booking with insurance coverage.`,confidence:91,language:"English"},u={recordingUrl:`https://recordings.example.com/calls/${e}.mp3`,recordingSize:Math.floor(5e7*Math.random())+1e7,callCost:5*Math.random()+2,region:"US-East",serverLocation:"Virginia, USA",encryption:!0,compliance:{gdpr:!0,hipaa:!1,sox:!0}},d={outcome:Math.random()>.2?"successful":"failed",reason:Math.random()>.2?"Agreement reached on pricing and terms":"Unable to meet budget requirements",followUpRequired:Math.random()>.7,nextAction:Math.random()>.7?"Send booking confirmation":void 0,dealValue:3e3*Math.random()+1e3,agreementReached:Math.random()>.2};return{id:`call-details-${e}`,callId:e,timestamp:n,duration:r,participants:i,direction:Math.random()>.5?"outbound":"inbound",status:"completed",result:d,quality:a,network:o,device:s,codec:A,technicalParams:l,transcription:c,metadata:u}};function nv(){const{theme:e}=ea(),{callId:t}=pg(),r=cg(),n=hg(),i=r.state,[a,o]=Te.useState(null);Te.useEffect(()=>{var e;if(!t)return void n("/search",{replace:!0});const r=null==(e=null==i?void 0:i.callQueueItems)?void 0:e.find(e=>e.id===t);if(r){const e=rv(t,r.carrierName);o(e)}else{const e=rv(t,"Unknown Carrier");o(e)}},[t,i,n]);return a?Ie.jsx("div",{className:"flex flex-col h-full",style:{fontFamily:e.fontFamily},children:Ie.jsx("div",{className:"flex-1 overflow-y-auto",children:Ie.jsx(Jy,{callDetails:a,onBack:()=>{(null==i?void 0:i.fromCallLogs)?n("/call-logs"):(null==i?void 0:i.searchResults)&&(null==i?void 0:i.searchMetadata)?n("/results",{state:i}):n("/search")},theme:e})})}):Ie.jsx("div",{className:"flex-1 flex items-center justify-center p-8",children:Ie.jsx("div",{className:"text-center",children:Ie.jsx("p",{className:"text-gray-600",style:{fontFamily:e.fontFamily},children:"Loading call details..."})})})}rv("call-1","Swift Transport"),rv("call-2","Reliable Freight"),rv("call-3","Express Logistics");const iv=({isOpen:e,onClose:t,onConfirm:r,title:n,message:i,confirmText:a="Confirm",cancelText:o="Cancel",isLoading:s=!1,variant:A="danger",containedMode:l=!1})=>{if(!e)return null;const c=(()=>{switch(A){case"danger":default:return{icon:"text-red-500",confirmButton:"bg-red-600 hover:bg-red-700 focus:ring-red-500",iconBg:"bg-red-100"};case"warning":return{icon:"text-yellow-500",confirmButton:"bg-yellow-600 hover:bg-yellow-700 focus:ring-yellow-500",iconBg:"bg-yellow-100"};case"info":return{icon:"text-blue-500",confirmButton:"bg-blue-600 hover:bg-blue-700 focus:ring-blue-500",iconBg:"bg-blue-100"}}})(),u=l?"absolute inset-0 z-50 overflow-y-auto":"fixed inset-0 z-50 overflow-y-auto",d=l?"absolute inset-0 bg-black bg-opacity-50 transition-opacity":"fixed inset-0 bg-black bg-opacity-50 transition-opacity";return Ie.jsxs("div",{className:u,children:[Ie.jsx("div",{className:d,onClick:t}),Ie.jsx("div",{className:"flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0",children:Ie.jsxs("div",{className:"relative transform overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg",children:[Ie.jsx("div",{className:"bg-white px-4 pb-4 pt-5 sm:p-6 sm:pb-4",children:Ie.jsxs("div",{className:"sm:flex sm:items-start",children:[Ie.jsx("div",{className:`mx-auto flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-full ${c.iconBg} sm:mx-0 sm:h-10 sm:w-10`,children:Ie.jsx(pm,{className:`h-6 w-6 ${c.icon}`})}),Ie.jsxs("div",{className:"mt-3 text-center sm:ml-4 sm:mt-0 sm:text-left flex-1",children:[Ie.jsxs("div",{className:"flex items-center justify-between",children:[Ie.jsx("h3",{className:"text-base font-semibold leading-6 text-gray-900",children:n}),Ie.jsxs("button",{type:"button",className:"rounded-md bg-white text-gray-400 hover:text-gray-600 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",onClick:t,children:[Ie.jsx("span",{className:"sr-only",children:"Close"}),Ie.jsx(bm,{className:"h-6 w-6"})]})]}),Ie.jsx("div",{className:"mt-2",children:Ie.jsx("p",{className:"text-sm text-gray-500",children:i})})]})]})}),Ie.jsxs("div",{className:"bg-gray-50 px-4 py-3 sm:flex sm:flex-row-reverse sm:px-6",children:[Ie.jsx("button",{type:"button",className:`inline-flex w-full justify-center rounded-md px-3 py-2 text-sm font-semibold text-white shadow-sm sm:ml-3 sm:w-auto ${c.confirmButton} focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed`,onClick:r,disabled:s,children:s?Ie.jsxs(Ie.Fragment,{children:[Ie.jsxs("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[Ie.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),Ie.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Processing..."]}):a}),Ie.jsx("button",{type:"button",className:"mt-3 inline-flex w-full justify-center rounded-md bg-white px-3 py-2 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 sm:mt-0 sm:w-auto",onClick:t,disabled:s,children:o})]})]})})]})};function av({fetchData:e,pageSize:t=10,initialData:r=[],enabled:n=!0,dependencies:i=[]}){const[a,o]=Te.useState(r),[s,A]=Te.useState(!1),[l,c]=Te.useState(null),[u,d]=Te.useState(!0),[h,p]=Te.useState(0),[f,m]=Te.useState(0),g=Te.useRef(!1),y=Te.useCallback(async()=>{if(n&&!s&&u&&!g.current){g.current=!0,A(!0),c(null);try{const r=h+1,n=await e(r,t);o(e=>[...e,...n.data]),d(n.hasMore),p(r),void 0!==n.total&&m(n.total)}catch(r){c(r instanceof Error?r.message:"Failed to load data")}finally{A(!1),g.current=!1}}},[n,u,h,e,t]),v=Te.useCallback(async()=>{if(n){o([]),p(0),d(!0),c(null),m(0),g.current=!1,A(!0);try{const r=await e(1,t);o(r.data),d(r.hasMore),p(1),void 0!==r.total&&m(r.total)}catch(r){c(r instanceof Error?r.message:"Failed to load data")}finally{A(!1)}}},[n,e,t]);return Te.useEffect(()=>{i.length>0&&v()},i),Te.useEffect(()=>{n&&0===a.length&&0===h&&!s&&y()},[n,a.length,h,s]),{data:a,loading:s,error:l,hasMore:u,loadMore:y,refresh:v,total:f,currentPage:h}}function ov(e,t,r,n=100){const i=Te.useRef(null);return Te.useEffect(()=>{const a=i.current;if(!a||!t||r)return;const o=new IntersectionObserver(t=>{t[0].isIntersecting&&e()},{rootMargin:`${n}px`,threshold:.1});return o.observe(a),()=>{o.disconnect()}},[e,t,r,n]),i}function sv({item:e,onView:t,onDelete:r,theme:n,config:i}){var a;const o="searchFormData"in e,s=e.title,A=o?e.searchFormData.origin:e.origin,l=o?e.searchFormData.destination:e.destination,c=o?e.searchFormData.equipmentType:e.cargoType,u=o?e.searchFormData.pickupEarliest:null==(a=e.pickupDate)?void 0:a.split("T")[0],d=o?e.resultsCount:e.totalCarriers,h=o?e.timestamp:e.createdAt,p=o?"completed":e.status,f=Uy(p);return Ie.jsx(ch.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},whileHover:{scale:1.01},transition:{duration:.2},children:Ie.jsx(ky,{className:`${i.cardPadding} ${i.cardHeight} transition-all duration-200 hover:shadow-md border`,style:{fontFamily:n.fontFamily},children:Ie.jsxs("div",{className:"flex items-start justify-between",children:[Ie.jsxs("div",{className:"flex-1 min-w-0",children:[Ie.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[Ie.jsx(tm,{className:`${i.iconSize} text-gray-500 flex-shrink-0`}),Ie.jsx("h3",{className:`font-medium ${i.textSize.title} truncate`,children:s}),!f&&Ie.jsx("div",{className:"flex items-center gap-1",children:Ie.jsx("span",{className:"px-2 py-1 text-xs rounded-full bg-yellow-100 text-yellow-800",children:p})})]}),Ie.jsxs("div",{className:`${i.spacing} mb-3`,children:[Ie.jsxs("div",{className:"flex items-center gap-2",children:[Ie.jsx(Mf,{className:`${i.iconSize} text-gray-400`}),Ie.jsxs("span",{className:`text-gray-600 ${i.textSize.body} truncate`,children:[A," → ",l]})]}),Ie.jsxs("div",{className:"flex items-center gap-4",children:[Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(fm,{className:`${i.iconSize} text-gray-400`}),Ie.jsx("span",{className:`text-gray-600 ${i.textSize.caption}`,children:c})]}),Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(af,{className:`${i.iconSize} text-gray-400`}),Ie.jsx("span",{className:`text-gray-600 ${i.textSize.caption}`,children:u})]})]})]}),Ie.jsxs("div",{className:"flex items-center gap-4 text-gray-500",children:[Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(yf,{className:`${i.iconSize}`}),Ie.jsx("span",{className:i.textSize.caption,children:h.toLocaleDateString()})]}),Ie.jsxs("span",{className:i.textSize.caption,children:[d," result",1!==d?"s":""]})]})]}),Ie.jsxs("div",{className:"flex items-center gap-1 ml-2",children:[Ie.jsxs(Np,{variant:"ghost",size:"sm",onClick:e=>{e.stopPropagation(),r()},className:`${i.buttonSize} p-1 text-gray-400 hover:text-red-500`,children:[Ie.jsx(um,{className:i.iconSize}),Ie.jsx("span",{className:"sr-only",children:"Delete search"})]}),Ie.jsxs(Np,{variant:"ghost",size:"sm",onClick:t,className:`${i.buttonSize} text-blue-600 hover:text-blue-800 hover:bg-blue-50`,disabled:!f,children:[f?Ie.jsx(Ef,{className:i.iconSize}):Ie.jsx(If,{className:`${i.iconSize} animate-spin`}),Ie.jsx("span",{className:"hidden sm:inline ml-1",children:f?"View":"Processing"})]})]})]})})})}function Av({theme:e,config:t}){return Ie.jsx("div",{className:"flex-1 flex items-center justify-center p-8",children:Ie.jsxs("div",{className:"text-center",children:[Ie.jsx("div",{className:"w-16 h-16 rounded-full flex items-center justify-center mx-auto mb-4",style:{backgroundColor:e.primaryColor+"20"},children:Ie.jsx(tm,{className:"h-8 w-8",style:{color:e.primaryColor}})}),Ie.jsx("h3",{className:`${t.textSize.title} font-semibold mb-2`,style:{fontFamily:e.fontFamily},children:"No search history"}),Ie.jsx("p",{className:`text-gray-600 ${t.textSize.body}`,style:{fontFamily:e.fontFamily},children:"Your carrier searches will appear here."})]})})}function lv({config:e}){return Ie.jsx("div",{className:"flex justify-center py-4",children:Ie.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-primary"})})}function cv(){const{theme:e}=ea(),t=hg(),{width:r,containerRef:n}=(()=>{const[e,t]=Te.useState(0),r=Te.useRef(null);return Te.useEffect(()=>{const e=()=>{r.current&&t(r.current.offsetWidth)};e();const n=new ResizeObserver(e);return r.current&&n.observe(r.current),()=>n.disconnect()},[]),{width:e,containerRef:r}})(),i=(e=>e<380?{containerPadding:"p-2",cardPadding:"p-3",spacing:"space-y-2",textSize:{title:"text-xs",subtitle:"text-xs",body:"text-xs",caption:"text-xs"},iconSize:"w-3 h-3",buttonSize:"px-2 py-1 text-xs",headerPadding:"p-3",cardHeight:"min-h-[110px]",maxCardsVisible:2.8}:e<450?{containerPadding:"p-2",cardPadding:"p-3",spacing:"space-y-2",textSize:{title:"text-sm",subtitle:"text-xs",body:"text-xs",caption:"text-xs"},iconSize:"w-3 h-3",buttonSize:"px-2 py-1 text-xs",headerPadding:"p-3",cardHeight:"min-h-[120px]",maxCardsVisible:2.5}:e<600?{containerPadding:"p-3",cardPadding:"p-3",spacing:"space-y-2",textSize:{title:"text-sm",subtitle:"text-xs",body:"text-xs",caption:"text-xs"},iconSize:"w-4 h-4",buttonSize:"px-3 py-1 text-xs",headerPadding:"p-3",cardHeight:"min-h-[130px]",maxCardsVisible:2.2}:{containerPadding:"p-4",cardPadding:"p-4",spacing:"space-y-3",textSize:{title:"text-sm",subtitle:"text-xs",body:"text-xs",caption:"text-xs"},iconSize:"w-4 h-4",buttonSize:"px-3 py-2 text-sm",headerPadding:"p-4",cardHeight:"min-h-[140px]",maxCardsVisible:2})(r),[a,o]=Te.useState(!1),[s,A]=Te.useState(!1),[l,c]=Te.useState(""),[u,d]=Te.useState(""),[h,p]=Te.useState({isOpen:!1,workflowId:null,workflowName:""}),{fetchWorkflowPage:f}=Py(),m=My({onSuccess:()=>{p({isOpen:!1,workflowId:null,workflowName:""}),B()},onError:e=>{console.error("Failed to delete workflow:",e)}}),g=Te.useCallback((e,t)=>f(e),[f]),{data:y,loading:v,error:x,hasMore:w,loadMore:b,refresh:B}=av({fetchData:g,pageSize:10,enabled:!0,dependencies:[l,u]}),C=ov(b,w,v),E=async e=>{var r,n,i;if(Uy(e.status))try{const r=e.workflow_id||e.id;t("/results",{state:{workflowId:r,isFromHistory:!0}})}catch(a){console.error("Error viewing workflow:",a);const o={origin:e.origin,destination:e.destination,pickupEarliest:(null==(r=e.pickupDate)?void 0:r.split("T")[0])||"",pickupHours:"08:00",dropoffHours:"17:00",equipmentType:e.cargoType,length:"48",weight:(null==(n=e.weight)?void 0:n.toString())||"40000",volume:(null==(i=e.volume)?void 0:i.toString())||"2000"},{results:s,metadata:A}=(e=>{const t=Vy.filter(t=>"Dry Van"===e.equipmentType||"Dry Van"!==t.equipment||Math.random()>.3).map(e=>({...e,price:e.price+Math.floor(500*Math.random())-250,isSelected:!1}));return{results:t,metadata:{searchId:"search-"+Date.now(),timestamp:new Date,totalResults:t.length,searchCriteria:{origin:e.origin,destination:e.destination,pickupDate:e.pickupEarliest,equipmentType:e.equipmentType,weight:parseInt(e.weight)||4e4,volume:parseInt(e.volume||"2000")}}}})(o);t("/results",{state:{searchResults:s,searchMetadata:A,searchFormData:o}})}};return Ie.jsxs("div",{ref:n,className:"flex flex-col h-full relative",style:{fontFamily:e.fontFamily},children:[Ie.jsxs("div",{className:"border-b",children:[Ie.jsxs("button",{onClick:()=>o(!a),className:`w-full ${i.headerPadding} flex items-center justify-between hover:bg-gray-50 transition-colors`,children:[Ie.jsxs("div",{className:"flex items-center gap-2",children:[Ie.jsx(tm,{className:i.iconSize}),Ie.jsx("span",{className:`${i.textSize.body} font-medium`,children:"Search History"})]}),a?Ie.jsx(hf,{className:i.iconSize}):Ie.jsx(cf,{className:i.iconSize})]}),a&&Ie.jsx(ch.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"overflow-hidden",children:Ie.jsx("div",{className:i.containerPadding,children:Ie.jsxs("div",{className:"relative",children:[Ie.jsx(tm,{className:`absolute left-3 top-1/2 transform -translate-y-1/2 ${i.iconSize} text-gray-400`}),Ie.jsx("input",{type:"text",placeholder:"Search your history...",value:l,onChange:e=>c(e.target.value),className:`w-full pl-10 pr-10 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent ${i.textSize.body}`}),l&&Ie.jsx("button",{onClick:()=>c(""),className:"absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-400 hover:text-gray-600",children:Ie.jsx(bm,{className:i.iconSize})})]})})})]}),Ie.jsxs("div",{className:"border-b",children:[Ie.jsxs("button",{onClick:()=>A(!s),className:`w-full ${i.headerPadding} flex items-center justify-between hover:bg-gray-50 transition-colors`,children:[Ie.jsxs("div",{className:"flex items-center gap-2",children:[Ie.jsx(Sf,{className:i.iconSize}),Ie.jsx("span",{className:`${i.textSize.body} font-medium`,children:"Filters"}),u&&Ie.jsx("span",{className:`${i.textSize.caption} bg-blue-100 text-blue-800 px-2 py-1 rounded-full`,children:u})]}),s?Ie.jsx(hf,{className:i.iconSize}):Ie.jsx(cf,{className:i.iconSize})]}),s&&Ie.jsx(ch.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"overflow-hidden",children:Ie.jsx("div",{className:i.containerPadding,children:Ie.jsxs("div",{className:"flex flex-wrap gap-2",children:[Ie.jsx("button",{onClick:()=>d(""),className:"px-3 py-1 rounded-full text-xs border transition-colors "+(""===u?"bg-blue-500 text-white border-blue-500":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:"All"}),Ie.jsx("button",{onClick:()=>d("Dry Van"),className:"px-3 py-1 rounded-full text-xs border transition-colors "+("Dry Van"===u?"bg-blue-500 text-white border-blue-500":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:"Dry Van"}),Ie.jsx("button",{onClick:()=>d("Refrigerated"),className:"px-3 py-1 rounded-full text-xs border transition-colors "+("Refrigerated"===u?"bg-blue-500 text-white border-blue-500":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:"Refrigerated"}),Ie.jsx("button",{onClick:()=>d("Flatbed"),className:"px-3 py-1 rounded-full text-xs border transition-colors "+("Flatbed"===u?"bg-blue-500 text-white border-blue-500":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:"Flatbed"})]})})})]}),Ie.jsxs("div",{className:"flex-1 overflow-y-auto",children:[x&&Ie.jsx("div",{className:"p-4",children:Ie.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4",children:[Ie.jsxs("p",{className:"text-red-800 text-sm",children:["Failed to load search history: ",x]}),Ie.jsx(Np,{onClick:B,className:"mt-2 text-sm bg-red-600 text-white hover:bg-red-700",children:"Retry"})]})}),x||0!==y.length||v?Ie.jsxs("div",{className:`${i.containerPadding} ${i.spacing}`,children:[y.map(t=>Ie.jsx(sv,{item:t,onView:()=>E(t),onDelete:()=>(e=>{p({isOpen:!0,workflowId:e.workflow_id||e.id,workflowName:e.workflow_name||`${e.origin} → ${e.destination}`})})(t),theme:e,config:i},t.id)),v&&Ie.jsx(lv,{config:i}),w&&Ie.jsx("div",{ref:C,className:"h-4"}),!w&&y.length>0&&Ie.jsx("div",{className:"text-center py-4",children:Ie.jsx("p",{className:`text-gray-500 ${i.textSize.caption}`,children:"No more search history to load"})})]}):Ie.jsx(Av,{theme:e,config:i})]}),Ie.jsx(iv,{isOpen:h.isOpen,onClose:()=>{p({isOpen:!1,workflowId:null,workflowName:""})},onConfirm:()=>{h.workflowId&&m.mutate(h.workflowId)},title:"Delete Workflow",message:`Are you sure you want to delete "${h.workflowName}"? This action cannot be undone.`,confirmText:"Delete",cancelText:"Cancel",isLoading:m.isPending,variant:"danger",containedMode:!0})]})}function uv({theme:e,config:t}){return Ie.jsx("div",{className:"flex-1 flex items-center justify-center p-8",children:Ie.jsxs("div",{className:"text-center",children:[Ie.jsx("div",{className:"w-16 h-16 rounded-full flex items-center justify-center mx-auto mb-4",style:{backgroundColor:e.primaryColor+"20"},children:Ie.jsx(Wf,{className:"h-8 w-8",style:{color:e.primaryColor}})}),Ie.jsx("h3",{className:`${t.textSize.title} font-semibold mb-2`,style:{fontFamily:e.fontFamily},children:"No call logs found"}),Ie.jsx("p",{className:`text-gray-600 ${t.textSize.body}`,style:{fontFamily:e.fontFamily},children:"Try adjusting your filters or search terms."})]})})}function dv({config:e}){return Ie.jsx("div",{className:"flex justify-center py-4",children:Ie.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-primary"})})}function hv(){const{theme:e}=ea(),{width:t,containerRef:r}=(()=>{const[e,t]=Te.useState(0),r=Te.useRef(null);return Te.useEffect(()=>{const e=()=>{r.current&&t(r.current.offsetWidth)};e();const n=new ResizeObserver(e);return r.current&&n.observe(r.current),()=>n.disconnect()},[]),{width:e,containerRef:r}})(),n=(e=>e<380?{containerPadding:"p-2",cardPadding:"p-3",spacing:"space-y-2",textSize:{title:"text-xs",subtitle:"text-xs",body:"text-xs",caption:"text-xs"},iconSize:"w-3 h-3",buttonSize:"px-2 py-1 text-xs",headerPadding:"p-3",filterPadding:"p-2",inputSize:"text-xs"}:e<450?{containerPadding:"p-3",cardPadding:"p-3",spacing:"space-y-2",textSize:{title:"text-sm",subtitle:"text-xs",body:"text-xs",caption:"text-xs"},iconSize:"w-3 h-3",buttonSize:"px-2 py-1 text-xs",headerPadding:"p-3",filterPadding:"p-2",inputSize:"text-xs"}:e<600?{containerPadding:"p-4",cardPadding:"p-4",spacing:"space-y-3",textSize:{title:"text-sm",subtitle:"text-xs",body:"text-xs",caption:"text-xs"},iconSize:"w-4 h-4",buttonSize:"px-3 py-1 text-xs",headerPadding:"p-4",filterPadding:"p-3",inputSize:"text-sm"}:{containerPadding:"p-4",cardPadding:"p-4",spacing:"space-y-3",textSize:{title:"text-sm",subtitle:"text-xs",body:"text-xs",caption:"text-xs"},iconSize:"w-4 h-4",buttonSize:"px-3 py-2 text-sm",headerPadding:"p-4",filterPadding:"p-4",inputSize:"text-sm"})(t),i=hg(),[a,o]=Te.useState(!1),[s,A]=Te.useState(!1),[l,c]=Te.useState(""),[u,d]=Te.useState(""),[h,p]=Te.useState(""),[f,m]=Te.useState({search:l,status:u,carrier:"",dealStatus:h,dateRange:{start:"",end:""}});Te.useEffect(()=>{m(e=>({...e,search:l,status:u,dealStatus:h}))},[l,u,h]);const g=Te.useCallback((e,t)=>((e,t,r)=>new Promise(n=>{setTimeout(()=>{const i=[],a=(e-1)*t,o=["Swift Transportation","J.B. Hunt","Schneider","Werner Enterprises","C.R. England"],s=["New York, NY","Los Angeles, CA","Chicago, IL","Houston, TX","Phoenix, AZ"],A=["Miami, FL","Seattle, WA","Denver, CO","Atlanta, GA","Boston, MA"],l=["waiting","in-progress","completed","failed"],c=["pending","negotiating","agreed","declined"];for(let e=0;e<t;e++){const t=a+e;if(t>=100)break;const n=o[t%o.length],u=s[t%s.length],d=A[t%A.length],h=l[t%l.length],p=c[t%c.length];if(r.search&&!n.toLowerCase().includes(r.search.toLowerCase())&&!u.toLowerCase().includes(r.search.toLowerCase())&&!d.toLowerCase().includes(r.search.toLowerCase()))continue;if(r.status&&h!==r.status)continue;if(r.carrier&&!n.toLowerCase().includes(r.carrier.toLowerCase()))continue;if(r.dealStatus&&p!==r.dealStatus)continue;const f=new Date(Date.now()-30*Math.random()*24*60*60*1e3);r.dateRange.start&&f<new Date(r.dateRange.start)||r.dateRange.end&&f>new Date(r.dateRange.end)||i.push({id:`call-${t+1}`,carrierName:n,callDuration:Math.floor(30*Math.random())+5,maxDuration:45,callStatus:h,dealStatus:p,agreedRate:"agreed"===p?Math.floor(3e3*Math.random())+1500:null,contactInfo:`+1-555-${String(Math.floor(9e3*Math.random())+1e3)}`,notes:`Call notes for ${n}`})}n({data:i,hasMore:a+t<100,total:100})},300)}))(e,t,f),[f]),{data:y,loading:v,error:x,hasMore:w,loadMore:b,refresh:B}=av({fetchData:g,pageSize:10,enabled:!0,dependencies:[f]}),C=ov(b,w,v);return Ie.jsxs("div",{ref:r,className:"flex flex-col h-full",style:{fontFamily:e.fontFamily},children:[Ie.jsxs("div",{className:"border-b",children:[Ie.jsxs("button",{onClick:()=>o(!a),className:`w-full ${n.headerPadding} flex items-center justify-between hover:bg-gray-50 transition-colors`,children:[Ie.jsxs("div",{className:"flex items-center gap-2",children:[Ie.jsx(tm,{className:n.iconSize}),Ie.jsx("span",{className:`${n.textSize.body} font-medium`,children:"Search Calls"})]}),a?Ie.jsx(hf,{className:n.iconSize}):Ie.jsx(cf,{className:n.iconSize})]}),a&&Ie.jsx(ch.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"overflow-hidden",children:Ie.jsx("div",{className:n.containerPadding,children:Ie.jsxs("div",{className:"relative",children:[Ie.jsx(tm,{className:`absolute left-3 top-1/2 transform -translate-y-1/2 ${n.iconSize} text-gray-400`}),Ie.jsx("input",{type:"text",placeholder:"Search calls, carriers, locations...",value:l,onChange:e=>c(e.target.value),className:`w-full pl-10 pr-10 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent ${n.textSize.body}`}),l&&Ie.jsx("button",{onClick:()=>c(""),className:"absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-400 hover:text-gray-600",children:Ie.jsx(bm,{className:n.iconSize})})]})})})]}),Ie.jsxs("div",{className:"border-b",children:[Ie.jsxs("button",{onClick:()=>A(!s),className:`w-full ${n.headerPadding} flex items-center justify-between hover:bg-gray-50 transition-colors`,children:[Ie.jsxs("div",{className:"flex items-center gap-2",children:[Ie.jsx(Sf,{className:n.iconSize}),Ie.jsx("span",{className:`${n.textSize.body} font-medium`,children:"Filters"}),(u||h)&&Ie.jsx("span",{className:`${n.textSize.caption} bg-blue-100 text-blue-800 px-2 py-1 rounded-full`,children:u||h})]}),s?Ie.jsx(hf,{className:n.iconSize}):Ie.jsx(cf,{className:n.iconSize})]}),s&&Ie.jsx(ch.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"overflow-hidden",children:Ie.jsx("div",{className:n.containerPadding,children:Ie.jsxs("div",{className:"space-y-3",children:[Ie.jsxs("div",{children:[Ie.jsx("label",{className:`block ${n.textSize.caption} font-medium text-gray-700 mb-2`,children:"Call Status"}),Ie.jsxs("div",{className:"flex flex-wrap gap-2",children:[Ie.jsx("button",{onClick:()=>d(""),className:"px-3 py-1 rounded-full text-xs border transition-colors "+(""===u?"bg-blue-500 text-white border-blue-500":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:"All"}),Ie.jsx("button",{onClick:()=>d("waiting"),className:"px-3 py-1 rounded-full text-xs border transition-colors "+("waiting"===u?"bg-blue-500 text-white border-blue-500":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:"Waiting"}),Ie.jsx("button",{onClick:()=>d("in-progress"),className:"px-3 py-1 rounded-full text-xs border transition-colors "+("in-progress"===u?"bg-blue-500 text-white border-blue-500":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:"In Progress"}),Ie.jsx("button",{onClick:()=>d("completed"),className:"px-3 py-1 rounded-full text-xs border transition-colors "+("completed"===u?"bg-blue-500 text-white border-blue-500":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:"Completed"}),Ie.jsx("button",{onClick:()=>d("failed"),className:"px-3 py-1 rounded-full text-xs border transition-colors "+("failed"===u?"bg-blue-500 text-white border-blue-500":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:"Failed"})]})]}),Ie.jsxs("div",{children:[Ie.jsx("label",{className:`block ${n.textSize.caption} font-medium text-gray-700 mb-2`,children:"Deal Status"}),Ie.jsxs("div",{className:"flex flex-wrap gap-2",children:[Ie.jsx("button",{onClick:()=>p(""),className:"px-3 py-1 rounded-full text-xs border transition-colors "+(""===h?"bg-blue-500 text-white border-blue-500":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:"All"}),Ie.jsx("button",{onClick:()=>p("pending"),className:"px-3 py-1 rounded-full text-xs border transition-colors "+("pending"===h?"bg-blue-500 text-white border-blue-500":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:"Pending"}),Ie.jsx("button",{onClick:()=>p("negotiating"),className:"px-3 py-1 rounded-full text-xs border transition-colors "+("negotiating"===h?"bg-blue-500 text-white border-blue-500":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:"Negotiating"}),Ie.jsx("button",{onClick:()=>p("agreed"),className:"px-3 py-1 rounded-full text-xs border transition-colors "+("agreed"===h?"bg-blue-500 text-white border-blue-500":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:"Agreed"}),Ie.jsx("button",{onClick:()=>p("declined"),className:"px-3 py-1 rounded-full text-xs border transition-colors "+("declined"===h?"bg-blue-500 text-white border-blue-500":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:"Declined"})]})]})]})})})]}),Ie.jsxs("div",{className:"flex-1 overflow-y-auto",children:[x&&Ie.jsx("div",{className:"p-4",children:Ie.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4",children:[Ie.jsxs("p",{className:"text-red-800 text-sm",children:["Failed to load call logs: ",x]}),Ie.jsx(Np,{onClick:B,className:"mt-2 text-sm bg-red-600 text-white hover:bg-red-700",children:"Retry"})]})}),x||0!==y.length||v?Ie.jsxs("div",{className:`${n.containerPadding} ${n.spacing}`,children:[y.map(t=>Ie.jsx(Ky,{item:t,onViewDetails:()=>{return e=t.id,void i(`/call-logs/${e}`,{state:{callQueueItems:y,fromCallLogs:!0}});var e},theme:e},t.id)),v&&Ie.jsx(dv,{config:n}),Ie.jsx("div",{ref:C,className:"h-4"})]}):Ie.jsx(uv,{theme:e,config:n})]})]})}const pv={currentLead:null,emails:[],isLoading:!1,error:null,isSending:!1,sendError:null},fv=Tp((e,t)=>({...pv,setCurrentLead:t=>{e({currentLead:t})},fetchLeadEmails:async t=>{e({isLoading:!0,error:null});try{const r=[...(await Hp.getLeadEmails(t)).emails].sort((e,t)=>new Date(e.receivedDatetime).getTime()-new Date(t.receivedDatetime).getTime());e({emails:r,isLoading:!1,error:null})}catch(r){console.error("Failed to fetch lead emails:",r),e({isLoading:!1,error:r.message||"Failed to fetch emails",emails:[]})}},sendReply:async(r,n,i,a)=>{e({isSending:!0,sendError:null});try{const o=await Hp.sendEmailReply(r,n,i,a);if(o.success){const r=t().emails;return e({emails:[...r,o.email],isSending:!1,sendError:null}),!0}return e({isSending:!1,sendError:"Failed to send email"}),!1}catch(o){return console.error("Failed to send email:",o),e({isSending:!1,sendError:o.message||"Failed to send email"}),!1}},clearError:()=>{e({error:null,sendError:null})},reset:()=>{e(pv)}}));var mv,gv={exports:{}};var yv=(mv||(mv=1,gv.exports=function(){var e=1e3,t=6e4,r=36e5,n="millisecond",i="second",a="minute",o="hour",s="day",A="week",l="month",c="quarter",u="year",d="date",h="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"}},g=function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},y={s:g,z:function(e){var t=-e.utcOffset(),r=Math.abs(t),n=Math.floor(r/60),i=r%60;return(t<=0?"+":"-")+g(n,2,"0")+":"+g(i,2,"0")},m:function e(t,r){if(t.date()<r.date())return-e(r,t);var n=12*(r.year()-t.year())+(r.month()-t.month()),i=t.clone().add(n,l),a=r-i<0,o=t.clone().add(n+(a?-1:1),l);return+(-(n+(r-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:u,w:A,d:s,D:d,h:o,m:a,s:i,ms:n,Q:c}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},v="en",x={};x[v]=m;var w="$isDayjsObject",b=function(e){return e instanceof k||!(!e||!e[w])},B=function e(t,r,n){var i;if(!t)return v;if("string"==typeof t){var a=t.toLowerCase();x[a]&&(i=a),r&&(x[a]=r,i=a);var o=t.split("-");if(!i&&o.length>1)return e(o[0])}else{var s=t.name;x[s]=t,i=s}return!n&&i&&(v=i),i||!n&&v},C=function(e,t){if(b(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new k(r)},E=y;E.l=B,E.i=b,E.w=function(e,t){return C(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var k=function(){function m(e){this.$L=B(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[w]=!0}var g=m.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(E.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(p);if(n){var i=n[2]-1||0,a=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,a)):new Date(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,a)}}return new Date(t)}(e),this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return E},g.isValid=function(){return!(this.$d.toString()===h)},g.isSame=function(e,t){var r=C(e);return this.startOf(t)<=r&&r<=this.endOf(t)},g.isAfter=function(e,t){return C(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<C(e)},g.$g=function(e,t,r){return E.u(e)?this[t]:this.set(r,e)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(e,t){var r=this,n=!!E.u(t)||t,c=E.p(e),h=function(e,t){var i=E.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r);return n?i:i.endOf(s)},p=function(e,t){return E.w(r.toDate()[e].apply(r.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},f=this.$W,m=this.$M,g=this.$D,y="set"+(this.$u?"UTC":"");switch(c){case u:return n?h(1,0):h(31,11);case l:return n?h(1,m):h(0,m+1);case A:var v=this.$locale().weekStart||0,x=(f<v?f+7:f)-v;return h(n?g-x:g+(6-x),m);case s:case d:return p(y+"Hours",0);case o:return p(y+"Minutes",1);case a:return p(y+"Seconds",2);case i:return p(y+"Milliseconds",3);default:return this.clone()}},g.endOf=function(e){return this.startOf(e,!1)},g.$set=function(e,t){var r,A=E.p(e),c="set"+(this.$u?"UTC":""),h=(r={},r[s]=c+"Date",r[d]=c+"Date",r[l]=c+"Month",r[u]=c+"FullYear",r[o]=c+"Hours",r[a]=c+"Minutes",r[i]=c+"Seconds",r[n]=c+"Milliseconds",r)[A],p=A===s?this.$D+(t-this.$W):t;if(A===l||A===u){var f=this.clone().set(d,1);f.$d[h](p),f.init(),this.$d=f.set(d,Math.min(this.$D,f.daysInMonth())).$d}else h&&this.$d[h](p);return this.init(),this},g.set=function(e,t){return this.clone().$set(e,t)},g.get=function(e){return this[E.p(e)]()},g.add=function(n,c){var d,h=this;n=Number(n);var p=E.p(c),f=function(e){var t=C(h);return E.w(t.date(t.date()+Math.round(e*n)),h)};if(p===l)return this.set(l,this.$M+n);if(p===u)return this.set(u,this.$y+n);if(p===s)return f(1);if(p===A)return f(7);var m=(d={},d[a]=t,d[o]=r,d[i]=e,d)[p]||1,g=this.$d.getTime()+n*m;return E.w(g,this)},g.subtract=function(e,t){return this.add(-1*e,t)},g.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||h;var n=e||"YYYY-MM-DDTHH:mm:ssZ",i=E.z(this),a=this.$H,o=this.$m,s=this.$M,A=r.weekdays,l=r.months,c=r.meridiem,u=function(e,r,i,a){return e&&(e[r]||e(t,n))||i[r].slice(0,a)},d=function(e){return E.s(a%12||12,e,"0")},p=c||function(e,t,r){var n=e<12?"AM":"PM";return r?n.toLowerCase():n};return n.replace(f,function(e,n){return n||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return E.s(t.$y,4,"0");case"M":return s+1;case"MM":return E.s(s+1,2,"0");case"MMM":return u(r.monthsShort,s,l,3);case"MMMM":return u(l,s);case"D":return t.$D;case"DD":return E.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return u(r.weekdaysMin,t.$W,A,2);case"ddd":return u(r.weekdaysShort,t.$W,A,3);case"dddd":return A[t.$W];case"H":return String(a);case"HH":return E.s(a,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return p(a,o,!0);case"A":return p(a,o,!1);case"m":return String(o);case"mm":return E.s(o,2,"0");case"s":return String(t.$s);case"ss":return E.s(t.$s,2,"0");case"SSS":return E.s(t.$ms,3,"0");case"Z":return i}return null}(e)||i.replace(":","")})},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(n,d,h){var p,f=this,m=E.p(d),g=C(n),y=(g.utcOffset()-this.utcOffset())*t,v=this-g,x=function(){return E.m(f,g)};switch(m){case u:p=x()/12;break;case l:p=x();break;case c:p=x()/3;break;case A:p=(v-y)/6048e5;break;case s:p=(v-y)/864e5;break;case o:p=v/r;break;case a:p=v/t;break;case i:p=v/e;break;default:p=v}return h?p:E.a(p)},g.daysInMonth=function(){return this.endOf(l).$D},g.$locale=function(){return x[this.$L]},g.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),n=B(e,t,!0);return n&&(r.$L=n),r},g.clone=function(){return E.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},m}(),S=k.prototype;return C.prototype=S,[["$ms",n],["$s",i],["$m",a],["$H",o],["$W",s],["$M",l],["$y",u],["$D",d]].forEach(function(e){S[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),C.extend=function(e,t){return e.$i||(e(t,k,C),e.$i=!0),C},C.locale=B,C.isDayjs=b,C.unix=function(e){return C(1e3*e)},C.en=x[v],C.Ls=x,C.p={},C}()),gv.exports);const vv=ay(yv),xv={new:"bg-green-500 text-white",qualified:"bg-blue-500 text-white",contacted:"bg-yellow-500 text-white",rejected:"bg-red-500 text-white"};function wv({item:e,onViewClick:t,onActionClick:r,theme:n}){const i=n.primaryColor||"#1e40af",a=e.pickupTimestamp?vv(e.pickupTimestamp).format("MMM DD, YYYY"):"-",o=e.deliveryTimestamp?vv(e.deliveryTimestamp).format("MMM DD, YYYY"):"-";return Ie.jsxs(ch.div,{layout:!0,initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"bg-white rounded-lg border-l-4 shadow-sm overflow-hidden cursor-pointer hover:shadow-md transition-shadow",style:{borderLeftColor:e.actionNeeded?"#f59e0b":i},onClick:t,children:[Ie.jsxs("div",{className:"px-4 py-3",children:[Ie.jsxs("div",{className:"flex items-center justify-between mb-3",children:[Ie.jsxs("div",{className:"flex items-center gap-3",children:[e.externalIdentifier?Ie.jsxs("span",{className:"flex-shrink-0 px-2 py-1 text-md font-semibold rounded bg-green-500 text-white",children:["LD",e.externalIdentifier]}):null,Ie.jsx("span",{className:"text-base font-semibold",style:{color:i},children:e.shipperName||"Unknown Shipper"}),e.shipperCompanyName&&Ie.jsxs("span",{className:"text-xs text-gray-500",children:["(",e.shipperCompanyName,")"]})]}),Ie.jsxs("div",{className:"flex items-center gap-2",children:[e.actionNeeded&&Ie.jsxs("span",{className:"text-xs px-2 py-1 rounded font-medium bg-amber-100 text-amber-700 flex items-center gap-1",children:[Ie.jsx(pm,{className:"w-3 h-3"}),"Action Needed"]}),Ie.jsx("span",{className:`text-xs px-2 py-1 rounded font-medium capitalize ${xv[e.extLeadStatus?"qualified":"new"]}`,children:e.extLeadStatus||"New"}),e.isDuplicate&&Ie.jsx("span",{className:"text-xs px-2 py-1 rounded font-medium bg-orange-100 text-orange-700",children:"Load+"})]})]}),Ie.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-y-2 text-xs text-gray-600",children:[Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(Vf,{className:"w-3 h-3 text-green-500"}),Ie.jsx("span",{className:"truncate",title:e.origin,children:e.origin})]}),Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(Vf,{className:"w-3 h-3 rotate-180 text-red-500"}),Ie.jsx("span",{className:"truncate",title:e.destination,children:e.destination})]}),Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(Bf,{className:"w-3 h-3"}),Ie.jsx("span",{children:e.shipperTargetPrice||"N/A"})]}),Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(af,{className:"w-3 h-3"}),Ie.jsx("span",{children:a})]}),Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(af,{className:"w-3 h-3"}),Ie.jsx("span",{children:o})]}),e.modeOfService&&Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(fm,{className:"w-3 h-3"}),Ie.jsx("span",{children:e.modeOfService})]})]}),(e.grossWeight||e.numberOfPallets)&&Ie.jsxs("div",{className:"flex gap-4 mt-2 text-xs text-gray-500",children:[e.grossWeight&&Ie.jsxs("span",{children:["Weight: ",e.grossWeight.toLocaleString()," lbs"]}),e.numberOfPallets&&Ie.jsxs("span",{children:["Pallets: ",e.numberOfPallets]})]})]}),Ie.jsxs("div",{className:"flex justify-between items-center px-4 pb-3",children:[Ie.jsx("span",{className:"text-xs text-gray-400",children:vv(e.createdAt).format("MMM DD, YYYY h:mm A")}),Ie.jsxs("div",{className:"flex items-center gap-2",children:[e.actionNeeded&&r&&Ie.jsxs("button",{onClick:e=>{e.stopPropagation(),r()},className:"flex items-center gap-1.5 px-3 py-1.5 rounded text-xs font-medium bg-amber-500 text-white hover:bg-amber-600 transition-colors",children:[Ie.jsx(pm,{className:"w-3.5 h-3.5"}),Ie.jsx("span",{children:"Take Action"})]}),Ie.jsxs("button",{onClick:e=>{e.stopPropagation(),t()},className:"flex items-center gap-2 px-3 py-1.5 rounded text-white text-xs font-medium",style:{backgroundColor:i},children:[Ie.jsx(Pf,{className:"w-3.5 h-3.5"}),Ie.jsx("span",{children:"View Details"})]})]})]})]})}function bv({label:e,active:t,onClick:r,onRemove:n,primaryColor:i}){return Ie.jsxs("button",{onClick:r,className:"px-3 py-1.5 rounded text-xs font-medium border transition-colors flex items-center gap-1 "+(t?"text-white border-transparent":"text-gray-700 border-gray-300 bg-white hover:bg-gray-50"),style:t?{backgroundColor:i}:void 0,children:[e,t&&n&&Ie.jsx(bm,{className:"w-3 h-3 ml-1",onClick:e=>{e.stopPropagation(),n()}})]})}function Bv({currentPage:e,totalPages:t,onPageChange:r,primaryColor:n}){const i=[];if(t<=5)for(let a=1;a<=t;a++)i.push(a);else{i.push(1),e>3&&i.push(-1);const r=Math.max(2,e-1),n=Math.min(t-1,e+1);for(let e=r;e<=n;e++)i.push(e);e<t-2&&i.push(-1),i.push(t)}return Ie.jsxs("div",{className:"flex items-center justify-center gap-1 py-3",children:[Ie.jsx("button",{onClick:()=>r(e-1),disabled:1===e,className:"p-1 rounded hover:bg-gray-100 disabled:opacity-50",children:Ie.jsx(uf,{className:"w-4 h-4"})}),i.map((t,i)=>-1===t?Ie.jsx("span",{className:"px-2 text-gray-400",children:".."},`ellipsis-${i}`):Ie.jsx("button",{onClick:()=>r(t),className:"w-7 h-7 rounded text-xs font-medium "+(e===t?"text-white":"text-gray-700 hover:bg-gray-100"),style:e===t?{backgroundColor:n}:void 0,children:t},t)),Ie.jsx("button",{onClick:()=>r(e+1),disabled:e===t,className:"p-1 rounded hover:bg-gray-100 disabled:opacity-50",children:Ie.jsx(df,{className:"w-4 h-4"})})]})}function Cv({count:e,onDismiss:t,onRefresh:r,primaryColor:n}){return Ie.jsxs(ch.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},className:"mx-4 mb-3 p-3 rounded-lg flex items-center justify-between",style:{backgroundColor:`${n}15`,border:`1px solid ${n}40`},children:[Ie.jsxs("div",{className:"flex items-center gap-2",children:[Ie.jsx(Zp,{className:"w-4 h-4",style:{color:n}}),Ie.jsxs("span",{className:"text-sm font-medium",style:{color:n},children:[e," new email lead",e>1?"s":""," received!"]})]}),Ie.jsx("div",{className:"flex items-center gap-2",children:Ie.jsx("button",{onClick:t,className:"p-1 hover:bg-gray-200 rounded",children:Ie.jsx(bm,{className:"w-4 h-4 text-gray-500"})})})]})}function Ev(){const{theme:e,isOpen:t}=ea(),r=hg(),[n,i]=Te.useState(""),{leads:a,totalCount:o,currentPage:s,pageSize:A,isLoading:l,error:c,dateFilter:u,hasNewLeads:d,newLeadsCount:h,showNewLeadsAlert:p,fetchLeads:f,setPage:m,setSearchQuery:g,setDateFilter:y,startPolling:v,stopPolling:x,clearNewLeadsNotification:w,acknowledgeNewLeads:b}=Rp(),{setCurrentLead:B}=fv(),C=Te.useCallback(e=>{B(e),r(`/email-leads/${e.id}`)},[r,B]),E=Te.useCallback(e=>{B(e),r(`/email-leads/${e.id}/action?from=list`)},[r,B]),k=((e,t=300)=>{const[r,n]=Te.useState(e);return Te.useEffect(()=>{const r=setTimeout(()=>n(e),t);return()=>clearTimeout(r)},[e,t]),r})(n,500);Te.useEffect(()=>{f()},[]),Te.useEffect(()=>{g(k),""!==k&&f({search:k,page:1})},[k]),Te.useEffect(()=>(v(),()=>x()),[]);const S=Math.ceil(o/A),j=e.primaryColor||"#1e40af",F=Te.useCallback(e=>{y(e)},[y]),Q=Te.useCallback(()=>{w(),f({page:1})},[w,f]);return Ie.jsxs("div",{className:"flex flex-col h-full bg-white",style:{fontFamily:e.fontFamily},children:[Ie.jsx("div",{className:"px-4 py-3 border-b",children:Ie.jsxs("div",{className:"relative",children:[Ie.jsx(tm,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-400"}),Ie.jsx("input",{type:"text",placeholder:"Search by subject, shipper, origin, destination...",value:n,onChange:e=>i(e.target.value),className:"w-full pl-10 pr-4 py-2 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2",style:{"--tw-ring-color":j},onFocus:e=>e.currentTarget.style.boxShadow=`0 0 0 2px ${j}40`,onBlur:e=>e.currentTarget.style.boxShadow=""})]})}),Ie.jsx("div",{className:"px-4 py-3 border-b flex gap-2 overflow-x-auto",children:[{id:"today",label:"Today"},{id:"yesterday",label:"Yesterday"},{id:"all",label:"All"}].map(e=>Ie.jsx(bv,{label:e.label,active:u===e.id,onClick:()=>F(e.id),onRemove:u===e.id&&"all"!==e.id?()=>F("all"):void 0,primaryColor:j},e.id))}),Ie.jsxs("div",{className:"px-4 py-3 flex items-center justify-between ",children:[Ie.jsxs("h2",{className:"text-base font-semibold text-gray-900",children:["Load Requests ",o>0&&Ie.jsxs("span",{className:"text-gray-500 font-normal",children:["(",o,")"]})]}),l&&Ie.jsx("div",{className:"w-4 h-4 border-2 border-gray-300 border-t-blue-500 rounded-full animate-spin"})]}),Ie.jsx(hl,{children:p&&t&&Ie.jsx(Cv,{count:h,onDismiss:b,onRefresh:Q,primaryColor:j})}),c&&Ie.jsxs("div",{className:"mx-4 mb-3 p-3 bg-red-50 border border-red-200 rounded-lg",children:[Ie.jsx("p",{className:"text-sm text-red-600",children:c}),Ie.jsx("button",{onClick:()=>f(),className:"mt-2 text-xs text-red-700 underline",children:"Try again"})]}),Ie.jsx("div",{className:"flex-1 overflow-hidden relative",children:l||0!==a.length?Ie.jsx("div",{className:"h-full overflow-y-auto px-4 space-y-3 pb-8",children:Ie.jsx(hl,{initial:!1,children:a.map(t=>Ie.jsx(wv,{item:t,theme:e,onViewClick:()=>C(t),onActionClick:t.actionNeeded?()=>E(t):void 0},t.id))})}):Ie.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-gray-500 p-8 text-center",children:[Ie.jsx("div",{className:"w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center mb-4",children:Ie.jsx(Pf,{className:"h-8 w-8 text-gray-400"})}),Ie.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-1",children:"No email leads found"}),Ie.jsx("p",{className:"text-sm",children:"Try adjusting your filters or search terms"})]})}),a.length>0&&S>1&&Ie.jsx(Bv,{currentPage:s,totalPages:S,onPageChange:m,primaryColor:j})]})}const kv={new:"bg-green-500 text-white",qualified:"bg-blue-500 text-white",contacted:"bg-yellow-500 text-white",rejected:"bg-red-500 text-white"};function Sv(e){return e?vv(e).format("MMM DD, YYYY"):"-"}function jv({lead:e,theme:t,onActionClick:r}){const n=t.primaryColor||"#1e40af";return console.log("Lead",e),Ie.jsx("div",{className:"bg-white rounded-lg border-l-4 shadow-sm overflow-hidden",style:{borderLeftColor:e.actionNeeded?"#f59e0b":n},children:Ie.jsxs("div",{className:"px-4 py-3",children:[Ie.jsxs("div",{className:"flex items-center justify-between mb-3",children:[Ie.jsxs("div",{className:"flex items-center gap-3",children:[Ie.jsx("span",{className:"text-base font-semibold",style:{color:n},children:e.shipperName||"Unknown Shipper"}),Ie.jsx(Pf,{className:"w-4 h-4 text-gray-400"})]}),Ie.jsxs("div",{className:"flex items-center gap-2",children:[e.actionNeeded&&Ie.jsxs("span",{className:"text-xs px-2 py-1 rounded font-medium bg-amber-100 text-amber-700 flex items-center gap-1",children:[Ie.jsx(pm,{className:"w-3 h-3"}),"Action Needed"]}),Ie.jsx("span",{className:`text-xs px-2 py-1 rounded font-medium ${kv[e.status]}`,children:e.status.charAt(0).toUpperCase()+e.status.slice(1)})]})]}),Ie.jsxs("div",{className:"grid grid-cols-3 gap-y-2 text-xs text-gray-600",children:[Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(Vf,{className:"w-3 h-3"}),Ie.jsx("span",{className:"truncate",children:e.origin||"-"})]}),Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(Vf,{className:"w-3 h-3 rotate-90"}),Ie.jsx("span",{className:"truncate",children:e.destination||"-"})]}),Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(af,{className:"w-3 h-3"}),Ie.jsx("span",{children:Sv(e.pickupTimestamp)})]}),Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(af,{className:"w-3 h-3"}),Ie.jsx("span",{children:Sv(e.deliveryTimestamp)})]}),Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(fm,{className:"w-3 h-3"}),Ie.jsx("span",{children:e.modeOfService||"-"})]}),Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx($f,{className:"w-3 h-3"}),Ie.jsx("span",{children:e.loadType||"-"})]})]}),e.actionNeeded&&r&&Ie.jsx("div",{className:"mt-3 pt-3 border-t border-gray-100",children:Ie.jsxs("button",{onClick:r,className:"w-full flex items-center justify-center gap-2 px-4 py-2.5 rounded-lg text-white text-sm font-medium bg-amber-500 hover:bg-amber-600 transition-colors",children:[Ie.jsx(pm,{className:"w-4 h-4"}),Ie.jsx("span",{children:e.requiredFields&&e.prospectCreation?"Take Action - Update Shipper & Load Details":e.prospectCreation?"Take Action - Update Shipper Information":e.requiredFields?"Take Action - Update Load Details":"Take Action - Update Required Details"})]})})]})})}function Fv({activeTab:e,onTabChange:t,theme:r}){const n=r.primaryColor||"#1e40af";return r.headerBg,Ie.jsx("div",{className:"grid grid-cols-1",children:Ie.jsxs("button",{onClick:()=>t("shipper"),className:"px-5 py-3 flex items-center justify-center gap-2",style:"shipper"===e?{backgroundColor:`${n}15`,color:n,borderBottom:`2px solid ${n}`}:{backgroundColor:"#f9fafb",color:"#4b5563"},children:[Ie.jsx(Pf,{className:"w-4 h-4"}),Ie.jsx("span",{className:"text-sm font-medium",children:"Shipper Email"})]})})}function Qv({emails:e,lead:t,theme:r,isLoading:n,error:i,onSendReply:a,isSending:o}){var s,A;const l=r.primaryColor||"#1e40af",[c,u]=Te.useState(""),[d,h]=Te.useState(!1);return n?Ie.jsxs("div",{className:"flex flex-col items-center justify-center h-full py-12",children:[Ie.jsx(If,{className:"w-8 h-8 animate-spin text-gray-400 mb-3"}),Ie.jsx("p",{className:"text-sm text-gray-500",children:"Loading emails..."})]}):i?Ie.jsxs("div",{className:"flex flex-col items-center justify-center h-full py-12",children:[Ie.jsx(pf,{className:"w-8 h-8 text-red-400 mb-3"}),Ie.jsx("p",{className:"text-sm text-red-500",children:i})]}):0===e.length?Ie.jsxs("div",{className:"flex flex-col items-center justify-center h-full py-12",children:[Ie.jsx(Pf,{className:"w-12 h-12 text-gray-300 mb-3"}),Ie.jsx("p",{className:"text-sm text-gray-500",children:"No emails found"})]}):Ie.jsxs("div",{className:"flex flex-col h-full",children:[Ie.jsxs("div",{className:"flex-1 overflow-y-auto p-4",children:[Ie.jsxs("div",{className:"flex items-start gap-3 mb-4",children:[Ie.jsx("div",{className:"w-10 h-10 rounded-lg flex items-center justify-center",style:{backgroundColor:`${l}15`},children:Ie.jsx(Pf,{className:"w-5 h-5",style:{color:l}})}),Ie.jsxs("div",{className:"flex-1",children:[Ie.jsx("h3",{className:"text-base font-semibold text-gray-900",children:(null==(s=e[0])?void 0:s.subject)||"No Subject"}),Ie.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:[t.shipperName," • ",t.origin," → ",t.destination]})]})]}),Ie.jsx("div",{className:"space-y-4",children:e.map((e,t)=>{var r,n,i;const a="outgoing"===(null==(r=e.metadata)?void 0:r.direction),o=(null==(i=null==(n=e.senderEmail)?void 0:n.split("@")[0])?void 0:i.slice(0,2).toUpperCase())||"U";return Ie.jsxs(ch.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.1*t},className:"rounded-lg border "+(a?"border-blue-200 bg-blue-50":"border-gray-200 bg-white"),children:[Ie.jsxs("div",{className:"px-4 py-3 border-b border-gray-100 flex items-center justify-between",children:[Ie.jsxs("div",{className:"flex items-center gap-2",children:[Ie.jsx("div",{className:"w-8 h-8 rounded-full flex items-center justify-center text-white text-xs font-medium",style:{backgroundColor:a?"#3b82f6":l},children:o}),Ie.jsxs("div",{children:[Ie.jsx("p",{className:"text-sm font-medium text-gray-900",children:e.senderEmail}),Ie.jsxs("p",{className:"text-xs text-gray-500",children:["To: ",e.receiverEmail]})]})]}),Ie.jsx("span",{className:"text-xs text-gray-400",children:(s=e.receivedDatetime,vv(s).format("MMM DD, YYYY h:mm A"))})]}),Ie.jsx("div",{className:"px-4 py-3",children:e.bodyHtml?Ie.jsx("div",{className:"text-sm text-gray-700 prose prose-sm max-w-none",dangerouslySetInnerHTML:{__html:e.bodyHtml}}):Ie.jsx("p",{className:"text-sm text-gray-700 whitespace-pre-wrap",children:e.bodyText})})]},e.id);var s})})]}),Ie.jsx("div",{className:"flex-shrink-0 border-t bg-white",children:Ie.jsxs("div",{className:"mx-4 my-3 rounded-lg border border-gray-200 overflow-hidden",children:[Ie.jsx(hl,{children:d&&Ie.jsx(ch.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},children:Ie.jsxs("div",{className:"p-4 space-y-3",children:[Ie.jsxs("div",{className:"text-xs text-gray-500 mb-2",children:["Replying to: ",null==(A=e[e.length-1])?void 0:A.senderEmail]}),Ie.jsx("textarea",{value:c,onChange:e=>u(e.target.value),placeholder:"Type your reply...",className:"w-full p-3 border border-gray-200 rounded-lg resize-none text-sm min-h-[120px] focus:outline-none focus:ring-2 focus:ring-blue-500"}),Ie.jsxs("div",{className:"flex gap-2",children:[Ie.jsxs("button",{onClick:async()=>{if(!c.trim())return;const e=`<p>${c.replace(/\n/g,"<br/>")}</p>`;await a(e),u(""),h(!1)},disabled:!c.trim()||o,className:"px-4 py-2 rounded text-white text-sm font-medium disabled:opacity-50 flex items-center gap-2",style:{backgroundColor:l},children:[o&&Ie.jsx(If,{className:"w-4 h-4 animate-spin"}),o?"Sending...":"Send"]}),Ie.jsx("button",{onClick:()=>{u(""),h(!1)},className:"px-4 py-2 rounded text-gray-600 text-sm font-medium border border-gray-200 hover:bg-gray-50",children:"Cancel"})]})]})})}),!d&&Ie.jsx("div",{className:"px-4 py-3 bg-gray-50 flex items-center gap-3",children:Ie.jsxs("button",{onClick:()=>h(!d),className:"flex items-center gap-2 text-sm font-medium text-white px-3 py-1.5 rounded",style:{backgroundColor:l},children:[Ie.jsx(Jf,{className:"w-4 h-4"}),Ie.jsx("span",{children:"Reply"})]})})]})})]})}function Nv({theme:e}){const t=e.primaryColor||"#1e40af";return Ie.jsxs("div",{className:"flex flex-col items-center justify-center h-full py-12",children:[Ie.jsx("div",{className:"w-16 h-16 rounded-full flex items-center justify-center mb-4",style:{backgroundColor:`${t}15`},children:Ie.jsx(Pf,{className:"w-8 h-8",style:{color:t}})}),Ie.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-2",children:"Feature Coming Soon"}),Ie.jsx("p",{className:"text-sm text-gray-500 text-center max-w-xs",children:"Carrier email integration is currently under development. Stay tuned for updates!"})]})}function Uv(){const{theme:e}=ea(),{leadId:t}=pg(),r=hg(),[n,i]=Te.useState("shipper"),{currentLead:a,emails:o,isLoading:s,error:A,isSending:l,fetchLeadEmails:c,sendReply:u,reset:d}=fv();Te.useEffect(()=>(t&&c(t),()=>{}),[t,c]);return a||s?Ie.jsxs("div",{className:"flex flex-col h-full bg-gray-50",style:{fontFamily:e.fontFamily},children:[Ie.jsx("div",{className:"px-4 py-3 bg-white border-b flex items-center gap-3",children:Ie.jsxs("button",{onClick:()=>r("/email-leads"),className:"flex items-center gap-1 text-sm text-gray-600 hover:text-gray-900",children:[Ie.jsx(Xp,{className:"w-4 h-4"}),Ie.jsx("span",{children:"Back"})]})}),Ie.jsxs("div",{className:"p-4",children:[a&&Ie.jsx(jv,{lead:a,theme:e,onActionClick:a.actionNeeded?()=>r(`/email-leads/${t}/action?from=detail`):void 0}),Ie.jsx("div",{className:"mt-3 bg-white rounded-lg border border-gray-200 shadow-sm overflow-hidden",children:Ie.jsx(Fv,{activeTab:n,onTabChange:i,theme:e})})]}),Ie.jsx("div",{className:"flex-1 overflow-hidden mx-4 mb-4 bg-white rounded-lg border border-gray-200 shadow-sm",children:"shipper"===n?Ie.jsx(Qv,{emails:o,lead:a,theme:e,isLoading:s,error:A,onSendReply:async e=>{var t,r,n;if(!o.length||!a)return;const i=null==(t=o[0])?void 0:t.conversationId,s=a.shipperEmail||(null==(r=o[0])?void 0:r.senderEmail),A=(null==(n=o[0])?void 0:n.subject)||"No Subject",l=A.startsWith("Re: ")?A:`Re: ${A}`;i&&s&&await u([s],i,l,e)},isSending:l}):Ie.jsx(Nv,{theme:e})})]}):Ie.jsxs("div",{className:"flex flex-col h-full bg-gray-50",style:{fontFamily:e.fontFamily},children:[Ie.jsx("div",{className:"px-4 py-3 bg-white border-b flex items-center gap-3",children:Ie.jsxs("button",{onClick:()=>r("/email-leads"),className:"flex items-center gap-1 text-sm text-gray-600 hover:text-gray-900",children:[Ie.jsx(Xp,{className:"w-4 h-4"}),Ie.jsx("span",{children:"Back"})]})}),Ie.jsx("div",{className:"flex-1 flex items-center justify-center",children:Ie.jsxs("div",{className:"text-center",children:[Ie.jsx(pf,{className:"w-12 h-12 text-gray-300 mx-auto mb-3"}),Ie.jsx("p",{className:"text-gray-500",children:"Lead data not found. Please go back and try again."})]})})]})}const Ov=[{code:"US",name:"United States",dialCode:"+1",flag:"🇺🇸"},{code:"GB",name:"United Kingdom",dialCode:"+44",flag:"🇬🇧"},{code:"CA",name:"Canada",dialCode:"+1",flag:"🇨🇦"},{code:"AU",name:"Australia",dialCode:"+61",flag:"🇦🇺"},{code:"DE",name:"Germany",dialCode:"+49",flag:"🇩🇪"},{code:"FR",name:"France",dialCode:"+33",flag:"🇫🇷"},{code:"IT",name:"Italy",dialCode:"+39",flag:"🇮🇹"},{code:"ES",name:"Spain",dialCode:"+34",flag:"🇪🇸"},{code:"NL",name:"Netherlands",dialCode:"+31",flag:"🇳🇱"},{code:"BE",name:"Belgium",dialCode:"+32",flag:"🇧🇪"},{code:"CH",name:"Switzerland",dialCode:"+41",flag:"🇨🇭"},{code:"AT",name:"Austria",dialCode:"+43",flag:"🇦🇹"},{code:"IE",name:"Ireland",dialCode:"+353",flag:"🇮🇪"},{code:"PT",name:"Portugal",dialCode:"+351",flag:"🇵🇹"},{code:"SE",name:"Sweden",dialCode:"+46",flag:"🇸🇪"},{code:"NO",name:"Norway",dialCode:"+47",flag:"🇳🇴"},{code:"DK",name:"Denmark",dialCode:"+45",flag:"🇩🇰"},{code:"FI",name:"Finland",dialCode:"+358",flag:"🇫🇮"},{code:"PL",name:"Poland",dialCode:"+48",flag:"🇵🇱"},{code:"CZ",name:"Czech Republic",dialCode:"+420",flag:"🇨🇿"},{code:"HU",name:"Hungary",dialCode:"+36",flag:"🇭🇺"},{code:"GR",name:"Greece",dialCode:"+30",flag:"🇬🇷"},{code:"TR",name:"Turkey",dialCode:"+90",flag:"🇹🇷"},{code:"RU",name:"Russia",dialCode:"+7",flag:"🇷🇺"},{code:"UA",name:"Ukraine",dialCode:"+380",flag:"🇺🇦"},{code:"IL",name:"Israel",dialCode:"+972",flag:"🇮🇱"},{code:"AE",name:"United Arab Emirates",dialCode:"+971",flag:"🇦🇪"},{code:"SA",name:"Saudi Arabia",dialCode:"+966",flag:"🇸🇦"},{code:"EG",name:"Egypt",dialCode:"+20",flag:"🇪🇬"},{code:"ZA",name:"South Africa",dialCode:"+27",flag:"🇿🇦"},{code:"NG",name:"Nigeria",dialCode:"+234",flag:"🇳🇬"},{code:"KE",name:"Kenya",dialCode:"+254",flag:"🇰🇪"},{code:"IN",name:"India",dialCode:"+91",flag:"🇮🇳"},{code:"CN",name:"China",dialCode:"+86",flag:"🇨🇳"},{code:"JP",name:"Japan",dialCode:"+81",flag:"🇯🇵"},{code:"KR",name:"South Korea",dialCode:"+82",flag:"🇰🇷"},{code:"SG",name:"Singapore",dialCode:"+65",flag:"🇸🇬"},{code:"MY",name:"Malaysia",dialCode:"+60",flag:"🇲🇾"},{code:"TH",name:"Thailand",dialCode:"+66",flag:"🇹🇭"},{code:"PH",name:"Philippines",dialCode:"+63",flag:"🇵🇭"},{code:"ID",name:"Indonesia",dialCode:"+62",flag:"🇮🇩"},{code:"VN",name:"Vietnam",dialCode:"+84",flag:"🇻🇳"},{code:"HK",name:"Hong Kong",dialCode:"+852",flag:"🇭🇰"},{code:"TW",name:"Taiwan",dialCode:"+886",flag:"🇹🇼"},{code:"NZ",name:"New Zealand",dialCode:"+64",flag:"🇳🇿"},{code:"MX",name:"Mexico",dialCode:"+52",flag:"🇲🇽"},{code:"BR",name:"Brazil",dialCode:"+55",flag:"🇧🇷"},{code:"AR",name:"Argentina",dialCode:"+54",flag:"🇦🇷"},{code:"CL",name:"Chile",dialCode:"+56",flag:"🇨🇱"},{code:"CO",name:"Colombia",dialCode:"+57",flag:"🇨🇴"},{code:"PE",name:"Peru",dialCode:"+51",flag:"🇵🇪"},{code:"VE",name:"Venezuela",dialCode:"+58",flag:"🇻🇪"}],Iv=Ov.find(e=>"US"===e.code)||Ov[0],Tv=(e,t)=>{const r=(n=e,Ov.find(e=>e.code===n));var n;if(!r)return t;const i=t.replace(/\D/g,"");return`${r.dialCode}${i}`};function Pv({selectedCountry:e,onCountryChange:t,className:r="",disabled:n=!1}){const[i,a]=Te.useState(!1),[o,s]=Te.useState(""),A=Te.useRef(null),l=Ov.filter(e=>e.name.toLowerCase().includes(o.toLowerCase())||e.code.toLowerCase().includes(o.toLowerCase())||e.dialCode.includes(o));Te.useEffect(()=>{const e=e=>{A.current&&!A.current.contains(e.target)&&a(!1)};return i&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[i]);return Ie.jsxs("div",{ref:A,className:`relative ${r}`,children:[Ie.jsxs("button",{type:"button",onClick:()=>!n&&a(!i),disabled:n,className:"flex items-center gap-2 px-3 py-2.5 text-sm border rounded-lg transition-all "+(n?"bg-gray-50 text-gray-500 cursor-not-allowed border-gray-200":"bg-white border-gray-200 hover:border-gray-300 cursor-pointer"),children:[Ie.jsx("span",{className:"text-lg",children:e.flag}),Ie.jsx("span",{className:"text-gray-700 font-medium",children:e.dialCode}),!n&&Ie.jsx(cf,{className:"w-4 h-4 text-gray-400 transition-transform "+(i?"rotate-180":"")})]}),i&&!n&&Ie.jsxs("div",{className:"absolute z-50 w-80 mt-1 bg-white border border-gray-200 rounded-lg shadow-lg overflow-hidden",children:[Ie.jsx("div",{className:"p-3 border-b border-gray-100",children:Ie.jsxs("div",{className:"relative",children:[Ie.jsx(tm,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),Ie.jsx("input",{type:"text",value:o,onChange:e=>s(e.target.value),placeholder:"Search country...",className:"w-full pl-9 pr-3 py-2 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2",autoFocus:!0})]})}),Ie.jsx("div",{className:"max-h-60 overflow-y-auto",children:0===l.length?Ie.jsx("div",{className:"px-3 py-4 text-sm text-gray-500 text-center",children:"No countries found"}):l.map(r=>Ie.jsxs("button",{type:"button",onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),(e=>{t(e),a(!1),s("")})(r)},className:"w-full px-3 py-2.5 text-sm text-left transition-colors flex items-center gap-3 hover:bg-gray-50 "+(e.code===r.code?"bg-blue-50 text-blue-600":"text-gray-700"),children:[Ie.jsx("span",{className:"text-lg",children:r.flag}),Ie.jsxs("div",{className:"flex-1",children:[Ie.jsx("div",{className:"font-medium",children:r.name}),Ie.jsx("div",{className:"text-xs text-gray-500",children:r.code})]}),Ie.jsx("span",{className:"font-medium text-gray-600",children:r.dialCode})]},r.code))})]})]})}const Mv=["January","February","March","April","May","June","July","August","September","October","November","December"],Dv=["Su","Mo","Tu","We","Th","Fr","Sa"];function Lv({value:e,onChange:t,label:r,required:n=!1,error:i,minDate:a,placeholder:o="Select date and time",primaryColor:s="#1e40af"}){const[A,l]=Te.useState(!1),[c,u]=Te.useState(vv()),[d,h]=Te.useState(null),[p,f]=Te.useState({hours:"09",minutes:"00"}),[m,g]=Te.useState("bottom"),y=Te.useRef(null),v=Te.useRef(null);Te.useEffect(()=>{if(e){const t=vv(e);t.isValid()&&(h(t),u(t),f({hours:t.format("HH"),minutes:t.format("mm")}))}else h(null)},[e]),Te.useEffect(()=>{if(!A)return;const e=e=>{const r=e.target;if(y.current&&!y.current.contains(r)){if(d){const e=""===p.hours?0:parseInt(p.hours,10),r=""===p.minutes?0:parseInt(p.minutes,10),n=d.hour(e).minute(r).second(0).millisecond(0).format("YYYY-MM-DDTHH:mm:ss");t(n)}l(!1)}},r=setTimeout(()=>{document.addEventListener("mousedown",e)},0);return()=>{clearTimeout(r),document.removeEventListener("mousedown",e)}},[A,d,p,t]);const x=Te.useCallback(e=>{h(e)},[]),w=Te.useCallback((e,t)=>{if(""===t)return void f(t=>({...t,[e]:""}));const r=t.replace(/\D/g,"");if(""===r)return;const n=r.slice(0,2);f(t=>({...t,[e]:n}))},[]),b=Te.useCallback(e=>{f(t=>{const r=t[e];if(""===r)return{...t,[e]:"00"};let n=parseInt(r,10);return isNaN(n)&&(n=0),n="hours"===e?Math.max(0,Math.min(23,n)):Math.max(0,Math.min(59,n)),{...t,[e]:n.toString().padStart(2,"0")}})},[]),B=Te.useCallback(()=>{if(d){const e=""===p.hours?0:parseInt(p.hours,10),r=""===p.minutes?0:parseInt(p.minutes,10),n=d.hour(e).minute(r).second(0).millisecond(0).format("YYYY-MM-DDTHH:mm:ss");t(n),l(!1)}},[d,p,t]),C=Te.useCallback(()=>{if(!y.current)return"bottom";const e=y.current.getBoundingClientRect(),t=window.innerHeight-e.bottom,r=e.top;return t>=320?"bottom":t<320&&r>=320||r>t&&r>50?"top":"bottom"},[]),E=Te.useCallback(e=>{e.preventDefault(),e.stopPropagation(),A||g(C()),l(e=>!e)},[A,C]),k=Te.useCallback(e=>{e.preventDefault(),e.stopPropagation(),t(""),h(null),f({hours:"09",minutes:"00"})},[t]),S=Te.useCallback(e=>{u(t=>"prev"===e?t.subtract(1,"month"):t.add(1,"month"))},[]),j=Te.useCallback(()=>{const e=vv();u(e),h(e),f({hours:e.format("HH"),minutes:e.format("mm")})},[]);Te.useCallback((e,t)=>{f({hours:e.toString().padStart(2,"0"),minutes:t.toString().padStart(2,"0")})},[]);const F=Te.useCallback(()=>{if(e){const t=vv(e);t.isValid()&&(h(t),u(t),f({hours:t.format("HH"),minutes:t.format("mm")}))}else h(null),f({hours:"09",minutes:"00"});l(!1)},[e]),Q=Te.useCallback(()=>{const e=c.startOf("month"),t=c.endOf("month"),r=e.day(),n=t.date(),i=[];for(let a=0;a<r;a++)i.push(null);for(let a=1;a<=n;a++)i.push(c.date(a));return i},[c]),N=Te.useCallback(e=>!!a&&e.isBefore(vv(a).startOf("day")),[a]),U=Te.useCallback(e=>d&&e.isSame(d,"day"),[d]),O=Te.useCallback(e=>e.isSame(vv(),"day"),[]),I=d?`${d.format("MMM DD, YYYY")} at ${p.hours||"00"}:${p.minutes||"00"}`:"",T=Te.useCallback(e=>{e.stopPropagation()},[]);return Ie.jsxs("div",{ref:y,className:"relative",children:[Ie.jsxs("label",{className:"text-xs font-medium text-gray-600 mb-1.5 block",children:[r," ",n&&Ie.jsx("span",{className:"text-red-500",children:"*"})]}),Ie.jsxs("div",{onClick:E,className:`w-full flex items-center gap-2 px-3 py-2.5 text-sm rounded-lg border transition-all cursor-pointer ${i?"border-red-300 bg-white":e?"border-gray-300 bg-white":"border-gray-200 bg-gray-50"} hover:border-gray-300`,style:!i&&e?{borderColor:s}:void 0,children:[Ie.jsx(af,{className:"w-4 h-4 text-gray-400 flex-shrink-0"}),Ie.jsx("span",{className:"flex-1 "+(e?"text-gray-900":"text-gray-500"),children:I||o}),e&&Ie.jsx("button",{type:"button",onClick:k,className:"p-0.5 hover:bg-gray-100 rounded transition-colors",children:Ie.jsx(bm,{className:"w-3.5 h-3.5 text-gray-400"})})]}),i&&Ie.jsx("p",{className:"mt-1 text-xs text-red-500",children:i}),A&&Ie.jsxs("div",{ref:v,className:"absolute z-50 bg-white border border-gray-200 rounded-lg shadow-lg overflow-hidden "+("top"===m?"bottom-full mb-1":"top-full mt-1"),onClick:T,onMouseDown:T,children:[Ie.jsxs("div",{className:"flex",children:[Ie.jsxs("div",{className:"flex-shrink-0",children:[Ie.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-gray-200",style:{backgroundColor:`${s}10`},children:[Ie.jsx("button",{type:"button",onClick:()=>S("prev"),className:"p-0.5 hover:bg-white rounded-lg transition-colors shadow-sm",children:Ie.jsx(uf,{className:"w-3 h-3",style:{color:s}})}),Ie.jsxs("span",{className:"text-xs font-bold",style:{color:s},children:[Mv[c.month()]," ",c.year()]}),Ie.jsx("button",{type:"button",onClick:()=>S("next"),className:"p-0.5 hover:bg-white rounded-lg transition-colors shadow-sm",children:Ie.jsx(df,{className:"w-3 h-3",style:{color:s}})})]}),Ie.jsxs("div",{className:"p-2",style:{width:"200px"},children:[Ie.jsx("div",{className:"grid grid-cols-7 gap-0.5 mb-1",children:Dv.map(e=>Ie.jsx("div",{className:"text-center text-xs font-medium text-gray-500 py-0.5",children:e},e))}),Ie.jsx("div",{className:"grid grid-cols-7 gap-0.5",children:Q().map((e,t)=>Ie.jsx("button",{type:"button",disabled:!e||e&&N(e),onClick:()=>e&&x(e),className:`\n aspect-square rounded text-xs font-medium transition-all\n ${e?U(e)?"text-white shadow-md scale-105":O(e)?"text-white shadow-sm":N(e)?"text-gray-300 cursor-not-allowed bg-gray-50":"text-gray-700 hover:bg-gray-100 hover:scale-105":"invisible"}\n `,style:e&&U(e)?{backgroundColor:s}:e&&O(e)&&!U(e)?{backgroundColor:`${s}80`}:void 0,children:null==e?void 0:e.date()},t))})]})]}),Ie.jsxs("div",{className:"border-l border-gray-100 bg-white flex flex-col",style:{width:"100px"},children:[Ie.jsx("div",{className:"px-2 py-2 border-b border-gray-100",style:{backgroundColor:`${s}08`},children:Ie.jsxs("div",{className:"flex items-center justify-center gap-1",children:[Ie.jsx(yf,{className:"w-3 h-3",style:{color:s}}),Ie.jsx("span",{className:"text-xs font-semibold",style:{color:s},children:"Time"})]})}),Ie.jsxs("div",{className:"flex-1 flex flex-col",children:[Ie.jsxs("div",{className:"flex items-center justify-center gap-1 px-2 py-2 border-b border-gray-100",children:[Ie.jsx("input",{type:"text",inputMode:"numeric",maxLength:2,value:p.hours,onChange:e=>w("hours",e.target.value),onBlur:()=>b("hours"),className:"w-8 py-1 text-xs text-center font-semibold rounded bg-gray-50 border border-gray-200 focus:outline-none focus:border-gray-400 transition-colors"}),Ie.jsx("span",{className:"text-gray-400 font-bold text-sm",children:":"}),Ie.jsx("input",{type:"text",inputMode:"numeric",maxLength:2,value:p.minutes,onChange:e=>w("minutes",e.target.value),onBlur:()=>b("minutes"),className:"w-8 py-1 text-xs text-center font-semibold rounded bg-gray-50 border border-gray-200 focus:outline-none focus:border-gray-400 transition-colors"})]}),Ie.jsxs("div",{className:"flex flex-1",children:[Ie.jsxs("div",{className:"flex-1 border-r border-gray-100",children:[Ie.jsx("div",{className:"text-center text-xs text-gray-400 py-1 border-b border-gray-50",children:"Hr"}),Ie.jsx("div",{className:"overflow-y-auto",style:{height:"120px"},children:Array.from({length:24},(e,t)=>t).map(e=>Ie.jsx("button",{type:"button",onClick:()=>f(t=>({...t,hours:e.toString().padStart(2,"0")})),className:"w-full py-1 text-xs font-medium transition-colors "+(parseInt(p.hours,10)===e?"text-white":"text-gray-600 hover:bg-gray-50"),style:parseInt(p.hours,10)===e?{backgroundColor:s}:void 0,children:e.toString().padStart(2,"0")},e))})]}),Ie.jsxs("div",{className:"flex-1",children:[Ie.jsx("div",{className:"text-center text-xs text-gray-400 py-1 border-b border-gray-50",children:"Min"}),Ie.jsx("div",{className:"overflow-y-auto",style:{height:"120px"},children:Array.from({length:12},(e,t)=>5*t).map(e=>Ie.jsx("button",{type:"button",onClick:()=>f(t=>({...t,minutes:e.toString().padStart(2,"0")})),className:"w-full py-1 text-xs font-medium transition-colors "+(parseInt(p.minutes,10)===e?"text-white":"text-gray-600 hover:bg-gray-50"),style:parseInt(p.minutes,10)===e?{backgroundColor:s}:void 0,children:e.toString().padStart(2,"0")},e))})]})]})]})]})]}),Ie.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-t border-gray-200 bg-gray-50",children:[Ie.jsx("button",{type:"button",onClick:()=>j(),className:"text-xs font-medium text-gray-600 hover:text-gray-900 transition-colors",children:"Today"}),Ie.jsxs("div",{className:"flex items-center gap-2",children:[Ie.jsx("button",{type:"button",onClick:F,className:"px-2 py-1 text-xs font-medium text-gray-600 hover:bg-gray-100 rounded transition-colors",children:"Cancel"}),Ie.jsx("button",{type:"button",onClick:B,disabled:!d,className:"px-2 py-1 text-xs font-medium text-white rounded transition-colors disabled:opacity-50 disabled:cursor-not-allowed",style:{backgroundColor:s},children:"Done"})]})]})]})]})}const Hv=[{value:"DRY VAN",label:"Dry Van"},{value:"REEFER",label:"Reefer"},{value:"FLATBED",label:"Flatbed"},{value:"STEP DECK",label:"Step Deck"},{value:"LOWBOY",label:"Lowboy"},{value:"CONESTOGA",label:"Conestoga"},{value:"POWER ONLY",label:"Power Only"},{value:"BOX TRUCK",label:"Box Truck"},{value:"SPRINTER VAN",label:"Sprinter Van"},{value:"HOTSHOT",label:"Hotshot"}],_v=[{value:"FTL",label:"Full Truckload (FTL)"},{value:"LTL",label:"Less Than Truckload (LTL)"},{value:"PARTIAL",label:"Partial Load"},{value:"DRYAGE",label:"Dry Age"}],Rv=[{value:48,label:"48 ft"},{value:53,label:"53 ft"},{value:26,label:"26 ft"},{value:24,label:"24 ft"},{value:20,label:"20 ft"}],Kv=[{value:"AL",label:"Alabama"},{value:"AK",label:"Alaska"},{value:"AZ",label:"Arizona"},{value:"AR",label:"Arkansas"},{value:"CA",label:"California"},{value:"CO",label:"Colorado"},{value:"CT",label:"Connecticut"},{value:"DE",label:"Delaware"},{value:"FL",label:"Florida"},{value:"GA",label:"Georgia"},{value:"HI",label:"Hawaii"},{value:"ID",label:"Idaho"},{value:"IL",label:"Illinois"},{value:"IN",label:"Indiana"},{value:"IA",label:"Iowa"},{value:"KS",label:"Kansas"},{value:"KY",label:"Kentucky"},{value:"LA",label:"Louisiana"},{value:"ME",label:"Maine"},{value:"MD",label:"Maryland"},{value:"MA",label:"Massachusetts"},{value:"MI",label:"Michigan"},{value:"MN",label:"Minnesota"},{value:"MS",label:"Mississippi"},{value:"MO",label:"Missouri"},{value:"MT",label:"Montana"},{value:"NE",label:"Nebraska"},{value:"NV",label:"Nevada"},{value:"NH",label:"New Hampshire"},{value:"NJ",label:"New Jersey"},{value:"NM",label:"New Mexico"},{value:"NY",label:"New York"},{value:"NC",label:"North Carolina"},{value:"ND",label:"North Dakota"},{value:"OH",label:"Ohio"},{value:"OK",label:"Oklahoma"},{value:"OR",label:"Oregon"},{value:"PA",label:"Pennsylvania"},{value:"RI",label:"Rhode Island"},{value:"SC",label:"South Carolina"},{value:"SD",label:"South Dakota"},{value:"TN",label:"Tennessee"},{value:"TX",label:"Texas"},{value:"UT",label:"Utah"},{value:"VT",label:"Vermont"},{value:"VA",label:"Virginia"},{value:"WA",label:"Washington"},{value:"WV",label:"West Virginia"},{value:"WI",label:"Wisconsin"},{value:"WY",label:"Wyoming"}],zv="pg_lead_shipper_";function Vv(e,t){try{const r={shipperCompanyName:t.shipperCompanyName,shipperName:t.shipperName,shipperPhone:t.shipperPhone,shipperAddress:t.shipperAddress,shipperCity:t.shipperCity,shipperState:t.shipperState,shipperZipCode:t.shipperZipCode,shipperLatitude:t.shipperLatitude,shipperLongitude:t.shipperLongitude};localStorage.setItem(`${zv}${e}`,JSON.stringify(r))}catch(eX){}}function $v(e){try{const t=localStorage.getItem(`${zv}${e}`);return t?JSON.parse(t):null}catch{return null}}function Wv(){var e;const{theme:t}=ea(),r=hg(),{leadId:n}=pg(),[i]=ry(),{currentLead:a,setCurrentLead:o}=fv(),[s,A]=Te.useState(null);Te.useEffect(()=>{const e=i.get("from");let t=null;if(e)try{localStorage.setItem(`pg_lead_action_from_${n}`,e),t=e,console.log(`[LeadAction] Stored fromPage: ${e} for lead: ${n}`)}catch(eX){}else try{t=localStorage.getItem(`pg_lead_action_from_${n}`),console.log(`[LeadAction] Retrieved fromPage: ${t} for lead: ${n}`)}catch(eX){t=null}A(t)},[i,n]);const l=()=>{try{localStorage.removeItem(`pg_lead_action_from_${n}`),console.log(`[LeadAction] Cleared fromPage for lead: ${n} on back navigation`)}catch(eX){}r("detail"===s?`/email-leads/${n}`:"/email-leads")},[c,u]=Te.useState(a),[d,h]=Te.useState(!a),[p,f]=Te.useState(!1),[m,g]=Te.useState(null),[y,v]=Te.useState(!1),[x,w]=Te.useState([]),[b,B]=Te.useState(!1),[C,E]=Te.useState(null);Te.useEffect(()=>()=>{try{localStorage.removeItem(`pg_lead_action_from_${n}`),console.log(`[LeadAction] Cleared fromPage for lead: ${n} on unmount`)}catch(eX){}},[n]);const k=e=>({equipmentType:(null==e?void 0:e.equipmentType)||"",loadType:(null==e?void 0:e.loadType)||"",equipmentSize:(null==e?void 0:e.equipmentSize)||53,shipperTargetPrice:(null==e?void 0:e.shipperTargetPrice)||null,pickupTimestamp:(null==e?void 0:e.pickupTimestamp)||"",deliveryTimestamp:(null==e?void 0:e.deliveryTimestamp)||"",shipperCompanyName:(null==e?void 0:e.shipperCompanyName)||"",shipperName:(null==e?void 0:e.shipperName)||"",shipperEmail:(null==e?void 0:e.shipperEmail)||"",shipperPhone:(null==e?void 0:e.shipperPhone)||"",shipperCountryCode:(null==e?void 0:e.shipperCountryCode)||Iv.code,shipperAddress:(null==e?void 0:e.shipperAddress)||"",shipperCity:(null==e?void 0:e.shipperCity)||"",shipperState:(null==e?void 0:e.shipperState)||"",shipperZipCode:(null==e?void 0:e.shipperZipCode)||"",shipperLatitude:(null==e?void 0:e.shipperLatitude)||null,shipperLongitude:(null==e?void 0:e.shipperLongitude)||null}),[S,j]=Te.useState(()=>k(a)),F=Te.useMemo(()=>!0===(null==c?void 0:c.prospectCreation),[null==c?void 0:c.prospectCreation]),Q=Te.useMemo(()=>!0===(null==c?void 0:c.requiredFields),[null==c?void 0:c.requiredFields]),N=Te.useMemo(()=>!F&&!Q,[F,Q]),U=Te.useMemo(()=>{const e=[];return F&&e.push({id:"shipper",label:"Shipper Info",description:"Contact & address details",icon:Ie.jsx(gm,{className:"w-4 h-4"})}),Q&&e.push({id:"load",label:"Load Details",description:"Equipment & pricing",icon:Ie.jsx(fm,{className:"w-4 h-4"})}),e},[F,Q]),[O,I]=Te.useState(0),T=U[O]||null,P=O===U.length-1,M=0===O,D=U.length,[L,H]=Te.useState(!1),[_,R]=Te.useState(""),[K,z]=Te.useState(!1),V=x.filter(e=>e.label.toLowerCase().includes(_.toLowerCase())||e.value.toLowerCase().includes(_.toLowerCase())),[$,W]=Te.useState(()=>Ov.find(e=>e.code===S.shipperCountryCode)||Iv),[G,q]=Te.useState({}),Y=t.primaryColor||"#1e40af";Te.useEffect(()=>{if(S.shipperCountryCode){const e=Ov.find(e=>e.code===S.shipperCountryCode);e&&e.code!==$.code&&W(e)}},[S.shipperCountryCode,$.code]),Te.useEffect(()=>{if("load"===(null==T?void 0:T.id)&&(null==c?void 0:c.prospectCreation)&&(null==c?void 0:c.requiredFields)){z(!0);const e=setTimeout(()=>{z(!1)},5e3);return()=>clearTimeout(e)}},[T,c]),Te.useEffect(()=>{(async()=>{if(n){if(a&&a.id===n){u(a);const e=k(a),t=$v(n);return t&&Object.assign(e,t),j(e),void h(!1)}try{h(!0);const e=await Dp.getLeadById(n);u(e),o(e);const t=k(e),r=$v(n);r&&Object.assign(t,r),j(t)}catch(e){g(e.message||"Failed to load lead details")}finally{h(!1)}}})()},[n,a,o]),Te.useEffect(()=>{(async()=>{try{B(!0),E(null);const e=(await Dp.getEquipmentTypes()).map(e=>({value:e.toUpperCase().replace(/\s+/g,"_"),label:e}));w(e)}catch(e){console.error("Failed to fetch equipment types:",e),E(e.message||"Failed to load equipment types"),w(Hv)}finally{B(!1)}})()},[]);const X=Te.useCallback(()=>{var e,t,r,n;const i={};if((null==(e=S.shipperName)?void 0:e.trim())||(i.shipperName="Shipper name is required"),(null==(t=S.shipperEmail)?void 0:t.trim())?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(S.shipperEmail)||(i.shipperEmail="Invalid email format"):i.shipperEmail="Email is required",null==(r=S.shipperPhone)?void 0:r.trim()){const e=S.shipperPhone.trim();if(e.startsWith("+1"))i.shipperPhone="Please enter phone number without country code (+1)";else if("+1"===$.dialCode){/^(\(\d{3}\)-\d{3}-\d{4}|\d{3}-\s\d{3}-\d{4}|\d{10})$/.test(e)||(i.shipperPhone="Invalid US phone format. Use: (302)-244-8111, 302- 244-8111, or 3022448111")}}if(null==(n=S.shipperZipCode)?void 0:n.trim()){5!==S.shipperZipCode.trim().replace(/\D/g,"").length&&(i.shipperZipCode="Zip code must be exactly 5 digits")}return i},[S.shipperName,S.shipperEmail,S.shipperPhone,S.shipperZipCode]),J=Te.useCallback(()=>{const e={};if(S.equipmentType||(e.equipmentType="Equipment type is required"),S.loadType||(e.loadType="Load type is required"),(!S.equipmentSize||S.equipmentSize<=0)&&(e.equipmentSize="Equipment size is required"),(!S.shipperTargetPrice||S.shipperTargetPrice<=0)&&(e.shipperTargetPrice="Shipper target price is required"),S.pickupTimestamp||(e.pickupTimestamp="Pickup date & time is required"),S.deliveryTimestamp){if(S.pickupTimestamp){const t=new Date(S.pickupTimestamp);new Date(S.deliveryTimestamp)<=t&&(e.deliveryTimestamp="Delivery must be after pickup")}}else e.deliveryTimestamp="Delivery date & time is required";return e},[S.equipmentType,S.loadType,S.equipmentSize,S.shipperTargetPrice,S.pickupTimestamp,S.deliveryTimestamp]),Z=Te.useCallback(()=>{if(!T)return!0;const e="shipper"===T.id?X():J();return q(e),0===Object.keys(e).length},[T,X,J]),ee=(e,t)=>{j(r=>{const i={...r,[e]:t};return n&&e.startsWith("shipper")&&"shipperTargetPrice"!==e&&Vv(n,i),i}),Object.keys(G).length>0&&q({})},te=async e=>{var t,i,a,A,l,c,d;if(e.preventDefault(),Z()&&n)try{f(!0),g(null);const e={};if(Q&&(e.equipmentType=S.equipmentType,e.equipmentSize=S.equipmentSize,e.loadType=S.loadType,e.shipperTargetPrice=S.shipperTargetPrice||void 0,e.pickupTimestamp=S.pickupTimestamp||void 0,e.deliveryTimestamp=S.deliveryTimestamp||void 0),F){e.shipperName=S.shipperName,e.shipperEmail=S.shipperEmail,e.shipperCompanyName=(null==(t=S.shipperCompanyName)?void 0:t.trim())||"TBD";const r=(null==(a=null==(i=S.shipperPhone)?void 0:i.trim())?void 0:a.replace(/[()-]/g,""))||"",n=r?Tv(S.shipperCountryCode,r):"TBD";e.shipperPhone=n,e.shipperCountryCode=S.shipperCountryCode,e.shipperAddress=(null==(A=S.shipperAddress)?void 0:A.trim())||"TBD",e.shipperCity=(null==(l=S.shipperCity)?void 0:l.trim())||"TBD",e.shipperState=(null==(c=S.shipperState)?void 0:c.trim())||"TBD",e.shipperZipCode=(null==(d=S.shipperZipCode)?void 0:d.trim())||"TBD",e.shipperLatitude=S.shipperLatitude??0,e.shipperLongitude=S.shipperLongitude??0}const h=await Dp.submitLeadAction(n,e);h.success&&(v(!0),u(h.lead),o(h.lead),function(e){try{localStorage.removeItem(`${zv}${e}`)}catch{}}(n),setTimeout(()=>{try{localStorage.removeItem(`pg_lead_action_from_${n}`),console.log(`[LeadAction] Cleared fromPage for lead: ${n} on success navigation`)}catch(e){}r("detail"===s?`/email-leads/${n}`:"/email-leads")},1500))}catch(h){g(h.message||"Failed to submit action")}finally{f(!1)}};if(d)return Ie.jsxs("div",{className:"flex flex-col h-full bg-gray-50 items-center justify-center",children:[Ie.jsx(If,{className:"w-8 h-8 animate-spin",style:{color:Y}}),Ie.jsx("p",{className:"mt-3 text-sm text-gray-500",children:"Loading lead details..."})]});if(m&&!c)return Ie.jsxs("div",{className:"flex flex-col h-full bg-gray-50 items-center justify-center p-6",children:[Ie.jsx(pf,{className:"w-12 h-12 text-red-500 mb-4"}),Ie.jsx("p",{className:"text-red-600 text-center mb-4",children:m}),Ie.jsx("button",{onClick:l,className:"px-4 py-2 text-sm font-medium text-white rounded-lg",style:{backgroundColor:Y},children:"Go Back"})]});return Ie.jsxs("div",{className:"flex flex-col h-full bg-gray-50",style:{fontFamily:t.fontFamily},children:[Ie.jsxs("div",{className:"px-4 py-3 flex items-center gap-3 border-b bg-white",style:{borderBottomColor:`${Y}20`},children:[Ie.jsx("button",{onClick:l,className:"p-2 rounded-lg hover:bg-gray-100 transition-colors",children:Ie.jsx(Xp,{className:"w-5 h-5 text-gray-600"})}),Ie.jsxs("div",{className:"flex-1",children:[Ie.jsx("h1",{className:"text-lg font-semibold text-gray-900",children:(null==c?void 0:c.requiredFields)&&(null==c?void 0:c.prospectCreation)?"Update Shipper & Load Details":(null==c?void 0:c.prospectCreation)?"Update Shipper Information":(null==c?void 0:c.requiredFields)?"Update Load Details":"Update Lead Details"}),Ie.jsxs("p",{className:"text-xs text-gray-500",children:[null==c?void 0:c.shipperName," • ",null==c?void 0:c.origin," → ",null==c?void 0:c.destination]})]})]}),D>0&&!N&&Ie.jsx("div",{className:"bg-white border-b border-gray-100 px-4 py-3",children:Ie.jsx("div",{className:"flex items-center gap-3",children:U.map((e,t)=>{const r=(e=>e<O?"completed":e===O?"active":"upcoming")(t),n=t<O;return Ie.jsxs(Te.Fragment,{children:[t>0&&Ie.jsx("div",{className:"flex-1 h-0.5 rounded-full bg-gray-200 overflow-hidden",children:Ie.jsx(ch.div,{className:"h-full rounded-full",style:{backgroundColor:Y},initial:!1,animate:{width:"upcoming"===r?"0%":"100%"},transition:{duration:.3}})}),Ie.jsxs("button",{type:"button",onClick:()=>{n&&(q({}),I(t),setTimeout(()=>{const e=document.querySelector(".pg-lead-action-form");e&&e.scrollTo({top:0,behavior:"smooth"})},50))},disabled:!n,className:"flex items-center gap-2 "+(n?"cursor-pointer":"cursor-default"),children:[Ie.jsx("div",{className:"w-7 h-7 rounded-full flex items-center justify-center text-xs font-semibold transition-all",style:"completed"===r?{backgroundColor:Y,color:"#fff"}:"active"===r?{backgroundColor:`${Y}15`,color:Y,border:`2px solid ${Y}`}:{backgroundColor:"#f1f5f9",color:"#94a3b8"},children:"completed"===r?Ie.jsx(ff,{className:"w-4 h-4"}):t+1}),Ie.jsx("span",{className:"text-xs font-medium block",style:{color:"active"===r?Y:"completed"===r?"#475569":"#94a3b8"},children:"shipper"===e.id?"Shipper Information":"load"===e.id?"Load Information":e.label})]})]},e.id)})})}),y&&Ie.jsxs(ch.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"mx-4 mt-4 p-4 bg-green-50 border border-green-200 rounded-xl flex items-center gap-3",children:[Ie.jsx(ff,{className:"w-5 h-5 text-green-600 flex-shrink-0"}),Ie.jsxs("div",{children:[Ie.jsx("p",{className:"text-sm font-medium text-green-800",children:"Action submitted successfully!"}),Ie.jsx("p",{className:"text-xs text-green-600",children:"Redirecting to lead details..."})]})]}),m&&c&&Ie.jsxs(ch.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"mx-4 mt-4 p-4 bg-red-50 border border-red-200 rounded-xl flex items-center gap-3",children:[Ie.jsx(pf,{className:"w-5 h-5 text-red-600 flex-shrink-0"}),Ie.jsx("p",{className:"text-sm text-red-600",children:m})]}),Ie.jsxs("form",{onSubmit:te,className:"pg-lead-action-form flex-1 overflow-y-auto p-4 space-y-4",children:[N&&!y&&Ie.jsx("div",{className:"bg-blue-50 rounded-xl border border-blue-200 p-4",children:Ie.jsxs("div",{className:"flex items-center gap-3",children:[Ie.jsx(ff,{className:"w-5 h-5 text-blue-600 flex-shrink-0"}),Ie.jsxs("div",{children:[Ie.jsx("p",{className:"text-sm font-medium text-blue-800",children:"No additional information required"}),Ie.jsx("p",{className:"text-xs text-blue-600 mt-1",children:"This lead doesn't require any additional details to be filled."})]})]})}),Ie.jsxs(hl,{mode:"wait",children:["shipper"===(null==T?void 0:T.id)&&Ie.jsxs(ch.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.2},className:"space-y-3",children:[Ie.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 p-4 space-y-3",children:[Ie.jsxs("h4",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wide flex items-center gap-1.5",children:[Ie.jsx(gm,{className:"w-3.5 h-3.5",style:{color:Y}}),"Contact Details"]}),Ie.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[Ie.jsxs("div",{children:[Ie.jsx("label",{className:"text-xs font-medium text-gray-600 mb-1.5 block",children:"Company"}),Ie.jsx("input",{type:"text",value:S.shipperCompanyName,onChange:e=>ee("shipperCompanyName",e.target.value),placeholder:"Company name",className:"w-full px-3 py-2.5 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2",style:{"--tw-ring-color":`${Y}40`}})]}),Ie.jsxs("div",{children:[Ie.jsxs("label",{className:"text-xs font-medium text-gray-600 mb-1.5 block",children:["Name ",Ie.jsx("span",{className:"text-red-500",children:"*"})]}),Ie.jsx("input",{type:"text",value:S.shipperName,onChange:e=>ee("shipperName",e.target.value),placeholder:"Contact name",className:"w-full px-3 py-2.5 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2",style:{"--tw-ring-color":`${Y}40`}}),G.shipperName&&Ie.jsx("p",{className:"mt-1 text-xs text-red-500",children:G.shipperName})]})]}),Ie.jsxs("div",{className:"grid grid-cols-1 gap-3",children:[Ie.jsxs("div",{children:[Ie.jsxs("label",{className:"text-xs font-medium text-gray-600 mb-1.5 block",children:["Email ",Ie.jsx("span",{className:"text-red-500",children:"*"})]}),Ie.jsx("input",{type:"email",value:S.shipperEmail,disabled:!0,className:"w-full px-3 py-2.5 text-sm border border-gray-200 rounded-lg bg-gray-50 text-gray-500 cursor-not-allowed"}),G.shipperEmail&&Ie.jsx("p",{className:"mt-1 text-xs text-red-500",children:G.shipperEmail})]}),Ie.jsxs("div",{children:[Ie.jsx("label",{className:"text-xs font-medium text-gray-600 mb-1.5 block",children:"Phone"}),Ie.jsxs("div",{className:"flex gap-2",children:[Ie.jsx(Pv,{selectedCountry:$,onCountryChange:e=>{W(e),j(t=>{const r={...t,shipperCountryCode:e.code};return n&&Vv(n,r),r}),Object.keys(G).length>0&&q({})},className:"w-28"}),Ie.jsx("input",{type:"tel",value:S.shipperPhone,onChange:e=>ee("shipperPhone",e.target.value),placeholder:"3022448111",maxLength:14,className:"flex-1 px-3 py-2.5 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2",style:{"--tw-ring-color":`${Y}40`}})]}),G.shipperPhone&&Ie.jsx("p",{className:"mt-1 text-xs text-red-500",children:G.shipperPhone})]})]})]}),Ie.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 p-4 space-y-3",children:[Ie.jsxs("h4",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wide flex items-center gap-1.5",children:[Ie.jsx(Mf,{className:"w-3.5 h-3.5",style:{color:Y}}),"Address (Optional)"]}),Ie.jsxs("div",{children:[Ie.jsx("label",{className:"text-xs font-medium text-gray-600 mb-1.5 block",children:"Street"}),Ie.jsx("input",{type:"text",value:S.shipperAddress,maxLength:75,onChange:e=>ee("shipperAddress",e.target.value),placeholder:"Street address",className:"w-full px-3 py-2.5 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2",style:{"--tw-ring-color":`${Y}40`}})]}),Ie.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[Ie.jsxs("div",{children:[Ie.jsx("label",{className:"text-xs font-medium text-gray-600 mb-1.5 block",children:"City"}),Ie.jsx("input",{type:"text",value:S.shipperCity,maxLength:75,onChange:e=>ee("shipperCity",e.target.value),placeholder:"City",className:"w-full px-3 py-2.5 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2",style:{"--tw-ring-color":`${Y}40`}})]}),Ie.jsxs("div",{children:[Ie.jsx("label",{className:"text-xs font-medium text-gray-600 mb-1.5 block",children:"State"}),Ie.jsxs("select",{value:S.shipperState,onChange:e=>ee("shipperState",e.target.value),className:"w-full px-3 py-2.5 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2 bg-white",style:{"--tw-ring-color":`${Y}40`},children:[Ie.jsx("option",{value:"",children:"Select"}),Kv.map(e=>Ie.jsx("option",{value:e.value,children:e.label},e.value))]})]}),Ie.jsxs("div",{children:[Ie.jsx("label",{className:"text-xs font-medium text-gray-600 mb-1.5 block",children:"Zip"}),Ie.jsx("input",{type:"text",value:S.shipperZipCode,maxLength:5,onChange:e=>ee("shipperZipCode",e.target.value),placeholder:"12345",className:"w-full px-3 py-2.5 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2",style:{"--tw-ring-color":`${Y}40`}}),G.shipperZipCode&&Ie.jsx("p",{className:"mt-1 text-xs text-red-500",children:G.shipperZipCode})]})]})]})]},"shipper"),"load"===(null==T?void 0:T.id)&&Ie.jsxs(ch.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.2},className:"space-y-3",children:[K&&Ie.jsxs(ch.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"bg-amber-50 border border-amber-200 rounded-xl p-3 flex items-center gap-3",children:[Ie.jsx(pf,{className:"w-4 h-4 text-amber-600 flex-shrink-0"}),Ie.jsx("p",{className:"text-xs text-amber-700",children:"Please complete the Load Information to finalize your lead details"})]}),Ie.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 p-4 space-y-3",children:[Ie.jsxs("h4",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wide flex items-center gap-1.5",children:[Ie.jsx(fm,{className:"w-3.5 h-3.5",style:{color:Y}}),"Equipment"]}),Ie.jsxs("div",{children:[Ie.jsxs("label",{className:"text-xs font-medium text-gray-600 mb-1.5 block",children:["Type ",Ie.jsx("span",{className:"text-red-500",children:"*"})]}),Ie.jsxs("div",{className:"relative",children:[Ie.jsxs("button",{type:"button",onClick:()=>H(!L),className:"w-full flex items-center justify-between px-3 py-2.5 text-sm rounded-lg border transition-all "+(S.equipmentType?"border-gray-300 bg-white":"border-gray-200 bg-gray-50"),style:S.equipmentType?{borderColor:Y}:void 0,children:[Ie.jsx("span",{className:S.equipmentType?"text-gray-900":"text-gray-500",children:S.equipmentType?(null==(e=x.find(e=>e.value===S.equipmentType))?void 0:e.label)||S.equipmentType:"Select type..."}),Ie.jsxs("div",{className:"flex items-center gap-1",children:[S.equipmentType&&Ie.jsx("button",{type:"button",onClick:e=>{e.stopPropagation(),ee("equipmentType","")},className:"p-0.5 hover:bg-gray-100 rounded",children:Ie.jsx(bm,{className:"w-3.5 h-3.5 text-gray-400"})}),Ie.jsx(cf,{className:"w-4 h-4 text-gray-400 transition-transform "+(L?"rotate-180":"")})]})]}),L&&Ie.jsxs("div",{className:"absolute z-50 w-full mt-1 bg-white border border-gray-200 rounded-lg shadow-lg overflow-hidden",children:[Ie.jsx("div",{className:"p-2 border-b border-gray-100",children:Ie.jsxs("div",{className:"relative",children:[Ie.jsx(tm,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-gray-400"}),Ie.jsx("input",{type:"text",value:_,onChange:e=>R(e.target.value),placeholder:"Search...",className:"w-full pl-8 pr-3 py-2 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2",style:{"--tw-ring-color":`${Y}40`},autoFocus:!0})]})}),Ie.jsx("div",{className:"max-h-40 overflow-y-auto",children:b?Ie.jsxs("div",{className:"px-3 py-4 text-sm text-gray-500 text-center flex items-center justify-center gap-2",children:[Ie.jsx(If,{className:"w-3.5 h-3.5 animate-spin"}),"Loading equipment types..."]}):C?Ie.jsx("div",{className:"px-3 py-2 text-sm text-red-500 text-center",children:C}):0===V.length?Ie.jsx("div",{className:"px-3 py-2 text-sm text-gray-500 text-center",children:"No results"}):V.map(e=>Ie.jsxs("button",{type:"button",onClick:()=>{ee("equipmentType",e.value),H(!1),R("")},className:"w-full px-3 py-2 text-sm text-left transition-colors flex items-center justify-between "+(S.equipmentType===e.value?"text-white":"text-gray-700 hover:bg-gray-50"),style:S.equipmentType===e.value?{backgroundColor:Y}:void 0,children:[Ie.jsx("span",{children:e.label}),S.equipmentType===e.value&&Ie.jsx(ff,{className:"w-3.5 h-3.5"})]},e.value))})]})]}),G.equipmentType&&Ie.jsx("p",{className:"mt-1 text-xs text-red-500",children:G.equipmentType})]}),Ie.jsxs("div",{children:[Ie.jsxs("label",{className:"text-xs font-medium text-gray-600 mb-1.5 block",children:["Size ",Ie.jsx("span",{className:"text-red-500",children:"*"})]}),Ie.jsxs("div",{className:"flex flex-wrap gap-2",children:[Rv.map(e=>Ie.jsx("button",{type:"button",onClick:()=>ee("equipmentSize",e.value),className:"px-3 py-2 text-xs rounded-lg border transition-all "+(S.equipmentSize===e.value?"border-transparent text-white":"border-gray-200 text-gray-600 hover:border-gray-300 bg-white"),style:S.equipmentSize===e.value?{backgroundColor:Y}:void 0,children:e.label},e.value)),Ie.jsxs("div",{className:"flex items-center gap-1.5",children:[Ie.jsx("span",{className:"text-xs text-gray-500",children:"Custom:"}),Ie.jsx("input",{type:"number",value:S.equipmentSize,onChange:e=>ee("equipmentSize",parseInt(e.target.value)||0),className:"w-16 px-2 py-2 text-xs border border-gray-200 rounded-lg focus:outline-none focus:ring-2 text-center",style:{"--tw-ring-color":`${Y}40`},min:1,max:100}),Ie.jsx("span",{className:"text-xs text-gray-500",children:"ft"})]})]}),G.equipmentSize&&Ie.jsx("p",{className:"mt-1 text-xs text-red-500",children:G.equipmentSize})]})]}),Ie.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 p-4 space-y-3",children:[Ie.jsxs("h4",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wide flex items-center gap-1.5",children:[Ie.jsx($f,{className:"w-3.5 h-3.5",style:{color:Y}}),"Load & Pricing"]}),Ie.jsxs("div",{children:[Ie.jsxs("label",{className:"text-xs font-medium text-gray-600 mb-1.5 block",children:["Load Type ",Ie.jsx("span",{className:"text-red-500",children:"*"})]}),Ie.jsx("div",{className:"flex gap-2",children:_v.map(e=>Ie.jsx("button",{type:"button",onClick:()=>ee("loadType",e.value),className:"flex-1 px-3 py-2.5 text-xs rounded-lg border transition-all text-center "+(S.loadType===e.value?"border-transparent text-white":"border-gray-200 text-gray-600 hover:border-gray-300 bg-white"),style:S.loadType===e.value?{backgroundColor:Y}:void 0,children:e.value},e.value))}),G.loadType&&Ie.jsx("p",{className:"mt-1 text-xs text-red-500",children:G.loadType})]}),Ie.jsxs("div",{children:[Ie.jsxs("label",{className:"text-xs font-medium text-gray-600 mb-1.5 block",children:["Target Price ",Ie.jsx("span",{className:"text-red-500",children:"*"})]}),Ie.jsxs("div",{className:"relative",children:[Ie.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-500 text-sm font-medium pointer-events-none",children:"$"}),Ie.jsx("input",{type:"number",value:S.shipperTargetPrice||"",onChange:e=>ee("shipperTargetPrice",e.target.value?parseFloat(e.target.value):null),placeholder:"0.00",className:"w-full pl-8 pr-3 py-2.5 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2",style:{"--tw-ring-color":`${Y}40`},min:0,step:.01})]}),G.shipperTargetPrice&&Ie.jsx("p",{className:"mt-1 text-xs text-red-500",children:G.shipperTargetPrice})]}),Ie.jsx(Lv,{value:S.pickupTimestamp,onChange:e=>ee("pickupTimestamp",e),label:"Pickup Date & Time",required:!0,error:G.pickupTimestamp,placeholder:"Select pickup date and time",primaryColor:Y}),Ie.jsx(Lv,{value:S.deliveryTimestamp,onChange:e=>ee("deliveryTimestamp",e),label:"Delivery Date & Time",required:!0,error:G.deliveryTimestamp,minDate:S.pickupTimestamp,placeholder:"Select delivery date and time",primaryColor:Y})]})]},"load")]}),Ie.jsx("div",{className:"h-24"})]}),Ie.jsxs("div",{className:"p-4 bg-white border-t border-gray-200 space-y-3",children:[Object.keys(G).length>0&&Ie.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 bg-red-50 border border-red-200 rounded-xl",children:[Ie.jsx(pf,{className:"w-4 h-4 text-red-500 flex-shrink-0"}),Ie.jsxs("p",{className:"text-sm text-red-600",children:["Please fix the ",Object.keys(G).length," error",Object.keys(G).length>1?"s":""," above before continuing."]})]}),N?Ie.jsxs("button",{type:"button",onClick:l,className:"w-full flex items-center justify-center gap-2 px-4 py-3 text-white font-medium rounded-xl transition-all",style:{backgroundColor:Y},children:[Ie.jsx(Xp,{className:"w-5 h-5"}),"Go Back"]}):Ie.jsxs("div",{className:"flex gap-3",children:[!M&&Ie.jsxs("button",{type:"button",onClick:()=>{q({}),I(e=>{const t=Math.max(e-1,0);return setTimeout(()=>{const e=document.querySelector(".pg-lead-action-form");e&&e.scrollTo({top:0,behavior:"smooth"})},50),t})},className:"flex items-center justify-center gap-2 px-4 py-3 text-sm font-medium rounded-xl border border-gray-200 text-gray-700 hover:bg-gray-50 transition-all",children:[Ie.jsx(Xp,{className:"w-4 h-4"}),"Back"]}),P?Ie.jsx("button",{type:"submit",onClick:te,disabled:p||y,className:"flex-1 flex items-center justify-center gap-2 px-4 py-3 text-white font-medium rounded-xl transition-all disabled:opacity-50 disabled:cursor-not-allowed",style:{backgroundColor:Y},children:p?Ie.jsxs(Ie.Fragment,{children:[Ie.jsx(If,{className:"w-5 h-5 animate-spin"})," Submitting..."]}):y?Ie.jsxs(Ie.Fragment,{children:[Ie.jsx(ff,{className:"w-5 h-5"})," Submitted!"]}):Ie.jsxs(Ie.Fragment,{children:[Ie.jsx(em,{className:"w-5 h-5"})," Submit"]})}):Ie.jsxs("button",{type:"button",onClick:()=>{Z()&&I(e=>{const t=Math.min(e+1,U.length-1);return setTimeout(()=>{const e=document.querySelector(".pg-lead-action-form");e&&e.scrollTo({top:0,behavior:"smooth"})},50),t})},className:"flex-1 flex items-center justify-center gap-2 px-4 py-3 text-white font-medium rounded-xl transition-all",style:{backgroundColor:Y},children:["Continue",Ie.jsx(Jp,{className:"w-5 h-5"})]})]})]})]})}class Gv{static async getEmailsLoadTodayCount(){return(await Vi.get("/crm/emails/me/metric/clasified_today_count")).data}static async getEmailsCarrierTodayCount(){return(await Vi.get("/crm/emails/me/metric/carrier_request_count")).data}static async getEmailsInternalTodayCount(){return(await Vi.get("/crm/emails/me/metric/internal_org_mail_count")).data}static async getLeadsTodayCount(){return(await Vi.get("/crm/leads/me/leads/count_today")).data}static async getLeadsTillDateCount(){return(await Vi.get("/crm/leads/me/leads/count_till_date")).data}static async getLeadsActionNeededCount(){return(await Vi.get("/crm/leads/me/leads/count_action_needed")).data}static async getLeadsProspectShipperCount(){return(await Vi.get("/crm/leads/me/leads/count_prospect_shipper")).data}static async getDashboardStats(){const[e,t,r,n,i,a,o]=await Promise.all([this.getEmailsLoadTodayCount(),this.getEmailsCarrierTodayCount(),this.getEmailsInternalTodayCount(),this.getLeadsTodayCount(),this.getLeadsTillDateCount(),this.getLeadsActionNeededCount(),this.getLeadsProspectShipperCount()]);return{emailsLoadToday:e.count??0,emailsCarrierToday:t.count??0,emailsInternalToday:r.count??0,leadsToday:n.count??0,leadsTillDate:i.count??0,leadsActionNeeded:a.count??0,leadsProspectShipper:o.count??0}}}function qv({title:e,value:t,borderColor:r,iconBg:n,iconColor:i,valueColor:a,icon:o="send"}){return Ie.jsxs("div",{className:"bg-white rounded-lg p-3 border-l-4 shadow-sm",style:{borderLeftColor:r},children:[Ie.jsxs("div",{className:"flex items-start gap-2 mb-2",children:[Ie.jsx("div",{className:"w-6 h-6 rounded-full flex items-center justify-center flex-shrink-0",style:{backgroundColor:n},children:"alert"===o?Ie.jsx(pm,{className:"w-3 h-3",style:{color:i}}):Ie.jsx(rm,{className:"w-3 h-3",style:{color:i}})}),Ie.jsx("span",{className:"text-xs text-gray-600 leading-tight",children:e})]}),Ie.jsx("div",{className:"border-t border-gray-100 pt-2",children:Ie.jsx("span",{className:"text-xl font-bold",style:{color:a||r},children:t})})]})}function Yv({primaryColor:e}){const t=(()=>{const e=[];for(let t=0;t<35;t++){const t=Math.random();e.push(t)}return e})();return Ie.jsx("div",{className:"grid grid-cols-7 gap-1",children:t.map((t,r)=>Ie.jsx("div",{className:"w-4 h-4 rounded-sm",style:{backgroundColor:t>.7?e:t>.4?`${e}99`:t>.2?`${e}44`:"#e5e7eb"}},r))})}function Xv(){var e;const{theme:t,user:r,environment:n}=ea(),i=hg(),[a,o]=Te.useState(null),[s,A]=Te.useState(!1),l=(new Date).toLocaleDateString("en-US",{weekday:"long",month:"long",day:"numeric",year:"numeric"}),c=t.primaryColor||"#1e40af",u=(null==(e=null==r?void 0:r.email)?void 0:e.split("@")[0])||"User",d=u.charAt(0).toUpperCase()+u.slice(1);return Te.useEffect(()=>{let e=!0;return A(!0),Gv.getDashboardStats().then(t=>{e&&o(t)}).catch(()=>{e&&o({emailsLoadToday:0,emailsCarrierToday:0,emailsInternalToday:0,leadsToday:0,leadsTillDate:0,leadsActionNeeded:0,leadsProspectShipper:0})}).finally(()=>{e&&A(!1)}),()=>{e=!1}},[]),Ie.jsxs("div",{className:"flex flex-col h-full bg-white overflow-y-auto",style:{fontFamily:t.fontFamily},children:[Ie.jsxs("div",{className:"px-5 py-4",children:[Ie.jsxs("h1",{className:"text-lg text-gray-800",children:["Hello ",Ie.jsx("span",{className:"font-semibold",children:d}),","]}),Ie.jsx("h2",{className:"text-xl font-semibold text-gray-900 mt-1",children:"Let's check new email for today"}),Ie.jsx("p",{className:"text-sm text-gray-500 mt-1",children:l})]}),Ie.jsxs("div",{className:"px-5 pb-6 space-y-5",children:[((null==a?void 0:a.leadsActionNeeded)??0)>0||((null==a?void 0:a.leadsProspectShipper)??0)>0?Ie.jsx(ch.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"bg-gradient-to-r from-amber-50 to-orange-50 rounded-lg py-2",children:Ie.jsxs("div",{className:"space-y-2",children:[((null==a?void 0:a.leadsActionNeeded)??0)>0&&Ie.jsx(ch.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},className:"bg-white border border-amber-200 rounded-lg p-3 shadow-sm hover:shadow-md transition-all cursor-pointer group",onClick:()=>i("/email-leads"),children:Ie.jsxs("div",{className:"flex items-center justify-between",children:[Ie.jsxs("div",{className:"flex items-center gap-2",children:[Ie.jsx("div",{className:"w-8 h-8 bg-amber-100 rounded-full flex items-center justify-center group-hover:bg-amber-200 transition-colors",children:Ie.jsx(pm,{className:"w-4 h-4 text-amber-600"})}),Ie.jsxs("div",{children:[Ie.jsx("h4",{className:"font-semibold text-gray-900 text-sm",children:"Action Needed"}),Ie.jsx("p",{className:"text-xs text-gray-600",children:"Leads requiring attention"})]})]}),Ie.jsxs("div",{className:"text-right",children:[Ie.jsx("div",{className:"text-lg font-bold text-amber-600",children:a.leadsActionNeeded}),Ie.jsx("div",{className:"text-xs text-gray-500",children:"pending"})]})]})}),((null==a?void 0:a.leadsProspectShipper)??0)>0&&Ie.jsx(ch.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.1},className:"bg-white border border-orange-200 rounded-lg p-3 shadow-sm hover:shadow-md transition-all cursor-pointer group",onClick:()=>i("/email-leads"),children:Ie.jsxs("div",{className:"flex items-center justify-between",children:[Ie.jsxs("div",{className:"flex items-center gap-2",children:[Ie.jsx("div",{className:"w-8 h-8 bg-orange-100 rounded-full flex items-center justify-center group-hover:bg-orange-200 transition-colors",children:Ie.jsx(rm,{className:"w-4 h-4 text-orange-600"})}),Ie.jsxs("div",{children:[Ie.jsx("h4",{className:"font-semibold text-gray-900 text-sm",children:"Prospect Shipper"}),Ie.jsx("p",{className:"text-xs text-gray-600",children:"New prospects to process"})]})]}),Ie.jsxs("div",{className:"text-right",children:[Ie.jsx("div",{className:"text-lg font-bold text-orange-600",children:a.leadsProspectShipper}),Ie.jsx("div",{className:"text-xs text-gray-500",children:"to process"})]})]})})]})}):null,Ie.jsxs("div",{children:[Ie.jsx("h3",{className:"text-base font-semibold text-gray-900 mb-3",children:"Email Leads Agents"}),Ie.jsxs("div",{className:"grid grid-cols-3 gap-2 mb-3",children:[Ie.jsx(qv,{title:"Emails Today",value:(null==a?void 0:a.emailsLoadToday)??"—",borderColor:c,iconBg:`${c}15`,iconColor:c,valueColor:c}),Ie.jsx(qv,{title:"Carrier Requests Today",value:(null==a?void 0:a.emailsCarrierToday)??"—",borderColor:"#8b5cf6",iconBg:"#f5f3ff",iconColor:"#8b5cf6",valueColor:"#8b5cf6"}),Ie.jsx(qv,{title:"Internal Emails Today",value:(null==a?void 0:a.emailsInternalToday)??"—",borderColor:"#06b6d4",iconBg:"#ecfeff",iconColor:"#06b6d4",valueColor:"#06b6d4"}),Ie.jsx(qv,{title:"Leads Today",value:(null==a?void 0:a.leadsToday)??"—",borderColor:"#22c55e",iconBg:"#f0fdf4",iconColor:"#22c55e",valueColor:"#22c55e"}),Ie.jsx(qv,{title:"Leads Till Date",value:(null==a?void 0:a.leadsTillDate)??"—",borderColor:"#64748b",iconBg:"#f8fafc",iconColor:"#64748b",valueColor:"#64748b"})]}),"development"===n&&Ie.jsxs("div",{className:"grid grid-cols-3 gap-3 mb-3",children:[Ie.jsx(qv,{title:"Quotes Won",value:"—",borderColor:"#22c55e",iconBg:"#f0fdf4",iconColor:"#22c55e",valueColor:"#22c55e"}),Ie.jsx("div",{style:{borderLeftColor:c},className:"bg-white col-span-2 rounded-lg p-3 border border-gray-100 shadow-sm border-l-4",children:Ie.jsxs("div",{className:"flex items-start gap-3",children:[Ie.jsxs("div",{className:"flex-1",children:[Ie.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[Ie.jsx("div",{className:"w-6 h-6 rounded-full flex items-center justify-center",style:{backgroundColor:`${c}15`},children:Ie.jsx(hm,{className:"w-3 h-3",style:{color:c}})}),Ie.jsx("span",{className:"text-xs text-gray-600",children:"Conversions this month"})]}),Ie.jsx("div",{className:"mt-2",children:Ie.jsx("span",{className:"text-xl font-bold",style:{color:c},children:"—"})})]}),Ie.jsx("div",{className:"flex-shrink-0",children:Ie.jsx(Yv,{primaryColor:c})})]})})]}),"development"===n&&Ie.jsx("div",{className:"grid grid-cols-2 gap-3",children:Ie.jsx(qv,{title:"Time Saved",value:"—",borderColor:c,iconBg:`${c}15`,iconColor:c,valueColor:c})})]})]})]})}new Date(Date.now()-36e5).toISOString(),new Date(Date.now()-359e4).toISOString(),new Date(Date.now()-36e5).toISOString(),new Date(Date.now()-359e4).toISOString(),new Date(Date.now()-864e5).toISOString(),new Date(Date.now()-8639e4).toISOString(),new Date(Date.now()-864e5).toISOString(),new Date(Date.now()-8639e4).toISOString();class Jv{static async getConversations(){try{return(await Vi.get("/agents/data/conversations")).data.conversations}catch(e){throw console.error("DataAgentService.getConversations error:",e),new Error("Failed to fetch conversations.")}}static async getConversation(e){try{return(await Vi.get(`/agents/data/conversations/${e}`)).data.conversation}catch(t){return console.error("DataAgentService.getConversation error:",t),null}}static async sendQuery(e,t){var r,n,i,a;try{const r={question:e},n=(await Vi.post("/crm/agents/data/chat?mock=true",r)).data.data,i=`msg-${Date.now()}`;return{success:!0,response:null==n?void 0:n.answer,conversationId:t||`conv-${Date.now()}`,messageId:i}}catch(o){if(console.error("DataAgentService.sendQuery error:",o),401===(null==(r=o.response)?void 0:r.status))throw new Error("Unauthorized. Please login again.");if(429===(null==(n=o.response)?void 0:n.status))throw new Error("Too many requests. Please wait a moment.");if(null==(a=null==(i=o.response)?void 0:i.data)?void 0:a.detail)throw new Error(o.response.data.detail);throw new Error("Failed to get response. Please try again.")}}static async submitFeedback(e,t){var r;try{const r={message_id:e,feedback:t},n=await Vi.post("/agents/data/feedback",r);return{success:n.data.success,message:n.data.message}}catch(n){if(console.error("DataAgentService.submitFeedback error:",n),401===(null==(r=n.response)?void 0:r.status))throw new Error("Unauthorized. Please login again.");throw new Error("Failed to submit feedback.")}}static async deleteConversation(e){try{return(await Vi.delete(`/agents/data/conversations/${e}`)).data}catch(t){throw console.error("DataAgentService.deleteConversation error:",t),new Error("Failed to delete conversation.")}}}const Zv=[{id:"sq-1",text:"Which shipper had the longest days to pay"},{id:"sq-2",text:"Any of my shipments delayed right now?"},{id:"sq-3",text:"What appointments do I have tomorrow?"},{id:"sq-4",text:"Get me capacity for a load from Dallas to Phoenix tomorrow."}],ex={messages:[],conversationId:null,conversations:[],isLoadingHistory:!1,showHistory:!1,isLoading:!1,isSending:!1,error:null,inputValue:""},tx=Tp()(Pp((e,t)=>({...ex,setInputValue:t=>{e({inputValue:t})},selectSuggestedQuestion:t=>{e({inputValue:t})},sendMessage:async r=>{const n=t();if(!r.trim()||n.isSending)return;const i={id:`msg-${Date.now()}-user`,content:r.trim(),role:"user",timestamp:(new Date).toISOString()},a=`msg-${Date.now()}-loading`,o={id:a,content:"",role:"assistant",timestamp:(new Date).toISOString(),isLoading:!0};e({messages:[...n.messages,i,o],isSending:!0,error:null,inputValue:""});try{const t=await Jv.sendQuery(r.trim(),n.conversationId||void 0);console.log("Response: ",t);const i={id:t.messageId,content:t.response,role:"assistant",timestamp:(new Date).toISOString(),feedback:null};e(e=>{const r=e.messages.filter(e=>e.id!==a).concat(i),n=(new Date).toISOString(),o=t.conversationId,s=e.conversations.findIndex(e=>e.id===o);let A;if(s>=0)A=[...e.conversations],A[s]={...A[s],messages:r,updatedAt:n};else{A=[{id:o,messages:r,createdAt:n,updatedAt:n},...e.conversations]}return{messages:r,conversationId:o,conversations:A,isSending:!1}})}catch(s){e(e=>({messages:e.messages.filter(e=>e.id!==a),isSending:!1,error:s.message||"Failed to get response"}))}},submitFeedback:async(t,r)=>{if(r){e(e=>({messages:e.messages.map(e=>e.id===t?{...e,feedback:r}:e)}));try{await Jv.submitFeedback(t,r)}catch(n){console.error("Failed to submit feedback:",n),e(e=>({messages:e.messages.map(e=>e.id===t?{...e,feedback:null}:e)}))}}},clearConversation:()=>{e({messages:[],conversationId:null,error:null})},fetchConversations:async()=>{e({isLoadingHistory:!1})},loadConversation:async r=>{const n=t();e({showHistory:!1});const i=n.conversations.find(e=>e.id===r);e(i?{messages:i.messages,conversationId:i.id}:{error:"Conversation not found"})},deleteConversation:async t=>{e(e=>({conversations:e.conversations.filter(e=>e.id!==t),...e.conversationId===t?{messages:[],conversationId:null}:{}}))},toggleHistory:()=>{const r=t(),n=!r.showHistory;e({showHistory:n}),n&&0===r.conversations.length&&t().fetchConversations()},startNewConversation:()=>{e({messages:[],conversationId:null,error:null,showHistory:!1,inputValue:""})},reset:()=>{e(ex)}})));function rx(){}function nx(){}const ix=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ax=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ox={};function sx(e,t){return(ox.jsx?ax:ix).test(e)}const Ax=/[ \t\n\f\r]/g;function lx(e){return""===e.replace(Ax,"")}class cx{constructor(e,t,r){this.normal=t,this.property=e,r&&(this.space=r)}}function ux(e,t){const r={},n={};for(const i of e)Object.assign(r,i.property),Object.assign(n,i.normal);return new cx(r,n,t)}function dx(e){return e.toLowerCase()}cx.prototype.normal={},cx.prototype.property={},cx.prototype.space=void 0;class hx{constructor(e,t){this.attribute=t,this.property=e}}hx.prototype.attribute="",hx.prototype.booleanish=!1,hx.prototype.boolean=!1,hx.prototype.commaOrSpaceSeparated=!1,hx.prototype.commaSeparated=!1,hx.prototype.defined=!1,hx.prototype.mustUseProperty=!1,hx.prototype.number=!1,hx.prototype.overloadedBoolean=!1,hx.prototype.property="",hx.prototype.spaceSeparated=!1,hx.prototype.space=void 0;let px=0;const fx=bx(),mx=bx(),gx=bx(),yx=bx(),vx=bx(),xx=bx(),wx=bx();function bx(){return 2**++px}const Bx=Object.freeze(Object.defineProperty({__proto__:null,boolean:fx,booleanish:mx,commaOrSpaceSeparated:wx,commaSeparated:xx,number:yx,overloadedBoolean:gx,spaceSeparated:vx},Symbol.toStringTag,{value:"Module"})),Cx=Object.keys(Bx);class Ex extends hx{constructor(e,t,r,n){let i=-1;if(super(e,t),kx(this,"space",n),"number"==typeof r)for(;++i<Cx.length;){const e=Cx[i];kx(this,Cx[i],(r&Bx[e])===Bx[e])}}}function kx(e,t,r){r&&(e[t]=r)}function Sx(e){const t={},r={};for(const[n,i]of Object.entries(e.properties)){const a=new Ex(n,e.transform(e.attributes||{},n),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(a.mustUseProperty=!0),t[n]=a,r[dx(n)]=n,r[dx(a.attribute)]=n}return new cx(t,r,e.space)}Ex.prototype.defined=!0;const jx=Sx({properties:{ariaActiveDescendant:null,ariaAtomic:mx,ariaAutoComplete:null,ariaBusy:mx,ariaChecked:mx,ariaColCount:yx,ariaColIndex:yx,ariaColSpan:yx,ariaControls:vx,ariaCurrent:null,ariaDescribedBy:vx,ariaDetails:null,ariaDisabled:mx,ariaDropEffect:vx,ariaErrorMessage:null,ariaExpanded:mx,ariaFlowTo:vx,ariaGrabbed:mx,ariaHasPopup:null,ariaHidden:mx,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:vx,ariaLevel:yx,ariaLive:null,ariaModal:mx,ariaMultiLine:mx,ariaMultiSelectable:mx,ariaOrientation:null,ariaOwns:vx,ariaPlaceholder:null,ariaPosInSet:yx,ariaPressed:mx,ariaReadOnly:mx,ariaRelevant:null,ariaRequired:mx,ariaRoleDescription:vx,ariaRowCount:yx,ariaRowIndex:yx,ariaRowSpan:yx,ariaSelected:mx,ariaSetSize:yx,ariaSort:null,ariaValueMax:yx,ariaValueMin:yx,ariaValueNow:yx,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function Fx(e,t){return t in e?e[t]:t}function Qx(e,t){return Fx(e,t.toLowerCase())}const Nx=Sx({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:xx,acceptCharset:vx,accessKey:vx,action:null,allow:null,allowFullScreen:fx,allowPaymentRequest:fx,allowUserMedia:fx,alt:null,as:null,async:fx,autoCapitalize:null,autoComplete:vx,autoFocus:fx,autoPlay:fx,blocking:vx,capture:null,charSet:null,checked:fx,cite:null,className:vx,cols:yx,colSpan:null,content:null,contentEditable:mx,controls:fx,controlsList:vx,coords:yx|xx,crossOrigin:null,data:null,dateTime:null,decoding:null,default:fx,defer:fx,dir:null,dirName:null,disabled:fx,download:gx,draggable:mx,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:fx,formTarget:null,headers:vx,height:yx,hidden:gx,high:yx,href:null,hrefLang:null,htmlFor:vx,httpEquiv:vx,id:null,imageSizes:null,imageSrcSet:null,inert:fx,inputMode:null,integrity:null,is:null,isMap:fx,itemId:null,itemProp:vx,itemRef:vx,itemScope:fx,itemType:vx,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:fx,low:yx,manifest:null,max:null,maxLength:yx,media:null,method:null,min:null,minLength:yx,multiple:fx,muted:fx,name:null,nonce:null,noModule:fx,noValidate:fx,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:fx,optimum:yx,pattern:null,ping:vx,placeholder:null,playsInline:fx,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:fx,referrerPolicy:null,rel:vx,required:fx,reversed:fx,rows:yx,rowSpan:yx,sandbox:vx,scope:null,scoped:fx,seamless:fx,selected:fx,shadowRootClonable:fx,shadowRootDelegatesFocus:fx,shadowRootMode:null,shape:null,size:yx,sizes:null,slot:null,span:yx,spellCheck:mx,src:null,srcDoc:null,srcLang:null,srcSet:null,start:yx,step:null,style:null,tabIndex:yx,target:null,title:null,translate:null,type:null,typeMustMatch:fx,useMap:null,value:mx,width:yx,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:vx,axis:null,background:null,bgColor:null,border:yx,borderColor:null,bottomMargin:yx,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:fx,declare:fx,event:null,face:null,frame:null,frameBorder:null,hSpace:yx,leftMargin:yx,link:null,longDesc:null,lowSrc:null,marginHeight:yx,marginWidth:yx,noResize:fx,noHref:fx,noShade:fx,noWrap:fx,object:null,profile:null,prompt:null,rev:null,rightMargin:yx,rules:null,scheme:null,scrolling:mx,standby:null,summary:null,text:null,topMargin:yx,valueType:null,version:null,vAlign:null,vLink:null,vSpace:yx,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:fx,disableRemotePlayback:fx,prefix:null,property:null,results:yx,security:null,unselectable:null},space:"html",transform:Qx}),Ux=Sx({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:wx,accentHeight:yx,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:yx,amplitude:yx,arabicForm:null,ascent:yx,attributeName:null,attributeType:null,azimuth:yx,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:yx,by:null,calcMode:null,capHeight:yx,className:vx,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:yx,diffuseConstant:yx,direction:null,display:null,dur:null,divisor:yx,dominantBaseline:null,download:fx,dx:null,dy:null,edgeMode:null,editable:null,elevation:yx,enableBackground:null,end:null,event:null,exponent:yx,externalResourcesRequired:null,fill:null,fillOpacity:yx,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:xx,g2:xx,glyphName:xx,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:yx,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:yx,horizOriginX:yx,horizOriginY:yx,id:null,ideographic:yx,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:yx,k:yx,k1:yx,k2:yx,k3:yx,k4:yx,kernelMatrix:wx,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:yx,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:yx,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:yx,overlineThickness:yx,paintOrder:null,panose1:null,path:null,pathLength:yx,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:vx,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:yx,pointsAtY:yx,pointsAtZ:yx,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:wx,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:wx,rev:wx,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:wx,requiredFeatures:wx,requiredFonts:wx,requiredFormats:wx,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:yx,specularExponent:yx,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:yx,strikethroughThickness:yx,string:null,stroke:null,strokeDashArray:wx,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:yx,strokeOpacity:yx,strokeWidth:null,style:null,surfaceScale:yx,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:wx,tabIndex:yx,tableValues:null,target:null,targetX:yx,targetY:yx,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:wx,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:yx,underlineThickness:yx,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:yx,values:null,vAlphabetic:yx,vMathematical:yx,vectorEffect:null,vHanging:yx,vIdeographic:yx,version:null,vertAdvY:yx,vertOriginX:yx,vertOriginY:yx,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:yx,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Fx}),Ox=Sx({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),Ix=Sx({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Qx}),Tx=Sx({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),Px={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Mx=/[A-Z]/g,Dx=/-[a-z]/g,Lx=/^data[-\w.:]+$/i;function Hx(e){return"-"+e.toLowerCase()}function _x(e){return e.charAt(1).toUpperCase()}const Rx=ux([jx,Nx,Ox,Ix,Tx],"html"),Kx=ux([jx,Ux,Ox,Ix,Tx],"svg");var zx,Vx,$x,Wx={};function Gx(){if($x)return Wx;$x=1;var e=Wx&&Wx.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Wx,"__esModule",{value:!0}),Wx.default=function(e,r){let n=null;if(!e||"string"!=typeof e)return n;const i=(0,t.default)(e),a="function"==typeof r;return i.forEach(e=>{if("declaration"!==e.type)return;const{property:t,value:i}=e;a?r(t,i,e):i&&(n=n||{},n[t]=i)}),n};const t=e(function(){if(Vx)return zx;Vx=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,r=/^\s*/,n=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,s=/^\s+|\s+$/g,A="";function l(e){return e?e.replace(s,A):A}return zx=function(s,c){if("string"!=typeof s)throw new TypeError("First argument must be a string");if(!s)return[];c=c||{};var u=1,d=1;function h(e){var r=e.match(t);r&&(u+=r.length);var n=e.lastIndexOf("\n");d=~n?e.length-n:d+e.length}function p(){var e={line:u,column:d};return function(t){return t.position=new f(e),y(),t}}function f(e){this.start=e,this.end={line:u,column:d},this.source=c.source}function m(e){var t=new Error(c.source+":"+u+":"+d+": "+e);if(t.reason=e,t.filename=c.source,t.line=u,t.column=d,t.source=s,!c.silent)throw t}function g(e){var t=e.exec(s);if(t){var r=t[0];return h(r),s=s.slice(r.length),t}}function y(){g(r)}function v(e){var t;for(e=e||[];t=x();)!1!==t&&e.push(t);return e}function x(){var e=p();if("/"==s.charAt(0)&&"*"==s.charAt(1)){for(var t=2;A!=s.charAt(t)&&("*"!=s.charAt(t)||"/"!=s.charAt(t+1));)++t;if(t+=2,A===s.charAt(t-1))return m("End of comment missing");var r=s.slice(2,t-2);return d+=2,h(r),s=s.slice(t),d+=2,e({type:"comment",comment:r})}}function w(){var t=p(),r=g(n);if(r){if(x(),!g(i))return m("property missing ':'");var s=g(a),c=t({type:"declaration",property:l(r[0].replace(e,A)),value:s?l(s[0].replace(e,A)):A});return g(o),c}}return f.prototype.content=s,y(),function(){var e,t=[];for(v(t);e=w();)!1!==e&&(t.push(e),v(t));return t}()},zx}());return Wx}var qx,Yx,Xx,Jx={};function Zx(){if(qx)return Jx;qx=1,Object.defineProperty(Jx,"__esModule",{value:!0}),Jx.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,r=/^[^-]+$/,n=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(e,t){return t.toUpperCase()},o=function(e,t){return"".concat(t,"-")};return Jx.camelCase=function(s,A){return void 0===A&&(A={}),function(t){return!t||r.test(t)||e.test(t)}(s)?s:(s=s.toLowerCase(),(s=A.reactCompat?s.replace(i,o):s.replace(n,o)).replace(t,a))},Jx}const ew=ay(function(){if(Xx)return Yx;Xx=1;var e=(Yx&&Yx.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Gx()),t=Zx();function r(r,n){var i={};return r&&"string"==typeof r?((0,e.default)(r,function(e,r){e&&r&&(i[(0,t.camelCase)(e,n)]=r)}),i):i}return r.default=r,Yx=r}()),tw=nw("end"),rw=nw("start");function nw(e){return function(t){const r=t&&t.position&&t.position[e]||{};if("number"==typeof r.line&&r.line>0&&"number"==typeof r.column&&r.column>0)return{line:r.line,column:r.column,offset:"number"==typeof r.offset&&r.offset>-1?r.offset:void 0}}}function iw(e){return e&&"object"==typeof e?"position"in e||"type"in e?ow(e.position):"start"in e||"end"in e?ow(e):"line"in e||"column"in e?aw(e):"":""}function aw(e){return sw(e&&e.line)+":"+sw(e&&e.column)}function ow(e){return aw(e&&e.start)+"-"+aw(e&&e.end)}function sw(e){return e&&"number"==typeof e?e:1}class Aw extends Error{constructor(e,t,r){super(),"string"==typeof t&&(r=t,t=void 0);let n="",i={},a=!1;if(t&&(i="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?n=e:!i.cause&&e&&(a=!0,n=e.message,i.cause=e),!i.ruleId&&!i.source&&"string"==typeof r){const e=r.indexOf(":");-1===e?i.ruleId=r:(i.source=r.slice(0,e),i.ruleId=r.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){const e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}const o=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=n,this.line=o?o.line:void 0,this.name=iw(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&"string"==typeof i.cause.stack?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Aw.prototype.file="",Aw.prototype.name="",Aw.prototype.reason="",Aw.prototype.message="",Aw.prototype.stack="",Aw.prototype.column=void 0,Aw.prototype.line=void 0,Aw.prototype.ancestors=void 0,Aw.prototype.cause=void 0,Aw.prototype.fatal=void 0,Aw.prototype.place=void 0,Aw.prototype.ruleId=void 0,Aw.prototype.source=void 0;const lw={}.hasOwnProperty,cw=new Map,uw=/[A-Z]/g,dw=new Set(["table","tbody","thead","tfoot","tr"]),hw=new Set(["td","th"]),pw="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function fw(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let n;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=function(e,t){return r;function r(r,n,i,a){const o=Array.isArray(i.children),s=rw(r);return t(n,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}(r,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");n=function(e,t,r){return n;function n(e,n,i,a){const o=Array.isArray(i.children)?r:t;return a?o(n,i,a):o(n,i)}}(0,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:n,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?Kx:Rx,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},a=mw(i,e,void 0);return a&&"string"!=typeof a?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function mw(e,t,r){return"element"===t.type?function(e,t,r){const n=e.schema;let i=n;"svg"===t.tagName.toLowerCase()&&"html"===n.space&&(i=Kx,e.schema=i);e.ancestors.push(t);const a=ww(e,t.tagName,!1),o=function(e,t){const r={};let n,i;for(i in t.properties)if("children"!==i&&lw.call(t.properties,i)){const a=xw(e,i,t.properties[i]);if(a){const[i,o]=a;e.tableCellAlignToStyle&&"align"===i&&"string"==typeof o&&hw.has(t.tagName)?n=o:r[i]=o}}if(n){(r.style||(r.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=n}return r}(e,t);let s=vw(e,t);dw.has(t.tagName)&&(s=s.filter(function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&lx(t.value):lx(t));var t}));return gw(e,o,a,t),yw(o,s),e.ancestors.pop(),e.schema=n,e.create(t,a,o,r)}(e,t,r):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}bw(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,r){const n=e.schema;let i=n;"svg"===t.name&&"html"===n.space&&(i=Kx,e.schema=i);e.ancestors.push(t);const a=null===t.name?e.Fragment:ww(e,t.name,!0),o=function(e,t){const r={};for(const n of t.attributes)if("mdxJsxExpressionAttribute"===n.type)if(n.data&&n.data.estree&&e.evaluater){const t=n.data.estree.body[0];rx(t.type);const i=t.expression;rx(i.type);const a=i.properties[0];rx(a.type),Object.assign(r,e.evaluater.evaluateExpression(a.argument))}else bw(e,t.position);else{const i=n.name;let a;if(n.value&&"object"==typeof n.value)if(n.value.data&&n.value.data.estree&&e.evaluater){const t=n.value.data.estree.body[0];rx(t.type),a=e.evaluater.evaluateExpression(t.expression)}else bw(e,t.position);else a=null===n.value||n.value;r[i]=a}return r}(e,t),s=vw(e,t);return gw(e,o,a,t),yw(o,s),e.ancestors.pop(),e.schema=n,e.create(t,a,o,r)}(e,t,r):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);bw(e,t.position)}(e,t):"root"===t.type?function(e,t,r){const n={};return yw(n,vw(e,t)),e.create(t,e.Fragment,n,r)}(e,t,r):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function gw(e,t,r,n){"string"!=typeof r&&r!==e.Fragment&&e.passNode&&(t.node=n)}function yw(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function vw(e,t){const r=[];let n=-1;const i=e.passKeys?new Map:cw;for(;++n<t.children.length;){const a=t.children[n];let o;if(e.passKeys){const e="element"===a.type?a.tagName:"mdxJsxFlowElement"===a.type||"mdxJsxTextElement"===a.type?a.name:void 0;if(e){const t=i.get(e)||0;o=e+"-"+t,i.set(e,t+1)}}const s=mw(e,a,o);void 0!==s&&r.push(s)}return r}function xw(e,t,r){const n=function(e,t){const r=dx(t);let n=t,i=hx;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&"data"===r.slice(0,4)&&Lx.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(Dx,_x);n="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!Dx.test(e)){let r=e.replace(Mx,Hx);"-"!==r.charAt(0)&&(r="-"+r),t="data"+r}}i=Ex}return new i(n,t)}(e.schema,t);if(!(null==r||"number"==typeof r&&Number.isNaN(r))){if(Array.isArray(r)&&(r=n.commaSeparated?function(e){const t={};return(""===e[e.length-1]?[...e,""]:e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}(r):r.join(" ").trim()),"style"===n.property){let t="object"==typeof r?r:function(e,t){try{return ew(t,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const t=r,n=new Aw("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:t,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=pw+"#cannot-parse-style-attribute",n}}(e,String(r));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let r;for(r in e)lw.call(e,r)&&(t[Bw(r)]=e[r]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&n.space?Px[n.property]||n.property:n.attribute,r]}}function ww(e,t,r){let n;if(r)if(t.includes(".")){const e=t.split(".");let r,i=-1;for(;++i<e.length;){const t=sx(e[i])?{type:"Identifier",name:e[i]}:{type:"Literal",value:e[i]};r=r?{type:"MemberExpression",object:r,property:t,computed:Boolean(i&&"Literal"===t.type),optional:!1}:t}n=r}else n=sx(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else n={type:"Literal",value:t};if("Literal"===n.type){const t=n.value;return lw.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(n);bw(e)}function bw(e,t){const r=new Aw("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=pw+"#cannot-handle-mdx-estrees-without-createevaluater",r}function Bw(e){let t=e.replace(uw,Cw);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function Cw(e){return"-"+e.toLowerCase()}const Ew={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},kw={};function Sw(e,t){return jw(e,"boolean"!=typeof kw.includeImageAlt||kw.includeImageAlt,"boolean"!=typeof kw.includeHtml||kw.includeHtml)}function jw(e,t,r){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||r?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Fw(e.children,t,r)}return Array.isArray(e)?Fw(e,t,r):""}function Fw(e,t,r){const n=[];let i=-1;for(;++i<e.length;)n[i]=jw(e[i],t,r);return n.join("")}const Qw=document.createElement("i");function Nw(e){const t="&"+e+";";Qw.innerHTML=t;const r=Qw.textContent;return(59!==r.charCodeAt(r.length-1)||"semi"===e)&&(r!==t&&r)}function Uw(e,t,r,n){const i=e.length;let a,o=0;if(t=t<0?-t>i?0:i+t:t>i?i:t,r=r>0?r:0,n.length<1e4)a=Array.from(n),a.unshift(t,r),e.splice(...a);else for(r&&e.splice(t,r);o<n.length;)a=n.slice(o,o+1e4),a.unshift(t,0),e.splice(...a),o+=1e4,t+=1e4}function Ow(e,t){return e.length>0?(Uw(e,e.length,0,t),e):t}const Iw={}.hasOwnProperty;function Tw(e){const t={};let r=-1;for(;++r<e.length;)Pw(t,e[r]);return t}function Pw(e,t){let r;for(r in t){const n=(Iw.call(e,r)?e[r]:void 0)||(e[r]={}),i=t[r];let a;if(i)for(a in i){Iw.call(n,a)||(n[a]=[]);const e=i[a];Mw(n[a],Array.isArray(e)?e:e?[e]:[])}}}function Mw(e,t){let r=-1;const n=[];for(;++r<t.length;)("after"===t[r].add?e:n).push(t[r]);Uw(e,0,0,n)}function Dw(e,t){const r=Number.parseInt(e,t);return r<9||11===r||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||!(65535&~r)||65534==(65535&r)||r>1114111?"�":String.fromCodePoint(r)}function Lw(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Hw=Jw(/[A-Za-z]/),_w=Jw(/[\dA-Za-z]/),Rw=Jw(/[#-'*+\--9=?A-Z^-~]/);function Kw(e){return null!==e&&(e<32||127===e)}const zw=Jw(/\d/),Vw=Jw(/[\dA-Fa-f]/),$w=Jw(/[!-/:-@[-`{-~]/);function Ww(e){return null!==e&&e<-2}function Gw(e){return null!==e&&(e<0||32===e)}function qw(e){return-2===e||-1===e||32===e}const Yw=Jw(new RegExp("\\p{P}|\\p{S}","u")),Xw=Jw(/\s/);function Jw(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function Zw(e){const t=[];let r=-1,n=0,i=0;for(;++r<e.length;){const a=e.charCodeAt(r);let o="";if(37===a&&_w(e.charCodeAt(r+1))&&_w(e.charCodeAt(r+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){const t=e.charCodeAt(r+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o="�"}else o=String.fromCharCode(a);o&&(t.push(e.slice(n,r),encodeURIComponent(o)),n=r+i+1,o=""),i&&(r+=i,i=0)}return t.join("")+e.slice(n)}function eb(e,t,r,n){const i=n?n-1:Number.POSITIVE_INFINITY;let a=0;return function(n){if(qw(n))return e.enter(r),o(n);return t(n)};function o(n){return qw(n)&&a++<i?(e.consume(n),o):(e.exit(r),t(n))}}const tb={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,function(r){if(null===r)return void e.consume(r);return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),eb(e,t,"linePrefix")},function(t){return e.enter("paragraph"),n(t)});let r;return t;function n(t){const n=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=n),r=n,i(t)}function i(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):Ww(t)?(e.consume(t),e.exit("chunkText"),n):(e.consume(t),i)}}};const rb={tokenize:function(e){const t=this,r=[];let n,i,a,o=0;return s;function s(n){if(o<r.length){const i=r[o];return t.containerState=i[1],e.attempt(i[0].continuation,A,l)(n)}return l(n)}function A(e){if(o++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,n&&y();const r=t.events.length;let i,a=r;for(;a--;)if("exit"===t.events[a][0]&&"chunkFlow"===t.events[a][1].type){i=t.events[a][1].end;break}g(o);let s=r;for(;s<t.events.length;)t.events[s][1].end={...i},s++;return Uw(t.events,a+1,0,t.events.slice(r)),t.events.length=s,l(e)}return s(e)}function l(i){if(o===r.length){if(!n)return d(i);if(n.currentConstruct&&n.currentConstruct.concrete)return p(i);t.interrupt=Boolean(n.currentConstruct&&!n._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(nb,c,u)(i)}function c(e){return n&&y(),g(o),d(e)}function u(e){return t.parser.lazy[t.now().line]=o!==r.length,a=t.now().offset,p(e)}function d(r){return t.containerState={},e.attempt(nb,h,p)(r)}function h(e){return o++,r.push([t.currentConstruct,t.containerState]),d(e)}function p(r){return null===r?(n&&y(),g(0),void e.consume(r)):(n=n||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:n,contentType:"flow",previous:i}),f(r))}function f(r){return null===r?(m(e.exit("chunkFlow"),!0),g(0),void e.consume(r)):Ww(r)?(e.consume(r),m(e.exit("chunkFlow")),o=0,t.interrupt=void 0,s):(e.consume(r),f)}function m(e,r){const s=t.sliceStream(e);if(r&&s.push(null),e.previous=i,i&&(i.next=e),i=e,n.defineSkip(e.start),n.write(s),t.parser.lazy[e.start.line]){let e=n.events.length;for(;e--;)if(n.events[e][1].start.offset<a&&(!n.events[e][1].end||n.events[e][1].end.offset>a))return;const r=t.events.length;let i,s,A=r;for(;A--;)if("exit"===t.events[A][0]&&"chunkFlow"===t.events[A][1].type){if(i){s=t.events[A][1].end;break}i=!0}for(g(o),e=r;e<t.events.length;)t.events[e][1].end={...s},e++;Uw(t.events,A+1,0,t.events.slice(r)),t.events.length=e}}function g(n){let i=r.length;for(;i-- >n;){const n=r[i];t.containerState=n[1],n[0].exit.call(t,e)}r.length=n}function y(){n.write([null]),i=void 0,n=void 0,t.containerState._closeFlow=void 0}}},nb={tokenize:function(e,t,r){return eb(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function ib(e){return null===e||Gw(e)||Xw(e)?1:Yw(e)?2:void 0}function ab(e,t,r){const n=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!n.includes(a)&&(t=a(t,r),n.push(a))}return t}const ob={name:"attention",resolveAll:function(e,t){let r,n,i,a,o,s,A,l,c=-1;for(;++c<e.length;)if("enter"===e[c][0]&&"attentionSequence"===e[c][1].type&&e[c][1]._close)for(r=c;r--;)if("exit"===e[r][0]&&"attentionSequence"===e[r][1].type&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[c][1]).charCodeAt(0)){if((e[r][1]._close||e[c][1]._open)&&(e[c][1].end.offset-e[c][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[c][1].end.offset-e[c][1].start.offset)%3))continue;s=e[r][1].end.offset-e[r][1].start.offset>1&&e[c][1].end.offset-e[c][1].start.offset>1?2:1;const u={...e[r][1].end},d={...e[c][1].start};sb(u,-s),sb(d,s),a={type:s>1?"strongSequence":"emphasisSequence",start:u,end:{...e[r][1].end}},o={type:s>1?"strongSequence":"emphasisSequence",start:{...e[c][1].start},end:d},i={type:s>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[c][1].start}},n={type:s>1?"strong":"emphasis",start:{...a.start},end:{...o.end}},e[r][1].end={...a.start},e[c][1].start={...o.end},A=[],e[r][1].end.offset-e[r][1].start.offset&&(A=Ow(A,[["enter",e[r][1],t],["exit",e[r][1],t]])),A=Ow(A,[["enter",n,t],["enter",a,t],["exit",a,t],["enter",i,t]]),A=Ow(A,ab(t.parser.constructs.insideSpan.null,e.slice(r+1,c),t)),A=Ow(A,[["exit",i,t],["enter",o,t],["exit",o,t],["exit",n,t]]),e[c][1].end.offset-e[c][1].start.offset?(l=2,A=Ow(A,[["enter",e[c][1],t],["exit",e[c][1],t]])):l=0,Uw(e,r-1,c-r+3,A),c=r+A.length-l-2;break}c=-1;for(;++c<e.length;)"attentionSequence"===e[c][1].type&&(e[c][1].type="data");return e},tokenize:function(e,t){const r=this.parser.constructs.attentionMarkers.null,n=this.previous,i=ib(n);let a;return function(t){return a=t,e.enter("attentionSequence"),o(t)};function o(s){if(s===a)return e.consume(s),o;const A=e.exit("attentionSequence"),l=ib(s),c=!l||2===l&&i||r.includes(s),u=!i||2===i&&l||r.includes(n);return A._open=Boolean(42===a?c:c&&(i||!u)),A._close=Boolean(42===a?u:u&&(l||!c)),t(s)}}};function sb(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Ab={name:"autolink",tokenize:function(e,t,r){let n=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i};function i(t){return Hw(t)?(e.consume(t),a):64===t?r(t):A(t)}function a(e){return 43===e||45===e||46===e||_w(e)?(n=1,o(e)):A(e)}function o(t){return 58===t?(e.consume(t),n=0,s):(43===t||45===t||46===t||_w(t))&&n++<32?(e.consume(t),o):(n=0,A(t))}function s(n){return 62===n?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):null===n||32===n||60===n||Kw(n)?r(n):(e.consume(n),s)}function A(t){return 64===t?(e.consume(t),l):Rw(t)?(e.consume(t),A):r(t)}function l(e){return _w(e)?c(e):r(e)}function c(r){return 46===r?(e.consume(r),n=0,l):62===r?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):u(r)}function u(t){if((45===t||_w(t))&&n++<63){const r=45===t?u:c;return e.consume(t),r}return r(t)}}};const lb={partial:!0,tokenize:function(e,t,r){return function(t){return qw(t)?eb(e,n,"linePrefix")(t):n(t)};function n(e){return null===e||Ww(e)?t(e):r(e)}}};const cb={continuation:{tokenize:function(e,t,r){const n=this;return function(t){if(qw(t))return eb(e,i,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return i(t)};function i(n){return e.attempt(cb,t,r)(n)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,r){const n=this;return function(t){if(62===t){const r=n.containerState;return r.open||(e.enter("blockQuote",{_container:!0}),r.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),i}return r(t)};function i(r){return qw(r)?(e.enter("blockQuotePrefixWhitespace"),e.consume(r),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(r))}}};const ub={name:"characterEscape",tokenize:function(e,t,r){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),n};function n(n){return $w(n)?(e.enter("characterEscapeValue"),e.consume(n),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(n)}}};const db={name:"characterReference",tokenize:function(e,t,r){const n=this;let i,a,o=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),s};function s(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),A):(e.enter("characterReferenceValue"),i=31,a=_w,l(t))}function A(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,a=Vw,l):(e.enter("characterReferenceValue"),i=7,a=zw,l(t))}function l(s){if(59===s&&o){const i=e.exit("characterReferenceValue");return a!==_w||Nw(n.sliceSerialize(i))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):r(s)}return a(s)&&o++<i?(e.consume(s),l):r(s)}}};const hb={partial:!0,tokenize:function(e,t,r){const n=this;return function(t){if(null===t)return r(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i};function i(e){return n.parser.lazy[n.now().line]?r(e):t(e)}}},pb={concrete:!0,name:"codeFenced",tokenize:function(e,t,r){const n=this,i={partial:!0,tokenize:function(e,t,r){let i=0;return o;function o(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),A}function A(t){return e.enter("codeFencedFence"),qw(t)?eb(e,l,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):l(t)}function l(t){return t===a?(e.enter("codeFencedFenceSequence"),c(t)):r(t)}function c(t){return t===a?(i++,e.consume(t),c):i>=s?(e.exit("codeFencedFenceSequence"),qw(t)?eb(e,u,"whitespace")(t):u(t)):r(t)}function u(n){return null===n||Ww(n)?(e.exit("codeFencedFence"),t(n)):r(n)}}};let a,o=0,s=0;return function(t){return function(t){const r=n.events[n.events.length-1];return o=r&&"linePrefix"===r[1].type?r[2].sliceSerialize(r[1],!0).length:0,a=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),A(t)}(t)};function A(t){return t===a?(s++,e.consume(t),A):s<3?r(t):(e.exit("codeFencedFenceSequence"),qw(t)?eb(e,l,"whitespace")(t):l(t))}function l(r){return null===r||Ww(r)?(e.exit("codeFencedFence"),n.interrupt?t(r):e.check(hb,h,y)(r)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),c(r))}function c(t){return null===t||Ww(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),l(t)):qw(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),eb(e,u,"whitespace")(t)):96===t&&t===a?r(t):(e.consume(t),c)}function u(t){return null===t||Ww(t)?l(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(t))}function d(t){return null===t||Ww(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),l(t)):96===t&&t===a?r(t):(e.consume(t),d)}function h(t){return e.attempt(i,y,p)(t)}function p(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),f}function f(t){return o>0&&qw(t)?eb(e,m,"linePrefix",o+1)(t):m(t)}function m(t){return null===t||Ww(t)?e.check(hb,h,y)(t):(e.enter("codeFlowValue"),g(t))}function g(t){return null===t||Ww(t)?(e.exit("codeFlowValue"),m(t)):(e.consume(t),g)}function y(r){return e.exit("codeFenced"),t(r)}}};const fb={name:"codeIndented",tokenize:function(e,t,r){const n=this;return function(t){return e.enter("codeIndented"),eb(e,i,"linePrefix",5)(t)};function i(e){const t=n.events[n.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?a(e):r(e)}function a(t){return null===t?s(t):Ww(t)?e.attempt(mb,a,s)(t):(e.enter("codeFlowValue"),o(t))}function o(t){return null===t||Ww(t)?(e.exit("codeFlowValue"),a(t)):(e.consume(t),o)}function s(r){return e.exit("codeIndented"),t(r)}}},mb={partial:!0,tokenize:function(e,t,r){const n=this;return i;function i(t){return n.parser.lazy[n.now().line]?r(t):Ww(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):eb(e,a,"linePrefix",5)(t)}function a(e){const a=n.events[n.events.length-1];return a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):Ww(e)?i(e):r(e)}}};const gb={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,r,n=e.length-4,i=3;if(!("lineEnding"!==e[i][1].type&&"space"!==e[i][1].type||"lineEnding"!==e[n][1].type&&"space"!==e[n][1].type))for(t=i;++t<n;)if("codeTextData"===e[t][1].type){e[i][1].type="codeTextPadding",e[n][1].type="codeTextPadding",i+=2,n-=2;break}t=i-1,n++;for(;++t<=n;)void 0===r?t!==n&&"lineEnding"!==e[t][1].type&&(r=t):t!==n&&"lineEnding"!==e[t][1].type||(e[r][1].type="codeTextData",t!==r+2&&(e[r][1].end=e[t-1][1].end,e.splice(r+2,t-r-2),n-=t-r-2,t=r+2),r=void 0);return e},tokenize:function(e,t,r){let n,i,a=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),o(t)};function o(t){return 96===t?(e.consume(t),a++,o):(e.exit("codeTextSequence"),s(t))}function s(t){return null===t?r(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):96===t?(i=e.enter("codeTextSequence"),n=0,l(t)):Ww(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(e.enter("codeTextData"),A(t))}function A(t){return null===t||32===t||96===t||Ww(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),A)}function l(r){return 96===r?(e.consume(r),n++,l):n===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(r)):(i.type="codeTextData",A(r))}}};class yb{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const r=null==t?Number.POSITIVE_INFINITY:t;return r<this.left.length?this.left.slice(e,r):e>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(e,t,r){const n=t||0;this.setCursor(Math.trunc(e));const i=this.right.splice(this.right.length-n,Number.POSITIVE_INFINITY);return r&&vb(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),vb(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),vb(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);vb(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);vb(this.left,t.reverse())}}}function vb(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function xb(e){const t={};let r,n,i,a,o,s,A,l=-1;const c=new yb(e);for(;++l<c.length;){for(;l in t;)l=t[l];if(r=c.get(l),l&&"chunkFlow"===r[1].type&&"listItemPrefix"===c.get(l-1)[1].type&&(s=r[1]._tokenizer.events,i=0,i<s.length&&"lineEndingBlank"===s[i][1].type&&(i+=2),i<s.length&&"content"===s[i][1].type))for(;++i<s.length&&"content"!==s[i][1].type;)"chunkText"===s[i][1].type&&(s[i][1]._isInFirstContentOfListItem=!0,i++);if("enter"===r[0])r[1].contentType&&(Object.assign(t,wb(c,l)),l=t[l],A=!0);else if(r[1]._container){for(i=l,n=void 0;i--;)if(a=c.get(i),"lineEnding"===a[1].type||"lineEndingBlank"===a[1].type)"enter"===a[0]&&(n&&(c.get(n)[1].type="lineEndingBlank"),a[1].type="lineEnding",n=i);else if("linePrefix"!==a[1].type&&"listItemIndent"!==a[1].type)break;n&&(r[1].end={...c.get(n)[1].start},o=c.slice(n,l),o.unshift(r),c.splice(n,l-n+1,o))}}return Uw(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!A}function wb(e,t){const r=e.get(t)[1],n=e.get(t)[2];let i=t-1;const a=[];let o=r._tokenizer;o||(o=n.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const s=o.events,A=[],l={};let c,u,d=-1,h=r,p=0,f=0;const m=[f];for(;h;){for(;e.get(++i)[1]!==h;);a.push(i),h._tokenizer||(c=n.sliceStream(h),h.next||c.push(null),u&&o.defineSkip(h.start),h._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(c),h._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),u=h,h=h.next}for(h=r;++d<s.length;)"exit"===s[d][0]&&"enter"===s[d-1][0]&&s[d][1].type===s[d-1][1].type&&s[d][1].start.line!==s[d][1].end.line&&(f=d+1,m.push(f),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(o.events=[],h?(h._tokenizer=void 0,h.previous=void 0):m.pop(),d=m.length;d--;){const t=s.slice(m[d],m[d+1]),r=a.pop();A.push([r,r+t.length-1]),e.splice(r,2,t)}for(A.reverse(),d=-1;++d<A.length;)l[p+A[d][0]]=p+A[d][1],p+=A[d][1]-A[d][0]-1;return l}const bb={resolve:function(e){return xb(e),e},tokenize:function(e,t){let r;return function(t){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),n(t)};function n(t){return null===t?i(t):Ww(t)?e.check(Bb,a,i)(t):(e.consume(t),n)}function i(r){return e.exit("chunkContent"),e.exit("content"),t(r)}function a(t){return e.consume(t),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,n}}},Bb={partial:!0,tokenize:function(e,t,r){const n=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),eb(e,i,"linePrefix")};function i(i){if(null===i||Ww(i))return r(i);const a=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(n.parser.constructs.flow,r,t)(i)}}};function Cb(e,t,r,n,i,a,o,s,A){const l=A||Number.POSITIVE_INFINITY;let c=0;return function(t){if(60===t)return e.enter(n),e.enter(i),e.enter(a),e.consume(t),e.exit(a),u;if(null===t||32===t||41===t||Kw(t))return r(t);return e.enter(n),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),p(t)};function u(r){return 62===r?(e.enter(a),e.consume(r),e.exit(a),e.exit(i),e.exit(n),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),d(r))}function d(t){return 62===t?(e.exit("chunkString"),e.exit(s),u(t)):null===t||60===t||Ww(t)?r(t):(e.consume(t),92===t?h:d)}function h(t){return 60===t||62===t||92===t?(e.consume(t),d):d(t)}function p(i){return c||null!==i&&41!==i&&!Gw(i)?c<l&&40===i?(e.consume(i),c++,p):41===i?(e.consume(i),c--,p):null===i||32===i||40===i||Kw(i)?r(i):(e.consume(i),92===i?f:p):(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(n),t(i))}function f(t){return 40===t||41===t||92===t?(e.consume(t),p):p(t)}}function Eb(e,t,r,n,i,a){const o=this;let s,A=0;return function(t){return e.enter(n),e.enter(i),e.consume(t),e.exit(i),e.enter(a),l};function l(u){return A>999||null===u||91===u||93===u&&!s||94===u&&!A&&"_hiddenFootnoteSupport"in o.parser.constructs?r(u):93===u?(e.exit(a),e.enter(i),e.consume(u),e.exit(i),e.exit(n),t):Ww(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),l):(e.enter("chunkString",{contentType:"string"}),c(u))}function c(t){return null===t||91===t||93===t||Ww(t)||A++>999?(e.exit("chunkString"),l(t)):(e.consume(t),s||(s=!qw(t)),92===t?u:c)}function u(t){return 91===t||92===t||93===t?(e.consume(t),A++,c):c(t)}}function kb(e,t,r,n,i,a){let o;return function(t){if(34===t||39===t||40===t)return e.enter(n),e.enter(i),e.consume(t),e.exit(i),o=40===t?41:t,s;return r(t)};function s(r){return r===o?(e.enter(i),e.consume(r),e.exit(i),e.exit(n),t):(e.enter(a),A(r))}function A(t){return t===o?(e.exit(a),s(o)):null===t?r(t):Ww(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),eb(e,A,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),l(t))}function l(t){return t===o||null===t||Ww(t)?(e.exit("chunkString"),A(t)):(e.consume(t),92===t?c:l)}function c(t){return t===o||92===t?(e.consume(t),l):l(t)}}function Sb(e,t){let r;return function n(i){if(Ww(i))return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r=!0,n;if(qw(i))return eb(e,n,r?"linePrefix":"lineSuffix")(i);return t(i)}}const jb={name:"definition",tokenize:function(e,t,r){const n=this;let i;return function(t){return e.enter("definition"),function(t){return Eb.call(n,e,a,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function a(t){return i=Lw(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o):r(t)}function o(t){return Gw(t)?Sb(e,s)(t):s(t)}function s(t){return Cb(e,A,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function A(t){return e.attempt(Fb,l,l)(t)}function l(t){return qw(t)?eb(e,c,"whitespace")(t):c(t)}function c(a){return null===a||Ww(a)?(e.exit("definition"),n.parser.defined.push(i),t(a)):r(a)}}},Fb={partial:!0,tokenize:function(e,t,r){return function(t){return Gw(t)?Sb(e,n)(t):r(t)};function n(t){return kb(e,i,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function i(t){return qw(t)?eb(e,a,"whitespace")(t):a(t)}function a(e){return null===e||Ww(e)?t(e):r(e)}}};const Qb={name:"hardBreakEscape",tokenize:function(e,t,r){return function(t){return e.enter("hardBreakEscape"),e.consume(t),n};function n(n){return Ww(n)?(e.exit("hardBreakEscape"),t(n)):r(n)}}};const Nb={name:"headingAtx",resolve:function(e,t){let r,n,i=e.length-2,a=3;"whitespace"===e[a][1].type&&(a+=2);i-2>a&&"whitespace"===e[i][1].type&&(i-=2);"atxHeadingSequence"===e[i][1].type&&(a===i-1||i-4>a&&"whitespace"===e[i-2][1].type)&&(i-=a+1===i?2:4);i>a&&(r={type:"atxHeadingText",start:e[a][1].start,end:e[i][1].end},n={type:"chunkText",start:e[a][1].start,end:e[i][1].end,contentType:"text"},Uw(e,a,i-a+1,[["enter",r,t],["enter",n,t],["exit",n,t],["exit",r,t]]));return e},tokenize:function(e,t,r){let n=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),i(t)}(t)};function i(t){return 35===t&&n++<6?(e.consume(t),i):null===t||Gw(t)?(e.exit("atxHeadingSequence"),a(t)):r(t)}function a(r){return 35===r?(e.enter("atxHeadingSequence"),o(r)):null===r||Ww(r)?(e.exit("atxHeading"),t(r)):qw(r)?eb(e,a,"whitespace")(r):(e.enter("atxHeadingText"),s(r))}function o(t){return 35===t?(e.consume(t),o):(e.exit("atxHeadingSequence"),a(t))}function s(t){return null===t||35===t||Gw(t)?(e.exit("atxHeadingText"),a(t)):(e.consume(t),s)}}};const Ub=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Ob=["pre","script","style","textarea"],Ib={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},tokenize:function(e,t,r){const n=this;let i,a,o,s,A;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),l}(t)};function l(s){return 33===s?(e.consume(s),c):47===s?(e.consume(s),a=!0,h):63===s?(e.consume(s),i=3,n.interrupt?t:I):Hw(s)?(e.consume(s),o=String.fromCharCode(s),p):r(s)}function c(a){return 45===a?(e.consume(a),i=2,u):91===a?(e.consume(a),i=5,s=0,d):Hw(a)?(e.consume(a),i=4,n.interrupt?t:I):r(a)}function u(i){return 45===i?(e.consume(i),n.interrupt?t:I):r(i)}function d(i){const a="CDATA[";return i===a.charCodeAt(s++)?(e.consume(i),6===s?n.interrupt?t:k:d):r(i)}function h(t){return Hw(t)?(e.consume(t),o=String.fromCharCode(t),p):r(t)}function p(s){if(null===s||47===s||62===s||Gw(s)){const A=47===s,l=o.toLowerCase();return A||a||!Ob.includes(l)?Ub.includes(o.toLowerCase())?(i=6,A?(e.consume(s),f):n.interrupt?t(s):k(s)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(s):a?m(s):g(s)):(i=1,n.interrupt?t(s):k(s))}return 45===s||_w(s)?(e.consume(s),o+=String.fromCharCode(s),p):r(s)}function f(i){return 62===i?(e.consume(i),n.interrupt?t:k):r(i)}function m(t){return qw(t)?(e.consume(t),m):C(t)}function g(t){return 47===t?(e.consume(t),C):58===t||95===t||Hw(t)?(e.consume(t),y):qw(t)?(e.consume(t),g):C(t)}function y(t){return 45===t||46===t||58===t||95===t||_w(t)?(e.consume(t),y):v(t)}function v(t){return 61===t?(e.consume(t),x):qw(t)?(e.consume(t),v):g(t)}function x(t){return null===t||60===t||61===t||62===t||96===t?r(t):34===t||39===t?(e.consume(t),A=t,w):qw(t)?(e.consume(t),x):b(t)}function w(t){return t===A?(e.consume(t),A=null,B):null===t||Ww(t)?r(t):(e.consume(t),w)}function b(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||Gw(t)?v(t):(e.consume(t),b)}function B(e){return 47===e||62===e||qw(e)?g(e):r(e)}function C(t){return 62===t?(e.consume(t),E):r(t)}function E(t){return null===t||Ww(t)?k(t):qw(t)?(e.consume(t),E):r(t)}function k(t){return 45===t&&2===i?(e.consume(t),Q):60===t&&1===i?(e.consume(t),N):62===t&&4===i?(e.consume(t),T):63===t&&3===i?(e.consume(t),I):93===t&&5===i?(e.consume(t),O):!Ww(t)||6!==i&&7!==i?null===t||Ww(t)?(e.exit("htmlFlowData"),S(t)):(e.consume(t),k):(e.exit("htmlFlowData"),e.check(Tb,P,S)(t))}function S(t){return e.check(Pb,j,P)(t)}function j(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),F}function F(t){return null===t||Ww(t)?S(t):(e.enter("htmlFlowData"),k(t))}function Q(t){return 45===t?(e.consume(t),I):k(t)}function N(t){return 47===t?(e.consume(t),o="",U):k(t)}function U(t){if(62===t){const r=o.toLowerCase();return Ob.includes(r)?(e.consume(t),T):k(t)}return Hw(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),U):k(t)}function O(t){return 93===t?(e.consume(t),I):k(t)}function I(t){return 62===t?(e.consume(t),T):45===t&&2===i?(e.consume(t),I):k(t)}function T(t){return null===t||Ww(t)?(e.exit("htmlFlowData"),P(t)):(e.consume(t),T)}function P(r){return e.exit("htmlFlow"),t(r)}}},Tb={partial:!0,tokenize:function(e,t,r){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),e.attempt(lb,t,r)}}},Pb={partial:!0,tokenize:function(e,t,r){const n=this;return function(t){if(Ww(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i;return r(t)};function i(e){return n.parser.lazy[n.now().line]?r(e):t(e)}}};const Mb={name:"htmlText",tokenize:function(e,t,r){const n=this;let i,a,o;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),s};function s(t){return 33===t?(e.consume(t),A):47===t?(e.consume(t),x):63===t?(e.consume(t),y):Hw(t)?(e.consume(t),B):r(t)}function A(t){return 45===t?(e.consume(t),l):91===t?(e.consume(t),a=0,h):Hw(t)?(e.consume(t),g):r(t)}function l(t){return 45===t?(e.consume(t),d):r(t)}function c(t){return null===t?r(t):45===t?(e.consume(t),u):Ww(t)?(o=c,U(t)):(e.consume(t),c)}function u(t){return 45===t?(e.consume(t),d):c(t)}function d(e){return 62===e?N(e):45===e?u(e):c(e)}function h(t){const n="CDATA[";return t===n.charCodeAt(a++)?(e.consume(t),6===a?p:h):r(t)}function p(t){return null===t?r(t):93===t?(e.consume(t),f):Ww(t)?(o=p,U(t)):(e.consume(t),p)}function f(t){return 93===t?(e.consume(t),m):p(t)}function m(t){return 62===t?N(t):93===t?(e.consume(t),m):p(t)}function g(t){return null===t||62===t?N(t):Ww(t)?(o=g,U(t)):(e.consume(t),g)}function y(t){return null===t?r(t):63===t?(e.consume(t),v):Ww(t)?(o=y,U(t)):(e.consume(t),y)}function v(e){return 62===e?N(e):y(e)}function x(t){return Hw(t)?(e.consume(t),w):r(t)}function w(t){return 45===t||_w(t)?(e.consume(t),w):b(t)}function b(t){return Ww(t)?(o=b,U(t)):qw(t)?(e.consume(t),b):N(t)}function B(t){return 45===t||_w(t)?(e.consume(t),B):47===t||62===t||Gw(t)?C(t):r(t)}function C(t){return 47===t?(e.consume(t),N):58===t||95===t||Hw(t)?(e.consume(t),E):Ww(t)?(o=C,U(t)):qw(t)?(e.consume(t),C):N(t)}function E(t){return 45===t||46===t||58===t||95===t||_w(t)?(e.consume(t),E):k(t)}function k(t){return 61===t?(e.consume(t),S):Ww(t)?(o=k,U(t)):qw(t)?(e.consume(t),k):C(t)}function S(t){return null===t||60===t||61===t||62===t||96===t?r(t):34===t||39===t?(e.consume(t),i=t,j):Ww(t)?(o=S,U(t)):qw(t)?(e.consume(t),S):(e.consume(t),F)}function j(t){return t===i?(e.consume(t),i=void 0,Q):null===t?r(t):Ww(t)?(o=j,U(t)):(e.consume(t),j)}function F(t){return null===t||34===t||39===t||60===t||61===t||96===t?r(t):47===t||62===t||Gw(t)?C(t):(e.consume(t),F)}function Q(e){return 47===e||62===e||Gw(e)?C(e):r(e)}function N(n){return 62===n?(e.consume(n),e.exit("htmlTextData"),e.exit("htmlText"),t):r(n)}function U(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),O}function O(t){return qw(t)?eb(e,I,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):I(t)}function I(t){return e.enter("htmlTextData"),o(t)}}};const Db={name:"labelEnd",resolveAll:function(e){let t=-1;const r=[];for(;++t<e.length;){const n=e[t][1];if(r.push(e[t]),"labelImage"===n.type||"labelLink"===n.type||"labelEnd"===n.type){const e="labelImage"===n.type?4:2;n.type="data",t+=e}}e.length!==r.length&&Uw(e,0,e.length,r);return e},resolveTo:function(e,t){let r,n,i,a,o=e.length,s=0;for(;o--;)if(r=e[o][1],n){if("link"===r.type||"labelLink"===r.type&&r._inactive)break;"enter"===e[o][0]&&"labelLink"===r.type&&(r._inactive=!0)}else if(i){if("enter"===e[o][0]&&("labelImage"===r.type||"labelLink"===r.type)&&!r._balanced&&(n=o,"labelLink"!==r.type)){s=2;break}}else"labelEnd"===r.type&&(i=o);const A={type:"labelLink"===e[n][1].type?"link":"image",start:{...e[n][1].start},end:{...e[e.length-1][1].end}},l={type:"label",start:{...e[n][1].start},end:{...e[i][1].end}},c={type:"labelText",start:{...e[n+s+2][1].end},end:{...e[i-2][1].start}};return a=[["enter",A,t],["enter",l,t]],a=Ow(a,e.slice(n+1,n+s+3)),a=Ow(a,[["enter",c,t]]),a=Ow(a,ab(t.parser.constructs.insideSpan.null,e.slice(n+s+4,i-3),t)),a=Ow(a,[["exit",c,t],e[i-2],e[i-1],["exit",l,t]]),a=Ow(a,e.slice(i+1)),a=Ow(a,[["exit",A,t]]),Uw(e,n,e.length,a),e},tokenize:function(e,t,r){const n=this;let i,a,o=n.events.length;for(;o--;)if(("labelImage"===n.events[o][1].type||"labelLink"===n.events[o][1].type)&&!n.events[o][1]._balanced){i=n.events[o][1];break}return function(t){if(!i)return r(t);if(i._inactive)return c(t);return a=n.parser.defined.includes(Lw(n.sliceSerialize({start:i.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s};function s(t){return 40===t?e.attempt(Lb,l,a?l:c)(t):91===t?e.attempt(Hb,l,a?A:c)(t):a?l(t):c(t)}function A(t){return e.attempt(_b,l,c)(t)}function l(e){return t(e)}function c(e){return i._balanced=!0,r(e)}}},Lb={tokenize:function(e,t,r){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),n};function n(t){return Gw(t)?Sb(e,i)(t):i(t)}function i(t){return 41===t?l(t):Cb(e,a,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function a(t){return Gw(t)?Sb(e,s)(t):l(t)}function o(e){return r(e)}function s(t){return 34===t||39===t||40===t?kb(e,A,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):l(t)}function A(t){return Gw(t)?Sb(e,l)(t):l(t)}function l(n){return 41===n?(e.enter("resourceMarker"),e.consume(n),e.exit("resourceMarker"),e.exit("resource"),t):r(n)}}},Hb={tokenize:function(e,t,r){const n=this;return function(t){return Eb.call(n,e,i,a,"reference","referenceMarker","referenceString")(t)};function i(e){return n.parser.defined.includes(Lw(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(e):r(e)}function a(e){return r(e)}}},_b={tokenize:function(e,t,r){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),n};function n(n){return 93===n?(e.enter("referenceMarker"),e.consume(n),e.exit("referenceMarker"),e.exit("reference"),t):r(n)}}};const Rb={name:"labelStartImage",resolveAll:Db.resolveAll,tokenize:function(e,t,r){const n=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),i};function i(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),a):r(t)}function a(e){return 94===e&&"_hiddenFootnoteSupport"in n.parser.constructs?r(e):t(e)}}};const Kb={name:"labelStartLink",resolveAll:Db.resolveAll,tokenize:function(e,t,r){const n=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),i};function i(e){return 94===e&&"_hiddenFootnoteSupport"in n.parser.constructs?r(e):t(e)}}};const zb={name:"lineEnding",tokenize:function(e,t){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),eb(e,t,"linePrefix")}}};const Vb={name:"thematicBreak",tokenize:function(e,t,r){let n,i=0;return function(t){return e.enter("thematicBreak"),function(e){return n=e,a(e)}(t)};function a(a){return a===n?(e.enter("thematicBreakSequence"),o(a)):i>=3&&(null===a||Ww(a))?(e.exit("thematicBreak"),t(a)):r(a)}function o(t){return t===n?(e.consume(t),i++,o):(e.exit("thematicBreakSequence"),qw(t)?eb(e,a,"whitespace")(t):a(t))}}};const $b={continuation:{tokenize:function(e,t,r){const n=this;return n.containerState._closeFlow=void 0,e.check(lb,function(r){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,eb(e,t,"listItemIndent",n.containerState.size+1)(r)},function(r){if(n.containerState.furtherBlankLines||!qw(r))return n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,i(r);return n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(Gb,t,i)(r)});function i(i){return n.containerState._closeFlow=!0,n.interrupt=void 0,eb(e,e.attempt($b,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,r){const n=this,i=n.events[n.events.length-1];let a=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,o=0;return function(t){const i=n.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!n.containerState.marker||t===n.containerState.marker:zw(t)){if(n.containerState.type||(n.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check(Vb,r,A)(t):A(t);if(!n.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(t)}return r(t)};function s(t){return zw(t)&&++o<10?(e.consume(t),s):(!n.interrupt||o<2)&&(n.containerState.marker?t===n.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),A(t)):r(t)}function A(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||t,e.check(lb,n.interrupt?r:l,e.attempt(Wb,u,c))}function l(e){return n.containerState.initialBlankLine=!0,a++,u(e)}function c(t){return qw(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),u):r(t)}function u(r){return n.containerState.size=a+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(r)}}},Wb={partial:!0,tokenize:function(e,t,r){const n=this;return eb(e,function(e){const i=n.events[n.events.length-1];return!qw(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):r(e)},"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},Gb={partial:!0,tokenize:function(e,t,r){const n=this;return eb(e,function(e){const i=n.events[n.events.length-1];return i&&"listItemIndent"===i[1].type&&i[2].sliceSerialize(i[1],!0).length===n.containerState.size?t(e):r(e)},"listItemIndent",n.containerState.size+1)}};const qb={name:"setextUnderline",resolveTo:function(e,t){let r,n,i,a=e.length;for(;a--;)if("enter"===e[a][0]){if("content"===e[a][1].type){r=a;break}"paragraph"===e[a][1].type&&(n=a)}else"content"===e[a][1].type&&e.splice(a,1),i||"definition"!==e[a][1].type||(i=a);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};e[n][1].type="setextHeadingText",i?(e.splice(n,0,["enter",o,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end={...e[i][1].end}):e[r][1]=o;return e.push(["exit",o,t]),e},tokenize:function(e,t,r){const n=this;let i;return function(t){let o,s=n.events.length;for(;s--;)if("lineEnding"!==n.events[s][1].type&&"linePrefix"!==n.events[s][1].type&&"content"!==n.events[s][1].type){o="paragraph"===n.events[s][1].type;break}if(!n.parser.lazy[n.now().line]&&(n.interrupt||o))return e.enter("setextHeadingLine"),i=t,function(t){return e.enter("setextHeadingLineSequence"),a(t)}(t);return r(t)};function a(t){return t===i?(e.consume(t),a):(e.exit("setextHeadingLineSequence"),qw(t)?eb(e,o,"lineSuffix")(t):o(t))}function o(n){return null===n||Ww(n)?(e.exit("setextHeadingLine"),t(n)):r(n)}}};const Yb={tokenize:function(e){const t=this,r=e.attempt(lb,function(n){if(null===n)return void e.consume(n);return e.enter("lineEndingBlank"),e.consume(n),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r},e.attempt(this.parser.constructs.flowInitial,n,eb(e,e.attempt(this.parser.constructs.flow,n,e.attempt(bb,n)),"linePrefix")));return r;function n(n){if(null!==n)return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),t.currentConstruct=void 0,r;e.consume(n)}}};const Xb={resolveAll:tB()},Jb=eB("string"),Zb=eB("text");function eB(e){return{resolveAll:tB("text"===e?rB:void 0),tokenize:function(t){const r=this,n=this.parser.constructs[e],i=t.attempt(n,a,o);return a;function a(e){return A(e)?i(e):o(e)}function o(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return A(e)?(t.exit("data"),i(e)):(t.consume(e),s)}function A(e){if(null===e)return!0;const t=n[e];let i=-1;if(t)for(;++i<t.length;){const e=t[i];if(!e.previous||e.previous.call(r,r.previous))return!0}return!1}}}}function tB(e){return function(t,r){let n,i=-1;for(;++i<=t.length;)void 0===n?t[i]&&"data"===t[i][1].type&&(n=i,i++):t[i]&&"data"===t[i][1].type||(i!==n+2&&(t[n][1].end=t[i-1][1].end,t.splice(n+2,i-n-2),i=n+2),n=void 0);return e?e(t,r):t}}function rB(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||"lineEnding"===e[r][1].type)&&"data"===e[r-1][1].type){const n=e[r-1][1],i=t.sliceStream(n);let a,o=i.length,s=-1,A=0;for(;o--;){const e=i[o];if("string"==typeof e){for(s=e.length;32===e.charCodeAt(s-1);)A++,s--;if(s)break;s=-1}else if(-2===e)a=!0,A++;else if(-1!==e){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(A=0),A){const i={type:r===e.length||a||A<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?s:n.start._bufferIndex+s,_index:n.start._index+o,line:n.end.line,column:n.end.column-A,offset:n.end.offset-A},end:{...n.end}};n.end={...i.start},n.start.offset===n.end.offset?Object.assign(n,i):(e.splice(r,0,["enter",i,t],["exit",i,t]),r+=2)}r++}return e}const nB={42:$b,43:$b,45:$b,48:$b,49:$b,50:$b,51:$b,52:$b,53:$b,54:$b,55:$b,56:$b,57:$b,62:cb},iB={91:jb},aB={[-2]:fb,[-1]:fb,32:fb},oB={35:Nb,42:Vb,45:[qb,Vb],60:Ib,61:qb,95:Vb,96:pb,126:pb},sB={38:db,92:ub},AB={[-5]:zb,[-4]:zb,[-3]:zb,33:Rb,38:db,42:ob,60:[Ab,Mb],91:Kb,92:[Qb,ub],93:Db,95:ob,96:gb},lB={null:[ob,Xb]},cB=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:iB,disable:{null:[]},document:nB,flow:oB,flowInitial:aB,insideSpan:lB,string:sB,text:AB},Symbol.toStringTag,{value:"Module"}));function uB(e,t,r){let n={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const i={},a=[];let o=[],s=[];const A={attempt:m(function(e,t){g(e,t.from)}),check:m(f),consume:function(e){Ww(e)?(n.line++,n.column=1,n.offset+=-3===e?2:1,y()):-1!==e&&(n.column++,n.offset++);n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===o[n._index].length&&(n._bufferIndex=-1,n._index++));l.previous=e},enter:function(e,t){const r=t||{};return r.type=e,r.start=d(),l.events.push(["enter",r,l]),s.push(r),r},exit:function(e){const t=s.pop();return t.end=d(),l.events.push(["exit",t,l]),t},interrupt:m(f,{interrupt:!0})},l={code:null,containerState:{},defineSkip:function(e){i[e.line]=e.column,y()},events:[],now:d,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let r=-1;const n=[];let i;for(;++r<e.length;){const a=e[r];let o;if("string"==typeof a)o=a;else switch(a){case-5:o="\r";break;case-4:o="\n";break;case-3:o="\r\n";break;case-2:o=t?" ":"\t";break;case-1:if(!t&&i)continue;o=" ";break;default:o=String.fromCharCode(a)}i=-2===a,n.push(o)}return n.join("")}(u(e),t)},sliceStream:u,write:function(e){if(o=Ow(o,e),h(),null!==o[o.length-1])return[];return g(t,0),l.events=ab(a,l.events,l),l.events}};let c=t.tokenize.call(l,A);return t.resolveAll&&a.push(t),l;function u(e){return function(e,t){const r=t.start._index,n=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let o;if(r===i)o=[e[r].slice(n,a)];else{if(o=e.slice(r,i),n>-1){const e=o[0];"string"==typeof e?o[0]=e.slice(n):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}(o,e)}function d(){const{_bufferIndex:e,_index:t,line:r,column:i,offset:a}=n;return{_bufferIndex:e,_index:t,line:r,column:i,offset:a}}function h(){let e;for(;n._index<o.length;){const t=o[n._index];if("string"==typeof t)for(e=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===e&&n._bufferIndex<t.length;)p(t.charCodeAt(n._bufferIndex));else p(t)}}function p(e){c=c(e)}function f(e,t){t.restore()}function m(e,t){return function(r,i,a){let o,c,u,h;return Array.isArray(r)?p(r):"tokenize"in r?p([r]):function(e){return t;function t(t){const r=null!==t&&e[t],n=null!==t&&e.null;return p([...Array.isArray(r)?r:r?[r]:[],...Array.isArray(n)?n:n?[n]:[]])(t)}}(r);function p(e){return o=e,c=0,0===e.length?a:f(e[c])}function f(e){return function(r){h=function(){const e=d(),t=l.previous,r=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){n=e,l.previous=t,l.currentConstruct=r,l.events.length=i,s=a,y()}}(),u=e,e.partial||(l.currentConstruct=e);if(e.name&&l.parser.constructs.disable.null.includes(e.name))return g();return e.tokenize.call(t?Object.assign(Object.create(l),t):l,A,m,g)(r)}}function m(t){return e(u,h),i}function g(e){return h.restore(),++c<o.length?f(o[c]):a}}}function g(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&Uw(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function y(){n.line in i&&n.column<2&&(n.column=i[n.line],n.offset+=i[n.line]-1)}}const dB=/[\0\t\n\r]/g;const hB=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function pB(e,t,r){if(t)return t;if(35===r.charCodeAt(0)){const e=r.charCodeAt(1),t=120===e||88===e;return Dw(r.slice(t?2:1),t?16:10)}return Nw(r)||e}const fB={}.hasOwnProperty;function mB(e,t,r){return"string"!=typeof t&&(r=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(te),autolinkProtocol:E,autolinkEmail:E,atxHeading:a(X),blockQuote:a($),characterEscape:E,characterReference:E,codeFenced:a(W),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(W,o),codeText:a(G,o),codeTextData:E,data:E,codeFlowValue:E,definition:a(q),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(Y),hardBreakEscape:a(J),hardBreakTrailing:a(J),htmlFlow:a(Z,o),htmlFlowData:E,htmlText:a(Z,o),htmlTextData:E,image:a(ee),label:o,link:a(te),listItem:a(ne),listItemValue:d,listOrdered:a(re,u),listUnordered:a(re),paragraph:a(ie),reference:L,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(X),strong:a(ae),thematicBreak:a(se)},exit:{atxHeading:A(),atxHeadingSequence:w,autolink:A(),autolinkEmail:V,autolinkProtocol:z,blockQuote:A(),characterEscapeValue:k,characterReferenceMarkerHexadecimal:_,characterReferenceMarkerNumeric:_,characterReferenceValue:R,characterReference:K,codeFenced:A(m),codeFencedFence:f,codeFencedFenceInfo:h,codeFencedFenceMeta:p,codeFlowValue:k,codeIndented:A(g),codeText:A(N),codeTextData:k,data:k,definition:A(),definitionDestinationString:x,definitionLabelString:y,definitionTitleString:v,emphasis:A(),hardBreakEscape:A(j),hardBreakTrailing:A(j),htmlFlow:A(F),htmlFlowData:k,htmlText:A(Q),htmlTextData:k,image:A(O),label:T,labelText:I,lineEnding:S,link:A(U),listItem:A(),listOrdered:A(),listUnordered:A(),paragraph:A(),referenceString:H,resourceDestinationString:P,resourceTitleString:M,resource:D,setextHeading:A(C),setextHeadingLineSequence:B,setextHeadingText:b,strong:A(),thematicBreak:A()}};yB(t,(e||{}).mdastExtensions||[]);const r={};return n;function n(e){let n={type:"root",children:[]};const a={stack:[n],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:c,data:r},A=[];let u=-1;for(;++u<e.length;)if("listOrdered"===e[u][1].type||"listUnordered"===e[u][1].type)if("enter"===e[u][0])A.push(u);else{u=i(e,A.pop(),u)}for(u=-1;++u<e.length;){const r=t[e[u][0]];fB.call(r,e[u][1].type)&&r[e[u][1].type].call(Object.assign({sliceSerialize:e[u][2].sliceSerialize},a),e[u][1])}if(a.tokenStack.length>0){const e=a.tokenStack[a.tokenStack.length-1];(e[1]||xB).call(a,void 0,e[0])}for(n.position={start:gB(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:gB(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},u=-1;++u<t.transforms.length;)n=t.transforms[u](n)||n;return n}function i(e,t,r){let n,i,a,o,s=t-1,A=-1,l=!1;for(;++s<=r;){const t=e[s];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?A++:A--,o=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!n||o||A||a||(a=s),o=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:o=void 0}if(!A&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===A&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(n){let o=s;for(i=void 0;o--;){const t=e[o];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;i&&(e[i][1].type="lineEndingBlank",l=!0),t[1].type="lineEnding",i=o}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}a&&(!i||a<i)&&(n._spread=!0),n.end=Object.assign({},i?e[i][1].start:t[1].end),e.splice(i||s,0,["exit",n,t[2]]),s++,r++}if("listItemPrefix"===t[1].type){const i={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};n=i,e.splice(s,0,["enter",i,t[2]]),s++,r++,a=void 0,o=!0}}}return e[t][1]._spread=l,r}function a(e,t){return r;function r(r){s.call(this,e(r),r),t&&t.call(this,r)}}function o(){this.stack.push({type:"fragment",children:[]})}function s(e,t,r){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,r||void 0]),e.position={start:gB(t.start),end:void 0}}function A(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){const r=this.stack.pop(),n=this.tokenStack.pop();if(!n)throw new Error("Cannot close `"+e.type+"` ("+iw({start:e.start,end:e.end})+"): it’s not open");if(n[0].type!==e.type)if(t)t.call(this,e,n[0]);else{(n[1]||xB).call(this,e,n[0])}r.position.end=gB(e.end)}function c(){return Sw(this.stack.pop())}function u(){this.data.expectingFirstListItemValue=!0}function d(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function h(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function p(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function f(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function m(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function y(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.label=t,r.identifier=Lw(this.sliceSerialize(e)).toLowerCase()}function v(){const e=this.resume();this.stack[this.stack.length-1].title=e}function x(){const e=this.resume();this.stack[this.stack.length-1].url=e}function w(e){const t=this.stack[this.stack.length-1];if(!t.depth){const r=this.sliceSerialize(e).length;t.depth=r}}function b(){this.data.setextHeadingSlurpLineEnding=!0}function B(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function C(){this.data.setextHeadingSlurpLineEnding=void 0}function E(e){const t=this.stack[this.stack.length-1].children;let r=t[t.length-1];r&&"text"===r.type||(r=oe(),r.position={start:gB(e.start),end:void 0},t.push(r)),this.stack.push(r)}function k(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=gB(e.end)}function S(e){const r=this.stack[this.stack.length-1];if(this.data.atHardBreak){return r.children[r.children.length-1].position.end=gB(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(r.type)&&(E.call(this,e),k.call(this,e))}function j(){this.data.atHardBreak=!0}function F(){const e=this.resume();this.stack[this.stack.length-1].value=e}function Q(){const e=this.resume();this.stack[this.stack.length-1].value=e}function N(){const e=this.resume();this.stack[this.stack.length-1].value=e}function U(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function O(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function I(e){const t=this.sliceSerialize(e),r=this.stack[this.stack.length-2];r.label=function(e){return e.replace(hB,pB)}(t),r.identifier=Lw(t).toLowerCase()}function T(){const e=this.stack[this.stack.length-1],t=this.resume(),r=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===r.type){const t=e.children;r.children=t}else r.alt=t}function P(){const e=this.resume();this.stack[this.stack.length-1].url=e}function M(){const e=this.resume();this.stack[this.stack.length-1].title=e}function D(){this.data.inReference=void 0}function L(){this.data.referenceType="collapsed"}function H(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.label=t,r.identifier=Lw(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function _(e){this.data.characterReferenceType=e.type}function R(e){const t=this.sliceSerialize(e),r=this.data.characterReferenceType;let n;if(r)n=Dw(t,"characterReferenceMarkerNumeric"===r?10:16),this.data.characterReferenceType=void 0;else{n=Nw(t)}this.stack[this.stack.length-1].value+=n}function K(e){this.stack.pop().position.end=gB(e.end)}function z(e){k.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function V(e){k.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function $(){return{type:"blockquote",children:[]}}function W(){return{type:"code",lang:null,meta:null,value:""}}function G(){return{type:"inlineCode",value:""}}function q(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Y(){return{type:"emphasis",children:[]}}function X(){return{type:"heading",depth:0,children:[]}}function J(){return{type:"break"}}function Z(){return{type:"html",value:""}}function ee(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function re(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function ne(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function ie(){return{type:"paragraph",children:[]}}function ae(){return{type:"strong",children:[]}}function oe(){return{type:"text",value:""}}function se(){return{type:"thematicBreak"}}}(r)(function(e){for(;!xb(e););return e}(function(e){const t={constructs:Tw([cB,...(e||{}).extensions||[]]),content:r(tb),defined:[],document:r(rb),flow:r(Yb),lazy:{},string:r(Jb),text:r(Zb)};return t;function r(e){return function(r){return uB(t,e,r)}}}(r).document().write(function(){let e,t=1,r="",n=!0;return function(i,a,o){const s=[];let A,l,c,u,d;for(i=r+("string"==typeof i?i.toString():new TextDecoder(a||void 0).decode(i)),c=0,r="",n&&(65279===i.charCodeAt(0)&&c++,n=void 0);c<i.length;){if(dB.lastIndex=c,A=dB.exec(i),u=A&&void 0!==A.index?A.index:i.length,d=i.charCodeAt(u),!A){r=i.slice(c);break}if(10===d&&c===u&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),c<u&&(s.push(i.slice(c,u)),t+=u-c),d){case 0:s.push(65533),t++;break;case 9:for(l=4*Math.ceil(t/4),s.push(-2);t++<l;)s.push(-1);break;case 10:s.push(-4),t=1;break;default:e=!0,t=1}c=u+1}return o&&(e&&s.push(-5),r&&s.push(r),s.push(null)),s}}()(e,t,!0))))}function gB(e){return{line:e.line,column:e.column,offset:e.offset}}function yB(e,t){let r=-1;for(;++r<t.length;){const n=t[r];Array.isArray(n)?yB(e,n):vB(e,n)}}function vB(e,t){let r;for(r in t)if(fB.call(t,r))switch(r){case"canContainEols":{const n=t[r];n&&e[r].push(...n);break}case"transforms":{const n=t[r];n&&e[r].push(...n);break}case"enter":case"exit":{const n=t[r];n&&Object.assign(e[r],n);break}}}function xB(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+iw({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+iw({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+iw({start:t.start,end:t.end})+") is still open")}function wB(e){const t=this;t.parser=function(r){return mB(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function bB(e,t){const r=t.referenceType;let n="]";if("collapsed"===r?n+="[]":"full"===r&&(n+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+n}];const i=e.all(t),a=i[0];a&&"text"===a.type?a.value="["+a.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&"text"===o.type?o.value+=n:i.push({type:"text",value:n}),i}function BB(e){const t=e.spread;return null==t?e.children.length>1:t}function CB(e){const t=String(e),r=/\r?\n|\r/g;let n=r.exec(t),i=0;const a=[];for(;n;)a.push(EB(t.slice(i,n.index),i>0,!0),n[0]),i=n.index+n[0].length,n=r.exec(t);return a.push(EB(t.slice(i),i>0,!1)),a.join("")}function EB(e,t,r){let n=0,i=e.length;if(t){let t=e.codePointAt(n);for(;9===t||32===t;)n++,t=e.codePointAt(n)}if(r){let t=e.codePointAt(i-1);for(;9===t||32===t;)i--,t=e.codePointAt(i-1)}return i>n?e.slice(n,i):""}const kB={blockquote:function(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)},break:function(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:"\n"}]},code:function(e,t){const r=t.value?t.value+"\n":"",n={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(n.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:n,children:[{type:"text",value:r}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a},delete:function(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},emphasis:function(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},footnoteReference:function(e,t){const r="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=String(t.identifier).toUpperCase(),i=Zw(n.toLowerCase()),a=e.footnoteOrder.indexOf(n);let o,s=e.footnoteCounts.get(n);void 0===s?(s=0,e.footnoteOrder.push(n),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(n,s);const A={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+i,id:r+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,A);const l={type:"element",tagName:"sup",properties:{},children:[A]};return e.patch(t,l),e.applyData(t,l)},heading:function(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},html:function(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}},imageReference:function(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return bB(e,t);const i={src:Zw(n.url||""),alt:t.alt};null!==n.title&&void 0!==n.title&&(i.title=n.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)},image:function(e,t){const r={src:Zw(t.url)};null!==t.alt&&void 0!==t.alt&&(r.alt=t.alt),null!==t.title&&void 0!==t.title&&(r.title=t.title);const n={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,n),e.applyData(t,n)},inlineCode:function(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const n={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,n),e.applyData(t,n)},linkReference:function(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return bB(e,t);const i={href:Zw(n.url||"")};null!==n.title&&void 0!==n.title&&(i.title=n.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)},link:function(e,t){const r={href:Zw(t.url)};null!==t.title&&void 0!==t.title&&(r.title=t.title);const n={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},listItem:function(e,t,r){const n=e.all(t),i=r?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const r=e.children;let n=-1;for(;!t&&++n<r.length;)t=BB(r[n])}return t}(r):BB(t),a={},o=[];if("boolean"==typeof t.checked){const e=n[0];let r;e&&"element"===e.type&&"p"===e.tagName?r=e:(r={type:"element",tagName:"p",properties:{},children:[]},n.unshift(r)),r.children.length>0&&r.children.unshift({type:"text",value:" "}),r.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let s=-1;for(;++s<n.length;){const e=n[s];(i||0!==s||"element"!==e.type||"p"!==e.tagName)&&o.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||i?o.push(e):o.push(...e.children)}const A=n[n.length-1];A&&(i||"element"!==A.type||"p"!==A.tagName)&&o.push({type:"text",value:"\n"});const l={type:"element",tagName:"li",properties:a,children:o};return e.patch(t,l),e.applyData(t,l)},list:function(e,t){const r={},n=e.all(t);let i=-1;for("number"==typeof t.start&&1!==t.start&&(r.start=t.start);++i<n.length;){const e=n[i];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(n,!0)};return e.patch(t,a),e.applyData(t,a)},paragraph:function(e,t){const r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},root:function(e,t){const r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)},strong:function(e,t){const r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},table:function(e,t){const r=e.all(t),n=r.shift(),i=[];if(n){const r={type:"element",tagName:"thead",properties:{},children:e.wrap([n],!0)};e.patch(t.children[0],r),i.push(r)}if(r.length>0){const n={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},a=rw(t.children[1]),o=tw(t.children[t.children.length-1]);a&&o&&(n.position={start:a,end:o}),i.push(n)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)},tableCell:function(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},tableRow:function(e,t,r){const n=r?r.children:void 0,i=0===(n?n.indexOf(t):1)?"th":"td",a=r&&"table"===r.type?r.align:void 0,o=a?a.length:t.children.length;let s=-1;const A=[];for(;++s<o;){const r=t.children[s],n={},o=a?a[s]:void 0;o&&(n.align=o);let l={type:"element",tagName:i,properties:n,children:[]};r&&(l.children=e.all(r),e.patch(r,l),l=e.applyData(r,l)),A.push(l)}const l={type:"element",tagName:"tr",properties:{},children:e.wrap(A,!0)};return e.patch(t,l),e.applyData(t,l)},text:function(e,t){const r={type:"text",value:CB(String(t.value))};return e.patch(t,r),e.applyData(t,r)},thematicBreak:function(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)},toml:SB,yaml:SB,definition:SB,footnoteDefinition:SB};function SB(){}const jB="object"==typeof self?self:globalThis,FB=e=>((e,t)=>{const r=(t,r)=>(e.set(r,t),t),n=i=>{if(e.has(i))return e.get(i);const[a,o]=t[i];switch(a){case 0:case-1:return r(o,i);case 1:{const e=r([],i);for(const t of o)e.push(n(t));return e}case 2:{const e=r({},i);for(const[t,r]of o)e[n(t)]=n(r);return e}case 3:return r(new Date(o),i);case 4:{const{source:e,flags:t}=o;return r(new RegExp(e,t),i)}case 5:{const e=r(new Map,i);for(const[t,r]of o)e.set(n(t),n(r));return e}case 6:{const e=r(new Set,i);for(const t of o)e.add(n(t));return e}case 7:{const{name:e,message:t}=o;return r(new jB[e](t),i)}case 8:return r(BigInt(o),i);case"BigInt":return r(Object(BigInt(o)),i);case"ArrayBuffer":return r(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:e}=new Uint8Array(o);return r(new DataView(e),o)}}return r(new jB[a](o),i)};return n})(new Map,e)(0),QB="",{toString:NB}={},{keys:UB}=Object,OB=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const r=NB.call(e).slice(8,-1);switch(r){case"Array":return[1,QB];case"Object":return[2,QB];case"Date":return[3,QB];case"RegExp":return[4,QB];case"Map":return[5,QB];case"Set":return[6,QB];case"DataView":return[1,r]}return r.includes("Array")?[1,r]:r.includes("Error")?[7,r]:[2,r]},IB=([e,t])=>0===e&&("function"===t||"symbol"===t),TB=(e,{json:t,lossy:r}={})=>{const n=[];return((e,t,r,n)=>{const i=(e,t)=>{const i=n.push(e)-1;return r.set(t,i),i},a=n=>{if(r.has(n))return r.get(n);let[o,s]=OB(n);switch(o){case 0:{let t=n;switch(s){case"bigint":o=8,t=n.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);t=null;break;case"undefined":return i([-1],n)}return i([o,t],n)}case 1:{if(s){let e=n;return"DataView"===s?e=new Uint8Array(n.buffer):"ArrayBuffer"===s&&(e=new Uint8Array(n)),i([s,[...e]],n)}const e=[],t=i([o,e],n);for(const r of n)e.push(a(r));return t}case 2:{if(s)switch(s){case"BigInt":return i([s,n.toString()],n);case"Boolean":case"Number":case"String":return i([s,n.valueOf()],n)}if(t&&"toJSON"in n)return a(n.toJSON());const r=[],A=i([o,r],n);for(const t of UB(n))!e&&IB(OB(n[t]))||r.push([a(t),a(n[t])]);return A}case 3:return i([o,n.toISOString()],n);case 4:{const{source:e,flags:t}=n;return i([o,{source:e,flags:t}],n)}case 5:{const t=[],r=i([o,t],n);for(const[i,o]of n)(e||!IB(OB(i))&&!IB(OB(o)))&&t.push([a(i),a(o)]);return r}case 6:{const t=[],r=i([o,t],n);for(const i of n)!e&&IB(OB(i))||t.push(a(i));return r}}const{message:A}=n;return i([o,{name:s,message:A}],n)};return a})(!(t||r),!!t,new Map,n)(e),n},PB="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?FB(TB(e,t)):structuredClone(e):(e,t)=>FB(TB(e,t));function MB(e,t){const r=[{type:"text",value:"↩"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function DB(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const LB=function(e){if(null==e)return _B;if("function"==typeof e)return HB(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=LB(e[r]);return HB(n);function n(...e){let r=-1;for(;++r<t.length;)if(t[r].apply(this,e))return!0;return!1}}(e):function(e){const t=e;return HB(r);function r(r){const n=r;let i;for(i in e)if(n[i]!==t[i])return!1;return!0}}(e);if("string"==typeof e)return function(e){return HB(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function HB(e){return function(t,r,n){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof r?r:void 0,n||void 0))}}function _B(){return!0}const RB=[],KB=!0,zB=!1;function VB(e,t,r,n){let i;"function"==typeof t&&"function"!=typeof r?(n=r,r=t):i=t;const a=LB(i),o=n?-1:1;!function e(i,s,A){const l=i&&"object"==typeof i?i:{};if("string"==typeof l.type){const e="string"==typeof l.tagName?l.tagName:"string"==typeof l.name?l.name:void 0;Object.defineProperty(c,"name",{value:"node ("+i.type+(e?"<"+e+">":"")+")"})}return c;function c(){let l,c,u,d=RB;if((!t||a(i,s,A[A.length-1]||void 0))&&(d=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[KB,e];return null==e?RB:[e]}(r(i,A)),d[0]===zB))return d;if("children"in i&&i.children){const t=i;if(t.children&&"skip"!==d[0])for(c=(n?t.children.length:-1)+o,u=A.concat(t);c>-1&&c<t.children.length;){const r=t.children[c];if(l=e(r,c,u)(),l[0]===zB)return l;c="number"==typeof l[1]?l[1]:c+o}}return d}}(e,void 0,[])()}function $B(e,t,r,n){let i,a,o;"function"==typeof t&&"function"!=typeof r?(a=void 0,o=t,i=r):(a=t,o=r,i=n),VB(e,a,function(e,t){const r=t[t.length-1],n=r?r.children.indexOf(e):void 0;return o(e,n,r)},i)}const WB={}.hasOwnProperty,GB={};function qB(e,t){e.position&&(t.position=function(e){const t=rw(e),r=tw(e);if(t&&r)return{start:t,end:r}}(e))}function YB(e,t){let r=t;if(e&&e.data){const t=e.data.hName,n=e.data.hChildren,i=e.data.hProperties;if("string"==typeof t)if("element"===r.type)r.tagName=t;else{r={type:"element",tagName:t,properties:{},children:"children"in r?r.children:[r]}}"element"===r.type&&i&&Object.assign(r.properties,PB(i)),"children"in r&&r.children&&null!=n&&(r.children=n)}return r}function XB(e,t){const r=t.data||{},n=!("value"in t)||WB.call(r,"hProperties")||WB.call(r,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,n),e.applyData(t,n)}function JB(e,t){const r=[];let n=-1;for(t&&r.push({type:"text",value:"\n"});++n<e.length;)n&&r.push({type:"text",value:"\n"}),r.push(e[n]);return t&&e.length>0&&r.push({type:"text",value:"\n"}),r}function ZB(e){let t=0,r=e.charCodeAt(t);for(;9===r||32===r;)t++,r=e.charCodeAt(t);return e.slice(t)}function eC(e,t){const r=function(e,t){const r=t||GB,n=new Map,i=new Map,a=new Map,o={...kB,...r.handlers},s={all:function(e){const t=[];if("children"in e){const r=e.children;let n=-1;for(;++n<r.length;){const i=s.one(r[n],e);if(i){if(n&&"break"===r[n-1].type&&(Array.isArray(i)||"text"!==i.type||(i.value=ZB(i.value)),!Array.isArray(i)&&"element"===i.type)){const e=i.children[0];e&&"text"===e.type&&(e.value=ZB(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t},applyData:YB,definitionById:n,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:o,one:function(e,t){const r=e.type,n=s.handlers[r];if(WB.call(s.handlers,r)&&n)return n(s,e,t);if(s.options.passThrough&&s.options.passThrough.includes(r)){if("children"in e){const{children:t,...r}=e,n=PB(r);return n.children=s.all(e),n}return PB(e)}return(s.options.unknownHandler||XB)(s,e,t)},options:r,patch:qB,wrap:JB};return $B(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?n:i,r=String(e.identifier).toUpperCase();t.has(r)||t.set(r,e)}}),s}(e,t),n=r.one(e,void 0),i=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||MB,n=e.options.footnoteBackLabel||DB,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let A=-1;for(;++A<e.footnoteOrder.length;){const i=e.footnoteById.get(e.footnoteOrder[A]);if(!i)continue;const a=e.all(i),o=String(i.identifier).toUpperCase(),l=Zw(o.toLowerCase());let c=0;const u=[],d=e.footnoteCounts.get(o);for(;void 0!==d&&++c<=d;){u.length>0&&u.push({type:"text",value:" "});let e="string"==typeof r?r:r(A,c);"string"==typeof e&&(e={type:"text",value:e}),u.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+l+(c>1?"-"+c:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof n?n:n(A,c),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const h=a[a.length-1];if(h&&"element"===h.type&&"p"===h.tagName){const e=h.children[h.children.length-1];e&&"text"===e.type?e.value+=" ":h.children.push({type:"text",value:" "}),h.children.push(...u)}else a.push(...u);const p={type:"element",tagName:"li",properties:{id:t+"fn-"+l},children:e.wrap(a,!0)};e.patch(i,p),s.push(p)}if(0!==s.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...PB(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:"\n"}]}}(r),a=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return i&&a.children.push({type:"text",value:"\n"},i),a}function tC(e,t){return e&&"run"in e?async function(r,n){const i=eC(r,{file:n,...t});await e.run(i,n)}:function(r,n){return eC(r,{file:n,...e||t})}}function rC(e){if(e)throw e}var nC,iC;var aC=function(){if(iC)return nC;iC=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},a=function(r){if(!r||"[object Object]"!==t.call(r))return!1;var n,i=e.call(r,"constructor"),a=r.constructor&&r.constructor.prototype&&e.call(r.constructor.prototype,"isPrototypeOf");if(r.constructor&&!i&&!a)return!1;for(n in r);return void 0===n||e.call(r,n)},o=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,r){if("__proto__"===r){if(!e.call(t,r))return;if(n)return n(t,r).value}return t[r]};return nC=function e(){var t,r,n,A,l,c,u=arguments[0],d=1,h=arguments.length,p=!1;for("boolean"==typeof u&&(p=u,u=arguments[1]||{},d=2),(null==u||"object"!=typeof u&&"function"!=typeof u)&&(u={});d<h;++d)if(null!=(t=arguments[d]))for(r in t)n=s(u,r),u!==(A=s(t,r))&&(p&&A&&(a(A)||(l=i(A)))?(l?(l=!1,c=n&&i(n)?n:[]):c=n&&a(n)?n:{},o(u,{name:r,newValue:e(p,c,A)})):void 0!==A&&o(u,{name:r,newValue:A}));return u},nC}();const oC=ay(aC);function sC(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function AC(){const e=[],t={run:function(...t){let r=-1;const n=t.pop();if("function"!=typeof n)throw new TypeError("Expected function as last argument, not "+n);!function i(a,...o){const s=e[++r];let A=-1;if(a)n(a);else{for(;++A<t.length;)null!==o[A]&&void 0!==o[A]||(o[A]=t[A]);t=o,s?function(e,t){let r;return n;function n(...t){const n=e.length>t.length;let s;n&&t.push(i);try{s=e.apply(this,t)}catch(a){if(n&&r)throw a;return i(a)}n||(s&&s.then&&"function"==typeof s.then?s.then(o,i):s instanceof Error?i(s):o(s))}function i(e,...n){r||(r=!0,t(e,...n))}function o(e){i(null,e)}}(s,i)(...o):n(null,...o)}}(null,...t)},use:function(r){if("function"!=typeof r)throw new TypeError("Expected `middelware` to be a function, not "+r);return e.push(r),t}};return t}const lC={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');cC(e);let r,n=0,i=-1,a=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;a--;)if(47===e.codePointAt(a)){if(r){n=a+1;break}}else i<0&&(r=!0,i=a+1);return i<0?"":e.slice(n,i)}if(t===e)return"";let o=-1,s=t.length-1;for(;a--;)if(47===e.codePointAt(a)){if(r){n=a+1;break}}else o<0&&(r=!0,o=a+1),s>-1&&(e.codePointAt(a)===t.codePointAt(s--)?s<0&&(i=a):(s=-1,i=o));n===i?i=o:i<0&&(i=e.length);return e.slice(n,i)},dirname:function(e){if(cC(e),0===e.length)return".";let t,r=-1,n=e.length;for(;--n;)if(47===e.codePointAt(n)){if(t){r=n;break}}else t||(t=!0);return r<0?47===e.codePointAt(0)?"/":".":1===r&&47===e.codePointAt(0)?"//":e.slice(0,r)},extname:function(e){cC(e);let t,r=e.length,n=-1,i=0,a=-1,o=0;for(;r--;){const s=e.codePointAt(r);if(47!==s)n<0&&(t=!0,n=r+1),46===s?a<0?a=r:1!==o&&(o=1):a>-1&&(o=-1);else if(t){i=r+1;break}}if(a<0||n<0||0===o||1===o&&a===n-1&&a===i+1)return"";return e.slice(a,n)},join:function(...e){let t,r=-1;for(;++r<e.length;)cC(e[r]),e[r]&&(t=void 0===t?e[r]:t+"/"+e[r]);return void 0===t?".":function(e){cC(e);const t=47===e.codePointAt(0);let r=function(e,t){let r,n,i="",a=0,o=-1,s=0,A=-1;for(;++A<=e.length;){if(A<e.length)r=e.codePointAt(A);else{if(47===r)break;r=47}if(47===r){if(o===A-1||1===s);else if(o!==A-1&&2===s){if(i.length<2||2!==a||46!==i.codePointAt(i.length-1)||46!==i.codePointAt(i.length-2))if(i.length>2){if(n=i.lastIndexOf("/"),n!==i.length-1){n<0?(i="",a=0):(i=i.slice(0,n),a=i.length-1-i.lastIndexOf("/")),o=A,s=0;continue}}else if(i.length>0){i="",a=0,o=A,s=0;continue}t&&(i=i.length>0?i+"/..":"..",a=2)}else i.length>0?i+="/"+e.slice(o+1,A):i=e.slice(o+1,A),a=A-o-1;o=A,s=0}else 46===r&&s>-1?s++:s=-1}return i}(e,!t);0!==r.length||t||(r=".");r.length>0&&47===e.codePointAt(e.length-1)&&(r+="/");return t?"/"+r:r}(t)},sep:"/"};function cC(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const uC={cwd:function(){return"/"}};function dC(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function hC(e){if("string"==typeof e)e=new URL(e);else if(!dC(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let r=-1;for(;++r<t.length;)if(37===t.codePointAt(r)&&50===t.codePointAt(r+1)){const e=t.codePointAt(r+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}const pC=["history","path","basename","stem","extname","dirname"];class fC{constructor(e){let t;t=e?dC(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":uC.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r,n=-1;for(;++n<pC.length;){const e=pC[n];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(r in t)pC.includes(r)||(this[r]=t[r])}get basename(){return"string"==typeof this.path?lC.basename(this.path):void 0}set basename(e){gC(e,"basename"),mC(e,"basename"),this.path=lC.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?lC.dirname(this.path):void 0}set dirname(e){yC(this.basename,"dirname"),this.path=lC.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?lC.extname(this.path):void 0}set extname(e){if(mC(e,"extname"),yC(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=lC.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){dC(e)&&(e=hC(e)),gC(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?lC.basename(this.path,this.extname):void 0}set stem(e){gC(e,"stem"),mC(e,"stem"),this.path=lC.join(this.dirname||"",e+(this.extname||""))}fail(e,t,r){const n=this.message(e,t,r);throw n.fatal=!0,n}info(e,t,r){const n=this.message(e,t,r);return n.fatal=void 0,n}message(e,t,r){const n=new Aw(e,t,r);return this.path&&(n.name=this.path+":"+n.name,n.file=this.path),n.fatal=!1,this.messages.push(n),n}toString(e){if(void 0===this.value)return"";if("string"==typeof this.value)return this.value;return new TextDecoder(e||void 0).decode(this.value)}}function mC(e,t){if(e&&e.includes(lC.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+lC.sep+"`")}function gC(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function yC(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const vC=function(e){const t=this.constructor.prototype,r=t[e],n=function(){return r.apply(n,arguments)};return Object.setPrototypeOf(n,t),n},xC={}.hasOwnProperty;class wC extends vC{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=AC()}copy(){const e=new wC;let t=-1;for(;++t<this.attachers.length;){const r=this.attachers[t];e.use(...r)}return e.data(oC(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(EC("data",this.frozen),this.namespace[e]=t,this):xC.call(this.namespace,e)&&this.namespace[e]||void 0:e?(EC("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...r]=this.attachers[this.freezeIndex];if(!1===r[0])continue;!0===r[0]&&(r[0]=void 0);const n=t.call(e,...r);"function"==typeof n&&this.transformers.use(n)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=jC(e),r=this.parser||this.Parser;return BC("parse",r),r(String(t),t)}process(e,t){const r=this;return this.freeze(),BC("process",this.parser||this.Parser),CC("process",this.compiler||this.Compiler),t?n(void 0,t):new Promise(n);function n(n,i){const a=jC(e),o=r.parse(a);function s(e,r){e||!r?i(e):n?n(r):t(void 0,r)}r.run(o,a,function(e,t,n){if(e||!t||!n)return s(e);const i=t,a=r.stringify(i,n);var o;"string"==typeof(o=a)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(o)?n.value=a:n.result=a,s(e,n)})}}processSync(e){let t,r=!1;return this.freeze(),BC("processSync",this.parser||this.Parser),CC("processSync",this.compiler||this.Compiler),this.process(e,function(e,n){r=!0,rC(e),t=n}),SC("processSync","process",r),t}run(e,t,r){kC(e),this.freeze();const n=this.transformers;return r||"function"!=typeof t||(r=t,t=void 0),r?i(void 0,r):new Promise(i);function i(i,a){const o=jC(t);n.run(e,o,function(t,n,o){const s=n||e;t?a(t):i?i(s):r(void 0,s,o)})}}runSync(e,t){let r,n=!1;return this.run(e,t,function(e,t){rC(e),r=t,n=!0}),SC("runSync","run",n),r}stringify(e,t){this.freeze();const r=jC(t),n=this.compiler||this.Compiler;return CC("stringify",n),kC(e),n(e,r)}use(e,...t){const r=this.attachers,n=this.namespace;if(EC("use",this.frozen),null==e);else if("function"==typeof e)s(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?o(e):a(e)}return this;function i(e){if("function"==typeof e)s(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...r]=e;s(t,r)}else a(e)}}function a(e){if(!("plugins"in e)&&!("settings"in e))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(n.settings=oC(!0,n.settings,e.settings))}function o(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){i(e[t])}}}function s(e,t){let n=-1,i=-1;for(;++n<r.length;)if(r[n][0]===e){i=n;break}if(-1===i)r.push([e,...t]);else if(t.length>0){let[n,...a]=t;const o=r[i][1];sC(o)&&sC(n)&&(n=oC(!0,o,n)),r[i]=[e,n,...a]}}}}const bC=(new wC).freeze();function BC(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function CC(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function EC(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function kC(e){if(!sC(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function SC(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function jC(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new fC(e)}const FC=[],QC={allowDangerousHtml:!0},NC=/^(https?|ircs?|mailto|xmpp)$/i,UC=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function OC(e){const t=function(e){const t=e.rehypePlugins||FC,r=e.remarkPlugins||FC,n=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...QC}:QC,i=bC().use(wB).use(r).use(tC,n).use(t);return i}(e),r=function(e){const t=e.children||"",r=new fC;"string"==typeof t&&(r.value=t);return r}(e);return function(e,t){const r=t.allowedElements,n=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,A=t.urlTransform||IC;for(const c of UC)Object.hasOwn(t,c.from)&&nx((c.from,c.to&&c.to,c.id));return $B(e,l),fw(e,{Fragment:Ie.Fragment,components:i,ignoreInvalidStyle:!0,jsx:Ie.jsx,jsxs:Ie.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if("raw"===e.type&&i&&"number"==typeof t)return o?i.children.splice(t,1):i.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in Ew)if(Object.hasOwn(Ew,t)&&Object.hasOwn(e.properties,t)){const r=e.properties[t],n=Ew[t];(null===n||n.includes(e.tagName))&&(e.properties[t]=A(String(r||""),t,e))}}if("element"===e.type){let o=r?!r.includes(e.tagName):!!a&&a.includes(e.tagName);if(!o&&n&&"number"==typeof t&&(o=!n(e,t,i)),o&&i&&"number"==typeof t)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}(t.runSync(t.parse(r),r),e)}function IC(e){const t=e.indexOf(":"),r=e.indexOf("?"),n=e.indexOf("#"),i=e.indexOf("/");return-1===t||-1!==i&&t>i||-1!==r&&t>r||-1!==n&&t>n||NC.test(e.slice(0,t))?e:""}function TC(e,t){const r=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let n=0,i=r.indexOf(t);for(;-1!==i;)n++,i=r.indexOf(t,i+t.length);return n}function PC(e,t,r){const n=LB((r||{}).ignore||[]),i=function(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!e[0]||Array.isArray(e[0])?e:[e];let n=-1;for(;++n<r.length;){const e=r[n];t.push([MC(e[0]),DC(e[1])])}return t}(t);let a=-1;for(;++a<i.length;)VB(e,"text",o);function o(e,t){let r,o=-1;for(;++o<t.length;){const e=t[o],i=r?r.children:void 0;if(n(e,i?i.indexOf(e):void 0,r))return;r=e}if(r)return function(e,t){const r=t[t.length-1],n=i[a][0],o=i[a][1];let s=0;const A=r.children.indexOf(e);let l=!1,c=[];n.lastIndex=0;let u=n.exec(e.value);for(;u;){const r=u.index,i={index:u.index,input:u.input,stack:[...t,e]};let a=o(...u,i);if("string"==typeof a&&(a=a.length>0?{type:"text",value:a}:void 0),!1===a?n.lastIndex=r+1:(s!==r&&c.push({type:"text",value:e.value.slice(s,r)}),Array.isArray(a)?c.push(...a):a&&c.push(a),s=r+u[0].length,l=!0),!n.global)break;u=n.exec(e.value)}l?(s<e.value.length&&c.push({type:"text",value:e.value.slice(s)}),r.children.splice(A,1,...c)):c=[e];return A+c.length}(e,t)}}function MC(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function DC(e){return"function"==typeof e?e:function(){return e}}const LC="phrasing",HC=["autolink","link","image","label"];function _C(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function RC(e){this.config.enter.autolinkProtocol.call(this,e)}function KC(e){this.config.exit.autolinkProtocol.call(this,e)}function zC(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function VC(e){this.config.exit.autolinkEmail.call(this,e)}function $C(e){this.exit(e)}function WC(e){PC(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,GC],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),qC]],{ignore:["link","linkReference"]})}function GC(e,t,r,n,i){let a="";if(!YC(i))return!1;if(/^w/i.test(t)&&(r=t+r,t="",a="http://"),!function(e){const t=e.split(".");if(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))return!1;return!0}(r))return!1;const o=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],n=r.indexOf(")");const i=TC(e,"(");let a=TC(e,")");for(;-1!==n&&i>a;)e+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),a++;return[e,r]}(r+n);if(!o[0])return!1;const s={type:"link",title:null,url:a+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[s,{type:"text",value:o[1]}]:s}function qC(e,t,r,n){return!(!YC(n,!0)||/[-\d_]$/.test(r))&&{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function YC(e,t){const r=e.input.charCodeAt(e.index-1);return(0===e.index||Xw(r)||Yw(r))&&(!t||47!==r)}function XC(){this.buffer()}function JC(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function ZC(){this.buffer()}function eE(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function tE(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Lw(this.sliceSerialize(e)).toLowerCase(),r.label=t}function rE(e){this.exit(e)}function nE(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Lw(this.sliceSerialize(e)).toLowerCase(),r.label=t}function iE(e){this.exit(e)}function aE(e,t,r,n){const i=r.createTracker(n);let a=i.move("[^");const o=r.enter("footnoteReference"),s=r.enter("reference");return a+=i.move(r.safe(r.associationId(e),{after:"]",before:a})),s(),o(),a+=i.move("]"),a}function oE(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,r,n,i){const a=n.createTracker(i);let o=a.move("[^");const s=n.enter("footnoteDefinition"),A=n.enter("label");o+=a.move(n.safe(n.associationId(e),{before:o,after:"]"})),A(),o+=a.move("]:"),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?"\n":" ")+n.indentLines(n.containerFlow(e,a.current()),t?AE:sE)));return s(),o},footnoteReference:aE},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function sE(e,t,r){return 0===t?e:AE(e,t,r)}function AE(e,t,r){return(r?"":" ")+e}aE.peek=function(){return"["};const lE=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function cE(e){this.enter({type:"delete",children:[]},e)}function uE(e){this.exit(e)}function dE(e,t,r,n){const i=r.createTracker(n),a=r.enter("strikethrough");let o=i.move("~~");return o+=r.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),a(),o}function hE(e){return e.length}function pE(e){return null==e?"":String(e)}function fE(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}function mE(e,t,r){return">"+(r?"":" ")+e}function gE(e,t){return yE(e,t.inConstruct,!0)&&!yE(e,t.notInConstruct,!1)}function yE(e,t,r){if("string"==typeof t&&(t=[t]),!t||0===t.length)return r;let n=-1;for(;++n<t.length;)if(e.includes(t[n]))return!0;return!1}function vE(e,t,r,n){let i=-1;for(;++i<r.unsafe.length;)if("\n"===r.unsafe[i].character&&gE(r.stack,r.unsafe[i]))return/[ \t]/.test(n.before)?"":" ";return"\\\n"}function xE(e,t,r){return(r?"":" ")+e}function wE(e){const t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function bE(e){return"&#x"+e.toString(16).toUpperCase()+";"}function BE(e,t,r){const n=ib(e),i=ib(t);return void 0===n?void 0===i?"_"===r?{inside:!0,outside:!0}:{inside:!1,outside:!1}:1===i?{inside:!0,outside:!0}:{inside:!1,outside:!0}:1===n?void 0===i?{inside:!1,outside:!1}:1===i?{inside:!0,outside:!0}:{inside:!1,outside:!1}:void 0===i?{inside:!1,outside:!1}:1===i?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function CE(e,t,r,n){const i=function(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}(r),a=r.enter("emphasis"),o=r.createTracker(n),s=o.move(i);let A=o.move(r.containerPhrasing(e,{after:i,before:s,...o.current()}));const l=A.charCodeAt(0),c=BE(n.before.charCodeAt(n.before.length-1),l,i);c.inside&&(A=bE(l)+A.slice(1));const u=A.charCodeAt(A.length-1),d=BE(n.after.charCodeAt(0),u,i);d.inside&&(A=A.slice(0,-1)+bE(u));const h=o.move(i);return a(),r.attentionEncodeSurroundingInfo={after:d.outside,before:c.outside},s+A+h}function EE(e){return e.value||""}function kE(e,t,r,n){const i=wE(r),a='"'===i?"Quote":"Apostrophe",o=r.enter("image");let s=r.enter("label");const A=r.createTracker(n);let l=A.move("![");return l+=A.move(r.safe(e.alt,{before:l,after:"]",...A.current()})),l+=A.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=r.enter("destinationLiteral"),l+=A.move("<"),l+=A.move(r.safe(e.url,{before:l,after:">",...A.current()})),l+=A.move(">")):(s=r.enter("destinationRaw"),l+=A.move(r.safe(e.url,{before:l,after:e.title?" ":")",...A.current()}))),s(),e.title&&(s=r.enter(`title${a}`),l+=A.move(" "+i),l+=A.move(r.safe(e.title,{before:l,after:i,...A.current()})),l+=A.move(i),s()),l+=A.move(")"),o(),l}function SE(e,t,r,n){const i=e.referenceType,a=r.enter("imageReference");let o=r.enter("label");const s=r.createTracker(n);let A=s.move("![");const l=r.safe(e.alt,{before:A,after:"]",...s.current()});A+=s.move(l+"]["),o();const c=r.stack;r.stack=[],o=r.enter("reference");const u=r.safe(r.associationId(e),{before:A,after:"]",...s.current()});return o(),r.stack=c,a(),"full"!==i&&l&&l===u?"shortcut"===i?A=A.slice(0,-1):A+=s.move("]"):A+=s.move(u+"]"),A}function jE(e,t,r){let n=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(n);)i+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++a<r.unsafe.length;){const e=r.unsafe[a],t=r.compilePattern(e);let i;if(e.atBreak)for(;i=t.exec(n);){let e=i.index;10===n.charCodeAt(e)&&13===n.charCodeAt(e-1)&&e--,n=n.slice(0,e)+" "+n.slice(i.index+1)}}return i+n+i}function FE(e,t){const r=Sw(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function QE(e,t,r,n){const i=wE(r),a='"'===i?"Quote":"Apostrophe",o=r.createTracker(n);let s,A;if(FE(e,r)){const t=r.stack;r.stack=[],s=r.enter("autolink");let n=o.move("<");return n+=o.move(r.containerPhrasing(e,{before:n,after:">",...o.current()})),n+=o.move(">"),s(),r.stack=t,n}s=r.enter("link"),A=r.enter("label");let l=o.move("[");return l+=o.move(r.containerPhrasing(e,{before:l,after:"](",...o.current()})),l+=o.move("]("),A(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(A=r.enter("destinationLiteral"),l+=o.move("<"),l+=o.move(r.safe(e.url,{before:l,after:">",...o.current()})),l+=o.move(">")):(A=r.enter("destinationRaw"),l+=o.move(r.safe(e.url,{before:l,after:e.title?" ":")",...o.current()}))),A(),e.title&&(A=r.enter(`title${a}`),l+=o.move(" "+i),l+=o.move(r.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),A()),l+=o.move(")"),s(),l}function NE(e,t,r,n){const i=e.referenceType,a=r.enter("linkReference");let o=r.enter("label");const s=r.createTracker(n);let A=s.move("[");const l=r.containerPhrasing(e,{before:A,after:"]",...s.current()});A+=s.move(l+"]["),o();const c=r.stack;r.stack=[],o=r.enter("reference");const u=r.safe(r.associationId(e),{before:A,after:"]",...s.current()});return o(),r.stack=c,a(),"full"!==i&&l&&l===u?"shortcut"===i?A=A.slice(0,-1):A+=s.move("]"):A+=s.move(u+"]"),A}function UE(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function OE(e){const t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}dE.peek=function(){return"~"},CE.peek=function(e,t,r){return r.options.emphasis||"*"},EE.peek=function(){return"<"},kE.peek=function(){return"!"},SE.peek=function(){return"!"},jE.peek=function(){return"`"},QE.peek=function(e,t,r){return FE(e,r)?"<":"["},NE.peek=function(){return"["};const IE=LB(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function TE(e,t,r,n){const i=function(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(r),a=r.enter("strong"),o=r.createTracker(n),s=o.move(i+i);let A=o.move(r.containerPhrasing(e,{after:i,before:s,...o.current()}));const l=A.charCodeAt(0),c=BE(n.before.charCodeAt(n.before.length-1),l,i);c.inside&&(A=bE(l)+A.slice(1));const u=A.charCodeAt(A.length-1),d=BE(n.after.charCodeAt(0),u,i);d.inside&&(A=A.slice(0,-1)+bE(u));const h=o.move(i+i);return a(),r.attentionEncodeSurroundingInfo={after:d.outside,before:c.outside},s+A+h}TE.peek=function(e,t,r){return r.options.strong||"*"};const PE={blockquote:function(e,t,r,n){const i=r.enter("blockquote"),a=r.createTracker(n);a.move("> "),a.shift(2);const o=r.indentLines(r.containerFlow(e,a.current()),mE);return i(),o},break:vE,code:function(e,t,r,n){const i=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(r),a=e.value||"",o="`"===i?"GraveAccent":"Tilde";if(function(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}(e,r)){const e=r.enter("codeIndented"),t=r.indentLines(a,xE);return e(),t}const s=r.createTracker(n),A=i.repeat(Math.max(function(e,t){const r=String(e);let n=r.indexOf(t),i=n,a=0,o=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==n;)n===i?++a>o&&(o=a):a=1,i=n+t.length,n=r.indexOf(t,i);return o}(a,i)+1,3)),l=r.enter("codeFenced");let c=s.move(A);if(e.lang){const t=r.enter(`codeFencedLang${o}`);c+=s.move(r.safe(e.lang,{before:c,after:" ",encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){const t=r.enter(`codeFencedMeta${o}`);c+=s.move(" "),c+=s.move(r.safe(e.meta,{before:c,after:"\n",encode:["`"],...s.current()})),t()}return c+=s.move("\n"),a&&(c+=s.move(a+"\n")),c+=s.move(A),l(),c},definition:function(e,t,r,n){const i=wE(r),a='"'===i?"Quote":"Apostrophe",o=r.enter("definition");let s=r.enter("label");const A=r.createTracker(n);let l=A.move("[");return l+=A.move(r.safe(r.associationId(e),{before:l,after:"]",...A.current()})),l+=A.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=r.enter("destinationLiteral"),l+=A.move("<"),l+=A.move(r.safe(e.url,{before:l,after:">",...A.current()})),l+=A.move(">")):(s=r.enter("destinationRaw"),l+=A.move(r.safe(e.url,{before:l,after:e.title?" ":"\n",...A.current()}))),s(),e.title&&(s=r.enter(`title${a}`),l+=A.move(" "+i),l+=A.move(r.safe(e.title,{before:l,after:i,...A.current()})),l+=A.move(i),s()),o(),l},emphasis:CE,hardBreak:vE,heading:function(e,t,r,n){const i=Math.max(Math.min(6,e.depth||1),1),a=r.createTracker(n);if(function(e,t){let r=!1;return $B(e,function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return r=!0,zB}),Boolean((!e.depth||e.depth<3)&&Sw(e)&&(t.options.setext||r))}(e,r)){const t=r.enter("headingSetext"),n=r.enter("phrasing"),o=r.containerPhrasing(e,{...a.current(),before:"\n",after:"\n"});return n(),t(),o+"\n"+(1===i?"=":"-").repeat(o.length-(Math.max(o.lastIndexOf("\r"),o.lastIndexOf("\n"))+1))}const o="#".repeat(i),s=r.enter("headingAtx"),A=r.enter("phrasing");a.move(o+" ");let l=r.containerPhrasing(e,{before:"# ",after:"\n",...a.current()});return/^[\t ]/.test(l)&&(l=bE(l.charCodeAt(0))+l.slice(1)),l=l?o+" "+l:o,r.options.closeAtx&&(l+=" "+o),A(),s(),l},html:EE,image:kE,imageReference:SE,inlineCode:jE,link:QE,linkReference:NE,list:function(e,t,r,n){const i=r.enter("list"),a=r.bulletCurrent;let o=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(r):UE(r);const s=e.ordered?"."===o?")":".":function(e){const t=UE(e),r=e.options.bulletOther;if(!r)return"*"===t?"-":"*";if("*"!==r&&"+"!==r&&"-"!==r)throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+r+"`) to be different");return r}(r);let A=!(!t||!r.bulletLastUsed)&&o===r.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==o&&"-"!==o||!t||t.children&&t.children[0]||"list"!==r.stack[r.stack.length-1]||"listItem"!==r.stack[r.stack.length-2]||"list"!==r.stack[r.stack.length-3]||"listItem"!==r.stack[r.stack.length-4]||0!==r.indexStack[r.indexStack.length-1]||0!==r.indexStack[r.indexStack.length-2]||0!==r.indexStack[r.indexStack.length-3]||(A=!0),OE(r)===o&&t){let t=-1;for(;++t<e.children.length;){const r=e.children[t];if(r&&"listItem"===r.type&&r.children&&r.children[0]&&"thematicBreak"===r.children[0].type){A=!0;break}}}}A&&(o=s),r.bulletCurrent=o;const l=r.containerFlow(e,n);return r.bulletLastUsed=o,r.bulletCurrent=a,i(),l},listItem:function(e,t,r,n){const i=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(r);let a=r.bulletCurrent||UE(r);t&&"list"===t.type&&t.ordered&&(a=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===r.options.incrementListMarker?0:t.children.indexOf(e))+a);let o=a.length+1;("tab"===i||"mixed"===i&&(t&&"list"===t.type&&t.spread||e.spread))&&(o=4*Math.ceil(o/4));const s=r.createTracker(n);s.move(a+" ".repeat(o-a.length)),s.shift(o);const A=r.enter("listItem"),l=r.indentLines(r.containerFlow(e,s.current()),function(e,t,r){if(t)return(r?"":" ".repeat(o))+e;return(r?a:a+" ".repeat(o-a.length))+e});return A(),l},paragraph:function(e,t,r,n){const i=r.enter("paragraph"),a=r.enter("phrasing"),o=r.containerPhrasing(e,n);return a(),i(),o},root:function(e,t,r,n){return(e.children.some(function(e){return IE(e)})?r.containerPhrasing:r.containerFlow).call(r,e,n)},strong:TE,text:function(e,t,r,n){return r.safe(e.value,n)},thematicBreak:function(e,t,r){const n=(OE(r)+(r.options.ruleSpaces?" ":"")).repeat(function(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}(r));return r.options.ruleSpaces?n.slice(0,-1):n}};function ME(e){const t=e._align;this.enter({type:"table",align:t.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function DE(e){this.exit(e),this.data.inTable=void 0}function LE(e){this.enter({type:"tableRow",children:[]},e)}function HE(e){this.exit(e)}function _E(e){this.enter({type:"tableCell",children:[]},e)}function RE(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,KE));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function KE(e,t){return"|"===t?t:e}function zE(e){const t=e||{},r=t.tableCellPadding,n=t.tablePipeAlign,i=t.stringLength,a=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,r){let n=PE.inlineCode(e,t,r);r.stack.includes("tableCell")&&(n=n.replace(/\|/g,"\\$&"));return n},table:function(e,t,r,n){return s(function(e,t,r){const n=e.children;let i=-1;const a=[],o=t.enter("table");for(;++i<n.length;)a[i]=A(n[i],t,r);return o(),a}(e,r,n),e.align)},tableCell:o,tableRow:function(e,t,r,n){const i=s([A(e,r,n)]);return i.slice(0,i.indexOf("\n"))}}};function o(e,t,r,n){const i=r.enter("tableCell"),o=r.enter("phrasing"),s=r.containerPhrasing(e,{...n,before:a,after:a});return o(),i(),s}function s(e,t){return function(e,t){const r=t||{},n=(r.align||[]).concat(),i=r.stringLength||hE,a=[],o=[],s=[],A=[];let l=0,c=-1;for(;++c<e.length;){const t=[],n=[];let a=-1;for(e[c].length>l&&(l=e[c].length);++a<e[c].length;){const o=pE(e[c][a]);if(!1!==r.alignDelimiters){const e=i(o);n[a]=e,(void 0===A[a]||e>A[a])&&(A[a]=e)}t.push(o)}o[c]=t,s[c]=n}let u=-1;if("object"==typeof n&&"length"in n)for(;++u<l;)a[u]=fE(n[u]);else{const e=fE(n);for(;++u<l;)a[u]=e}u=-1;const d=[],h=[];for(;++u<l;){const e=a[u];let t="",n="";99===e?(t=":",n=":"):108===e?t=":":114===e&&(n=":");let i=!1===r.alignDelimiters?1:Math.max(1,A[u]-t.length-n.length);const o=t+"-".repeat(i)+n;!1!==r.alignDelimiters&&(i=t.length+i+n.length,i>A[u]&&(A[u]=i),h[u]=i),d[u]=o}o.splice(1,0,d),s.splice(1,0,h),c=-1;const p=[];for(;++c<o.length;){const e=o[c],t=s[c];u=-1;const n=[];for(;++u<l;){const i=e[u]||"";let o="",s="";if(!1!==r.alignDelimiters){const e=A[u]-(t[u]||0),r=a[u];114===r?o=" ".repeat(e):99===r?e%2?(o=" ".repeat(e/2+.5),s=" ".repeat(e/2-.5)):(o=" ".repeat(e/2),s=o):s=" ".repeat(e)}!1===r.delimiterStart||u||n.push("|"),!1===r.padding||!1===r.alignDelimiters&&""===i||!1===r.delimiterStart&&!u||n.push(" "),!1!==r.alignDelimiters&&n.push(o),n.push(i),!1!==r.alignDelimiters&&n.push(s),!1!==r.padding&&n.push(" "),!1===r.delimiterEnd&&u===l-1||n.push("|")}p.push(!1===r.delimiterEnd?n.join("").replace(/ +$/,""):n.join(""))}return p.join("\n")}(e,{align:t,alignDelimiters:n,padding:r,stringLength:i})}function A(e,t,r){const n=e.children;let i=-1;const a=[],s=t.enter("tableRow");for(;++i<n.length;)a[i]=o(n[i],0,t,r);return s(),a}}function VE(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function $E(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1];e.type;const r=e.children[0];if(r&&"text"===r.type){const n=t.children;let i,a=-1;for(;++a<n.length;){const e=n[a];if("paragraph"===e.type){i=e;break}}i===e&&(r.value=r.value.slice(1),0===r.value.length?e.children.shift():e.position&&r.position&&"number"==typeof r.position.start.offset&&(r.position.start.column++,r.position.start.offset++,e.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function WE(e,t,r,n){const i=e.children[0],a="boolean"==typeof e.checked&&i&&"paragraph"===i.type,o="["+(e.checked?"x":" ")+"] ",s=r.createTracker(n);a&&s.move(o);let A=PE.listItem(e,t,r,{...n,...s.current()});return a&&(A=A.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+o})),A}const GE={tokenize:function(e,t,r){let n=0;return function t(a){if((87===a||119===a)&&n<3)return n++,e.consume(a),t;if(46===a&&3===n)return e.consume(a),i;return r(a)};function i(e){return null===e?r(e):t(e)}},partial:!0},qE={tokenize:function(e,t,r){let n,i,a;return o;function o(t){return 46===t||95===t?e.check(XE,A,s)(t):null===t||Gw(t)||Xw(t)||45!==t&&Yw(t)?A(t):(a=!0,e.consume(t),o)}function s(t){return 95===t?n=!0:(i=n,n=void 0),e.consume(t),o}function A(e){return i||n||!a?r(e):t(e)}},partial:!0},YE={tokenize:function(e,t){let r=0,n=0;return i;function i(o){return 40===o?(r++,e.consume(o),i):41===o&&n<r?a(o):33===o||34===o||38===o||39===o||41===o||42===o||44===o||46===o||58===o||59===o||60===o||63===o||93===o||95===o||126===o?e.check(XE,t,a)(o):null===o||Gw(o)||Xw(o)?t(o):(e.consume(o),i)}function a(t){return 41===t&&n++,e.consume(t),i}},partial:!0},XE={tokenize:function(e,t,r){return n;function n(o){return 33===o||34===o||39===o||41===o||42===o||44===o||46===o||58===o||59===o||63===o||95===o||126===o?(e.consume(o),n):38===o?(e.consume(o),a):93===o?(e.consume(o),i):60===o||null===o||Gw(o)||Xw(o)?t(o):r(o)}function i(e){return null===e||40===e||91===e||Gw(e)||Xw(e)?t(e):n(e)}function a(e){return Hw(e)?o(e):r(e)}function o(t){return 59===t?(e.consume(t),n):Hw(t)?(e.consume(t),o):r(t)}},partial:!0},JE={tokenize:function(e,t,r){return function(t){return e.consume(t),n};function n(e){return _w(e)?r(e):t(e)}},partial:!0},ZE={name:"wwwAutolink",tokenize:function(e,t,r){const n=this;return function(t){if(87!==t&&119!==t||!ik.call(n,n.previous)||Ak(n.events))return r(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(GE,e.attempt(qE,e.attempt(YE,i),r),r)(t)};function i(r){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(r)}},previous:ik},ek={name:"protocolAutolink",tokenize:function(e,t,r){const n=this;let i="",a=!1;return function(t){if((72===t||104===t)&&ak.call(n,n.previous)&&!Ak(n.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(t),e.consume(t),o;return r(t)};function o(t){if(Hw(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),o;if(58===t){const r=i.toLowerCase();if("http"===r||"https"===r)return e.consume(t),s}return r(t)}function s(t){return 47===t?(e.consume(t),a?A:(a=!0,s)):r(t)}function A(t){return null===t||Kw(t)||Gw(t)||Xw(t)||Yw(t)?r(t):e.attempt(qE,e.attempt(YE,l),r)(t)}function l(r){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(r)}},previous:ak},tk={name:"emailAutolink",tokenize:function(e,t,r){const n=this;let i,a;return function(t){if(!sk(t)||!ok.call(n,n.previous)||Ak(n.events))return r(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(t)};function o(t){return sk(t)?(e.consume(t),o):64===t?(e.consume(t),s):r(t)}function s(t){return 46===t?e.check(JE,l,A)(t):45===t||95===t||_w(t)?(a=!0,e.consume(t),s):l(t)}function A(t){return e.consume(t),i=!0,s}function l(o){return a&&i&&Hw(n.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(o)):r(o)}},previous:ok},rk={};let nk=48;for(;nk<123;)rk[nk]=tk,nk++,58===nk?nk=65:91===nk&&(nk=97);function ik(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||Gw(e)}function ak(e){return!Hw(e)}function ok(e){return!(47===e||sk(e))}function sk(e){return 43===e||45===e||46===e||95===e||_w(e)}function Ak(e){let t=e.length,r=!1;for(;t--;){const n=e[t][1];if(("labelLink"===n.type||"labelImage"===n.type)&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}rk[43]=tk,rk[45]=tk,rk[46]=tk,rk[95]=tk,rk[72]=[tk,ek],rk[104]=[tk,ek],rk[87]=[tk,ZE],rk[119]=[tk,ZE];const lk={tokenize:function(e,t,r){const n=this;return eb(e,function(e){const i=n.events[n.events.length-1];return i&&"gfmFootnoteDefinitionIndent"===i[1].type&&4===i[2].sliceSerialize(i[1],!0).length?t(e):r(e)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function ck(e,t,r){const n=this;let i=n.events.length;const a=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let o;for(;i--;){const e=n.events[i][1];if("labelImage"===e.type){o=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(i){if(!o||!o._balanced)return r(i);const s=Lw(n.sliceSerialize({start:o.end,end:n.now()}));if(94!==s.codePointAt(0)||!a.includes(s.slice(1)))return r(i);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(i),e.exit("gfmFootnoteCallLabelMarker"),t(i)}}function uk(e,t){let r=e.length;for(;r--;)if("labelImage"===e[r][1].type&&"enter"===e[r][0]){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const n={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[r+1],e[r+2],["enter",n,t],e[r+3],e[r+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",n,t]];return e.splice(r,e.length-r+1,...s),e}function dk(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a,o=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),s};function s(t){return 94!==t?r(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",A)}function A(s){if(o>999||93===s&&!a||null===s||91===s||Gw(s))return r(s);if(93===s){e.exit("chunkString");const a=e.exit("gfmFootnoteCallString");return i.includes(Lw(n.sliceSerialize(a)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(s)}return Gw(s)||(a=!0),o++,e.consume(s),92===s?l:A}function l(t){return 91===t||92===t||93===t?(e.consume(t),o++,A):A(t)}}function hk(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a,o,s=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),A};function A(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",l):r(t)}function l(t){if(s>999||93===t&&!o||null===t||91===t||Gw(t))return r(t);if(93===t){e.exit("chunkString");const r=e.exit("gfmFootnoteDefinitionLabelString");return a=Lw(n.sliceSerialize(r)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),u}return Gw(t)||(o=!0),s++,e.consume(t),92===t?c:l}function c(t){return 91===t||92===t||93===t?(e.consume(t),s++,l):l(t)}function u(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),i.includes(a)||i.push(a),eb(e,d,"gfmFootnoteDefinitionWhitespace")):r(t)}function d(e){return t(e)}}function pk(e,t,r){return e.check(lb,t,e.attempt(lk,t,r))}function fk(e){e.exit("gfmFootnoteDefinition")}function mk(e){let t=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:function(e,r,n){const i=this.previous,a=this.events;let o=0;return function(t){if(126===i&&"characterEscape"!==a[a.length-1][1].type)return n(t);return e.enter("strikethroughSequenceTemporary"),s(t)};function s(a){const A=ib(i);if(126===a)return o>1?n(a):(e.consume(a),o++,s);if(o<2&&!t)return n(a);const l=e.exit("strikethroughSequenceTemporary"),c=ib(a);return l._open=!c||2===c&&Boolean(A),l._close=!A||2===A&&Boolean(c),r(a)}},resolveAll:function(e,t){let r=-1;for(;++r<e.length;)if("enter"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._close){let n=r;for(;n--;)if("exit"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._open&&e[r][1].end.offset-e[r][1].start.offset===e[n][1].end.offset-e[n][1].start.offset){e[r][1].type="strikethroughSequence",e[n][1].type="strikethroughSequence";const i={type:"strikethrough",start:Object.assign({},e[n][1].start),end:Object.assign({},e[r][1].end)},a={type:"strikethroughText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[r][1].start)},o=[["enter",i,t],["enter",e[n][1],t],["exit",e[n][1],t],["enter",a,t]],s=t.parser.constructs.insideSpan.null;s&&Uw(o,o.length,0,ab(s,e.slice(n+1,r),t)),Uw(o,o.length,0,[["exit",a,t],["enter",e[r][1],t],["exit",e[r][1],t],["exit",i,t]]),Uw(e,n-1,r-n+3,o),r=n+o.length-2;break}}r=-1;for(;++r<e.length;)"strikethroughSequenceTemporary"===e[r][1].type&&(e[r][1].type="data");return e}};return null==t&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}}}class gk{constructor(){this.map=[]}add(e,t,r){!function(e,t,r,n){let i=0;if(0===r&&0===n.length)return;for(;i<e.map.length;){if(e.map[i][0]===t)return e.map[i][1]+=r,void e.map[i][2].push(...n);i+=1}e.map.push([t,r,n])}(this,e,t,r)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),0===this.map.length)return;let t=this.map.length;const r=[];for(;t>0;)t-=1,r.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];r.push(e.slice()),e.length=0;let n=r.pop();for(;n;){for(const t of n)e.push(t);n=r.pop()}this.map.length=0}}function yk(e,t){let r=!1;const n=[];for(;t<e.length;){const i=e[t];if(r){if("enter"===i[0])"tableContent"===i[1].type&&n.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===i[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=n.length-1;n[e]="left"===n[e]?"center":"right"}}else if("tableDelimiterRow"===i[1].type)break}else"enter"===i[0]&&"tableDelimiterRow"===i[1].type&&(r=!0);t+=1}return n}function vk(e,t,r){const n=this;let i,a=0,o=0;return function(e){let t=n.events.length-1;for(;t>-1;){const e=n.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const i=t>-1?n.events[t][1].type:null,a="tableHead"===i||"tableRow"===i?x:s;if(a===x&&n.parser.lazy[n.now().line])return r(e);return a(e)};function s(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return A(e);return i=!0,o+=1,A(e)}(t)}function A(t){return null===t?r(t):Ww(t)?o>1?(o=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),u):r(t):qw(t)?eb(e,A,"whitespace")(t):(o+=1,i&&(i=!1,a+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),i=!0,A):(e.enter("data"),l(t)))}function l(t){return null===t||124===t||Gw(t)?(e.exit("data"),A(t)):(e.consume(t),92===t?c:l)}function c(t){return 92===t||124===t?(e.consume(t),l):l(t)}function u(t){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(t):(e.enter("tableDelimiterRow"),i=!1,qw(t)?eb(e,d,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):d(t))}function d(t){return 45===t||58===t?p(t):124===t?(i=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),h):v(t)}function h(t){return qw(t)?eb(e,p,"whitespace")(t):p(t)}function p(t){return 58===t?(o+=1,i=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),f):45===t?(o+=1,f(t)):null===t||Ww(t)?y(t):v(t)}function f(t){return 45===t?(e.enter("tableDelimiterFiller"),m(t)):v(t)}function m(t){return 45===t?(e.consume(t),m):58===t?(i=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),g):(e.exit("tableDelimiterFiller"),g(t))}function g(t){return qw(t)?eb(e,y,"whitespace")(t):y(t)}function y(r){return 124===r?d(r):(null===r||Ww(r))&&i&&a===o?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(r)):v(r)}function v(e){return r(e)}function x(t){return e.enter("tableRow"),w(t)}function w(r){return 124===r?(e.enter("tableCellDivider"),e.consume(r),e.exit("tableCellDivider"),w):null===r||Ww(r)?(e.exit("tableRow"),t(r)):qw(r)?eb(e,w,"whitespace")(r):(e.enter("data"),b(r))}function b(t){return null===t||124===t||Gw(t)?(e.exit("data"),w(t)):(e.consume(t),92===t?B:b)}function B(t){return 92===t||124===t?(e.consume(t),b):b(t)}}function xk(e,t){let r,n,i,a=-1,o=!0,s=0,A=[0,0,0,0],l=[0,0,0,0],c=!1,u=0;const d=new gk;for(;++a<e.length;){const h=e[a],p=h[1];"enter"===h[0]?"tableHead"===p.type?(c=!1,0!==u&&(bk(d,t,u,r,n),n=void 0,u=0),r={type:"table",start:Object.assign({},p.start),end:Object.assign({},p.end)},d.add(a,0,[["enter",r,t]])):"tableRow"===p.type||"tableDelimiterRow"===p.type?(o=!0,i=void 0,A=[0,0,0,0],l=[0,a+1,0,0],c&&(c=!1,n={type:"tableBody",start:Object.assign({},p.start),end:Object.assign({},p.end)},d.add(a,0,[["enter",n,t]])),s="tableDelimiterRow"===p.type?2:n?3:1):!s||"data"!==p.type&&"tableDelimiterMarker"!==p.type&&"tableDelimiterFiller"!==p.type?"tableCellDivider"===p.type&&(o?o=!1:(0!==A[1]&&(l[0]=l[1],i=wk(d,t,A,s,void 0,i)),A=l,l=[A[1],a,0,0])):(o=!1,0===l[2]&&(0!==A[1]&&(l[0]=l[1],i=wk(d,t,A,s,void 0,i),A=[0,0,0,0]),l[2]=a)):"tableHead"===p.type?(c=!0,u=a):"tableRow"===p.type||"tableDelimiterRow"===p.type?(u=a,0!==A[1]?(l[0]=l[1],i=wk(d,t,A,s,a,i)):0!==l[1]&&(i=wk(d,t,l,s,a,i)),s=0):!s||"data"!==p.type&&"tableDelimiterMarker"!==p.type&&"tableDelimiterFiller"!==p.type||(l[3]=a)}for(0!==u&&bk(d,t,u,r,n),d.consume(t.events),a=-1;++a<t.events.length;){const e=t.events[a];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=yk(t.events,a))}return e}function wk(e,t,r,n,i,a){const o=1===n?"tableHeader":2===n?"tableDelimiter":"tableData";0!==r[0]&&(a.end=Object.assign({},Bk(t.events,r[0])),e.add(r[0],0,[["exit",a,t]]));const s=Bk(t.events,r[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(r[1],0,[["enter",a,t]]),0!==r[2]){const i=Bk(t.events,r[2]),a=Bk(t.events,r[3]),o={type:"tableContent",start:Object.assign({},i),end:Object.assign({},a)};if(e.add(r[2],0,[["enter",o,t]]),2!==n){const n=t.events[r[2]],i=t.events[r[3]];if(n[1].end=Object.assign({},i[1].end),n[1].type="chunkText",n[1].contentType="text",r[3]>r[2]+1){const t=r[2]+1,n=r[3]-r[2]-1;e.add(t,n,[])}}e.add(r[3]+1,0,[["exit",o,t]])}return void 0!==i&&(a.end=Object.assign({},Bk(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function bk(e,t,r,n,i){const a=[],o=Bk(t.events,r);i&&(i.end=Object.assign({},o),a.push(["exit",i,t])),n.end=Object.assign({},o),a.push(["exit",n,t]),e.add(r+1,0,a)}function Bk(e,t){const r=e[t],n="enter"===r[0]?"start":"end";return r[1][n]}const Ck={name:"tasklistCheck",tokenize:function(e,t,r){const n=this;return function(t){if(null!==n.previous||!n._gfmTasklistFirstContentOfListItem)return r(t);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),i};function i(t){return Gw(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),a):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),a):r(t)}function a(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):r(t)}function o(n){return Ww(n)?t(n):qw(n)?e.check({tokenize:Ek},t,r)(n):r(n)}}};function Ek(e,t,r){return eb(e,function(e){return null===e?r(e):t(e)},"whitespace")}const kk={};function Sk(e){const t=e||kk,r=this.data(),n=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);n.push(function(e){return Tw([{text:rk},{document:{91:{name:"gfmFootnoteDefinition",tokenize:hk,continuation:{tokenize:pk},exit:fk}},text:{91:{name:"gfmFootnoteCall",tokenize:dk},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:ck,resolveTo:uk}}},mk(e),{flow:{null:{name:"table",tokenize:vk,resolveAll:xk}}},{text:{91:Ck}}])}(t)),i.push([{transforms:[WC],enter:{literalAutolink:_C,literalAutolinkEmail:RC,literalAutolinkHttp:RC,literalAutolinkWww:RC},exit:{literalAutolink:$C,literalAutolinkEmail:VC,literalAutolinkHttp:KC,literalAutolinkWww:zC}},{enter:{gfmFootnoteCallString:XC,gfmFootnoteCall:JC,gfmFootnoteDefinitionLabelString:ZC,gfmFootnoteDefinition:eE},exit:{gfmFootnoteCallString:tE,gfmFootnoteCall:rE,gfmFootnoteDefinitionLabelString:nE,gfmFootnoteDefinition:iE}},{canContainEols:["delete"],enter:{strikethrough:cE},exit:{strikethrough:uE}},{enter:{table:ME,tableData:_E,tableHeader:_E,tableRow:LE},exit:{codeText:RE,table:DE,tableData:HE,tableHeader:HE,tableRow:HE}},{exit:{taskListCheckValueChecked:VE,taskListCheckValueUnchecked:VE,paragraph:$E}}]),a.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:LC,notInConstruct:HC},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:LC,notInConstruct:HC},{character:":",before:"[ps]",after:"\\/",inConstruct:LC,notInConstruct:HC}]},oE(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:lE}],handlers:{delete:dE}},zE(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:WE}}]}}(t))}const jk=({answer:e})=>Ie.jsx("div",{className:"ai-answer-container w-full max-w-full",children:Ie.jsx(OC,{remarkPlugins:[Sk],components:{h3:({children:e})=>Ie.jsx("h3",{className:"text-lg font-semibold mt-4 mb-2",children:e}),p:({children:e})=>Ie.jsx("p",{className:"text-sm mb-2",children:e}),table:({children:e})=>Ie.jsx("table",{className:"border-collapse min-w-full w-full",children:e}),th:({children:e})=>Ie.jsx("th",{className:"border px-3 py-2 bg-gray-100 text-left text-sm font-medium break-words",children:e}),td:({children:e})=>Ie.jsx("td",{className:"border px-3 py-2 text-sm break-words",children:e}),hr:()=>Ie.jsx("hr",{className:"my-4 border-gray-300"}),strong:({children:e})=>Ie.jsx("strong",{className:"font-semibold text-gray-900",children:e}),em:({children:e})=>Ie.jsx("em",{className:"italic ",children:e})},children:e})});function Fk({message:e,onFeedback:t,primaryColor:r}){const[n,i]=Te.useState(!1),a="user"===e.role,o=e.isLoading;return Ie.jsxs(ch.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},className:"flex gap-3 "+(a?"flex-row-reverse":"flex-row"),children:[Ie.jsx("div",{className:"flex-shrink-0 w-9 h-9 rounded-xl flex items-center justify-center shadow-sm "+(a?"bg-gradient-to-br from-gray-100 to-gray-200":""),style:a?void 0:{background:`linear-gradient(135deg, ${r}20, ${r}35)`},children:a?Ie.jsx(gm,{className:"w-4 h-4 text-gray-600"}):Ie.jsx(tf,{className:"w-4 h-4",style:{color:r}})}),Ie.jsxs("div",{className:"flex flex-col max-w-[85%] "+(a?"items-end":"items-start"),children:[Ie.jsx("div",{className:"px-4 py-3 rounded-2xl shadow-sm "+(a?"rounded-tr-md text-white":"rounded-tl-md bg-white border border-gray-100 text-gray-800"),style:a?{background:`linear-gradient(135deg, ${r}, ${r}dd)`}:void 0,children:o?Ie.jsxs("div",{className:"flex items-center gap-3 py-1",children:[Ie.jsxs("div",{className:"flex gap-1",children:[Ie.jsx(ch.div,{className:"w-2 h-2 rounded-full bg-gray-400",animate:{scale:[1,1.2,1]},transition:{duration:.6,repeat:1/0,delay:0}}),Ie.jsx(ch.div,{className:"w-2 h-2 rounded-full bg-gray-400",animate:{scale:[1,1.2,1]},transition:{duration:.6,repeat:1/0,delay:.2}}),Ie.jsx(ch.div,{className:"w-2 h-2 rounded-full bg-gray-400",animate:{scale:[1,1.2,1]},transition:{duration:.6,repeat:1/0,delay:.4}})]}),Ie.jsx("span",{className:"text-sm text-gray-500",children:"Thinking..."})]}):Ie.jsx(jk,{answer:e.content})}),!a&&!o&&Ie.jsxs("div",{className:"flex items-center gap-0.5 mt-1.5 px-1",children:[Ie.jsx("button",{onClick:async()=>{try{await navigator.clipboard.writeText(e.content||""),i(!0),setTimeout(()=>i(!1),2e3)}catch(t){console.error("Failed to copy:",t)}},className:"p-1.5 rounded-lg text-gray-400 hover:text-gray-600 hover:bg-gray-100 transition-all duration-200",title:"Copy response",children:n?Ie.jsx(lf,{className:"w-3.5 h-3.5 text-green-500"}):Ie.jsx(xf,{className:"w-3.5 h-3.5"})}),Ie.jsx("div",{className:"w-px h-3 bg-gray-200 mx-1"}),Ie.jsx("button",{onClick:()=>t("positive"),className:"p-1.5 rounded-lg transition-all duration-200 "+("positive"===e.feedback?"bg-green-100 text-green-600":"text-gray-400 hover:text-green-600 hover:bg-green-50"),title:"Helpful",children:Ie.jsx(cm,{className:"w-3.5 h-3.5"})}),Ie.jsx("button",{onClick:()=>t("negative"),className:"p-1.5 rounded-lg transition-all duration-200 "+("negative"===e.feedback?"bg-red-100 text-red-600":"text-gray-400 hover:text-red-600 hover:bg-red-50"),title:"Not helpful",children:Ie.jsx(lm,{className:"w-3.5 h-3.5"})})]})]})]})}function Qk({question:e,onClick:t,primaryColor:r,index:n}){return Ie.jsx(ch.button,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.1*n},onClick:t,className:"group text-left p-3 rounded-xl border border-gray-200 bg-white hover:border-transparent hover:shadow-md transition-all duration-200",style:{"--hover-bg":`${r}08`},onMouseEnter:e=>{e.currentTarget.style.borderColor=r,e.currentTarget.style.backgroundColor=`${r}08`},onMouseLeave:e=>{e.currentTarget.style.borderColor="#e5e7eb",e.currentTarget.style.backgroundColor="white"},children:Ie.jsx("p",{className:"text-sm text-gray-700 group-hover:text-gray-900 line-clamp-2",children:e})})}function Nk({onSelectQuestion:e,primaryColor:t}){return Ie.jsxs("div",{className:"flex flex-col items-center justify-center h-full px-4 py-6 overflow-y-auto",children:[Ie.jsxs(ch.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.4},className:"flex flex-col items-center mb-8",children:[Ie.jsxs(ch.div,{className:"relative w-20 h-20 mb-5",initial:{rotate:-10},animate:{rotate:0},transition:{duration:.5,type:"spring"},children:[Ie.jsx("div",{className:"absolute inset-0 rounded-2xl shadow-xl",style:{background:`linear-gradient(135deg, ${t}, ${t}cc)`}}),Ie.jsx("div",{className:"absolute inset-0 rounded-2xl opacity-50",style:{background:`linear-gradient(135deg, transparent, ${t}40)`}}),Ie.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:Ie.jsx(Bm,{className:"w-10 h-10 text-white drop-shadow-lg"})})]}),Ie.jsx(ch.h2,{className:"text-2xl font-bold text-gray-900 mb-2",initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.2},children:"Ask Ultra"}),Ie.jsx(ch.p,{className:"text-sm text-gray-500 text-center max-w-xs leading-relaxed",initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.3},children:"Your AI-powered assistant for real-time logistics insights and data queries"})]}),Ie.jsxs("div",{className:"w-full max-w-md",children:[Ie.jsxs(ch.div,{className:"flex items-center gap-2 mb-4",initial:{opacity:0},animate:{opacity:1},transition:{delay:.4},children:[Ie.jsx("div",{className:"w-6 h-6 rounded-lg flex items-center justify-center",style:{backgroundColor:"#fef3c7"},children:Ie.jsx(sm,{className:"w-3.5 h-3.5 text-amber-500"})}),Ie.jsx("span",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider",children:"Try asking"})]}),Ie.jsx("div",{className:"grid grid-cols-1 gap-3",children:Zv.map((r,n)=>Ie.jsx(Qk,{question:r.text,onClick:()=>e(r.text),primaryColor:t,index:n},r.id))})]})]})}function Uk({value:e,onChange:t,onSend:r,isSending:n,primaryColor:i,placeholder:a="Ask me anything about your data..."}){const o=Te.useRef(null);return Te.useEffect(()=>{(()=>{const e=o.current;e&&(e.style.height="auto",e.style.height=`${Math.min(e.scrollHeight,120)}px`)})()},[e]),Te.useEffect(()=>{o.current&&o.current.focus()},[]),Ie.jsxs("div",{className:"border-t bg-gradient-to-t from-gray-50 to-white p-4",children:[Ie.jsxs("div",{className:"flex items-end gap-2 p-2 rounded-2xl border border-gray-200 bg-white shadow-sm focus-within:shadow-md focus-within:border-gray-300 transition-all duration-200",children:[Ie.jsx("textarea",{ref:o,value:e,onChange:e=>t(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),r())},placeholder:a,rows:1,className:"flex-1 bg-transparent border-none outline-none resize-none text-sm text-gray-800 placeholder-gray-400 min-h-[36px] max-h-[120px] py-2 px-1",disabled:n}),Ie.jsx(ch.button,{onClick:r,disabled:!e.trim()||n,className:"flex-shrink-0 w-10 h-10 rounded-xl flex items-center justify-center text-white transition-all duration-200 disabled:opacity-40 disabled:cursor-not-allowed shadow-sm hover:shadow-md",style:{background:e.trim()&&!n?`linear-gradient(135deg, ${i}, ${i}dd)`:"#d1d5db"},whileHover:e.trim()&&!n?{scale:1.05}:{},whileTap:e.trim()&&!n?{scale:.95}:{},children:n?Ie.jsx(If,{className:"w-4 h-4 animate-spin"}):Ie.jsx(rm,{className:"w-4 h-4"})})]}),Ie.jsxs("p",{className:"text-xs text-gray-400 text-center mt-2",children:["Press ",Ie.jsx("kbd",{className:"px-1.5 py-0.5 bg-gray-100 rounded text-gray-500 font-mono text-[10px]",children:"Enter"})," to send, ",Ie.jsx("kbd",{className:"px-1.5 py-0.5 bg-gray-100 rounded text-gray-500 font-mono text-[10px]",children:"Shift + Enter"})," for new line"]})]})}function Ok(e){const t=new Date(e),r=(new Date).getTime()-t.getTime(),n=Math.floor(r/6e4),i=Math.floor(r/36e5),a=Math.floor(r/864e5);return n<1?"Just now":n<60?`${n}m ago`:i<24?`${i}h ago`:a<7?`${a}d ago`:t.toLocaleDateString("en-US",{month:"short",day:"numeric"})}function Ik(e){const t=e.messages.find(e=>"user"===e.role);return t?t.content.length>50?t.content.substring(0,50)+"...":t.content:"New conversation"}function Tk({conversation:e,isActive:t,onSelect:r,onDelete:n,primaryColor:i}){const[a,o]=Te.useState(!1);return Ie.jsx(ch.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},exit:{opacity:0,x:-10},className:"group relative p-3 rounded-xl cursor-pointer transition-all duration-200 "+(t?"bg-white shadow-sm border border-gray-200":"hover:bg-white/60"),onClick:r,onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),style:t?{borderColor:`${i}40`}:void 0,children:Ie.jsxs("div",{className:"flex items-start gap-3",children:[Ie.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded-lg flex items-center justify-center "+(t?"":"bg-gray-100"),style:t?{backgroundColor:`${i}15`}:void 0,children:Ie.jsx(Hf,{className:"w-4 h-4",style:{color:t?i:"#6b7280"}})}),Ie.jsxs("div",{className:"flex-1 min-w-0",children:[Ie.jsx("p",{className:"text-sm font-medium truncate "+(t?"text-gray-900":"text-gray-700"),children:Ik(e)}),Ie.jsxs("div",{className:"flex items-center gap-1.5 mt-1",children:[Ie.jsx(yf,{className:"w-3 h-3 text-gray-400"}),Ie.jsx("span",{className:"text-xs text-gray-400",children:Ok(e.updatedAt)}),Ie.jsx("span",{className:"text-xs text-gray-300",children:"•"}),Ie.jsxs("span",{className:"text-xs text-gray-400",children:[e.messages.length," messages"]})]})]}),Ie.jsx(hl,{children:a&&Ie.jsx(ch.button,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},onClick:e=>{e.stopPropagation(),n()},className:"absolute right-2 top-1/2 -translate-y-1/2 p-2 rounded-lg text-gray-400 hover:text-red-500 hover:bg-red-50 transition-colors",title:"Delete conversation",children:Ie.jsx(um,{className:"w-4 h-4"})})})]})})}function Pk({isOpen:e,onClose:t,conversations:r,isLoading:n,currentConversationId:i,onSelectConversation:a,onDeleteConversation:o,onNewConversation:s,primaryColor:A}){return Ie.jsx(hl,{children:e&&Ie.jsxs(Ie.Fragment,{children:[Ie.jsx(ch.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"absolute inset-0 bg-black/10 z-10",onClick:t}),Ie.jsxs(ch.div,{initial:{x:"-100%",opacity:0},animate:{x:0,opacity:1},exit:{x:"-100%",opacity:0},transition:{type:"spring",damping:25,stiffness:300},className:"absolute left-0 top-0 bottom-0 w-72 bg-gradient-to-b from-gray-50 to-white border-r border-gray-200 z-20 flex flex-col shadow-xl",children:[Ie.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-gray-100",children:[Ie.jsx("h3",{className:"font-semibold text-gray-900",children:"Chat History"}),Ie.jsx("button",{onClick:t,className:"p-1.5 rounded-lg text-gray-400 hover:text-gray-600 hover:bg-gray-100 transition-colors",children:Ie.jsx(bm,{className:"w-5 h-5"})})]}),Ie.jsx("div",{className:"p-3 border-b border-gray-100",children:Ie.jsxs(ch.button,{onClick:s,className:"w-full flex items-center justify-center gap-2 px-4 py-2.5 rounded-xl text-white font-medium shadow-sm hover:shadow-md transition-all",style:{background:`linear-gradient(135deg, ${A}, ${A}dd)`},whileHover:{scale:1.02},whileTap:{scale:.98},children:[Ie.jsx(Gf,{className:"w-4 h-4"}),"New Conversation"]})}),Ie.jsx("div",{className:"flex-1 overflow-y-auto p-2",children:n?Ie.jsx("div",{className:"flex items-center justify-center py-8",children:Ie.jsx(If,{className:"w-6 h-6 animate-spin text-gray-400"})}):0===r.length?Ie.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[Ie.jsx("div",{className:"w-12 h-12 rounded-full bg-gray-100 flex items-center justify-center mb-3",children:Ie.jsx(Hf,{className:"w-6 h-6 text-gray-400"})}),Ie.jsx("p",{className:"text-sm text-gray-500",children:"No conversations yet"}),Ie.jsx("p",{className:"text-xs text-gray-400 mt-1",children:"Start a new conversation to begin"})]}):Ie.jsx("div",{className:"space-y-1",children:r.map(e=>Ie.jsx(Tk,{conversation:e,isActive:e.id===i,onSelect:()=>a(e.id),onDelete:()=>o(e.id),primaryColor:A},e.id))})})]})]})})}function Mk({primaryColor:e,hasMessages:t,onToggleHistory:r,onNewConversation:n}){return Ie.jsx("div",{className:"px-4 py-3 flex items-center justify-end",children:Ie.jsxs("div",{className:"flex items-center gap-1 justify-end",children:[Ie.jsx(ch.button,{onClick:r,className:"p-2 rounded-lg text-gray-500 hover:text-gray-700 hover:bg-gray-100 transition-colors",title:"Chat history",whileHover:{scale:1.05},whileTap:{scale:.95},children:Ie.jsx(Ff,{className:"w-5 h-5"})}),t&&Ie.jsx(ch.button,{onClick:n,className:"p-2 rounded-lg text-gray-500 hover:text-gray-700 hover:bg-gray-100 transition-colors",title:"New conversation",whileHover:{scale:1.05},whileTap:{scale:.95},children:Ie.jsx(Zf,{className:"w-5 h-5"})})]})})}function Dk(){const{theme:e}=ea(),t=Te.useRef(null),{messages:r,inputValue:n,isSending:i,isLoading:a,error:o,conversations:s,isLoadingHistory:A,showHistory:l,conversationId:c,setInputValue:u,sendMessage:d,submitFeedback:h,toggleHistory:p,loadConversation:f,deleteConversation:m,startNewConversation:g,fetchConversations:y}=tx(),v=e.primaryColor||"#1e40af",x=r.length>0;Te.useEffect(()=>{y()},[y]),Te.useEffect(()=>{t.current&&t.current.scrollIntoView({behavior:"smooth"})},[r]);const w=Te.useCallback(()=>{n.trim()&&d(n)},[n,d]),b=Te.useCallback(e=>{d(e)},[d]),B=Te.useCallback((e,t)=>{h(e,t)},[h]);return Ie.jsxs("div",{className:"relative flex flex-col h-full bg-gradient-to-b from-gray-50 to-white overflow-hidden",style:{fontFamily:e.fontFamily},children:[Ie.jsx(Pk,{isOpen:l,onClose:p,conversations:s,isLoading:A,currentConversationId:c,onSelectConversation:f,onDeleteConversation:m,onNewConversation:g,primaryColor:v}),Ie.jsx(Mk,{primaryColor:v,hasMessages:x,onToggleHistory:p,onNewConversation:g}),Ie.jsx(hl,{children:o&&Ie.jsx(ch.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"mx-4 mt-3 p-3 bg-red-50 border border-red-200 rounded-xl",children:Ie.jsx("p",{className:"text-sm text-red-600",children:o})})}),Ie.jsx(hl,{children:a&&Ie.jsx(ch.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"absolute inset-0 bg-white/80 z-30 flex items-center justify-center",children:Ie.jsxs("div",{className:"flex flex-col items-center gap-3",children:[Ie.jsx(If,{className:"w-8 h-8 animate-spin",style:{color:v}}),Ie.jsx("p",{className:"text-sm text-gray-500",children:"Loading conversation..."})]})})}),Ie.jsx("div",{className:"flex-1 overflow-hidden",children:x?Ie.jsxs("div",{className:"h-full overflow-y-auto px-4 py-4",children:[Ie.jsx("div",{className:"space-y-4 max-w-2xl mx-auto",children:Ie.jsx(hl,{initial:!1,children:r.map(e=>Ie.jsx(Fk,{message:e,onFeedback:t=>B(e.id,t),primaryColor:v},e.id))})}),Ie.jsx("div",{ref:t,className:"h-4"})]}):Ie.jsx(Nk,{onSelectQuestion:b,primaryColor:v})}),Ie.jsx(Uk,{value:n,onChange:u,onSend:w,isSending:i,primaryColor:v})]})}function Lk(e){return{id:e.id,chatSessionId:e.chat_session_id,title:e.chat_title,createdAt:e.chat_created_date_with_time_stamp,updatedAt:e.chat_updated_date_with_time_stamp,totalTurns:e.total_turns}}function Hk(e){const t=[];return t.push({id:`${e.turn_id}-user`,turnId:e.turn_id,content:e.user_prompt,role:"user",timestamp:e.turn_creation_date_time_stamp,feedback:null}),null!==e.agent_response_markdown&&void 0!==e.agent_response_markdown&&t.push({id:`${e.turn_id}-assistant`,turnId:e.turn_id,content:e.agent_response_markdown,role:"assistant",timestamp:e.turn_creation_date_time_stamp,feedback:e.feedback?e.feedback.type:null,responseType:e.response_type,serialData:e.serial_data,imageUrl:e.image_url,generatedSql:e.generated_sql,metaData:e.meta_data}),t}function _k(e){return e&&"object"==typeof e&&"success"in e&&"data"in e?e.data:e}class Rk{static async getSessions(e=20,t=0){var r,n,i;try{const r=_k((await Vi.get("/crm/agents/public/data/chat_sessions/",{params:{limit:e,offset:t}})).data)||[];return{sessions:r.map(Lk),raw:r}}catch(a){if(console.error("DataAgentServiceV2.getSessions error:",a),401===(null==(r=a.response)?void 0:r.status))throw new Error("Unauthorized. Please login again.");if(null==(i=null==(n=a.response)?void 0:n.data)?void 0:i.detail)throw new Error(a.response.data.detail);throw new Error("Failed to fetch chat sessions.")}}static async getTurns(e,t=20,r){var n,i,a,o;try{const n={page_size:t};r&&(n.cursor=r);const i=_k((await Vi.get(`/crm/agents/public/data/chat_sessions/${e}/turns`,{params:n})).data),a=i.turns||[],o=[];for(const e of a)o.push(...Hk(e));return{messages:o,nextCursor:i.next_cursor??null,rawTurns:a}}catch(s){if(console.error("DataAgentServiceV2.getTurns error:",s),401===(null==(n=s.response)?void 0:n.status))throw new Error("Unauthorized. Please login again.");if(404===(null==(i=s.response)?void 0:i.status))throw new Error("Chat session not found.");if(null==(o=null==(a=s.response)?void 0:a.data)?void 0:o.detail)throw new Error(s.response.data.detail);throw new Error("Failed to fetch chat turns.")}}static async sendPrompt(e,t,r=!1){var n,i,a,o,s;try{const n={prompt:e};t&&(n.conversation_id=t),r&&(n.mock=!0);const i=await Vi.post("/crm/agents/public/data/chat/prompt",n),a=_k(i.data);console.log("[DataAgentV2] sendPrompt raw:",i.data),console.log("[DataAgentV2] sendPrompt unwrapped turn:",a);return{messages:Hk(a),chatSessionId:a.chat_session_id,turnId:a.turn_id,rawTurn:a}}catch(A){if(console.error("DataAgentServiceV2.sendPrompt error:",A),401===(null==(n=A.response)?void 0:n.status))throw new Error("Unauthorized. Please login again.");if(400===(null==(i=A.response)?void 0:i.status))throw new Error("Bad request. Please check your message.");if(429===(null==(a=A.response)?void 0:a.status))throw new Error("Too many requests. Please wait a moment.");if(null==(s=null==(o=A.response)?void 0:o.data)?void 0:s.detail)throw new Error(A.response.data.detail);throw new Error("Failed to get response. Please try again.")}}static async submitFeedback(e,t){var r;try{return{success:(null==(r=(await Vi.post("/crm/agents/public/data/chat/feedback",{turn_id:e,feedback:t})).data)?void 0:r.success)??!0}}catch(n){return console.error("DataAgentServiceV2.submitFeedback error:",n),{success:!1}}}}const Kk=[{id:"sq-1",text:"Show me the draft loads created today."},{id:"sq-2",text:"How much total revenue have my loads generated?"},{id:"sq-3",text:"Show a visualization of the top 10 loads by shipper rate."},{id:"sq-4",text:"Which routes generate the highest revenue by city?"},{id:"sq-5",text:"Show the loads grouped by status for each month."}],zk={messages:[],conversationId:null,sessions:[],isLoadingHistory:!1,showHistory:!1,nextCursor:null,isLoadingOlderTurns:!1,hasOlderTurns:!1,isLoading:!1,isSending:!1,error:null,inputValue:""},Vk=Tp()(Pp((e,t)=>({...zk,setInputValue:t=>{e({inputValue:t})},sendMessage:async r=>{const n=t();if(!r.trim()||n.isSending)return;const i=`tmp-${Date.now()}-user`,a=`tmp-${Date.now()}-loading`,o={id:i,turnId:"",content:r.trim(),role:"user",timestamp:(new Date).toISOString(),feedback:null},s={id:a,turnId:"",content:"",role:"assistant",timestamp:(new Date).toISOString(),feedback:null,isLoading:!0};e({messages:[...n.messages,o,s],isSending:!0,error:null,inputValue:""});try{const o=await Rk.sendPrompt(r.trim(),n.conversationId||void 0);e(e=>({messages:[...e.messages.filter(e=>e.id!==i&&e.id!==a),...o.messages],conversationId:o.chatSessionId,isSending:!1})),t().fetchSessions()}catch(A){e(e=>({messages:e.messages.filter(e=>e.id!==a),isSending:!1,error:A.message||"Failed to get response"}))}},submitFeedback:async(r,n)=>{if(!n)return;const i=t().messages.find(e=>e.id===r);if(i){e(e=>({messages:e.messages.map(e=>e.id===r?{...e,feedback:n}:e)}));try{await Rk.submitFeedback(i.turnId,n)}catch{e(e=>({messages:e.messages.map(e=>e.id===r?{...e,feedback:null}:e)}))}}},clearConversation:()=>{e({messages:[],conversationId:null,error:null,nextCursor:null,hasOlderTurns:!1})},fetchSessions:async()=>{e({isLoadingHistory:!0});try{const{sessions:t}=await Rk.getSessions(30,0);e({sessions:t,isLoadingHistory:!1})}catch(t){console.error("Failed to fetch sessions:",t),e({isLoadingHistory:!1})}},loadSession:async t=>{e({isLoading:!0,showHistory:!1,error:null,messages:[],conversationId:t});try{const{messages:r,nextCursor:n}=await Rk.getTurns(t);e({messages:r,conversationId:t,nextCursor:n,hasOlderTurns:null!==n,isLoading:!1})}catch(r){e({isLoading:!1,error:r.message||"Failed to load conversation"})}},loadOlderTurns:async()=>{const r=t();if(r.conversationId&&r.nextCursor&&!r.isLoadingOlderTurns){e({isLoadingOlderTurns:!0});try{const{messages:t,nextCursor:n}=await Rk.getTurns(r.conversationId,20,r.nextCursor);e(e=>({messages:[...t,...e.messages],nextCursor:n,hasOlderTurns:null!==n,isLoadingOlderTurns:!1}))}catch(n){console.error("Failed to load older turns:",n),e({isLoadingOlderTurns:!1})}}},deleteSession:async t=>{e(e=>({sessions:e.sessions.filter(e=>e.chatSessionId!==t),...e.conversationId===t?{messages:[],conversationId:null,nextCursor:null,hasOlderTurns:!1}:{}}))},toggleHistory:()=>{const r=!t().showHistory;e({showHistory:r}),r&&t().fetchSessions()},startNewConversation:()=>{e({messages:[],conversationId:null,error:null,showHistory:!1,inputValue:"",nextCursor:null,hasOlderTurns:!1})},reset:()=>{e({...zk,sessions:[],messages:[]})}}))),$k=Te.memo(({answer:e})=>Ie.jsx("div",{className:"ai-answer-container w-full max-w-full",children:Ie.jsx(OC,{remarkPlugins:[Sk],components:{h3:({children:e})=>Ie.jsx("h3",{className:"text-lg font-semibold mt-4 mb-2",children:e}),p:({children:e})=>Ie.jsx("p",{className:"text-sm mb-2",children:e}),table:({children:e})=>Ie.jsx("table",{className:"border-collapse min-w-full w-full",children:e}),th:({children:e})=>Ie.jsx("th",{className:"border px-3 py-2 bg-gray-100 text-left text-sm font-medium break-words",children:e}),td:({children:e})=>Ie.jsx("td",{className:"border px-3 py-2 text-sm break-words",children:e}),hr:()=>Ie.jsx("hr",{className:"my-4 border-gray-300"}),strong:({children:e})=>Ie.jsx("strong",{className:"font-semibold text-gray-900",children:e}),em:({children:e})=>Ie.jsx("em",{className:"italic ",children:e})},children:e})}));$k.displayName="AIAnswerRenderer";var Wk=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function Gk(e){return"string"==typeof e&&Wk.includes(e)}var qk=new Set(["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"]);function Yk(e){return"string"==typeof e&&qk.has(e)}function Xk(e){return"string"==typeof e&&e.startsWith("data-")}function Jk(e){if("object"!=typeof e||null===e)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(Yk(r)||Xk(r))&&(t[r]=e[r]);return t}function Zk(e){return null==e?null:Te.isValidElement(e)&&"object"==typeof e.props&&null!==e.props?Jk(e.props):"object"!=typeof e||Array.isArray(e)?null:Jk(e)}function eS(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(Yk(r)||Xk(r)||Gk(r))&&(t[r]=e[r]);return t}var tS=["children","width","height","viewBox","className","style","title","desc"];function rS(){return rS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},rS.apply(null,arguments)}var nS=Te.forwardRef((e,t)=>{var{children:r,width:n,height:i,viewBox:a,className:o,style:s,title:A,desc:l}=e,c=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,tS),u=a||{width:n,height:i,x:0,y:0},d=yh("recharts-surface",o);return De.createElement("svg",rS({},eS(c),{className:d,width:n,height:i,style:s,viewBox:"".concat(u.x," ").concat(u.y," ").concat(u.width," ").concat(u.height),ref:t}),De.createElement("title",null,A),De.createElement("desc",null,l),r)}),iS=["children","className"];function aS(){return aS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},aS.apply(null,arguments)}var oS=De.forwardRef((e,t)=>{var{children:r,className:n}=e,i=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,iS),a=yh("recharts-layer",n);return De.createElement("g",aS({className:a},eS(i),{ref:t}),r)}),sS=Te.createContext(null);function AS(e){return function(){return e}}const lS=Math.cos,cS=Math.sin,uS=Math.sqrt,dS=Math.PI,hS=2*dS,pS=Math.PI,fS=2*pS,mS=1e-6,gS=fS-mS;function yS(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}class vS{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?yS:function(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return yS;const r=10**t;return function(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=Math.round(arguments[t]*r)/r+e[t]}}(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,r,n){this._append`Q${+e},${+t},${this._x1=+r},${this._y1=+n}`}bezierCurveTo(e,t,r,n,i,a){this._append`C${+e},${+t},${+r},${+n},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,r,n,i){if(e=+e,t=+t,r=+r,n=+n,(i=+i)<0)throw new Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=r-e,A=n-t,l=a-e,c=o-t,u=l*l+c*c;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(u>mS)if(Math.abs(c*s-A*l)>mS&&i){let d=r-a,h=n-o,p=s*s+A*A,f=d*d+h*h,m=Math.sqrt(p),g=Math.sqrt(u),y=i*Math.tan((pS-Math.acos((p+u-f)/(2*m*g)))/2),v=y/g,x=y/m;Math.abs(v-1)>mS&&this._append`L${e+v*l},${t+v*c}`,this._append`A${i},${i},0,0,${+(c*d>l*h)},${this._x1=e+x*s},${this._y1=t+x*A}`}else this._append`L${this._x1=e},${this._y1=t}`;else;}arc(e,t,r,n,i,a){if(e=+e,t=+t,a=!!a,(r=+r)<0)throw new Error(`negative radius: ${r}`);let o=r*Math.cos(n),s=r*Math.sin(n),A=e+o,l=t+s,c=1^a,u=a?n-i:i-n;null===this._x1?this._append`M${A},${l}`:(Math.abs(this._x1-A)>mS||Math.abs(this._y1-l)>mS)&&this._append`L${A},${l}`,r&&(u<0&&(u=u%fS+fS),u>gS?this._append`A${r},${r},0,1,${c},${e-o},${t-s}A${r},${r},0,1,${c},${this._x1=A},${this._y1=l}`:u>mS&&this._append`A${r},${r},0,${+(u>=pS)},${c},${this._x1=e+r*Math.cos(i)},${this._y1=t+r*Math.sin(i)}`)}rect(e,t,r,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${r=+r}v${+n}h${-r}Z`}toString(){return this._}}function xS(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(null==r)t=null;else{const e=Math.floor(r);if(!(e>=0))throw new RangeError(`invalid digits: ${r}`);t=e}return e},()=>new vS(t)}function wS(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function bS(e){this._context=e}function BS(e){return new bS(e)}function CS(e){return e[0]}function ES(e){return e[1]}function kS(e,t){var r=AS(!0),n=null,i=BS,a=null,o=xS(s);function s(s){var A,l,c,u=(s=wS(s)).length,d=!1;for(null==n&&(a=i(c=o())),A=0;A<=u;++A)!(A<u&&r(l=s[A],A,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(l,A,s),+t(l,A,s));if(c)return a=null,c+""||null}return e="function"==typeof e?e:void 0===e?CS:AS(e),t="function"==typeof t?t:void 0===t?ES:AS(t),s.x=function(t){return arguments.length?(e="function"==typeof t?t:AS(+t),s):e},s.y=function(e){return arguments.length?(t="function"==typeof e?e:AS(+e),s):t},s.defined=function(e){return arguments.length?(r="function"==typeof e?e:AS(!!e),s):r},s.curve=function(e){return arguments.length?(i=e,null!=n&&(a=i(n)),s):i},s.context=function(e){return arguments.length?(null==e?n=a=null:a=i(n=e),s):n},s}function SS(e,t,r){var n=null,i=AS(!0),a=null,o=BS,s=null,A=xS(l);function l(l){var c,u,d,h,p,f=(l=wS(l)).length,m=!1,g=new Array(f),y=new Array(f);for(null==a&&(s=o(p=A())),c=0;c<=f;++c){if(!(c<f&&i(h=l[c],c,l))===m)if(m=!m)u=c,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),d=c-1;d>=u;--d)s.point(g[d],y[d]);s.lineEnd(),s.areaEnd()}m&&(g[c]=+e(h,c,l),y[c]=+t(h,c,l),s.point(n?+n(h,c,l):g[c],r?+r(h,c,l):y[c]))}if(p)return s=null,p+""||null}function c(){return kS().defined(i).curve(o).context(a)}return e="function"==typeof e?e:void 0===e?CS:AS(+e),t="function"==typeof t?t:AS(void 0===t?0:+t),r="function"==typeof r?r:void 0===r?ES:AS(+r),l.x=function(t){return arguments.length?(e="function"==typeof t?t:AS(+t),n=null,l):e},l.x0=function(t){return arguments.length?(e="function"==typeof t?t:AS(+t),l):e},l.x1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:AS(+e),l):n},l.y=function(e){return arguments.length?(t="function"==typeof e?e:AS(+e),r=null,l):t},l.y0=function(e){return arguments.length?(t="function"==typeof e?e:AS(+e),l):t},l.y1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:AS(+e),l):r},l.lineX0=l.lineY0=function(){return c().x(e).y(t)},l.lineY1=function(){return c().x(e).y(r)},l.lineX1=function(){return c().x(n).y(t)},l.defined=function(e){return arguments.length?(i="function"==typeof e?e:AS(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,null!=a&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(null==e?a=s=null:s=o(a=e),l):a},l}bS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};class jS{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}}const FS={draw(e,t){const r=uS(t/dS);e.moveTo(r,0),e.arc(0,0,r,0,hS)}},QS={draw(e,t){const r=uS(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},NS=uS(1/3),US=2*NS,OS={draw(e,t){const r=uS(t/US),n=r*NS;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},IS={draw(e,t){const r=uS(t),n=-r/2;e.rect(n,n,r,r)}},TS=cS(dS/10)/cS(7*dS/10),PS=cS(hS/10)*TS,MS=-lS(hS/10)*TS,DS={draw(e,t){const r=uS(.8908130915292852*t),n=PS*r,i=MS*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const t=hS*a/5,o=lS(t),s=cS(t);e.lineTo(s*r,-o*r),e.lineTo(o*n-s*i,s*n+o*i)}e.closePath()}},LS=uS(3),HS={draw(e,t){const r=-uS(t/(3*LS));e.moveTo(0,2*r),e.lineTo(-LS*r,-r),e.lineTo(LS*r,-r),e.closePath()}},_S=-.5,RS=uS(3)/2,KS=1/uS(12),zS=3*(KS/2+1),VS={draw(e,t){const r=uS(t/zS),n=r/2,i=r*KS,a=n,o=r*KS+r,s=-a,A=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(s,A),e.lineTo(_S*n-RS*i,RS*n+_S*i),e.lineTo(_S*a-RS*o,RS*a+_S*o),e.lineTo(_S*s-RS*A,RS*s+_S*A),e.lineTo(_S*n+RS*i,_S*i-RS*n),e.lineTo(_S*a+RS*o,_S*o-RS*a),e.lineTo(_S*s+RS*A,_S*A-RS*s),e.closePath()}};function $S(){}function WS(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function GS(e){this._context=e}function qS(e){this._context=e}function YS(e){this._context=e}function XS(e){this._context=e}function JS(e){return e<0?-1:1}function ZS(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),s=(a*i+o*n)/(n+i);return(JS(a)+JS(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function ej(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function tj(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-n)/3;e._context.bezierCurveTo(n+s,i+s*t,a-s,o-s*r,a,o)}function rj(e){this._context=e}function nj(e){this._context=new ij(e)}function ij(e){this._context=e}function aj(e){this._context=e}function oj(e){var t,r,n=e.length-1,i=new Array(n),a=new Array(n),o=new Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function sj(e,t){this._context=e,this._t=t}function Aj(e,t){if((i=e.length)>1)for(var r,n,i,a=1,o=e[t[0]],s=o.length;a<i;++a)for(n=o,o=e[t[a]],r=0;r<s;++r)o[r][1]+=o[r][0]=isNaN(n[r][1])?n[r][0]:n[r][1]}function lj(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function cj(e,t){return e[t]}function uj(e){const t=[];return t.key=e,t}GS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:WS(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:WS(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},qS.prototype={areaStart:$S,areaEnd:$S,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:WS(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},YS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:WS(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},XS.prototype={areaStart:$S,areaEnd:$S,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}},rj.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:tj(this,this._t0,ej(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,tj(this,ej(this,r=ZS(this,e,t)),r);break;default:tj(this,this._t0,r=ZS(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}},(nj.prototype=Object.create(rj.prototype)).point=function(e,t){rj.prototype.point.call(this,t,e)},ij.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}},aj.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===r)this._context.lineTo(e[1],t[1]);else for(var n=oj(e),i=oj(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],e[o],t[o]);(this._line||0!==this._line&&1===r)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},sj.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}}this._x=e,this._y=t}};var dj,hj={},pj={};function fj(){return dj||(dj=1,e=pj,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isUnsafeProperty=function(e){return"__proto__"===e}),pj;var e}var mj,gj={};function yj(){return mj||(mj=1,e=gj,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isDeepKey=function(e){switch(typeof e){case"number":case"symbol":return!1;case"string":return e.includes(".")||e.includes("[")||e.includes("]")}}),gj;var e}var vj,xj={};function wj(){return vj||(vj=1,e=xj,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.toKey=function(e){var t;return"string"==typeof e||"symbol"==typeof e?e:Object.is(null==(t=null==e?void 0:e.valueOf)?void 0:t.call(e),-0)?"-0":String(e)}),xj;var e}var bj,Bj,Cj,Ej,kj,Sj={},jj={};function Fj(){return bj||(bj=1,e=jj,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.toString=function e(t){if(null==t)return"";if("string"==typeof t)return t;if(Array.isArray(t))return t.map(e).join(",");const r=String(t);return"0"===r&&Object.is(Number(t),-0)?"-0":r}),jj;var e}function Qj(){return Bj||(Bj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Fj(),r=wj();e.toPath=function(e){if(Array.isArray(e))return e.map(r.toKey);if("symbol"==typeof e)return[e];const n=[],i=(e=t.toString(e)).length;if(0===i)return n;let a=0,o="",s="",A=!1;for(46===e.charCodeAt(0)&&(n.push(""),a++);a<i;){const t=e[a];s?"\\"===t&&a+1<i?(a++,o+=e[a]):t===s?s="":o+=t:A?'"'===t||"'"===t?s=t:"]"===t?(A=!1,n.push(o),o=""):o+=t:"["===t?(A=!0,o&&(n.push(o),o="")):"."===t?o&&(n.push(o),o=""):o+=t,a++}return o&&n.push(o),n}}(Sj)),Sj}function Nj(){return Cj||(Cj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=fj(),r=yj(),n=wj(),i=Qj();e.get=function e(a,o,s){if(null==a)return s;switch(typeof o){case"string":{if(t.isUnsafeProperty(o))return s;const n=a[o];return void 0===n?r.isDeepKey(o)?e(a,i.toPath(o),s):s:n}case"number":case"symbol":{"number"==typeof o&&(o=n.toKey(o));const e=a[o];return void 0===e?s:e}default:{if(Array.isArray(o))return function(e,r,n){if(0===r.length)return n;let i=e;for(let a=0;a<r.length;a++){if(null==i)return n;if(t.isUnsafeProperty(r[a]))return n;i=i[r[a]]}if(void 0===i)return n;return i}(a,o,s);if(o=Object.is(null==o?void 0:o.valueOf(),-0)?"-0":String(o),t.isUnsafeProperty(o))return s;const e=a[o];return void 0===e?s:e}}}}(hj)),hj}function Uj(){return kj?Ej:(kj=1,Ej=Nj().get)}const Oj=ay(Uj());function Ij(e){var t=10**(arguments.length>1&&void 0!==arguments[1]?arguments[1]:4),r=Math.round(e*t)/t;return Object.is(r,-0)?0:r}function Tj(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return e.reduce((e,t,n)=>{var i=r[n-1];return"string"==typeof i?e+i+t:void 0!==i?e+Ij(i)+t:e+t},"")}var Pj=e=>0===e?0:e>0?1:-1,Mj=e=>"number"==typeof e&&e!=+e,Dj=e=>"string"==typeof e&&e.indexOf("%")===e.length-1,Lj=e=>("number"==typeof e||e instanceof Number)&&!Mj(e),Hj=e=>Lj(e)||"string"==typeof e,_j=0,Rj=e=>{var t=++_j;return"".concat(e||"").concat(t)},Kj=function(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!Lj(e)&&"string"!=typeof e)return n;if(Dj(e)){if(null==t)return n;var a=e.indexOf("%");r=t*parseFloat(e.slice(0,a))/100}else r=+e;return Mj(r)&&(r=n),i&&null!=t&&r>t&&(r=t),r},zj=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;n<t;n++){if(r[String(e[n])])return!0;r[String(e[n])]=!0}return!1};function Vj(e,t,r){return Lj(e)&&Lj(t)?Ij(e+r*(t-e)):t}function $j(e,t,r){if(e&&e.length)return e.find(e=>e&&("function"==typeof t?t(e):Oj(e,t))===r)}var Wj=e=>null==e,Gj=e=>Wj(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function qj(e){return null!=e}function Yj(){}var Xj=["type","size","sizeType"];function Jj(){return Jj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Jj.apply(null,arguments)}function Zj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function eF(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Zj(Object(r),!0).forEach(function(t){tF(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zj(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function tF(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var rF={symbolCircle:FS,symbolCross:QS,symbolDiamond:OS,symbolSquare:IS,symbolStar:DS,symbolTriangle:HS,symbolWye:VS},nF=Math.PI/180,iF=e=>{var{type:t="circle",size:r=64,sizeType:n="area"}=e,i=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,Xj),a=eF(eF({},i),{},{type:t,size:r,sizeType:n}),o="circle";"string"==typeof t&&(o=t);var{className:s,cx:A,cy:l}=a,c=eS(a);return Lj(A)&&Lj(l)&&Lj(r)?De.createElement("path",Jj({},c,{className:yh("recharts-symbols",s),transform:"translate(".concat(A,", ").concat(l,")"),d:(()=>{var e=(e=>{var t="symbol".concat(Gj(e));return rF[t]||FS})(o),t=function(e,t){let r=null,n=xS(i);function i(){let i;if(r||(r=i=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),i)return r=null,i+""||null}return e="function"==typeof e?e:AS(e||FS),t="function"==typeof t?t:AS(void 0===t?64:+t),i.type=function(t){return arguments.length?(e="function"==typeof t?t:AS(t),i):e},i.size=function(e){return arguments.length?(t="function"==typeof e?e:AS(+e),i):t},i.context=function(e){return arguments.length?(r=null==e?null:e,i):r},i}().type(e).size(((e,t,r)=>{if("area"===t)return e;switch(r){case"cross":return 5*e*e/9;case"diamond":return.5*e*e/Math.sqrt(3);case"square":return e*e;case"star":var n=18*nF;return 1.25*e*e*(Math.tan(n)-Math.tan(2*n)*Math.tan(n)**2);case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}})(r,n,o)),i=t();if(null!==i)return i})()})):null};iF.registerSymbol=(e,t)=>{rF["symbol".concat(Gj(e))]=t};var aF=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,oF=(e,t)=>{if(!e||"function"==typeof e||"boolean"==typeof e)return null;var r=e;if(Te.isValidElement(e)&&(r=e.props),"object"!=typeof r&&"function"!=typeof r)return null;var n={};return Object.keys(r).forEach(e=>{Gk(e)&&(n[e]=t=>r[e](r,t))}),n},sF=(e,t,r)=>{if(null===e||"object"!=typeof e&&"function"!=typeof e)return null;var n=null;return Object.keys(e).forEach(i=>{var a=e[i];Gk(i)&&"function"==typeof a&&(n||(n={}),n[i]=((e,t,r)=>n=>(e(t,r,n),null))(a,t,r))}),n};function AF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function lF(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cF(e,t){var r=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?AF(Object(r),!0).forEach(function(t){lF(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):AF(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},e),n=t;return Object.keys(t).reduce((e,t)=>(void 0===e[t]&&void 0!==n[t]&&(e[t]=n[t]),e),r)}function uF(){return uF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},uF.apply(null,arguments)}function dF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function hF(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var pF=32,fF={align:"center",iconSize:14,inactiveColor:"#ccc",layout:"horizontal",verticalAlign:"middle"};function mF(e){var t,{data:r,iconType:n,inactiveColor:i}=e,a=16,o=pF/6,s=pF/3,A=r.inactive?i:r.color,l=null!=n?n:r.type;if("none"===l)return null;if("plainline"===l)return De.createElement("line",{strokeWidth:4,fill:"none",stroke:A,strokeDasharray:null===(t=r.payload)||void 0===t?void 0:t.strokeDasharray,x1:0,y1:a,x2:pF,y2:a,className:"recharts-legend-icon"});if("line"===l)return De.createElement("path",{strokeWidth:4,fill:"none",stroke:A,d:"M0,".concat(a,"h").concat(s,"\n A").concat(o,",").concat(o,",0,1,1,").concat(2*s,",").concat(a,"\n H").concat(pF,"M").concat(2*s,",").concat(a,"\n A").concat(o,",").concat(o,",0,1,1,").concat(s,",").concat(a),className:"recharts-legend-icon"});if("rect"===l)return De.createElement("path",{stroke:"none",fill:A,d:"M0,".concat(4,"h").concat(pF,"v").concat(24,"h").concat(-32,"z"),className:"recharts-legend-icon"});if(De.isValidElement(r.legendIcon)){var c=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?dF(Object(r),!0).forEach(function(t){hF(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dF(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},r);return delete c.legendIcon,De.cloneElement(r.legendIcon,c)}return De.createElement(iF,{fill:A,cx:a,cy:a,size:pF,sizeType:"diameter",type:l})}function gF(e){var{payload:t,iconSize:r,layout:n,formatter:i,inactiveColor:a,iconType:o}=e,s={x:0,y:0,width:pF,height:pF},A={display:"horizontal"===n?"inline-block":"block",marginRight:10},l={display:"inline-block",verticalAlign:"middle",marginRight:4};return t.map((t,n)=>{var c=t.formatter||i,u=yh({"recharts-legend-item":!0,["legend-item-".concat(n)]:!0,inactive:t.inactive});if("none"===t.type)return null;var d=t.inactive?a:t.color,h=c?c(t.value,t,n):t.value;return De.createElement("li",uF({className:u,style:A,key:"legend-item-".concat(n)},sF(e,t,n)),De.createElement(nS,{width:r,height:r,viewBox:s,style:l,"aria-label":"".concat(h," legend icon")},De.createElement(mF,{data:t,iconType:o,inactiveColor:a})),De.createElement("span",{className:"recharts-legend-item-text",style:{color:d}},h))})}var yF,vF=e=>{var t=cF(e,fF),{payload:r,layout:n,align:i}=t;if(!r||!r.length)return null;var a={padding:0,margin:0,textAlign:"horizontal"===n?i:"left"};return De.createElement("ul",{className:"recharts-default-legend",style:a},De.createElement(gF,uF({},t,{payload:r})))},xF={},wF={};function bF(){return yF||(yF=1,e=wF,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.uniqBy=function(e,t){const r=new Map;for(let n=0;n<e.length;n++){const i=e[n],a=t(i,n,e);r.has(a)||r.set(a,i)}return Array.from(r.values())}),wF;var e}var BF,CF={};function EF(){return BF||(BF=1,e=CF,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.ary=function(e,t){return function(...r){return e.apply(this,r.slice(0,t))}}),CF;var e}var kF,SF={};function jF(){return kF||(kF=1,e=SF,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.identity=function(e){return e}),SF;var e}var FF,QF,NF={},UF={},OF={};function IF(){return FF||(FF=1,e=OF,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isLength=function(e){return Number.isSafeInteger(e)&&e>=0}),OF;var e}function TF(){return QF||(QF=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=IF();e.isArrayLike=function(e){return null!=e&&"function"!=typeof e&&t.isLength(e.length)}}(UF)),UF}var PF,MF,DF={};function LF(){return PF||(PF=1,e=DF,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isObjectLike=function(e){return"object"==typeof e&&null!==e}),DF;var e}function HF(){return MF||(MF=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=TF(),r=LF();e.isArrayLikeObject=function(e){return r.isObjectLike(e)&&t.isArrayLike(e)}}(NF)),NF}var _F,RF={},KF={};function zF(){return _F||(_F=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Nj();e.property=function(e){return function(r){return t.get(r,e)}}}(KF)),KF}var VF,$F={},WF={},GF={},qF={};function YF(){return VF||(VF=1,e=qF,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isObject=function(e){return null!==e&&("object"==typeof e||"function"==typeof e)}),qF;var e}var XF,JF={};function ZF(){return XF||(XF=1,e=JF,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isPrimitive=function(e){return null==e||"object"!=typeof e&&"function"!=typeof e}),JF;var e}var eQ,tQ,rQ,nQ={};function iQ(){return eQ||(eQ=1,e=nQ,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isEqualsSameValueZero=function(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}),nQ;var e}function aQ(){return tQ||(tQ=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=YF(),r=ZF(),n=iQ();function i(e,s,A,l){if(s===e)return!0;switch(typeof s){case"object":return function(e,t,n,i){if(null==t)return!0;if(Array.isArray(t))return a(e,t,n,i);if(t instanceof Map)return function(e,t,r,n){if(0===t.size)return!0;if(!(e instanceof Map))return!1;for(const[i,a]of t.entries()){if(!1===r(e.get(i),a,i,e,t,n))return!1}return!0}(e,t,n,i);if(t instanceof Set)return o(e,t,n,i);const s=Object.keys(t);if(null==e||r.isPrimitive(e))return 0===s.length;if(0===s.length)return!0;if(null==i?void 0:i.has(t))return i.get(t)===e;null==i||i.set(t,e);try{for(let a=0;a<s.length;a++){const o=s[a];if(!r.isPrimitive(e)&&!(o in e))return!1;if(void 0===t[o]&&void 0!==e[o])return!1;if(null===t[o]&&null!==e[o])return!1;if(!n(e[o],t[o],o,e,t,i))return!1}return!0}finally{null==i||i.delete(t)}}(e,s,A,l);case"function":return Object.keys(s).length>0?i(e,{...s},A,l):n.isEqualsSameValueZero(e,s);default:return t.isObject(e)?"string"!=typeof s||""===s:n.isEqualsSameValueZero(e,s)}}function a(e,t,r,n){if(0===t.length)return!0;if(!Array.isArray(e))return!1;const i=new Set;for(let a=0;a<t.length;a++){const o=t[a];let s=!1;for(let A=0;A<e.length;A++){if(i.has(A))continue;let l=!1;if(r(e[A],o,a,e,t,n)&&(l=!0),l){i.add(A),s=!0;break}}if(!s)return!1}return!0}function o(e,t,r,n){return 0===t.size||e instanceof Set&&a([...e],[...t],r,n)}e.isMatchWith=function e(t,r,n){return"function"!=typeof n?e(t,r,()=>{}):i(t,r,function e(t,r,a,o,s,A){const l=n(t,r,a,o,s,A);return void 0!==l?Boolean(l):i(t,r,e,A)},new Map)},e.isSetMatch=o}(GF)),GF}function oQ(){return rQ||(rQ=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=aQ();e.isMatch=function(e,r){return t.isMatchWith(e,r,()=>{})}}(WF)),WF}var sQ,AQ={},lQ={},cQ={};function uQ(){return sQ||(sQ=1,e=cQ,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.getSymbols=function(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}),cQ;var e}var dQ,hQ={};function pQ(){return dQ||(dQ=1,e=hQ,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.getTag=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}),hQ;var e}var fQ,mQ={};function gQ(){return fQ||(fQ=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});e.argumentsTag="[object Arguments]",e.arrayBufferTag="[object ArrayBuffer]",e.arrayTag="[object Array]",e.bigInt64ArrayTag="[object BigInt64Array]",e.bigUint64ArrayTag="[object BigUint64Array]",e.booleanTag="[object Boolean]",e.dataViewTag="[object DataView]",e.dateTag="[object Date]",e.errorTag="[object Error]",e.float32ArrayTag="[object Float32Array]",e.float64ArrayTag="[object Float64Array]",e.functionTag="[object Function]",e.int16ArrayTag="[object Int16Array]",e.int32ArrayTag="[object Int32Array]",e.int8ArrayTag="[object Int8Array]",e.mapTag="[object Map]",e.numberTag="[object Number]",e.objectTag="[object Object]",e.regexpTag="[object RegExp]",e.setTag="[object Set]",e.stringTag="[object String]",e.symbolTag="[object Symbol]",e.uint16ArrayTag="[object Uint16Array]",e.uint32ArrayTag="[object Uint32Array]",e.uint8ArrayTag="[object Uint8Array]",e.uint8ClampedArrayTag="[object Uint8ClampedArray]"}(mQ)),mQ}var yQ,vQ,xQ,wQ,bQ={};function BQ(){return yQ||(yQ=1,e=bQ,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isTypedArray=function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}),bQ;var e}function CQ(){return vQ||(vQ=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=uQ(),r=pQ(),n=gQ(),i=ZF(),a=BQ();function o(e,t,A,l=new Map,c=void 0){const u=null==c?void 0:c(e,t,A,l);if(void 0!==u)return u;if(i.isPrimitive(e))return e;if(l.has(e))return l.get(e);if(Array.isArray(e)){const t=new Array(e.length);l.set(e,t);for(let r=0;r<e.length;r++)t[r]=o(e[r],r,A,l,c);return Object.hasOwn(e,"index")&&(t.index=e.index),Object.hasOwn(e,"input")&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){const t=new Map;l.set(e,t);for(const[r,n]of e)t.set(r,o(n,r,A,l,c));return t}if(e instanceof Set){const t=new Set;l.set(e,t);for(const r of e)t.add(o(r,void 0,A,l,c));return t}if("undefined"!=typeof Buffer&&Buffer.isBuffer(e))return e.subarray();if(a.isTypedArray(e)){const t=new(Object.getPrototypeOf(e).constructor)(e.length);l.set(e,t);for(let r=0;r<e.length;r++)t[r]=o(e[r],r,A,l,c);return t}if(e instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return l.set(e,t),s(t,e,A,l,c),t}if("undefined"!=typeof File&&e instanceof File){const t=new File([e],e.name,{type:e.type});return l.set(e,t),s(t,e,A,l,c),t}if("undefined"!=typeof Blob&&e instanceof Blob){const t=new Blob([e],{type:e.type});return l.set(e,t),s(t,e,A,l,c),t}if(e instanceof Error){const t=new e.constructor;return l.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,s(t,e,A,l,c),t}if(e instanceof Boolean){const t=new Boolean(e.valueOf());return l.set(e,t),s(t,e,A,l,c),t}if(e instanceof Number){const t=new Number(e.valueOf());return l.set(e,t),s(t,e,A,l,c),t}if(e instanceof String){const t=new String(e.valueOf());return l.set(e,t),s(t,e,A,l,c),t}if("object"==typeof e&&function(e){switch(r.getTag(e)){case n.argumentsTag:case n.arrayTag:case n.arrayBufferTag:case n.dataViewTag:case n.booleanTag:case n.dateTag:case n.float32ArrayTag:case n.float64ArrayTag:case n.int8ArrayTag:case n.int16ArrayTag:case n.int32ArrayTag:case n.mapTag:case n.numberTag:case n.objectTag:case n.regexpTag:case n.setTag:case n.stringTag:case n.symbolTag:case n.uint8ArrayTag:case n.uint8ClampedArrayTag:case n.uint16ArrayTag:case n.uint32ArrayTag:return!0;default:return!1}}(e)){const t=Object.create(Object.getPrototypeOf(e));return l.set(e,t),s(t,e,A,l,c),t}return e}function s(e,r,n=e,i,a){const s=[...Object.keys(r),...t.getSymbols(r)];for(let t=0;t<s.length;t++){const A=s[t],l=Object.getOwnPropertyDescriptor(e,A);(null==l||l.writable)&&(e[A]=o(r[A],A,n,i,a))}}e.cloneDeepWith=function(e,t){return o(e,void 0,e,new Map,t)},e.cloneDeepWithImpl=o,e.copyProperties=s}(lQ)),lQ}function EQ(){return xQ||(xQ=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=CQ();e.cloneDeep=function(e){return t.cloneDeepWithImpl(e,void 0,e,new Map,void 0)}}(AQ)),AQ}function kQ(){return wQ||(wQ=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=oQ(),r=EQ();e.matches=function(e){return e=r.cloneDeep(e),r=>t.isMatch(r,e)}}($F)),$F}var SQ,jQ,FQ={},QQ={},NQ={};function UQ(){return SQ||(SQ=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=CQ(),r=pQ(),n=gQ();e.cloneDeepWith=function(e,i){return t.cloneDeepWith(e,(a,o,s,A)=>{const l=null==i?void 0:i(a,o,s,A);if(void 0!==l)return l;if("object"==typeof e){if(r.getTag(e)===n.objectTag&&"function"!=typeof e.constructor){const r={};return A.set(e,r),t.copyProperties(r,e,s,A),r}switch(Object.prototype.toString.call(e)){case n.numberTag:case n.stringTag:case n.booleanTag:{const r=new e.constructor(null==e?void 0:e.valueOf());return t.copyProperties(r,e),r}case n.argumentsTag:{const r={};return t.copyProperties(r,e),r.length=e.length,r[Symbol.iterator]=e[Symbol.iterator],r}default:return}}})}}(NQ)),NQ}function OQ(){return jQ||(jQ=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=UQ();e.cloneDeep=function(e){return t.cloneDeepWith(e)}}(QQ)),QQ}var IQ,TQ={},PQ={};function MQ(){return IQ||(IQ=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;e.isIndex=function(e,r=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e<r;case"symbol":return!1;case"string":return t.test(e)}}}(PQ)),PQ}var DQ,LQ,HQ,_Q,RQ,KQ,zQ,VQ={};function $Q(){return DQ||(DQ=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=pQ();e.isArguments=function(e){return null!==e&&"object"==typeof e&&"[object Arguments]"===t.getTag(e)}}(VQ)),VQ}function WQ(){return LQ||(LQ=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=yj(),r=MQ(),n=$Q(),i=Qj();e.has=function(e,a){let o;if(o=Array.isArray(a)?a:"string"==typeof a&&t.isDeepKey(a)&&null==(null==e?void 0:e[a])?i.toPath(a):[a],0===o.length)return!1;let s=e;for(let t=0;t<o.length;t++){const e=o[t];if(null==s||!Object.hasOwn(s,e)){if(!((Array.isArray(s)||n.isArguments(s))&&r.isIndex(e)&&e<s.length))return!1}s=s[e]}return!0}}(TQ)),TQ}function GQ(){return HQ||(HQ=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=oQ(),r=wj(),n=OQ(),i=Nj(),a=WQ();e.matchesProperty=function(e,o){switch(typeof e){case"object":Object.is(null==e?void 0:e.valueOf(),-0)&&(e="-0");break;case"number":e=r.toKey(e)}return o=n.cloneDeep(o),function(r){const n=i.get(r,e);return void 0===n?a.has(r,e):void 0===o?void 0===n:t.isMatch(n,o)}}}(FQ)),FQ}function qQ(){return _Q||(_Q=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=jF(),r=zF(),n=kQ(),i=GQ();e.iteratee=function(e){if(null==e)return t.identity;switch(typeof e){case"function":return e;case"object":return Array.isArray(e)&&2===e.length?i.matchesProperty(e[0],e[1]):n.matches(e);case"string":case"symbol":case"number":return r.property(e)}}}(RF)),RF}function YQ(){return zQ?KQ:(zQ=1,KQ=(RQ||(RQ=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=bF(),r=EF(),n=jF(),i=HF(),a=qQ();e.uniqBy=function(e,o=n.identity){return i.isArrayLikeObject(e)?t.uniqBy(Array.from(e),r.ary(a.iteratee(o),1)):[]}}(xF)),xF).uniqBy)}const XQ=ay(YQ());function JQ(e,t,r){return!0===t?XQ(e,r):"function"==typeof t?XQ(e,t):e}var ZQ,eN={exports:{}},tN={},rN={exports:{}},nN={};var iN,aN,oN,sN={};
|
|
46
|
+
/**
|
|
47
|
+
* @license React
|
|
48
|
+
* use-sync-external-store-shim.development.js
|
|
49
|
+
*
|
|
50
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
51
|
+
*
|
|
52
|
+
* This source code is licensed under the MIT license found in the
|
|
53
|
+
* LICENSE file in the root directory of this source tree.
|
|
54
|
+
*/function AN(){return aN||(aN=1,"production"===process.env.NODE_ENV?rN.exports=function(){if(ZQ)return nN;ZQ=1;var e=Te,t="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=e.useState,n=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function o(e){var r=e.getSnapshot;e=e.value;try{var n=r();return!t(e,n)}catch(i){return!0}}var s="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var s=t(),A=r({inst:{value:s,getSnapshot:t}}),l=A[0].inst,c=A[1];return i(function(){l.value=s,l.getSnapshot=t,o(l)&&c({inst:l})},[e,s,t]),n(function(){return o(l)&&c({inst:l}),e(function(){o(l)&&c({inst:l})})},[e]),a(s),s};return nN.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:s,nN}():rN.exports=(iN||(iN=1,"production"!==process.env.NODE_ENV&&function(){function e(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch(i){return!0}}"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=Te,r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},n=t.useState,i=t.useEffect,a=t.useLayoutEffect,o=t.useDebugValue,s=!1,A=!1,l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(l,c){s||void 0===t.startTransition||(s=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var u=c();if(!A){var d=c();r(u,d)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),A=!0)}var h=(d=n({inst:{value:u,getSnapshot:c}}))[0].inst,p=d[1];return a(function(){h.value=u,h.getSnapshot=c,e(h)&&p({inst:h})},[l,u,c]),i(function(){return e(h)&&p({inst:h}),l(function(){e(h)&&p({inst:h})})},[l]),o(u),u};sN.useSyncExternalStore=void 0!==t.useSyncExternalStore?t.useSyncExternalStore:l,"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),sN)),rN.exports}
|
|
55
|
+
/**
|
|
56
|
+
* @license React
|
|
57
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
58
|
+
*
|
|
59
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
60
|
+
*
|
|
61
|
+
* This source code is licensed under the MIT license found in the
|
|
62
|
+
* LICENSE file in the root directory of this source tree.
|
|
63
|
+
*/var lN,cN,uN={};
|
|
64
|
+
/**
|
|
65
|
+
* @license React
|
|
66
|
+
* use-sync-external-store-shim/with-selector.development.js
|
|
67
|
+
*
|
|
68
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
69
|
+
*
|
|
70
|
+
* This source code is licensed under the MIT license found in the
|
|
71
|
+
* LICENSE file in the root directory of this source tree.
|
|
72
|
+
*/var dN=(cN||(cN=1,"production"===process.env.NODE_ENV?eN.exports=function(){if(oN)return tN;oN=1;var e=Te,t=AN(),r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},n=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,o=e.useMemo,s=e.useDebugValue;return tN.useSyncExternalStoreWithSelector=function(e,t,A,l,c){var u=i(null);if(null===u.current){var d={hasValue:!1,value:null};u.current=d}else d=u.current;u=o(function(){function e(e){if(!a){if(a=!0,n=e,e=l(e),void 0!==c&&d.hasValue){var t=d.value;if(c(t,e))return i=t}return i=e}if(t=i,r(n,e))return t;var o=l(e);return void 0!==c&&c(t,o)?(n=e,t):(n=e,i=o)}var n,i,a=!1,o=void 0===A?null:A;return[function(){return e(t())},null===o?void 0:function(){return e(o())}]},[t,A,l,c]);var h=n(e,u[0],u[1]);return a(function(){d.hasValue=!0,d.value=h},[h]),s(h),h},tN}():eN.exports=(lN||(lN=1,"production"!==process.env.NODE_ENV&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var e=Te,t=AN(),r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},n=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,o=e.useMemo,s=e.useDebugValue;uN.useSyncExternalStoreWithSelector=function(e,t,A,l,c){var u=i(null);if(null===u.current){var d={hasValue:!1,value:null};u.current=d}else d=u.current;u=o(function(){function e(e){if(!a){if(a=!0,n=e,e=l(e),void 0!==c&&d.hasValue){var t=d.value;if(c(t,e))return i=t}return i=e}if(t=i,r(n,e))return t;var o=l(e);return void 0!==c&&c(t,o)?(n=e,t):(n=e,i=o)}var n,i,a=!1,o=void 0===A?null:A;return[function(){return e(t())},null===o?void 0:function(){return e(o())}]},[t,A,l,c]);var h=n(e,u[0],u[1]);return a(function(){d.hasValue=!0,d.value=h},[h]),s(h),h},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),uN)),eN.exports),hN=Te.createContext(null),pN=e=>e,fN=()=>{var e=Te.useContext(hN);return e?e.store.dispatch:pN},mN=()=>{},gN=()=>mN,yN=(e,t)=>e===t;function vN(e){var t=Te.useContext(hN),r=Te.useMemo(()=>t?t=>{if(null!=t)return e(t)}:mN,[t,e]);return dN.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:gN,t?t.store.getState:mN,t?t.store.getState:mN,r,yN)}var xN=(e,t,r)=>{if(1===t.length&&t[0]===r){let t=!1;try{const r={};e(r)===r&&(t=!0)}catch{}if(t){let e;try{throw new Error}catch(eX){({stack:e}=eX)}console.warn("The result function returned its own inputs without modification. e.g\n`createSelector([state => state.todos], todos => todos)`\nThis could lead to inefficient memoization and unnecessary re-renders.\nEnsure transformation logic is in the result function, and extraction logic is in the input selectors.",{stack:e})}}},wN=(e,t,r)=>{const{memoize:n,memoizeOptions:i}=t,{inputSelectorResults:a,inputSelectorResultsCopy:o}=e,s=n(()=>({}),...i);if(!(s.apply(null,a)===s.apply(null,o))){let e;try{throw new Error}catch(eX){({stack:e}=eX)}console.warn("An input selector returned a different result when passed same arguments.\nThis means your output selector will likely run more frequently than intended.\nAvoid returning a new reference inside your input selector, e.g.\n`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)`",{arguments:r,firstInputs:a,secondInputs:o,stack:e})}},bN={inputStabilityCheck:"once",identityFunctionCheck:"once"};var BN=e=>Array.isArray(e)?e:[e];function CN(e){const t=Array.isArray(e[0])?e[0]:e;return function(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(e=>"function"==typeof e)){const r=e.map(e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e).join(", ");throw new TypeError(`${t}[${r}]`)}}(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function EN(e,t){const r=[],{length:n}=e;for(let i=0;i<n;i++)r.push(e[i].apply(null,t));return r}var kN="undefined"!=typeof WeakRef?WeakRef:class{constructor(e){this.value=e}deref(){return this.value}};function SN(){return{s:0,v:void 0,o:null,p:null}}function jN(e,t={}){let r={s:0,v:void 0,o:null,p:null};const{resultEqualityCheck:n}=t;let i,a=0;function o(){var t;let o=r;const{length:s}=arguments;for(let e=0,r=s;e<r;e++){const t=arguments[e];if("function"==typeof t||"object"==typeof t&&null!==t){let e=o.o;null===e&&(o.o=e=new WeakMap);const r=e.get(t);void 0===r?(o=SN(),e.set(t,o)):o=r}else{let e=o.p;null===e&&(o.p=e=new Map);const r=e.get(t);void 0===r?(o=SN(),e.set(t,o)):o=r}}const A=o;let l;if(1===o.s)l=o.v;else if(l=e.apply(null,arguments),a++,n){const e=(null==(t=null==i?void 0:i.deref)?void 0:t.call(i))??i;null!=e&&n(e,l)&&(l=e,0!==a&&a--);i="object"==typeof l&&null!==l||"function"==typeof l?new kN(l):l}return A.s=1,A.v=l,l}return o.clearCache=()=>{r={s:0,v:void 0,o:null,p:null},o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function FN(e,...t){const r="function"==typeof e?{memoize:e,memoizeOptions:t}:e,n=(...e)=>{let t,n=0,i=0,a={},o=e.pop();"object"==typeof o&&(a=o,o=e.pop()),function(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);const s={...r,...a},{memoize:A,memoizeOptions:l=[],argsMemoize:c=jN,argsMemoizeOptions:u=[],devModeChecks:d={}}=s,h=BN(l),p=BN(u),f=CN(e),m=A(function(){return n++,o.apply(null,arguments)},...h);let g=!0;const y=c(function(){i++;const e=EN(f,arguments);if(t=m.apply(null,e),"production"!==process.env.NODE_ENV){const{identityFunctionCheck:r,inputStabilityCheck:n}=((e,t)=>{const{identityFunctionCheck:r,inputStabilityCheck:n}={...bN,...t};return{identityFunctionCheck:{shouldRun:"always"===r||"once"===r&&e,run:xN},inputStabilityCheck:{shouldRun:"always"===n||"once"===n&&e,run:wN}}})(g,d);if(r.shouldRun&&r.run(o,e,t),n.shouldRun){const t=EN(f,arguments);n.run({inputSelectorResults:e,inputSelectorResultsCopy:t},{memoize:A,memoizeOptions:h},arguments)}g&&(g=!1)}return t},...p);return Object.assign(y,{resultFunc:o,memoizedResultFunc:m,dependencies:f,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>t,recomputations:()=>n,resetRecomputations:()=>{n=0},memoize:A,argsMemoize:c})};return Object.assign(n,{withTypes:()=>n}),n}var QN,NN=FN(jN),UN=Object.assign((e,t=NN)=>{!function(e,t="expected an object, instead received "+typeof e){if("object"!=typeof e)throw new TypeError(t)}(e,"createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);const r=Object.keys(e);return t(r.map(t=>e[t]),(...e)=>e.reduce((e,t,n)=>(e[r[n]]=t,e),{}))},{withTypes:()=>UN}),ON={},IN={},TN={};function PN(){return QN||(QN=1,function(e){function t(e){return"symbol"==typeof e?1:null===e?2:void 0===e?3:e!=e?4:0}Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});e.compareValues=(e,r,n)=>{if(e!==r){const i=t(e),a=t(r);if(i===a&&0===i){if(e<r)return"desc"===n?1:-1;if(e>r)return"desc"===n?-1:1}return"desc"===n?a-i:i-a}return 0}}(TN)),TN}var MN,DN,LN,HN={},_N={};function RN(){return MN||(MN=1,e=_N,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isSymbol=function(e){return"symbol"==typeof e||e instanceof Symbol}),_N;var e}function KN(){return DN||(DN=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=RN(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;e.isKey=function(e,i){return!Array.isArray(e)&&(!("number"!=typeof e&&"boolean"!=typeof e&&null!=e&&!t.isSymbol(e))||("string"==typeof e&&(n.test(e)||!r.test(e))||null!=i&&Object.hasOwn(i,e)))}}(HN)),HN}function zN(){return LN||(LN=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=PN(),r=KN(),n=Qj();e.orderBy=function(e,i,a,o){if(null==e)return[];a=o?void 0:a,Array.isArray(e)||(e=Object.values(e)),Array.isArray(i)||(i=null==i?[null]:[i]),0===i.length&&(i=[null]),Array.isArray(a)||(a=null==a?[]:[a]),a=a.map(e=>String(e));const s=(e,t)=>{let r=e;for(let n=0;n<t.length&&null!=r;++n)r=r[t[n]];return r},A=i.map(e=>(Array.isArray(e)&&1===e.length&&(e=e[0]),null==e||"function"==typeof e||Array.isArray(e)||r.isKey(e)?e:{key:e,path:n.toPath(e)}));return e.map(e=>({original:e,criteria:A.map(t=>((e,t)=>null==t||null==e?t:"object"==typeof e&&"key"in e?Object.hasOwn(t,e.key)?t[e.key]:s(t,e.path):"function"==typeof e?e(t):Array.isArray(e)?s(t,e):"object"==typeof t?t[e]:t)(t,e))})).slice().sort((e,r)=>{for(let n=0;n<A.length;n++){const i=t.compareValues(e.criteria[n],r.criteria[n],a[n]);if(0!==i)return i}return 0}).map(e=>e.original)}}(IN)),IN}var VN,$N={};function WN(){return VN||(VN=1,e=$N,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.flatten=function(e,t=1){const r=[],n=Math.floor(t),i=(e,t)=>{for(let a=0;a<e.length;a++){const o=e[a];Array.isArray(o)&&t<n?i(o,t+1):r.push(o)}};return i(e,0),r}),$N;var e}var GN,qN,YN,XN,JN={};function ZN(){return GN||(GN=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=MQ(),r=TF(),n=YF(),i=iQ();e.isIterateeCall=function(e,a,o){return!!n.isObject(o)&&(!!("number"==typeof a&&r.isArrayLike(o)&&t.isIndex(a)&&a<o.length||"string"==typeof a&&a in o)&&i.isEqualsSameValueZero(o[a],e))}}(JN)),JN}function eU(){return XN?YN:(XN=1,YN=(qN||(qN=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=zN(),r=WN(),n=ZN();e.sortBy=function(e,...i){const a=i.length;return a>1&&n.isIterateeCall(e,i[0],i[1])?i=[]:a>2&&n.isIterateeCall(i[0],i[1],i[2])&&(i=[i[0]]),t.orderBy(e,r.flatten(i),["asc"])}}(ON)),ON).sortBy)}const tU=ay(eU());var rU=e=>e.legend.settings,nU=NN([e=>e.legend.payload,rU],(e,t)=>{var{itemSorter:r}=t,n=e.flat(1);return r?tU(n,r):n});function iU(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],[t,r]=Te.useState({height:0,left:0,top:0,width:0}),n=Te.useCallback(e=>{if(null!=e){var n=e.getBoundingClientRect(),i={height:n.height,left:n.left,top:n.top,width:n.width};(Math.abs(i.height-t.height)>1||Math.abs(i.left-t.left)>1||Math.abs(i.top-t.top)>1||Math.abs(i.width-t.width)>1)&&r({height:i.height,left:i.left,top:i.top,width:i.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,n]}function aU(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var oU=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),sU=()=>Math.random().toString(36).substring(7).split("").join("."),AU={INIT:`@@redux/INIT${sU()}`,REPLACE:`@@redux/REPLACE${sU()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${sU()}`};function lU(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function cU(e){if(void 0===e)return"undefined";if(null===e)return"null";const t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(function(e){return e instanceof Date||"function"==typeof e.toDateString&&"function"==typeof e.getDate&&"function"==typeof e.setDate}(e))return"date";if(function(e){return e instanceof Error||"string"==typeof e.message&&e.constructor&&"number"==typeof e.constructor.stackTraceLimit}(e))return"error";const r=function(e){return"function"==typeof e.constructor?e.constructor.name:null}(e);switch(r){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return r}return Object.prototype.toString.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"")}function uU(e){let t=typeof e;return"production"!==process.env.NODE_ENV&&(t=cU(e)),t}function dU(e,t,r){if("function"!=typeof e)throw new Error("production"===process.env.NODE_ENV?aU(2):`Expected the root reducer to be a function. Instead, received: '${uU(e)}'`);if("function"==typeof t&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw new Error("production"===process.env.NODE_ENV?aU(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if("function"==typeof t&&void 0===r&&(r=t,t=void 0),void 0!==r){if("function"!=typeof r)throw new Error("production"===process.env.NODE_ENV?aU(1):`Expected the enhancer to be a function. Instead, received: '${uU(r)}'`);return r(dU)(e,t)}let n=e,i=t,a=new Map,o=a,s=0,A=!1;function l(){o===a&&(o=new Map,a.forEach((e,t)=>{o.set(t,e)}))}function c(){if(A)throw new Error("production"===process.env.NODE_ENV?aU(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return i}function u(e){if("function"!=typeof e)throw new Error("production"===process.env.NODE_ENV?aU(4):`Expected the listener to be a function. Instead, received: '${uU(e)}'`);if(A)throw new Error("production"===process.env.NODE_ENV?aU(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");let t=!0;l();const r=s++;return o.set(r,e),function(){if(t){if(A)throw new Error("production"===process.env.NODE_ENV?aU(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");t=!1,l(),o.delete(r),a=null}}}function d(e){if(!lU(e))throw new Error("production"===process.env.NODE_ENV?aU(7):`Actions must be plain objects. Instead, the actual type was: '${uU(e)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);if(void 0===e.type)throw new Error("production"===process.env.NODE_ENV?aU(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if("string"!=typeof e.type)throw new Error("production"===process.env.NODE_ENV?aU(17):`Action "type" property must be a string. Instead, the actual type was: '${uU(e.type)}'. Value was: '${e.type}' (stringified)`);if(A)throw new Error("production"===process.env.NODE_ENV?aU(9):"Reducers may not dispatch actions.");try{A=!0,i=n(i,e)}finally{A=!1}return(a=o).forEach(e=>{e()}),e}d({type:AU.INIT});return{dispatch:d,subscribe:u,getState:c,replaceReducer:function(e){if("function"!=typeof e)throw new Error("production"===process.env.NODE_ENV?aU(10):`Expected the nextReducer to be a function. Instead, received: '${uU(e)}`);n=e,d({type:AU.REPLACE})},[oU]:function(){const e=u;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error("production"===process.env.NODE_ENV?aU(11):`Expected the observer to be an object. Instead, received: '${uU(t)}'`);function r(){const e=t;e.next&&e.next(c())}r();return{unsubscribe:e(r)}},[oU](){return this}}}}}function hU(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(eX){}}function pU(e){const t=Object.keys(e),r={};for(let o=0;o<t.length;o++){const n=t[o];"production"!==process.env.NODE_ENV&&void 0===e[n]&&hU(`No reducer provided for key "${n}"`),"function"==typeof e[n]&&(r[n]=e[n])}const n=Object.keys(r);let i,a;"production"!==process.env.NODE_ENV&&(i={});try{!function(e){Object.keys(e).forEach(t=>{const r=e[t];if(void 0===r(void 0,{type:AU.INIT}))throw new Error("production"===process.env.NODE_ENV?aU(12):`The slice reducer for key "${t}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(void 0===r(void 0,{type:AU.PROBE_UNKNOWN_ACTION()}))throw new Error("production"===process.env.NODE_ENV?aU(13):`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${AU.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`)})}(r)}catch(eX){a=eX}return function(e={},t){if(a)throw a;if("production"!==process.env.NODE_ENV){const n=function(e,t,r,n){const i=Object.keys(t),a=r&&r.type===AU.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(0===i.length)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!lU(e))return`The ${a} has unexpected type of "${uU(e)}". Expected argument to be an object with the following keys: "${i.join('", "')}"`;const o=Object.keys(e).filter(e=>!t.hasOwnProperty(e)&&!n[e]);return o.forEach(e=>{n[e]=!0}),r&&r.type===AU.REPLACE?void 0:o.length>0?`Unexpected ${o.length>1?"keys":"key"} "${o.join('", "')}" found in ${a}. Expected to find one of the known reducer keys instead: "${i.join('", "')}". Unexpected keys will be ignored.`:void 0}(e,r,t,i);n&&hU(n)}let o=!1;const s={};for(let i=0;i<n.length;i++){const a=n[i],A=r[a],l=e[a],c=A(l,t);if(void 0===c){const e=t&&t.type;throw new Error("production"===process.env.NODE_ENV?aU(14):`When called with an action of type ${e?`"${String(e)}"`:"(unknown type)"}, the slice reducer for key "${a}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`)}s[a]=c,o=o||c!==l}return o=o||n.length!==Object.keys(e).length,o?s:e}}function fU(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce((e,t)=>(...r)=>e(t(...r)))}function mU(e){return lU(e)&&"type"in e&&"string"==typeof e.type}var gU=Symbol.for("immer-nothing"),yU=Symbol.for("immer-draftable"),vU=Symbol.for("immer-state"),xU="production"!==process.env.NODE_ENV?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function wU(e,...t){if("production"!==process.env.NODE_ENV){const r=xU[e],n=zU(r)?r.apply(null,t):r;throw new Error(`[Immer] ${n}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var bU=Object,BU=bU.getPrototypeOf,CU="constructor",EU="prototype",kU="configurable",SU="enumerable",jU="writable",FU="value",QU=e=>!!e&&!!e[vU];function NU(e){var t;return!!e&&(IU(e)||HU(e)||!!e[yU]||!!(null==(t=e[CU])?void 0:t[yU])||_U(e)||RU(e))}var UU=bU[EU][CU].toString(),OU=new WeakMap;function IU(e){if(!e||!KU(e))return!1;const t=BU(e);if(null===t||t===bU[EU])return!0;const r=bU.hasOwnProperty.call(t,CU)&&t[CU];if(r===Object)return!0;if(!zU(r))return!1;let n=OU.get(r);return void 0===n&&(n=Function.toString.call(r),OU.set(r,n)),n===UU}function TU(e,t,r=!0){if(0===PU(e)){(r?Reflect.ownKeys(e):bU.keys(e)).forEach(r=>{t(r,e[r],e)})}else e.forEach((r,n)=>t(n,r,e))}function PU(e){const t=e[vU];return t?t.type_:HU(e)?1:_U(e)?2:RU(e)?3:0}var MU=(e,t,r=PU(e))=>2===r?e.has(t):bU[EU].hasOwnProperty.call(e,t),DU=(e,t,r=PU(e))=>2===r?e.get(t):e[t],LU=(e,t,r,n=PU(e))=>{2===n?e.set(t,r):3===n?e.add(r):e[t]=r};var HU=Array.isArray,_U=e=>e instanceof Map,RU=e=>e instanceof Set,KU=e=>"object"==typeof e,zU=e=>"function"==typeof e,VU=e=>"boolean"==typeof e;var $U=e=>e.copy_||e.base_,WU=e=>e.modified_?e.copy_:e.base_;function GU(e,t){if(_U(e))return new Map(e);if(RU(e))return new Set(e);if(HU(e))return Array[EU].slice.call(e);const r=IU(e);if(!0===t||"class_only"===t&&!r){const t=bU.getOwnPropertyDescriptors(e);delete t[vU];let r=Reflect.ownKeys(t);for(let n=0;n<r.length;n++){const i=r[n],a=t[i];!1===a[jU]&&(a[jU]=!0,a[kU]=!0),(a.get||a.set)&&(t[i]={[kU]:!0,[jU]:!0,[SU]:a[SU],[FU]:e[i]})}return bU.create(BU(e),t)}{const t=BU(e);if(null!==t&&r)return{...e};const n=bU.create(t);return bU.assign(n,e)}}function qU(e,t=!1){return XU(e)||QU(e)||!NU(e)||(PU(e)>1&&bU.defineProperties(e,{set:YU,add:YU,clear:YU,delete:YU}),bU.freeze(e),t&&TU(e,(e,t)=>{qU(t,!0)},!1)),e}var YU={[FU]:function(){wU(2)}};function XU(e){return null===e||!KU(e)||bU.isFrozen(e)}var JU="MapSet",ZU="Patches",eO="ArrayMethods",tO={};function rO(e){const t=tO[e];return t||wU(0,e),t}var nO,iO=e=>!!tO[e],aO=()=>nO;function oO(e,t){t&&(e.patchPlugin_=rO(ZU),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function sO(e){AO(e),e.drafts_.forEach(cO),e.drafts_=null}function AO(e){e===nO&&(nO=e.parent_)}var lO=e=>nO={drafts_:[],parent_:nO,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:iO(JU)?rO(JU):void 0,arrayMethodsPlugin_:iO(eO)?rO(eO):void 0};function cO(e){const t=e[vU];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function uO(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(void 0!==e&&e!==r){r[vU].modified_&&(sO(t),wU(4)),NU(e)&&(e=dO(t,e));const{patchPlugin_:n}=t;n&&n.generateReplacementPatches_(r[vU].base_,e,t)}else e=dO(t,r);return function(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&qU(t,r)}(t,e,!0),sO(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==gU?e:void 0}function dO(e,t){if(XU(t))return t;const r=t[vU];if(!r){return yO(t,e.handledSet_,e)}if(!pO(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){const{callbacks_:t}=r;if(t)for(;t.length>0;){t.pop()(e)}gO(r,e)}return r.copy_}function hO(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var pO=(e,t)=>e.scope_===t,fO=[];function mO(e,t,r,n){const i=$U(e),a=e.type_;if(void 0!==n){if(DU(i,n,a)===t)return void LU(i,n,r,a)}if(!e.draftLocations_){const t=e.draftLocations_=new Map;TU(i,(e,r)=>{if(QU(r)){const n=t.get(r)||[];n.push(e),t.set(r,n)}})}const o=e.draftLocations_.get(t)??fO;for(const s of o)LU(i,s,r,a)}function gO(e,t){var r;if(e.modified_&&!e.finalized_&&(3===e.type_||1===e.type_&&e.allIndicesReassigned_||((null==(r=e.assigned_)?void 0:r.size)??0)>0)){const{patchPlugin_:r}=t;if(r){const n=r.getPath(e);n&&r.generatePatches_(e,n,t)}hO(e)}}function yO(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||QU(e)||t.has(e)||!NU(e)||XU(e)||(t.add(e),TU(e,(n,i)=>{if(QU(i)){const t=i[vU];if(pO(t,r)){const r=WU(t);LU(e,n,r,e.type_),hO(t)}}else NU(i)&&yO(i,t,r)})),e}var vO={get(e,t){if(t===vU)return e;let r=e.scope_.arrayMethodsPlugin_;const n=1===e.type_&&"string"==typeof t;if(n&&(null==r?void 0:r.isArrayOperationMethod(t)))return r.createMethodInterceptor(e,t);const i=$U(e);if(!MU(i,t,e.type_))return function(e,t,r){var n;const i=bO(t,r);return i?FU in i?i[FU]:null==(n=i.get)?void 0:n.call(e.draft_):void 0}(e,i,t);const a=i[t];if(e.finalized_||!NU(a))return a;if(n&&e.operationMethod&&(null==r?void 0:r.isMutatingArrayMethod(e.operationMethod))&&function(e){const t=+e;return Number.isInteger(t)&&String(t)===e}(t))return a;if(a===wO(e.base_,t)){CO(e);const r=1===e.type_?+t:t,n=EO(e.scope_,a,e,r);return e.copy_[r]=n}return a},has:(e,t)=>t in $U(e),ownKeys:e=>Reflect.ownKeys($U(e)),set(e,t,r){const n=bO($U(e),t);if(null==n?void 0:n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const n=wO($U(e),t),o=null==n?void 0:n[vU];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(((i=r)===(a=n)?0!==i||1/i==1/a:i!=i&&a!=a)&&(void 0!==r||MU(e.base_,t,e.type_)))return!0;CO(e),BO(e)}var i,a;return e.copy_[t]===r&&(void 0!==r||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),function(e,t,r){const{scope_:n}=e;if(QU(r)){const i=r[vU];pO(i,n)&&i.callbacks_.push(function(){CO(e);const n=WU(i);mO(e,r,n,t)})}else NU(r)&&e.callbacks_.push(function(){const i=$U(e);3===e.type_?i.has(r)&&yO(r,n.handledSet_,n):DU(i,t,e.type_)===r&&n.drafts_.length>1&&!0===(e.assigned_.get(t)??!1)&&e.copy_&&yO(DU(e.copy_,t,e.type_),n.handledSet_,n)})}(e,t,r)),!0},deleteProperty:(e,t)=>(CO(e),void 0!==wO(e.base_,t)||t in e.base_?(e.assigned_.set(t,!1),BO(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const r=$U(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n?{[jU]:!0,[kU]:1!==e.type_||"length"!==t,[SU]:n[SU],[FU]:r[t]}:n},defineProperty(){wU(11)},getPrototypeOf:e=>BU(e.base_),setPrototypeOf(){wU(12)}},xO={};for(let Aoe in vO){let e=vO[Aoe];xO[Aoe]=function(){const t=arguments;return t[0]=t[0][0],e.apply(this,t)}}function wO(e,t){const r=e[vU];return(r?$U(r):e)[t]}function bO(e,t){if(!(t in e))return;let r=BU(e);for(;r;){const e=Object.getOwnPropertyDescriptor(r,t);if(e)return e;r=BU(r)}}function BO(e){e.modified_||(e.modified_=!0,e.parent_&&BO(e.parent_))}function CO(e){e.copy_||(e.assigned_=new Map,e.copy_=GU(e.base_,e.scope_.immer_.useStrictShallowCopy_))}xO.deleteProperty=function(e,t){return"production"!==process.env.NODE_ENV&&isNaN(parseInt(t))&&wU(13),xO.set.call(this,e,t,void 0)},xO.set=function(e,t,r){return"production"!==process.env.NODE_ENV&&"length"!==t&&isNaN(parseInt(t))&&wU(14),vO.set.call(this,e[0],t,r,e[0])};function EO(e,t,r,n){const[i,a]=_U(t)?rO(JU).proxyMap_(t,r):RU(t)?rO(JU).proxySet_(t,r):function(e,t){const r=HU(e),n={type_:r?1:0,scope_:t?t.scope_:aO(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=n,a=vO;r&&(i=[n],a=xO);const{revoke:o,proxy:s}=Proxy.revocable(i,a);return n.draft_=s,n.revoke_=o,[s,n]}(t,r);return((null==r?void 0:r.scope_)??aO()).drafts_.push(i),a.callbacks_=(null==r?void 0:r.callbacks_)??[],a.key_=n,r&&void 0!==n?function(e,t,r){e.callbacks_.push(function(n){var i;const a=t;if(!a||!pO(a,n))return;null==(i=n.mapSetPlugin_)||i.fixSetContents(a);const o=WU(a);mO(e,a.draft_??a,o,r),gO(a,n)})}(r,a,n):a.callbacks_.push(function(e){var t;null==(t=e.mapSetPlugin_)||t.fixSetContents(a);const{patchPlugin_:r}=e;a.modified_&&r&&r.generatePatches_(a,[],e)}),i}function kO(e){return QU(e)||wU(10,e),SO(e)}function SO(e){if(!NU(e)||XU(e))return e;const t=e[vU];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=GU(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=GU(e,!0);return TU(r,(e,t)=>{LU(r,e,SO(t))},n),t&&(t.finalized_=!1),r}var jO=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,r)=>{if(zU(e)&&!zU(t)){const r=t;t=e;const n=this;return function(e=r,...i){return n.produce(e,e=>t.call(this,e,...i))}}let n;if(zU(t)||wU(6),void 0===r||zU(r)||wU(7),NU(e)){const i=lO(this),a=EO(i,e,void 0);let o=!0;try{n=t(a),o=!1}finally{o?sO(i):AO(i)}return oO(i,r),uO(n,i)}if(!e||!KU(e)){if(n=t(e),void 0===n&&(n=e),n===gU&&(n=void 0),this.autoFreeze_&&qU(n,!0),r){const t=[],i=[];rO(ZU).generateReplacementPatches_(e,n,{patches_:t,inversePatches_:i}),r(t,i)}return n}wU(1,e)},this.produceWithPatches=(e,t)=>{if(zU(e))return(t,...r)=>this.produceWithPatches(t,t=>e(t,...r));let r,n;return[this.produce(e,t,(e,t)=>{r=e,n=t}),r,n]},VU(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),VU(null==e?void 0:e.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),VU(null==e?void 0:e.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){NU(e)||wU(8),QU(e)&&(e=kO(e));const t=lO(this),r=EO(t,e,void 0);return r[vU].isManual_=!0,AO(t),r}finishDraft(e,t){const r=e&&e[vU];r&&r.isManual_||wU(9);const{scope_:n}=r;return oO(n,t),uO(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const n=t[r];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}r>-1&&(t=t.slice(r+1));const n=rO(ZU).applyPatches_;return QU(e)?n(e,t):this.produce(e,e=>n(e,t))}},FO=jO.produce;function QO(e){return({dispatch:t,getState:r})=>n=>i=>"function"==typeof i?i(t,r,e):n(i)}var NO=QO(),UO=QO,OO="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?fU:fU.apply(null,arguments)};function IO(e,t){function r(...r){if(t){let n=t(...r);if(!n)throw new Error("production"===process.env.NODE_ENV?LI(0):"prepareAction did not return an object");return{type:e,payload:n.payload,..."meta"in n&&{meta:n.meta},..."error"in n&&{error:n.error}}}return{type:e,payload:r[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=t=>mU(t)&&t.type===e,r}function TO(e){return"function"==typeof e&&"type"in e&&((t=e)&&"function"==typeof t.match);var t}function PO(e,t){let r=0;return{measureTime(e){const t=Date.now();try{return e()}finally{const e=Date.now();r+=e-t}},warnIfExceeded(){r>e&&console.warn(`${t} took ${r}ms, which is more than the warning threshold of ${e}ms. \nIf your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.\nIt is disabled in production builds, so you don't need to worry about that.`)}}}var MO=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function DO(e){return NU(e)?FO(e,()=>{}):e}function LO(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function HO(e){return"object"!=typeof e||null==e||Object.isFrozen(e)}function _O(e,t,r){const n=RO(e,t,r);return{detectMutations:()=>KO(e,t,n,r)}}function RO(e,t=[],r,n="",i=new Set){const a={value:r};if(!e(r)&&!i.has(r)){i.add(r),a.children={};const o=t.length>0;for(const i in r){const s=n?n+"."+i:i;if(o){if(t.some(e=>e instanceof RegExp?e.test(s):s===e))continue}a.children[i]=RO(e,t,r[i],s)}}return a}function KO(e,t=[],r,n,i=!1,a=""){const o=r?r.value:void 0,s=o===n;if(i&&!s&&!Number.isNaN(n))return{wasMutated:!0,path:a};if(e(o)||e(n))return{wasMutated:!1};const A={};for(let c in r.children)A[c]=!0;for(let c in n)A[c]=!0;const l=t.length>0;for(let c in A){const i=a?a+"."+c:c;if(l){if(t.some(e=>e instanceof RegExp?e.test(i):i===e))continue}const o=KO(e,t,r.children[c],n[c],s,i);if(o.wasMutated)return o}return{wasMutated:!1}}function zO(e){const t=typeof e;return null==e||"string"===t||"boolean"===t||"number"===t||Array.isArray(e)||lU(e)}function VO(e,t="",r=zO,n,i=[],a){let o;if(!r(e))return{keyPath:t||"<root>",value:e};if("object"!=typeof e||null===e)return!1;if(null==a?void 0:a.has(e))return!1;const s=null!=n?n(e):Object.entries(e),A=i.length>0;for(const[l,c]of s){const e=t?t+"."+l:l;if(A){if(i.some(t=>t instanceof RegExp?t.test(e):e===t))continue}if(!r(c))return{keyPath:e,value:c};if("object"==typeof c&&(o=VO(c,e,r,n,i,a),o))return o}return a&&$O(e)&&a.add(e),!1}function $O(e){if(!Object.isFrozen(e))return!1;for(const t of Object.values(e))if("object"==typeof t&&null!==t&&!$O(t))return!1;return!0}function WO(e){return"boolean"==typeof e}var GO=()=>function(e){const{thunk:t=!0,immutableCheck:r=!0,serializableCheck:n=!0,actionCreatorCheck:i=!0}=e??{};let a=new MO;if(t&&(WO(t)?a.push(NO):a.push(UO(t.extraArgument))),"production"!==process.env.NODE_ENV){if(r){let e={};WO(r)||(e=r),a.unshift(function(e={}){if("production"===process.env.NODE_ENV)return()=>e=>t=>e(t);{let t=function(e,t,n,i){return JSON.stringify(e,r(t,i),n)},r=function(e,t){let r=[],n=[];return t||(t=function(e,t){return r[0]===t?"[Circular ~]":"[Circular ~."+n.slice(0,r.indexOf(t)).join(".")+"]"}),function(i,a){if(r.length>0){var o=r.indexOf(this);~o?r.splice(o+1):r.push(this),~o?n.splice(o,1/0,i):n.push(i),~r.indexOf(a)&&(a=t.call(this,i,a))}else r.push(a);return null==e?a:e.call(this,i,a)}},{isImmutable:n=HO,ignoredPaths:i,warnAfter:a=32}=e;const o=_O.bind(null,n,i);return({getState:e})=>{let r,n=e(),i=o(n);return s=>A=>{const l=PO(a,"ImmutableStateInvariantMiddleware");l.measureTime(()=>{if(n=e(),r=i.detectMutations(),i=o(n),r.wasMutated)throw new Error("production"===process.env.NODE_ENV?LI(19):`A state mutation was detected between dispatches, in the path '${r.path||""}'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)});const c=s(A);return l.measureTime(()=>{if(n=e(),r=i.detectMutations(),i=o(n),r.wasMutated)throw new Error("production"===process.env.NODE_ENV?LI(20):`A state mutation was detected inside a dispatch, in the path: ${r.path||""}. Take a look at the reducer(s) handling the action ${t(A)}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)}),l.warnIfExceeded(),c}}}}(e))}if(n){let e={};WO(n)||(e=n),a.push(function(e={}){if("production"===process.env.NODE_ENV)return()=>e=>t=>e(t);{const{isSerializable:t=zO,getEntries:r,ignoredActions:n=[],ignoredActionPaths:i=["meta.arg","meta.baseQueryMeta"],ignoredPaths:a=[],warnAfter:o=32,ignoreState:s=!1,ignoreActions:A=!1,disableCache:l=!1}=e,c=!l&&WeakSet?new WeakSet:void 0;return e=>l=>u=>{if(!mU(u))return l(u);const d=l(u),h=PO(o,"SerializableStateInvariantMiddleware");return A||n.length&&-1!==n.indexOf(u.type)||h.measureTime(()=>{const e=VO(u,"",t,r,i,c);if(e){const{keyPath:t,value:r}=e;console.error(`A non-serializable value was detected in an action, in the path: \`${t}\`. Value:`,r,"\nTake a look at the logic that dispatched this action: ",u,"\n(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)","\n(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)")}}),s||(h.measureTime(()=>{const n=VO(e.getState(),"",t,r,a,c);if(n){const{keyPath:e,value:t}=n;console.error(`A non-serializable value was detected in the state, in the path: \`${e}\`. Value:`,t,`\nTake a look at the reducer(s) handling this action type: ${u.type}.\n(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),h.warnIfExceeded()),d}}}(e))}if(i){let e={};WO(i)||(e=i),a.unshift(function(e={}){if("production"===process.env.NODE_ENV)return()=>e=>t=>e(t);const{isActionCreator:t=TO}=e;return()=>e=>r=>(t(r)&&console.warn(function(e){const t=e?`${e}`.split("/"):[],r=t[t.length-1]||"actionCreator";return`Detected an action creator with type "${e||"unknown"}" being dispatched. \nMake sure you're calling the action creator before dispatching, i.e. \`dispatch(${r}())\` instead of \`dispatch(${r})\`. This is necessary even if the action has no payload.`}(r.type)),e(r))}(e))}}return a},qO="RTK_autoBatch",YO=()=>e=>({payload:e,meta:{[qO]:!0}}),XO=e=>t=>{setTimeout(t,e)},JO=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let i=!0,a=!1,o=!1;const s=new Set,A="tick"===e.type?queueMicrotask:"raf"===e.type?"undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:XO(10):"callback"===e.type?e.queueNotification:XO(e.timeout),l=()=>{o=!1,a&&(a=!1,s.forEach(e=>e()))};return Object.assign({},n,{subscribe(e){const t=n.subscribe(()=>i&&e());return s.add(e),()=>{t(),s.delete(e)}},dispatch(e){var t;try{return i=!(null==(t=null==e?void 0:e.meta)?void 0:t[qO]),a=!i,a&&(o||(o=!0,A(l))),n.dispatch(e)}finally{i=!0}}})};function ZO(e){const t=GO(),{reducer:r,middleware:n,devTools:i=!0,duplicateMiddlewareCheck:a=!0,preloadedState:o,enhancers:s}=e||{};let A,l;if("function"==typeof r)A=r;else{if(!lU(r))throw new Error("production"===process.env.NODE_ENV?LI(1):"`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers");A=pU(r)}if("production"!==process.env.NODE_ENV&&n&&"function"!=typeof n)throw new Error("production"===process.env.NODE_ENV?LI(2):"`middleware` field must be a callback");if("function"==typeof n){if(l=n(t),"production"!==process.env.NODE_ENV&&!Array.isArray(l))throw new Error("production"===process.env.NODE_ENV?LI(3):"when using a middleware builder function, an array of middleware must be returned")}else l=t();if("production"!==process.env.NODE_ENV&&l.some(e=>"function"!=typeof e))throw new Error("production"===process.env.NODE_ENV?LI(4):"each middleware provided to configureStore must be a function");if("production"!==process.env.NODE_ENV&&a){let e=new Set;l.forEach(t=>{if(e.has(t))throw new Error("production"===process.env.NODE_ENV?LI(42):"Duplicate middleware references found when creating the store. Ensure that each middleware is only included once.");e.add(t)})}let c=fU;i&&(c=OO({trace:"production"!==process.env.NODE_ENV,..."object"==typeof i&&i}));const u=function(...e){return t=>(r,n)=>{const i=t(r,n);let a=()=>{throw new Error("production"===process.env.NODE_ENV?aU(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")};const o={getState:i.getState,dispatch:(e,...t)=>a(e,...t)},s=e.map(e=>e(o));return a=fU(...s)(i.dispatch),{...i,dispatch:a}}}(...l),d=(e=>function(t){const{autoBatch:r=!0}=t??{};let n=new MO(e);return r&&n.push(JO("object"==typeof r?r:void 0)),n})(u);if("production"!==process.env.NODE_ENV&&s&&"function"!=typeof s)throw new Error("production"===process.env.NODE_ENV?LI(5):"`enhancers` field must be a callback");let h="function"==typeof s?s(d):d();if("production"!==process.env.NODE_ENV&&!Array.isArray(h))throw new Error("production"===process.env.NODE_ENV?LI(6):"`enhancers` callback must return an array");if("production"!==process.env.NODE_ENV&&h.some(e=>"function"!=typeof e))throw new Error("production"===process.env.NODE_ENV?LI(7):"each enhancer provided to configureStore must be a function");"production"!==process.env.NODE_ENV&&l.length&&!h.includes(u)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");return dU(A,o,c(...h))}function eI(e){const t={},r=[];let n;const i={addCase(e,a){if("production"!==process.env.NODE_ENV){if(r.length>0)throw new Error("production"===process.env.NODE_ENV?LI(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(n)throw new Error("production"===process.env.NODE_ENV?LI(27):"`builder.addCase` should only be called before calling `builder.addDefaultCase`")}const o="string"==typeof e?e:e.type;if(!o)throw new Error("production"===process.env.NODE_ENV?LI(28):"`builder.addCase` cannot be called with an empty action type");if(o in t)throw new Error("production"===process.env.NODE_ENV?LI(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${o}'`);return t[o]=a,i},addAsyncThunk(e,a){if("production"!==process.env.NODE_ENV&&n)throw new Error("production"===process.env.NODE_ENV?LI(43):"`builder.addAsyncThunk` should only be called before calling `builder.addDefaultCase`");return a.pending&&(t[e.pending.type]=a.pending),a.rejected&&(t[e.rejected.type]=a.rejected),a.fulfilled&&(t[e.fulfilled.type]=a.fulfilled),a.settled&&r.push({matcher:e.settled,reducer:a.settled}),i},addMatcher(e,t){if("production"!==process.env.NODE_ENV&&n)throw new Error("production"===process.env.NODE_ENV?LI(30):"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return r.push({matcher:e,reducer:t}),i},addDefaultCase(e){if("production"!==process.env.NODE_ENV&&n)throw new Error("production"===process.env.NODE_ENV?LI(31):"`builder.addDefaultCase` can only be called once");return n=e,i}};return e(i),[t,r,n]}var tI=(e=21)=>{let t="",r=e;for(;r--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},rI=Symbol.for("rtk-slice-createasyncthunk");function nI(e,t){return`${e}/${t}`}function iI({creators:e}={}){var t;const r=null==(t=null==e?void 0:e.asyncThunk)?void 0:t[rI];return function(e){const{name:t,reducerPath:n=t}=e;if(!t)throw new Error("production"===process.env.NODE_ENV?LI(11):"`name` is a required option for createSlice");"undefined"!=typeof process&&"development"===process.env.NODE_ENV&&void 0===e.initialState&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");const i=("function"==typeof e.reducers?e.reducers(function(){function e(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}()):e.reducers)||{},a=Object.keys(i),o={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){const r="string"==typeof e?e:e.type;if(!r)throw new Error("production"===process.env.NODE_ENV?LI(12):"`context.addCase` cannot be called with an empty action type");if(r in o.sliceCaseReducersByType)throw new Error("production"===process.env.NODE_ENV?LI(13):"`context.addCase` cannot be called with two reducers for the same action type: "+r);return o.sliceCaseReducersByType[r]=t,s},addMatcher:(e,t)=>(o.sliceMatchers.push({matcher:e,reducer:t}),s),exposeAction:(e,t)=>(o.actionCreators[e]=t,s),exposeCaseReducer:(e,t)=>(o.sliceCaseReducersByName[e]=t,s)};function A(){if("production"!==process.env.NODE_ENV&&"object"==typeof e.extraReducers)throw new Error("production"===process.env.NODE_ENV?LI(14):"The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");const[t={},r=[],n]="function"==typeof e.extraReducers?eI(e.extraReducers):[e.extraReducers],i={...t,...o.sliceCaseReducersByType};return function(e,t){if("production"!==process.env.NODE_ENV&&"object"==typeof t)throw new Error("production"===process.env.NODE_ENV?LI(8):"The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");let r,[n,i,a]=eI(t);if("function"==typeof e)r=()=>DO(e());else{const t=DO(e);r=()=>t}function o(e=r(),t){let o=[n[t.type],...i.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return 0===o.filter(e=>!!e).length&&(o=[a]),o.reduce((e,r)=>{if(r){if(QU(e)){const n=r(e,t);return void 0===n?e:n}if(NU(e))return FO(e,e=>r(e,t));{const n=r(e,t);if(void 0===n){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return n}}return e},e)}return o.getInitialState=r,o}(e.initialState,e=>{for(let t in i)e.addCase(t,i[t]);for(let t of o.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of r)e.addMatcher(t.matcher,t.reducer);n&&e.addDefaultCase(n)})}a.forEach(n=>{const a=i[n],o={reducerName:n,type:nI(t,n),createNotation:"function"==typeof e.reducers};!function(e){return"asyncThunk"===e._reducerDefinitionType}(a)?function({type:e,reducerName:t,createNotation:r},n,i){let a,o;if("reducer"in n){if(r&&!function(e){return"reducerWithPrepare"===e._reducerDefinitionType}(n))throw new Error("production"===process.env.NODE_ENV?LI(17):"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");a=n.reducer,o=n.prepare}else a=n;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?IO(e,o):IO(e))}(o,a,s):function({type:e,reducerName:t},r,n,i){if(!i)throw new Error("production"===process.env.NODE_ENV?LI(18):"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");const{payloadCreator:a,fulfilled:o,pending:s,rejected:A,settled:l,options:c}=r,u=i(e,a,c);n.exposeAction(t,u),o&&n.addCase(u.fulfilled,o);s&&n.addCase(u.pending,s);A&&n.addCase(u.rejected,A);l&&n.addMatcher(u.settled,l);n.exposeCaseReducer(t,{fulfilled:o||sI,pending:s||sI,rejected:A||sI,settled:l||sI})}(o,a,s,r)});const l=e=>e,c=new Map,u=new WeakMap;let d;function h(e,t){return d||(d=A()),d(e,t)}function p(){return d||(d=A()),d.getInitialState()}function f(t,r=!1){function n(e){let i=e[t];if(void 0===i)if(r)i=LO(u,n,p);else if("production"!==process.env.NODE_ENV)throw new Error("production"===process.env.NODE_ENV?LI(15):"selectSlice returned undefined for an uninjected slice reducer");return i}function i(t=l){const n=LO(c,r,()=>new WeakMap);return LO(n,t,()=>{const n={};for(const[i,a]of Object.entries(e.selectors??{}))n[i]=aI(a,t,()=>LO(u,t,p),r);return n})}return{reducerPath:t,getSelectors:i,get selectors(){return i(n)},selectSlice:n}}const m={name:t,reducer:h,actions:o.actionCreators,caseReducers:o.sliceCaseReducersByName,getInitialState:p,...f(n),injectInto(e,{reducerPath:t,...r}={}){const i=t??n;return e.inject({reducerPath:i,reducer:h},r),{...m,...f(i,!0)}}};return m}}function aI(e,t,r,n){function i(i,...a){let o=t(i);if(void 0===o)if(n)o=r();else if("production"!==process.env.NODE_ENV)throw new Error("production"===process.env.NODE_ENV?LI(16):"selectState returned undefined for an uninjected slice reducer");return e(o,...a)}return i.unwrapped=e,i}var oI=iI();function sI(){}var AI="listener",lI="completed",cI="cancelled",uI=`task-${cI}`,dI=`task-${lI}`,hI=`${AI}-${cI}`,pI=`${AI}-${lI}`,fI=class{constructor(e){Se(this,"name","TaskAbortError"),Se(this,"message"),this.code=e,this.message=`task ${cI} (reason: ${e})`}},mI=(e,t)=>{if("function"!=typeof e)throw new TypeError("production"===process.env.NODE_ENV?LI(32):`${t} is not a function`)},gI=()=>{},yI=(e,t=gI)=>(e.catch(t),e),vI=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),xI=e=>{if(e.aborted)throw new fI(e.reason)};function wI(e,t){let r=gI;return new Promise((n,i)=>{const a=()=>i(new fI(e.reason));e.aborted?a():(r=vI(e,a),t.finally(()=>r()).then(n,i))}).finally(()=>{r=gI})}var bI=e=>t=>yI(wI(e,t).then(t=>(xI(e),t))),BI=e=>{const t=bI(e);return e=>t(new Promise(t=>setTimeout(t,e)))},{assign:CI}=Object,EI={},kI="listenerMiddleware",SI=(e,t)=>(r,n)=>{mI(r,"taskExecutor");const i=new AbortController;var a;a=i,vI(e,()=>a.abort(e.reason));const o=(async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof fI?"cancelled":"rejected",error:r}}finally{null==t||t()}})(async()=>{xI(e),xI(i.signal);const t=await r({pause:bI(i.signal),delay:BI(i.signal),signal:i.signal});return xI(i.signal),t},()=>i.abort(dI));return(null==n?void 0:n.autoJoin)&&t.push(o.catch(gI)),{result:bI(e)(o),cancel(){i.abort(uI)}}},jI=(e,t)=>(r,n)=>yI((async(r,n)=>{xI(t);let i=()=>{};const a=[new Promise((t,n)=>{let a=e({predicate:r,effect:(e,r)=>{r.unsubscribe(),t([e,r.getState(),r.getOriginalState()])}});i=()=>{a(),n()}})];null!=n&&a.push(new Promise(e=>setTimeout(e,n,null)));try{const e=await wI(t,Promise.race(a));return xI(t),e}finally{i()}})(r,n)),FI=e=>{let{type:t,actionCreator:r,matcher:n,predicate:i,effect:a}=e;if(t)i=IO(t).match;else if(r)t=r.type,i=r.match;else if(n)i=n;else if(!i)throw new Error("production"===process.env.NODE_ENV?LI(21):"Creating or removing a listener requires one of the known fields for matching an action");return mI(a,"options.listener"),{predicate:i,type:t,effect:a}},QI=CI(e=>{const{type:t,predicate:r,effect:n}=FI(e);return{id:tI(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error("production"===process.env.NODE_ENV?LI(22):"Unsubscribe not initialized")}}},{withTypes:()=>QI}),NI=(e,t)=>{const{type:r,effect:n,predicate:i}=FI(t);return Array.from(e.values()).find(e=>("string"==typeof r?e.type===r:e.predicate===i)&&e.effect===n)},UI=e=>{e.pending.forEach(e=>{e.abort(hI)})},OI=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},II=CI(IO(`${kI}/add`),{withTypes:()=>II}),TI=IO(`${kI}/removeAll`),PI=CI(IO(`${kI}/remove`),{withTypes:()=>PI}),MI=(...e)=>{console.error(`${kI}/error`,...e)},DI=(e={})=>{const t=new Map,r=new Map,{extra:n,onError:i=MI}=e;mI(i,"onError");const a=e=>(e=>(e.unsubscribe=()=>t.delete(e.id),t.set(e.id,e),t=>{e.unsubscribe(),(null==t?void 0:t.cancelActive)&&UI(e)}))(NI(t,e)??QI(e));CI(a,{withTypes:()=>a});const o=e=>{const r=NI(t,e);return r&&(r.unsubscribe(),e.cancelActive&&UI(r)),!!r};CI(o,{withTypes:()=>o});const s=async(e,o,s,A)=>{const l=new AbortController,c=jI(a,l.signal),u=[];try{e.pending.add(l),(e=>{const t=r.get(e)??0;r.set(e,t+1)})(e),await Promise.resolve(e.effect(o,CI({},s,{getOriginalState:A,condition:(e,t)=>c(e,t).then(Boolean),take:c,delay:BI(l.signal),pause:bI(l.signal),extra:n,signal:l.signal,fork:SI(l.signal,u),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach((e,t,r)=>{e!==l&&(e.abort(hI),r.delete(e))})},cancel:()=>{l.abort(hI),e.pending.delete(l)},throwIfCancelled:()=>{xI(l.signal)}})))}catch(d){d instanceof fI||OI(i,d,{raisedBy:"effect"})}finally{await Promise.all(u),l.abort(pI),(e=>{const t=r.get(e)??1;1===t?r.delete(e):r.set(e,t-1)})(e),e.pending.delete(l)}},A=((e,t)=>()=>{for(const e of t.keys())UI(e);e.clear()})(t,r);return{middleware:e=>r=>n=>{if(!mU(n))return r(n);if(II.match(n))return a(n.payload);if(TI.match(n))return void A();if(PI.match(n))return o(n.payload);let l=e.getState();const c=()=>{if(l===EI)throw new Error("production"===process.env.NODE_ENV?LI(23):`${kI}: getOriginalState can only be called synchronously`);return l};let u;try{if(u=r(n),t.size>0){const r=e.getState(),a=Array.from(t.values());for(const t of a){let a=!1;try{a=t.predicate(n,r,l)}catch(d){a=!1,OI(i,d,{raisedBy:"predicate"})}a&&s(t,n,e,c)}}}finally{l=EI}return u},startListening:a,stopListening:o,clearListeners:A}};function LI(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var HI=oI({name:"chartLayout",initialState:{layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var r,n,i,a;e.margin.top=null!==(r=t.payload.top)&&void 0!==r?r:0,e.margin.right=null!==(n=t.payload.right)&&void 0!==n?n:0,e.margin.bottom=null!==(i=t.payload.bottom)&&void 0!==i?i:0,e.margin.left=null!==(a=t.payload.left)&&void 0!==a?a:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:_I,setLayout:RI,setChartSize:KI,setScale:zI}=HI.actions,VI=HI.reducer;function $I(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function WI(e){return Number.isFinite(e)}function GI(e){return"number"==typeof e&&e>0&&Number.isFinite(e)}function qI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function YI(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qI(Object(r),!0).forEach(function(t){XI(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qI(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function XI(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function JI(e,t,r){return Wj(e)||Wj(t)?r:Hj(t)?Oj(e,t,r):"function"==typeof t?t(e):r}var ZI=(e,t)=>"horizontal"===e&&"xAxis"===t||"vertical"===e&&"yAxis"===t||"centric"===e&&"angleAxis"===t||"radial"===e&&"radiusAxis"===t,eT=(e,t,r,n)=>{if(n)return e.map(e=>e.coordinate);var i,a,o=e.map(e=>(e.coordinate===t&&(i=!0),e.coordinate===r&&(a=!0),e.coordinate));return i||o.push(t),a||o.push(r),o},tT=(e,t,r)=>{if(!e)return null;var{duplicateDomain:n,type:i,range:a,scale:o,realScaleType:s,isCategorical:A,categoricalDomain:l,tickCount:c,ticks:u,niceTicks:d,axisType:h}=e;if(!o)return null;var p="scaleBand"===s&&o.bandwidth?o.bandwidth()/2:2,f="category"===i&&o.bandwidth?o.bandwidth()/p:0;return f="angleAxis"===h&&a&&a.length>=2?2*Pj(a[0]-a[1])*f:f,u||d?(u||d||[]).map((e,t)=>{var r=n?n.indexOf(e):e,i=o.map(r);return WI(i)?{coordinate:i+f,value:e,offset:f,index:t}:null}).filter(qj):A&&l?l.map((e,t)=>{var r=o.map(e);return WI(r)?{coordinate:r+f,value:e,index:t,offset:f}:null}).filter(qj):o.ticks&&null!=c?o.ticks(c).map((e,t)=>{var r=o.map(e);return WI(r)?{coordinate:r+f,value:e,index:t,offset:f}:null}).filter(qj):o.domain().map((e,t)=>{var r=o.map(e);return WI(r)?{coordinate:r+f,value:n?n[e]:e,index:t,offset:f}:null}).filter(qj)},rT={sign:e=>{var t,r=e.length;if(!(r<=0)){var n=null===(t=e[0])||void 0===t?void 0:t.length;if(!(null==n||n<=0))for(var i=0;i<n;++i)for(var a=0,o=0,s=0;s<r;++s){var A=e[s],l=null==A?void 0:A[i];if(null!=l){var c=l[1],u=l[0],d=Mj(c)?u:c;d>=0?(l[0]=a,a+=d,l[1]=a):(l[0]=o,o+=d,l[1]=o)}}}},expand:function(e,t){if((n=e.length)>0){for(var r,n,i,a=0,o=e[0].length;a<o;++a){for(i=r=0;r<n;++r)i+=e[r][a][1]||0;if(i)for(r=0;r<n;++r)e[r][a][1]/=i}Aj(e,t)}},none:Aj,silhouette:function(e,t){if((r=e.length)>0){for(var r,n=0,i=e[t[0]],a=i.length;n<a;++n){for(var o=0,s=0;o<r;++o)s+=e[o][n][1]||0;i[n][1]+=i[n][0]=-s/2}Aj(e,t)}},wiggle:function(e,t){if((i=e.length)>0&&(n=(r=e[t[0]]).length)>0){for(var r,n,i,a=0,o=1;o<n;++o){for(var s=0,A=0,l=0;s<i;++s){for(var c=e[t[s]],u=c[o][1]||0,d=(u-(c[o-1][1]||0))/2,h=0;h<s;++h){var p=e[t[h]];d+=(p[o][1]||0)-(p[o-1][1]||0)}A+=u,l+=d*u}r[o-1][1]+=r[o-1][0]=a,A&&(a-=l/A)}r[o-1][1]+=r[o-1][0]=a,Aj(e,t)}},positive:e=>{var t,r=e.length;if(!(r<=0)){var n=null===(t=e[0])||void 0===t?void 0:t.length;if(!(null==n||n<=0))for(var i=0;i<n;++i)for(var a=0,o=0;o<r;++o){var s=e[o],A=null==s?void 0:s[i];if(null!=A){var l=Mj(A[1])?A[0]:A[1];l>=0?(A[0]=a,a+=l,A[1]=a):(A[0]=0,A[1]=0)}}}}},nT=(e,t,r)=>{var n,i=null!==(n=rT[r])&&void 0!==n?n:Aj,a=function(){var e=AS([]),t=lj,r=Aj,n=cj;function i(i){var a,o,s=Array.from(e.apply(this,arguments),uj),A=s.length,l=-1;for(const e of i)for(a=0,++l;a<A;++a)(s[a][l]=[0,+n(e,s[a].key,l,i)]).data=e;for(a=0,o=wS(t(s));a<A;++a)s[o[a]].index=a;return r(s,o),s}return i.keys=function(t){return arguments.length?(e="function"==typeof t?t:AS(Array.from(t)),i):e},i.value=function(e){return arguments.length?(n="function"==typeof e?e:AS(+e),i):n},i.order=function(e){return arguments.length?(t=null==e?lj:"function"==typeof e?e:AS(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(r=null==e?Aj:e,i):r},i}().keys(t).value((e,t)=>Number(JI(e,t,0))).order(lj).offset(i),o=a(e);return o.forEach((r,n)=>{r.forEach((r,i)=>{var a=JI(e[i],t[n],0);Array.isArray(a)&&2===a.length&&Lj(a[0])&&Lj(a[1])&&(r[0]=a[0],r[1]=a[1])})}),o};function iT(e){var{axis:t,ticks:r,bandSize:n,entry:i,index:a,dataKey:o}=e;if("category"===t.type){if(!t.allowDuplicatedCategory&&t.dataKey&&!Wj(i[t.dataKey])){var s=$j(r,"value",i[t.dataKey]);if(s)return s.coordinate+n/2}return null!=r&&r[a]?r[a].coordinate+n/2:null}var A=JI(i,Wj(o)?t.dataKey:o),l=t.scale.map(A);return Lj(l)?l:null}var aT=e=>{var{axis:t,ticks:r,offset:n,bandSize:i,entry:a,index:o}=e;if("category"===t.type)return r[o]?r[o].coordinate+n:null;var s=JI(a,t.dataKey,t.scale.domain()[o]);if(Wj(s))return null;var A=t.scale.map(s);return Lj(A)?A-i/2+n:null},oT=(e,t,r)=>{var n;if(null!=e)return[(n=Object.keys(e).reduce((n,i)=>{var a=e[i];if(!a)return n;var{stackedData:o}=a,s=o.reduce((e,n)=>{var i,a=$I(n,t,r),o=(i=a.flat(2).filter(Lj),[Math.min(...i),Math.max(...i)]);return WI(o[0])&&WI(o[1])?[Math.min(e[0],o[0]),Math.max(e[1],o[1])]:e},[1/0,-1/0]);return[Math.min(s[0],n[0]),Math.max(s[1],n[1])]},[1/0,-1/0]))[0]===1/0?0:n[0],n[1]===-1/0?0:n[1]]},sT=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,AT=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,lT=(e,t,r)=>{if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var i=tU(t,e=>e.coordinate),a=1/0,o=1,s=i.length;o<s;o++){var A=i[o],l=i[o-1];a=Math.min(((null==A?void 0:A.coordinate)||0)-((null==l?void 0:l.coordinate)||0),a)}return a===1/0?0:a}return r?void 0:0};function cT(e){var{tooltipEntrySettings:t,dataKey:r,payload:n,value:i,name:a}=e;return YI(YI({},t),{},{dataKey:r,payload:n,value:i,name:a})}function uT(e,t){return e?String(e):"string"==typeof t?t:void 0}var dT=e=>e.layout.width,hT=e=>e.layout.height,pT=e=>e.layout.scale,fT=e=>e.layout.margin,mT=NN(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),gT=NN(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),yT="data-recharts-item-index",vT="data-recharts-item-id";function xT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function wT(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xT(Object(r),!0).forEach(function(t){bT(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xT(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function bT(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var BT,CT,ET,kT,ST,jT=NN([dT,hT,fT,e=>e.brush.height,function(e){return gT(e).reduce((e,t)=>"left"!==t.orientation||t.mirror||t.hide?e:e+("number"==typeof t.width?t.width:60),0)},function(e){return gT(e).reduce((e,t)=>"right"!==t.orientation||t.mirror||t.hide?e:e+("number"==typeof t.width?t.width:60),0)},function(e){return mT(e).reduce((e,t)=>"top"!==t.orientation||t.mirror||t.hide?e:e+t.height,0)},function(e){return mT(e).reduce((e,t)=>"bottom"!==t.orientation||t.mirror||t.hide?e:e+t.height,0)},rU,e=>e.legend.size],(e,t,r,n,i,a,o,s,A,l)=>{var c={left:(r.left||0)+i,right:(r.right||0)+a},u=wT(wT({},{top:(r.top||0)+o,bottom:(r.bottom||0)+s}),c),d=u.bottom;u.bottom+=n,u=((e,t,r)=>{if(t&&r){var{width:n,height:i}=r,{align:a,verticalAlign:o,layout:s}=t;if(("vertical"===s||"horizontal"===s&&"middle"===o)&&"center"!==a&&Lj(e[a]))return YI(YI({},e),{},{[a]:e[a]+(n||0)});if(("horizontal"===s||"vertical"===s&&"center"===a)&&"middle"!==o&&Lj(e[o]))return YI(YI({},e),{},{[o]:e[o]+(i||0)})}return e})(u,A,l);var h=e-u.left-u.right,p=t-u.top-u.bottom;return wT(wT({brushBottom:d},u),{},{width:Math.max(h,0),height:Math.max(p,0)})}),FT=NN(jT,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),QT=NN(dT,hT,(e,t)=>({x:0,y:0,width:e,height:t})),NT=Te.createContext(null),UT=()=>null!=Te.useContext(NT),OT=e=>{var{children:t}=e;return De.createElement(NT.Provider,{value:!0},t)},IT=e=>e.brush,TT=NN([IT,jT,fT],(e,t,r)=>({height:e.height,x:Lj(e.x)?e.x:t.left,y:Lj(e.y)?e.y:t.top+t.height+t.brushBottom-((null==r?void 0:r.bottom)||0),width:Lj(e.width)?e.width:t.width})),PT={},MT={},DT={};function LT(){return BT||(BT=1,e=DT,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.debounce=function(e,t,{signal:r,edges:n}={}){let i,a=null;const o=null!=n&&n.includes("leading"),s=null==n||n.includes("trailing"),A=()=>{null!==a&&(e.apply(i,a),i=void 0,a=null)};let l=null;const c=()=>{null!=l&&clearTimeout(l),l=setTimeout(()=>{l=null,s&&A(),u()},t)},u=()=>{null!==l&&(clearTimeout(l),l=null),i=void 0,a=null},d=function(...e){if(null==r?void 0:r.aborted)return;i=this,a=e;const t=null==l;c(),o&&t&&A()};return d.schedule=c,d.cancel=u,d.flush=()=>{A()},null==r||r.addEventListener("abort",u,{once:!0}),d}),DT;var e}function HT(){return CT||(CT=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=LT();e.debounce=function(e,r=0,n={}){"object"!=typeof n&&(n={});const{leading:i=!1,trailing:a=!0,maxWait:o}=n,s=Array(2);let A;i&&(s[0]="leading"),a&&(s[1]="trailing");let l=null;const c=t.debounce(function(...t){A=e.apply(this,t),l=null},r,{edges:s}),u=function(...t){return null!=o&&(null===l&&(l=Date.now()),Date.now()-l>=o)?(A=e.apply(this,t),l=Date.now(),c.cancel(),c.schedule(),A):(c.apply(this,t),A)};return u.cancel=c.cancel,u.flush=()=>(c.flush(),A),u}}(MT)),MT}function _T(){return ST?kT:(ST=1,kT=(ET||(ET=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=HT();e.throttle=function(e,r=0,n={}){const{leading:i=!0,trailing:a=!0}=n;return t.debounce(e,r,{leading:i,maxWait:r,trailing:a})}}(PT)),PT).throttle)}const RT=ay(_T());var KT=function(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i];if("undefined"!=typeof console&&console.warn&&(void 0===t&&console.warn("LogUtils requires an error message argument"),!e))if(void 0===t)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=0;console.warn(t.replace(/%s/g,()=>n[a++]))}},zT={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},VT=(e,t,r)=>{var{width:n=zT.width,height:i=zT.height,aspect:a,maxHeight:o}=r,s=Dj(n)?e:Number(n),A=Dj(i)?t:Number(i);return a&&a>0&&(s?A=s/a:A&&(s=A*a),o&&null!=A&&A>o&&(A=o)),{calculatedWidth:s,calculatedHeight:A}},$T={width:0,height:0,overflow:"visible"},WT={width:0,overflowX:"visible"},GT={height:0,overflowY:"visible"},qT={},YT=e=>{var{width:t,height:r}=e,n=Dj(t),i=Dj(r);return n&&i?$T:n?WT:i?GT:qT};function XT(){return XT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},XT.apply(null,arguments)}function JT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ZT(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?JT(Object(r),!0).forEach(function(t){eP(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):JT(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function eP(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var tP=Te.createContext(zT.initialDimension);function rP(e){var{children:t,width:r,height:n}=e,i=Te.useMemo(()=>({width:r,height:n}),[r,n]);return function(e){return GI(e.width)&&GI(e.height)}(i)?De.createElement(tP.Provider,{value:i},t):null}var nP=()=>Te.useContext(tP),iP=Te.forwardRef((e,t)=>{var{aspect:r,initialDimension:n=zT.initialDimension,width:i,height:a,minWidth:o=zT.minWidth,minHeight:s,maxHeight:A,children:l,debounce:c=zT.debounce,id:u,className:d,onResize:h,style:p={}}=e,f=Te.useRef(null),m=Te.useRef();m.current=h,Te.useImperativeHandle(t,()=>f.current);var[g,y]=Te.useState({containerWidth:n.width,containerHeight:n.height}),v=Te.useCallback((e,t)=>{y(r=>{var n=Math.round(e),i=Math.round(t);return r.containerWidth===n&&r.containerHeight===i?r:{containerWidth:n,containerHeight:i}})},[]);Te.useEffect(()=>{if(null==f.current||"undefined"==typeof ResizeObserver)return Yj;var e=e=>{var t,r=e[0];if(null!=r){var{width:n,height:i}=r.contentRect;v(n,i),null===(t=m.current)||void 0===t||t.call(m,n,i)}};c>0&&(e=RT(e,c,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),{width:r,height:n}=f.current.getBoundingClientRect();return v(r,n),t.observe(f.current),()=>{t.disconnect()}},[v,c]);var{containerWidth:x,containerHeight:w}=g;KT(!r||r>0,"The aspect(%s) must be greater than zero.",r);var{calculatedWidth:b,calculatedHeight:B}=VT(x,w,{width:i,height:a,aspect:r,maxHeight:A});return KT(null!=b&&b>0||null!=B&&B>0,"The width(%s) and height(%s) of chart should be greater than 0,\n please check the style of container, or the props width(%s) and height(%s),\n or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\n height and width.",b,B,i,a,o,s,r),De.createElement("div",{id:u?"".concat(u):void 0,className:yh("recharts-responsive-container",d),style:ZT(ZT({},p),{},{width:i,height:a,minWidth:o,minHeight:s,maxHeight:A}),ref:f},De.createElement("div",{style:YT({width:i,height:a})},De.createElement(rP,{width:b,height:B},l)))}),aP=Te.forwardRef((e,t)=>{var r=nP();if(GI(r.width)&&GI(r.height))return e.children;var{width:n,height:i}=function(e){var{width:t,height:r,aspect:n}=e,i=t,a=r;return void 0===i&&void 0===a?(i=zT.width,a=zT.height):void 0===i?i=n&&n>0?void 0:zT.width:void 0===a&&(a=n&&n>0?void 0:zT.height),{width:i,height:a}}({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:a,calculatedHeight:o}=VT(void 0,void 0,{width:n,height:i,aspect:e.aspect,maxHeight:e.maxHeight});return Lj(a)&&Lj(o)?De.createElement(rP,{width:a,height:o},e.children):De.createElement(iP,XT({},e,{width:n,height:i,ref:t}))});function oP(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var sP=()=>{var e,t=UT(),r=vN(FT),n=vN(TT),i=null===(e=vN(IT))||void 0===e?void 0:e.padding;return t&&n&&i?{width:n.width-i.left-i.right,height:n.height-i.top-i.bottom,x:i.left,y:i.top}:r},AP={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},lP=()=>{var e;return null!==(e=vN(jT))&&void 0!==e?e:AP},cP=()=>vN(dT),uP=()=>vN(hT),dP=e=>e.layout.layoutType,hP=()=>vN(dP),pP=()=>{var e=hP();if("horizontal"===e||"vertical"===e)return e},fP=e=>{var t=e.layout.layoutType;if("centric"===t||"radial"===t)return t},mP=e=>{var t=fN(),r=UT(),{width:n,height:i}=e,a=nP(),o=n,s=i;return a&&(o=a.width>0?a.width:n,s=a.height>0?a.height:i),Te.useEffect(()=>{!r&&GI(o)&&GI(s)&&t(KI({width:o,height:s}))},[t,r,o,s]),null},gP=Symbol.for("immer-nothing"),yP=Symbol.for("immer-draftable"),vP=Symbol.for("immer-state"),xP="production"!==process.env.NODE_ENV?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function wP(e,...t){if("production"!==process.env.NODE_ENV){const r=xP[e],n="function"==typeof r?r.apply(null,t):r;throw new Error(`[Immer] ${n}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var bP=Object.getPrototypeOf;function BP(e){return!!e&&!!e[vP]}function CP(e){var t;return!!e&&(SP(e)||Array.isArray(e)||!!e[yP]||!!(null==(t=e.constructor)?void 0:t[yP])||UP(e)||OP(e))}var EP=Object.prototype.constructor.toString(),kP=new WeakMap;function SP(e){if(!e||"object"!=typeof e)return!1;const t=Object.getPrototypeOf(e);if(null===t||t===Object.prototype)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(r===Object)return!0;if("function"!=typeof r)return!1;let n=kP.get(r);return void 0===n&&(n=Function.toString.call(r),kP.set(r,n)),n===EP}function jP(e,t,r=!0){if(0===FP(e)){(r?Reflect.ownKeys(e):Object.keys(e)).forEach(r=>{t(r,e[r],e)})}else e.forEach((r,n)=>t(n,r,e))}function FP(e){const t=e[vP];return t?t.type_:Array.isArray(e)?1:UP(e)?2:OP(e)?3:0}function QP(e,t){return 2===FP(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function NP(e,t,r){const n=FP(e);2===n?e.set(t,r):3===n?e.add(r):e[t]=r}function UP(e){return e instanceof Map}function OP(e){return e instanceof Set}function IP(e){return e.copy_||e.base_}function TP(e,t){if(UP(e))return new Map(e);if(OP(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=SP(e);if(!0===t||"class_only"===t&&!r){const t=Object.getOwnPropertyDescriptors(e);delete t[vP];let r=Reflect.ownKeys(t);for(let n=0;n<r.length;n++){const i=r[n],a=t[i];!1===a.writable&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[i]})}return Object.create(bP(e),t)}{const t=bP(e);if(null!==t&&r)return{...e};const n=Object.create(t);return Object.assign(n,e)}}function PP(e,t=!1){return DP(e)||BP(e)||!CP(e)||(FP(e)>1&&Object.defineProperties(e,{set:MP,add:MP,clear:MP,delete:MP}),Object.freeze(e),t&&Object.values(e).forEach(e=>PP(e,!0))),e}var MP={value:function(){wP(2)}};function DP(e){return null===e||"object"!=typeof e||Object.isFrozen(e)}var LP,HP={};function _P(e){const t=HP[e];return t||wP(0,e),t}function RP(){return LP}function KP(e,t){t&&(_P("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function zP(e){VP(e),e.drafts_.forEach(WP),e.drafts_=null}function VP(e){e===LP&&(LP=e.parent_)}function $P(e){return LP={drafts_:[],parent_:LP,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function WP(e){const t=e[vP];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function GP(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return void 0!==e&&e!==r?(r[vP].modified_&&(zP(t),wP(4)),CP(e)&&(e=qP(t,e),t.parent_||XP(t,e)),t.patches_&&_P("Patches").generateReplacementPatches_(r[vP].base_,e,t.patches_,t.inversePatches_)):e=qP(t,r,[]),zP(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==gP?e:void 0}function qP(e,t,r){if(DP(t))return t;const n=e.immer_.shouldUseStrictIteration(),i=t[vP];if(!i)return jP(t,(n,a)=>YP(e,i,t,n,a,r),n),t;if(i.scope_!==e)return t;if(!i.modified_)return XP(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const t=i.copy_;let a=t,o=!1;3===i.type_&&(a=new Set(t),t.clear(),o=!0),jP(a,(n,a)=>YP(e,i,t,n,a,r,o),n),XP(e,t,!1),r&&e.patches_&&_P("Patches").generatePatches_(i,r,e.patches_,e.inversePatches_)}return i.copy_}function YP(e,t,r,n,i,a,o){if(null==i)return;if("object"!=typeof i&&!o)return;const s=DP(i);if(!s||o){if("production"!==process.env.NODE_ENV&&i===r&&wP(5),BP(i)){const o=qP(e,i,a&&t&&3!==t.type_&&!QP(t.assigned_,n)?a.concat(n):void 0);if(NP(r,n,o),!BP(o))return;e.canAutoFreeze_=!1}else o&&r.add(i);if(CP(i)&&!s){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;if(t&&t.base_&&t.base_[n]===i&&s)return;qP(e,i),t&&t.scope_.parent_||"symbol"==typeof n||!(UP(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))||XP(e,i)}}}function XP(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&PP(t,r)}var JP={get(e,t){if(t===vP)return e;const r=IP(e);if(!QP(r,t))return function(e,t,r){var n;const i=tM(t,r);return i?"value"in i?i.value:null==(n=i.get)?void 0:n.call(e.draft_):void 0}(e,r,t);const n=r[t];return e.finalized_||!CP(n)?n:n===eM(e.base_,t)?(nM(e),e.copy_[t]=iM(n,e)):n},has:(e,t)=>t in IP(e),ownKeys:e=>Reflect.ownKeys(IP(e)),set(e,t,r){const n=tM(IP(e),t);if(null==n?void 0:n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const n=eM(IP(e),t),o=null==n?void 0:n[vP];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(((i=r)===(a=n)?0!==i||1/i==1/a:i!=i&&a!=a)&&(void 0!==r||QP(e.base_,t)))return!0;nM(e),rM(e)}var i,a;return e.copy_[t]===r&&(void 0!==r||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==eM(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,nM(e),rM(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const r=IP(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:n.enumerable,value:r[t]}:n},defineProperty(){wP(11)},getPrototypeOf:e=>bP(e.base_),setPrototypeOf(){wP(12)}},ZP={};function eM(e,t){const r=e[vP];return(r?IP(r):e)[t]}function tM(e,t){if(!(t in e))return;let r=bP(e);for(;r;){const e=Object.getOwnPropertyDescriptor(r,t);if(e)return e;r=bP(r)}}function rM(e){e.modified_||(e.modified_=!0,e.parent_&&rM(e.parent_))}function nM(e){e.copy_||(e.copy_=TP(e.base_,e.scope_.immer_.useStrictShallowCopy_))}jP(JP,(e,t)=>{ZP[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),ZP.deleteProperty=function(e,t){return"production"!==process.env.NODE_ENV&&isNaN(parseInt(t))&&wP(13),ZP.set.call(this,e,t,void 0)},ZP.set=function(e,t,r){return"production"!==process.env.NODE_ENV&&"length"!==t&&isNaN(parseInt(t))&&wP(14),JP.set.call(this,e[0],t,r,e[0])};function iM(e,t){const r=UP(e)?_P("MapSet").proxyMap_(e,t):OP(e)?_P("MapSet").proxySet_(e,t):function(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:RP(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,a=JP;r&&(i=[n],a=ZP);const{revoke:o,proxy:s}=Proxy.revocable(i,a);return n.draft_=s,n.revoke_=o,s}(e,t);return(t?t.scope_:RP()).drafts_.push(r),r}function aM(e){if(!CP(e)||DP(e))return e;const t=e[vP];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=TP(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=TP(e,!0);return jP(r,(e,t)=>{NP(r,e,aM(t))},n),t&&(t.finalized_=!1),r}var oM=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(e,t,r)=>{if("function"==typeof e&&"function"!=typeof t){const r=t;t=e;const n=this;return function(e=r,...i){return n.produce(e,e=>t.call(this,e,...i))}}let n;if("function"!=typeof t&&wP(6),void 0!==r&&"function"!=typeof r&&wP(7),CP(e)){const i=$P(this),a=iM(e,void 0);let o=!0;try{n=t(a),o=!1}finally{o?zP(i):VP(i)}return KP(i,r),GP(n,i)}if(!e||"object"!=typeof e){if(n=t(e),void 0===n&&(n=e),n===gP&&(n=void 0),this.autoFreeze_&&PP(n,!0),r){const t=[],i=[];_P("Patches").generateReplacementPatches_(e,n,t,i),r(t,i)}return n}wP(1,e)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...r)=>this.produceWithPatches(t,t=>e(t,...r));let r,n;return[this.produce(e,t,(e,t)=>{r=e,n=t}),r,n]},"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof(null==e?void 0:e.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),"boolean"==typeof(null==e?void 0:e.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){CP(e)||wP(8),BP(e)&&(e=function(e){BP(e)||wP(10,e);return aM(e)}(e));const t=$P(this),r=iM(e,void 0);return r[vP].isManual_=!0,VP(t),r}finishDraft(e,t){const r=e&&e[vP];r&&r.isManual_||wP(9);const{scope_:n}=r;return KP(n,t),GP(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const n=t[r];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}r>-1&&(t=t.slice(r+1));const n=_P("Patches").applyPatches_;return BP(e)?n(e,t):this.produce(e,e=>n(e,t))}};oM.produce;var sM=oI({name:"legend",initialState:{settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:YO()},replaceLegendPayload:{reducer(e,t){var{prev:r,next:n}=t.payload,i=kO(e).payload.indexOf(r);i>-1&&(e.payload[i]=n)},prepare:YO()},removeLegendPayload:{reducer(e,t){var r=kO(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:YO()}}}),{setLegendSize:AM,setLegendSettings:lM,addLegendPayload:cM,replaceLegendPayload:uM,removeLegendPayload:dM}=sM.actions,hM=sM.reducer,pM=["contextPayload"];function fM(){return fM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},fM.apply(null,arguments)}function mM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function gM(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?mM(Object(r),!0).forEach(function(t){yM(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mM(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function yM(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vM(e){return e.value}function xM(e){var{contextPayload:t}=e,r=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,pM),n=JQ(t,e.payloadUniqBy,vM),i=gM(gM({},r),{},{payload:n});return De.isValidElement(e.content)?De.cloneElement(e.content,i):"function"==typeof e.content?De.createElement(e.content,i):De.createElement(vF,i)}function wM(e){var t=fN();return Te.useEffect(()=>{t(lM(e))},[t,e]),null}function bM(e){var t=fN();return Te.useEffect(()=>(t(AM(e)),()=>{t(AM({width:0,height:0}))}),[t,e]),null}var BM={align:"center",iconSize:14,inactiveColor:"#ccc",itemSorter:"value",layout:"horizontal",verticalAlign:"bottom"};function CM(e){var t=cF(e,BM),r=vN(nU),n=Te.useContext(sS),i=vN(e=>e.layout.margin),{width:a,height:o,wrapperStyle:s,portal:A}=t,[l,c]=iU([r]),u=cP(),d=uP();if(null==u||null==d)return null;var h=u-((null==i?void 0:i.left)||0)-((null==i?void 0:i.right)||0),p=function(e,t,r,n){return"vertical"===e&&null!=t?{height:t}:"horizontal"===e?{width:r||n}:null}(t.layout,o,a,h),f=A?s:gM(gM({position:"absolute",width:(null==p?void 0:p.width)||a||"auto",height:(null==p?void 0:p.height)||o||"auto"},function(e,t,r,n,i,a){var o,s,{layout:A,align:l,verticalAlign:c}=t;return e&&(void 0!==e.left&&null!==e.left||void 0!==e.right&&null!==e.right)||(o="center"===l&&"vertical"===A?{left:((n||0)-a.width)/2}:"right"===l?{right:r&&r.right||0}:{left:r&&r.left||0}),e&&(void 0!==e.top&&null!==e.top||void 0!==e.bottom&&null!==e.bottom)||(s="middle"===c?{top:((i||0)-a.height)/2}:"bottom"===c?{bottom:r&&r.bottom||0}:{top:r&&r.top||0}),gM(gM({},o),s)}(s,t,i,u,d,l)),s),m=null!=A?A:n;if(null==m||null==r)return null;var g=De.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:c},De.createElement(wM,{layout:t.layout,align:t.align,verticalAlign:t.verticalAlign,itemSorter:t.itemSorter}),!A&&De.createElement(bM,{width:l.width,height:l.height}),De.createElement(xM,fM({},t,p,{margin:i,chartWidth:u,chartHeight:d,contextPayload:r})));return Pe.createPortal(g,m)}function EM(){return EM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},EM.apply(null,arguments)}function kM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function SM(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?kM(Object(r),!0).forEach(function(t){jM(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kM(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function jM(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function FM(e){return Array.isArray(e)&&Hj(e[0])&&Hj(e[1])?e.join(" ~ "):e}CM.displayName="Legend";var QM={separator:" : ",contentStyle:{margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},itemStyle:{display:"block",paddingTop:4,paddingBottom:4,color:"#000"},labelStyle:{},accessibilityLayer:!1},NM=e=>{var{separator:t=QM.separator,contentStyle:r,itemStyle:n,labelStyle:i=QM.labelStyle,payload:a,formatter:o,itemSorter:s,wrapperClassName:A,labelClassName:l,label:c,labelFormatter:u,accessibilityLayer:d=QM.accessibilityLayer}=e,h=SM(SM({},QM.contentStyle),r),p=SM({margin:0},i),f=!Wj(c),m=f?c:"",g=yh("recharts-default-tooltip",A),y=yh("recharts-tooltip-label",l);f&&u&&null!=a&&(m=u(c,a));var v=d?{role:"status","aria-live":"assertive"}:{};return De.createElement("div",EM({className:g,style:h},v),De.createElement("p",{className:y,style:p},De.isValidElement(m)?m:"".concat(m)),(()=>{if(a&&a.length){var e=(s?tU(a,s):a).map((e,r)=>{if("none"===e.type)return null;var i=e.formatter||o||FM,{value:s,name:A}=e,l=s,c=A;if(i){var u=i(s,A,e,r,a);if(Array.isArray(u))[l,c]=u;else{if(null==u)return null;l=u}}var d=SM(SM({},QM.itemStyle),{},{color:e.color||QM.itemStyle.color},n);return De.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(r),style:d},Hj(c)?De.createElement("span",{className:"recharts-tooltip-item-name"},c):null,Hj(c)?De.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,De.createElement("span",{className:"recharts-tooltip-item-value"},l),De.createElement("span",{className:"recharts-tooltip-item-unit"},e.unit||""))});return De.createElement("ul",{className:"recharts-tooltip-item-list",style:{padding:0,margin:0}},e)}return null})())},UM="recharts-tooltip-wrapper",OM={visibility:"hidden"};function IM(e){var{coordinate:t,translateX:r,translateY:n}=e;return yh(UM,{["".concat(UM,"-right")]:Lj(r)&&t&&Lj(t.x)&&r>=t.x,["".concat(UM,"-left")]:Lj(r)&&t&&Lj(t.x)&&r<t.x,["".concat(UM,"-bottom")]:Lj(n)&&t&&Lj(t.y)&&n>=t.y,["".concat(UM,"-top")]:Lj(n)&&t&&Lj(t.y)&&n<t.y})}function TM(e){var{allowEscapeViewBox:t,coordinate:r,key:n,offset:i,position:a,reverseDirection:o,tooltipDimension:s,viewBox:A,viewBoxDimension:l}=e;if(a&&Lj(a[n]))return a[n];var c=r[n]-s-(i>0?i:0),u=r[n]+i;if(t[n])return o[n]?c:u;var d=A[n];return null==d?0:o[n]?c<d?Math.max(u,d):Math.max(c,d):null==l?0:u+s>d+l?Math.max(c,d):Math.max(u,d)}function PM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function MM(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?PM(Object(r),!0).forEach(function(t){DM(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):PM(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function DM(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class LM extends Te.PureComponent{constructor(){super(...arguments),DM(this,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),DM(this,"handleKeyDown",e=>{var t,r,n,i;"Escape"===e.key&&this.setState({dismissed:!0,dismissedAtCoordinate:{x:null!==(t=null===(r=this.props.coordinate)||void 0===r?void 0:r.x)&&void 0!==t?t:0,y:null!==(n=null===(i=this.props.coordinate)||void 0===i?void 0:i.y)&&void 0!==n?n:0}})})}componentDidMount(){document.addEventListener("keydown",this.handleKeyDown)}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDown)}componentDidUpdate(){var e,t;this.state.dismissed&&((null===(e=this.props.coordinate)||void 0===e?void 0:e.x)===this.state.dismissedAtCoordinate.x&&(null===(t=this.props.coordinate)||void 0===t?void 0:t.y)===this.state.dismissedAtCoordinate.y||(this.state.dismissed=!1))}render(){var{active:e,allowEscapeViewBox:t,animationDuration:r,animationEasing:n,children:i,coordinate:a,hasPayload:o,isAnimationActive:s,offset:A,position:l,reverseDirection:c,useTranslate3d:u,viewBox:d,wrapperStyle:h,lastBoundingBox:p,innerRef:f,hasPortalFromProps:m}=this.props,g="number"==typeof A?A:A.x,y="number"==typeof A?A:A.y,{cssClasses:v,cssProperties:x}=function(e){var t,r,n,{allowEscapeViewBox:i,coordinate:a,offsetTop:o,offsetLeft:s,position:A,reverseDirection:l,tooltipBox:c,useTranslate3d:u,viewBox:d}=e;return t=c.height>0&&c.width>0&&a?function(e){var{translateX:t,translateY:r,useTranslate3d:n}=e;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}({translateX:r=TM({allowEscapeViewBox:i,coordinate:a,key:"x",offset:s,position:A,reverseDirection:l,tooltipDimension:c.width,viewBox:d,viewBoxDimension:d.width}),translateY:n=TM({allowEscapeViewBox:i,coordinate:a,key:"y",offset:o,position:A,reverseDirection:l,tooltipDimension:c.height,viewBox:d,viewBoxDimension:d.height}),useTranslate3d:u}):OM,{cssProperties:t,cssClasses:IM({translateX:r,translateY:n,coordinate:a})}}({allowEscapeViewBox:t,coordinate:a,offsetLeft:g,offsetTop:y,position:l,reverseDirection:c,tooltipBox:{height:p.height,width:p.width},useTranslate3d:u,viewBox:d}),w=m?{}:MM(MM({transition:s&&e?"transform ".concat(r,"ms ").concat(n):void 0},x),{},{pointerEvents:"none",visibility:!this.state.dismissed&&e&&o?"visible":"hidden",position:"absolute",top:0,left:0}),b=MM(MM({},w),{},{visibility:!this.state.dismissed&&e&&o?"visible":"hidden"},h);return De.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:v,style:b,ref:f},i)}}var HM=()=>{var e;return null===(e=vN(e=>e.rootProps.accessibilityLayer))||void 0===e||e};function _M(){return _M=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_M.apply(null,arguments)}function RM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function KM(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?RM(Object(r),!0).forEach(function(t){zM(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):RM(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function zM(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var VM={curveBasisClosed:function(e){return new qS(e)},curveBasisOpen:function(e){return new YS(e)},curveBasis:function(e){return new GS(e)},curveBumpX:function(e){return new jS(e,!0)},curveBumpY:function(e){return new jS(e,!1)},curveLinearClosed:function(e){return new XS(e)},curveLinear:BS,curveMonotoneX:function(e){return new rj(e)},curveMonotoneY:function(e){return new nj(e)},curveNatural:function(e){return new aj(e)},curveStep:function(e){return new sj(e,.5)},curveStepAfter:function(e){return new sj(e,1)},curveStepBefore:function(e){return new sj(e,0)}},$M=e=>WI(e.x)&&WI(e.y),WM=e=>null!=e.base&&$M(e.base)&&$M(e),GM=e=>e.x,qM=e=>e.y,YM={connectNulls:!1,type:"linear"},XM=e=>{var{type:t=YM.type,points:r=[],baseLine:n,layout:i,connectNulls:a=YM.connectNulls}=e,o=((e,t)=>{if("function"==typeof e)return e;var r="curve".concat(Gj(e));if(("curveMonotone"===r||"curveBump"===r)&&t){var n=VM["".concat(r).concat("vertical"===t?"Y":"X")];if(n)return n}return VM[r]||BS})(t,i),s=a?r.filter($M):r;if(Array.isArray(n)){var A=r.map((e,t)=>KM(KM({},e),{},{base:n[t]}));return("vertical"===i?SS().y(qM).x1(GM).x0(e=>e.base.x):SS().x(GM).y1(qM).y0(e=>e.base.y)).defined(WM).curve(o)(a?A.filter(WM):A)}return("vertical"===i&&Lj(n)?SS().y(qM).x1(GM).x0(n):Lj(n)?SS().x(GM).y1(qM).y0(n):kS().x(GM).y(qM)).defined($M).curve(o)(s)},JM=e=>{var{className:t,points:r,path:n,pathRef:i}=e,a=hP();if(!(r&&r.length||n))return null;var o={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||a,connectNulls:e.connectNulls},s=r&&r.length?XM(o):n;return De.createElement("path",_M({},Jk(e),oF(e),{className:yh("recharts-curve",t),d:null===s?void 0:s,ref:i}))},ZM=["x","y","top","left","width","height","className"];function eD(){return eD=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},eD.apply(null,arguments)}function tD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function rD(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var nD=(e,t,r,n,i,a)=>"M".concat(e,",").concat(i,"v").concat(n,"M").concat(a,",").concat(t,"h").concat(r),iD=e=>{var{x:t=0,y:r=0,top:n=0,left:i=0,width:a=0,height:o=0,className:s}=e,A=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,ZM),l=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?tD(Object(r),!0).forEach(function(t){rD(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tD(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({x:t,y:r,top:n,left:i,width:a,height:o},A);return Lj(t)&&Lj(r)&&Lj(a)&&Lj(o)&&Lj(n)&&Lj(i)?De.createElement("path",eD({},eS(l),{className:yh("recharts-cross",s),d:nD(t,r,a,o,n,i)})):null};function aD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function oD(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?aD(Object(r),!0).forEach(function(t){sD(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):aD(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function sD(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var AD=(e,t,r)=>e.map(e=>{return"".concat((n=e,n.replace(/([A-Z])/g,e=>"-".concat(e.toLowerCase())))," ").concat(t,"ms ").concat(r);var n}).join(","),lD=(e,t)=>Object.keys(t).reduce((r,n)=>oD(oD({},r),{},{[n]:e(n,t[n])}),{});function cD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function uD(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?cD(Object(r),!0).forEach(function(t){dD(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cD(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function dD(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var hD=(e,t,r)=>e+(t-e)*r,pD=e=>{var{from:t,to:r}=e;return t!==r},fD=(e,t,r)=>{var n=lD((t,r)=>{if(pD(r)){var[n,i]=e(r.from,r.to,r.velocity);return uD(uD({},r),{},{from:n,velocity:i})}return r},t);return r<1?lD((e,t)=>pD(t)&&null!=n[e]?uD(uD({},t),{},{velocity:hD(t.velocity,n[e].velocity,r),from:hD(t.from,n[e].from,r)}):t,t):fD(e,n,r-1)};function mD(e,t,r,n,i,a){var o,s=n.reduce((r,n)=>uD(uD({},r),{},{[n]:{from:e[n],velocity:0,to:t[n]}}),{}),A=null,l=n=>{o||(o=n);var c=(n-o)/r.dt;s=fD(r,s,c),i(uD(uD(uD({},e),t),lD((e,t)=>t.from,s))),o=n,Object.values(s).filter(pD).length&&(A=a.setTimeout(l))};return()=>(A=a.setTimeout(l),()=>{var e;null===(e=A)||void 0===e||e()})}const gD=(e,t,r,n,i,a)=>{var o,s,A=(o=e,s=t,[Object.keys(o),Object.keys(s)].reduce((e,t)=>e.filter(e=>t.includes(e))));return null==r?()=>(i(uD(uD({},e),t)),()=>{}):!0===r.isStepper?mD(e,t,r,A,i,a):function(e,t,r,n,i,a,o){var s,A=null,l=i.reduce((r,n)=>{var i=e[n],a=t[n];return null==i||null==a?r:uD(uD({},r),{},{[n]:[i,a]})},{}),c=i=>{s||(s=i);var u=(i-s)/n,d=lD((e,t)=>hD(...t,r(u)),l);if(a(uD(uD(uD({},e),t),d)),u<1)A=o.setTimeout(c);else{var h=lD((e,t)=>hD(...t,r(1)),l);a(uD(uD(uD({},e),t),h))}};return()=>(A=o.setTimeout(c),()=>{var e;null===(e=A)||void 0===e||e()})}(e,t,r,n,A,i,a)};var yD=1e-4,vD=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],xD=(e,t)=>e.map((e,r)=>e*t**r).reduce((e,t)=>e+t),wD=(e,t)=>r=>{var n=vD(e,t);return xD(n,r)},bD=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];if(1===t.length)switch(t[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:var n=(e=>{var t,r=e.split("(");if(2!==r.length||"cubic-bezier"!==r[0])return null;var n=null===(t=r[1])||void 0===t||null===(t=t.split(")")[0])||void 0===t?void 0:t.split(",");if(null==n||4!==n.length)return null;var i=n.map(e=>parseFloat(e));return[i[0],i[1],i[2],i[3]]})(t[0]);if(n)return n}return 4===t.length?t:[0,0,1,1]},BD=(e,t,r,n)=>{var i,a,o=wD(e,r),s=wD(t,n),A=(i=e,a=r,e=>{var t=[...vD(i,a).map((e,t)=>e*t).slice(1),0];return xD(t,e)}),l=e=>e>1?1:e<0?0:e,c=e=>{for(var t=e>1?1:e,r=t,n=0;n<8;++n){var i=o(r)-t,a=A(r);if(Math.abs(i-t)<yD||a<yD)return s(r);r=l(r-i/a)}return s(r)};return c.isStepper=!1,c},CD=function(){return BD(...bD(...arguments))},ED=e=>{if("string"==typeof e)switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return CD(e);case"spring":return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{stiff:t=100,damping:r=8,dt:n=17}=e,i=(e,i,a)=>{var o=a+(-(e-i)*t-a*r)*n/1e3,s=a*n/1e3+e;return Math.abs(s-i)<yD&&Math.abs(o)<yD?[i,0]:[s,o]};return i.isStepper=!0,i.dt=n,i}();default:if("cubic-bezier"===e.split("(")[0])return CD(e)}return"function"==typeof e?e:null};class kD{setTimeout(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=performance.now(),n=null,i=a=>{a-r>=t?e(a):"function"==typeof requestAnimationFrame&&(n=requestAnimationFrame(i))};return n=requestAnimationFrame(i),()=>{null!=n&&cancelAnimationFrame(n)}}}function SD(){return e=new kD,t=()=>null,r=!1,n=null,i=a=>{if(!r){if(Array.isArray(a)){if(!a.length)return;var o=a,[s,...A]=o;return"number"==typeof s?void(n=e.setTimeout(i.bind(null,A),s)):(i(s),void(n=e.setTimeout(i.bind(null,A))))}"string"==typeof a&&t(a),"object"==typeof a&&t(a),"function"==typeof a&&a()}},{stop:()=>{r=!0},start:e=>{r=!1,n&&(n(),n=null),i(e)},subscribe:e=>(t=e,()=>{t=()=>null}),getTimeoutController:()=>e};var e,t,r,n,i}var jD=Te.createContext(SD);var FD=!("undefined"!=typeof window&&window.document&&Boolean(window.document.createElement)&&window.setTimeout),QD={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},ND={t:0},UD={t:1};function OD(e){var t,r,n,i=cF(e,QD),{isActive:a,canBegin:o,duration:s,easing:A,begin:l,onAnimationEnd:c,onAnimationStart:u,children:d}=i,h="auto"===a?!FD:a,p=(t=i.animationId,r=i.animationManager,n=Te.useContext(jD),Te.useMemo(()=>null!=r?r:n(t),[t,r,n])),[f,m]=Te.useState(h?ND:UD),g=Te.useRef(null);return Te.useEffect(()=>{h||m(UD)},[h]),Te.useEffect(()=>{if(!h||!o)return Yj;var e=gD(ND,UD,ED(A),s,m,p.getTimeoutController());return p.start([u,l,()=>{g.current=e()},s,c]),()=>{p.stop(),g.current&&g.current(),c()}},[h,o,s,A,l,u,c,p]),d(f.t)}function ID(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"animation-",r=Te.useRef(Rj(t)),n=Te.useRef(e);return n.current!==e&&(r.current=Rj(t),n.current=e),r.current}var TD,PD,MD,DD,LD,HD,_D,RD,KD,zD,VD=["radius"],$D=["radius"];function WD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function GD(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?WD(Object(r),!0).forEach(function(t){qD(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):WD(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function qD(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function YD(){return YD=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},YD.apply(null,arguments)}function XD(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function JD(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var ZD=(e,t,r,n,i)=>{var a,o=Ij(r),s=Ij(n),A=Math.min(Math.abs(o)/2,Math.abs(s)/2),l=s>=0?1:-1,c=o>=0?1:-1,u=s>=0&&o>=0||s<0&&o<0?1:0;if(A>0&&Array.isArray(i)){for(var d=[0,0,0,0],h=0;h<4;h++){var p,f=null!==(p=i[h])&&void 0!==p?p:0;d[h]=f>A?A:f}a=Tj(TD||(TD=JD(["M",",",""])),e,t+l*d[0]),d[0]>0&&(a+=Tj(PD||(PD=JD(["A ",",",",0,0,",",",",",""])),d[0],d[0],u,e+c*d[0],t)),a+=Tj(MD||(MD=JD(["L ",",",""])),e+r-c*d[1],t),d[1]>0&&(a+=Tj(DD||(DD=JD(["A ",",",",0,0,",",\n ",",",""])),d[1],d[1],u,e+r,t+l*d[1])),a+=Tj(LD||(LD=JD(["L ",",",""])),e+r,t+n-l*d[2]),d[2]>0&&(a+=Tj(HD||(HD=JD(["A ",",",",0,0,",",\n ",",",""])),d[2],d[2],u,e+r-c*d[2],t+n)),a+=Tj(_D||(_D=JD(["L ",",",""])),e+c*d[3],t+n),d[3]>0&&(a+=Tj(RD||(RD=JD(["A ",",",",0,0,",",\n ",",",""])),d[3],d[3],u,e,t+n-l*d[3])),a+="Z"}else if(A>0&&i===+i&&i>0){var m=Math.min(A,i);a=Tj(KD||(KD=JD(["M ",",","\n A ",",",",0,0,",",",",","\n L ",",","\n A ",",",",0,0,",",",",","\n L ",",","\n A ",",",",0,0,",",",",","\n L ",",","\n A ",",",",0,0,",",",","," Z"])),e,t+l*m,m,m,u,e+c*m,t,e+r-c*m,t,m,m,u,e+r,t+l*m,e+r,t+n-l*m,m,m,u,e+r-c*m,t+n,e+c*m,t+n,m,m,u,e,t+n-l*m)}else a=Tj(zD||(zD=JD(["M ",","," h "," v "," h "," Z"])),e,t,r,n,-r);return a},eL={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},tL=e=>{var t=cF(e,eL),r=Te.useRef(null),[n,i]=Te.useState(-1);Te.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var e=r.current.getTotalLength();e&&i(e)}catch(t){}},[]);var{x:a,y:o,width:s,height:A,radius:l,className:c}=t,{animationEasing:u,animationDuration:d,animationBegin:h,isAnimationActive:p,isUpdateAnimationActive:f}=t,m=Te.useRef(s),g=Te.useRef(A),y=Te.useRef(a),v=Te.useRef(o),x=ID(Te.useMemo(()=>({x:a,y:o,width:s,height:A,radius:l}),[a,o,s,A,l]),"rectangle-");if(a!==+a||o!==+o||s!==+s||A!==+A||0===s||0===A)return null;var w=yh("recharts-rectangle",c);if(!f){var b=eS(t),{radius:B}=b,C=XD(b,VD);return De.createElement("path",YD({},C,{x:Ij(a),y:Ij(o),width:Ij(s),height:Ij(A),radius:"number"==typeof l?l:void 0,className:w,d:ZD(a,o,s,A,l)}))}var E=m.current,k=g.current,S=y.current,j=v.current,F="0px ".concat(-1===n?1:n,"px"),Q="".concat(n,"px 0px"),N=AD(["strokeDasharray"],d,"string"==typeof u?u:eL.animationEasing);return De.createElement(OD,{animationId:x,key:x,canBegin:n>0,duration:d,easing:u,isActive:f,begin:h},e=>{var n,i=Vj(E,s,e),c=Vj(k,A,e),u=Vj(S,a,e),d=Vj(j,o,e);r.current&&(m.current=i,g.current=c,y.current=u,v.current=d),n=p?e>0?{transition:N,strokeDasharray:Q}:{strokeDasharray:F}:{strokeDasharray:Q};var h=eS(t),{radius:f}=h,x=XD(h,$D);return De.createElement("path",YD({},x,{radius:"number"==typeof l?l:void 0,className:w,d:ZD(u,d,i,c,l),ref:r,style:GD(GD({},n),t.style)}))})};function rL(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function nL(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?rL(Object(r),!0).forEach(function(t){iL(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rL(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function iL(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var aL,oL,sL,AL,lL,cL,uL,dL=Math.PI/180,hL=e=>180*e/Math.PI,pL=(e,t,r,n)=>({x:e+Math.cos(-dL*n)*r,y:t+Math.sin(-dL*n)*r}),fL=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(e-(r.left||0)-(r.right||0)),Math.abs(t-(r.top||0)-(r.bottom||0)))/2},mL=(e,t)=>{var{x:r,y:n}=e,{cx:i,cy:a}=t,o=((e,t)=>{var{x:r,y:n}=e,{x:i,y:a}=t;return Math.sqrt((r-i)**2+(n-a)**2)})({x:r,y:n},{x:i,y:a});if(o<=0)return{radius:o,angle:0};var s=(r-i)/o,A=Math.acos(s);return n>a&&(A=2*Math.PI-A),{radius:o,angle:hL(A),angleInRadian:A}},gL=(e,t)=>{var{startAngle:r,endAngle:n}=t,i=Math.floor(r/360),a=Math.floor(n/360);return e+360*Math.min(i,a)},yL=(e,t)=>{var{chartX:r,chartY:n}=e,{radius:i,angle:a}=mL({x:r,y:n},t),{innerRadius:o,outerRadius:s}=t;if(i<o||i>s)return null;if(0===i)return null;var A,{startAngle:l,endAngle:c}=(e=>{var{startAngle:t,endAngle:r}=e,n=Math.floor(t/360),i=Math.floor(r/360),a=Math.min(n,i);return{startAngle:t-360*a,endAngle:r-360*a}})(t),u=a;if(l<=c){for(;u>c;)u-=360;for(;u<l;)u+=360;A=u>=l&&u<=c}else{for(;u>l;)u-=360;for(;u<c;)u+=360;A=u>=c&&u<=l}return A?nL(nL({},t),{},{radius:i,angle:gL(u,t)}):null};function vL(e){var{cx:t,cy:r,radius:n,startAngle:i,endAngle:a}=e;return{points:[pL(t,r,n,i),pL(t,r,n,a)],cx:t,cy:r,radius:n,startAngle:i,endAngle:a}}function xL(){return xL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},xL.apply(null,arguments)}function wL(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var bL=e=>{var{cx:t,cy:r,radius:n,angle:i,sign:a,isExternal:o,cornerRadius:s,cornerIsExternal:A}=e,l=s*(o?1:-1)+n,c=Math.asin(s/l)/dL,u=A?i:i+a*c,d=A?i-a*c:i;return{center:pL(t,r,l,u),circleTangency:pL(t,r,n,u),lineTangency:pL(t,r,l*Math.cos(c*dL),d),theta:c}},BL=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:a,endAngle:o}=e,s=((e,t)=>Pj(t-e)*Math.min(Math.abs(t-e),359.999))(a,o),A=a+s,l=pL(t,r,i,a),c=pL(t,r,i,A),u=Tj(aL||(aL=wL(["M ",",","\n A ",",",",0,\n ",",",",\n ",",","\n "])),l.x,l.y,i,i,+(Math.abs(s)>180),+(a>A),c.x,c.y);if(n>0){var d=pL(t,r,n,a),h=pL(t,r,n,A);u+=Tj(oL||(oL=wL(["L ",",","\n A ",",",",0,\n ",",",",\n ",","," Z"])),h.x,h.y,n,n,+(Math.abs(s)>180),+(a<=A),d.x,d.y)}else u+=Tj(sL||(sL=wL(["L ",","," Z"])),t,r);return u},CL={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},EL=e=>{var t=cF(e,CL),{cx:r,cy:n,innerRadius:i,outerRadius:a,cornerRadius:o,forceCornerRadius:s,cornerIsExternal:A,startAngle:l,endAngle:c,className:u}=t;if(a<i||l===c)return null;var d,h=yh("recharts-sector",u),p=a-i,f=Kj(o,p,0,!0);return d=f>0&&Math.abs(l-c)<360?(e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:i,cornerRadius:a,forceCornerRadius:o,cornerIsExternal:s,startAngle:A,endAngle:l}=e,c=Pj(l-A),{circleTangency:u,lineTangency:d,theta:h}=bL({cx:t,cy:r,radius:i,angle:A,sign:c,cornerRadius:a,cornerIsExternal:s}),{circleTangency:p,lineTangency:f,theta:m}=bL({cx:t,cy:r,radius:i,angle:l,sign:-c,cornerRadius:a,cornerIsExternal:s}),g=s?Math.abs(A-l):Math.abs(A-l)-h-m;if(g<0)return o?Tj(AL||(AL=wL(["M ",",","\n a",",",",0,0,1,",",0\n a",",",",0,0,1,",",0\n "])),d.x,d.y,a,a,2*a,a,a,2*-a):BL({cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:A,endAngle:l});var y=Tj(lL||(lL=wL(["M ",",","\n A",",",",0,0,",",",",","\n A",",",",0,",",",",",",","\n A",",",",0,0,",",",",","\n "])),d.x,d.y,a,a,+(c<0),u.x,u.y,i,i,+(g>180),+(c<0),p.x,p.y,a,a,+(c<0),f.x,f.y);if(n>0){var{circleTangency:v,lineTangency:x,theta:w}=bL({cx:t,cy:r,radius:n,angle:A,sign:c,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),{circleTangency:b,lineTangency:B,theta:C}=bL({cx:t,cy:r,radius:n,angle:l,sign:-c,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),E=s?Math.abs(A-l):Math.abs(A-l)-w-C;if(E<0&&0===a)return"".concat(y,"L").concat(t,",").concat(r,"Z");y+=Tj(cL||(cL=wL(["L",",","\n A",",",",0,0,",",",",","\n A",",",",0,",",",",",",","\n A",",",",0,0,",",",",","Z"])),B.x,B.y,a,a,+(c<0),b.x,b.y,n,n,+(E>180),+(c>0),v.x,v.y,a,a,+(c<0),x.x,x.y)}else y+=Tj(uL||(uL=wL(["L",",","Z"])),t,r);return y})({cx:r,cy:n,innerRadius:i,outerRadius:a,cornerRadius:Math.min(f,p/2),forceCornerRadius:s,cornerIsExternal:A,startAngle:l,endAngle:c}):BL({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:l,endAngle:c}),De.createElement("path",xL({},eS(t),{className:h,d:d}))};function kL(e,t,r){if("horizontal"===e)return[{x:t.x,y:r.top},{x:t.x,y:r.top+r.height}];if("vertical"===e)return[{x:r.left,y:t.y},{x:r.left+r.width,y:t.y}];if(aF(t)){if("centric"===e){var{cx:n,cy:i,innerRadius:a,outerRadius:o,angle:s}=t,A=pL(n,i,a,s),l=pL(n,i,o,s);return[{x:A.x,y:A.y},{x:l.x,y:l.y}]}return vL(t)}}var SL,jL,FL,QL,NL,UL={},OL={},IL={};function TL(){return SL||(SL=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=RN();e.toNumber=function(e){return t.isSymbol(e)?NaN:Number(e)}}(IL)),IL}function PL(){return jL||(jL=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=TL();e.toFinite=function(e){if(!e)return 0===e?e:0;if((e=t.toNumber(e))===1/0||e===-1/0){return(e<0?-1:1)*Number.MAX_VALUE}return e==e?e:0}}(OL)),OL}function ML(){return NL?QL:(NL=1,QL=(FL||(FL=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ZN(),r=PL();e.range=function(e,n,i){i&&"number"!=typeof i&&t.isIterateeCall(e,n,i)&&(n=i=void 0),e=r.toFinite(e),void 0===n?(n=e,e=0):n=r.toFinite(n),i=void 0===i?e<n?1:-1:r.toFinite(i);const a=Math.max(Math.ceil((n-e)/(i||1)),0),o=new Array(a);for(let t=0;t<a;t++)o[t]=e,e+=i;return o}}(UL)),UL).range)}const DL=ay(ML());function LL(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function HL(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function _L(e){let t,r,n;function i(e,n,i=0,a=e.length){if(i<a){if(0!==t(n,n))return a;do{const t=i+a>>>1;r(e[t],n)<0?i=t+1:a=t}while(i<a)}return i}return 2!==e.length?(t=LL,r=(t,r)=>LL(e(t),r),n=(t,r)=>e(t)-r):(t=e===LL||e===HL?e:RL,r=e,n=e),{left:i,center:function(e,t,r=0,a=e.length){const o=i(e,t,r,a-1);return o>r&&n(e[o-1],t)>-n(e[o],t)?o-1:o},right:function(e,n,i=0,a=e.length){if(i<a){if(0!==t(n,n))return a;do{const t=i+a>>>1;r(e[t],n)<=0?i=t+1:a=t}while(i<a)}return i}}}function RL(){return 0}function KL(e){return null===e?NaN:+e}const zL=_L(LL).right;_L(KL).center;class VL extends Map{constructor(e,t=WL){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[r,n]of e)this.set(r,n)}get(e){return super.get($L(this,e))}has(e){return super.has($L(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},r){const n=t(r);e.has(n)&&(r=e.get(n),e.delete(n));return r}(this,e))}}function $L({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function WL(e){return null!==e&&"object"==typeof e?e.valueOf():e}function GL(e,t){return(null==e||!(e>=e))-(null==t||!(t>=t))||(e<t?-1:e>t?1:0)}const qL=Math.sqrt(50),YL=Math.sqrt(10),XL=Math.sqrt(2);function JL(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),o=a>=qL?10:a>=YL?5:a>=XL?2:1;let s,A,l;return i<0?(l=Math.pow(10,-i)/o,s=Math.round(e*l),A=Math.round(t*l),s/l<e&&++s,A/l>t&&--A,l=-l):(l=Math.pow(10,i)*o,s=Math.round(e/l),A=Math.round(t/l),s*l<e&&++s,A*l>t&&--A),A<s&&.5<=r&&r<2?JL(e,t,2*r):[s,A,l]}function ZL(e,t,r){if(!((r=+r)>0))return[];if((e=+e)===(t=+t))return[e];const n=t<e,[i,a,o]=n?JL(t,e,r):JL(e,t,r);if(!(a>=i))return[];const s=a-i+1,A=new Array(s);if(n)if(o<0)for(let l=0;l<s;++l)A[l]=(a-l)/-o;else for(let l=0;l<s;++l)A[l]=(a-l)*o;else if(o<0)for(let l=0;l<s;++l)A[l]=(i+l)/-o;else for(let l=0;l<s;++l)A[l]=(i+l)*o;return A}function eH(e,t,r){return JL(e=+e,t=+t,r=+r)[2]}function tH(e,t,r){r=+r;const n=(t=+t)<(e=+e),i=n?eH(t,e,r):eH(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function rH(e,t){let r;for(const n of e)null!=n&&(r<n||void 0===r&&n>=n)&&(r=n);return r}function nH(e,t){let r;for(const n of e)null!=n&&(r>n||void 0===r&&n>=n)&&(r=n);return r}function iH(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=void 0===i?GL:function(e=LL){if(e===LL)return GL;if("function"!=typeof e)throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||0===n?n:(0===e(r,r))-(0===e(t,t))}}(i);n>r;){if(n-r>600){const a=n-r+1,o=t-r+1,s=Math.log(a),A=.5*Math.exp(2*s/3),l=.5*Math.sqrt(s*A*(a-A)/a)*(o-a/2<0?-1:1);iH(e,t,Math.max(r,Math.floor(t-o*A/a+l)),Math.min(n,Math.floor(t+(a-o)*A/a+l)),i)}const a=e[t];let o=r,s=n;for(aH(e,r,t),i(e[n],a)>0&&aH(e,r,n);o<s;){for(aH(e,o,s),++o,--s;i(e[o],a)<0;)++o;for(;i(e[s],a)>0;)--s}0===i(e[r],a)?aH(e,r,s):(++s,aH(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function aH(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function oH(e,t,r=KL){if((n=e.length)&&!isNaN(t=+t)){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),o=+r(e[a],a,e);return o+(+r(e[a+1],a+1,e)-o)*(i-a)}}function sH(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function AH(e,t){switch(arguments.length){case 0:break;case 1:"function"==typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"==typeof t?this.interpolator(t):this.range(t)}return this}const lH=Symbol("implicit");function cH(){var e=new VL,t=[],r=[],n=lH;function i(i){let a=e.get(i);if(void 0===a){if(n!==lH)return n;e.set(i,a=t.push(i)-1)}return r[a%r.length]}return i.domain=function(r){if(!arguments.length)return t.slice();t=[],e=new VL;for(const n of r)e.has(n)||e.set(n,t.push(n)-1);return i},i.range=function(e){return arguments.length?(r=Array.from(e),i):r.slice()},i.unknown=function(e){return arguments.length?(n=e,i):n},i.copy=function(){return cH(t,r).unknown(n)},sH.apply(i,arguments),i}function uH(){var e,t,r=cH().unknown(void 0),n=r.domain,i=r.range,a=0,o=1,s=!1,A=0,l=0,c=.5;function u(){var r=n().length,u=o<a,d=u?o:a,h=u?a:o;e=(h-d)/Math.max(1,r-A+2*l),s&&(e=Math.floor(e)),d+=(h-d-e*(r-A))*c,t=e*(1-A),s&&(d=Math.round(d),t=Math.round(t));var p=function(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=0|Math.max(0,Math.ceil((t-e)/r)),a=new Array(i);++n<i;)a[n]=e+n*r;return a}(r).map(function(t){return d+e*t});return i(u?p.reverse():p)}return delete r.unknown,r.domain=function(e){return arguments.length?(n(e),u()):n()},r.range=function(e){return arguments.length?([a,o]=e,a=+a,o=+o,u()):[a,o]},r.rangeRound=function(e){return[a,o]=e,a=+a,o=+o,s=!0,u()},r.bandwidth=function(){return t},r.step=function(){return e},r.round=function(e){return arguments.length?(s=!!e,u()):s},r.padding=function(e){return arguments.length?(A=Math.min(1,l=+e),u()):A},r.paddingInner=function(e){return arguments.length?(A=Math.min(1,e),u()):A},r.paddingOuter=function(e){return arguments.length?(l=+e,u()):l},r.align=function(e){return arguments.length?(c=Math.max(0,Math.min(1,e)),u()):c},r.copy=function(){return uH(n(),[a,o]).round(s).paddingInner(A).paddingOuter(l).align(c)},sH.apply(u(),arguments)}function dH(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return dH(t())},e}function hH(){return dH(uH.apply(null,arguments).paddingInner(1))}function pH(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function fH(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function mH(){}var gH=.7,yH=1/gH,vH="\\s*([+-]?\\d+)\\s*",xH="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",wH="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",bH=/^#([0-9a-f]{3,8})$/,BH=new RegExp(`^rgb\\(${vH},${vH},${vH}\\)$`),CH=new RegExp(`^rgb\\(${wH},${wH},${wH}\\)$`),EH=new RegExp(`^rgba\\(${vH},${vH},${vH},${xH}\\)$`),kH=new RegExp(`^rgba\\(${wH},${wH},${wH},${xH}\\)$`),SH=new RegExp(`^hsl\\(${xH},${wH},${wH}\\)$`),jH=new RegExp(`^hsla\\(${xH},${wH},${wH},${xH}\\)$`),FH={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function QH(){return this.rgb().formatHex()}function NH(){return this.rgb().formatRgb()}function UH(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=bH.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?OH(t):3===r?new PH(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?IH(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?IH(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=BH.exec(e))?new PH(t[1],t[2],t[3],1):(t=CH.exec(e))?new PH(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=EH.exec(e))?IH(t[1],t[2],t[3],t[4]):(t=kH.exec(e))?IH(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=SH.exec(e))?RH(t[1],t[2]/100,t[3]/100,1):(t=jH.exec(e))?RH(t[1],t[2]/100,t[3]/100,t[4]):FH.hasOwnProperty(e)?OH(FH[e]):"transparent"===e?new PH(NaN,NaN,NaN,0):null}function OH(e){return new PH(e>>16&255,e>>8&255,255&e,1)}function IH(e,t,r,n){return n<=0&&(e=t=r=NaN),new PH(e,t,r,n)}function TH(e,t,r,n){return 1===arguments.length?((i=e)instanceof mH||(i=UH(i)),i?new PH((i=i.rgb()).r,i.g,i.b,i.opacity):new PH):new PH(e,t,r,null==n?1:n);var i}function PH(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function MH(){return`#${_H(this.r)}${_H(this.g)}${_H(this.b)}`}function DH(){const e=LH(this.opacity);return`${1===e?"rgb(":"rgba("}${HH(this.r)}, ${HH(this.g)}, ${HH(this.b)}${1===e?")":`, ${e})`}`}function LH(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function HH(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function _H(e){return((e=HH(e))<16?"0":"")+e.toString(16)}function RH(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new zH(e,t,r,n)}function KH(e){if(e instanceof zH)return new zH(e.h,e.s,e.l,e.opacity);if(e instanceof mH||(e=UH(e)),!e)return new zH;if(e instanceof zH)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=NaN,s=a-i,A=(a+i)/2;return s?(o=t===a?(r-n)/s+6*(r<n):r===a?(n-t)/s+2:(t-r)/s+4,s/=A<.5?a+i:2-a-i,o*=60):s=A>0&&A<1?0:o,new zH(o,s,A,e.opacity)}function zH(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function VH(e){return(e=(e||0)%360)<0?e+360:e}function $H(e){return Math.max(0,Math.min(1,e||0))}function WH(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}pH(mH,UH,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:QH,formatHex:QH,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return KH(this).formatHsl()},formatRgb:NH,toString:NH}),pH(PH,TH,fH(mH,{brighter(e){return e=null==e?yH:Math.pow(yH,e),new PH(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?gH:Math.pow(gH,e),new PH(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new PH(HH(this.r),HH(this.g),HH(this.b),LH(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:MH,formatHex:MH,formatHex8:function(){return`#${_H(this.r)}${_H(this.g)}${_H(this.b)}${_H(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:DH,toString:DH})),pH(zH,function(e,t,r,n){return 1===arguments.length?KH(e):new zH(e,t,r,null==n?1:n)},fH(mH,{brighter(e){return e=null==e?yH:Math.pow(yH,e),new zH(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?gH:Math.pow(gH,e),new zH(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new PH(WH(e>=240?e-240:e+120,i,n),WH(e,i,n),WH(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new zH(VH(this.h),$H(this.s),$H(this.l),LH(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=LH(this.opacity);return`${1===e?"hsl(":"hsla("}${VH(this.h)}, ${100*$H(this.s)}%, ${100*$H(this.l)}%${1===e?")":`, ${e})`}`}}));const GH=e=>()=>e;function qH(e){return 1===(e=+e)?YH:function(t,r){return r-t?function(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}(t,r,e):GH(isNaN(t)?r:t)}}function YH(e,t){var r=t-e;return r?function(e,t){return function(r){return e+r*t}}(e,r):GH(isNaN(e)?t:e)}const XH=function e(t){var r=qH(t);function n(e,t){var n=r((e=TH(e)).r,(t=TH(t)).r),i=r(e.g,t.g),a=r(e.b,t.b),o=YH(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+""}}return n.gamma=e,n}(1);function JH(e,t){t||(t=[]);var r,n=e?Math.min(t.length,e.length):0,i=t.slice();return function(a){for(r=0;r<n;++r)i[r]=e[r]*(1-a)+t[r]*a;return i}}function ZH(e,t){var r,n=t?t.length:0,i=e?Math.min(n,e.length):0,a=new Array(i),o=new Array(n);for(r=0;r<i;++r)a[r]=o_(e[r],t[r]);for(;r<n;++r)o[r]=t[r];return function(e){for(r=0;r<i;++r)o[r]=a[r](e);return o}}function e_(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function t_(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function r_(e,t){var r,n={},i={};for(r in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)r in e?n[r]=o_(e[r],t[r]):i[r]=t[r];return function(e){for(r in n)i[r]=n[r](e);return i}}var n_=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,i_=new RegExp(n_.source,"g");function a_(e,t){var r,n,i,a=n_.lastIndex=i_.lastIndex=0,o=-1,s=[],A=[];for(e+="",t+="";(r=n_.exec(e))&&(n=i_.exec(t));)(i=n.index)>a&&(i=t.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,A.push({i:o,x:t_(r,n)})),a=i_.lastIndex;return a<t.length&&(i=t.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?A[0]?function(e){return function(t){return e(t)+""}}(A[0].x):function(e){return function(){return e}}(t):(t=A.length,function(e){for(var r,n=0;n<t;++n)s[(r=A[n]).i]=r.x(e);return s.join("")})}function o_(e,t){var r,n,i=typeof t;return null==t||"boolean"===i?GH(t):("number"===i?t_:"string"===i?(r=UH(t))?(t=r,XH):a_:t instanceof UH?XH:t instanceof Date?e_:(n=t,!ArrayBuffer.isView(n)||n instanceof DataView?Array.isArray(t)?ZH:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?r_:t_:JH))(e,t)}function s_(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function A_(e){return+e}var l_=[0,1];function c_(e){return e}function u_(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:(r=isNaN(t)?NaN:.5,function(){return r});var r}function d_(e,t,r){var n=e[0],i=e[1],a=t[0],o=t[1];return i<n?(n=u_(i,n),a=r(o,a)):(n=u_(n,i),a=r(a,o)),function(e){return a(n(e))}}function h_(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),a=new Array(n),o=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<n;)i[o]=u_(e[o],e[o+1]),a[o]=r(t[o],t[o+1]);return function(t){var r=zL(e,t,1,n)-1;return a[r](i[r](t))}}function p_(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function f_(){var e,t,r,n,i,a,o=l_,s=l_,A=o_,l=c_;function c(){var e,t,r,A=Math.min(o.length,s.length);return l!==c_&&(e=o[0],t=o[A-1],e>t&&(r=e,e=t,t=r),l=function(r){return Math.max(e,Math.min(t,r))}),n=A>2?h_:d_,i=a=null,u}function u(t){return null==t||isNaN(t=+t)?r:(i||(i=n(o.map(e),s,A)))(e(l(t)))}return u.invert=function(r){return l(t((a||(a=n(s,o.map(e),t_)))(r)))},u.domain=function(e){return arguments.length?(o=Array.from(e,A_),c()):o.slice()},u.range=function(e){return arguments.length?(s=Array.from(e),c()):s.slice()},u.rangeRound=function(e){return s=Array.from(e),A=s_,c()},u.clamp=function(e){return arguments.length?(l=!!e||c_,c()):l!==c_},u.interpolate=function(e){return arguments.length?(A=e,c()):A},u.unknown=function(e){return arguments.length?(r=e,u):r},function(r,n){return e=r,t=n,c()}}function m_(){return f_()(c_,c_)}function g_(e,t){if(!isFinite(e)||0===e)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function y_(e){return(e=g_(Math.abs(e)))?e[1]:NaN}var v_,x_=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function w_(e){if(!(t=x_.exec(e)))throw new Error("invalid format: "+e);var t;return new b_({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function b_(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function B_(e,t){var r=g_(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}w_.prototype=b_.prototype,b_.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const C_={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>B_(100*e,t),r:B_,s:function(e,t){var r=g_(e,t);if(!r)return v_=void 0,e.toPrecision(t);var n=r[0],i=r[1],a=i-(v_=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=n.length;return a===o?n:a>o?n+new Array(a-o+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+g_(e,Math.max(0,t+a-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function E_(e){return e}var k_,S_,j_,F_=Array.prototype.map,Q_=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function N_(e){var t,r,n=void 0===e.grouping||void 0===e.thousands?E_:(t=F_.call(e.grouping,Number),r=e.thousands+"",function(e,n){for(var i=e.length,a=[],o=0,s=t[0],A=0;i>0&&s>0&&(A+s+1>n&&(s=Math.max(1,n-A)),a.push(e.substring(i-=s,i+s)),!((A+=s+1)>n));)s=t[o=(o+1)%t.length];return a.reverse().join(r)}),i=void 0===e.currency?"":e.currency[0]+"",a=void 0===e.currency?"":e.currency[1]+"",o=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?E_:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(F_.call(e.numerals,String)),A=void 0===e.percent?"%":e.percent+"",l=void 0===e.minus?"−":e.minus+"",c=void 0===e.nan?"NaN":e.nan+"";function u(e,t){var r=(e=w_(e)).fill,u=e.align,d=e.sign,h=e.symbol,p=e.zero,f=e.width,m=e.comma,g=e.precision,y=e.trim,v=e.type;"n"===v?(m=!0,v="g"):C_[v]||(void 0===g&&(g=12),y=!0,v="g"),(p||"0"===r&&"="===u)&&(p=!0,r="0",u="=");var x=(t&&void 0!==t.prefix?t.prefix:"")+("$"===h?i:"#"===h&&/[boxX]/.test(v)?"0"+v.toLowerCase():""),w=("$"===h?a:/[%p]/.test(v)?A:"")+(t&&void 0!==t.suffix?t.suffix:""),b=C_[v],B=/[defgprs%]/.test(v);function C(e){var t,i,a,A=x,h=w;if("c"===v)h=b(e)+h,e="";else{var C=(e=+e)<0||1/e<0;if(e=isNaN(e)?c:b(Math.abs(e),g),y&&(e=function(e){e:for(var t,r=e.length,n=1,i=-1;n<r;++n)switch(e[n]){case".":i=t=n;break;case"0":0===i&&(i=n),t=n;break;default:if(!+e[n])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),C&&0===+e&&"+"!==d&&(C=!1),A=(C?"("===d?d:l:"-"===d||"("===d?"":d)+A,h=("s"!==v||isNaN(e)||void 0===v_?"":Q_[8+v_/3])+h+(C&&"("===d?")":""),B)for(t=-1,i=e.length;++t<i;)if(48>(a=e.charCodeAt(t))||a>57){h=(46===a?o+e.slice(t+1):e.slice(t))+h,e=e.slice(0,t);break}}m&&!p&&(e=n(e,1/0));var E=A.length+e.length+h.length,k=E<f?new Array(f-E+1).join(r):"";switch(m&&p&&(e=n(k+e,k.length?f-h.length:1/0),k=""),u){case"<":e=A+e+h+k;break;case"=":e=A+k+e+h;break;case"^":e=k.slice(0,E=k.length>>1)+A+e+h+k.slice(E);break;default:e=k+A+e+h}return s(e)}return g=void 0===g?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),C.toString=function(){return e+""},C}return{format:u,formatPrefix:function(e,t){var r=3*Math.max(-8,Math.min(8,Math.floor(y_(t)/3))),n=Math.pow(10,-r),i=u(((e=w_(e)).type="f",e),{suffix:Q_[8+r/3]});return function(e){return i(n*e)}}}}function U_(e,t,r,n){var i,a=tH(e,t,r);switch((n=w_(null==n?",f":n)).type){case"s":var o=Math.max(Math.abs(e),Math.abs(t));return null!=n.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(y_(t)/3)))-y_(Math.abs(e)))}(a,o))||(n.precision=i),j_(n,o);case"":case"e":case"g":case"p":case"r":null!=n.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,y_(t)-y_(e))+1}(a,Math.max(Math.abs(e),Math.abs(t))))||(n.precision=i-("e"===n.type));break;case"f":case"%":null!=n.precision||isNaN(i=function(e){return Math.max(0,-y_(Math.abs(e)))}(a))||(n.precision=i-2*("%"===n.type))}return S_(n)}function O_(e){var t=e.domain;return e.ticks=function(e){var r=t();return ZL(r[0],r[r.length-1],null==e?10:e)},e.tickFormat=function(e,r){var n=t();return U_(n[0],n[n.length-1],null==e?10:e,r)},e.nice=function(r){null==r&&(r=10);var n,i,a=t(),o=0,s=a.length-1,A=a[o],l=a[s],c=10;for(l<A&&(i=A,A=l,l=i,i=o,o=s,s=i);c-- >0;){if((i=eH(A,l,r))===n)return a[o]=A,a[s]=l,t(a);if(i>0)A=Math.floor(A/i)*i,l=Math.ceil(l/i)*i;else{if(!(i<0))break;A=Math.ceil(A*i)/i,l=Math.floor(l*i)/i}n=i}return e},e}function I_(e,t){var r,n=0,i=(e=e.slice()).length-1,a=e[n],o=e[i];return o<a&&(r=n,n=i,i=r,r=a,a=o,o=r),e[n]=t.floor(a),e[i]=t.ceil(o),e}function T_(e){return Math.log(e)}function P_(e){return Math.exp(e)}function M_(e){return-Math.log(-e)}function D_(e){return-Math.exp(-e)}function L_(e){return isFinite(e)?+("1e"+e):e<0?0:e}function H_(e){return(t,r)=>-e(-t,r)}function __(e){const t=e(T_,P_),r=t.domain;let n,i,a=10;function o(){return n=function(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}(a),i=function(e){return 10===e?L_:e===Math.E?Math.exp:t=>Math.pow(e,t)}(a),r()[0]<0?(n=H_(n),i=H_(i),e(M_,D_)):e(T_,P_),t}return t.base=function(e){return arguments.length?(a=+e,o()):a},t.domain=function(e){return arguments.length?(r(e),o()):r()},t.ticks=e=>{const t=r();let o=t[0],s=t[t.length-1];const A=s<o;A&&([o,s]=[s,o]);let l,c,u=n(o),d=n(s);const h=null==e?10:+e;let p=[];if(!(a%1)&&d-u<h){if(u=Math.floor(u),d=Math.ceil(d),o>0){for(;u<=d;++u)for(l=1;l<a;++l)if(c=u<0?l/i(-u):l*i(u),!(c<o)){if(c>s)break;p.push(c)}}else for(;u<=d;++u)for(l=a-1;l>=1;--l)if(c=u>0?l/i(-u):l*i(u),!(c<o)){if(c>s)break;p.push(c)}2*p.length<h&&(p=ZL(o,s,h))}else p=ZL(u,d,Math.min(d-u,h)).map(i);return A?p.reverse():p},t.tickFormat=(e,r)=>{if(null==e&&(e=10),null==r&&(r=10===a?"s":","),"function"!=typeof r&&(a%1||null!=(r=w_(r)).precision||(r.trim=!0),r=S_(r)),e===1/0)return r;const o=Math.max(1,a*e/t.ticks().length);return e=>{let t=e/i(Math.round(n(e)));return t*a<a-.5&&(t*=a),t<=o?r(e):""}},t.nice=()=>r(I_(r(),{floor:e=>i(Math.floor(n(e))),ceil:e=>i(Math.ceil(n(e)))})),t}function R_(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function K_(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function z_(e){var t=1,r=e(R_(t),K_(t));return r.constant=function(r){return arguments.length?e(R_(t=+r),K_(t)):t},O_(r)}function V_(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function $_(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function W_(e){return e<0?-e*e:e*e}function G_(e){var t=e(c_,c_),r=1;return t.exponent=function(t){return arguments.length?1===(r=+t)?e(c_,c_):.5===r?e($_,W_):e(V_(r),V_(1/r)):r},O_(t)}function q_(){var e=G_(f_());return e.copy=function(){return p_(e,q_()).exponent(e.exponent())},sH.apply(e,arguments),e}function Y_(e){return Math.sign(e)*e*e}k_=N_({thousands:",",grouping:[3],currency:["$",""]}),S_=k_.format,j_=k_.formatPrefix;const X_=new Date,J_=new Date;function Z_(e,t,r,n){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=r=>(e(r=new Date(r-1)),t(r,1),e(r),r),i.round=e=>{const t=i(e),r=i.ceil(e);return e-t<r-e?t:r},i.offset=(e,r)=>(t(e=new Date(+e),null==r?1:Math.floor(r)),e),i.range=(r,n,a)=>{const o=[];if(r=i.ceil(r),a=null==a?1:Math.floor(a),!(r<n&&a>0))return o;let s;do{o.push(s=new Date(+r)),t(r,a),e(r)}while(s<r&&r<n);return o},i.filter=r=>Z_(t=>{if(t>=t)for(;e(t),!r(t);)t.setTime(t-1)},(e,n)=>{if(e>=e)if(n<0)for(;++n<=0;)for(;t(e,-1),!r(e););else for(;--n>=0;)for(;t(e,1),!r(e););}),r&&(i.count=(t,n)=>(X_.setTime(+t),J_.setTime(+n),e(X_),e(J_),Math.floor(r(X_,J_))),i.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(n?t=>n(t)%e===0:t=>i.count(0,t)%e===0):i:null)),i}const eR=Z_(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);eR.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?Z_(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):eR:null),eR.range;const tR=1e3,rR=6e4,nR=36e5,iR=864e5,aR=6048e5,oR=2592e6,sR=31536e6,AR=Z_(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*tR)},(e,t)=>(t-e)/tR,e=>e.getUTCSeconds());AR.range;const lR=Z_(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*tR)},(e,t)=>{e.setTime(+e+t*rR)},(e,t)=>(t-e)/rR,e=>e.getMinutes());lR.range;const cR=Z_(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*rR)},(e,t)=>(t-e)/rR,e=>e.getUTCMinutes());cR.range;const uR=Z_(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*tR-e.getMinutes()*rR)},(e,t)=>{e.setTime(+e+t*nR)},(e,t)=>(t-e)/nR,e=>e.getHours());uR.range;const dR=Z_(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*nR)},(e,t)=>(t-e)/nR,e=>e.getUTCHours());dR.range;const hR=Z_(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*rR)/iR,e=>e.getDate()-1);hR.range;const pR=Z_(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/iR,e=>e.getUTCDate()-1);pR.range;const fR=Z_(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/iR,e=>Math.floor(e/iR));function mR(e){return Z_(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+7*t)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*rR)/aR)}fR.range;const gR=mR(0),yR=mR(1),vR=mR(2),xR=mR(3),wR=mR(4),bR=mR(5),BR=mR(6);function CR(e){return Z_(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)},(e,t)=>(t-e)/aR)}gR.range,yR.range,vR.range,xR.range,wR.range,bR.range,BR.range;const ER=CR(0),kR=CR(1),SR=CR(2),jR=CR(3),FR=CR(4),QR=CR(5),NR=CR(6);ER.range,kR.range,SR.range,jR.range,FR.range,QR.range,NR.range;const UR=Z_(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear()),e=>e.getMonth());UR.range;const OR=Z_(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear()),e=>e.getUTCMonth());OR.range;const IR=Z_(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());IR.every=e=>isFinite(e=Math.floor(e))&&e>0?Z_(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)}):null,IR.range;const TR=Z_(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());function PR(e,t,r,n,i,a){const o=[[AR,1,tR],[AR,5,5e3],[AR,15,15e3],[AR,30,3e4],[a,1,rR],[a,5,3e5],[a,15,9e5],[a,30,18e5],[i,1,nR],[i,3,108e5],[i,6,216e5],[i,12,432e5],[n,1,iR],[n,2,1728e5],[r,1,aR],[t,1,oR],[t,3,7776e6],[e,1,sR]];function s(t,r,n){const i=Math.abs(r-t)/n,a=_L(([,,e])=>e).right(o,i);if(a===o.length)return e.every(tH(t/sR,r/sR,n));if(0===a)return eR.every(Math.max(tH(t,r,n),1));const[s,A]=o[i/o[a-1][2]<o[a][2]/i?a-1:a];return s.every(A)}return[function(e,t,r){const n=t<e;n&&([e,t]=[t,e]);const i=r&&"function"==typeof r.range?r:s(e,t,r),a=i?i.range(e,+t+1):[];return n?a.reverse():a},s]}TR.every=e=>isFinite(e=Math.floor(e))&&e>0?Z_(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)}):null,TR.range;const[MR,DR]=PR(TR,OR,ER,fR,dR,cR),[LR,HR]=PR(IR,UR,gR,hR,uR,lR);function _R(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function RR(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function KR(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}var zR,VR,$R,WR={"-":"",_:" ",0:"0"},GR=/^\s*\d+/,qR=/^%/,YR=/[\\^$*+?|[\]().{}]/g;function XR(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a<r?new Array(r-a+1).join(t)+i:i)}function JR(e){return e.replace(YR,"\\$&")}function ZR(e){return new RegExp("^(?:"+e.map(JR).join("|")+")","i")}function eK(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function tK(e,t,r){var n=GR.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function rK(e,t,r){var n=GR.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function nK(e,t,r){var n=GR.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function iK(e,t,r){var n=GR.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function aK(e,t,r){var n=GR.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function oK(e,t,r){var n=GR.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function sK(e,t,r){var n=GR.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function AK(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function lK(e,t,r){var n=GR.exec(t.slice(r,r+1));return n?(e.q=3*n[0]-3,r+n[0].length):-1}function cK(e,t,r){var n=GR.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function uK(e,t,r){var n=GR.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function dK(e,t,r){var n=GR.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function hK(e,t,r){var n=GR.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function pK(e,t,r){var n=GR.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function fK(e,t,r){var n=GR.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function mK(e,t,r){var n=GR.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function gK(e,t,r){var n=GR.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function yK(e,t,r){var n=qR.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function vK(e,t,r){var n=GR.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function xK(e,t,r){var n=GR.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function wK(e,t){return XR(e.getDate(),t,2)}function bK(e,t){return XR(e.getHours(),t,2)}function BK(e,t){return XR(e.getHours()%12||12,t,2)}function CK(e,t){return XR(1+hR.count(IR(e),e),t,3)}function EK(e,t){return XR(e.getMilliseconds(),t,3)}function kK(e,t){return EK(e,t)+"000"}function SK(e,t){return XR(e.getMonth()+1,t,2)}function jK(e,t){return XR(e.getMinutes(),t,2)}function FK(e,t){return XR(e.getSeconds(),t,2)}function QK(e){var t=e.getDay();return 0===t?7:t}function NK(e,t){return XR(gR.count(IR(e)-1,e),t,2)}function UK(e){var t=e.getDay();return t>=4||0===t?wR(e):wR.ceil(e)}function OK(e,t){return e=UK(e),XR(wR.count(IR(e),e)+(4===IR(e).getDay()),t,2)}function IK(e){return e.getDay()}function TK(e,t){return XR(yR.count(IR(e)-1,e),t,2)}function PK(e,t){return XR(e.getFullYear()%100,t,2)}function MK(e,t){return XR((e=UK(e)).getFullYear()%100,t,2)}function DK(e,t){return XR(e.getFullYear()%1e4,t,4)}function LK(e,t){var r=e.getDay();return XR((e=r>=4||0===r?wR(e):wR.ceil(e)).getFullYear()%1e4,t,4)}function HK(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+XR(t/60|0,"0",2)+XR(t%60,"0",2)}function _K(e,t){return XR(e.getUTCDate(),t,2)}function RK(e,t){return XR(e.getUTCHours(),t,2)}function KK(e,t){return XR(e.getUTCHours()%12||12,t,2)}function zK(e,t){return XR(1+pR.count(TR(e),e),t,3)}function VK(e,t){return XR(e.getUTCMilliseconds(),t,3)}function $K(e,t){return VK(e,t)+"000"}function WK(e,t){return XR(e.getUTCMonth()+1,t,2)}function GK(e,t){return XR(e.getUTCMinutes(),t,2)}function qK(e,t){return XR(e.getUTCSeconds(),t,2)}function YK(e){var t=e.getUTCDay();return 0===t?7:t}function XK(e,t){return XR(ER.count(TR(e)-1,e),t,2)}function JK(e){var t=e.getUTCDay();return t>=4||0===t?FR(e):FR.ceil(e)}function ZK(e,t){return e=JK(e),XR(FR.count(TR(e),e)+(4===TR(e).getUTCDay()),t,2)}function ez(e){return e.getUTCDay()}function tz(e,t){return XR(kR.count(TR(e)-1,e),t,2)}function rz(e,t){return XR(e.getUTCFullYear()%100,t,2)}function nz(e,t){return XR((e=JK(e)).getUTCFullYear()%100,t,2)}function iz(e,t){return XR(e.getUTCFullYear()%1e4,t,4)}function az(e,t){var r=e.getUTCDay();return XR((e=r>=4||0===r?FR(e):FR.ceil(e)).getUTCFullYear()%1e4,t,4)}function oz(){return"+0000"}function sz(){return"%"}function Az(e){return+e}function lz(e){return Math.floor(+e/1e3)}function cz(e){return new Date(e)}function uz(e){return e instanceof Date?+e:+new Date(+e)}function dz(e,t,r,n,i,a,o,s,A,l){var c=m_(),u=c.invert,d=c.domain,h=l(".%L"),p=l(":%S"),f=l("%I:%M"),m=l("%I %p"),g=l("%a %d"),y=l("%b %d"),v=l("%B"),x=l("%Y");function w(e){return(A(e)<e?h:s(e)<e?p:o(e)<e?f:a(e)<e?m:n(e)<e?i(e)<e?g:y:r(e)<e?v:x)(e)}return c.invert=function(e){return new Date(u(e))},c.domain=function(e){return arguments.length?d(Array.from(e,uz)):d().map(cz)},c.ticks=function(t){var r=d();return e(r[0],r[r.length-1],null==t?10:t)},c.tickFormat=function(e,t){return null==t?w:l(t)},c.nice=function(e){var r=d();return e&&"function"==typeof e.range||(e=t(r[0],r[r.length-1],null==e?10:e)),e?d(I_(r,e)):c},c.copy=function(){return p_(c,dz(e,t,r,n,i,a,o,s,A,l))},c}function hz(){var e,t,r,n,i,a=0,o=1,s=c_,A=!1;function l(t){return null==t||isNaN(t=+t)?i:s(0===r?.5:(t=(n(t)-e)*r,A?Math.max(0,Math.min(1,t)):t))}function c(e){return function(t){var r,n;return arguments.length?([r,n]=t,s=e(r,n),l):[s(0),s(1)]}}return l.domain=function(i){return arguments.length?([a,o]=i,e=n(a=+a),t=n(o=+o),r=e===t?0:1/(t-e),l):[a,o]},l.clamp=function(e){return arguments.length?(A=!!e,l):A},l.interpolator=function(e){return arguments.length?(s=e,l):s},l.range=c(o_),l.rangeRound=c(s_),l.unknown=function(e){return arguments.length?(i=e,l):i},function(i){return n=i,e=i(a),t=i(o),r=e===t?0:1/(t-e),l}}function pz(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function fz(){var e=G_(hz());return e.copy=function(){return pz(e,fz()).exponent(e.exponent())},AH.apply(e,arguments)}function mz(){var e,t,r,n,i,a,o,s=0,A=.5,l=1,c=1,u=c_,d=!1;function h(e){return isNaN(e=+e)?o:(e=.5+((e=+a(e))-t)*(c*e<c*t?n:i),u(d?Math.max(0,Math.min(1,e)):e))}function p(e){return function(t){var r,n,i;return arguments.length?([r,n,i]=t,u=function(e,t){void 0===t&&(t=e,e=o_);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r<n;)a[r]=e(i,i=t[++r]);return function(e){var t=Math.max(0,Math.min(n-1,Math.floor(e*=n)));return a[t](e-t)}}(e,[r,n,i]),h):[u(0),u(.5),u(1)]}}return h.domain=function(o){return arguments.length?([s,A,l]=o,e=a(s=+s),t=a(A=+A),r=a(l=+l),n=e===t?0:.5/(t-e),i=t===r?0:.5/(r-t),c=t<e?-1:1,h):[s,A,l]},h.clamp=function(e){return arguments.length?(d=!!e,h):d},h.interpolator=function(e){return arguments.length?(u=e,h):u},h.range=p(o_),h.rangeRound=p(s_),h.unknown=function(e){return arguments.length?(o=e,h):o},function(o){return a=o,e=o(s),t=o(A),r=o(l),n=e===t?0:.5/(t-e),i=t===r?0:.5/(r-t),c=t<e?-1:1,h}}function gz(){var e=G_(mz());return e.copy=function(){return pz(e,gz()).exponent(e.exponent())},AH.apply(e,arguments)}!function(e){zR=function(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,A=e.shortMonths,l=ZR(i),c=eK(i),u=ZR(a),d=eK(a),h=ZR(o),p=eK(o),f=ZR(s),m=eK(s),g=ZR(A),y=eK(A),v={a:function(e){return o[e.getDay()]},A:function(e){return a[e.getDay()]},b:function(e){return A[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:wK,e:wK,f:kK,g:MK,G:LK,H:bK,I:BK,j:CK,L:EK,m:SK,M:jK,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:Az,s:lz,S:FK,u:QK,U:NK,V:OK,w:IK,W:TK,x:null,X:null,y:PK,Y:DK,Z:HK,"%":sz},x={a:function(e){return o[e.getUTCDay()]},A:function(e){return a[e.getUTCDay()]},b:function(e){return A[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:_K,e:_K,f:$K,g:nz,G:az,H:RK,I:KK,j:zK,L:VK,m:WK,M:GK,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:Az,s:lz,S:qK,u:YK,U:XK,V:ZK,w:ez,W:tz,x:null,X:null,y:rz,Y:iz,Z:oz,"%":sz},w={a:function(e,t,r){var n=h.exec(t.slice(r));return n?(e.w=p.get(n[0].toLowerCase()),r+n[0].length):-1},A:function(e,t,r){var n=u.exec(t.slice(r));return n?(e.w=d.get(n[0].toLowerCase()),r+n[0].length):-1},b:function(e,t,r){var n=g.exec(t.slice(r));return n?(e.m=y.get(n[0].toLowerCase()),r+n[0].length):-1},B:function(e,t,r){var n=f.exec(t.slice(r));return n?(e.m=m.get(n[0].toLowerCase()),r+n[0].length):-1},c:function(e,r,n){return C(e,t,r,n)},d:uK,e:uK,f:gK,g:sK,G:oK,H:hK,I:hK,j:dK,L:mK,m:cK,M:pK,p:function(e,t,r){var n=l.exec(t.slice(r));return n?(e.p=c.get(n[0].toLowerCase()),r+n[0].length):-1},q:lK,Q:vK,s:xK,S:fK,u:rK,U:nK,V:iK,w:tK,W:aK,x:function(e,t,n){return C(e,r,t,n)},X:function(e,t,r){return C(e,n,t,r)},y:sK,Y:oK,Z:AK,"%":yK};function b(e,t){return function(r){var n,i,a,o=[],s=-1,A=0,l=e.length;for(r instanceof Date||(r=new Date(+r));++s<l;)37===e.charCodeAt(s)&&(o.push(e.slice(A,s)),null!=(i=WR[n=e.charAt(++s)])?n=e.charAt(++s):i="e"===n?" ":"0",(a=t[n])&&(n=a(r,i)),o.push(n),A=s+1);return o.push(e.slice(A,s)),o.join("")}}function B(e,t){return function(r){var n,i,a=KR(1900,void 0,1);if(C(a,e,r+="",0)!=r.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(t&&!("Z"in a)&&(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(i=(n=RR(KR(a.y,0,1))).getUTCDay(),n=i>4||0===i?kR.ceil(n):kR(n),n=pR.offset(n,7*(a.V-1)),a.y=n.getUTCFullYear(),a.m=n.getUTCMonth(),a.d=n.getUTCDate()+(a.w+6)%7):(i=(n=_R(KR(a.y,0,1))).getDay(),n=i>4||0===i?yR.ceil(n):yR(n),n=hR.offset(n,7*(a.V-1)),a.y=n.getFullYear(),a.m=n.getMonth(),a.d=n.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?RR(KR(a.y,0,1)).getUTCDay():_R(KR(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,RR(a)):_R(a)}}function C(e,t,r,n){for(var i,a,o=0,s=t.length,A=r.length;o<s;){if(n>=A)return-1;if(37===(i=t.charCodeAt(o++))){if(i=t.charAt(o++),!(a=w[i in WR?t.charAt(o++):i])||(n=a(e,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}return v.x=b(r,v),v.X=b(n,v),v.c=b(t,v),x.x=b(r,x),x.X=b(n,x),x.c=b(t,x),{format:function(e){var t=b(e+="",v);return t.toString=function(){return e},t},parse:function(e){var t=B(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=b(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=B(e+="",!0);return t.toString=function(){return e},t}}}(e),VR=zR.format,zR.parse,$R=zR.utcFormat,zR.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});const yz=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:uH,scaleDiverging:function e(){var t=O_(mz()(c_));return t.copy=function(){return pz(t,e())},AH.apply(t,arguments)},scaleDivergingLog:function e(){var t=__(mz()).domain([.1,1,10]);return t.copy=function(){return pz(t,e()).base(t.base())},AH.apply(t,arguments)},scaleDivergingPow:gz,scaleDivergingSqrt:function(){return gz.apply(null,arguments).exponent(.5)},scaleDivergingSymlog:function e(){var t=z_(mz());return t.copy=function(){return pz(t,e()).constant(t.constant())},AH.apply(t,arguments)},scaleIdentity:function e(t){var r;function n(e){return null==e||isNaN(e=+e)?r:e}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=Array.from(e,A_),n):t.slice()},n.unknown=function(e){return arguments.length?(r=e,n):r},n.copy=function(){return e(t).unknown(r)},t=arguments.length?Array.from(t,A_):[0,1],O_(n)},scaleImplicit:lH,scaleLinear:function e(){var t=m_();return t.copy=function(){return p_(t,e())},sH.apply(t,arguments),O_(t)},scaleLog:function e(){const t=__(f_()).domain([1,10]);return t.copy=()=>p_(t,e()).base(t.base()),sH.apply(t,arguments),t},scaleOrdinal:cH,scalePoint:hH,scalePow:q_,scaleQuantile:function e(){var t,r=[],n=[],i=[];function a(){var e=0,t=Math.max(1,n.length);for(i=new Array(t-1);++e<t;)i[e-1]=oH(r,e/t);return o}function o(e){return null==e||isNaN(e=+e)?t:n[zL(i,e)]}return o.invertExtent=function(e){var t=n.indexOf(e);return t<0?[NaN,NaN]:[t>0?i[t-1]:r[0],t<i.length?i[t]:r[r.length-1]]},o.domain=function(e){if(!arguments.length)return r.slice();r=[];for(let t of e)null==t||isNaN(t=+t)||r.push(t);return r.sort(LL),a()},o.range=function(e){return arguments.length?(n=Array.from(e),a()):n.slice()},o.unknown=function(e){return arguments.length?(t=e,o):t},o.quantiles=function(){return i.slice()},o.copy=function(){return e().domain(r).range(n).unknown(t)},sH.apply(o,arguments)},scaleQuantize:function e(){var t,r=0,n=1,i=1,a=[.5],o=[0,1];function s(e){return null!=e&&e<=e?o[zL(a,e,0,i)]:t}function A(){var e=-1;for(a=new Array(i);++e<i;)a[e]=((e+1)*n-(e-i)*r)/(i+1);return s}return s.domain=function(e){return arguments.length?([r,n]=e,r=+r,n=+n,A()):[r,n]},s.range=function(e){return arguments.length?(i=(o=Array.from(e)).length-1,A()):o.slice()},s.invertExtent=function(e){var t=o.indexOf(e);return t<0?[NaN,NaN]:t<1?[r,a[0]]:t>=i?[a[i-1],n]:[a[t-1],a[t]]},s.unknown=function(e){return arguments.length?(t=e,s):s},s.thresholds=function(){return a.slice()},s.copy=function(){return e().domain([r,n]).range(o).unknown(t)},sH.apply(O_(s),arguments)},scaleRadial:function e(){var t,r=m_(),n=[0,1],i=!1;function a(e){var n=function(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}(r(e));return isNaN(n)?t:i?Math.round(n):n}return a.invert=function(e){return r.invert(Y_(e))},a.domain=function(e){return arguments.length?(r.domain(e),a):r.domain()},a.range=function(e){return arguments.length?(r.range((n=Array.from(e,A_)).map(Y_)),a):n.slice()},a.rangeRound=function(e){return a.range(e).round(!0)},a.round=function(e){return arguments.length?(i=!!e,a):i},a.clamp=function(e){return arguments.length?(r.clamp(e),a):r.clamp()},a.unknown=function(e){return arguments.length?(t=e,a):t},a.copy=function(){return e(r.domain(),n).round(i).clamp(r.clamp()).unknown(t)},sH.apply(a,arguments),O_(a)},scaleSequential:function e(){var t=O_(hz()(c_));return t.copy=function(){return pz(t,e())},AH.apply(t,arguments)},scaleSequentialLog:function e(){var t=__(hz()).domain([1,10]);return t.copy=function(){return pz(t,e()).base(t.base())},AH.apply(t,arguments)},scaleSequentialPow:fz,scaleSequentialQuantile:function e(){var t=[],r=c_;function n(e){if(null!=e&&!isNaN(e=+e))return r((zL(t,e,1)-1)/(t.length-1))}return n.domain=function(e){if(!arguments.length)return t.slice();t=[];for(let r of e)null==r||isNaN(r=+r)||t.push(r);return t.sort(LL),n},n.interpolator=function(e){return arguments.length?(r=e,n):r},n.range=function(){return t.map((e,n)=>r(n/(t.length-1)))},n.quantiles=function(e){return Array.from({length:e+1},(r,n)=>function(e,t){if((r=(e=Float64Array.from(function*(e){for(let t of e)null!=t&&(t=+t)>=t&&(yield t)}(e))).length)&&!isNaN(t=+t)){if(t<=0||r<2)return nH(e);if(t>=1)return rH(e);var r,n=(r-1)*t,i=Math.floor(n),a=rH(iH(e,i).subarray(0,i+1));return a+(nH(e.subarray(i+1))-a)*(n-i)}}(t,n/e))},n.copy=function(){return e(r).domain(t)},AH.apply(n,arguments)},scaleSequentialSqrt:function(){return fz.apply(null,arguments).exponent(.5)},scaleSequentialSymlog:function e(){var t=z_(hz());return t.copy=function(){return pz(t,e()).constant(t.constant())},AH.apply(t,arguments)},scaleSqrt:function(){return q_.apply(null,arguments).exponent(.5)},scaleSymlog:function e(){var t=z_(f_());return t.copy=function(){return p_(t,e()).constant(t.constant())},sH.apply(t,arguments)},scaleThreshold:function e(){var t,r=[.5],n=[0,1],i=1;function a(e){return null!=e&&e<=e?n[zL(r,e,0,i)]:t}return a.domain=function(e){return arguments.length?(r=Array.from(e),i=Math.min(r.length,n.length-1),a):r.slice()},a.range=function(e){return arguments.length?(n=Array.from(e),i=Math.min(r.length,n.length-1),a):n.slice()},a.invertExtent=function(e){var t=n.indexOf(e);return[r[t-1],r[t]]},a.unknown=function(e){return arguments.length?(t=e,a):t},a.copy=function(){return e().domain(r).range(n).unknown(t)},sH.apply(a,arguments)},scaleTime:function(){return sH.apply(dz(LR,HR,IR,UR,gR,hR,uR,lR,AR,VR).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},scaleUtc:function(){return sH.apply(dz(MR,DR,TR,OR,ER,pR,dR,cR,AR,$R).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)},tickFormat:U_},Symbol.toStringTag,{value:"Module"}));var vz=e=>e.chartData,xz=NN([vz],e=>{var t=null!=e.chartData?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),wz=(e,t,r,n)=>n?xz(e):vz(e);function bz(e){if(Array.isArray(e)&&2===e.length){var[t,r]=e;if(WI(t)&&WI(r))return!0}return!1}function Bz(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function Cz(e,t){if(t&&"function"!=typeof e&&Array.isArray(e)&&2===e.length){var r,n,[i,a]=e;if(WI(i))r=i;else if("function"==typeof i)return;if(WI(a))n=a;else if("function"==typeof a)return;var o=[r,n];if(bz(o))return o}}var Ez,kz=1e9,Sz=!0,jz="[DecimalError] ",Fz=jz+"Invalid argument: ",Qz=jz+"Exponent out of range: ",Nz=Math.floor,Uz=Math.pow,Oz=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Iz=1e7,Tz=9007199254740991,Pz=Nz(1286742750677284.5),Mz={};function Dz(e,t){var r,n,i,a,o,s,A,l,c=e.constructor,u=c.precision;if(!e.s||!t.s)return t.s||(t=new c(e)),Sz?Gz(t,u):t;if(A=e.d,l=t.d,o=e.e,i=t.e,A=A.slice(),a=o-i){for(a<0?(n=A,a=-a,s=l.length):(n=l,i=o,s=A.length),a>(s=(o=Math.ceil(u/7))>s?o+1:s+1)&&(a=s,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for((s=A.length)-(a=l.length)<0&&(a=s,n=l,l=A,A=n),r=0;a;)r=(A[--a]=A[a]+l[a]+r)/Iz|0,A[a]%=Iz;for(r&&(A.unshift(r),++i),s=A.length;0==A[--s];)A.pop();return t.d=A,t.e=i,Sz?Gz(t,u):t}function Lz(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Fz+e)}function Hz(e){var t,r,n,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)(r=7-(n=e[t]+"").length)&&(a+=Vz(r)),a+=n;(r=7-(n=(o=e[t])+"").length)&&(a+=Vz(r))}else if(0===o)return"0";for(;o%10==0;)o/=10;return a+o}Mz.absoluteValue=Mz.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e},Mz.comparedTo=Mz.cmp=function(e){var t,r,n,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(t=0,r=(n=a.d.length)<(i=e.d.length)?n:i;t<r;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1},Mz.decimalPlaces=Mz.dp=function(){var e=this,t=e.d.length-1,r=7*(t-e.e);if(t=e.d[t])for(;t%10==0;t/=10)r--;return r<0?0:r},Mz.dividedBy=Mz.div=function(e){return _z(this,new this.constructor(e))},Mz.dividedToIntegerBy=Mz.idiv=function(e){var t=this.constructor;return Gz(_z(this,new t(e),0,1),t.precision)},Mz.equals=Mz.eq=function(e){return!this.cmp(e)},Mz.exponent=function(){return Kz(this)},Mz.greaterThan=Mz.gt=function(e){return this.cmp(e)>0},Mz.greaterThanOrEqualTo=Mz.gte=function(e){return this.cmp(e)>=0},Mz.isInteger=Mz.isint=function(){return this.e>this.d.length-2},Mz.isNegative=Mz.isneg=function(){return this.s<0},Mz.isPositive=Mz.ispos=function(){return this.s>0},Mz.isZero=function(){return 0===this.s},Mz.lessThan=Mz.lt=function(e){return this.cmp(e)<0},Mz.lessThanOrEqualTo=Mz.lte=function(e){return this.cmp(e)<1},Mz.logarithm=Mz.log=function(e){var t,r=this,n=r.constructor,i=n.precision,a=i+5;if(void 0===e)e=new n(10);else if((e=new n(e)).s<1||e.eq(Ez))throw Error(jz+"NaN");if(r.s<1)throw Error(jz+(r.s?"NaN":"-Infinity"));return r.eq(Ez)?new n(0):(Sz=!1,t=_z($z(r,a),$z(e,a),a),Sz=!0,Gz(t,i))},Mz.minus=Mz.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?qz(t,e):Dz(t,(e.s=-e.s,e))},Mz.modulo=Mz.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(!(e=new n(e)).s)throw Error(jz+"NaN");return r.s?(Sz=!1,t=_z(r,e,0,1).times(e),Sz=!0,r.minus(t)):Gz(new n(r),i)},Mz.naturalExponential=Mz.exp=function(){return Rz(this)},Mz.naturalLogarithm=Mz.ln=function(){return $z(this)},Mz.negated=Mz.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},Mz.plus=Mz.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Dz(t,e):qz(t,(e.s=-e.s,e))},Mz.precision=Mz.sd=function(e){var t,r,n,i=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(Fz+e);if(t=Kz(i)+1,r=7*(n=i.d.length-1)+1,n=i.d[n]){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r},Mz.squareRoot=Mz.sqrt=function(){var e,t,r,n,i,a,o,s=this,A=s.constructor;if(s.s<1){if(!s.s)return new A(0);throw Error(jz+"NaN")}for(e=Kz(s),Sz=!1,0==(i=Math.sqrt(+s))||i==1/0?(((t=Hz(s.d)).length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Nz((e+1)/2)-(e<0||e%2),n=new A(t=i==1/0?"5e"+e:(t=i.toExponential()).slice(0,t.indexOf("e")+1)+e)):n=new A(i.toString()),i=o=(r=A.precision)+3;;)if(n=(a=n).plus(_z(s,a,o+2)).times(.5),Hz(a.d).slice(0,o)===(t=Hz(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&"4999"==t){if(Gz(a,r+1,0),a.times(a).eq(s)){n=a;break}}else if("9999"!=t)break;o+=4}return Sz=!0,Gz(n,r)},Mz.times=Mz.mul=function(e){var t,r,n,i,a,o,s,A,l,c=this,u=c.constructor,d=c.d,h=(e=new u(e)).d;if(!c.s||!e.s)return new u(0);for(e.s*=c.s,r=c.e+e.e,(A=d.length)<(l=h.length)&&(a=d,d=h,h=a,o=A,A=l,l=o),a=[],n=o=A+l;n--;)a.push(0);for(n=l;--n>=0;){for(t=0,i=A+n;i>n;)s=a[i]+h[n]*d[i-n-1]+t,a[i--]=s%Iz|0,t=s/Iz|0;a[i]=(a[i]+t)%Iz|0}for(;!a[--o];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,Sz?Gz(e,u.precision):e},Mz.toDecimalPlaces=Mz.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),void 0===e?r:(Lz(e,0,kz),void 0===t?t=n.rounding:Lz(t,0,8),Gz(r,e+Kz(r)+1,t))},Mz.toExponential=function(e,t){var r,n=this,i=n.constructor;return void 0===e?r=Yz(n,!0):(Lz(e,0,kz),void 0===t?t=i.rounding:Lz(t,0,8),r=Yz(n=Gz(new i(n),e+1,t),!0,e+1)),r},Mz.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return void 0===e?Yz(i):(Lz(e,0,kz),void 0===t?t=a.rounding:Lz(t,0,8),r=Yz((n=Gz(new a(i),e+Kz(i)+1,t)).abs(),!1,e+Kz(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)},Mz.toInteger=Mz.toint=function(){var e=this,t=e.constructor;return Gz(new t(e),Kz(e)+1,t.rounding)},Mz.toNumber=function(){return+this},Mz.toPower=Mz.pow=function(e){var t,r,n,i,a,o,s=this,A=s.constructor,l=+(e=new A(e));if(!e.s)return new A(Ez);if(!(s=new A(s)).s){if(e.s<1)throw Error(jz+"Infinity");return s}if(s.eq(Ez))return s;if(n=A.precision,e.eq(Ez))return Gz(s,n);if(o=(t=e.e)>=(r=e.d.length-1),a=s.s,o){if((r=l<0?-l:l)<=Tz){for(i=new A(Ez),t=Math.ceil(n/7+4),Sz=!1;r%2&&Xz((i=i.times(s)).d,t),0!==(r=Nz(r/2));)Xz((s=s.times(s)).d,t);return Sz=!0,e.s<0?new A(Ez).div(i):Gz(i,n)}}else if(a<0)throw Error(jz+"NaN");return a=a<0&&1&e.d[Math.max(t,r)]?-1:1,s.s=1,Sz=!1,i=e.times($z(s,n+12)),Sz=!0,(i=Rz(i)).s=a,i},Mz.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return void 0===e?n=Yz(i,(r=Kz(i))<=a.toExpNeg||r>=a.toExpPos):(Lz(e,1,kz),void 0===t?t=a.rounding:Lz(t,0,8),n=Yz(i=Gz(new a(i),e,t),e<=(r=Kz(i))||r<=a.toExpNeg,e)),n},Mz.toSignificantDigits=Mz.tosd=function(e,t){var r=this.constructor;return void 0===e?(e=r.precision,t=r.rounding):(Lz(e,1,kz),void 0===t?t=r.rounding:Lz(t,0,8)),Gz(new r(this),e,t)},Mz.toString=Mz.valueOf=Mz.val=Mz.toJSON=Mz[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Kz(e),r=e.constructor;return Yz(e,t<=r.toExpNeg||t>=r.toExpPos)};var _z=function(){function e(e,t){var r,n=0,i=e.length;for(e=e.slice();i--;)r=e[i]*t+n,e[i]=r%Iz|0,n=r/Iz|0;return n&&e.unshift(n),e}function t(e,t,r,n){var i,a;if(r!=n)a=r>n?1:-1;else for(i=a=0;i<r;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function r(e,t,r){for(var n=0;r--;)e[r]-=n,n=e[r]<t[r]?1:0,e[r]=n*Iz+e[r]-t[r];for(;!e[0]&&e.length>1;)e.shift()}return function(n,i,a,o){var s,A,l,c,u,d,h,p,f,m,g,y,v,x,w,b,B,C,E=n.constructor,k=n.s==i.s?1:-1,S=n.d,j=i.d;if(!n.s)return new E(n);if(!i.s)throw Error(jz+"Division by zero");for(A=n.e-i.e,B=j.length,w=S.length,p=(h=new E(k)).d=[],l=0;j[l]==(S[l]||0);)++l;if(j[l]>(S[l]||0)&&--A,(y=null==a?a=E.precision:o?a+(Kz(n)-Kz(i))+1:a)<0)return new E(0);if(y=y/7+2|0,l=0,1==B)for(c=0,j=j[0],y++;(l<w||c)&&y--;l++)v=c*Iz+(S[l]||0),p[l]=v/j|0,c=v%j|0;else{for((c=Iz/(j[0]+1)|0)>1&&(j=e(j,c),S=e(S,c),B=j.length,w=S.length),x=B,m=(f=S.slice(0,B)).length;m<B;)f[m++]=0;(C=j.slice()).unshift(0),b=j[0],j[1]>=Iz/2&&++b;do{c=0,(s=t(j,f,B,m))<0?(g=f[0],B!=m&&(g=g*Iz+(f[1]||0)),(c=g/b|0)>1?(c>=Iz&&(c=Iz-1),1==(s=t(u=e(j,c),f,d=u.length,m=f.length))&&(c--,r(u,B<d?C:j,d))):(0==c&&(s=c=1),u=j.slice()),(d=u.length)<m&&u.unshift(0),r(f,u,m),-1==s&&(s=t(j,f,B,m=f.length))<1&&(c++,r(f,B<m?C:j,m)),m=f.length):0===s&&(c++,f=[0]),p[l++]=c,s&&f[0]?f[m++]=S[x]||0:(f=[S[x]],m=1)}while((x++<w||void 0!==f[0])&&y--)}return p[0]||p.shift(),h.e=A,Gz(h,o?a+Kz(h)+1:a)}}();function Rz(e,t){var r,n,i,a,o,s=0,A=0,l=e.constructor,c=l.precision;if(Kz(e)>16)throw Error(Qz+Kz(e));if(!e.s)return new l(Ez);for(Sz=!1,o=c,a=new l(.03125);e.abs().gte(.1);)e=e.times(a),A+=5;for(o+=Math.log(Uz(2,A))/Math.LN10*2+5|0,r=n=i=new l(Ez),l.precision=o;;){if(n=Gz(n.times(e),o),r=r.times(++s),Hz((a=i.plus(_z(n,r,o))).d).slice(0,o)===Hz(i.d).slice(0,o)){for(;A--;)i=Gz(i.times(i),o);return l.precision=c,null==t?(Sz=!0,Gz(i,c)):i}i=a}}function Kz(e){for(var t=7*e.e,r=e.d[0];r>=10;r/=10)t++;return t}function zz(e,t,r){if(t>e.LN10.sd())throw Sz=!0,r&&(e.precision=r),Error(jz+"LN10 precision limit exceeded");return Gz(new e(e.LN10),t)}function Vz(e){for(var t="";e--;)t+="0";return t}function $z(e,t){var r,n,i,a,o,s,A,l,c,u=1,d=e,h=d.d,p=d.constructor,f=p.precision;if(d.s<1)throw Error(jz+(d.s?"NaN":"-Infinity"));if(d.eq(Ez))return new p(0);if(null==t?(Sz=!1,l=f):l=t,d.eq(10))return null==t&&(Sz=!0),zz(p,l);if(l+=10,p.precision=l,n=(r=Hz(h)).charAt(0),a=Kz(d),!(Math.abs(a)<15e14))return A=zz(p,l+2,f).times(a+""),d=$z(new p(n+"."+r.slice(1)),l-10).plus(A),p.precision=f,null==t?(Sz=!0,Gz(d,f)):d;for(;n<7&&1!=n||1==n&&r.charAt(1)>3;)n=(r=Hz((d=d.times(e)).d)).charAt(0),u++;for(a=Kz(d),n>1?(d=new p("0."+r),a++):d=new p(n+"."+r.slice(1)),s=o=d=_z(d.minus(Ez),d.plus(Ez),l),c=Gz(d.times(d),l),i=3;;){if(o=Gz(o.times(c),l),Hz((A=s.plus(_z(o,new p(i),l))).d).slice(0,l)===Hz(s.d).slice(0,l))return s=s.times(2),0!==a&&(s=s.plus(zz(p,l+2,f).times(a+""))),s=_z(s,new p(u),l),p.precision=f,null==t?(Sz=!0,Gz(s,f)):s;s=A,i+=2}}function Wz(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;48===t.charCodeAt(n);)++n;for(i=t.length;48===t.charCodeAt(i-1);)--i;if(t=t.slice(n,i)){if(i-=n,r=r-n-1,e.e=Nz(r/7),e.d=[],n=(r+1)%7,r<0&&(n+=7),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=7;n<i;)e.d.push(+t.slice(n,n+=7));n=7-(t=t.slice(n)).length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),Sz&&(e.e>Pz||e.e<-Pz))throw Error(Qz+r)}else e.s=0,e.e=0,e.d=[0];return e}function Gz(e,t,r){var n,i,a,o,s,A,l,c,u=e.d;for(o=1,a=u[0];a>=10;a/=10)o++;if((n=t-o)<0)n+=7,i=t,l=u[c=0];else{if((c=Math.ceil((n+1)/7))>=(a=u.length))return e;for(l=a=u[c],o=1;a>=10;a/=10)o++;i=(n%=7)-7+o}if(void 0!==r&&(s=l/(a=Uz(10,o-i-1))%10|0,A=t<0||void 0!==u[c+1]||l%a,A=r<4?(s||A)&&(0==r||r==(e.s<0?3:2)):s>5||5==s&&(4==r||A||6==r&&(n>0?i>0?l/Uz(10,o-i):0:u[c-1])%10&1||r==(e.s<0?8:7))),t<1||!u[0])return A?(a=Kz(e),u.length=1,t=t-a-1,u[0]=Uz(10,(7-t%7)%7),e.e=Nz(-t/7)||0):(u.length=1,u[0]=e.e=e.s=0),e;if(0==n?(u.length=c,a=1,c--):(u.length=c+1,a=Uz(10,7-n),u[c]=i>0?(l/Uz(10,o-i)%Uz(10,i)|0)*a:0),A)for(;;){if(0==c){(u[0]+=a)==Iz&&(u[0]=1,++e.e);break}if(u[c]+=a,u[c]!=Iz)break;u[c--]=0,a=1}for(n=u.length;0===u[--n];)u.pop();if(Sz&&(e.e>Pz||e.e<-Pz))throw Error(Qz+Kz(e));return e}function qz(e,t){var r,n,i,a,o,s,A,l,c,u,d=e.constructor,h=d.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new d(e),Sz?Gz(t,h):t;if(A=e.d,u=t.d,n=t.e,l=e.e,A=A.slice(),o=l-n){for((c=o<0)?(r=A,o=-o,s=u.length):(r=u,n=l,s=A.length),o>(i=Math.max(Math.ceil(h/7),s)+2)&&(o=i,r.length=1),r.reverse(),i=o;i--;)r.push(0);r.reverse()}else{for((c=(i=A.length)<(s=u.length))&&(s=i),i=0;i<s;i++)if(A[i]!=u[i]){c=A[i]<u[i];break}o=0}for(c&&(r=A,A=u,u=r,t.s=-t.s),s=A.length,i=u.length-s;i>0;--i)A[s++]=0;for(i=u.length;i>o;){if(A[--i]<u[i]){for(a=i;a&&0===A[--a];)A[a]=Iz-1;--A[a],A[i]+=Iz}A[i]-=u[i]}for(;0===A[--s];)A.pop();for(;0===A[0];A.shift())--n;return A[0]?(t.d=A,t.e=n,Sz?Gz(t,h):t):new d(0)}function Yz(e,t,r){var n,i=Kz(e),a=Hz(e.d),o=a.length;return t?(r&&(n=r-o)>0?a=a.charAt(0)+"."+a.slice(1)+Vz(n):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+Vz(-i-1)+a,r&&(n=r-o)>0&&(a+=Vz(n))):i>=o?(a+=Vz(i+1-o),r&&(n=r-i-1)>0&&(a=a+"."+Vz(n))):((n=i+1)<o&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-o)>0&&(i+1===o&&(a+="."),a+=Vz(n))),e.s<0?"-"+a:a}function Xz(e,t){if(e.length>t)return e.length=t,!0}function Jz(e){if(!e||"object"!=typeof e)throw Error(jz+"Object expected");var t,r,n,i=["precision",1,kz,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if(void 0!==(n=e[r=i[t]])){if(!(Nz(n)===n&&n>=i[t+1]&&n<=i[t+2]))throw Error(Fz+r+": "+n);this[r]=n}if(void 0!==(n=e[r="LN10"])){if(n!=Math.LN10)throw Error(Fz+r+": "+n);this[r]=new this(n)}return this}var Zz=function e(t){var r,n,i;function a(e){var t=this;if(!(t instanceof a))return new a(e);if(t.constructor=a,e instanceof a)return t.s=e.s,t.e=e.e,void(t.d=(e=e.d)?e.slice():e);if("number"==typeof e){if(0*e!=0)throw Error(Fz+e);if(e>0)t.s=1;else{if(!(e<0))return t.s=0,t.e=0,void(t.d=[0]);e=-e,t.s=-1}return e===~~e&&e<1e7?(t.e=0,void(t.d=[e])):Wz(t,e.toString())}if("string"!=typeof e)throw Error(Fz+e);if(45===e.charCodeAt(0)?(e=e.slice(1),t.s=-1):t.s=1,!Oz.test(e))throw Error(Fz+e);Wz(t,e)}if(a.prototype=Mz,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=e,a.config=a.set=Jz,void 0===t&&(t={}),t)for(i=["precision","rounding","toExpNeg","toExpPos","LN10"],r=0;r<i.length;)t.hasOwnProperty(n=i[r++])||(t[n]=this[n]);return a.config(t),a}({precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"});Ez=new Zz(1);const eV=Zz;function tV(e){return 0===e?1:Math.floor(new eV(e).abs().log(10).toNumber())+1}function rV(e,t,r){for(var n=new eV(e),i=0,a=[];n.lt(t)&&i<1e5;)a.push(n.toNumber()),n=n.add(r),i++;return a}var nV=e=>{var[t,r]=e,[n,i]=[t,r];return t>r&&([n,i]=[r,t]),[n,i]},iV=(e,t,r)=>{if(e.lte(0))return new eV(0);var n=tV(e.toNumber()),i=new eV(10).pow(n),a=e.div(i),o=1!==n?.05:.1,s=new eV(Math.ceil(a.div(o).toNumber())).add(r).mul(o).mul(i);return new eV(t?s.toNumber():Math.ceil(s.toNumber()))},aV=function(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new eV(0),tickMin:new eV(0),tickMax:new eV(0)};var a,o=iV(new eV(t).sub(e).div(r-1),n,i);a=e<=0&&t>=0?new eV(0):(a=new eV(e).add(t).div(2)).sub(new eV(a).mod(o));var s=Math.ceil(a.sub(e).div(o).toNumber()),A=Math.ceil(new eV(t).sub(a).div(o).toNumber()),l=s+A+1;return l>r?aV(e,t,r,n,i+1):(l<r&&(A=t>0?A+(r-l):A,s=t>0?s:s+(r-l)),{step:o,tickMin:a.sub(new eV(s).mul(o)),tickMax:a.add(new eV(A).mul(o))})},oV=function(e){var[t,r]=e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=Math.max(n,2),[o,s]=nV([t,r]);if(o===-1/0||s===1/0){var A=s===1/0?[o,...Array(n-1).fill(1/0)]:[...Array(n-1).fill(-1/0),s];return t>r?A.reverse():A}if(o===s)return((e,t,r)=>{var n=new eV(1),i=new eV(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new eV(10).pow(tV(e)-1),i=new eV(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new eV(Math.floor(e)))}else 0===e?i=new eV(Math.floor((t-1)/2)):r||(i=new eV(Math.floor(e)));for(var o=Math.floor((t-1)/2),s=[],A=0;A<t;A++)s.push(i.add(new eV(A-o).mul(n)).toNumber());return s})(o,n,i);var{step:l,tickMin:c,tickMax:u}=aV(o,s,a,i,0),d=rV(c,u.add(new eV(.1).mul(l)),l);return t>r?d.reverse():d},sV=e=>e.rootProps.maxBarSize,AV=e=>e.rootProps.barCategoryGap,lV=e=>e.rootProps.stackOffset,cV=e=>e.rootProps.reverseStackOrder,uV=e=>e.options.chartName,dV=e=>e.rootProps.syncId,hV=e=>e.rootProps.syncMethod,pV=e=>e.options.eventEmitter,fV={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},mV=(e,t)=>{if(e&&t)return null!=e&&e.reversed?[t[1],t[0]]:t};function gV(e,t,r){return"auto"!==r?r:null!=e?ZI(e,t)?"category":"number":void 0}function yV(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function vV(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?yV(Object(r),!0).forEach(function(t){xV(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yV(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function xV(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var wV={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:0,includeHidden:!1,name:void 0,reversed:!1,scale:"auto",tick:!0,tickCount:void 0,ticks:void 0,type:"auto",unit:void 0},bV={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,dataKey:void 0,domain:void 0,id:0,includeHidden:!1,name:void 0,reversed:!1,scale:"auto",tick:!0,tickCount:5,ticks:void 0,type:"auto",unit:void 0},BV=NN([(e,t)=>{if(null!=t)return e.polarAxis.angleAxis[t]},fP],(e,t)=>{var r;if(null!=e)return e;var n=null!==(r=gV(t,"angleAxis",wV.type))&&void 0!==r?r:"category";return vV(vV({},wV),{},{type:n})}),CV=NN([(e,t)=>e.polarAxis.radiusAxis[t],fP],(e,t)=>{var r;if(null!=e)return e;var n=null!==(r=gV(t,"radiusAxis",bV.type))&&void 0!==r?r:"category";return vV(vV({},bV),{},{type:n})}),EV=e=>e.polarOptions,kV=NN([dT,hT,jT],fL),SV=NN([EV,kV],(e,t)=>{if(null!=e)return Kj(e.innerRadius,t,0)}),jV=NN([EV,kV],(e,t)=>{if(null!=e)return Kj(e.outerRadius,t,.8*t)}),FV=NN([EV],e=>{if(null==e)return[0,0];var{startAngle:t,endAngle:r}=e;return[t,r]});NN([BV,FV],mV);var QV=NN([kV,SV,jV],(e,t,r)=>{if(null!=e&&null!=t&&null!=r)return[t,r]});NN([CV,QV],mV);var NV=NN([dP,EV,SV,jV,dT,hT],(e,t,r,n,i,a)=>{if(("centric"===e||"radial"===e)&&null!=t&&null!=r&&null!=n){var{cx:o,cy:s,startAngle:A,endAngle:l}=t;return{cx:Kj(o,i,i/2),cy:Kj(s,a,a/2),innerRadius:r,outerRadius:n,startAngle:A,endAngle:l,clockWise:!1}}}),UV=(e,t)=>t,OV=(e,t,r)=>r;function IV(e){return null==e?void 0:e.id}function TV(e,t,r){var{chartData:n=[]}=t,{allowDuplicatedCategory:i,dataKey:a}=r,o=new Map;return e.forEach(e=>{var t,r=null!==(t=e.data)&&void 0!==t?t:n;if(null!=r&&0!==r.length){var s=IV(e);r.forEach((t,r)=>{var n,A=null==a||i?r:String(JI(t,a,null)),l=JI(t,e.dataKey,0);n=o.has(A)?o.get(A):{},Object.assign(n,{[s]:l}),o.set(A,n)})}}),Array.from(o.values())}function PV(e){return"stackId"in e&&null!=e.stackId&&null!=e.dataKey}var MV=(e,t)=>e===t||null!=e&&null!=t&&(e[0]===t[0]&&e[1]===t[1]);function DV(e,t){return!(!Array.isArray(e)||!Array.isArray(t)||0!==e.length||0!==t.length)||e===t}var LV=e=>{var t=dP(e);return"horizontal"===t?"xAxis":"vertical"===t?"yAxis":"centric"===t?"angleAxis":"radiusAxis"},HV=e=>e.tooltip.settings.axisId;function _V(e){var t=e.ticks,r=e.bandwidth,n=e.range(),i=[Math.min(...n),Math.max(...n)];return{domain:()=>e.domain(),range:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(()=>i),rangeMin:()=>i[0],rangeMax:()=>i[1],isInRange(e){var t=i[0],r=i[1];return t<=r?e>=t&&e<=r:e>=r&&e<=t},bandwidth:r?()=>r.call(e):void 0,ticks:t?r=>t.call(e,r):void 0,map:(t,r)=>{var n=e(t);if(null!=n){if(e.bandwidth&&null!=r&&r.position){var i=e.bandwidth();switch(r.position){case"middle":n+=i/2;break;case"end":n+=i}}return n}}}}function RV(e,t,r){if("function"==typeof e)return _V(e.copy().domain(t).range(r));if(null!=e){var n=function(e){if(e in yz)return yz[e]();var t="scale".concat(Gj(e));return t in yz?yz[t]():void 0}(e);if(null!=n)return n.domain(t).range(r),_V(n)}}var KV=(e,t)=>{if(null!=t){if("linear"===e){if(!bz(t)){for(var r,n,i=0;i<t.length;i++){var a=t[i];WI(a)&&((void 0===r||a<r)&&(r=a),(void 0===n||a>n)&&(n=a))}return void 0!==r&&void 0!==n?[r,n]:void 0}return t}return t}};function zV(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function VV(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?zV(Object(r),!0).forEach(function(t){$V(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zV(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function $V(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var WV=[0,"auto"],GV={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0},qV=(e,t)=>e.cartesianAxis.xAxis[t],YV=(e,t)=>{var r=qV(e,t);return null==r?GV:r},XV={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:WV,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,width:60},JV=(e,t)=>e.cartesianAxis.yAxis[t],ZV=(e,t)=>{var r=JV(e,t);return null==r?XV:r},e$={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},t$=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return null==r?e$:r},r$=(e,t,r)=>{switch(t){case"xAxis":return YV(e,r);case"yAxis":return ZV(e,r);case"zAxis":return t$(e,r);case"angleAxis":return BV(e,r);case"radiusAxis":return CV(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},n$=(e,t,r)=>{switch(t){case"xAxis":return YV(e,r);case"yAxis":return ZV(e,r);case"angleAxis":return BV(e,r);case"radiusAxis":return CV(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},i$=e=>e.graphicalItems.cartesianItems.some(e=>"bar"===e.type)||e.graphicalItems.polarItems.some(e=>"radialBar"===e.type);function a$(e,t){return r=>{switch(e){case"xAxis":return"xAxisId"in r&&r.xAxisId===t;case"yAxis":return"yAxisId"in r&&r.yAxisId===t;case"zAxis":return"zAxisId"in r&&r.zAxisId===t;case"angleAxis":return"angleAxisId"in r&&r.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in r&&r.radiusAxisId===t;default:return!1}}}var o$=e=>e.graphicalItems.cartesianItems,s$=NN([UV,OV],a$),A$=(e,t,r)=>e.filter(r).filter(e=>!0===(null==t?void 0:t.includeHidden)||!e.hide),l$=NN([o$,r$,s$],A$,{memoizeOptions:{resultEqualityCheck:DV}}),c$=NN([l$],e=>e.filter(e=>"area"===e.type||"bar"===e.type).filter(PV)),u$=e=>e.filter(e=>!("stackId"in e)||void 0===e.stackId),d$=NN([l$],u$),h$=e=>e.map(e=>e.data).filter(Boolean).flat(1),p$=NN([l$],h$,{memoizeOptions:{resultEqualityCheck:DV}}),f$=(e,t)=>{var{chartData:r=[],dataStartIndex:n,dataEndIndex:i}=t;return e.length>0?e:r.slice(n,i+1)},m$=NN([p$,wz],f$),g$=(e,t,r)=>null!=(null==t?void 0:t.dataKey)?e.map(e=>({value:JI(e,t.dataKey)})):r.length>0?r.map(e=>e.dataKey).flatMap(t=>e.map(e=>({value:JI(e,t)}))):e.map(e=>({value:e})),y$=NN([m$,r$,l$],g$);function v$(e,t){switch(e){case"xAxis":return"x"===t.direction;case"yAxis":return"y"===t.direction;default:return!1}}function x$(e){if(Hj(e)||e instanceof Date){var t=Number(e);if(WI(t))return t}}function w$(e){if(Array.isArray(e)){var t=[x$(e[0]),x$(e[1])];return bz(t)?t:void 0}var r=x$(e);if(null!=r)return[r,r]}function b$(e){return e.map(x$).filter(qj)}var B$=e=>{var t=LV(e),r=HV(e);return n$(e,t,r)},C$=NN([B$],e=>null==e?void 0:e.dataKey),E$=NN([c$,wz,B$],TV),k$=(e,t,r,n)=>{var i=t.reduce((e,t)=>{if(null==t.stackId)return e;var r=e[t.stackId];return null==r&&(r=[]),r.push(t),e[t.stackId]=r,e},{});return Object.fromEntries(Object.entries(i).map(t=>{var[i,a]=t,o=n?[...a].reverse():a,s=o.map(IV);return[i,{stackedData:nT(e,s,r),graphicalItems:o}]}))},S$=NN([E$,c$,lV,cV],k$),j$=(e,t,r,n)=>{var{dataStartIndex:i,dataEndIndex:a}=t;if(null==n&&"zAxis"!==r){var o=oT(e,i,a);if(null==o||0!==o[0]||0!==o[1])return o}},F$=NN([r$],e=>e.allowDataOverflow),Q$=e=>{var t;if(null==e||!("domain"in e))return WV;if(null!=e.domain)return e.domain;if("ticks"in e&&null!=e.ticks){if("number"===e.type){var r=b$(e.ticks);return[Math.min(...r),Math.max(...r)]}if("category"===e.type)return e.ticks.map(String)}return null!==(t=null==e?void 0:e.domain)&&void 0!==t?t:WV},N$=NN([r$],Q$),U$=NN([N$,F$],Cz),O$=NN([S$,vz,UV,U$],j$,{memoizeOptions:{resultEqualityCheck:MV}}),I$=e=>e.errorBars,T$=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t.filter(Boolean);if(0!==n.length){var i=n.flat();return[Math.min(...i),Math.max(...i)]}},P$=(e,t,r,n,i)=>{var a,o;if(r.length>0&&e.forEach(e=>{r.forEach(r=>{var s,A,l=null===(s=n[r.id])||void 0===s?void 0:s.filter(e=>v$(i,e)),c=JI(e,null!==(A=t.dataKey)&&void 0!==A?A:r.dataKey),u=function(e,t,r){return!r||"number"!=typeof t||Mj(t)?[]:r.length?b$(r.flatMap(r=>{var n,i,a=JI(e,r.dataKey);if(Array.isArray(a)?[n,i]=a:n=i=a,WI(n)&&WI(i))return[t-n,t+i]})):[]}(e,c,l);if(u.length>=2){var d=Math.min(...u),h=Math.max(...u);(null==a||d<a)&&(a=d),(null==o||h>o)&&(o=h)}var p=w$(c);null!=p&&(a=null==a?p[0]:Math.min(a,p[0]),o=null==o?p[1]:Math.max(o,p[1]))})}),null!=(null==t?void 0:t.dataKey)&&e.forEach(e=>{var r=w$(JI(e,t.dataKey));null!=r&&(a=null==a?r[0]:Math.min(a,r[0]),o=null==o?r[1]:Math.max(o,r[1]))}),WI(a)&&WI(o))return[a,o]},M$=NN([m$,r$,d$,I$,UV],P$,{memoizeOptions:{resultEqualityCheck:MV}});function D$(e){var{value:t}=e;if(Hj(t)||t instanceof Date)return t}var L$=e=>e.referenceElements.dots,H$=(e,t,r)=>e.filter(e=>"extendDomain"===e.ifOverflow).filter(e=>"xAxis"===t?e.xAxisId===r:e.yAxisId===r),_$=NN([L$,UV,OV],H$),R$=e=>e.referenceElements.areas,K$=NN([R$,UV,OV],H$),z$=e=>e.referenceElements.lines,V$=NN([z$,UV,OV],H$),$$=(e,t)=>{if(null!=e){var r=b$(e.map(e=>"xAxis"===t?e.x:e.y));if(0!==r.length)return[Math.min(...r),Math.max(...r)]}},W$=NN(_$,UV,$$),G$=(e,t)=>{if(null!=e){var r=b$(e.flatMap(e=>["xAxis"===t?e.x1:e.y1,"xAxis"===t?e.x2:e.y2]));if(0!==r.length)return[Math.min(...r),Math.max(...r)]}},q$=NN([K$,UV],G$);var Y$=(e,t)=>{if(null!=e){var r=e.flatMap(e=>"xAxis"===t?function(e){var t;if(null!=e.x)return b$([e.x]);var r=null===(t=e.segment)||void 0===t?void 0:t.map(e=>e.x);return null==r||0===r.length?[]:b$(r)}(e):function(e){var t;if(null!=e.y)return b$([e.y]);var r=null===(t=e.segment)||void 0===t?void 0:t.map(e=>e.y);return null==r||0===r.length?[]:b$(r)}(e));if(0!==r.length)return[Math.min(...r),Math.max(...r)]}},X$=NN([V$,UV],Y$),J$=NN(W$,X$,q$,(e,t,r)=>T$(e,r,t)),Z$=(e,t,r,n,i,a,o,s)=>null!=r?r:function(e,t,r){if(r||null!=t){if("function"==typeof e&&null!=t)try{var n=e(t,r);if(bz(n))return Bz(n,t,r)}catch(h){}if(Array.isArray(e)&&2===e.length){var i,a,[o,s]=e;if("auto"===o)null!=t&&(i=Math.min(...t));else if(Lj(o))i=o;else if("function"==typeof o)try{null!=t&&(i=o(null==t?void 0:t[0]))}catch(p){}else if("string"==typeof o&&sT.test(o)){var A=sT.exec(o);if(null==A||null==A[1]||null==t)i=void 0;else{var l=+A[1];i=t[0]-l}}else i=null==t?void 0:t[0];if("auto"===s)null!=t&&(a=Math.max(...t));else if(Lj(s))a=s;else if("function"==typeof s)try{null!=t&&(a=s(null==t?void 0:t[1]))}catch(f){}else if("string"==typeof s&&AT.test(s)){var c=AT.exec(s);if(null==c||null==c[1]||null==t)a=void 0;else{var u=+c[1];a=t[1]+u}}else a=null==t?void 0:t[1];var d=[i,a];if(bz(d))return null==t?d:Bz(d,t,r)}}}(t,"vertical"===o&&"xAxis"===s||"horizontal"===o&&"yAxis"===s?T$(n,a,i):T$(a,i),e.allowDataOverflow),eW=NN([r$,N$,U$,O$,M$,J$,dP,UV],Z$,{memoizeOptions:{resultEqualityCheck:MV}}),tW=[0,1],rW=(e,t,r,n,i,a,o)=>{if(null!=e&&null!=r&&0!==r.length||void 0!==o){var s,{dataKey:A,type:l}=e,c=ZI(t,a);return c&&null==A?DL(0,null!==(s=null==r?void 0:r.length)&&void 0!==s?s:0):"category"===l?((e,t,r)=>{var n=e.map(D$).filter(e=>null!=e);return r&&(null==t.dataKey||t.allowDuplicatedCategory&&zj(n))?DL(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))})(n,e,c):"expand"===i?tW:o}},nW=NN([r$,dP,m$,y$,lV,UV,eW],rW);var iW=(e,t,r)=>{if(null!=e){var{scale:n,type:i}=e;if("auto"===n)return"category"===i&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!t)?"point":"category"===i?"band":"linear";if("string"==typeof n){var a="scale".concat(Gj(n));return function(e){return e in yz}(a)?a:"point"}}},aW=NN([r$,i$,uV],iW);function oW(e,t,r,n){if(null!=r&&null!=n)return"function"==typeof e.scale?RV(e.scale,r,n):RV(t,r,n)}var sW=(e,t,r)=>{var n=Q$(t);if("auto"===r||"linear"===r)return null!=t&&t.tickCount&&Array.isArray(n)&&("auto"===n[0]||"auto"===n[1])&&bz(e)?oV(e,t.tickCount,t.allowDecimals):null!=t&&t.tickCount&&"number"===t.type&&bz(e)?function(e,t){var[r,n]=e,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],[a,o]=nV([r,n]);if(a===-1/0||o===1/0)return[r,n];if(a===o)return[a];var s=Math.max(t,2),A=iV(new eV(o).sub(a).div(s-1),i,0),l=[...rV(new eV(a),new eV(o),A),o];return!1===i&&(l=l.map(e=>Math.round(e))),r>n?l.reverse():l}(e,t.tickCount,t.allowDecimals):void 0},AW=NN([nW,n$,aW],sW),lW=(e,t,r,n)=>{if("angleAxis"!==n&&"number"===(null==e?void 0:e.type)&&bz(t)&&Array.isArray(r)&&r.length>0){var i,a,o=t[0],s=null!==(i=r[0])&&void 0!==i?i:0,A=t[1],l=null!==(a=r[r.length-1])&&void 0!==a?a:0;return[Math.min(o,s),Math.max(A,l)]}return t},cW=NN([r$,nW,AW,UV],lW),uW=NN(y$,r$,(e,t)=>{if(t&&"number"===t.type){var r=1/0,n=Array.from(b$(e.map(e=>e.value))).sort((e,t)=>e-t),i=n[0],a=n[n.length-1];if(null==i||null==a)return 1/0;var o=a-i;if(0===o)return 1/0;for(var s=0;s<n.length-1;s++){var A=n[s],l=n[s+1];if(null!=A&&null!=l){var c=l-A;r=Math.min(r,c)}}return r/o}}),dW=NN(uW,dP,AV,jT,(e,t,r,n,i)=>i,(e,t,r,n,i)=>{if(!WI(e))return 0;var a="vertical"===t?n.height:n.width;if("gap"===i)return e*a/2;if("no-gap"===i){var o=Kj(r,e*a),s=e*a/2;return s-o-(s-o)/a*o}return 0}),hW=NN(YV,(e,t,r)=>{var n=YV(e,t);return null==n||"string"!=typeof n.padding?0:dW(e,"xAxis",t,r,n.padding)},(e,t)=>{var r,n;if(null==e)return{left:0,right:0};var{padding:i}=e;return"string"==typeof i?{left:t,right:t}:{left:(null!==(r=i.left)&&void 0!==r?r:0)+t,right:(null!==(n=i.right)&&void 0!==n?n:0)+t}}),pW=NN(ZV,(e,t,r)=>{var n=ZV(e,t);return null==n||"string"!=typeof n.padding?0:dW(e,"yAxis",t,r,n.padding)},(e,t)=>{var r,n;if(null==e)return{top:0,bottom:0};var{padding:i}=e;return"string"==typeof i?{top:t,bottom:t}:{top:(null!==(r=i.top)&&void 0!==r?r:0)+t,bottom:(null!==(n=i.bottom)&&void 0!==n?n:0)+t}}),fW=NN([jT,hW,TT,IT,(e,t,r)=>r],(e,t,r,n,i)=>{var{padding:a}=n;return i?[a.left,r.width-a.right]:[e.left+t.left,e.left+e.width-t.right]}),mW=NN([jT,dP,pW,TT,IT,(e,t,r)=>r],(e,t,r,n,i,a)=>{var{padding:o}=i;return a?[n.height-o.bottom,o.top]:"horizontal"===t?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),gW=(e,t,r,n)=>{var i;switch(t){case"xAxis":return fW(e,r,n);case"yAxis":return mW(e,r,n);case"zAxis":return null===(i=t$(e,r))||void 0===i?void 0:i.range;case"angleAxis":return FV(e);case"radiusAxis":return QV(e,r);default:return}},yW=NN([r$,gW],mV),vW=NN([aW,cW],KV),xW=NN([r$,aW,vW,yW],oW);function wW(e,t){return e.id<t.id?-1:e.id>t.id?1:0}NN([l$,I$,UV],(e,t,r)=>e.flatMap(e=>t[e.id]).filter(Boolean).filter(e=>v$(r,e)));var bW=(e,t)=>t,BW=(e,t,r)=>r,CW=NN(mT,bW,BW,(e,t,r)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===r).sort(wW)),EW=NN(gT,bW,BW,(e,t,r)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===r).sort(wW)),kW=(e,t)=>({width:e.width,height:t.height}),SW=NN(jT,YV,kW),jW=NN(hT,jT,CW,bW,BW,(e,t,r,n,i)=>{var a,o={};return r.forEach(r=>{var s=kW(t,r);null==a&&(a=((e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}})(t,n,e));var A="top"===n&&!i||"bottom"===n&&i;o[r.id]=a-Number(A)*s.height,a+=(A?-1:1)*s.height}),o}),FW=NN(dT,jT,EW,bW,BW,(e,t,r,n,i)=>{var a,o={};return r.forEach(r=>{var s=((e,t)=>({width:"number"==typeof t.width?t.width:60,height:e.height}))(t,r);null==a&&(a=((e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}})(t,n,e));var A="left"===n&&!i||"right"===n&&i;o[r.id]=a-Number(A)*s.width,a+=(A?-1:1)*s.width}),o}),QW=NN([jT,YV,(e,t)=>{var r=YV(e,t);if(null!=r)return jW(e,r.orientation,r.mirror)},(e,t)=>t],(e,t,r,n)=>{if(null!=t){var i=null==r?void 0:r[n];return null==i?{x:e.left,y:0}:{x:e.left,y:i}}}),NW=NN([jT,ZV,(e,t)=>{var r=ZV(e,t);if(null!=r)return FW(e,r.orientation,r.mirror)},(e,t)=>t],(e,t,r,n)=>{if(null!=t){var i=null==r?void 0:r[n];return null==i?{x:0,y:e.top}:{x:i,y:e.top}}}),UW=NN(jT,ZV,(e,t)=>({width:"number"==typeof t.width?t.width:60,height:e.height})),OW=(e,t,r)=>{switch(t){case"xAxis":return SW(e,r).width;case"yAxis":return UW(e,r).height;default:return}},IW=(e,t,r,n)=>{if(null!=r){var{allowDuplicatedCategory:i,type:a,dataKey:o}=r,s=ZI(e,n),A=t.map(e=>e.value);return o&&s&&"category"===a&&i&&zj(A)?A:void 0}},TW=NN([dP,y$,r$,UV],IW),PW=(e,t,r,n)=>{if(null!=r&&null!=r.dataKey){var{type:i,scale:a}=r;return!ZI(e,n)||"number"!==i&&"auto"===a?void 0:t.map(e=>e.value)}},MW=NN([dP,y$,n$,UV],PW),DW=NN([dP,(e,t,r)=>{switch(t){case"xAxis":return YV(e,r);case"yAxis":return ZV(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},aW,xW,TW,MW,gW,AW,UV],(e,t,r,n,i,a,o,s,A)=>{if(null!=t){var l=ZI(e,A);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:A,categoricalDomain:a,duplicateDomain:i,isCategorical:l,niceTicks:s,range:o,realScaleType:r,scale:n}}}),LW=NN([dP,n$,aW,xW,AW,gW,TW,MW,UV],(e,t,r,n,i,a,o,s,A)=>{if(null!=t&&null!=n){var l=ZI(e,A),{type:c,ticks:u,tickCount:d}=t,h="scaleBand"===r&&"function"==typeof n.bandwidth?n.bandwidth()/2:2,p="category"===c&&n.bandwidth?n.bandwidth()/h:0;p="angleAxis"===A&&null!=a&&a.length>=2?2*Pj(a[0]-a[1])*p:p;var f=u||i;return f?f.map((e,t)=>{var r=o?o.indexOf(e):e,i=n.map(r);return WI(i)?{index:t,coordinate:i+p,value:e,offset:p}:null}).filter(qj):l&&s?s.map((e,t)=>{var r=n.map(e);return WI(r)?{coordinate:r+p,value:e,index:t,offset:p}:null}).filter(qj):n.ticks?n.ticks(d).map((e,t)=>{var r=n.map(e);return WI(r)?{coordinate:r+p,value:e,index:t,offset:p}:null}).filter(qj):n.domain().map((e,t)=>{var r=n.map(e);return WI(r)?{coordinate:r+p,value:o?o[e]:e,index:t,offset:p}:null}).filter(qj)}}),HW=NN([dP,n$,xW,gW,TW,MW,UV],(e,t,r,n,i,a,o)=>{if(null!=t&&null!=r&&null!=n&&n[0]!==n[1]){var s=ZI(e,o),{tickCount:A}=t,l=0;return l="angleAxis"===o&&(null==n?void 0:n.length)>=2?2*Pj(n[0]-n[1])*l:l,s&&a?a.map((e,t)=>{var n=r.map(e);return WI(n)?{coordinate:n+l,value:e,index:t,offset:l}:null}).filter(qj):r.ticks?r.ticks(A).map((e,t)=>{var n=r.map(e);return WI(n)?{coordinate:n+l,value:e,index:t,offset:l}:null}).filter(qj):r.domain().map((e,t)=>{var n=r.map(e);return WI(n)?{coordinate:n+l,value:i?i[e]:e,index:t,offset:l}:null}).filter(qj)}}),_W=NN(r$,xW,(e,t)=>{if(null!=e&&null!=t)return VV(VV({},e),{},{scale:t})}),RW=NN([r$,aW,nW,yW],oW),KW=NN((e,t,r)=>t$(e,r),RW,(e,t)=>{if(null!=e&&null!=t)return VV(VV({},e),{},{scale:t})}),zW=NN([dP,mT,gT],(e,t,r)=>{switch(e){case"horizontal":return t.some(e=>e.reversed)?"right-to-left":"left-to-right";case"vertical":return r.some(e=>e.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),VW=e=>e.options.defaultTooltipEventType,$W=e=>e.options.validateTooltipEventTypes;function WW(e,t,r){if(null==e)return t;var n=e?"axis":"item";return null==r?t:r.includes(n)?n:t}function GW(e,t){return WW(t,VW(e),$W(e))}var qW=(e,t)=>{var r,n=Number(t);if(!Mj(n)&&null!=t)return n>=0?null==e||null===(r=e[n])||void 0===r?void 0:r.value:void 0},YW={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},XW=oI({name:"tooltip",initialState:{itemInteraction:{click:YW,hover:YW},axisInteraction:{click:YW,hover:YW},keyboardInteraction:YW,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:YO()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:r,next:n}=t.payload,i=kO(e).tooltipItemPayloads.indexOf(r);i>-1&&(e.tooltipItemPayloads[i]=n)},prepare:YO()},removeTooltipEntrySettings:{reducer(e,t){var r=kO(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:YO()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),{addTooltipEntrySettings:JW,replaceTooltipEntrySettings:ZW,removeTooltipEntrySettings:eG,setTooltipSettingsState:tG,setActiveMouseOverItemIndex:rG,mouseLeaveItem:nG,mouseLeaveChart:iG,setActiveClickItemIndex:aG,setMouseOverAxisIndex:oG,setMouseClickAxisIndex:sG,setSyncInteraction:AG,setKeyboardInteraction:lG}=XW.actions,cG=XW.reducer;function uG(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function dG(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?uG(Object(r),!0).forEach(function(t){hG(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uG(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function hG(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var pG=(e,t,r,n)=>{if(null==t)return YW;var i=function(e,t,r){return"axis"===t?"click"===r?e.axisInteraction.click:e.axisInteraction.hover:"click"===r?e.itemInteraction.click:e.itemInteraction.hover}(e,t,r);if(null==i)return YW;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&null!=e.syncInteraction.index)return e.syncInteraction;var a=!0===e.settings.active;if(null!=i.index){if(a)return dG(dG({},i),{},{active:!0})}else if(null!=n)return{active:!0,coordinate:void 0,dataKey:void 0,index:n,graphicalItemId:void 0};return dG(dG({},YW),{},{coordinate:i.coordinate})};function fG(e,t){var r=function(e){if("number"==typeof e)return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var r=Number(e);return Number.isFinite(r)?r:void 0}(e),n=t[0],i=t[1];if(void 0===r)return!1;var a=Math.min(n,i),o=Math.max(n,i);return r>=a&&r<=o}var mG=(e,t,r,n)=>{var i=null==e?void 0:e.index;if(null==i)return null;var a=Number(i);if(!WI(a))return i;var o=1/0;t.length>0&&(o=t.length-1);var s=Math.max(0,Math.min(a,o)),A=t[s];return null==A||function(e,t,r){if(null==r||null==t)return!0;var n=JI(e,t);return null==n||!bz(r)||fG(n,r)}(A,r,n)?String(s):null},gG=(e,t,r,n,i,a,o)=>{if(null!=a){var s=o[0],A=null==s?void 0:s.getPosition(a);if(null!=A)return A;var l=null==i?void 0:i[Number(a)];if(l)return"horizontal"===r?{x:l.coordinate,y:(n.top+t)/2}:{x:(n.left+e)/2,y:l.coordinate}}},yG=(e,t,r,n)=>{if("axis"===t)return e.tooltipItemPayloads;if(0===e.tooltipItemPayloads.length)return[];var i;if(null==(i="hover"===r?e.itemInteraction.hover.graphicalItemId:e.itemInteraction.click.graphicalItemId)&&null!=n){var a=e.tooltipItemPayloads[0];return null!=a?[a]:[]}return e.tooltipItemPayloads.filter(e=>{var t;return(null===(t=e.settings)||void 0===t?void 0:t.graphicalItemId)===i})},vG=e=>e.options.tooltipPayloadSearcher,xG=e=>e.tooltip;function wG(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function bG(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?wG(Object(r),!0).forEach(function(t){BG(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wG(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function BG(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var CG=(e,t,r,n,i,a,o)=>{if(null!=t&&null!=a){var{chartData:s,computedData:A,dataStartIndex:l,dataEndIndex:c}=r;return e.reduce((e,r)=>{var u,d,h,{dataDefinedOnItem:p,settings:f}=r,m=function(e,t){return null!=e?e:t}(p,s),g=Array.isArray(m)?$I(m,l,c):m,y=null!==(u=null==f?void 0:f.dataKey)&&void 0!==u?u:n,v=null==f?void 0:f.nameKey;(d=n&&Array.isArray(g)&&!Array.isArray(g[0])&&"axis"===o?$j(g,n,i):a(g,t,A,v),Array.isArray(d))?d.forEach(t=>{var r=bG(bG({},f),{},{name:t.name,unit:t.unit,color:void 0,fill:void 0});e.push(cT({tooltipEntrySettings:r,dataKey:t.dataKey,payload:t.payload,value:JI(t.payload,t.dataKey),name:t.name}))}):e.push(cT({tooltipEntrySettings:f,dataKey:y,payload:d,value:JI(d,y),name:null!==(h=JI(d,v))&&void 0!==h?h:null==f?void 0:f.name}));return e},[])}},EG=NN([B$,i$,uV],iW),kG=NN([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),SG=NN([LV,HV],a$),jG=NN([kG,B$,SG],A$,{memoizeOptions:{resultEqualityCheck:DV}}),FG=NN([jG],e=>e.filter(PV)),QG=NN([jG],h$,{memoizeOptions:{resultEqualityCheck:DV}}),NG=NN([QG,vz],f$),UG=NN([FG,vz,B$],TV),OG=NN([NG,B$,jG],g$),IG=NN([B$],Q$),TG=NN([B$],e=>e.allowDataOverflow),PG=NN([IG,TG],Cz),MG=NN([jG],e=>e.filter(PV)),DG=NN([UG,MG,lV,cV],k$),LG=NN([DG,vz,LV,PG],j$),HG=NN([jG],u$),_G=NN([NG,B$,HG,I$,LV],P$,{memoizeOptions:{resultEqualityCheck:MV}}),RG=NN([L$,LV,HV],H$),KG=NN([RG,LV],$$),zG=NN([R$,LV,HV],H$),VG=NN([zG,LV],G$),$G=NN([z$,LV,HV],H$),WG=NN([$G,LV],Y$),GG=NN([KG,WG,VG],T$),qG=NN([B$,IG,PG,LG,_G,GG,dP,LV],Z$),YG=NN([B$,dP,NG,OG,lV,LV,qG],rW),XG=NN([YG,B$,EG],sW),JG=NN([B$,YG,XG,LV],lW),ZG=e=>{var t=LV(e),r=HV(e);return gW(e,t,r,!1)},eq=NN([B$,ZG],mV),tq=NN([B$,EG,JG,eq],oW),rq=NN([dP,OG,B$,LV],IW),nq=NN([dP,OG,B$,LV],PW),iq=NN([dP,B$,EG,tq,ZG,rq,nq,LV],(e,t,r,n,i,a,o,s)=>{if(t){var{type:A}=t,l=ZI(e,s);if(n){var c="scaleBand"===r&&n.bandwidth?n.bandwidth()/2:2,u="category"===A&&n.bandwidth?n.bandwidth()/c:0;return u="angleAxis"===s&&null!=i&&(null==i?void 0:i.length)>=2?2*Pj(i[0]-i[1])*u:u,l&&o?o.map((e,t)=>{var r=n.map(e);return WI(r)?{coordinate:r+u,value:e,index:t,offset:u}:null}).filter(qj):n.domain().map((e,t)=>{var r=n.map(e);return WI(r)?{coordinate:r+u,value:a?a[e]:e,index:t,offset:u}:null}).filter(qj)}}}),aq=NN([VW,$W,e=>e.tooltip.settings],(e,t,r)=>WW(r.shared,e,t)),oq=e=>e.tooltip.settings.trigger,sq=e=>e.tooltip.settings.defaultIndex,Aq=NN([xG,aq,oq,sq],pG),lq=NN([Aq,NG,C$,YG],mG),cq=NN([iq,lq],qW),uq=NN([Aq],e=>{if(e)return e.dataKey}),dq=NN([Aq],e=>{if(e)return e.graphicalItemId}),hq=NN([xG,aq,oq,sq],yG),pq=NN([dT,hT,dP,jT,iq,sq,hq],gG),fq=NN([Aq,pq],(e,t)=>null!=e&&e.coordinate?e.coordinate:t),mq=NN([Aq],e=>{var t;return null!==(t=null==e?void 0:e.active)&&void 0!==t&&t}),gq=NN([hq,lq,vz,C$,cq,vG,aq],CG),yq=NN([gq],e=>{if(null!=e){var t=e.map(e=>e.payload).filter(e=>null!=e);return Array.from(new Set(t))}});function vq(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function xq(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?vq(Object(r),!0).forEach(function(t){wq(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vq(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function wq(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var bq=()=>{var e=vN(B$),t=vN(iq),r=vN(tq);return lT(e&&r?xq(xq({},e),{},{scale:r}):void 0,t)};function Bq(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Cq(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Bq(Object(r),!0).forEach(function(t){Eq(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bq(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Eq(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var kq=(e,t,r,n,i)=>{var a,o=null!==(a=null==t?void 0:t.length)&&void 0!==a?a:0;if(o<=1||null==e)return 0;if("angleAxis"===n&&null!=i&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var s=0;s<o;s++){var A,l,c,u,d,h=s>0?null===(A=r[s-1])||void 0===A?void 0:A.coordinate:null===(l=r[o-1])||void 0===l?void 0:l.coordinate,p=null===(c=r[s])||void 0===c?void 0:c.coordinate,f=s>=o-1?null===(u=r[0])||void 0===u?void 0:u.coordinate:null===(d=r[s+1])||void 0===d?void 0:d.coordinate,m=void 0;if(null!=h&&null!=p&&null!=f)if(Pj(p-h)!==Pj(f-p)){var g=[];if(Pj(f-p)===Pj(i[1]-i[0])){m=f;var y=p+i[1]-i[0];g[0]=Math.min(y,(y+h)/2),g[1]=Math.max(y,(y+h)/2)}else{m=h;var v=f+i[1]-i[0];g[0]=Math.min(p,(v+p)/2),g[1]=Math.max(p,(v+p)/2)}var x,w=[Math.min(p,(m+p)/2),Math.max(p,(m+p)/2)];if(e>w[0]&&e<=w[1]||e>=g[0]&&e<=g[1])return null===(x=r[s])||void 0===x?void 0:x.index}else{var b,B=Math.min(h,f),C=Math.max(h,f);if(e>(B+p)/2&&e<=(C+p)/2)return null===(b=r[s])||void 0===b?void 0:b.index}}else if(t)for(var E=0;E<o;E++){var k=t[E];if(null!=k){var S=t[E+1],j=t[E-1];if(0===E&&null!=S&&e<=(k.coordinate+S.coordinate)/2)return k.index;if(E===o-1&&null!=j&&e>(k.coordinate+j.coordinate)/2)return k.index;if(E>0&&E<o-1&&null!=j&&null!=S&&e>(k.coordinate+j.coordinate)/2&&e<=(k.coordinate+S.coordinate)/2)return k.index}}return-1},Sq=(e,t)=>t,jq=(e,t,r)=>r,Fq=(e,t,r,n)=>n,Qq=NN(iq,e=>tU(e,e=>e.coordinate)),Nq=NN([xG,Sq,jq,Fq],pG),Uq=NN([Nq,NG,C$,YG],mG),Oq=NN([xG,Sq,jq,Fq],yG),Iq=NN([dT,hT,dP,jT,iq,Fq,Oq],gG),Tq=NN([Nq,Iq],(e,t)=>{var r;return null!==(r=e.coordinate)&&void 0!==r?r:t}),Pq=NN([iq,Uq],qW),Mq=NN([Oq,Uq,vz,C$,Pq,vG,Sq],CG),Dq=NN([Nq,Uq],(e,t)=>({isActive:e.active&&null!=t,activeIndex:t})),Lq=(e,t,r,n,i,a,o)=>{if(e&&n&&i&&a&&r){var s=yL(e,r);if(s){var A=((e,t)=>"centric"===t?e.angle:e.radius)(s,t),l=kq(A,o,a,n,i),c=((e,t,r,n)=>{var i=t.find(e=>e&&e.index===r);if(i){if("centric"===e){var a=i.coordinate,{radius:o}=n;return Cq(Cq(Cq({},n),pL(n.cx,n.cy,o,a)),{},{angle:a,radius:o})}var s=i.coordinate,{angle:A}=n;return Cq(Cq(Cq({},n),pL(n.cx,n.cy,s,A)),{},{angle:A,radius:s})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}})(t,a,l,s);return{activeIndex:String(l),activeCoordinate:c}}}},Hq=NN(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,r)=>r,(e,t,r)=>{if(null!=t){var n=e[t];if(null!=n)return r?n.panoramaElement:n.element}}),_q=NN(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(e=>parseInt(e,10)).concat(Object.values(fV));return Array.from(new Set(t)).sort((e,t)=>e-t)},{memoizeOptions:{resultEqualityCheck:function(e,t){if(e.length===t.length){for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return!1}}});function Rq(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Kq(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Rq(Object(r),!0).forEach(function(t){zq(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rq(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function zq(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Vq={zIndexMap:Object.values(fV).reduce((e,t)=>Kq(Kq({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),{})},$q=new Set(Object.values(fV));var Wq=oI({name:"zIndex",initialState:Vq,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]?e.zIndexMap[r].consumers+=1:e.zIndexMap[r]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:YO()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(e.zIndexMap[r].consumers-=1,e.zIndexMap[r].consumers<=0&&!function(e){return $q.has(e)}(r)&&delete e.zIndexMap[r])},prepare:YO()},registerZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:r,element:n,isPanorama:i}=t.payload;e.zIndexMap[r]?i?e.zIndexMap[r].panoramaElement=n:e.zIndexMap[r].element=n:e.zIndexMap[r]={consumers:0,element:i?void 0:n,panoramaElement:i?n:void 0}},prepare:YO()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(t.payload.isPanorama?e.zIndexMap[r].panoramaElement=void 0:e.zIndexMap[r].element=void 0)},prepare:YO()}}}),{registerZIndexPortal:Gq,unregisterZIndexPortal:qq,registerZIndexPortalElement:Yq,unregisterZIndexPortalElement:Xq}=Wq.actions,Jq=Wq.reducer;function Zq(e){var{zIndex:t,children:r}=e,n=void 0!==hP()&&void 0!==t&&0!==t,i=UT(),a=fN();Te.useLayoutEffect(()=>n?(a(Gq({zIndex:t})),()=>{a(qq({zIndex:t}))}):Yj,[a,t,n]);var o=vN(e=>Hq(e,t,i));return n?o?Pe.createPortal(r,o):null:r}function eY(){return eY=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},eY.apply(null,arguments)}function tY(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function rY(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?tY(Object(r),!0).forEach(function(t){nY(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tY(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function nY(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iY(e){var{cursor:t,cursorComp:r,cursorProps:n}=e;return Te.isValidElement(t)?Te.cloneElement(t,n):Te.createElement(r,n)}function aY(e){var t,r,n,i,{coordinate:a,payload:o,index:s,offset:A,tooltipAxisBandSize:l,layout:c,cursor:u,tooltipEventType:d,chartName:h}=e,p=a,f=o,m=s;if(!u||!p||"ScatterChart"!==h&&"axis"!==d)return null;if("ScatterChart"===h)r=p,n=iD,i=fV.cursorLine;else if("BarChart"===h)r=function(e,t,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:"horizontal"===e?t.x-i:r.left+.5,y:"horizontal"===e?r.top+.5:t.y-i,width:"horizontal"===e?n:r.width-1,height:"horizontal"===e?r.height-1:n}}(c,p,A,l),n=tL,i=fV.cursorRectangle;else if("radial"===c&&aF(p)){var{cx:g,cy:y,radius:v,startAngle:x,endAngle:w}=vL(p);r={cx:g,cy:y,startAngle:x,endAngle:w,innerRadius:v,outerRadius:v},n=EL,i=fV.cursorLine}else r={points:kL(c,p,A)},n=JM,i=fV.cursorLine;var b="object"==typeof u&&"className"in u?u.className:void 0,B=rY(rY(rY(rY({stroke:"#ccc",pointerEvents:"none"},A),r),Zk(u)),{},{payload:f,payloadIndex:m,className:yh("recharts-tooltip-cursor",b)});return De.createElement(Zq,{zIndex:null!==(t=e.zIndex)&&void 0!==t?t:i},De.createElement(iY,{cursor:u,cursorComp:n,cursorProps:B}))}function oY(e){var t=bq(),r=lP(),n=hP(),i=vN(uV);return null==t||null==r||null==n||null==i?null:De.createElement(aY,eY({},e,{offset:r,layout:n,tooltipAxisBandSize:t,chartName:i}))}var sY,AY=Te.createContext(null),lY={exports:{}};var cY=(sY||(sY=1,function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}function i(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function a(e,t,n,a,o){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new i(n,a||e,o),A=r?r+t:t;return e._events[A]?e._events[A].fn?e._events[A]=[e._events[A],s]:e._events[A].push(s):(e._events[A]=s,e._eventsCount++),e}function o(e,t){0===--e._eventsCount?e._events=new n:delete e._events[t]}function s(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),s.prototype.eventNames=function(){var e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=new Array(a);i<a;i++)o[i]=n[i].fn;return o},s.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},s.prototype.emit=function(e,t,n,i,a,o){var s=r?r+e:e;if(!this._events[s])return!1;var A,l,c=this._events[s],u=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),u){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,a),!0;case 6:return c.fn.call(c.context,t,n,i,a,o),!0}for(l=1,A=new Array(u-1);l<u;l++)A[l-1]=arguments[l];c.fn.apply(c.context,A)}else{var d,h=c.length;for(l=0;l<h;l++)switch(c[l].once&&this.removeListener(e,c[l].fn,void 0,!0),u){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,t);break;case 3:c[l].fn.call(c[l].context,t,n);break;case 4:c[l].fn.call(c[l].context,t,n,i);break;default:if(!A)for(d=1,A=new Array(u-1);d<u;d++)A[d-1]=arguments[d];c[l].fn.apply(c[l].context,A)}}return!0},s.prototype.on=function(e,t,r){return a(this,e,t,r,!1)},s.prototype.once=function(e,t,r){return a(this,e,t,r,!0)},s.prototype.removeListener=function(e,t,n,i){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return o(this,a),this;var s=this._events[a];if(s.fn)s.fn!==t||i&&!s.once||n&&s.context!==n||o(this,a);else{for(var A=0,l=[],c=s.length;A<c;A++)(s[A].fn!==t||i&&!s[A].once||n&&s[A].context!==n)&&l.push(s[A]);l.length?this._events[a]=1===l.length?l[0]:l:o(this,a)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&o(this,t)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s}(lY)),lY.exports);var uY=new(ay(cY)),dY="recharts.syncEvent.tooltip",hY="recharts.syncEvent.brush",pY=(e,t)=>{if(t&&Array.isArray(e)){var r=Number.parseInt(t,10);if(!Mj(r))return e[r]}},fY=oI({name:"options",initialState:{chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},reducers:{createEventEmitter:e=>{null==e.eventEmitter&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),mY=fY.reducer,{createEventEmitter:gY}=fY.actions;function yY(e){return e.tooltip.syncInteraction}var vY=oI({name:"chartData",initialState:{chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},reducers:{setChartData(e,t){if(e.chartData=t.payload,null==t.payload)return e.dataStartIndex=0,void(e.dataEndIndex=0);t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:r,endIndex:n}=t.payload;null!=r&&(e.dataStartIndex=r),null!=n&&(e.dataEndIndex=n)}}}),{setChartData:xY,setDataStartEndIndexes:wY,setComputedData:bY}=vY.actions,BY=vY.reducer,CY=["x","y"];function EY(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function kY(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?EY(Object(r),!0).forEach(function(t){SY(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):EY(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function SY(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jY(){var e=vN(dV),t=vN(pV),r=fN(),n=vN(hV),i=vN(iq),a=hP(),o=sP(),s=vN(e=>e.rootProps.className);Te.useEffect(()=>{if(null==e)return Yj;var s=(s,A,l)=>{var c;if(t!==l&&e===s)if("index"!==n){if(null!=i){var u;if("function"==typeof n){var d={activeTooltipIndex:null==A.payload.index?void 0:Number(A.payload.index),isTooltipActive:A.payload.active,activeIndex:null==A.payload.index?void 0:Number(A.payload.index),activeLabel:A.payload.label,activeDataKey:A.payload.dataKey,activeCoordinate:A.payload.coordinate},h=n(i,d);u=i[h]}else"value"===n&&(u=i.find(e=>String(e.value)===A.payload.label));var{coordinate:p}=A.payload;if(null!=u&&!1!==A.payload.active&&null!=p&&null!=o){var{x:f,y:m}=p,g=Math.min(f,o.x+o.width),y=Math.min(m,o.y+o.height),v={x:"horizontal"===a?u.coordinate:g,y:"horizontal"===a?y:u.coordinate},x=AG({active:A.payload.active,coordinate:v,dataKey:A.payload.dataKey,index:String(u.index),label:A.payload.label,sourceViewBox:A.payload.sourceViewBox,graphicalItemId:A.payload.graphicalItemId});r(x)}else r(AG({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}))}}else if(o&&null!=A&&null!==(c=A.payload)&&void 0!==c&&c.coordinate&&A.payload.sourceViewBox){var w=A.payload.coordinate,{x:b,y:B}=w,C=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(w,CY),{x:E,y:k,width:S,height:j}=A.payload.sourceViewBox,F=kY(kY({},C),{},{x:o.x+(S?(b-E)/S:0)*o.width,y:o.y+(j?(B-k)/j:0)*o.height});r(kY(kY({},A),{},{payload:kY(kY({},A.payload),{},{coordinate:F})}))}else r(A)};return uY.on(dY,s),()=>{uY.off(dY,s)}},[s,r,t,e,n,i,a,o])}function FY(){var e=fN();Te.useEffect(()=>{e(gY())},[e]),jY(),function(){var e=vN(dV),t=vN(pV),r=fN();Te.useEffect(()=>{if(null==e)return Yj;var n=(n,i,a)=>{t!==a&&e===n&&r(wY(i))};return uY.on(hY,n),()=>{uY.off(hY,n)}},[r,t,e])}()}function QY(e,t,r,n,i,a){var o=vN(r=>((e,t,r)=>{if(null!=t){var n=xG(e);return"axis"===t?"hover"===r?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:"hover"===r?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}})(r,e,t)),s=vN(pV),A=vN(dV),l=vN(hV),c=vN(yY),u=null==c?void 0:c.active,d=sP();Te.useEffect(()=>{if(!u&&null!=A&&null!=s){var e=AG({active:a,coordinate:r,dataKey:o,index:i,label:"number"==typeof n?String(n):n,sourceViewBox:d,graphicalItemId:void 0});uY.emit(dY,A,e,s)}},[u,r,o,i,n,s,A,l,a,d])}function NY(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function UY(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?NY(Object(r),!0).forEach(function(t){OY(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):NY(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function OY(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function IY(e){return e.dataKey}var TY=[],PY={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function MY(e){var t,r,n=cF(e,PY),{active:i,allowEscapeViewBox:a,animationDuration:o,animationEasing:s,content:A,filterNull:l,isAnimationActive:c,offset:u,payloadUniqBy:d,position:h,reverseDirection:p,useTranslate3d:f,wrapperStyle:m,cursor:g,shared:y,trigger:v,defaultIndex:x,portal:w,axisId:b}=n,B=fN(),C="number"==typeof x?String(x):x;Te.useEffect(()=>{B(tG({shared:y,trigger:v,axisId:b,active:i,defaultIndex:C}))},[B,y,v,b,i,C]);var E=sP(),k=HM(),S=function(e){return vN(t=>GW(t,e))}(y),{activeIndex:j,isActive:F}=null!==(t=vN(e=>Dq(e,S,v,C)))&&void 0!==t?t:{},Q=vN(e=>Mq(e,S,v,C)),N=vN(e=>Pq(e,S,v,C)),U=vN(e=>Tq(e,S,v,C)),O=Q,I=Te.useContext(AY),T=null!==(r=null!=i?i:F)&&void 0!==r&&r,[P,M]=iU([O,T]),D="axis"===S?N:void 0;QY(S,v,U,D,j,T);var L=null!=w?w:I;if(null==L||null==E||null==S)return null;var H=null!=O?O:TY;T||(H=TY),l&&H.length&&(H=JQ(H.filter(e=>null!=e.value&&(!0!==e.hide||n.includeHidden)),d,IY));var _=H.length>0,R=De.createElement(LM,{allowEscapeViewBox:a,animationDuration:o,animationEasing:s,isAnimationActive:c,active:T,coordinate:U,hasPayload:_,offset:u,position:h,reverseDirection:p,useTranslate3d:f,viewBox:E,wrapperStyle:m,lastBoundingBox:P,innerRef:M,hasPortalFromProps:Boolean(w)},function(e,t){return De.isValidElement(e)?De.cloneElement(e,t):"function"==typeof e?De.createElement(e,t):De.createElement(NM,t)}(A,UY(UY({},n),{},{payload:H,label:D,active:T,activeIndex:j,coordinate:U,accessibilityLayer:k})));return De.createElement(De.Fragment,null,Pe.createPortal(R,L),T&&De.createElement(oY,{cursor:g,tooltipEventType:S,coordinate:U,payload:H,index:j}))}var DY=e=>null;function LY(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}DY.displayName="Cell";function HY(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _Y(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var RY=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?HY(Object(r),!0).forEach(function(t){_Y(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):HY(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},{cacheSize:2e3,enableCache:!0}),KY=new class{constructor(e){LY(this,"cache",new Map),this.maxSize=e}get(e){var t=this.cache.get(e);return void 0!==t&&(this.cache.delete(e),this.cache.set(e,t)),t}set(e,t){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.maxSize){var r=this.cache.keys().next().value;null!=r&&this.cache.delete(r)}this.cache.set(e,t)}clear(){this.cache.clear()}size(){return this.cache.size}}(RY.cacheSize),zY={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},VY="recharts_measurement_span";var $Y=(e,t)=>{try{var r=document.getElementById(VY);r||((r=document.createElement("span")).setAttribute("id",VY),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,zY,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch(i){return{width:0,height:0}}},WY=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e||FD)return{width:0,height:0};if(!RY.enableCache)return $Y(e,t);var r=function(e,t){var r=t.fontSize||"",n=t.fontFamily||"",i=t.fontWeight||"",a=t.fontStyle||"",o=t.letterSpacing||"",s=t.textTransform||"";return"".concat(e,"|").concat(r,"|").concat(n,"|").concat(i,"|").concat(a,"|").concat(o,"|").concat(s)}(e,t),n=KY.get(r);if(n)return n;var i=$Y(e,t);return KY.set(r,i),i};var GY=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,qY=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,YY=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,XY=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,JY={cm:96/2.54,mm:96/25.4,pt:96/72,pc:16,in:96,Q:96/101.6,px:1},ZY=["cm","mm","pt","pc","in","Q","px"];var eX,tX,rX,nX="NaN";class iX{static parse(e){var t,[,r,n]=null!==(t=XY.exec(e))&&void 0!==t?t:[];return null==r?iX.NaN:new iX(parseFloat(r),null!=n?n:"")}constructor(e,t){this.num=e,this.unit=t,this.num=e,this.unit=t,Mj(e)&&(this.unit=""),""===t||YY.test(t)||(this.num=NaN,this.unit=""),function(e){return ZY.includes(e)}(t)&&(this.num=function(e,t){return e*JY[t]}(e,t),this.unit="px")}add(e){return this.unit!==e.unit?new iX(NaN,""):new iX(this.num+e.num,this.unit)}subtract(e){return this.unit!==e.unit?new iX(NaN,""):new iX(this.num-e.num,this.unit)}multiply(e){return""!==this.unit&&""!==e.unit&&this.unit!==e.unit?new iX(NaN,""):new iX(this.num*e.num,this.unit||e.unit)}divide(e){return""!==this.unit&&""!==e.unit&&this.unit!==e.unit?new iX(NaN,""):new iX(this.num/e.num,this.unit||e.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return Mj(this.num)}}function aX(e){if(null==e||e.includes(nX))return nX;for(var t=e;t.includes("*")||t.includes("/");){var r,[,n,i,a]=null!==(r=GY.exec(t))&&void 0!==r?r:[],o=iX.parse(null!=n?n:""),s=iX.parse(null!=a?a:""),A="*"===i?o.multiply(s):o.divide(s);if(A.isNaN())return nX;t=t.replace(GY,A.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var l,[,c,u,d]=null!==(l=qY.exec(t))&&void 0!==l?l:[],h=iX.parse(null!=c?c:""),p=iX.parse(null!=d?d:""),f="+"===u?h.add(p):h.subtract(p);if(f.isNaN())return nX;t=t.replace(qY,f.toString())}return t}eX=iX,tX="NaN",rX=new iX(NaN,""),(tX=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(tX))in eX?Object.defineProperty(eX,tX,{value:rX,enumerable:!0,configurable:!0,writable:!0}):eX[tX]=rX;var oX=/\(([^()]*)\)/;function sX(e){var t=e.replace(/\s+/g,"");return t=function(e){for(var t,r=e;null!=(t=oX.exec(r));){var[,n]=t;r=r.replace(oX,aX(n))}return r}(t),t=aX(t)}function AX(e){var t=function(e){try{return sX(e)}catch(t){return nX}}(e.slice(5,-1));return t===nX?"":t}var lX=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],cX=["dx","dy","angle","className","breakAll"];function uX(){return uX=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},uX.apply(null,arguments)}function dX(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var hX=/[ \f\n\r\t\v\u2028\u2029]+/,pX=e=>{var{children:t,breakAll:r,style:n}=e;try{var i=[];return Wj(t)||(i=r?t.toString().split(""):t.toString().split(hX)),{wordsWithComputedWidth:i.map(e=>({word:e,width:WY(e,n).width})),spaceWidth:r?0:WY(" ",n).width}}catch(a){return null}};function fX(e){return"start"===e||"middle"===e||"end"===e||"inherit"===e}var mX=(e,t,r,n)=>e.reduce((e,i)=>{var{word:a,width:o}=i,s=e[e.length-1];if(s&&null!=o&&(null==t||n||s.width+o+r<Number(t)))s.words.push(a),s.width+=o+r;else{var A={words:[a],width:o};e.push(A)}return e},[]),gX=e=>e.reduce((e,t)=>e.width>t.width?e:t),yX=(e,t,r,n,i,a,o,s)=>{var A=e.slice(0,t),l=pX({breakAll:r,style:n,children:A+"…"});if(!l)return[!1,[]];var c=mX(l.wordsWithComputedWidth,a,o,s);return[c.length>i||gX(c).width>Number(a),c]},vX=e=>[{words:Wj(e)?[]:e.toString().split(hX),width:void 0}],xX=e=>{var{width:t,scaleToFit:r,children:n,style:i,breakAll:a,maxLines:o}=e;if((t||r)&&!FD){var s=pX({breakAll:a,children:n,style:i});if(!s)return vX(n);var{wordsWithComputedWidth:A,spaceWidth:l}=s;return((e,t,r,n,i)=>{var{maxLines:a,children:o,style:s,breakAll:A}=e,l=Lj(a),c=String(o),u=mX(t,n,r,i);if(!l||i)return u;if(!(u.length>a||gX(u).width>Number(n)))return u;for(var d,h=0,p=c.length-1,f=0;h<=p&&f<=c.length-1;){var m=Math.floor((h+p)/2),g=m-1,[y,v]=yX(c,g,A,s,a,n,r,i),[x]=yX(c,m,A,s,a,n,r,i);if(y||x||(h=m+1),y&&x&&(p=m-1),!y&&x){d=v;break}f++}return d||u})({breakAll:a,children:n,maxLines:o,style:i},A,l,t,Boolean(r))}return vX(n)},wX="#808080",bX={angle:0,breakAll:!1,capHeight:"0.71em",fill:wX,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},BX=Te.forwardRef((e,t)=>{var r=cF(e,bX),{x:n,y:i,lineHeight:a,capHeight:o,fill:s,scaleToFit:A,textAnchor:l,verticalAnchor:c}=r,u=dX(r,lX),d=Te.useMemo(()=>xX({breakAll:u.breakAll,children:u.children,maxLines:u.maxLines,scaleToFit:A,style:u.style,width:u.width}),[u.breakAll,u.children,u.maxLines,A,u.style,u.width]),{dx:h,dy:p,angle:f,className:m,breakAll:g}=u,y=dX(u,cX);if(!Hj(n)||!Hj(i)||0===d.length)return null;var v,x=Number(n)+(Lj(h)?h:0),w=Number(i)+(Lj(p)?p:0);if(!WI(x)||!WI(w))return null;switch(c){case"start":v=AX("calc(".concat(o,")"));break;case"middle":v=AX("calc(".concat((d.length-1)/2," * -").concat(a," + (").concat(o," / 2))"));break;default:v=AX("calc(".concat(d.length-1," * -").concat(a,")"))}var b=[],B=d[0];if(A&&null!=B){var C=B.width,{width:E}=u;b.push("scale(".concat(Lj(E)&&Lj(C)?E/C:1,")"))}return f&&b.push("rotate(".concat(f,", ").concat(x,", ").concat(w,")")),b.length&&(y.transform=b.join(" ")),De.createElement("text",uX({},eS(y),{ref:t,x:x,y:w,className:yh("recharts-text",m),textAnchor:l,fill:s.includes("url")?wX:s}),d.map((e,t)=>{var r=e.words.join(g?"":" ");return De.createElement("tspan",{x:x,dy:0===t?v:a,key:"".concat(r,"-").concat(t)},r)}))});function CX(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function EX(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?CX(Object(r),!0).forEach(function(t){kX(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):CX(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function kX(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}BX.displayName="Text";var SX=["labelRef"],jX=["content"];function FX(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function QX(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function NX(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?QX(Object(r),!0).forEach(function(t){UX(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):QX(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function UX(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function OX(){return OX=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},OX.apply(null,arguments)}var IX=Te.createContext(null),TX=e=>{var{x:t,y:r,upperWidth:n,lowerWidth:i,width:a,height:o,children:s}=e,A=Te.useMemo(()=>({x:t,y:r,upperWidth:n,lowerWidth:i,width:a,height:o}),[t,r,n,i,a,o]);return De.createElement(IX.Provider,{value:A},s)},PX=()=>{var e=Te.useContext(IX),t=sP();return e||(t?oP(t):void 0)},MX=Te.createContext(null),DX=e=>null!=e&&"function"==typeof e,LX=(e,t,r,n,i)=>{var a,o,{offset:s,className:A}=e,{cx:l,cy:c,innerRadius:u,outerRadius:d,startAngle:h,endAngle:p,clockWise:f}=i,m=(u+d)/2,g=((e,t)=>Pj(t-e)*Math.min(Math.abs(t-e),360))(h,p),y=g>=0?1:-1;switch(t){case"insideStart":a=h+y*s,o=f;break;case"insideEnd":a=p-y*s,o=!f;break;case"end":a=p+y*s,o=f;break;default:throw new Error("Unsupported position ".concat(t))}o=g<=0?o:!o;var v=pL(l,c,m,a),x=pL(l,c,m,a+359*(o?1:-1)),w="M".concat(v.x,",").concat(v.y,"\n A").concat(m,",").concat(m,",0,1,").concat(o?0:1,",\n ").concat(x.x,",").concat(x.y),b=Wj(e.id)?Rj("recharts-radial-line-"):e.id;return De.createElement("text",OX({},n,{dominantBaseline:"central",className:yh("recharts-radial-bar-label",A)}),De.createElement("defs",null,De.createElement("path",{id:b,d:w})),De.createElement("textPath",{xlinkHref:"#".concat(b)},r))},HX=e=>null!=e&&"cx"in e&&Lj(e.cx),_X={angle:0,offset:5,zIndex:fV.label,position:"middle",textBreakAll:!1};function RX(e){var t,r,n,i,a,o=cF(e,_X),{viewBox:s,parentViewBox:A,position:l,value:c,children:u,content:d,className:h="",textBreakAll:p,labelRef:f}=o,m=(t=Te.useContext(MX),r=vN(NV),t||r),g=PX(),y=function(e){if(!HX(e))return e;var{cx:t,cy:r,outerRadius:n}=e,i=2*n;return{x:t-n,y:r-n,width:i,upperWidth:i,lowerWidth:i,height:i}}(n=null==s?"center"===l?g:null!=m?m:g:HX(s)?s:oP(s));if(!n||Wj(c)&&Wj(u)&&!Te.isValidElement(d)&&"function"!=typeof d)return null;var v=NX(NX({},o),{},{viewBox:n});if(Te.isValidElement(d)){var{labelRef:x}=v,w=FX(v,SX);return Te.cloneElement(d,w)}if("function"==typeof d){var{content:b}=v,B=FX(v,jX);if(i=Te.createElement(d,B),Te.isValidElement(i))return i}else i=(e=>{var{value:t,formatter:r}=e,n=Wj(e.children)?t:e.children;return"function"==typeof r?r(n):n})(o);var C=eS(o);if(HX(n)){if("insideStart"===l||"insideEnd"===l||"end"===l)return LX(o,l,i,C,n);a=((e,t,r)=>{var{cx:n,cy:i,innerRadius:a,outerRadius:o,startAngle:s,endAngle:A}=e,l=(s+A)/2;if("outside"===r){var{x:c,y:u}=pL(n,i,o+t,l);return{x:c,y:u,textAnchor:c>=n?"start":"end",verticalAnchor:"middle"}}if("center"===r)return{x:n,y:i,textAnchor:"middle",verticalAnchor:"middle"};if("centerTop"===r)return{x:n,y:i,textAnchor:"middle",verticalAnchor:"start"};if("centerBottom"===r)return{x:n,y:i,textAnchor:"middle",verticalAnchor:"end"};var d=(a+o)/2,{x:h,y:p}=pL(n,i,d,l);return{x:h,y:p,textAnchor:"middle",verticalAnchor:"middle"}})(n,o.offset,o.position)}else{if(!y)return null;var E=(e=>{var{viewBox:t,position:r,offset:n=0,parentViewBox:i}=e,{x:a,y:o,height:s,upperWidth:A,lowerWidth:l}=oP(t),c=a,u=a+(A-l)/2,d=(c+u)/2,h=(A+l)/2,p=c+A/2,f=s>=0?1:-1,m=f*n,g=f>0?"end":"start",y=f>0?"start":"end",v=A>=0?1:-1,x=v*n,w=v>0?"end":"start",b=v>0?"start":"end",B=i;if("top"===r){var C={x:c+A/2,y:o-m,horizontalAnchor:"middle",verticalAnchor:g};return B&&(C.height=Math.max(o-B.y,0),C.width=A),C}if("bottom"===r){var E={x:u+l/2,y:o+s+m,horizontalAnchor:"middle",verticalAnchor:y};return B&&(E.height=Math.max(B.y+B.height-(o+s),0),E.width=l),E}if("left"===r){var k={x:d-x,y:o+s/2,horizontalAnchor:w,verticalAnchor:"middle"};return B&&(k.width=Math.max(k.x-B.x,0),k.height=s),k}if("right"===r){var S={x:d+h+x,y:o+s/2,horizontalAnchor:b,verticalAnchor:"middle"};return B&&(S.width=Math.max(B.x+B.width-S.x,0),S.height=s),S}var j=B?{width:h,height:s}:{};return"insideLeft"===r?EX({x:d+x,y:o+s/2,horizontalAnchor:b,verticalAnchor:"middle"},j):"insideRight"===r?EX({x:d+h-x,y:o+s/2,horizontalAnchor:w,verticalAnchor:"middle"},j):"insideTop"===r?EX({x:c+A/2,y:o+m,horizontalAnchor:"middle",verticalAnchor:y},j):"insideBottom"===r?EX({x:u+l/2,y:o+s-m,horizontalAnchor:"middle",verticalAnchor:g},j):"insideTopLeft"===r?EX({x:c+x,y:o+m,horizontalAnchor:b,verticalAnchor:y},j):"insideTopRight"===r?EX({x:c+A-x,y:o+m,horizontalAnchor:w,verticalAnchor:y},j):"insideBottomLeft"===r?EX({x:u+x,y:o+s-m,horizontalAnchor:b,verticalAnchor:g},j):"insideBottomRight"===r?EX({x:u+l-x,y:o+s-m,horizontalAnchor:w,verticalAnchor:g},j):r&&"object"==typeof r&&(Lj(r.x)||Dj(r.x))&&(Lj(r.y)||Dj(r.y))?EX({x:a+Kj(r.x,h),y:o+Kj(r.y,s),horizontalAnchor:"end",verticalAnchor:"end"},j):EX({x:p,y:o+s/2,horizontalAnchor:"middle",verticalAnchor:"middle"},j)})({viewBox:y,position:l,offset:o.offset,parentViewBox:HX(A)?void 0:A});a=NX(NX({x:E.x,y:E.y,textAnchor:E.horizontalAnchor,verticalAnchor:E.verticalAnchor},void 0!==E.width?{width:E.width}:{}),void 0!==E.height?{height:E.height}:{})}return De.createElement(Zq,{zIndex:o.zIndex},De.createElement(BX,OX({ref:f,className:yh("recharts-label",h)},C,a,{textAnchor:fX(C.textAnchor)?C.textAnchor:a.textAnchor,breakAll:p}),i))}RX.displayName="Label";function KX(e){var{label:t,labelRef:r}=e;return((e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return!0===e?De.createElement(RX,OX({key:"label-implicit"},n)):Hj(e)?De.createElement(RX,OX({key:"label-implicit",value:e},n)):Te.isValidElement(e)?e.type===RX?Te.cloneElement(e,NX({key:"label-implicit"},n)):De.createElement(RX,OX({key:"label-implicit",content:e},n)):DX(e)?De.createElement(RX,OX({key:"label-implicit",content:e},n)):e&&"object"==typeof e?De.createElement(RX,OX({},e,{key:"label-implicit"},n)):null})(t,PX(),r)||null}var zX,VX={},$X={};function WX(){return zX||(zX=1,e=$X,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.last=function(e){return e[e.length-1]}),$X;var e}var GX,qX,YX,XX,JX={};function ZX(){return GX||(GX=1,e=JX,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.toArray=function(e){return Array.isArray(e)?e:Array.from(e)}),JX;var e}function eJ(){return XX?YX:(XX=1,YX=(qX||(qX=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=WX(),r=ZX(),n=TF();e.last=function(e){if(n.isArrayLike(e))return t.last(r.toArray(e))}}(VX)),VX).last)}const tJ=ay(eJ());var rJ=["valueAccessor"],nJ=["dataKey","clockWise","id","textBreakAll","zIndex"];function iJ(){return iJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},iJ.apply(null,arguments)}function aJ(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var oJ=e=>Array.isArray(e.value)?tJ(e.value):e.value,sJ=Te.createContext(void 0),AJ=sJ.Provider,lJ=Te.createContext(void 0),cJ=lJ.Provider;function uJ(e){var{valueAccessor:t=oJ}=e,r=aJ(e,rJ),{dataKey:n,clockWise:i,id:a,textBreakAll:o,zIndex:s}=r,A=aJ(r,nJ),l=Te.useContext(sJ),c=Te.useContext(lJ),u=l||c;return u&&u.length?De.createElement(Zq,{zIndex:null!=s?s:fV.label},De.createElement(oS,{className:"recharts-label-list"},u.map((e,i)=>{var s,l=Wj(n)?t(e,i):JI(e.payload,n),c=Wj(a)?{}:{id:"".concat(a,"-").concat(i)};return De.createElement(RX,iJ({key:"label-".concat(i)},eS(e),A,c,{fill:null!==(s=r.fill)&&void 0!==s?s:e.fill,parentViewBox:e.parentViewBox,value:l,textBreakAll:o,viewBox:e.viewBox,index:i,zIndex:0}))}))):null}function dJ(e){var{label:t}=e;return t?!0===t?De.createElement(uJ,{key:"labelList-implicit"}):De.isValidElement(t)||DX(t)?De.createElement(uJ,{key:"labelList-implicit",content:t}):"object"==typeof t?De.createElement(uJ,iJ({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function hJ(){return hJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},hJ.apply(null,arguments)}uJ.displayName="LabelList";var pJ=e=>{var{cx:t,cy:r,r:n,className:i}=e,a=yh("recharts-dot",i);return Lj(t)&&Lj(r)&&Lj(n)?De.createElement("circle",hJ({},Jk(e),oF(e),{className:a,cx:t,cy:r,r:n})):null},fJ=e=>e.graphicalItems.polarItems,mJ=NN([UV,OV],a$),gJ=NN([fJ,r$,mJ],A$),yJ=NN([gJ],h$),vJ=NN([yJ,xz],f$),xJ=NN([vJ,r$,gJ],g$);NN([vJ,r$,gJ],(e,t,r)=>r.length>0?e.flatMap(e=>r.flatMap(r=>{var n;return{value:JI(e,null!==(n=t.dataKey)&&void 0!==n?n:r.dataKey),errorDomain:[]}})).filter(Boolean):null!=(null==t?void 0:t.dataKey)?e.map(e=>({value:JI(e,t.dataKey),errorDomain:[]})):e.map(e=>({value:e,errorDomain:[]})));var wJ=()=>{},bJ=NN([vJ,r$,gJ,I$,UV],P$),BJ=NN([r$,N$,U$,wJ,bJ,wJ,dP,UV],Z$),CJ=NN([r$,dP,vJ,xJ,lV,UV,BJ],rW),EJ=NN([CJ,n$,aW],sW),kJ=NN([r$,CJ,EJ,UV],lW);NN([aW,kJ],KV);var SJ=oI({name:"polarAxis",initialState:{radiusAxis:{},angleAxis:{}},reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),{addRadiusAxis:jJ,removeRadiusAxis:FJ,addAngleAxis:QJ,removeAngleAxis:NJ}=SJ.actions,UJ=SJ.reducer;function OJ(e){return e&&"object"==typeof e&&"className"in e&&"string"==typeof e.className?e.className:""}function IJ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function TJ(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?IJ(Object(r),!0).forEach(function(t){PJ(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):IJ(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function PJ(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var MJ,DJ=NN([fJ,(e,t)=>t],(e,t)=>e.filter(e=>"pie"===e.type).find(e=>e.id===t)),LJ=[],HJ=(e,t,r)=>0===(null==r?void 0:r.length)?LJ:r,_J=NN([xz,DJ,HJ],(e,t,r)=>{var n,{chartData:i}=e;if(null!=t&&((n=null!=(null==t?void 0:t.data)&&t.data.length>0?t.data:i)&&n.length||null==r||(n=r.map(e=>TJ(TJ({},t.presentationProps),e.props))),null!=n))return n}),RJ=NN([_J,DJ,HJ],(e,t,r)=>{if(null!=e&&null!=t)return e.map((e,n)=>{var i,a,o=JI(e,t.nameKey,t.name);return a=null!=r&&null!==(i=r[n])&&void 0!==i&&null!==(i=i.props)&&void 0!==i&&i.fill?r[n].props.fill:"object"==typeof e&&null!=e&&"fill"in e?e.fill:t.fill,{value:uT(o,t.dataKey),color:a,payload:e,type:t.legendType}})}),KJ=NN([_J,DJ,HJ,jT],(e,t,r,n)=>{if(null!=t&&null!=e)return function(e){var t,r,n,{pieSettings:i,displayedData:a,cells:o,offset:s}=e,{cornerRadius:A,startAngle:l,endAngle:c,dataKey:u,nameKey:d,tooltipType:h}=i,p=Math.abs(i.minAngle),f=a0(l,c),m=Math.abs(f),g=a.length<=1?0:null!==(t=i.paddingAngle)&&void 0!==t?t:0,y=a.filter(e=>0!==JI(e,u,0)).length,v=m-y*p-(m>=360?y:y-1)*g,x=a.reduce((e,t)=>{var r=JI(t,u,0);return e+(Lj(r)?r:0)},0);x>0&&(r=a.map((e,t)=>{var r,a=JI(e,u,0),c=JI(e,d,t),m=i0(i,s,e),y=(Lj(a)?a:0)/x,w=JZ(JZ({},e),o&&o[t]&&o[t].props),b=(r=t?n.endAngle+Pj(f)*g*(0!==a?1:0):l)+Pj(f)*((0!==a?p:0)+y*v),B=(r+b)/2,C=(m.innerRadius+m.outerRadius)/2,E=[{name:c,value:a,payload:w,dataKey:u,type:h,graphicalItemId:i.id}],k=pL(m.cx,m.cy,C,B);return n=JZ(JZ(JZ(JZ({},i.presentationProps),{},{percent:y,cornerRadius:"string"==typeof A?parseFloat(A):A,name:c,tooltipPayload:E,midAngle:B,middleRadius:C,tooltipPosition:k},w),m),{},{value:a,dataKey:u,startAngle:r,endAngle:b,payload:w,paddingAngle:Pj(f)*g})}));return r}({offset:n,pieSettings:t,displayedData:e,cells:r})}),zJ={exports:{}},VJ={};var $J,WJ,GJ={};
|
|
73
|
+
/** @license React v17.0.2
|
|
74
|
+
* react-is.development.js
|
|
75
|
+
*
|
|
76
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
77
|
+
*
|
|
78
|
+
* This source code is licensed under the MIT license found in the
|
|
79
|
+
* LICENSE file in the root directory of this source tree.
|
|
80
|
+
*/var qJ=(WJ||(WJ=1,"production"===process.env.NODE_ENV?zJ.exports=function(){if(MJ)return VJ;MJ=1;var e=60103,t=60106,r=60107,n=60108,i=60114,a=60109,o=60110,s=60112,A=60113,l=60120,c=60115,u=60116,d=60121,h=60122,p=60117,f=60129,m=60131;if("function"==typeof Symbol&&Symbol.for){var g=Symbol.for;e=g("react.element"),t=g("react.portal"),r=g("react.fragment"),n=g("react.strict_mode"),i=g("react.profiler"),a=g("react.provider"),o=g("react.context"),s=g("react.forward_ref"),A=g("react.suspense"),l=g("react.suspense_list"),c=g("react.memo"),u=g("react.lazy"),d=g("react.block"),h=g("react.server.block"),p=g("react.fundamental"),f=g("react.debug_trace_mode"),m=g("react.legacy_hidden")}function y(d){if("object"==typeof d&&null!==d){var h=d.$$typeof;switch(h){case e:switch(d=d.type){case r:case i:case n:case A:case l:return d;default:switch(d=d&&d.$$typeof){case o:case s:case u:case c:case a:return d;default:return h}}case t:return h}}}var v=a,x=e,w=s,b=r,B=u,C=c,E=t,k=i,S=n,j=A;return VJ.ContextConsumer=o,VJ.ContextProvider=v,VJ.Element=x,VJ.ForwardRef=w,VJ.Fragment=b,VJ.Lazy=B,VJ.Memo=C,VJ.Portal=E,VJ.Profiler=k,VJ.StrictMode=S,VJ.Suspense=j,VJ.isAsyncMode=function(){return!1},VJ.isConcurrentMode=function(){return!1},VJ.isContextConsumer=function(e){return y(e)===o},VJ.isContextProvider=function(e){return y(e)===a},VJ.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},VJ.isForwardRef=function(e){return y(e)===s},VJ.isFragment=function(e){return y(e)===r},VJ.isLazy=function(e){return y(e)===u},VJ.isMemo=function(e){return y(e)===c},VJ.isPortal=function(e){return y(e)===t},VJ.isProfiler=function(e){return y(e)===i},VJ.isStrictMode=function(e){return y(e)===n},VJ.isSuspense=function(e){return y(e)===A},VJ.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===i||e===f||e===n||e===A||e===l||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===u||e.$$typeof===c||e.$$typeof===a||e.$$typeof===o||e.$$typeof===s||e.$$typeof===p||e.$$typeof===d||e[0]===h)},VJ.typeOf=y,VJ}():zJ.exports=($J||($J=1,"production"!==process.env.NODE_ENV&&function(){var e=60103,t=60106,r=60107,n=60108,i=60114,a=60109,o=60110,s=60112,A=60113,l=60120,c=60115,u=60116,d=60121,h=60122,p=60117,f=60129,m=60131;if("function"==typeof Symbol&&Symbol.for){var g=Symbol.for;e=g("react.element"),t=g("react.portal"),r=g("react.fragment"),n=g("react.strict_mode"),i=g("react.profiler"),a=g("react.provider"),o=g("react.context"),s=g("react.forward_ref"),A=g("react.suspense"),l=g("react.suspense_list"),c=g("react.memo"),u=g("react.lazy"),d=g("react.block"),h=g("react.server.block"),p=g("react.fundamental"),g("react.scope"),g("react.opaque.id"),f=g("react.debug_trace_mode"),g("react.offscreen"),m=g("react.legacy_hidden")}function y(d){if("object"==typeof d&&null!==d){var h=d.$$typeof;switch(h){case e:var p=d.type;switch(p){case r:case i:case n:case A:case l:return p;default:var f=p&&p.$$typeof;switch(f){case o:case s:case u:case c:case a:return f;default:return h}}case t:return h}}}var v=o,x=a,w=e,b=s,B=r,C=u,E=c,k=t,S=i,j=n,F=A,Q=!1,N=!1;GJ.ContextConsumer=v,GJ.ContextProvider=x,GJ.Element=w,GJ.ForwardRef=b,GJ.Fragment=B,GJ.Lazy=C,GJ.Memo=E,GJ.Portal=k,GJ.Profiler=S,GJ.StrictMode=j,GJ.Suspense=F,GJ.isAsyncMode=function(e){return Q||(Q=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1},GJ.isConcurrentMode=function(e){return N||(N=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1},GJ.isContextConsumer=function(e){return y(e)===o},GJ.isContextProvider=function(e){return y(e)===a},GJ.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},GJ.isForwardRef=function(e){return y(e)===s},GJ.isFragment=function(e){return y(e)===r},GJ.isLazy=function(e){return y(e)===u},GJ.isMemo=function(e){return y(e)===c},GJ.isPortal=function(e){return y(e)===t},GJ.isProfiler=function(e){return y(e)===i},GJ.isStrictMode=function(e){return y(e)===n},GJ.isSuspense=function(e){return y(e)===A},GJ.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===i||e===f||e===n||e===A||e===l||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===u||e.$$typeof===c||e.$$typeof===a||e.$$typeof===o||e.$$typeof===s||e.$$typeof===p||e.$$typeof===d||e[0]===h)},GJ.typeOf=y}()),GJ)),zJ.exports),YJ=e=>"string"==typeof e?e:e?e.displayName||e.name||"Component":"",XJ=null,JJ=null,ZJ=e=>{if(e===XJ&&Array.isArray(JJ))return JJ;var t=[];return Te.Children.forEach(e,e=>{Wj(e)||(qJ.isFragment(e)?t=t.concat(ZJ(e.props.children)):t.push(e))}),JJ=t,XJ=e,t};function eZ(e,t){var r=[],n=[];return n=Array.isArray(t)?t.map(e=>YJ(e)):[YJ(t)],ZJ(e).forEach(e=>{var t=Oj(e,"type.displayName")||Oj(e,"type.name");t&&-1!==n.indexOf(t)&&r.push(e)}),r}var tZ,rZ,nZ,iZ=e=>!e||"object"!=typeof e||!("clipDot"in e)||Boolean(e.clipDot),aZ={};function oZ(){return nZ?rZ:(nZ=1,rZ=(tZ||(tZ=1,e=aZ,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isPlainObject=function(e){var t;if("object"!=typeof e)return!1;if(null==e)return!1;if(null===Object.getPrototypeOf(e))return!0;if("[object Object]"!==Object.prototype.toString.call(e)){const r=e[Symbol.toStringTag];return null!=r&&!!(null==(t=Object.getOwnPropertyDescriptor(e,Symbol.toStringTag))?void 0:t.writable)&&e.toString()===`[object ${r}]`}let r=e;for(;null!==Object.getPrototypeOf(r);)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r}),aZ).isPlainObject);var e}const sZ=ay(oZ());var AZ,lZ,cZ,uZ,dZ;function hZ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function pZ(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?hZ(Object(r),!0).forEach(function(t){fZ(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hZ(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function fZ(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mZ(){return mZ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},mZ.apply(null,arguments)}function gZ(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var yZ=(e,t,r,n,i)=>{var a,o=r-n;return a=Tj(AZ||(AZ=gZ(["M ",",",""])),e,t),a+=Tj(lZ||(lZ=gZ(["L ",",",""])),e+r,t),a+=Tj(cZ||(cZ=gZ(["L ",",",""])),e+r-o/2,t+i),a+=Tj(uZ||(uZ=gZ(["L ",",",""])),e+r-o/2-n,t+i),a+=Tj(dZ||(dZ=gZ(["L ",","," Z"])),e,t)},vZ={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},xZ=e=>{var t=cF(e,vZ),{x:r,y:n,upperWidth:i,lowerWidth:a,height:o,className:s}=t,{animationEasing:A,animationDuration:l,animationBegin:c,isUpdateAnimationActive:u}=t,d=Te.useRef(null),[h,p]=Te.useState(-1),f=Te.useRef(i),m=Te.useRef(a),g=Te.useRef(o),y=Te.useRef(r),v=Te.useRef(n),x=ID(e,"trapezoid-");if(Te.useEffect(()=>{if(d.current&&d.current.getTotalLength)try{var e=d.current.getTotalLength();e&&p(e)}catch(t){}},[]),r!==+r||n!==+n||i!==+i||a!==+a||o!==+o||0===i&&0===a||0===o)return null;var w=yh("recharts-trapezoid",s);if(!u)return De.createElement("g",null,De.createElement("path",mZ({},eS(t),{className:w,d:yZ(r,n,i,a,o)})));var b=f.current,B=m.current,C=g.current,E=y.current,k=v.current,S="0px ".concat(-1===h?1:h,"px"),j="".concat(h,"px 0px"),F=AD(["strokeDasharray"],l,A);return De.createElement(OD,{animationId:x,key:x,canBegin:h>0,duration:l,easing:A,isActive:u,begin:c},e=>{var s=Vj(b,i,e),A=Vj(B,a,e),l=Vj(C,o,e),c=Vj(E,r,e),u=Vj(k,n,e);d.current&&(f.current=s,m.current=A,g.current=l,y.current=c,v.current=u);var h=e>0?{transition:F,strokeDasharray:j}:{strokeDasharray:S};return De.createElement("path",mZ({},eS(t),{className:w,d:yZ(c,u,s,A,l),ref:d,style:pZ(pZ({},h),t.style)}))})},wZ=["option","shapeType","activeClassName"];function bZ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function BZ(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?bZ(Object(r),!0).forEach(function(t){CZ(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bZ(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function CZ(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function EZ(e){var{shapeType:t,elementProps:r}=e;switch(t){case"rectangle":return De.createElement(tL,r);case"trapezoid":return De.createElement(xZ,r);case"sector":return De.createElement(EL,r);case"symbols":if(function(e){return"symbols"===e}(t))return De.createElement(iF,r);break;case"curve":return De.createElement(JM,r);default:return null}}function kZ(e){var t,{option:r,shapeType:n,activeClassName:i="recharts-active-shape"}=e,a=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,wZ);if(Te.isValidElement(r))t=Te.cloneElement(r,BZ(BZ({},a),function(e){return Te.isValidElement(e)?e.props:e}(r)));else if("function"==typeof r)t=r(a,a.index);else if(sZ(r)&&"boolean"!=typeof r){var o=function(e,t){return BZ(BZ({},t),e)}(r,a);t=De.createElement(EZ,{shapeType:n,elementProps:o})}else{var s=a;t=De.createElement(EZ,{shapeType:n,elementProps:s})}return a.isActive?De.createElement(oS,{className:i},t):t}var SZ,jZ=(e,t,r)=>{var n=fN();return(i,a)=>o=>{null==e||e(i,a,o),n(rG({activeIndex:String(a),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:r}))}},FZ=e=>{var t=fN();return(r,n)=>i=>{null==e||e(r,n,i),t(nG())}},QZ=(e,t,r)=>{var n=fN();return(i,a)=>o=>{null==e||e(i,a,o),n(aG({activeIndex:String(a),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:r}))}};function NZ(e){var{tooltipEntrySettings:t}=e,r=fN(),n=UT(),i=Te.useRef(null);return Te.useLayoutEffect(()=>{n||(null===i.current?r(JW(t)):i.current!==t&&r(ZW({prev:i.current,next:t})),i.current=t)},[t,r,n]),Te.useLayoutEffect(()=>()=>{i.current&&(r(eG(i.current)),i.current=null)},[r]),null}function UZ(e){var{legendPayload:t}=e,r=fN(),n=UT(),i=Te.useRef(null);return Te.useLayoutEffect(()=>{n||(null===i.current?r(cM(t)):i.current!==t&&r(uM({prev:i.current,next:t})),i.current=t)},[r,n,t]),Te.useLayoutEffect(()=>()=>{i.current&&(r(dM(i.current)),i.current=null)},[r]),null}function OZ(e){var{legendPayload:t}=e,r=fN(),n=vN(dP),i=Te.useRef(null);return Te.useLayoutEffect(()=>{"centric"!==n&&"radial"!==n||(null===i.current?r(cM(t)):i.current!==t&&r(uM({prev:i.current,next:t})),i.current=t)},[r,n,t]),Te.useLayoutEffect(()=>()=>{i.current&&(r(dM(i.current)),i.current=null)},[r]),null}var IZ=null!==(SZ=De["useId".toString()])&&void 0!==SZ?SZ:()=>{var[e]=De.useState(()=>Rj("uid-"));return e};var TZ=Te.createContext(void 0),PZ=e=>{var t,r,n,{id:i,type:a,children:o}=e,s=(t="recharts-".concat(a),r=i,n=IZ(),r||(t?"".concat(t,"-").concat(n):n));return De.createElement(TZ.Provider,{value:s},o(s))},MZ=oI({name:"graphicalItems",initialState:{cartesianItems:[],polarItems:[]},reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:YO()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:r,next:n}=t.payload,i=kO(e).cartesianItems.indexOf(r);i>-1&&(e.cartesianItems[i]=n)},prepare:YO()},removeCartesianGraphicalItem:{reducer(e,t){var r=kO(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:YO()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:YO()},removePolarGraphicalItem:{reducer(e,t){var r=kO(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)},prepare:YO()}}}),{addCartesianGraphicalItem:DZ,replaceCartesianGraphicalItem:LZ,removeCartesianGraphicalItem:HZ,addPolarGraphicalItem:_Z,removePolarGraphicalItem:RZ}=MZ.actions,KZ=MZ.reducer,zZ=e=>{var t=fN(),r=Te.useRef(null);return Te.useLayoutEffect(()=>{null===r.current?t(DZ(e)):r.current!==e&&t(LZ({prev:r.current,next:e})),r.current=e},[t,e]),Te.useLayoutEffect(()=>()=>{r.current&&(t(HZ(r.current)),r.current=null)},[t]),null},VZ=Te.memo(zZ);function $Z(e){var t=fN();return Te.useLayoutEffect(()=>(t(_Z(e)),()=>{t(RZ(e))}),[t,e]),null}var WZ=["key"],GZ=["onMouseEnter","onClick","onMouseLeave"],qZ=["id"],YZ=["id"];function XZ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function JZ(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?XZ(Object(r),!0).forEach(function(t){ZZ(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):XZ(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ZZ(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function e0(){return e0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},e0.apply(null,arguments)}function t0(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function r0(e){var t=Te.useMemo(()=>eZ(e.children,DY),[e.children]),r=vN(r=>RJ(r,e.id,t));return null==r?null:De.createElement(OZ,{legendPayload:r})}var n0=De.memo(e=>{var{dataKey:t,nameKey:r,sectors:n,stroke:i,strokeWidth:a,fill:o,name:s,hide:A,tooltipType:l,id:c}=e,u={dataDefinedOnItem:n.map(e=>e.tooltipPayload),getPosition:e=>{var t;return null===(t=n[Number(e)])||void 0===t?void 0:t.tooltipPosition},settings:{stroke:i,strokeWidth:a,fill:o,dataKey:t,nameKey:r,name:uT(s,t),hide:A,type:l,color:o,unit:"",graphicalItemId:c}};return De.createElement(NZ,{tooltipEntrySettings:u})}),i0=(e,t,r)=>{var{top:n,left:i,width:a,height:o}=t,s=fL(a,o),A=i+Kj(e.cx,a,a/2),l=n+Kj(e.cy,o,o/2),c=Kj(e.innerRadius,s,0),u=((e,t,r)=>Kj("function"==typeof t?t(e):t,r,.8*r))(r,e.outerRadius,s);return{cx:A,cy:l,innerRadius:c,outerRadius:u,maxRadius:e.maxRadius||Math.sqrt(a*a+o*o)/2}},a0=(e,t)=>Pj(t-e)*Math.min(Math.abs(t-e),360);function o0(e){var{sectors:t,props:r,showLabels:n}=e,{label:i,labelLine:a,dataKey:o}=r;if(!n||!i||!t)return null;var s=Jk(r),A=Zk(i),l=Zk(a),c="object"==typeof i&&"offsetRadius"in i&&"number"==typeof i.offsetRadius&&i.offsetRadius||20,u=t.map((e,t)=>{var r,n,u=(e.startAngle+e.endAngle)/2,d=pL(e.cx,e.cy,e.outerRadius+c,u),h=JZ(JZ(JZ(JZ({},s),e),{},{stroke:"none"},A),{},{index:t,textAnchor:(r=d.x,n=e.cx,r>n?"start":r<n?"end":"middle")},d),p=JZ(JZ(JZ(JZ({},s),e),{},{fill:"none",stroke:e.fill},l),{},{index:t,points:[pL(e.cx,e.cy,e.outerRadius,u),d],key:"line"});return De.createElement(Zq,{zIndex:fV.label,key:"label-".concat(e.startAngle,"-").concat(e.endAngle,"-").concat(e.midAngle,"-").concat(t)},De.createElement(oS,null,a&&((e,t)=>{if(De.isValidElement(e))return De.cloneElement(e,t);if("function"==typeof e)return e(t);var r=yh("recharts-pie-label-line","boolean"!=typeof e?e.className:""),{key:n}=t,i=t0(t,WZ);return De.createElement(JM,e0({},i,{type:"linear",className:r}))})(a,p),((e,t,r)=>{if(De.isValidElement(e))return De.cloneElement(e,t);var n=r;if("function"==typeof e&&(n=e(t),De.isValidElement(n)))return n;var i=yh("recharts-pie-label-text",OJ(e));return De.createElement(BX,e0({},t,{alignmentBaseline:"middle",className:i}),n)})(i,h,JI(e,o))))});return De.createElement(oS,{className:"recharts-pie-labels"},u)}function s0(e){var{sectors:t,props:r,showLabels:n}=e,{label:i}=r;return"object"==typeof i&&null!=i&&"position"in i?De.createElement(dJ,{label:i}):De.createElement(o0,{sectors:t,props:r,showLabels:n})}function A0(e){var{sectors:t,activeShape:r,inactiveShape:n,allOtherPieProps:i,shape:a,id:o}=e,s=vN(lq),A=vN(uq),l=vN(dq),{onMouseEnter:c,onClick:u,onMouseLeave:d}=i,h=t0(i,GZ),p=jZ(c,i.dataKey,o),f=FZ(d),m=QZ(u,i.dataKey,o);return null==t||0===t.length?null:De.createElement(De.Fragment,null,t.map((e,c)=>{if(0===(null==e?void 0:e.startAngle)&&0===(null==e?void 0:e.endAngle)&&1!==t.length)return null;var u=null==l||l===o,d=String(c)===s&&(null==A||i.dataKey===A)&&u,g=r&&d?r:s?n:null,y=JZ(JZ({},e),{},{stroke:e.stroke,tabIndex:-1,[yT]:c,[vT]:o});return De.createElement(oS,e0({key:"sector-".concat(null==e?void 0:e.startAngle,"-").concat(null==e?void 0:e.endAngle,"-").concat(e.midAngle,"-").concat(c),tabIndex:-1,className:"recharts-pie-sector"},sF(h,e,c),{onMouseEnter:p(e,c),onMouseLeave:f(e,c),onClick:m(e,c)}),De.createElement(kZ,e0({option:null!=a?a:g,index:c,shapeType:"sector",isActive:d},y)))}))}function l0(e){var{showLabels:t,sectors:r,children:n}=e,i=Te.useMemo(()=>t&&r?r.map(e=>({value:e.value,payload:e.payload,clockWise:!1,parentViewBox:void 0,viewBox:{cx:e.cx,cy:e.cy,innerRadius:e.innerRadius,outerRadius:e.outerRadius,startAngle:e.startAngle,endAngle:e.endAngle,clockWise:!1},fill:e.fill})):[],[r,t]);return De.createElement(cJ,{value:t?i:void 0},n)}function c0(e){var{props:t,previousSectorsRef:r,id:n}=e,{sectors:i,isAnimationActive:a,animationBegin:o,animationDuration:s,animationEasing:A,activeShape:l,inactiveShape:c,onAnimationStart:u,onAnimationEnd:d}=t,h=ID(t,"recharts-pie-"),p=r.current,[f,m]=Te.useState(!1),g=Te.useCallback(()=>{"function"==typeof d&&d(),m(!1)},[d]),y=Te.useCallback(()=>{"function"==typeof u&&u(),m(!0)},[u]);return De.createElement(l0,{showLabels:!f,sectors:i},De.createElement(OD,{animationId:h,begin:o,duration:s,isActive:a,easing:A,onAnimationStart:y,onAnimationEnd:g,key:h},e=>{var a,o=[],s=i&&i[0],A=null!==(a=null==s?void 0:s.startAngle)&&void 0!==a?a:0;return null==i||i.forEach((t,r)=>{var n=p&&p[r],i=r>0?Oj(t,"paddingAngle",0):0;if(n){var a=Vj(n.endAngle-n.startAngle,t.endAngle-t.startAngle,e),s=JZ(JZ({},t),{},{startAngle:A+i,endAngle:A+a+i});o.push(s),A=s.endAngle}else{var{endAngle:l,startAngle:c}=t,u=Vj(0,l-c,e),d=JZ(JZ({},t),{},{startAngle:A+i,endAngle:A+u+i});o.push(d),A=d.endAngle}}),r.current=o,De.createElement(oS,null,De.createElement(A0,{sectors:o,activeShape:l,inactiveShape:c,allOtherPieProps:t,shape:t.shape,id:n}))}),De.createElement(s0,{showLabels:!f,sectors:i,props:t}),t.children)}var u0={animationBegin:400,animationDuration:1500,animationEasing:"ease",cx:"50%",cy:"50%",dataKey:"value",endAngle:360,fill:"#808080",hide:!1,innerRadius:0,isAnimationActive:"auto",label:!1,labelLine:!0,legendType:"rect",minAngle:0,nameKey:"name",outerRadius:"80%",paddingAngle:0,rootTabIndex:0,startAngle:0,stroke:"#fff",zIndex:fV.area};function d0(e){var{id:t}=e,r=t0(e,qZ),{hide:n,className:i,rootTabIndex:a}=e,o=Te.useMemo(()=>eZ(e.children,DY),[e.children]),s=vN(e=>KJ(e,t,o)),A=Te.useRef(null),l=yh("recharts-pie",i);return n||null==s?(A.current=null,De.createElement(oS,{tabIndex:a,className:l})):De.createElement(Zq,{zIndex:e.zIndex},De.createElement(n0,{dataKey:e.dataKey,nameKey:e.nameKey,sectors:s,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,tooltipType:e.tooltipType,id:t}),De.createElement(oS,{tabIndex:a,className:l},De.createElement(c0,{props:JZ(JZ({},r),{},{sectors:s}),previousSectorsRef:A,id:t})))}function h0(e){var t=cF(e,u0),{id:r}=t,n=t0(t,YZ),i=Jk(n);return De.createElement(PZ,{id:r,type:"pie"},e=>De.createElement(De.Fragment,null,De.createElement($Z,{type:"pie",id:e,data:n.data,dataKey:n.dataKey,hide:n.hide,angleAxisId:0,radiusAxisId:0,name:n.name,nameKey:n.nameKey,tooltipType:n.tooltipType,legendType:n.legendType,fill:n.fill,cx:n.cx,cy:n.cy,startAngle:n.startAngle,endAngle:n.endAngle,paddingAngle:n.paddingAngle,minAngle:n.minAngle,innerRadius:n.innerRadius,outerRadius:n.outerRadius,cornerRadius:n.cornerRadius,presentationProps:i,maxRadius:t.maxRadius}),De.createElement(r0,e0({},n,{id:e})),De.createElement(d0,e0({},n,{id:e}))))}h0.displayName="Pie";var p0=["points"];function f0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function m0(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f0(Object(r),!0).forEach(function(t){g0(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f0(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function g0(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y0(){return y0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},y0.apply(null,arguments)}function v0(e){var{option:t,dotProps:r,className:n}=e;if(Te.isValidElement(t))return Te.cloneElement(t,r);if("function"==typeof t)return t(r);var i=yh(n,"boolean"!=typeof t?t.className:""),a=null!=r?r:{},{points:o}=a,s=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(a,p0);return De.createElement(pJ,y0({},s,{className:i}))}function x0(e){var{points:t,dot:r,className:n,dotClassName:i,dataKey:a,baseProps:o,needClip:s,clipPathId:A,zIndex:l=fV.scatter}=e;if(!function(e,t){return null!=e&&(!!t||1===e.length)}(t,r))return null;var c,u=iZ(r),d=null==(c=r)?null:Te.isValidElement(c)?eS(c.props):"object"!=typeof c||Array.isArray(c)?null:eS(c),h=t.map((e,n)=>{var s,A,l=m0(m0(m0({r:3},o),d),{},{index:n,cx:null!==(s=e.x)&&void 0!==s?s:void 0,cy:null!==(A=e.y)&&void 0!==A?A:void 0,dataKey:a,value:e.value,payload:e.payload,points:t});return De.createElement(v0,{key:"dot-".concat(n),option:r,dotProps:l,className:i})}),p={};return s&&null!=A&&(p.clipPath="url(#clipPath-".concat(u?"":"dots-").concat(A,")")),De.createElement(Zq,{zIndex:l},De.createElement(oS,y0({className:n},p),h))}function w0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function b0(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?w0(Object(r),!0).forEach(function(t){B0(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w0(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function B0(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var C0=oI({name:"cartesianAxis",initialState:{xAxis:{},yAxis:{},zAxis:{}},reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:YO()},replaceXAxis:{reducer(e,t){var{prev:r,next:n}=t.payload;void 0!==e.xAxis[r.id]&&(r.id!==n.id&&delete e.xAxis[r.id],e.xAxis[n.id]=n)},prepare:YO()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:YO()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:YO()},replaceYAxis:{reducer(e,t){var{prev:r,next:n}=t.payload;void 0!==e.yAxis[r.id]&&(r.id!==n.id&&delete e.yAxis[r.id],e.yAxis[n.id]=n)},prepare:YO()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:YO()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:YO()},replaceZAxis:{reducer(e,t){var{prev:r,next:n}=t.payload;void 0!==e.zAxis[r.id]&&(r.id!==n.id&&delete e.zAxis[r.id],e.zAxis[n.id]=n)},prepare:YO()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:YO()},updateYAxisWidth(e,t){var{id:r,width:n}=t.payload,i=e.yAxis[r];if(i){var a,o=i.widthHistory||[];if(3===o.length&&o[0]===o[2]&&n===o[1]&&n!==i.width&&Math.abs(n-(null!==(a=o[0])&&void 0!==a?a:0))<=1)return;var s=[...o,n].slice(-3);e.yAxis[r]=b0(b0({},i),{},{width:n,widthHistory:s})}}}}),{addXAxis:E0,replaceXAxis:k0,removeXAxis:S0,addYAxis:j0,replaceYAxis:F0,removeYAxis:Q0,addZAxis:N0,replaceZAxis:U0,removeZAxis:O0,updateYAxisWidth:I0}=C0.actions,T0=C0.reducer,P0=NN([jT],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),M0=NN([P0,dT,hT],(e,t,r)=>{if(e&&null!=t&&null!=r)return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,r-e.top-e.bottom)}}),D0=()=>vN(M0);function L0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function H0(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?L0(Object(r),!0).forEach(function(t){_0(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L0(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function _0(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var R0=e=>{var{point:t,childIndex:r,mainColor:n,activeDot:i,dataKey:a,clipPath:o}=e;if(!1===i||null==t.x||null==t.y)return null;var s,A=H0(H0(H0({},{index:r,dataKey:a,cx:t.x,cy:t.y,r:4,fill:null!=n?n:"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value}),Zk(i)),oF(i));return s=Te.isValidElement(i)?Te.cloneElement(i,A):"function"==typeof i?i(A):De.createElement(pJ,A),De.createElement(oS,{className:"recharts-active-dot",clipPath:o},s)};function K0(e){var{points:t,mainColor:r,activeDot:n,itemDataKey:i,clipPath:a,zIndex:o=fV.activeDot}=e,s=vN(lq),A=vN(yq);if(null==t||null==A)return null;var l=t.find(e=>A.includes(e.payload));return Wj(l)?null:De.createElement(Zq,{zIndex:o},De.createElement(R0,{point:l,childIndex:Number(s),mainColor:r,dataKey:i,activeDot:n,clipPath:a}))}var z0=(e,t,r)=>{var n=null!=r?r:e;if(!Wj(n))return Kj(n,t,0)};function V0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function $0(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?V0(Object(r),!0).forEach(function(t){W0(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):V0(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function W0(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function G0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function q0(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?G0(Object(r),!0).forEach(function(t){Y0(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):G0(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Y0(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var X0=["Webkit","Moz","O","ms"],J0=e=>{var{chartData:t}=e,r=fN(),n=UT();return Te.useEffect(()=>n?()=>{}:(r(xY(t)),()=>{r(xY(void 0))}),[t,r,n]),null},Z0=e=>e.chartData.chartData,e1=e=>{var{dataStartIndex:t,dataEndIndex:r}=e.chartData;return{startIndex:t,endIndex:r}},t1=Te.createContext(()=>{}),r1={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},n1=oI({name:"brush",initialState:r1,reducers:{setBrushSettings:(e,t)=>null==t.payload?r1:t.payload}}),{setBrushSettings:i1}=n1.actions,a1=n1.reducer;function o1(){return o1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o1.apply(null,arguments)}function s1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function A1(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s1(Object(r),!0).forEach(function(t){l1(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s1(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function l1(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c1(e){var{x:t,y:r,width:n,height:i,stroke:a}=e,o=Math.floor(r+i/2)-1;return De.createElement(De.Fragment,null,De.createElement("rect",{x:t,y:r,width:n,height:i,fill:a,stroke:"none"}),De.createElement("line",{x1:t+1,y1:o,x2:t+n-1,y2:o,fill:"none",stroke:"#fff"}),De.createElement("line",{x1:t+1,y1:o+2,x2:t+n-1,y2:o+2,fill:"none",stroke:"#fff"}))}function u1(e){var{travellerProps:t,travellerType:r}=e;return De.isValidElement(r)?De.cloneElement(r,t):"function"==typeof r?r(t):De.createElement(c1,t)}function d1(e){if(qj(e)&&"object"==typeof e&&"name"in e&&"string"==typeof e.name)return e.name}function h1(e){var{otherProps:t,travellerX:r,id:n,onMouseEnter:i,onMouseLeave:a,onMouseDown:o,onTouchStart:s,onTravellerMoveKeyboard:A,onFocus:l,onBlur:c}=e,{y:u,x:d,travellerWidth:h,height:p,traveller:f,ariaLabel:m,data:g,startIndex:y,endIndex:v}=t,x=Math.max(r,d),w=A1(A1({},Jk(t)),{},{x:x,y:u,width:h,height:p}),b=m||function(e,t,r){var n=d1(e[t]),i=d1(e[r]);return"Min value: ".concat(n,", Max value: ").concat(i)}(g,y,v);return De.createElement(oS,{tabIndex:0,role:"slider","aria-label":b,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:i,onMouseLeave:a,onMouseDown:o,onTouchStart:s,onKeyDown:e=>{["ArrowLeft","ArrowRight"].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),A("ArrowRight"===e.key?1:-1,n))},onFocus:l,onBlur:c,style:{cursor:"col-resize"}},De.createElement(u1,{travellerType:f,travellerProps:w}))}function p1(e){var{index:t,data:r,tickFormatter:n,dataKey:i}=e,a=JI(r[t],i,t);return"function"==typeof n?n(a,t):a}function f1(e,t){for(var r=0,n=e.length-1;n-r>1;){var i=Math.floor((r+n)/2),a=e[i];null!=a&&a>t?n=i:r=i}var o=e[n];return null!=o&&t>=o?n:r}function m1(e){var{startX:t,endX:r,scaleValues:n,gap:i,data:a}=e,o=a.length-1,s=Math.min(t,r),A=Math.max(t,r),l=f1(n,s),c=f1(n,A);return{startIndex:l-l%i,endIndex:c===o?o:c-c%i}}function g1(e){var{x:t,y:r,width:n,height:i,fill:a,stroke:o}=e;return De.createElement("rect",{stroke:o,fill:a,x:t,y:r,width:n,height:i})}function y1(e){var{startIndex:t,endIndex:r,y:n,height:i,travellerWidth:a,stroke:o,tickFormatter:s,dataKey:A,data:l,startX:c,endX:u}=e,d={pointerEvents:"none",fill:o};return De.createElement(oS,{className:"recharts-brush-texts"},De.createElement(BX,o1({textAnchor:"end",verticalAnchor:"middle",x:Math.min(c,u)-5,y:n+i/2},d),p1({index:t,tickFormatter:s,dataKey:A,data:l})),De.createElement(BX,o1({textAnchor:"start",verticalAnchor:"middle",x:Math.max(c,u)+a+5,y:n+i/2},d),p1({index:r,tickFormatter:s,dataKey:A,data:l})))}function v1(e){var{y:t,height:r,stroke:n,travellerWidth:i,startX:a,endX:o,onMouseEnter:s,onMouseLeave:A,onMouseDown:l,onTouchStart:c}=e,u=Math.min(a,o)+i,d=Math.max(Math.abs(o-a)-i,0);return De.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:s,onMouseLeave:A,onMouseDown:l,onTouchStart:c,style:{cursor:"move"},stroke:"none",fill:n,fillOpacity:.2,x:u,y:t,width:d,height:r})}function x1(e){var{x:t,y:r,width:n,height:i,data:a,children:o,padding:s}=e;if(!(1===De.Children.count(o)))return null;var A=Te.Children.only(o);return A?De.cloneElement(A,{x:t,y:r,width:n,height:i,margin:s,compact:!0,data:a}):null}var w1=e=>e.changedTouches&&!!e.changedTouches.length;class b1 extends Te.PureComponent{constructor(e){super(e),l1(this,"handleDrag",e=>{this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.state.isTravellerMoving?this.handleTravellerMove(e):this.state.isSlideMoving&&this.handleSlideDrag(e)}),l1(this,"handleTouchMove",e=>{var t,r=null===(t=e.changedTouches)||void 0===t?void 0:t[0];null!=r&&this.handleDrag(r)}),l1(this,"handleDragEnd",()=>{this.setState({isTravellerMoving:!1,isSlideMoving:!1},()=>{var{endIndex:e,onDragEnd:t,startIndex:r}=this.props;null==t||t({endIndex:e,startIndex:r})}),this.detachDragEndListener()}),l1(this,"handleLeaveWrapper",()=>{(this.state.isTravellerMoving||this.state.isSlideMoving)&&(this.leaveTimer=window.setTimeout(this.handleDragEnd,this.props.leaveTimeOut))}),l1(this,"handleEnterSlideOrTraveller",()=>{this.setState({isTextActive:!0})}),l1(this,"handleLeaveSlideOrTraveller",()=>{this.setState({isTextActive:!1})}),l1(this,"handleSlideDragStart",e=>{var t=w1(e)?e.changedTouches[0]:e;null!=t&&(this.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:t.pageX}),this.attachDragEndListener())}),l1(this,"handleTravellerMoveKeyboard",(e,t)=>{var{data:r,gap:n,startIndex:i,endIndex:a}=this.props,{scaleValues:o,startX:s,endX:A}=this.state;if(null!=o){var l=-1;if("startX"===t?l=i:"endX"===t&&(l=a),!(l<0||l>=r.length)){var c=l+e;if(!(-1===c||c>=o.length)){var u=o[c];null!=u&&("startX"===t&&u>=A||"endX"===t&&u<=s||this.setState({[t]:u},()=>{this.props.onChange(m1({startX:this.state.startX,endX:this.state.endX,data:r,gap:n,scaleValues:o}))}))}}}}),this.travellerDragStartHandlers={startX:this.handleTravellerDragStart.bind(this,"startX"),endX:this.handleTravellerDragStart.bind(this,"endX")},this.state={brushMoveStartX:0,movingTravellerId:void 0,endX:0,startX:0,slideMoveStartX:0}}static getDerivedStateFromProps(e,t){var{data:r,width:n,x:i,travellerWidth:a,startIndex:o,endIndex:s,startIndexControlledFromProps:A,endIndexControlledFromProps:l}=e;if(r!==t.prevData)return A1({prevData:r,prevTravellerWidth:a,prevX:i,prevWidth:n},r&&r.length?(e=>{var{data:t,startIndex:r,endIndex:n,x:i,width:a,travellerWidth:o}=e;if(!t||!t.length)return{};var s=t.length,A=hH().domain(DL(0,s)).range([i,i+a-o]),l=A.domain().map(e=>A(e)).filter(qj);return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:A(r),endX:A(n),scale:A,scaleValues:l}})({data:r,width:n,x:i,travellerWidth:a,startIndex:o,endIndex:s}):{scale:void 0,scaleValues:void 0});var c=t.scale;if(c&&(n!==t.prevWidth||i!==t.prevX||a!==t.prevTravellerWidth)){c.range([i,i+n-a]);var u=c.domain().map(e=>c(e)).filter(e=>null!=e);return{prevData:r,prevTravellerWidth:a,prevX:i,prevWidth:n,startX:c(e.startIndex),endX:c(e.endIndex),scaleValues:u}}if(t.scale&&!t.isSlideMoving&&!t.isTravellerMoving&&!t.isTravellerFocused&&!t.isTextActive){if(null!=A&&t.prevStartIndexControlledFromProps!==A)return{startX:t.scale(A),prevStartIndexControlledFromProps:A};if(null!=l&&t.prevEndIndexControlledFromProps!==l)return{endX:t.scale(l),prevEndIndexControlledFromProps:l}}return null}componentWillUnmount(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}attachDragEndListener(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}detachDragEndListener(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}handleSlideDrag(e){var{slideMoveStartX:t,startX:r,endX:n,scaleValues:i}=this.state;if(null!=i){var{x:a,width:o,travellerWidth:s,startIndex:A,endIndex:l,onChange:c,data:u,gap:d}=this.props,h=e.pageX-t;h>0?h=Math.min(h,a+o-s-n,a+o-s-r):h<0&&(h=Math.max(h,a-r,a-n));var p=m1({startX:r+h,endX:n+h,data:u,gap:d,scaleValues:i});p.startIndex===A&&p.endIndex===l||!c||c(p),this.setState({startX:r+h,endX:n+h,slideMoveStartX:e.pageX})}}handleTravellerDragStart(e,t){var r=w1(t)?t.changedTouches[0]:t;null!=r&&(this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:e,brushMoveStartX:r.pageX}),this.attachDragEndListener())}handleTravellerMove(e){var{brushMoveStartX:t,movingTravellerId:r,endX:n,startX:i,scaleValues:a}=this.state;if(null!=r&&null!=a){var o=this.state[r],{x:s,width:A,travellerWidth:l,onChange:c,gap:u,data:d}=this.props,h={startX:this.state.startX,endX:this.state.endX,data:d,gap:u,scaleValues:a},p=e.pageX-t;p>0?p=Math.min(p,s+A-l-o):p<0&&(p=Math.max(p,s-o)),h[r]=o+p;var f=m1(h),{startIndex:m,endIndex:g}=f;this.setState({[r]:o+p,brushMoveStartX:e.pageX},()=>{var e;c&&(e=d.length-1,("startX"===r&&(n>i?m%u===0:g%u===0)||n<i&&g===e||"endX"===r&&(n>i?g%u===0:m%u===0)||n>i&&g===e)&&c(f))})}}render(){var{data:e,className:t,children:r,x:n,y:i,dy:a,width:o,height:s,alwaysShowText:A,fill:l,stroke:c,startIndex:u,endIndex:d,travellerWidth:h,tickFormatter:p,dataKey:f,padding:m}=this.props,{startX:g,endX:y,isTextActive:v,isSlideMoving:x,isTravellerMoving:w,isTravellerFocused:b}=this.state;if(!e||!e.length||!Lj(n)||!Lj(i)||!Lj(o)||!Lj(s)||o<=0||s<=0)return null;var B,C,E,k,S=yh("recharts-brush",t),j=(C="none",E=(B="userSelect").replace(/(\w)/,e=>e.toUpperCase()),(k=X0.reduce((e,t)=>q0(q0({},e),{},{[t+E]:C}),{}))[B]=C,k),F=i+(null!=a?a:0);return De.createElement(oS,{className:S,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:j},De.createElement(g1,{x:n,y:F,width:o,height:s,fill:l,stroke:c}),De.createElement(OT,null,De.createElement(x1,{x:n,y:F,width:o,height:s,data:e,padding:m},r)),De.createElement(v1,{y:F,height:s,stroke:c,travellerWidth:h,startX:g,endX:y,onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart}),De.createElement(h1,{travellerX:g,id:"startX",otherProps:A1(A1({},this.props),{},{y:F}),onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers.startX,onTouchStart:this.travellerDragStartHandlers.startX,onTravellerMoveKeyboard:this.handleTravellerMoveKeyboard,onFocus:()=>{this.setState({isTravellerFocused:!0})},onBlur:()=>{this.setState({isTravellerFocused:!1})}}),De.createElement(h1,{travellerX:y,id:"endX",otherProps:A1(A1({},this.props),{},{y:F}),onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers.endX,onTouchStart:this.travellerDragStartHandlers.endX,onTravellerMoveKeyboard:this.handleTravellerMoveKeyboard,onFocus:()=>{this.setState({isTravellerFocused:!0})},onBlur:()=>{this.setState({isTravellerFocused:!1})}}),(v||x||w||b||A)&&De.createElement(y1,{startIndex:u,endIndex:d,y:F,height:s,travellerWidth:h,stroke:c,tickFormatter:p,dataKey:f,data:e,startX:g,endX:y}))}}function B1(e){var t,r,n,i,a=fN(),o=vN(Z0),s=vN(e1),A=Te.useContext(t1),l=e.onChange,{startIndex:c,endIndex:u}=e;Te.useEffect(()=>{a(wY({startIndex:c,endIndex:u}))},[a,u,c]),t=vN(dV),r=vN(pV),n=vN(e=>e.chartData.dataStartIndex),i=vN(e=>e.chartData.dataEndIndex),Te.useEffect(()=>{if(null!=t&&null!=n&&null!=i&&null!=r){var e={startIndex:n,endIndex:i};uY.emit(hY,t,e,r)}},[i,n,r,t]);var d=Te.useCallback(e=>{if(null!=s){var{startIndex:t,endIndex:r}=s;e.startIndex===t&&e.endIndex===r||(null==A||A(e),null==l||l(e),a(wY(e)))}},[l,A,a,s]),h=vN(TT);if(null==h||null==s||null==o||!o.length)return null;var{startIndex:p,endIndex:f}=s,{x:m,y:g,width:y}=h,v={data:o,x:m,y:g,width:y,startIndex:p,endIndex:f,onChange:d};return De.createElement(b1,o1({},e,v,{startIndexControlledFromProps:null!=c?c:void 0,endIndexControlledFromProps:null!=u?u:void 0}))}function C1(e){var t=fN();return Te.useEffect(()=>(t(i1(e)),()=>{t(i1(null))}),[t,e]),null}var E1={height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1};function k1(e){var t=cF(e,E1);return De.createElement(De.Fragment,null,De.createElement(C1,{height:t.height,x:t.x,y:t.y,width:t.width,padding:t.padding}),De.createElement(B1,t))}k1.displayName="Brush";var S1=oI({name:"referenceElements",initialState:{dots:[],areas:[],lines:[]},reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=kO(e).dots.findIndex(e=>e===t.payload);-1!==r&&e.dots.splice(r,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var r=kO(e).areas.findIndex(e=>e===t.payload);-1!==r&&e.areas.splice(r,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var r=kO(e).lines.findIndex(e=>e===t.payload);-1!==r&&e.lines.splice(r,1)}}}),{addDot:j1,removeDot:F1,addArea:Q1,removeArea:N1,addLine:U1,removeLine:O1}=S1.actions,I1=S1.reducer,T1=Te.createContext(void 0),P1=e=>{var{children:t}=e,[r]=Te.useState("".concat(Rj("recharts"),"-clip")),n=D0();if(null==n)return null;var{x:i,y:a,width:o,height:s}=n;return De.createElement(T1.Provider,{value:r},De.createElement("defs",null,De.createElement("clipPath",{id:r},De.createElement("rect",{x:i,y:a,height:s,width:o}))),t)};function M1(e,t){if(t<1)return[];if(1===t)return e;for(var r=[],n=0;n<e.length;n+=t){var i=e[n];void 0!==i&&r.push(i)}return r}function D1(e,t,r){return function(e){var{width:t,height:r}=e,n=function(e){return(e%180+180)%180}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),i=n*Math.PI/180,a=Math.atan(r/t),o=i>a&&i<Math.PI-a?r/Math.sin(i):t/Math.cos(i);return Math.abs(o)}({width:e.width+t.width,height:e.height+t.height},r)}function L1(e,t,r,n,i){if(e*t<e*n||e*t>e*i)return!1;var a=r();return e*(t-e*a/2-n)>=0&&e*(t+e*a/2-i)<=0}function H1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _1(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?H1(Object(r),!0).forEach(function(t){R1(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H1(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function R1(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function K1(e,t,r){var n,{tick:i,ticks:a,viewBox:o,minTickGap:s,orientation:A,interval:l,tickFormatter:c,unit:u,angle:d}=e;if(!a||!a.length||!i)return[];if(Lj(l)||FD)return null!==(n=function(e,t){return M1(e,t+1)}(a,Lj(l)?l:0))&&void 0!==n?n:[];var h=[],p="top"===A||"bottom"===A?"width":"height",f=u&&"width"===p?WY(u,{fontSize:t,letterSpacing:r}):{width:0,height:0},m=(e,n)=>{var i="function"==typeof c?c(e.value,n):e.value;return"width"===p?D1(WY(i,{fontSize:t,letterSpacing:r}),f,d):WY(i,{fontSize:t,letterSpacing:r})[p]},g=a[0],y=a[1],v=a.length>=2&&null!=g&&null!=y?Pj(y.coordinate-g.coordinate):1,x=function(e,t,r){var n="width"===r,{x:i,y:a,width:o,height:s}=e;return 1===t?{start:n?i:a,end:n?i+o:a+s}:{start:n?i+o:a+s,end:n?i:a}}(o,v,p);return"equidistantPreserveStart"===l?function(e,t,r,n,i){for(var a,o=(n||[]).slice(),{start:s,end:A}=t,l=0,c=1,u=s,d=function(){var t=null==n?void 0:n[l];if(void 0===t)return{v:M1(n,c)};var a,o=l,d=()=>(void 0===a&&(a=r(t,o)),a),h=t.coordinate,p=0===l||L1(e,h,d,u,A);p||(l=0,u=s,c+=1),p&&(u=h+e*(d()/2+i),l+=c)};c<=o.length;)if(a=d())return a.v;return[]}(v,x,m,a,s):"equidistantPreserveEnd"===l?function(e,t,r,n,i){var a=(n||[]).slice().length;if(0===a)return[];for(var{start:o,end:s}=t,A=1;A<=a;A++){for(var l,c=(a-1)%A,u=o,d=!0,h=function(){var t=n[p];if(null==t)return 0;var a,o=p,A=()=>(void 0===a&&(a=r(t,o)),a),l=t.coordinate,h=p===c||L1(e,l,A,u,s);if(!h)return d=!1,1;h&&(u=l+e*(A()/2+i))},p=c;p<a&&(0===(l=h())||1!==l);p+=A);if(d){for(var f=[],m=c;m<a;m+=A){var g=n[m];null!=g&&f.push(g)}return f}}return[]}(v,x,m,a,s):(h="preserveStart"===l||"preserveStartEnd"===l?function(e,t,r,n,i,a){var o=(n||[]).slice(),s=o.length,{start:A,end:l}=t;if(a){var c=n[s-1];if(null!=c){var u=r(c,s-1),d=e*(c.coordinate+e*u/2-l);o[s-1]=c=_1(_1({},c),{},{tickCoord:d>0?c.coordinate-d*e:c.coordinate}),null!=c.tickCoord&&L1(e,c.tickCoord,()=>u,A,l)&&(l=c.tickCoord-e*(u/2+i),o[s-1]=_1(_1({},c),{},{isShow:!0}))}}for(var h=a?s-1:s,p=function(t){var n=o[t];if(null==n)return 1;var a,s=n,c=()=>(void 0===a&&(a=r(n,t)),a);if(0===t){var u=e*(s.coordinate-e*c()/2-A);o[t]=s=_1(_1({},s),{},{tickCoord:u<0?s.coordinate-u*e:s.coordinate})}else o[t]=s=_1(_1({},s),{},{tickCoord:s.coordinate});null!=s.tickCoord&&L1(e,s.tickCoord,c,A,l)&&(A=s.tickCoord+e*(c()/2+i),o[t]=_1(_1({},s),{},{isShow:!0}))},f=0;f<h;f++)p(f);return o}(v,x,m,a,s,"preserveStartEnd"===l):function(e,t,r,n,i){for(var a=(n||[]).slice(),o=a.length,{start:s}=t,{end:A}=t,l=function(t){var n=a[t];if(null==n)return 1;var l,c=n,u=()=>(void 0===l&&(l=r(n,t)),l);if(t===o-1){var d=e*(c.coordinate+e*u()/2-A);a[t]=c=_1(_1({},c),{},{tickCoord:d>0?c.coordinate-d*e:c.coordinate})}else a[t]=c=_1(_1({},c),{},{tickCoord:c.coordinate});null!=c.tickCoord&&L1(e,c.tickCoord,u,s,A)&&(A=c.tickCoord-e*(u()/2+i),a[t]=_1(_1({},c),{},{isShow:!0}))},c=o-1;c>=0;c--)l(c);return a}(v,x,m,a,s),h.filter(e=>e.isShow))}var z1=["axisLine","width","height","className","hide","ticks","axisType"];function V1(){return V1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},V1.apply(null,arguments)}function $1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function W1(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$1(Object(r),!0).forEach(function(t){G1(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$1(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function G1(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var q1={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd",zIndex:fV.axis};function Y1(e){var{x:t,y:r,width:n,height:i,orientation:a,mirror:o,axisLine:s,otherSvgProps:A}=e;if(!s)return null;var l=W1(W1(W1({},A),Jk(s)),{},{fill:"none"});if("top"===a||"bottom"===a){var c=+("top"===a&&!o||"bottom"===a&&o);l=W1(W1({},l),{},{x1:t,y1:r+c*i,x2:t+n,y2:r+c*i})}else{var u=+("left"===a&&!o||"right"===a&&o);l=W1(W1({},l),{},{x1:t+u*n,y1:r,x2:t+u*n,y2:r+i})}return De.createElement("line",V1({},l,{className:yh("recharts-cartesian-axis-line",Oj(s,"className"))}))}function X1(e){var t,{option:r,tickProps:n,value:i}=e,a=yh(n.className,"recharts-cartesian-axis-tick-value");if(De.isValidElement(r))t=De.cloneElement(r,W1(W1({},n),{},{className:a}));else if("function"==typeof r)t=r(W1(W1({},n),{},{className:a}));else{var o="recharts-cartesian-axis-tick-value";"boolean"!=typeof r&&(o=yh(o,OJ(r))),t=De.createElement(BX,V1({},n,{className:o}),i)}return t}var J1=Te.forwardRef((e,t)=>{var{ticks:r=[],tick:n,tickLine:i,stroke:a,tickFormatter:o,unit:s,padding:A,tickTextProps:l,orientation:c,mirror:u,x:d,y:h,width:p,height:f,tickSize:m,tickMargin:g,fontSize:y,letterSpacing:v,getTicksConfig:x,events:w,axisType:b}=e,B=K1(W1(W1({},x),{},{ticks:r}),y,v),C=function(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}(c,u),E=function(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}(c,u),k=Jk(x),S=Zk(n),j={};"object"==typeof i&&(j=i);var F=W1(W1({},k),{},{fill:"none"},j),Q=B.map(e=>W1({entry:e},function(e,t,r,n,i,a,o,s,A){var l,c,u,d,h,p,f=s?-1:1,m=e.tickSize||o,g=Lj(e.tickCoord)?e.tickCoord:e.coordinate;switch(a){case"top":l=c=e.coordinate,p=(u=(d=r+ +!s*i)-f*m)-f*A,h=g;break;case"left":u=d=e.coordinate,h=(l=(c=t+ +!s*n)-f*m)-f*A,p=g;break;case"right":u=d=e.coordinate,h=(l=(c=t+ +s*n)+f*m)+f*A,p=g;break;default:l=c=e.coordinate,p=(u=(d=r+ +s*i)+f*m)+f*A,h=g}return{line:{x1:l,y1:u,x2:c,y2:d},tick:{x:h,y:p}}}(e,d,h,p,f,c,m,u,g))),N=Q.map(e=>{var{entry:t,line:r}=e;return De.createElement(oS,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(t.value,"-").concat(t.coordinate,"-").concat(t.tickCoord)},i&&De.createElement("line",V1({},F,r,{className:yh("recharts-cartesian-axis-tick-line",Oj(i,"className"))})))}),U=Q.map((e,t)=>{var r,i,{entry:c,tick:u}=e,d=W1(W1(W1(W1({verticalAnchor:E},k),{},{textAnchor:C,stroke:"none",fill:a},u),{},{index:t,payload:c,visibleTicksCount:B.length,tickFormatter:o,padding:A},l),{},{angle:null!==(r=null!==(i=null==l?void 0:l.angle)&&void 0!==i?i:k.angle)&&void 0!==r?r:0}),h=W1(W1({},d),S);return De.createElement(oS,V1({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(c.value,"-").concat(c.coordinate,"-").concat(c.tickCoord)},sF(w,c,t)),n&&De.createElement(X1,{option:n,tickProps:h,value:"".concat("function"==typeof o?o(c.value,t):c.value).concat(s||"")}))});return De.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(b,"-ticks")},U.length>0&&De.createElement(Zq,{zIndex:fV.label},De.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(b,"-tick-labels"),ref:t},U)),N.length>0&&De.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(b,"-tick-lines")},N))}),Z1=Te.forwardRef((e,t)=>{var{axisLine:r,width:n,height:i,className:a,hide:o,ticks:s,axisType:A}=e,l=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,z1),[c,u]=Te.useState(""),[d,h]=Te.useState(""),p=Te.useRef(null);Te.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var t;return(e=>{var{ticks:t,label:r,labelGapWithTick:n=5,tickSize:i=0,tickMargin:a=0}=e,o=0;if(t){Array.from(t).forEach(e=>{if(e){var t=e.getBoundingClientRect();t.width>o&&(o=t.width)}});var s=r?r.getBoundingClientRect().width:0,A=o+(i+a)+s+(r?n:0);return Math.round(A)}return 0})({ticks:p.current,label:null===(t=e.labelRef)||void 0===t?void 0:t.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var f=Te.useCallback(e=>{if(e){var t=e.getElementsByClassName("recharts-cartesian-axis-tick-value");p.current=t;var r=t[0];if(r){var n=window.getComputedStyle(r),i=n.fontSize,a=n.letterSpacing;i===c&&a===d||(u(i),h(a))}}},[c,d]);return o||null!=n&&n<=0||null!=i&&i<=0?null:De.createElement(Zq,{zIndex:e.zIndex},De.createElement(oS,{className:yh("recharts-cartesian-axis",a)},De.createElement(Y1,{x:e.x,y:e.y,width:n,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:Jk(e)}),De.createElement(J1,{ref:f,axisType:A,events:l,fontSize:c,getTicksConfig:e,height:e.height,letterSpacing:d,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:s,unit:e.unit,width:e.width,x:e.x,y:e.y}),De.createElement(TX,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},De.createElement(KX,{label:e.label,labelRef:e.labelRef}),e.children)))}),e2=De.forwardRef((e,t)=>{var r=cF(e,q1);return De.createElement(Z1,V1({},r,{ref:t}))});e2.displayName="CartesianAxis";var t2=["x1","y1","x2","y2","key"],r2=["offset"],n2=["xAxisId","yAxisId"],i2=["xAxisId","yAxisId"];function a2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function o2(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a2(Object(r),!0).forEach(function(t){s2(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a2(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function s2(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function A2(){return A2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},A2.apply(null,arguments)}function l2(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var c2=e=>{var{fill:t}=e;if(!t||"none"===t)return null;var{fillOpacity:r,x:n,y:i,width:a,height:o,ry:s}=e;return De.createElement("rect",{x:n,y:i,ry:s,width:a,height:o,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function u2(e){var t,{option:r,lineItemProps:n}=e;if(De.isValidElement(r))t=De.cloneElement(r,n);else if("function"==typeof r)t=r(n);else{var i,{x1:a,y1:o,x2:s,y2:A,key:l}=n,c=null!==(i=Jk(l2(n,t2)))&&void 0!==i?i:{},{offset:u}=c,d=l2(c,r2);t=De.createElement("line",A2({},d,{x1:a,y1:o,x2:s,y2:A,fill:"none",key:l}))}return t}function d2(e){var{x:t,width:r,horizontal:n=!0,horizontalPoints:i}=e;if(!n||!i||!i.length)return null;var{xAxisId:a,yAxisId:o}=e,s=l2(e,n2),A=i.map((e,i)=>{var a=o2(o2({},s),{},{x1:t,y1:e,x2:t+r,y2:e,key:"line-".concat(i),index:i});return De.createElement(u2,{key:"line-".concat(i),option:n,lineItemProps:a})});return De.createElement("g",{className:"recharts-cartesian-grid-horizontal"},A)}function h2(e){var{y:t,height:r,vertical:n=!0,verticalPoints:i}=e;if(!n||!i||!i.length)return null;var{xAxisId:a,yAxisId:o}=e,s=l2(e,i2),A=i.map((e,i)=>{var a=o2(o2({},s),{},{x1:e,y1:t,x2:e,y2:t+r,key:"line-".concat(i),index:i});return De.createElement(u2,{option:n,lineItemProps:a,key:"line-".concat(i)})});return De.createElement("g",{className:"recharts-cartesian-grid-vertical"},A)}function p2(e){var{horizontalFill:t,fillOpacity:r,x:n,y:i,width:a,height:o,horizontalPoints:s,horizontal:A=!0}=e;if(!A||!t||!t.length||null==s)return null;var l=s.map(e=>Math.round(e+i-i)).sort((e,t)=>e-t);i!==l[0]&&l.unshift(0);var c=l.map((e,s)=>{var A=l[s+1],c=null==A?i+o-e:A-e;if(c<=0)return null;var u=s%t.length;return De.createElement("rect",{key:"react-".concat(s),y:e,x:n,height:c,width:a,stroke:"none",fill:t[u],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return De.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},c)}function f2(e){var{vertical:t=!0,verticalFill:r,fillOpacity:n,x:i,y:a,width:o,height:s,verticalPoints:A}=e;if(!t||!r||!r.length)return null;var l=A.map(e=>Math.round(e+i-i)).sort((e,t)=>e-t);i!==l[0]&&l.unshift(0);var c=l.map((e,t)=>{var A=l[t+1],c=null==A?i+o-e:A-e;if(c<=0)return null;var u=t%r.length;return De.createElement("rect",{key:"react-".concat(t),x:e,y:a,width:c,height:s,stroke:"none",fill:r[u],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return De.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},c)}var m2=(e,t)=>{var{xAxis:r,width:n,height:i,offset:a}=e;return eT(K1(o2(o2(o2({},q1),r),{},{ticks:tT(r),viewBox:{x:0,y:0,width:n,height:i}})),a.left,a.left+a.width,t)},g2=(e,t)=>{var{yAxis:r,width:n,height:i,offset:a}=e;return eT(K1(o2(o2(o2({},q1),r),{},{ticks:tT(r),viewBox:{x:0,y:0,width:n,height:i}})),a.top,a.top+a.height,t)},y2={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:fV.grid};function v2(e){var t=cP(),r=uP(),n=lP(),i=o2(o2({},cF(e,y2)),{},{x:Lj(e.x)?e.x:n.left,y:Lj(e.y)?e.y:n.top,width:Lj(e.width)?e.width:n.width,height:Lj(e.height)?e.height:n.height}),{xAxisId:a,yAxisId:o,x:s,y:A,width:l,height:c,syncWithTicks:u,horizontalValues:d,verticalValues:h}=i,p=UT(),f=vN(e=>DW(e,"xAxis",a,p)),m=vN(e=>DW(e,"yAxis",o,p));if(!(GI(l)&&GI(c)&&Lj(s)&&Lj(A)))return null;var g=i.verticalCoordinatesGenerator||m2,y=i.horizontalCoordinatesGenerator||g2,{horizontalPoints:v,verticalPoints:x}=i;if(!(v&&v.length||"function"!=typeof y)){var w=d&&d.length,b=y({yAxis:m?o2(o2({},m),{},{ticks:w?d:m.ticks}):void 0,width:null!=t?t:l,height:null!=r?r:c,offset:n},!!w||u);KT(Array.isArray(b),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof b,"]")),Array.isArray(b)&&(v=b)}if(!(x&&x.length||"function"!=typeof g)){var B=h&&h.length,C=g({xAxis:f?o2(o2({},f),{},{ticks:B?h:f.ticks}):void 0,width:null!=t?t:l,height:null!=r?r:c,offset:n},!!B||u);KT(Array.isArray(C),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof C,"]")),Array.isArray(C)&&(x=C)}return De.createElement(Zq,{zIndex:i.zIndex},De.createElement("g",{className:"recharts-cartesian-grid"},De.createElement(c2,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),De.createElement(p2,A2({},i,{horizontalPoints:v})),De.createElement(f2,A2({},i,{verticalPoints:x})),De.createElement(d2,A2({},i,{offset:n,horizontalPoints:v,xAxis:f,yAxis:m})),De.createElement(h2,A2({},i,{offset:n,verticalPoints:x,xAxis:f,yAxis:m}))))}v2.displayName="CartesianGrid";var x2=oI({name:"errorBars",initialState:{},reducers:{addErrorBar:(e,t)=>{var{itemId:r,errorBar:n}=t.payload;e[r]||(e[r]=[]),e[r].push(n)},replaceErrorBar:(e,t)=>{var{itemId:r,prev:n,next:i}=t.payload;e[r]&&(e[r]=e[r].map(e=>e.dataKey===n.dataKey&&e.direction===n.direction?i:e))},removeErrorBar:(e,t)=>{var{itemId:r,errorBar:n}=t.payload;e[r]&&(e[r]=e[r].filter(e=>e.dataKey!==n.dataKey||e.direction!==n.direction))}}}),{addErrorBar:w2,replaceErrorBar:b2,removeErrorBar:B2}=x2.actions,C2=x2.reducer,E2=["children"];var k2={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},S2=Te.createContext(k2);function j2(e){var{children:t}=e,r=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,E2);return De.createElement(S2.Provider,{value:r},t)}function F2(e,t){var r,n,i=vN(t=>YV(t,e)),a=vN(e=>ZV(e,t)),o=null!==(r=null==i?void 0:i.allowDataOverflow)&&void 0!==r?r:GV.allowDataOverflow,s=null!==(n=null==a?void 0:a.allowDataOverflow)&&void 0!==n?n:XV.allowDataOverflow;return{needClip:o||s,needClipX:o,needClipY:s}}function Q2(e){var{xAxisId:t,yAxisId:r,clipPathId:n}=e,i=D0(),{needClipX:a,needClipY:o,needClip:s}=F2(t,r);if(!s||!i)return null;var{x:A,y:l,width:c,height:u}=i;return De.createElement("clipPath",{id:"clipPath-".concat(n)},De.createElement("rect",{x:a?A:A-c/2,y:o?l:l-u/2,width:a?c:2*c,height:o?u:2*u}))}var N2=(e,t,r,n)=>_W(e,"xAxis",t,n),U2=(e,t,r,n)=>HW(e,"xAxis",t,n),O2=(e,t,r,n)=>_W(e,"yAxis",r,n),I2=(e,t,r,n)=>HW(e,"yAxis",r,n),T2=NN([dP,N2,O2,U2,I2],(e,t,r,n,i)=>ZI(e,"xAxis")?lT(t,n,!1):lT(r,i,!1));function P2(e){return"line"===e.type}var M2=NN([o$,(e,t,r,n,i)=>i],(e,t)=>e.filter(P2).find(e=>e.id===t)),D2=NN([dP,N2,O2,U2,I2,M2,T2,wz],(e,t,r,n,i,a,o,s)=>{var{chartData:A,dataStartIndex:l,dataEndIndex:c}=s;if(null!=a&&null!=t&&null!=r&&null!=n&&null!=i&&0!==n.length&&0!==i.length&&null!=o&&("horizontal"===e||"vertical"===e)){var u,{dataKey:d,data:h}=a;if(null!=(u=null!=h&&h.length>0?h:null==A?void 0:A.slice(l,c+1)))return function(e){var{layout:t,xAxis:r,yAxis:n,xAxisTicks:i,yAxisTicks:a,dataKey:o,bandSize:s,displayedData:A}=e;return A.map((e,A)=>{var l=JI(e,o);if("horizontal"===t){var c=iT({axis:r,ticks:i,bandSize:s,entry:e,index:A}),u=Wj(l)?null:n.scale.map(l);return{x:c,y:null!=u?u:null,value:l,payload:e}}var d=Wj(l)?null:r.scale.map(l),h=iT({axis:n,ticks:a,bandSize:s,entry:e,index:A});return null==d||null==h?null:{x:d,y:h,value:l,payload:e}}).filter(Boolean)}({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:i,dataKey:d,bandSize:o,displayedData:u})}});var L2,H2={exports:{}},_2={};var R2,K2,z2={};
|
|
81
|
+
/**
|
|
82
|
+
* @license React
|
|
83
|
+
* use-sync-external-store-with-selector.development.js
|
|
84
|
+
*
|
|
85
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
86
|
+
*
|
|
87
|
+
* This source code is licensed under the MIT license found in the
|
|
88
|
+
* LICENSE file in the root directory of this source tree.
|
|
89
|
+
*/K2||(K2=1,"production"===process.env.NODE_ENV?H2.exports=function(){if(L2)return _2;L2=1;var e=Te,t="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=e.useSyncExternalStore,n=e.useRef,i=e.useEffect,a=e.useMemo,o=e.useDebugValue;return _2.useSyncExternalStoreWithSelector=function(e,s,A,l,c){var u=n(null);if(null===u.current){var d={hasValue:!1,value:null};u.current=d}else d=u.current;u=a(function(){function e(e){if(!i){if(i=!0,r=e,e=l(e),void 0!==c&&d.hasValue){var a=d.value;if(c(a,e))return n=a}return n=e}if(a=n,t(r,e))return a;var o=l(e);return void 0!==c&&c(a,o)?(r=e,a):(r=e,n=o)}var r,n,i=!1,a=void 0===A?null:A;return[function(){return e(s())},null===a?void 0:function(){return e(a())}]},[s,A,l,c]);var h=r(e,u[0],u[1]);return i(function(){d.hasValue=!0,d.value=h},[h]),o(h),h},_2}():H2.exports=(R2||(R2=1,"production"!==process.env.NODE_ENV&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var e=Te,t="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=e.useSyncExternalStore,n=e.useRef,i=e.useEffect,a=e.useMemo,o=e.useDebugValue;z2.useSyncExternalStoreWithSelector=function(e,s,A,l,c){var u=n(null);if(null===u.current){var d={hasValue:!1,value:null};u.current=d}else d=u.current;u=a(function(){function e(e){if(!i){if(i=!0,r=e,e=l(e),void 0!==c&&d.hasValue){var a=d.value;if(c(a,e))return n=a}return n=e}if(a=n,t(r,e))return a;var o=l(e);return void 0!==c&&c(a,o)?(r=e,a):(r=e,n=o)}var r,n,i=!1,a=void 0===A?null:A;return[function(){return e(s())},null===a?void 0:function(){return e(a())}]},[s,A,l,c]);var h=r(e,u[0],u[1]);return i(function(){d.hasValue=!0,d.value=h},[h]),o(h),h},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),z2)),H2.exports;var V2={notify(){},get:()=>[]};var $2=(()=>!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement))(),W2=(()=>"undefined"!=typeof navigator&&"ReactNative"===navigator.product)(),G2=(()=>$2||W2?De.useLayoutEffect:De.useEffect)();function q2(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function Y2(e,t){if(q2(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let i=0;i<r.length;i++)if(!Object.prototype.hasOwnProperty.call(t,r[i])||!q2(e[r[i]],t[r[i]]))return!1;return!0}var X2=Symbol.for("react-redux-context"),J2="undefined"!=typeof globalThis?globalThis:{};function Z2(){if(!De.createContext)return{};const e=J2[X2]??(J2[X2]=new Map);let t=e.get(De.createContext);return t||(t=De.createContext(null),"production"!==process.env.NODE_ENV&&(t.displayName="ReactRedux"),e.set(De.createContext,t)),t}var e4=Z2();var t4=function(e){const{children:t,context:r,serverState:n,store:i}=e,a=De.useMemo(()=>{const t=function(e){let t,r=V2,n=0,i=!1;function a(){A.onStateChange&&A.onStateChange()}function o(){n++,t||(t=e.subscribe(a),r=function(){let e=null,t=null;return{clear(){e=null,t=null},notify(){(()=>{let t=e;for(;t;)t.callback(),t=t.next})()},get(){const t=[];let r=e;for(;r;)t.push(r),r=r.next;return t},subscribe(r){let n=!0;const i=t={callback:r,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){n&&null!==e&&(n=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}())}function s(){n--,t&&0===n&&(t(),t=void 0,r.clear(),r=V2)}const A={addNestedSub:function(e){o();const t=r.subscribe(e);let n=!1;return()=>{n||(n=!0,t(),s())}},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:a,isSubscribed:function(){return i},trySubscribe:function(){i||(i=!0,o())},tryUnsubscribe:function(){i&&(i=!1,s())},getListeners:()=>r};return A}(i),r={store:i,subscription:t,getServerState:n?()=>n:void 0};if("production"===process.env.NODE_ENV)return r;{const{identityFunctionCheck:t="once",stabilityCheck:n="once"}=e;return Object.assign(r,{stabilityCheck:n,identityFunctionCheck:t})}},[i,n]),o=De.useMemo(()=>i.getState(),[i]);G2(()=>{const{subscription:e}=a;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),o!==i.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}},[a,o]);const s=r||e4;return De.createElement(s.Provider,{value:a},t)},r4=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius"]);function n4(e,t){return null==e&&null==t||("number"==typeof e&&"number"==typeof t?e===t||e!=e&&t!=t:e===t)}function i4(e,t){var r=new Set([...Object.keys(e),...Object.keys(t)]);for(var n of r)if(r4.has(n)){if(null==e[n]&&null==t[n])continue;if(!Y2(e[n],t[n]))return!1}else if(!n4(e[n],t[n]))return!1;return!0}var a4=["id"],o4=["type","layout","connectNulls","needClip","shape"],s4=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function A4(){return A4=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},A4.apply(null,arguments)}function l4(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function c4(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l4(Object(r),!0).forEach(function(t){u4(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l4(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function u4(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d4(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var h4=e=>{var{dataKey:t,name:r,stroke:n,legendType:i,hide:a}=e;return[{inactive:a,dataKey:t,type:i,color:n,value:uT(r,t),payload:e}]},p4=De.memo(e=>{var{dataKey:t,data:r,stroke:n,strokeWidth:i,fill:a,name:o,hide:s,unit:A,tooltipType:l,id:c}=e,u={dataDefinedOnItem:r,getPosition:Yj,settings:{stroke:n,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:uT(o,t),hide:s,type:l,color:n,unit:A,graphicalItemId:c}};return De.createElement(NZ,{tooltipEntrySettings:u})}),f4=(e,t)=>"".concat(t,"px ").concat(e-t,"px");function m4(e,t){for(var r=e.length%2!=0?[...e,0]:e,n=[],i=0;i<t;++i)n=[...n,...r];return n}function g4(e){var{clipPathId:t,points:r,props:n}=e,{dot:i,dataKey:a,needClip:o}=n,{id:s}=n,A=Jk(d4(n,a4));return De.createElement(x0,{points:r,dot:i,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:a,baseProps:A,needClip:o,clipPathId:t})}function y4(e){var{showLabels:t,children:r,points:n}=e,i=Te.useMemo(()=>null==n?void 0:n.map(e=>{var t,r,n={x:null!==(t=e.x)&&void 0!==t?t:0,y:null!==(r=e.y)&&void 0!==r?r:0,width:0,lowerWidth:0,upperWidth:0,height:0};return c4(c4({},n),{},{value:e.value,payload:e.payload,viewBox:n,parentViewBox:void 0,fill:void 0})}),[n]);return De.createElement(AJ,{value:t?i:void 0},r)}function v4(e){var{clipPathId:t,pathRef:r,points:n,strokeDasharray:i,props:a}=e,{type:o,layout:s,connectNulls:A,needClip:l,shape:c}=a,u=c4(c4({},eS(d4(a,o4))),{},{fill:"none",className:"recharts-line-curve",clipPath:l?"url(#clipPath-".concat(t,")"):void 0,points:n,type:o,layout:s,connectNulls:A,strokeDasharray:null!=i?i:a.strokeDasharray});return De.createElement(De.Fragment,null,(null==n?void 0:n.length)>1&&De.createElement(kZ,A4({shapeType:"curve",option:c},u,{pathRef:r})),De.createElement(g4,{points:n,clipPathId:t,props:a}))}function x4(e){var{clipPathId:t,props:r,pathRef:n,previousPointsRef:i,longestAnimatedLengthRef:a}=e,{points:o,strokeDasharray:s,isAnimationActive:A,animationBegin:l,animationDuration:c,animationEasing:u,animateNewValues:d,width:h,height:p,onAnimationEnd:f,onAnimationStart:m}=r,g=i.current,y=ID(o,"recharts-line-"),v=Te.useRef(y),[x,w]=Te.useState(!1),b=!x,B=Te.useCallback(()=>{"function"==typeof f&&f(),w(!1)},[f]),C=Te.useCallback(()=>{"function"==typeof m&&m(),w(!0)},[m]),E=function(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch(t){return 0}}(n.current),k=Te.useRef(0);v.current!==y&&(k.current=a.current,v.current=y);var S=k.current;return De.createElement(y4,{points:o,showLabels:b},r.children,De.createElement(OD,{animationId:y,begin:l,duration:c,isActive:A,easing:u,onAnimationEnd:B,onAnimationStart:C,key:y},e=>{var l,c=Vj(S,E+S,e),u=Math.min(c,E);if(A)if(s){var f="".concat(s).split(/[,\s]+/gim).map(e=>parseFloat(e));l=((e,t,r)=>{var n=r.reduce((e,t)=>e+t);if(!n)return f4(t,e);for(var i=Math.floor(e/n),a=e%n,o=t-e,s=[],A=0,l=0;A<r.length;l+=null!==(c=r[A])&&void 0!==c?c:0,++A){var c,u=r[A];if(null!=u&&l+u>a){s=[...r.slice(0,A),a-l];break}}var d=s.length%2==0?[0,o]:[o];return[...m4(r,i),...s,...d].map(e=>"".concat(e,"px")).join(", ")})(u,E,f)}else l=f4(E,u);else l=null==s?void 0:String(s);if(e>0&&E>0&&(i.current=o,a.current=Math.max(a.current,u)),g){var m=g.length/o.length,y=1===e?o:o.map((t,r)=>{var n=Math.floor(r*m);if(g[n]){var i=g[n];return c4(c4({},t),{},{x:Vj(i.x,t.x,e),y:Vj(i.y,t.y,e)})}return c4(c4({},t),{},d?{x:Vj(2*h,t.x,e),y:Vj(p/2,t.y,e)}:{x:t.x,y:t.y})});return i.current=y,De.createElement(v4,{props:r,points:y,clipPathId:t,pathRef:n,strokeDasharray:l})}return De.createElement(v4,{props:r,points:o,clipPathId:t,pathRef:n,strokeDasharray:l})}),De.createElement(dJ,{label:r.label}))}function w4(e){var{clipPathId:t,props:r}=e,n=Te.useRef(null),i=Te.useRef(0),a=Te.useRef(null);return De.createElement(x4,{props:r,clipPathId:t,previousPointsRef:n,longestAnimatedLengthRef:i,pathRef:a})}var b4=(e,t)=>{var r,n;return{x:null!==(r=e.x)&&void 0!==r?r:void 0,y:null!==(n=e.y)&&void 0!==n?n:void 0,value:e.value,errorVal:JI(e.payload,t)}};class B4 extends Te.Component{render(){var{hide:e,dot:t,points:r,className:n,xAxisId:i,yAxisId:a,top:o,left:s,width:A,height:l,id:c,needClip:u,zIndex:d}=this.props;if(e)return null;var h=yh("recharts-line",n),p=c,{r:f,strokeWidth:m}=function(e){var t=Zk(e);if(null!=t){var{r:r,strokeWidth:n}=t,i=Number(r),a=Number(n);return(Number.isNaN(i)||i<0)&&(i=3),(Number.isNaN(a)||a<0)&&(a=2),{r:i,strokeWidth:a}}return{r:3,strokeWidth:2}}(t),g=iZ(t),y=2*f+m,v=u?"url(#clipPath-".concat(g?"":"dots-").concat(p,")"):void 0;return De.createElement(Zq,{zIndex:d},De.createElement(oS,{className:h},u&&De.createElement("defs",null,De.createElement(Q2,{clipPathId:p,xAxisId:i,yAxisId:a}),!g&&De.createElement("clipPath",{id:"clipPath-dots-".concat(p)},De.createElement("rect",{x:s-y/2,y:o-y/2,width:A+y,height:l+y}))),De.createElement(j2,{xAxisId:i,yAxisId:a,data:r,dataPointFormatter:b4,errorBarOffset:0},De.createElement(w4,{props:this.props,clipPathId:p}))),De.createElement(K0,{activeDot:this.props.activeDot,points:r,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:v}))}}var C4={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:"auto",label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:fV.line,type:"linear"};function E4(e){var t=cF(e,C4),{activeDot:r,animateNewValues:n,animationBegin:i,animationDuration:a,animationEasing:o,connectNulls:s,dot:A,hide:l,isAnimationActive:c,label:u,legendType:d,xAxisId:h,yAxisId:p,id:f}=t,m=d4(t,s4),{needClip:g}=F2(h,p),y=D0(),v=hP(),x=UT(),w=vN(e=>D2(e,h,p,x,f));if("horizontal"!==v&&"vertical"!==v||null==w||null==y)return null;var{height:b,width:B,x:C,y:E}=y;return De.createElement(B4,A4({},m,{id:f,connectNulls:s,dot:A,activeDot:r,animateNewValues:n,animationBegin:i,animationDuration:a,animationEasing:o,isAnimationActive:c,hide:l,label:u,legendType:d,xAxisId:h,yAxisId:p,points:w,layout:v,height:b,width:B,left:C,top:E,needClip:g}))}function k4(e){var t=cF(e,C4),r=UT();return De.createElement(PZ,{id:t.id,type:"line"},e=>De.createElement(De.Fragment,null,De.createElement(UZ,{legendPayload:h4(t)}),De.createElement(p4,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:e}),De.createElement(VZ,{type:"line",id:e,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:r}),De.createElement(E4,A4({},t,{id:e}))))}var S4=De.memo(k4,i4);function j4(e,t){var r,n;return null!==(r=null===(n=e.graphicalItems.cartesianItems.find(e=>e.id===t))||void 0===n?void 0:n.xAxisId)&&void 0!==r?r:0}function F4(e,t){var r,n;return null!==(r=null===(n=e.graphicalItems.cartesianItems.find(e=>e.id===t))||void 0===n?void 0:n.yAxisId)&&void 0!==r?r:0}S4.displayName="Line";var Q4="production"===process.env.NODE_ENV,N4="Invariant failed";function U4(){return U4=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},U4.apply(null,arguments)}function O4(e){return De.createElement(kZ,U4({shapeType:"rectangle",activeClassName:"recharts-active-bar"},e))}var I4=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(r,n)=>{if(Lj(e))return e;var i=Lj(r)||Wj(r);return i?e(r,n):(i||function(e,t){if(Q4)throw new Error(N4);var r="function"==typeof t?t():t,n=r?"".concat(N4,": ").concat(r):N4;throw new Error(n)}(0,"minPointSize callback function received a value with type of ".concat(typeof r,". Currently only numbers or null/undefined are supported.")),t)}},T4=NN([o$,(e,t)=>t],(e,t)=>e.filter(e=>"bar"===e.type).find(e=>e.id===t)),P4=NN([T4],e=>null==e?void 0:e.maxBarSize),M4=NN([dP,o$,j4,F4,(e,t,r)=>r],(e,t,r,n,i)=>t.filter(t=>"horizontal"===e?t.xAxisId===r:t.yAxisId===n).filter(e=>e.isPanorama===i).filter(e=>!1===e.hide).filter(e=>"bar"===e.type)),D4=NN([M4,e=>e.rootProps.barSize,(e,t)=>{var r=dP(e),n=j4(e,t),i=F4(e,t);if(null!=n&&null!=i)return"horizontal"===r?OW(e,"xAxis",n):OW(e,"yAxis",i)}],(e,t,r)=>{var n=e.filter(PV),i=e.filter(e=>null==e.stackId),a=n.reduce((e,t)=>{var r=e[t.stackId];return null==r&&(r=[]),r.push(t),e[t.stackId]=r,e},{});return[...Object.entries(a).map(e=>{var n,[i,a]=e;return{stackId:i,dataKeys:a.map(e=>e.dataKey),barSize:z0(t,r,null===(n=a[0])||void 0===n?void 0:n.barSize)}}),...i.map(e=>({stackId:void 0,dataKeys:[e.dataKey].filter(e=>null!=e),barSize:z0(t,r,e.barSize)}))]}),L4=(e,t,r)=>{var n,i,a=dP(e),o=j4(e,t),s=F4(e,t);if(null!=o&&null!=s)return"horizontal"===a?(n=_W(e,"xAxis",o,r),i=HW(e,"xAxis",o,r)):(n=_W(e,"yAxis",s,r),i=HW(e,"yAxis",s,r)),lT(n,i)},H4=NN([D4,sV,e=>e.rootProps.barGap,AV,(e,t,r)=>{var n,i,a=T4(e,t);if(null==a)return 0;var o=j4(e,t),s=F4(e,t);if(null==o||null==s)return 0;var A,l,c=dP(e),u=sV(e),{maxBarSize:d}=a,h=Wj(d)?u:d;return"horizontal"===c?(A=_W(e,"xAxis",o,r),l=HW(e,"xAxis",o,r)):(A=_W(e,"yAxis",s,r),l=HW(e,"yAxis",s,r)),null!==(n=null!==(i=lT(A,l,!0))&&void 0!==i?i:h)&&void 0!==n?n:0},L4,P4],(e,t,r,n,i,a,o)=>{var s=Wj(o)?t:o,A=function(e,t,r,n,i){var a,o=n.length;if(!(o<1)){var s,A=Kj(e,r,0,!0),l=[];if(WI(null===(a=n[0])||void 0===a?void 0:a.barSize)){var c=!1,u=r/o,d=n.reduce((e,t)=>e+(t.barSize||0),0);(d+=(o-1)*A)>=r&&(d-=(o-1)*A,A=0),d>=r&&u>0&&(c=!0,d=o*(u*=.9));var h={offset:((r-d)/2|0)-A,size:0};s=n.reduce((e,t)=>{var r,n={stackId:t.stackId,dataKeys:t.dataKeys,position:{offset:h.offset+h.size+A,size:c?u:null!==(r=t.barSize)&&void 0!==r?r:0}},i=[...e,n];return h=n.position,i},l)}else{var p=Kj(t,r,0,!0);r-2*p-(o-1)*A<=0&&(A=0);var f=(r-2*p-(o-1)*A)/o;f>1&&(f>>=0);var m=WI(i)?Math.min(f,i):f;s=n.reduce((e,t,r)=>[...e,{stackId:t.stackId,dataKeys:t.dataKeys,position:{offset:p+(f+A)*r+(f-m)/2,size:m}}],l)}return s}}(r,n,i!==a?i:a,e,s);return i!==a&&null!=A&&(A=A.map(e=>$0($0({},e),{},{position:$0($0({},e.position),{},{offset:e.position.offset-i/2})}))),A}),_4=NN([H4,T4],(e,t)=>{if(null!=e&&null!=t){var r=e.find(e=>e.stackId===t.stackId&&null!=t.dataKey&&e.dataKeys.includes(t.dataKey));if(null!=r)return r.position}}),R4=NN([(e,t,r)=>{var n=dP(e),i=j4(e,t),a=F4(e,t);if(null!=i&&null!=a)return"horizontal"===n?S$(e,"yAxis",a,r):S$(e,"xAxis",i,r)},T4],(e,t)=>{var r=IV(t);if(e&&null!=r&&null!=t){var{stackId:n}=t;if(null!=n){var i=e[n];if(i){var{stackedData:a}=i;if(a)return a.find(e=>e.key===r)}}}}),K4=NN([jT,QT,(e,t,r)=>{var n=j4(e,t);if(null!=n)return _W(e,"xAxis",n,r)},(e,t,r)=>{var n=F4(e,t);if(null!=n)return _W(e,"yAxis",n,r)},(e,t,r)=>{var n=j4(e,t);if(null!=n)return HW(e,"xAxis",n,r)},(e,t,r)=>{var n=F4(e,t);if(null!=n)return HW(e,"yAxis",n,r)},_4,dP,(e,t,r)=>r?xz(e):vz(e),L4,R4,T4,(e,t,r,n)=>n],(e,t,r,n,i,a,o,s,A,l,c,u,d)=>{var{chartData:h,dataStartIndex:p,dataEndIndex:f}=A;if(null!=u&&null!=o&&null!=t&&("horizontal"===s||"vertical"===s)&&null!=r&&null!=n&&null!=i&&null!=a&&null!=l){var m,{data:g}=u;if(null!=(m=null!=g&&g.length>0?g:null==h?void 0:h.slice(p,f+1)))return function(e){var{layout:t,barSettings:{dataKey:r,minPointSize:n},pos:i,bandSize:a,xAxis:o,yAxis:s,xAxisTicks:A,yAxisTicks:l,stackedData:c,displayedData:u,offset:d,cells:h,parentViewBox:p,dataStartIndex:f}=e,m="horizontal"===t?s:o,g=c?m.scale.domain():null,y=(e=>{var{numericAxis:t}=e,r=t.scale.domain();if("number"===t.type){var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return n<=0&&i>=0?0:i<0?i:n}return r[0]})({numericAxis:m}),v=m.scale.map(y);return u.map((e,u)=>{var m,x,w,b,B,C;if(c){var E=c[u+f];if(null==E)return null;m=((e,t)=>{if(!t||2!==t.length||!Lj(t[0])||!Lj(t[1]))return e;var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!Lj(e[0])||e[0]<r)&&(i[0]=r),(!Lj(e[1])||e[1]>n)&&(i[1]=n),i[0]>n&&(i[0]=n),i[1]<r&&(i[1]=r),i})(E,g)}else m=JI(e,r),Array.isArray(m)||(m=[y,m]);var k=I4(n,h5)(m[1],u);if("horizontal"===t){var S,j=s.scale.map(m[0]),F=s.scale.map(m[1]);if(null==j||null==F)return null;x=aT({axis:o,ticks:A,bandSize:a,offset:i.offset,entry:e,index:u}),w=null!==(S=null!=F?F:j)&&void 0!==S?S:void 0,b=i.size;var Q=j-F;if(B=Mj(Q)?0:Q,C={x:x,y:d.top,width:b,height:d.height},Math.abs(k)>0&&Math.abs(B)<Math.abs(k)){var N=Pj(B||k)*(Math.abs(k)-Math.abs(B));w-=N,B+=N}}else{var U=o.scale.map(m[0]),O=o.scale.map(m[1]);if(null==U||null==O)return null;if(x=U,w=aT({axis:s,ticks:l,bandSize:a,offset:i.offset,entry:e,index:u}),b=O-U,B=i.size,C={x:d.left,y:w,width:d.width,height:B},Math.abs(k)>0&&Math.abs(b)<Math.abs(k))b+=Pj(b||k)*(Math.abs(k)-Math.abs(b))}return null==x||null==w||null==b||null==B?null:t5(t5({},e),{},{stackedBarStart:v,x:x,y:w,width:b,height:B,value:c?m:m[1],payload:e,background:C,tooltipPosition:{x:x+b/2,y:w+B/2},parentViewBox:p},h&&h[u]&&h[u].props)}).filter(Boolean)}({layout:s,barSettings:u,pos:o,parentViewBox:t,bandSize:l,xAxis:r,yAxis:n,xAxisTicks:i,yAxisTicks:a,stackedData:c,displayedData:m,offset:e,cells:d,dataStartIndex:p})}}),z4=["index"];function V4(){return V4=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},V4.apply(null,arguments)}var $4=Te.createContext(void 0),W4=e=>{var t,r=Te.useContext($4);return null!=r?r.stackId:null!=e?null==(t=e)?void 0:String(t):void 0},G4=e=>{var{index:t}=e,r=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,z4),n=(e=>{var t=Te.useContext($4);if(null!=t){var{stackId:r}=t;return"url(#".concat(((e,t)=>"recharts-bar-stack-clip-path-".concat(e,"-").concat(t))(r,e),")")}})(t);return De.createElement(oS,V4({className:"recharts-bar-stack-layer",clipPath:n},r))},q4=["onMouseEnter","onMouseLeave","onClick"],Y4=["value","background","tooltipPosition"],X4=["id"],J4=["onMouseEnter","onClick","onMouseLeave"];function Z4(){return Z4=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Z4.apply(null,arguments)}function e5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function t5(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?e5(Object(r),!0).forEach(function(t){r5(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):e5(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function r5(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n5(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var i5=e=>{var{dataKey:t,name:r,fill:n,legendType:i,hide:a}=e;return[{inactive:a,dataKey:t,type:i,color:n,value:uT(r,t),payload:e}]},a5=De.memo(e=>{var{dataKey:t,stroke:r,strokeWidth:n,fill:i,name:a,hide:o,unit:s,tooltipType:A,id:l}=e,c={dataDefinedOnItem:void 0,getPosition:Yj,settings:{stroke:r,strokeWidth:n,fill:i,dataKey:t,nameKey:void 0,name:uT(a,t),hide:o,type:A,color:i,unit:s,graphicalItemId:l}};return De.createElement(NZ,{tooltipEntrySettings:c})});function o5(e){var t=vN(lq),{data:r,dataKey:n,background:i,allOtherBarProps:a}=e,{onMouseEnter:o,onMouseLeave:s,onClick:A}=a,l=n5(a,q4),c=jZ(o,n,a.id),u=FZ(s),d=QZ(A,n,a.id);if(!i||null==r)return null;var h,p,f=Zk(i);return De.createElement(Zq,{zIndex:(h=i,p=fV.barBackground,h&&"object"==typeof h&&"zIndex"in h&&"number"==typeof h.zIndex&&WI(h.zIndex)?h.zIndex:p)},r.map((e,r)=>{var{value:a,background:o,tooltipPosition:s}=e,A=n5(e,Y4);if(!o)return null;var h=c(e,r),p=u(e,r),m=d(e,r),g=t5(t5(t5(t5(t5({option:i,isActive:String(r)===t},A),{},{fill:"#eee"},o),f),sF(l,e,r)),{},{onMouseEnter:h,onMouseLeave:p,onClick:m,dataKey:n,index:r,className:"recharts-bar-background-rectangle"});return De.createElement(O4,Z4({key:"background-bar-".concat(r)},g))}))}function s5(e){var{showLabels:t,children:r,rects:n}=e,i=null==n?void 0:n.map(e=>{var t={x:e.x,y:e.y,width:e.width,lowerWidth:e.width,upperWidth:e.width,height:e.height};return t5(t5({},t),{},{value:e.value,payload:e.payload,parentViewBox:e.parentViewBox,viewBox:t,fill:e.fill})});return De.createElement(AJ,{value:t?i:void 0},r)}function A5(e){var{shape:t,activeBar:r,baseProps:n,entry:i,index:a,dataKey:o}=e,s=vN(lq),A=vN(uq),l=r&&String(a)===s&&(null==A||o===A),c=l?r:t;return l?De.createElement(Zq,{zIndex:fV.activeBar},De.createElement(G4,{index:a},De.createElement(O4,Z4({},n,{name:String(n.name)},i,{isActive:l,option:c,index:a,dataKey:o})))):De.createElement(O4,Z4({},n,{name:String(n.name)},i,{isActive:l,option:c,index:a,dataKey:o}))}function l5(e){var{shape:t,baseProps:r,entry:n,index:i,dataKey:a}=e;return De.createElement(O4,Z4({},r,{name:String(r.name)},n,{isActive:!1,option:t,index:i,dataKey:a}))}function c5(e){var t,{data:r,props:n}=e,i=null!==(t=Jk(n))&&void 0!==t?t:{},{id:a}=i,o=n5(i,X4),{shape:s,dataKey:A,activeBar:l}=n,{onMouseEnter:c,onClick:u,onMouseLeave:d}=n,h=n5(n,J4),p=jZ(c,A,a),f=FZ(d),m=QZ(u,A,a);return r?De.createElement(De.Fragment,null,r.map((e,t)=>De.createElement(G4,Z4({index:t,key:"rectangle-".concat(null==e?void 0:e.x,"-").concat(null==e?void 0:e.y,"-").concat(null==e?void 0:e.value,"-").concat(t),className:"recharts-bar-rectangle"},sF(h,e,t),{onMouseEnter:p(e,t),onMouseLeave:f(e,t),onClick:m(e,t)}),l?De.createElement(A5,{shape:s,activeBar:l,baseProps:o,entry:e,index:t,dataKey:A}):De.createElement(l5,{shape:s,baseProps:o,entry:e,index:t,dataKey:A})))):null}function u5(e){var{props:t,previousRectanglesRef:r}=e,{data:n,layout:i,isAnimationActive:a,animationBegin:o,animationDuration:s,animationEasing:A,onAnimationEnd:l,onAnimationStart:c}=t,u=r.current,d=ID(t,"recharts-bar-"),[h,p]=Te.useState(!1),f=!h,m=Te.useCallback(()=>{"function"==typeof l&&l(),p(!1)},[l]),g=Te.useCallback(()=>{"function"==typeof c&&c(),p(!0)},[c]);return De.createElement(s5,{showLabels:f,rects:n},De.createElement(OD,{animationId:d,begin:o,duration:s,isActive:a,easing:A,onAnimationEnd:m,onAnimationStart:g,key:d},e=>{var a=1===e?n:null==n?void 0:n.map((t,r)=>{var n=u&&u[r];if(n)return t5(t5({},t),{},{x:Vj(n.x,t.x,e),y:Vj(n.y,t.y,e),width:Vj(n.width,t.width,e),height:Vj(n.height,t.height,e)});if("horizontal"===i){var a=Vj(0,t.height,e),o=Vj(t.stackedBarStart,t.y,e);return t5(t5({},t),{},{y:o,height:a})}var s=Vj(0,t.width,e),A=Vj(t.stackedBarStart,t.x,e);return t5(t5({},t),{},{width:s,x:A})});return e>0&&(r.current=null!=a?a:null),null==a?null:De.createElement(oS,null,De.createElement(c5,{props:t,data:a}))}),De.createElement(dJ,{label:t.label}),t.children)}function d5(e){var t=Te.useRef(null);return De.createElement(u5,{previousRectanglesRef:t,props:e})}var h5=0,p5=(e,t)=>{var r=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:r,errorVal:JI(e,t)}};class f5 extends Te.PureComponent{render(){var{hide:e,data:t,dataKey:r,className:n,xAxisId:i,yAxisId:a,needClip:o,background:s,id:A}=this.props;if(e||null==t)return null;var l=yh("recharts-bar",n),c=A;return De.createElement(oS,{className:l,id:A},o&&De.createElement("defs",null,De.createElement(Q2,{clipPathId:c,xAxisId:i,yAxisId:a})),De.createElement(oS,{className:"recharts-bar-rectangles",clipPath:o?"url(#clipPath-".concat(c,")"):void 0},De.createElement(o5,{data:t,dataKey:r,background:s,allOtherBarProps:this.props}),De.createElement(d5,this.props)))}}var m5={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendType:"rect",minPointSize:h5,xAxisId:0,yAxisId:0,zIndex:fV.bar};function g5(e){var t,{xAxisId:r,yAxisId:n,hide:i,legendType:a,minPointSize:o,activeBar:s,animationBegin:A,animationDuration:l,animationEasing:c,isAnimationActive:u}=e,{needClip:d}=F2(r,n),h=hP(),p=UT(),f=eZ(e.children,DY),m=vN(t=>K4(t,e.id,p,f));if("vertical"!==h&&"horizontal"!==h)return null;var g=null==m?void 0:m[0];return t=null==g||null==g.height||null==g.width?0:"vertical"===h?g.height/2:g.width/2,De.createElement(j2,{xAxisId:r,yAxisId:n,data:m,dataPointFormatter:p5,errorBarOffset:t},De.createElement(f5,Z4({},e,{layout:h,needClip:d,data:m,xAxisId:r,yAxisId:n,hide:i,legendType:a,minPointSize:o,activeBar:s,animationBegin:A,animationDuration:l,animationEasing:c,isAnimationActive:u})))}function y5(e){var t=cF(e,m5),r=W4(t.stackId),n=UT();return De.createElement(PZ,{id:t.id,type:"bar"},e=>De.createElement(De.Fragment,null,De.createElement(UZ,{legendPayload:i5(t)}),De.createElement(a5,{dataKey:t.dataKey,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:e}),De.createElement(VZ,{type:"bar",id:e,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:r,hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:n}),De.createElement(Zq,{zIndex:t.zIndex},De.createElement(g5,Z4({},t,{id:e})))))}var v5=De.memo(y5,i4);v5.displayName="Bar";var x5=["option","isActive"];function w5(){return w5=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},w5.apply(null,arguments)}function b5(e){var{option:t,isActive:r}=e,n=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,x5);return"string"==typeof t?De.createElement(kZ,w5({option:De.createElement(iF,w5({type:t},n)),isActive:r,shapeType:"symbols"},n)):De.createElement(kZ,w5({option:t,isActive:r,shapeType:"symbols"},n))}var B5=NN([o$,(e,t,r,n,i)=>i],(e,t)=>e.filter(e=>"scatter"===e.type).find(e=>e.id===t)),C5=NN([(e,t,r,n,i,a,o)=>wz(e,0,0,o),(e,t,r,n,i,a,o)=>_W(e,"xAxis",t,o),(e,t,r,n,i,a,o)=>HW(e,"xAxis",t,o),(e,t,r,n,i,a,o)=>_W(e,"yAxis",r,o),(e,t,r,n,i,a,o)=>HW(e,"yAxis",r,o),(e,t,r,n)=>KW(e,"zAxis",n,!1),B5,(e,t,r,n,i,a)=>a],(e,t,r,n,i,a,o,s)=>{var A,{chartData:l,dataStartIndex:c,dataEndIndex:u}=e;if(null!=o&&(null!=(A=null!=(null==o?void 0:o.data)&&o.data.length>0?o.data:null==l?void 0:l.slice(c,u+1))&&null!=t&&null!=n&&null!=r&&null!=i&&0!==(null==r?void 0:r.length)&&0!==(null==i?void 0:i.length)))return function(e){var{displayedData:t,xAxis:r,yAxis:n,zAxis:i,scatterSettings:a,xAxisTicks:o,yAxisTicks:s,cells:A}=e,l=Wj(r.dataKey)?a.dataKey:r.dataKey,c=Wj(n.dataKey)?a.dataKey:n.dataKey,u=i&&i.dataKey,d=i?i.range:e$.range,h=d&&d[0],p=r.scale.bandwidth?r.scale.bandwidth():0,f=n.scale.bandwidth?n.scale.bandwidth():0;return t.map((e,t)=>{var d=JI(e,l),m=JI(e,c),g=!Wj(u)&&JI(e,u)||"-",y=[{name:Wj(r.dataKey)?a.name:r.name||String(r.dataKey),unit:r.unit||"",value:d,payload:e,dataKey:l,type:a.tooltipType},{name:Wj(n.dataKey)?a.name:n.name||String(n.dataKey),unit:n.unit||"",value:m,payload:e,dataKey:c,type:a.tooltipType}];"-"!==g&&null!=i&&y.push({name:i.name||i.dataKey,unit:i.unit||"",value:g,payload:e,dataKey:u,type:a.tooltipType});var v=iT({axis:r,ticks:o,bandSize:p,entry:e,index:t,dataKey:l}),x=iT({axis:n,ticks:s,bandSize:f,entry:e,index:t,dataKey:c}),w="-"!==g&&null!=i?i.scale.map(g):h,b=null==w?0:Math.sqrt(Math.max(w,0)/Math.PI);return N5(N5({},e),{},{cx:v,cy:x,x:null==v?void 0:v-b,y:null==x?void 0:x-b,width:2*b,height:2*b,size:w,node:{x:d,y:m,z:g},tooltipPayload:y,tooltipPosition:{x:v,y:x},payload:e},A&&A[t]&&A[t].props)})}({displayedData:A,xAxis:t,yAxis:n,zAxis:a,scatterSettings:o,xAxisTicks:r,yAxisTicks:i,cells:s})}),E5=["id"],k5=["onMouseEnter","onClick","onMouseLeave"],S5=["animationBegin","animationDuration","animationEasing","hide","isAnimationActive","legendType","lineJointType","lineType","shape","xAxisId","yAxisId","zAxisId"];function j5(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function F5(){return F5=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},F5.apply(null,arguments)}function Q5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function N5(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Q5(Object(r),!0).forEach(function(t){U5(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Q5(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function U5(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var O5=e=>{var{dataKey:t,name:r,fill:n,legendType:i,hide:a}=e;return[{inactive:a,dataKey:t,type:i,color:n,value:uT(r,t),payload:e}]},I5=De.memo(e=>{var{dataKey:t,points:r,stroke:n,strokeWidth:i,fill:a,name:o,hide:s,tooltipType:A,id:l}=e,c={dataDefinedOnItem:null==r?void 0:r.map(e=>e.tooltipPayload),getPosition:e=>{var t;return null==r||null===(t=r[Number(e)])||void 0===t?void 0:t.tooltipPosition},settings:{stroke:n,strokeWidth:i,fill:a,nameKey:void 0,dataKey:t,name:uT(o,t),hide:s,type:A,color:a,unit:"",graphicalItemId:l}};return De.createElement(NZ,{tooltipEntrySettings:c})});function T5(e){var{points:t,props:r}=e,{line:n,lineType:i,lineJointType:a}=r;if(!n)return null;var o,s,A=Jk(r),l=Zk(n);if("joint"===i)o=t.map(e=>{var t,r;return{x:null!==(t=e.cx)&&void 0!==t?t:null,y:null!==(r=e.cy)&&void 0!==r?r:null}});else if("fitting"===i){var{xmin:c,xmax:u,a:d,b:h}=(e=>{for(var t=e.length,r=0,n=0,i=0,a=0,o=1/0,s=-1/0,A=0,l=0,c=0;c<t;c++){var u,d;r+=A=(null===(u=e[c])||void 0===u?void 0:u.cx)||0,n+=l=(null===(d=e[c])||void 0===d?void 0:d.cy)||0,i+=A*l,a+=A*A,o=Math.min(o,A),s=Math.max(s,A)}var h=t*a!==r*r?(t*i-r*n)/(t*a-r*r):0;return{xmin:o,xmax:s,a:h,b:(n-h*r)/t}})(t),p=e=>d*e+h;o=[{x:c,y:p(c)},{x:u,y:p(u)}]}var f=N5(N5(N5({},A),{},{fill:"none",stroke:A&&A.fill},l),{},{points:o});return s=De.isValidElement(n)?De.cloneElement(n,f):"function"==typeof n?n(f):De.createElement(JM,F5({},f,{type:a})),De.createElement(oS,{className:"recharts-scatter-line",key:"recharts-scatter-line"},s)}function P5(e){var{showLabels:t,points:r,children:n}=e,i=sP(),a=Te.useMemo(()=>null==r?void 0:r.map(e=>{var t,r,n={x:null!==(t=e.x)&&void 0!==t?t:0,y:null!==(r=e.y)&&void 0!==r?r:0,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width};return N5(N5({},n),{},{value:void 0,payload:e.payload,viewBox:n,parentViewBox:i,fill:void 0})}),[i,r]);return De.createElement(AJ,{value:t?a:void 0},n)}function M5(e){var t,{points:r,allOtherScatterProps:n}=e,{shape:i,activeShape:a,dataKey:o}=n,{id:s}=n,A=j5(n,E5),l=vN(lq),{onMouseEnter:c,onClick:u,onMouseLeave:d}=n,h=j5(n,k5),p=jZ(c,o,s),f=FZ(d),m=QZ(u,o,s);if(t=r,!(Array.isArray(t)&&t.length>0))return null;var g=Jk(A);return De.createElement(De.Fragment,null,De.createElement(T5,{points:r,props:A}),r.map((e,t)=>{var r=null!=a&&!1!==a,n=r&&l===String(t),o=r&&n?a:i,A=N5(N5(N5({},g),e),{},{index:t,[vT]:String(s)});return De.createElement(Zq,{key:"symbol-".concat(null==e?void 0:e.cx,"-").concat(null==e?void 0:e.cy,"-").concat(null==e?void 0:e.size,"-").concat(t),zIndex:n?fV.activeDot:void 0},De.createElement(oS,F5({className:"recharts-scatter-symbol"},sF(h,e,t),{onMouseEnter:p(e,t),onMouseLeave:f(e,t),onClick:m(e,t)}),De.createElement(b5,F5({option:o,isActive:n},A))))}))}function D5(e){var{previousPointsRef:t,props:r}=e,{points:n,isAnimationActive:i,animationBegin:a,animationDuration:o,animationEasing:s}=r,A=t.current,l=ID(r,"recharts-scatter-"),[c,u]=Te.useState(!1),d=Te.useCallback(()=>{u(!1)},[]),h=Te.useCallback(()=>{u(!0)},[]),p=!c;return De.createElement(P5,{showLabels:p,points:n},r.children,De.createElement(OD,{animationId:l,begin:a,duration:o,isActive:i,easing:s,onAnimationEnd:d,onAnimationStart:h,key:l},e=>{var i=1===e?n:null==n?void 0:n.map((t,r)=>{var n=A&&A[r];return N5(N5({},t),{},n?{cx:null==t.cx?void 0:Vj(n.cx,t.cx,e),cy:null==t.cy?void 0:Vj(n.cy,t.cy,e),size:Vj(n.size,t.size,e)}:{size:Vj(0,t.size,e)})});return e>0&&(t.current=i),De.createElement(oS,null,De.createElement(M5,{points:i,allOtherScatterProps:r,showLabels:p}))}),De.createElement(dJ,{label:r.label}))}var L5=(e,t,r)=>({x:e.cx,y:e.cy,value:Number("x"===r?e.node.x:e.node.y),errorVal:JI(e,t)});function H5(e){var{hide:t,points:r,className:n,needClip:i,xAxisId:a,yAxisId:o,id:s}=e,A=Te.useRef(null);if(t)return null;var l=yh("recharts-scatter",n),c=s;return De.createElement(Zq,{zIndex:e.zIndex},De.createElement(oS,{className:l,clipPath:i?"url(#clipPath-".concat(c,")"):void 0,id:s},i&&De.createElement("defs",null,De.createElement(Q2,{clipPathId:c,xAxisId:a,yAxisId:o})),De.createElement(j2,{xAxisId:a,yAxisId:o,data:r,dataPointFormatter:L5,errorBarOffset:0},De.createElement(oS,{key:"recharts-scatter-symbols"},De.createElement(D5,{props:e,previousPointsRef:A})))))}var _5={xAxisId:0,yAxisId:0,zAxisId:0,label:!1,line:!1,legendType:"circle",lineType:"joint",lineJointType:"linear",shape:"circle",hide:!1,isAnimationActive:"auto",animationBegin:0,animationDuration:400,animationEasing:"linear",zIndex:fV.scatter};function R5(e){var t=cF(e,_5),{animationBegin:r,animationDuration:n,animationEasing:i,hide:a,isAnimationActive:o,legendType:s,lineJointType:A,lineType:l,shape:c,xAxisId:u,yAxisId:d,zAxisId:h}=t,p=j5(t,S5),{needClip:f}=F2(u,d),m=Te.useMemo(()=>eZ(e.children,DY),[e.children]),g=UT(),y=vN(t=>C5(t,u,d,h,e.id,m,g));return null==f||null==y?null:De.createElement(De.Fragment,null,De.createElement(I5,{dataKey:e.dataKey,points:y,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,tooltipType:e.tooltipType,id:e.id}),De.createElement(H5,F5({},p,{xAxisId:u,yAxisId:d,zAxisId:h,lineType:l,lineJointType:A,legendType:s,shape:c,hide:a,isAnimationActive:o,animationBegin:r,animationDuration:n,animationEasing:i,points:y,needClip:f})))}function K5(e){var t=cF(e,_5),r=UT();return De.createElement(PZ,{id:t.id,type:"scatter"},e=>De.createElement(De.Fragment,null,De.createElement(UZ,{legendPayload:O5(t)}),De.createElement(VZ,{type:"scatter",id:e,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:t.zAxisId,dataKey:t.dataKey,hide:t.hide,name:t.name,tooltipType:t.tooltipType,isPanorama:r}),De.createElement(R5,F5({},t,{id:e}))))}var z5=De.memo(K5,i4);z5.displayName="Scatter";var V5=["domain","range"],$5=["domain","range"];function W5(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function G5(e,t){return e===t||!(!Array.isArray(e)||2!==e.length||!Array.isArray(t)||2!==t.length)&&(e[0]===t[0]&&e[1]===t[1])}function q5(e,t){if(e===t)return!0;var{domain:r,range:n}=e,i=W5(e,V5),{domain:a,range:o}=t,s=W5(t,$5);return!!G5(r,a)&&(!!G5(n,o)&&i4(i,s))}var Y5=["type"],X5=["dangerouslySetInnerHTML","ticks","scale"],J5=["id","scale"];function Z5(){return Z5=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Z5.apply(null,arguments)}function e3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function t3(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?e3(Object(r),!0).forEach(function(t){r3(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):e3(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function r3(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n3(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function i3(e){var t=fN(),r=Te.useRef(null),n=pP(),{type:i}=e,a=n3(e,Y5),o=gV(n,"xAxis",i),s=Te.useMemo(()=>{if(null!=o)return t3(t3({},a),{},{type:o})},[a,o]);return Te.useLayoutEffect(()=>{null!=s&&(null===r.current?t(E0(s)):r.current!==s&&t(k0({prev:r.current,next:s})),r.current=s)},[s,t]),Te.useLayoutEffect(()=>()=>{r.current&&(t(S0(r.current)),r.current=null)},[t]),null}var a3=e=>{var{xAxisId:t,className:r}=e,n=vN(QT),i=UT(),a="xAxis",o=vN(e=>LW(e,a,t,i)),s=vN(e=>SW(e,t)),A=vN(e=>QW(e,t)),l=vN(e=>qV(e,t));if(null==s||null==A||null==l)return null;var{dangerouslySetInnerHTML:c,ticks:u,scale:d}=e,h=n3(e,X5),{id:p,scale:f}=l,m=n3(l,J5);return De.createElement(e2,Z5({},h,m,{x:A.x,y:A.y,width:s.width,height:s.height,className:yh("recharts-".concat(a," ").concat(a),r),viewBox:n,ticks:o,axisType:a}))},o3={allowDataOverflow:GV.allowDataOverflow,allowDecimals:GV.allowDecimals,allowDuplicatedCategory:GV.allowDuplicatedCategory,angle:GV.angle,axisLine:q1.axisLine,height:GV.height,hide:!1,includeHidden:GV.includeHidden,interval:GV.interval,label:!1,minTickGap:GV.minTickGap,mirror:GV.mirror,orientation:GV.orientation,padding:GV.padding,reversed:GV.reversed,scale:GV.scale,tick:GV.tick,tickCount:GV.tickCount,tickLine:q1.tickLine,tickSize:q1.tickSize,type:GV.type,xAxisId:0},s3=e=>{var t=cF(e,o3);return De.createElement(De.Fragment,null,De.createElement(i3,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit}),De.createElement(a3,t))},A3=De.memo(s3,q5);A3.displayName="XAxis";var l3=["type"],c3=["dangerouslySetInnerHTML","ticks","scale"],u3=["id","scale"];function d3(){return d3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},d3.apply(null,arguments)}function h3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function p3(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h3(Object(r),!0).forEach(function(t){f3(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h3(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function f3(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m3(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function g3(e){var t=fN(),r=Te.useRef(null),n=pP(),{type:i}=e,a=m3(e,l3),o=gV(n,"yAxis",i),s=Te.useMemo(()=>{if(null!=o)return p3(p3({},a),{},{type:o})},[o,a]);return Te.useLayoutEffect(()=>{null!=s&&(null===r.current?t(j0(s)):r.current!==s&&t(F0({prev:r.current,next:s})),r.current=s)},[s,t]),Te.useLayoutEffect(()=>()=>{r.current&&(t(Q0(r.current)),r.current=null)},[t]),null}function y3(e){var{yAxisId:t,className:r,width:n,label:i}=e,a=Te.useRef(null),o=Te.useRef(null),s=vN(QT),A=UT(),l=fN(),c="yAxis",u=vN(e=>UW(e,t)),d=vN(e=>NW(e,t)),h=vN(e=>LW(e,c,t,A)),p=vN(e=>JV(e,t));if(Te.useLayoutEffect(()=>{if("auto"===n&&u&&!DX(i)&&!Te.isValidElement(i)&&null!=p){var e=a.current;if(e){var r=e.getCalculatedWidth();Math.round(u.width)!==Math.round(r)&&l(I0({id:t,width:r}))}}},[h,u,l,i,t,n,p]),null==u||null==d||null==p)return null;var{dangerouslySetInnerHTML:f,ticks:m,scale:g}=e,y=m3(e,c3),{id:v,scale:x}=p,w=m3(p,u3);return De.createElement(e2,d3({},y,w,{ref:a,labelRef:o,x:d.x,y:d.y,tickTextProps:"auto"===n?{width:void 0}:{width:n},width:u.width,height:u.height,className:yh("recharts-".concat(c," ").concat(c),r),viewBox:s,ticks:h,axisType:c}))}var v3={allowDataOverflow:XV.allowDataOverflow,allowDecimals:XV.allowDecimals,allowDuplicatedCategory:XV.allowDuplicatedCategory,angle:XV.angle,axisLine:q1.axisLine,hide:!1,includeHidden:XV.includeHidden,interval:XV.interval,label:!1,minTickGap:XV.minTickGap,mirror:XV.mirror,orientation:XV.orientation,padding:XV.padding,reversed:XV.reversed,scale:XV.scale,tick:XV.tick,tickCount:XV.tickCount,tickLine:q1.tickLine,tickSize:q1.tickSize,type:XV.type,width:XV.width,yAxisId:0},x3=e=>{var t=cF(e,v3);return De.createElement(De.Fragment,null,De.createElement(g3,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter}),De.createElement(y3,t))},w3=De.memo(x3,q5);w3.displayName="YAxis";var b3=NN([(e,t)=>t,dP,NV,LV,eq,iq,Qq,jT],(e,t,r,n,i,a,o,s)=>{if(e&&t&&n&&i&&a)return"horizontal"===t||"vertical"===t?((e,t,r,n,i,a,o)=>{if(e&&r&&n&&i&&function(e,t){var{chartX:r,chartY:n}=e;return r>=t.left&&r<=t.left+t.width&&n>=t.top&&n<=t.top+t.height}(e,o)){var s=((e,t)=>"horizontal"===t?e.chartX:"vertical"===t?e.chartY:void 0)(e,t),A=kq(s,a,i,r,n),l=((e,t,r,n)=>{var i=t.find(e=>e&&e.index===r);if(i){if("horizontal"===e)return{x:i.coordinate,y:n.chartY};if("vertical"===e)return{x:n.chartX,y:i.coordinate}}return{x:0,y:0}})(t,i,A,e);return{activeIndex:String(A),activeCoordinate:l}}})(e,t,n,i,a,o,s):Lq(e,t,r,n,i,a,o)}),B3=e=>{var t=e.currentTarget.getBoundingClientRect(),r=t.width/e.currentTarget.offsetWidth,n=t.height/e.currentTarget.offsetHeight;return{chartX:Math.round((e.clientX-t.left)/r),chartY:Math.round((e.clientY-t.top)/n)}},C3=IO("mouseClick"),E3=DI();E3.startListening({actionCreator:C3,effect:(e,t)=>{var r=e.payload,n=b3(t.getState(),B3(r));null!=(null==n?void 0:n.activeIndex)&&t.dispatch(sG({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var k3=IO("mouseMove"),S3=DI(),j3=null;function F3(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":"children"===e&&"object"==typeof t&&null!==t?"<<CHILDREN>>":t}S3.startListening({actionCreator:k3,effect:(e,t)=>{var r=e.payload;null!==j3&&cancelAnimationFrame(j3);var n=B3(r);j3=requestAnimationFrame(()=>{var e=t.getState();if("axis"===GW(e,e.tooltip.settings.shared)){var r=b3(e,n);null!=(null==r?void 0:r.activeIndex)?t.dispatch(oG({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate})):t.dispatch(iG())}j3=null})}});var Q3={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},N3=oI({name:"rootProps",initialState:Q3,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=null!==(r=t.payload.barGap)&&void 0!==r?r:Q3.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),U3=N3.reducer,{updateOptions:O3}=N3.actions,I3=oI({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>t.payload}}),{updatePolarOptions:T3}=I3.actions,P3=I3.reducer,M3=IO("keyDown"),D3=IO("focus"),L3=DI();L3.startListening({actionCreator:M3,effect:(e,t)=>{var r=t.getState();if(!1!==r.rootProps.accessibilityLayer){var{keyboardInteraction:n}=r.tooltip,i=e.payload;if("ArrowRight"===i||"ArrowLeft"===i||"Enter"===i){var a=mG(n,NG(r),C$(r),YG(r)),o=null==a?-1:Number(a);if(Number.isFinite(o)&&!(o<0)){var s=iq(r);if("Enter"!==i){var A=o+("ArrowRight"===i?1:-1)*("left-to-right"===zW(r)?1:-1);if(!(null==s||A>=s.length||A<0)){var l=Iq(r,"axis","hover",String(A));t.dispatch(lG({active:!0,activeIndex:A.toString(),activeCoordinate:l}))}}else{var c=Iq(r,"axis","hover",String(n.index));t.dispatch(lG({active:!n.active,activeIndex:n.index,activeCoordinate:c}))}}}}}}),L3.startListening({actionCreator:D3,effect:(e,t)=>{var r=t.getState();if(!1!==r.rootProps.accessibilityLayer){var{keyboardInteraction:n}=r.tooltip;if(!n.active&&null==n.index){var i=Iq(r,"axis","hover",String("0"));t.dispatch(lG({active:!0,activeIndex:"0",activeCoordinate:i}))}}}});var H3=IO("externalEvent"),_3=DI(),R3=new Map;_3.startListening({actionCreator:H3,effect:(e,t)=>{var{handler:r,reactEvent:n}=e.payload;if(null!=r){n.persist();var i=n.type,a=R3.get(i);void 0!==a&&cancelAnimationFrame(a);var o=requestAnimationFrame(()=>{try{var e=t.getState(),a={activeCoordinate:fq(e),activeDataKey:uq(e),activeIndex:lq(e),activeLabel:cq(e),activeTooltipIndex:lq(e),isTooltipActive:mq(e)};r(a,n)}finally{R3.delete(i)}});R3.set(i,o)}}});var K3=NN([xG],e=>e.tooltipItemPayloads),z3=NN([K3,(e,t)=>t,(e,t,r)=>r],(e,t,r)=>{if(null!=t){var n=e.find(e=>e.settings.graphicalItemId===r);if(null!=n){var{getPosition:i}=n;if(null!=i)return i(t)}}}),V3=IO("touchMove"),$3=DI();$3.startListening({actionCreator:V3,effect:(e,t)=>{var r=e.payload;if(null!=r.touches&&0!==r.touches.length){var n=t.getState(),i=GW(n,n.tooltip.settings.shared);if("axis"===i){var a=r.touches[0];if(null==a)return;var o=b3(n,B3({clientX:a.clientX,clientY:a.clientY,currentTarget:r.currentTarget}));null!=(null==o?void 0:o.activeIndex)&&t.dispatch(oG({activeIndex:o.activeIndex,activeDataKey:void 0,activeCoordinate:o.activeCoordinate}))}else if("item"===i){var s,A=r.touches[0];if(null==document.elementFromPoint||null==A)return;var l=document.elementFromPoint(A.clientX,A.clientY);if(!l||!l.getAttribute)return;var c=l.getAttribute(yT),u=null!==(s=l.getAttribute(vT))&&void 0!==s?s:void 0,d=jG(n).find(e=>e.id===u);if(null==c||null==d||null==u)return;var{dataKey:h}=d,p=z3(n,c,u);t.dispatch(rG({activeDataKey:h,activeIndex:c,activeCoordinate:p,activeGraphicalItemId:u}))}}}});var W3=pU({brush:a1,cartesianAxis:T0,chartData:BY,errorBars:C2,graphicalItems:KZ,layout:VI,legend:hM,options:mY,polarAxis:UJ,polarOptions:P3,referenceElements:I1,rootProps:U3,tooltip:cG,zIndex:Jq});function G3(e){var{preloadedState:t,children:r,reduxStoreName:n}=e,i=UT(),a=Te.useRef(null);if(i)return r;null==a.current&&(a.current=function(e){return ZO({reducer:W3,preloadedState:e,middleware:e=>e({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes("es6")}).concat([E3.middleware,S3.middleware,L3.middleware,_3.middleware,$3.middleware]),enhancers:e=>{var t=e;return"function"==typeof e&&(t=e()),t.concat(JO({type:"raf"}))},devTools:{serialize:{replacer:F3},name:"recharts-".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Chart")}})}(t,n));var o=hN;return De.createElement(t4,{context:o,store:a.current},r)}function q3(e){var{layout:t,margin:r}=e,n=fN(),i=UT();return Te.useEffect(()=>{i||(n(RI(t)),n(_I(r)))},[n,i,t,r]),null}var Y3=Te.memo(q3,i4);function X3(e){var t=fN();return Te.useEffect(()=>{t(O3(e))},[t,e]),null}function J3(e){var{zIndex:t,isPanorama:r}=e,n=Te.useRef(null),i=fN();return Te.useLayoutEffect(()=>(n.current&&i(Yq({zIndex:t,element:n.current,isPanorama:r})),()=>{i(Xq({zIndex:t,isPanorama:r}))}),[i,t,r]),De.createElement("g",{tabIndex:-1,ref:n})}function Z3(e){var{children:t,isPanorama:r}=e,n=vN(_q);if(!n||0===n.length)return t;var i=n.filter(e=>e<0),a=n.filter(e=>e>0);return De.createElement(De.Fragment,null,i.map(e=>De.createElement(J3,{key:e,zIndex:e,isPanorama:r})),t,a.map(e=>De.createElement(J3,{key:e,zIndex:e,isPanorama:r})))}var e6=["children"];function t6(){return t6=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},t6.apply(null,arguments)}var r6={width:"100%",height:"100%",display:"block"},n6=Te.forwardRef((e,t)=>{var r=cP(),n=uP(),i=HM();if(!GI(r)||!GI(n))return null;var a,o,{children:s,otherAttributes:A,title:l,desc:c}=e;return null!=A&&(a="number"==typeof A.tabIndex?A.tabIndex:i?0:void 0,o="string"==typeof A.role?A.role:i?"application":void 0),De.createElement(nS,t6({},A,{title:l,desc:c,role:o,tabIndex:a,width:r,height:n,style:r6,ref:t}),s)}),i6=e=>{var{children:t}=e,r=vN(TT);if(!r)return null;var{width:n,height:i,y:a,x:o}=r;return De.createElement(nS,{width:n,height:i,x:o,y:a},t)},a6=Te.forwardRef((e,t)=>{var{children:r}=e,n=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,e6);return UT()?De.createElement(i6,null,De.createElement(Z3,{isPanorama:!0},r)):De.createElement(n6,t6({ref:t},n),De.createElement(Z3,{isPanorama:!1},r))});function o6(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function s6(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o6(Object(r),!0).forEach(function(t){A6(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o6(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function A6(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l6(){return l6=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},l6.apply(null,arguments)}var c6=()=>(FY(),null);function u6(e){if("number"==typeof e)return e;if("string"==typeof e){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var d6=Te.forwardRef((e,t)=>{var r,n,i=Te.useRef(null),[a,o]=Te.useState({containerWidth:u6(null===(r=e.style)||void 0===r?void 0:r.width),containerHeight:u6(null===(n=e.style)||void 0===n?void 0:n.height)}),s=Te.useCallback((e,t)=>{o(r=>{var n=Math.round(e),i=Math.round(t);return r.containerWidth===n&&r.containerHeight===i?r:{containerWidth:n,containerHeight:i}})},[]),A=Te.useCallback(e=>{if("function"==typeof t&&t(e),null!=e&&"undefined"!=typeof ResizeObserver){var{width:r,height:n}=e.getBoundingClientRect();s(r,n);var a=new ResizeObserver(e=>{var t=e[0];if(null!=t){var{width:r,height:n}=t.contentRect;s(r,n)}});a.observe(e),i.current=a}},[t,s]);return Te.useEffect(()=>()=>{var e=i.current;null!=e&&e.disconnect()},[s]),De.createElement(De.Fragment,null,De.createElement(mP,{width:a.containerWidth,height:a.containerHeight}),De.createElement("div",l6({ref:A},e)))}),h6=Te.forwardRef((e,t)=>{var{width:r,height:n}=e,[i,a]=Te.useState({containerWidth:u6(r),containerHeight:u6(n)}),o=Te.useCallback((e,t)=>{a(r=>{var n=Math.round(e),i=Math.round(t);return r.containerWidth===n&&r.containerHeight===i?r:{containerWidth:n,containerHeight:i}})},[]),s=Te.useCallback(e=>{if("function"==typeof t&&t(e),null!=e){var{width:r,height:n}=e.getBoundingClientRect();o(r,n)}},[t,o]);return De.createElement(De.Fragment,null,De.createElement(mP,{width:i.containerWidth,height:i.containerHeight}),De.createElement("div",l6({ref:s},e)))}),p6=Te.forwardRef((e,t)=>{var{width:r,height:n}=e;return De.createElement(De.Fragment,null,De.createElement(mP,{width:r,height:n}),De.createElement("div",l6({ref:t},e)))}),f6=Te.forwardRef((e,t)=>{var{width:r,height:n}=e;return"string"==typeof r||"string"==typeof n?De.createElement(h6,l6({},e,{ref:t})):"number"==typeof r&&"number"==typeof n?De.createElement(p6,l6({},e,{width:r,height:n,ref:t})):De.createElement(De.Fragment,null,De.createElement(mP,{width:r,height:n}),De.createElement("div",l6({ref:t},e)))});var m6=Te.forwardRef((e,t)=>{var{children:r,className:n,height:i,onClick:a,onContextMenu:o,onDoubleClick:s,onMouseDown:A,onMouseEnter:l,onMouseLeave:c,onMouseMove:u,onMouseUp:d,onTouchEnd:h,onTouchMove:p,onTouchStart:f,style:m,width:g,responsive:y,dispatchTouchEvents:v=!0}=e,x=Te.useRef(null),w=fN(),[b,B]=Te.useState(null),[C,E]=Te.useState(null),k=function(){var e=fN(),[t,r]=Te.useState(null),n=vN(pT);return Te.useEffect(()=>{if(null!=t){var r=t.getBoundingClientRect().width/t.offsetWidth;WI(r)&&r!==n&&e(zI(r))}},[t,e,n]),r}(),S=nP(),j=(null==S?void 0:S.width)>0?S.width:g,F=(null==S?void 0:S.height)>0?S.height:i,Q=Te.useCallback(e=>{k(e),"function"==typeof t&&t(e),B(e),E(e),null!=e&&(x.current=e)},[k,t,B,E]),N=Te.useCallback(e=>{w(C3(e)),w(H3({handler:a,reactEvent:e}))},[w,a]),U=Te.useCallback(e=>{w(k3(e)),w(H3({handler:l,reactEvent:e}))},[w,l]),O=Te.useCallback(e=>{w(iG()),w(H3({handler:c,reactEvent:e}))},[w,c]),I=Te.useCallback(e=>{w(k3(e)),w(H3({handler:u,reactEvent:e}))},[w,u]),T=Te.useCallback(()=>{w(D3())},[w]),P=Te.useCallback(e=>{w(M3(e.key))},[w]),M=Te.useCallback(e=>{w(H3({handler:o,reactEvent:e}))},[w,o]),D=Te.useCallback(e=>{w(H3({handler:s,reactEvent:e}))},[w,s]),L=Te.useCallback(e=>{w(H3({handler:A,reactEvent:e}))},[w,A]),H=Te.useCallback(e=>{w(H3({handler:d,reactEvent:e}))},[w,d]),_=Te.useCallback(e=>{w(H3({handler:f,reactEvent:e}))},[w,f]),R=Te.useCallback(e=>{v&&w(V3(e)),w(H3({handler:p,reactEvent:e}))},[w,v,p]),K=Te.useCallback(e=>{w(H3({handler:h,reactEvent:e}))},[w,h]),z=function(e){return e?d6:f6}(y);return De.createElement(AY.Provider,{value:b},De.createElement(sS.Provider,{value:C},De.createElement(z,{width:null!=j?j:null==m?void 0:m.width,height:null!=F?F:null==m?void 0:m.height,className:yh("recharts-wrapper",n),style:s6({position:"relative",cursor:"default",width:j,height:F},m),onClick:N,onContextMenu:M,onDoubleClick:D,onFocus:T,onKeyDown:P,onMouseDown:L,onMouseEnter:U,onMouseLeave:O,onMouseMove:I,onMouseUp:H,onTouchEnd:K,onTouchMove:R,onTouchStart:_,ref:Q},De.createElement(c6,null),r)))}),g6=["width","height","responsive","children","className","style","compact","title","desc"];var y6=Te.forwardRef((e,t)=>{var{width:r,height:n,responsive:i,children:a,className:o,style:s,compact:A,title:l,desc:c}=e,u=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,g6),d=Jk(u);return A?De.createElement(De.Fragment,null,De.createElement(mP,{width:r,height:n}),De.createElement(a6,{otherAttributes:d,title:l,desc:c},a)):De.createElement(m6,{className:o,style:s,width:r,height:n,responsive:null!=i&&i,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},De.createElement(a6,{otherAttributes:d,title:l,desc:c,ref:t},De.createElement(P1,null,a)))});function v6(){return v6=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},v6.apply(null,arguments)}var x6={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:{top:5,right:5,bottom:5,left:5},responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},w6=Te.forwardRef(function(e,t){var r,n=cF(e.categoricalChartProps,x6),{chartName:i,defaultTooltipEventType:a,validateTooltipEventTypes:o,tooltipPayloadSearcher:s,categoricalChartProps:A}=e,l={chartName:i,defaultTooltipEventType:a,validateTooltipEventTypes:o,tooltipPayloadSearcher:s,eventEmitter:void 0};return De.createElement(G3,{preloadedState:{options:l},reduxStoreName:null!==(r=A.id)&&void 0!==r?r:i},De.createElement(J0,{chartData:A.data}),De.createElement(Y3,{layout:n.layout,margin:n.margin}),De.createElement(X3,{baseValue:n.baseValue,accessibilityLayer:n.accessibilityLayer,barCategoryGap:n.barCategoryGap,maxBarSize:n.maxBarSize,stackOffset:n.stackOffset,barGap:n.barGap,barSize:n.barSize,syncId:n.syncId,syncMethod:n.syncMethod,className:n.className,reverseStackOrder:n.reverseStackOrder}),De.createElement(y6,v6({},n,{ref:t})))}),b6=["axis"],B6=Te.forwardRef((e,t)=>De.createElement(w6,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:b6,tooltipPayloadSearcher:pY,categoricalChartProps:e,ref:t})),C6=["axis","item"],E6=Te.forwardRef((e,t)=>De.createElement(w6,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:C6,tooltipPayloadSearcher:pY,categoricalChartProps:e,ref:t}));function k6(e){var t=fN();return Te.useEffect(()=>{t(T3(e))},[t,e]),null}var S6=["layout"];function j6(){return j6=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},j6.apply(null,arguments)}var F6={accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index",layout:"radial",responsive:!1,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},Q6=Te.forwardRef(function(e,t){var r,n=cF(e.categoricalChartProps,F6),{layout:i}=n,a=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(n,S6),{chartName:o,defaultTooltipEventType:s,validateTooltipEventTypes:A,tooltipPayloadSearcher:l}=e,c={chartName:o,defaultTooltipEventType:s,validateTooltipEventTypes:A,tooltipPayloadSearcher:l,eventEmitter:void 0};return De.createElement(G3,{preloadedState:{options:c},reduxStoreName:null!==(r=n.id)&&void 0!==r?r:o},De.createElement(J0,{chartData:n.data}),De.createElement(Y3,{layout:i,margin:n.margin}),De.createElement(X3,{baseValue:void 0,accessibilityLayer:n.accessibilityLayer,barCategoryGap:n.barCategoryGap,maxBarSize:n.maxBarSize,stackOffset:n.stackOffset,barGap:n.barGap,barSize:n.barSize,syncId:n.syncId,syncMethod:n.syncMethod,className:n.className,reverseStackOrder:n.reverseStackOrder}),De.createElement(k6,{cx:n.cx,cy:n.cy,startAngle:n.startAngle,endAngle:n.endAngle,innerRadius:n.innerRadius,outerRadius:n.outerRadius}),De.createElement(y6,j6({},a,{ref:t})))});function N6(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function U6(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?N6(Object(r),!0).forEach(function(t){O6(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):N6(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function O6(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var I6=["item"],T6=U6(U6({},F6),{},{layout:"centric",startAngle:0,endAngle:360}),P6=Te.forwardRef((e,t)=>{var r=cF(e,T6);return De.createElement(Q6,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:I6,tooltipPayloadSearcher:pY,categoricalChartProps:r,ref:t})}),M6=["item"],D6=Te.forwardRef((e,t)=>De.createElement(w6,{chartName:"ScatterChart",defaultTooltipEventType:"item",validateTooltipEventTypes:M6,tooltipPayloadSearcher:pY,categoricalChartProps:e,ref:t})),L6=function(e,t){return(L6=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function H6(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}L6(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var _6=function(){return _6=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},_6.apply(this,arguments)};function R6(e,t,r,n){return new(r||(r=Promise))(function(t,i){function a(e){try{s(n.next(e))}catch(eX){i(eX)}}function o(e){try{s(n.throw(e))}catch(eX){i(eX)}}function s(e){var n;e.done?t(e.value):(n=e.value,n instanceof r?n:new r(function(e){e(n)})).then(a,o)}s((n=n.apply(e,[])).next())})}function K6(e,t){var r,n,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(eX){a=[6,eX],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}function z6(e,t,r){if(2===arguments.length)for(var n,i=0,a=t.length;i<a;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||t)}for(var V6=function(){function e(e,t,r,n){this.left=e,this.top=t,this.width=r,this.height=n}return e.prototype.add=function(t,r,n,i){return new e(this.left+t,this.top+r,this.width+n,this.height+i)},e.fromClientRect=function(t,r){return new e(r.left+t.windowBounds.left,r.top+t.windowBounds.top,r.width,r.height)},e.fromDOMRectList=function(t,r){var n=Array.from(r).find(function(e){return 0!==e.width});return n?new e(n.left+t.windowBounds.left,n.top+t.windowBounds.top,n.width,n.height):e.EMPTY},e.EMPTY=new e(0,0,0,0),e}(),$6=function(e,t){return V6.fromClientRect(e,t.getBoundingClientRect())},W6=function(e){for(var t=[],r=0,n=e.length;r<n;){var i=e.charCodeAt(r++);if(i>=55296&&i<=56319&&r<n){var a=e.charCodeAt(r++);56320==(64512&a)?t.push(((1023&i)<<10)+(1023&a)+65536):(t.push(i),r--)}else t.push(i)}return t},G6=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var r=e.length;if(!r)return"";for(var n=[],i=-1,a="";++i<r;){var o=e[i];o<=65535?n.push(o):(o-=65536,n.push(55296+(o>>10),o%1024+56320)),(i+1===r||n.length>16384)&&(a+=String.fromCharCode.apply(String,n),n.length=0)}return a},q6="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Y6="undefined"==typeof Uint8Array?[]:new Uint8Array(256),X6=0;X6<64;X6++)Y6[q6.charCodeAt(X6)]=X6;for(var J6="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Z6="undefined"==typeof Uint8Array?[]:new Uint8Array(256),e8=0;e8<64;e8++)Z6[J6.charCodeAt(e8)]=e8;for(var t8=function(e,t,r){return e.slice?e.slice(t,r):new Uint16Array(Array.prototype.slice.call(e,t,r))},r8=function(){function e(e,t,r,n,i,a){this.initialValue=e,this.errorValue=t,this.highStart=r,this.highValueIndex=n,this.index=i,this.data=a}return e.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return t=((t=this.index[e>>5])<<2)+(31&e),this.data[t];if(e<=65535)return t=((t=this.index[2048+(e-55296>>5)])<<2)+(31&e),this.data[t];if(e<this.highStart)return t=2080+(e>>11),t=this.index[t],t+=e>>5&63,t=((t=this.index[t])<<2)+(31&e),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),n8="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i8="undefined"==typeof Uint8Array?[]:new Uint8Array(256),a8=0;a8<64;a8++)i8[n8.charCodeAt(a8)]=a8;var o8,s8,A8,l8,c8,u8,d8,h8,p8=10,f8=13,m8=15,g8=17,y8=18,v8=19,x8=20,w8=21,b8=22,B8=24,C8=25,E8=26,k8=27,S8=28,j8=30,F8=32,Q8=33,N8=34,U8=35,O8=37,I8=38,T8=39,P8=40,M8=42,D8=[9001,65288],L8="×",H8="÷",_8=(l8=function(e){var t,r,n,i,a,o=.75*e.length,s=e.length,A=0;"="===e[e.length-1]&&(o--,"="===e[e.length-2]&&o--);var l="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(o):new Array(o),c=Array.isArray(l)?l:new Uint8Array(l);for(t=0;t<s;t+=4)r=Z6[e.charCodeAt(t)],n=Z6[e.charCodeAt(t+1)],i=Z6[e.charCodeAt(t+2)],a=Z6[e.charCodeAt(t+3)],c[A++]=r<<2|n>>4,c[A++]=(15&n)<<4|i>>2,c[A++]=(3&i)<<6|63&a;return l}("KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA=="),c8=Array.isArray(l8)?function(e){for(var t=e.length,r=[],n=0;n<t;n+=4)r.push(e[n+3]<<24|e[n+2]<<16|e[n+1]<<8|e[n]);return r}(l8):new Uint32Array(l8),u8=Array.isArray(l8)?function(e){for(var t=e.length,r=[],n=0;n<t;n+=2)r.push(e[n+1]<<8|e[n]);return r}(l8):new Uint16Array(l8),d8=t8(u8,12,c8[4]/2),h8=2===c8[5]?t8(u8,(24+c8[4])/2):(o8=c8,s8=Math.ceil((24+c8[4])/4),o8.slice?o8.slice(s8,A8):new Uint32Array(Array.prototype.slice.call(o8,s8,A8))),new r8(c8[0],c8[1],c8[2],c8[3],d8,h8)),R8=[j8,36],K8=[1,2,3,5],z8=[p8,8],V8=[k8,E8],$8=K8.concat(z8),W8=[I8,T8,P8,N8,U8],G8=[m8,f8],q8=function(e,t,r,n){var i=n[r];if(Array.isArray(e)?-1!==e.indexOf(i):e===i)for(var a=r;a<=n.length;){if((A=n[++a])===t)return!0;if(A!==p8)break}if(i===p8)for(a=r;a>0;){var o=n[--a];if(Array.isArray(e)?-1!==e.indexOf(o):e===o)for(var s=r;s<=n.length;){var A;if((A=n[++s])===t)return!0;if(A!==p8)break}if(o!==p8)break}return!1},Y8=function(e,t){for(var r=e;r>=0;){var n=t[r];if(n!==p8)return n;r--}return 0},X8=function(e,t,r,n,i){if(0===r[n])return L8;var a=n-1;if(Array.isArray(i)&&!0===i[a])return L8;var o=a-1,s=a+1,A=t[a],l=o>=0?t[o]:0,c=t[s];if(2===A&&3===c)return L8;if(-1!==K8.indexOf(A))return"!";if(-1!==K8.indexOf(c))return L8;if(-1!==z8.indexOf(c))return L8;if(8===Y8(a,t))return H8;if(11===_8.get(e[a]))return L8;if((A===F8||A===Q8)&&11===_8.get(e[s]))return L8;if(7===A||7===c)return L8;if(9===A)return L8;if(-1===[p8,f8,m8].indexOf(A)&&9===c)return L8;if(-1!==[g8,y8,v8,B8,S8].indexOf(c))return L8;if(Y8(a,t)===b8)return L8;if(q8(23,b8,a,t))return L8;if(q8([g8,y8],w8,a,t))return L8;if(q8(12,12,a,t))return L8;if(A===p8)return H8;if(23===A||23===c)return L8;if(16===c||16===A)return H8;if(-1!==[f8,m8,w8].indexOf(c)||14===A)return L8;if(36===l&&-1!==G8.indexOf(A))return L8;if(A===S8&&36===c)return L8;if(c===x8)return L8;if(-1!==R8.indexOf(c)&&A===C8||-1!==R8.indexOf(A)&&c===C8)return L8;if(A===k8&&-1!==[O8,F8,Q8].indexOf(c)||-1!==[O8,F8,Q8].indexOf(A)&&c===E8)return L8;if(-1!==R8.indexOf(A)&&-1!==V8.indexOf(c)||-1!==V8.indexOf(A)&&-1!==R8.indexOf(c))return L8;if(-1!==[k8,E8].indexOf(A)&&(c===C8||-1!==[b8,m8].indexOf(c)&&t[s+1]===C8)||-1!==[b8,m8].indexOf(A)&&c===C8||A===C8&&-1!==[C8,S8,B8].indexOf(c))return L8;if(-1!==[C8,S8,B8,g8,y8].indexOf(c))for(var u=a;u>=0;){if((d=t[u])===C8)return L8;if(-1===[S8,B8].indexOf(d))break;u--}if(-1!==[k8,E8].indexOf(c))for(u=-1!==[g8,y8].indexOf(A)?o:a;u>=0;){var d;if((d=t[u])===C8)return L8;if(-1===[S8,B8].indexOf(d))break;u--}if(I8===A&&-1!==[I8,T8,N8,U8].indexOf(c)||-1!==[T8,N8].indexOf(A)&&-1!==[T8,P8].indexOf(c)||-1!==[P8,U8].indexOf(A)&&c===P8)return L8;if(-1!==W8.indexOf(A)&&-1!==[x8,E8].indexOf(c)||-1!==W8.indexOf(c)&&A===k8)return L8;if(-1!==R8.indexOf(A)&&-1!==R8.indexOf(c))return L8;if(A===B8&&-1!==R8.indexOf(c))return L8;if(-1!==R8.concat(C8).indexOf(A)&&c===b8&&-1===D8.indexOf(e[s])||-1!==R8.concat(C8).indexOf(c)&&A===y8)return L8;if(41===A&&41===c){for(var h=r[a],p=1;h>0&&41===t[--h];)p++;if(p%2!=0)return L8}return A===F8&&c===Q8?L8:H8},J8=function(e,t){t||(t={lineBreak:"normal",wordBreak:"normal"});var r=function(e,t){void 0===t&&(t="strict");var r=[],n=[],i=[];return e.forEach(function(e,a){var o=_8.get(e);if(o>50?(i.push(!0),o-=50):i.push(!1),-1!==["normal","auto","loose"].indexOf(t)&&-1!==[8208,8211,12316,12448].indexOf(e))return n.push(a),r.push(16);if(4===o||11===o){if(0===a)return n.push(a),r.push(j8);var s=r[a-1];return-1===$8.indexOf(s)?(n.push(n[a-1]),r.push(s)):(n.push(a),r.push(j8))}return n.push(a),31===o?r.push("strict"===t?w8:O8):o===M8||29===o?r.push(j8):43===o?e>=131072&&e<=196605||e>=196608&&e<=262141?r.push(O8):r.push(j8):void r.push(o)}),[n,r,i]}(e,t.lineBreak),n=r[0],i=r[1],a=r[2];"break-all"!==t.wordBreak&&"break-word"!==t.wordBreak||(i=i.map(function(e){return-1!==[C8,j8,M8].indexOf(e)?O8:e}));var o="keep-all"===t.wordBreak?a.map(function(t,r){return t&&e[r]>=19968&&e[r]<=40959}):void 0;return[n,i,o]},Z8=function(){function e(e,t,r,n){this.codePoints=e,this.required="!"===t,this.start=r,this.end=n}return e.prototype.slice=function(){return G6.apply(void 0,this.codePoints.slice(this.start,this.end))},e}(),e9=45,t9=43,r9=-1,n9=function(e){return e>=48&&e<=57},i9=function(e){return n9(e)||e>=65&&e<=70||e>=97&&e<=102},a9=function(e){return 10===e||9===e||32===e},o9=function(e){return function(e){return function(e){return e>=97&&e<=122}(e)||function(e){return e>=65&&e<=90}(e)}(e)||function(e){return e>=128}(e)||95===e},s9=function(e){return o9(e)||n9(e)||e===e9},A9=function(e){return e>=0&&e<=8||11===e||e>=14&&e<=31||127===e},l9=function(e,t){return 92===e&&10!==t},c9=function(e,t,r){return e===e9?o9(t)||l9(t,r):!!o9(e)||!(92!==e||!l9(e,t))},u9=function(e,t,r){return e===t9||e===e9?!!n9(t)||46===t&&n9(r):n9(46===e?t:e)},d9=function(e){var t=0,r=1;e[t]!==t9&&e[t]!==e9||(e[t]===e9&&(r=-1),t++);for(var n=[];n9(e[t]);)n.push(e[t++]);var i=n.length?parseInt(G6.apply(void 0,n),10):0;46===e[t]&&t++;for(var a=[];n9(e[t]);)a.push(e[t++]);var o=a.length,s=o?parseInt(G6.apply(void 0,a),10):0;69!==e[t]&&101!==e[t]||t++;var A=1;e[t]!==t9&&e[t]!==e9||(e[t]===e9&&(A=-1),t++);for(var l=[];n9(e[t]);)l.push(e[t++]);var c=l.length?parseInt(G6.apply(void 0,l),10):0;return r*(i+s*Math.pow(10,-o))*Math.pow(10,A*c)},h9={type:2},p9={type:3},f9={type:4},m9={type:13},g9={type:8},y9={type:21},v9={type:9},x9={type:10},w9={type:11},b9={type:12},B9={type:14},C9={type:23},E9={type:1},k9={type:25},S9={type:24},j9={type:26},F9={type:27},Q9={type:28},N9={type:29},U9={type:31},O9={type:32},I9=function(){function e(){this._value=[]}return e.prototype.write=function(e){this._value=this._value.concat(W6(e))},e.prototype.read=function(){for(var e=[],t=this.consumeToken();t!==O9;)e.push(t),t=this.consumeToken();return e},e.prototype.consumeToken=function(){var e=this.consumeCodePoint();switch(e){case 34:return this.consumeStringToken(34);case 35:var t=this.peekCodePoint(0),r=this.peekCodePoint(1),n=this.peekCodePoint(2);if(s9(t)||l9(r,n)){var i=c9(t,r,n)?2:1;return{type:5,value:this.consumeName(),flags:i}}break;case 36:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),m9;break;case 39:return this.consumeStringToken(39);case 40:return h9;case 41:return p9;case 42:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),B9;break;case t9:if(u9(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case 44:return f9;case e9:var a=e,o=this.peekCodePoint(0),s=this.peekCodePoint(1);if(u9(a,o,s))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(c9(a,o,s))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(o===e9&&62===s)return this.consumeCodePoint(),this.consumeCodePoint(),S9;break;case 46:if(u9(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case 47:if(42===this.peekCodePoint(0))for(this.consumeCodePoint();;){var A=this.consumeCodePoint();if(42===A&&47===(A=this.consumeCodePoint()))return this.consumeToken();if(A===r9)return this.consumeToken()}break;case 58:return j9;case 59:return F9;case 60:if(33===this.peekCodePoint(0)&&this.peekCodePoint(1)===e9&&this.peekCodePoint(2)===e9)return this.consumeCodePoint(),this.consumeCodePoint(),k9;break;case 64:var l=this.peekCodePoint(0),c=this.peekCodePoint(1),u=this.peekCodePoint(2);if(c9(l,c,u))return{type:7,value:this.consumeName()};break;case 91:return Q9;case 92:if(l9(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case 93:return N9;case 61:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),g9;break;case 123:return w9;case 125:return b9;case 117:case 85:var d=this.peekCodePoint(0),h=this.peekCodePoint(1);return d!==t9||!i9(h)&&63!==h||(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(e),this.consumeIdentLikeToken();case 124:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),v9;if(124===this.peekCodePoint(0))return this.consumeCodePoint(),y9;break;case 126:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),x9;break;case r9:return O9}return a9(e)?(this.consumeWhiteSpace(),U9):n9(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):o9(e)?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):{type:6,value:G6(e)}},e.prototype.consumeCodePoint=function(){var e=this._value.shift();return void 0===e?-1:e},e.prototype.reconsumeCodePoint=function(e){this._value.unshift(e)},e.prototype.peekCodePoint=function(e){return e>=this._value.length?-1:this._value[e]},e.prototype.consumeUnicodeRangeToken=function(){for(var e=[],t=this.consumeCodePoint();i9(t)&&e.length<6;)e.push(t),t=this.consumeCodePoint();for(var r=!1;63===t&&e.length<6;)e.push(t),t=this.consumeCodePoint(),r=!0;if(r)return{type:30,start:parseInt(G6.apply(void 0,e.map(function(e){return 63===e?48:e})),16),end:parseInt(G6.apply(void 0,e.map(function(e){return 63===e?70:e})),16)};var n=parseInt(G6.apply(void 0,e),16);if(this.peekCodePoint(0)===e9&&i9(this.peekCodePoint(1))){this.consumeCodePoint(),t=this.consumeCodePoint();for(var i=[];i9(t)&&i.length<6;)i.push(t),t=this.consumeCodePoint();return{type:30,start:n,end:parseInt(G6.apply(void 0,i),16)}}return{type:30,start:n,end:n}},e.prototype.consumeIdentLikeToken=function(){var e=this.consumeName();return"url"===e.toLowerCase()&&40===this.peekCodePoint(0)?(this.consumeCodePoint(),this.consumeUrlToken()):40===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:19,value:e}):{type:20,value:e}},e.prototype.consumeUrlToken=function(){var e=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===r9)return{type:22,value:""};var t=this.peekCodePoint(0);if(39===t||34===t){var r=this.consumeStringToken(this.consumeCodePoint());return 0===r.type&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===r9||41===this.peekCodePoint(0))?(this.consumeCodePoint(),{type:22,value:r.value}):(this.consumeBadUrlRemnants(),C9)}for(;;){var n=this.consumeCodePoint();if(n===r9||41===n)return{type:22,value:G6.apply(void 0,e)};if(a9(n))return this.consumeWhiteSpace(),this.peekCodePoint(0)===r9||41===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:22,value:G6.apply(void 0,e)}):(this.consumeBadUrlRemnants(),C9);if(34===n||39===n||40===n||A9(n))return this.consumeBadUrlRemnants(),C9;if(92===n){if(!l9(n,this.peekCodePoint(0)))return this.consumeBadUrlRemnants(),C9;e.push(this.consumeEscapedCodePoint())}else e.push(n)}},e.prototype.consumeWhiteSpace=function(){for(;a9(this.peekCodePoint(0));)this.consumeCodePoint()},e.prototype.consumeBadUrlRemnants=function(){for(;;){var e=this.consumeCodePoint();if(41===e||e===r9)return;l9(e,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},e.prototype.consumeStringSlice=function(e){for(var t="";e>0;){var r=Math.min(5e4,e);t+=G6.apply(void 0,this._value.splice(0,r)),e-=r}return this._value.shift(),t},e.prototype.consumeStringToken=function(e){for(var t="",r=0;;){var n=this._value[r];if(n===r9||void 0===n||n===e)return{type:0,value:t+=this.consumeStringSlice(r)};if(10===n)return this._value.splice(0,r),E9;if(92===n){var i=this._value[r+1];i!==r9&&void 0!==i&&(10===i?(t+=this.consumeStringSlice(r),r=-1,this._value.shift()):l9(n,i)&&(t+=this.consumeStringSlice(r),t+=G6(this.consumeEscapedCodePoint()),r=-1))}r++}},e.prototype.consumeNumber=function(){var e=[],t=4,r=this.peekCodePoint(0);for(r!==t9&&r!==e9||e.push(this.consumeCodePoint());n9(this.peekCodePoint(0));)e.push(this.consumeCodePoint());r=this.peekCodePoint(0);var n=this.peekCodePoint(1);if(46===r&&n9(n))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=8;n9(this.peekCodePoint(0));)e.push(this.consumeCodePoint());r=this.peekCodePoint(0),n=this.peekCodePoint(1);var i=this.peekCodePoint(2);if((69===r||101===r)&&((n===t9||n===e9)&&n9(i)||n9(n)))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=8;n9(this.peekCodePoint(0));)e.push(this.consumeCodePoint());return[d9(e),t]},e.prototype.consumeNumericToken=function(){var e=this.consumeNumber(),t=e[0],r=e[1],n=this.peekCodePoint(0),i=this.peekCodePoint(1),a=this.peekCodePoint(2);return c9(n,i,a)?{type:15,number:t,flags:r,unit:this.consumeName()}:37===n?(this.consumeCodePoint(),{type:16,number:t,flags:r}):{type:17,number:t,flags:r}},e.prototype.consumeEscapedCodePoint=function(){var e=this.consumeCodePoint();if(i9(e)){for(var t=G6(e);i9(this.peekCodePoint(0))&&t.length<6;)t+=G6(this.consumeCodePoint());a9(this.peekCodePoint(0))&&this.consumeCodePoint();var r=parseInt(t,16);return 0===r||function(e){return e>=55296&&e<=57343}(r)||r>1114111?65533:r}return e===r9?65533:e},e.prototype.consumeName=function(){for(var e="";;){var t=this.consumeCodePoint();if(s9(t))e+=G6(t);else{if(!l9(t,this.peekCodePoint(0)))return this.reconsumeCodePoint(t),e;e+=G6(this.consumeEscapedCodePoint())}}},e}(),T9=function(){function e(e){this._tokens=e}return e.create=function(t){var r=new I9;return r.write(t),new e(r.read())},e.parseValue=function(t){return e.create(t).parseComponentValue()},e.parseValues=function(t){return e.create(t).parseComponentValues()},e.prototype.parseComponentValue=function(){for(var e=this.consumeToken();31===e.type;)e=this.consumeToken();if(32===e.type)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(e);var t=this.consumeComponentValue();do{e=this.consumeToken()}while(31===e.type);if(32===e.type)return t;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},e.prototype.parseComponentValues=function(){for(var e=[];;){var t=this.consumeComponentValue();if(32===t.type)return e;e.push(t),e.push()}},e.prototype.consumeComponentValue=function(){var e=this.consumeToken();switch(e.type){case 11:case 28:case 2:return this.consumeSimpleBlock(e.type);case 19:return this.consumeFunction(e)}return e},e.prototype.consumeSimpleBlock=function(e){for(var t={type:e,values:[]},r=this.consumeToken();;){if(32===r.type||z9(r,e))return t;this.reconsumeToken(r),t.values.push(this.consumeComponentValue()),r=this.consumeToken()}},e.prototype.consumeFunction=function(e){for(var t={name:e.value,values:[],type:18};;){var r=this.consumeToken();if(32===r.type||3===r.type)return t;this.reconsumeToken(r),t.values.push(this.consumeComponentValue())}},e.prototype.consumeToken=function(){var e=this._tokens.shift();return void 0===e?O9:e},e.prototype.reconsumeToken=function(e){this._tokens.unshift(e)},e}(),P9=function(e){return 15===e.type},M9=function(e){return 17===e.type},D9=function(e){return 20===e.type},L9=function(e){return 0===e.type},H9=function(e,t){return D9(e)&&e.value===t},_9=function(e){return 31!==e.type},R9=function(e){return 31!==e.type&&4!==e.type},K9=function(e){var t=[],r=[];return e.forEach(function(e){if(4===e.type){if(0===r.length)throw new Error("Error parsing function args, zero tokens for arg");return t.push(r),void(r=[])}31!==e.type&&r.push(e)}),r.length&&t.push(r),t},z9=function(e,t){return 11===t&&12===e.type||(28===t&&29===e.type||2===t&&3===e.type)},V9=function(e){return 17===e.type||15===e.type},$9=function(e){return 16===e.type||V9(e)},W9=function(e){return e.length>1?[e[0],e[1]]:[e[0]]},G9={type:17,number:0,flags:4},q9={type:16,number:50,flags:4},Y9={type:16,number:100,flags:4},X9=function(e,t,r){var n=e[0],i=e[1];return[J9(n,t),J9(void 0!==i?i:n,r)]},J9=function(e,t){if(16===e.type)return e.number/100*t;if(P9(e))switch(e.unit){case"rem":case"em":return 16*e.number;default:return e.number}return e.number},Z9="grad",e7="turn",t7=function(e,t){if(15===t.type)switch(t.unit){case"deg":return Math.PI*t.number/180;case Z9:return Math.PI/200*t.number;case"rad":return t.number;case e7:return 2*Math.PI*t.number}throw new Error("Unsupported angle type")},r7=function(e){return 15===e.type&&("deg"===e.unit||e.unit===Z9||"rad"===e.unit||e.unit===e7)},n7=function(e){switch(e.filter(D9).map(function(e){return e.value}).join(" ")){case"to bottom right":case"to right bottom":case"left top":case"top left":return[G9,G9];case"to top":case"bottom":return i7(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[G9,Y9];case"to right":case"left":return i7(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Y9,Y9];case"to bottom":case"top":return i7(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Y9,G9];case"to left":case"right":return i7(270)}return 0},i7=function(e){return Math.PI*e/180},a7=function(e,t){if(18===t.type){var r=h7[t.name];if(void 0===r)throw new Error('Attempting to parse an unsupported color function "'+t.name+'"');return r(e,t.values)}if(5===t.type){if(3===t.value.length){var n=t.value.substring(0,1),i=t.value.substring(1,2),a=t.value.substring(2,3);return A7(parseInt(n+n,16),parseInt(i+i,16),parseInt(a+a,16),1)}if(4===t.value.length){n=t.value.substring(0,1),i=t.value.substring(1,2),a=t.value.substring(2,3);var o=t.value.substring(3,4);return A7(parseInt(n+n,16),parseInt(i+i,16),parseInt(a+a,16),parseInt(o+o,16)/255)}if(6===t.value.length){n=t.value.substring(0,2),i=t.value.substring(2,4),a=t.value.substring(4,6);return A7(parseInt(n,16),parseInt(i,16),parseInt(a,16),1)}if(8===t.value.length){n=t.value.substring(0,2),i=t.value.substring(2,4),a=t.value.substring(4,6),o=t.value.substring(6,8);return A7(parseInt(n,16),parseInt(i,16),parseInt(a,16),parseInt(o,16)/255)}}if(20===t.type){var s=f7[t.value.toUpperCase()];if(void 0!==s)return s}return f7.TRANSPARENT},o7=function(e){return!(255&e)},s7=function(e){var t=255&e,r=255&e>>8,n=255&e>>16,i=255&e>>24;return t<255?"rgba("+i+","+n+","+r+","+t/255+")":"rgb("+i+","+n+","+r+")"},A7=function(e,t,r,n){return(e<<24|t<<16|r<<8|Math.round(255*n))>>>0},l7=function(e,t){if(17===e.type)return e.number;if(16===e.type){var r=3===t?1:255;return 3===t?e.number/100*r:Math.round(e.number/100*r)}return 0},c7=function(e,t){var r=t.filter(R9);if(3===r.length){var n=r.map(l7),i=n[0],a=n[1],o=n[2];return A7(i,a,o,1)}if(4===r.length){var s=r.map(l7),A=(i=s[0],a=s[1],o=s[2],s[3]);return A7(i,a,o,A)}return 0};function u7(e,t,r){return r<0&&(r+=1),r>=1&&(r-=1),r<1/6?(t-e)*r*6+e:r<.5?t:r<2/3?6*(t-e)*(2/3-r)+e:e}var d7=function(e,t){var r=t.filter(R9),n=r[0],i=r[1],a=r[2],o=r[3],s=(17===n.type?i7(n.number):t7(e,n))/(2*Math.PI),A=$9(i)?i.number/100:0,l=$9(a)?a.number/100:0,c=void 0!==o&&$9(o)?J9(o,1):1;if(0===A)return A7(255*l,255*l,255*l,1);var u=l<=.5?l*(A+1):l+A-l*A,d=2*l-u,h=u7(d,u,s+1/3),p=u7(d,u,s),f=u7(d,u,s-1/3);return A7(255*h,255*p,255*f,c)},h7={hsl:d7,hsla:d7,rgb:c7,rgba:c7},p7=function(e,t){return a7(e,T9.create(t).parseComponentValue())},f7={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},m7={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map(function(e){if(D9(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},g7={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},y7=function(e,t){var r=a7(e,t[0]),n=t[1];return n&&$9(n)?{color:r,stop:n}:{color:r,stop:null}},v7=function(e,t){var r=e[0],n=e[e.length-1];null===r.stop&&(r.stop=G9),null===n.stop&&(n.stop=Y9);for(var i=[],a=0,o=0;o<e.length;o++){var s=e[o].stop;if(null!==s){var A=J9(s,t);A>a?i.push(A):i.push(a),a=A}else i.push(null)}var l=null;for(o=0;o<i.length;o++){var c=i[o];if(null===c)null===l&&(l=o);else if(null!==l){for(var u=o-l,d=(c-i[l-1])/(u+1),h=1;h<=u;h++)i[l+h-1]=d*h;l=null}}return e.map(function(e,r){return{color:e.color,stop:Math.max(Math.min(1,i[r]/t),0)}})},x7=function(e,t,r){var n="number"==typeof e?e:function(e,t,r){var n=t/2,i=r/2,a=J9(e[0],t)-n,o=i-J9(e[1],r);return(Math.atan2(o,a)+2*Math.PI)%(2*Math.PI)}(e,t,r),i=Math.abs(t*Math.sin(n))+Math.abs(r*Math.cos(n)),a=t/2,o=r/2,s=i/2,A=Math.sin(n-Math.PI/2)*s,l=Math.cos(n-Math.PI/2)*s;return[i,a-l,a+l,o-A,o+A]},w7=function(e,t){return Math.sqrt(e*e+t*t)},b7=function(e,t,r,n,i){return[[0,0],[0,t],[e,0],[e,t]].reduce(function(e,t){var a=t[0],o=t[1],s=w7(r-a,n-o);return(i?s<e.optimumDistance:s>e.optimumDistance)?{optimumCorner:t,optimumDistance:s}:e},{optimumDistance:i?1/0:-1/0,optimumCorner:null}).optimumCorner},B7=function(e,t){var r=i7(180),n=[];return K9(t).forEach(function(t,i){if(0===i){var a=t[0];if(20===a.type&&-1!==["top","left","right","bottom"].indexOf(a.value))return void(r=n7(t));if(r7(a))return void(r=(t7(e,a)+i7(270))%i7(360))}var o=y7(e,t);n.push(o)}),{angle:r,stops:n,type:1}},C7="closest-side",E7="farthest-side",k7="closest-corner",S7="farthest-corner",j7="circle",F7="ellipse",Q7="cover",N7="contain",U7=function(e,t){var r=0,n=3,i=[],a=[];return K9(t).forEach(function(t,o){var s=!0;if(0===o?s=t.reduce(function(e,t){if(D9(t))switch(t.value){case"center":return a.push(q9),!1;case"top":case"left":return a.push(G9),!1;case"right":case"bottom":return a.push(Y9),!1}else if($9(t)||V9(t))return a.push(t),!1;return e},s):1===o&&(s=t.reduce(function(e,t){if(D9(t))switch(t.value){case j7:return r=0,!1;case F7:return r=1,!1;case N7:case C7:return n=0,!1;case E7:return n=1,!1;case k7:return n=2,!1;case Q7:case S7:return n=3,!1}else if(V9(t)||$9(t))return Array.isArray(n)||(n=[]),n.push(t),!1;return e},s)),s){var A=y7(e,t);i.push(A)}}),{size:n,shape:r,stops:i,position:a,type:2}},O7=function(e,t){if(22===t.type){var r={url:t.value,type:0};return e.cache.addImage(t.value),r}if(18===t.type){var n=P7[t.name];if(void 0===n)throw new Error('Attempting to parse an unsupported image function "'+t.name+'"');return n(e,t.values)}throw new Error("Unsupported image type "+t.type)};var I7,T7,P7={"linear-gradient":function(e,t){var r=i7(180),n=[];return K9(t).forEach(function(t,i){if(0===i){var a=t[0];if(20===a.type&&"to"===a.value)return void(r=n7(t));if(r7(a))return void(r=t7(e,a))}var o=y7(e,t);n.push(o)}),{angle:r,stops:n,type:1}},"-moz-linear-gradient":B7,"-ms-linear-gradient":B7,"-o-linear-gradient":B7,"-webkit-linear-gradient":B7,"radial-gradient":function(e,t){var r=0,n=3,i=[],a=[];return K9(t).forEach(function(t,o){var s=!0;if(0===o){var A=!1;s=t.reduce(function(e,t){if(A)if(D9(t))switch(t.value){case"center":return a.push(q9),e;case"top":case"left":return a.push(G9),e;case"right":case"bottom":return a.push(Y9),e}else($9(t)||V9(t))&&a.push(t);else if(D9(t))switch(t.value){case j7:return r=0,!1;case F7:return r=1,!1;case"at":return A=!0,!1;case C7:return n=0,!1;case Q7:case E7:return n=1,!1;case N7:case k7:return n=2,!1;case S7:return n=3,!1}else if(V9(t)||$9(t))return Array.isArray(n)||(n=[]),n.push(t),!1;return e},s)}if(s){var l=y7(e,t);i.push(l)}}),{size:n,shape:r,stops:i,position:a,type:2}},"-moz-radial-gradient":U7,"-ms-radial-gradient":U7,"-o-radial-gradient":U7,"-webkit-radial-gradient":U7,"-webkit-gradient":function(e,t){var r=i7(180),n=[],i=1;return K9(t).forEach(function(t,r){var a=t[0];if(0===r){if(D9(a)&&"linear"===a.value)return void(i=1);if(D9(a)&&"radial"===a.value)return void(i=2)}if(18===a.type)if("from"===a.name){var o=a7(e,a.values[0]);n.push({stop:G9,color:o})}else if("to"===a.name){o=a7(e,a.values[0]);n.push({stop:Y9,color:o})}else if("color-stop"===a.name){var s=a.values.filter(R9);if(2===s.length){o=a7(e,s[1]);var A=s[0];M9(A)&&n.push({stop:{type:16,number:100*A.number,flags:A.flags},color:o})}}}),1===i?{angle:(r+i7(180))%i7(360),stops:n,type:i}:{size:3,shape:0,stops:n,position:[],type:i}}},M7={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(e,t){if(0===t.length)return[];var r=t[0];return 20===r.type&&"none"===r.value?[]:t.filter(function(e){return R9(e)&&function(e){return!(20===e.type&&"none"===e.value||18===e.type&&!P7[e.name])}(e)}).map(function(t){return O7(e,t)})}},D7={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map(function(e){if(D9(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},L7={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(e,t){return K9(t).map(function(e){return e.filter($9)}).map(W9)}},H7={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(e,t){return K9(t).map(function(e){return e.filter(D9).map(function(e){return e.value}).join(" ")}).map(_7)}},_7=function(e){switch(e){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;default:return 0}};(T7=I7||(I7={})).AUTO="auto",T7.CONTAIN="contain",T7.COVER="cover";var R7,K7,z7={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(e,t){return K9(t).map(function(e){return e.filter(V7)})}},V7=function(e){return D9(e)||$9(e)},$7=function(e){return{name:"border-"+e+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},W7=$7("top"),G7=$7("right"),q7=$7("bottom"),Y7=$7("left"),X7=function(e){return{name:"border-radius-"+e,initialValue:"0 0",prefix:!1,type:1,parse:function(e,t){return W9(t.filter($9))}}},J7=X7("top-left"),Z7=X7("top-right"),eee=X7("bottom-right"),tee=X7("bottom-left"),ree=function(e){return{name:"border-"+e+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(e,t){switch(t){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},nee=ree("top"),iee=ree("right"),aee=ree("bottom"),oee=ree("left"),see=function(e){return{name:"border-"+e+"-width",initialValue:"0",type:0,prefix:!1,parse:function(e,t){return P9(t)?t.number:0}}},Aee=see("top"),lee=see("right"),cee=see("bottom"),uee=see("left"),dee={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},hee={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(e,t){return"rtl"===t?1:0}},pee={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(e,t){return t.filter(D9).reduce(function(e,t){return e|fee(t.value)},0)}},fee=function(e){switch(e){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},mee={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},gee={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(e,t){return 20===t.type&&"normal"===t.value?0:17===t.type||15===t.type?t.number:0}};(K7=R7||(R7={})).NORMAL="normal",K7.STRICT="strict";var yee,vee,xee={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){return"strict"===t?R7.STRICT:R7.NORMAL}},wee={name:"line-height",initialValue:"normal",prefix:!1,type:4},bee=function(e,t){return D9(e)&&"normal"===e.value?1.2*t:17===e.type?t*e.number:$9(e)?J9(e,t):t},Bee={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(e,t){return 20===t.type&&"none"===t.value?null:O7(e,t)}},Cee={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(e,t){return"inside"===t?0:1}},Eee={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;default:return-1}}},kee=function(e){return{name:"margin-"+e,initialValue:"0",prefix:!1,type:4}},See=kee("top"),jee=kee("right"),Fee=kee("bottom"),Qee=kee("left"),Nee={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(e,t){return t.filter(D9).map(function(e){switch(e.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;default:return 0}})}},Uee={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){return"break-word"===t?"break-word":"normal"}},Oee=function(e){return{name:"padding-"+e,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},Iee=Oee("top"),Tee=Oee("right"),Pee=Oee("bottom"),Mee=Oee("left"),Dee={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(e,t){switch(t){case"right":return 2;case"center":case"justify":return 1;default:return 0}}},Lee={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(e,t){switch(t){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},Hee={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return 1===t.length&&H9(t[0],"none")?[]:K9(t).map(function(t){for(var r={color:f7.TRANSPARENT,offsetX:G9,offsetY:G9,blur:G9},n=0,i=0;i<t.length;i++){var a=t[i];V9(a)?(0===n?r.offsetX=a:1===n?r.offsetY=a:r.blur=a,n++):r.color=a7(e,a)}return r})}},_ee={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},Ree={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(e,t){if(20===t.type&&"none"===t.value)return null;if(18===t.type){var r=Kee[t.name];if(void 0===r)throw new Error('Attempting to parse an unsupported transform function "'+t.name+'"');return r(t.values)}return null}},Kee={matrix:function(e){var t=e.filter(function(e){return 17===e.type}).map(function(e){return e.number});return 6===t.length?t:null},matrix3d:function(e){var t=e.filter(function(e){return 17===e.type}).map(function(e){return e.number}),r=t[0],n=t[1];t[2],t[3];var i=t[4],a=t[5];t[6],t[7],t[8],t[9],t[10],t[11];var o=t[12],s=t[13];return t[14],t[15],16===t.length?[r,n,i,a,o,s]:null}},zee={type:16,number:50,flags:4},Vee=[zee,zee],$ee={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(e,t){var r=t.filter($9);return 2!==r.length?Vee:[r[0],r[1]]}},Wee={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"hidden":return 1;case"collapse":return 2;default:return 0}}};(vee=yee||(yee={})).NORMAL="normal",vee.BREAK_ALL="break-all",vee.KEEP_ALL="keep-all";for(var Gee={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"break-all":return yee.BREAK_ALL;case"keep-all":return yee.KEEP_ALL;default:return yee.NORMAL}}},qee={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(e,t){if(20===t.type)return{auto:!0,order:0};if(M9(t))return{auto:!1,order:t.number};throw new Error("Invalid z-index number parsed")}},Yee=function(e,t){if(15===t.type)switch(t.unit.toLowerCase()){case"s":return 1e3*t.number;case"ms":return t.number}throw new Error("Unsupported time type")},Xee={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(e,t){return M9(t)?t.number:1}},Jee={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Zee={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(e,t){return t.filter(D9).map(function(e){switch(e.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(e){return 0!==e})}},ete={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(e,t){var r=[],n=[];return t.forEach(function(e){switch(e.type){case 20:case 0:r.push(e.value);break;case 17:r.push(e.number.toString());break;case 4:n.push(r.join(" ")),r.length=0}}),r.length&&n.push(r.join(" ")),n.map(function(e){return-1===e.indexOf(" ")?e:"'"+e+"'"})}},tte={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},rte={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(e,t){return M9(t)?t.number:D9(t)&&"bold"===t.value?700:400}},nte={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return t.filter(D9).map(function(e){return e.value})}},ite={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"oblique":return"oblique";case"italic":return"italic";default:return"normal"}}},ate=function(e,t){return 0!==(e&t)},ote={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(e,t){if(0===t.length)return[];var r=t[0];return 20===r.type&&"none"===r.value?[]:t}},ste={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(0===t.length)return null;var r=t[0];if(20===r.type&&"none"===r.value)return null;for(var n=[],i=t.filter(_9),a=0;a<i.length;a++){var o=i[a],s=i[a+1];if(20===o.type){var A=s&&M9(s)?s.number:1;n.push({counter:o.value,increment:A})}}return n}},Ate={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(0===t.length)return[];for(var r=[],n=t.filter(_9),i=0;i<n.length;i++){var a=n[i],o=n[i+1];if(D9(a)&&"none"!==a.value){var s=o&&M9(o)?o.number:0;r.push({counter:a.value,reset:s})}}return r}},lte={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(e,t){return t.filter(P9).map(function(t){return Yee(e,t)})}},cte={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(0===t.length)return null;var r=t[0];if(20===r.type&&"none"===r.value)return null;var n=[],i=t.filter(L9);if(i.length%2!=0)return null;for(var a=0;a<i.length;a+=2){var o=i[a].value,s=i[a+1].value;n.push({open:o,close:s})}return n}},ute=function(e,t,r){if(!e)return"";var n=e[Math.min(t,e.length-1)];return n?r?n.open:n.close:""},dte={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return 1===t.length&&H9(t[0],"none")?[]:K9(t).map(function(t){for(var r={color:255,offsetX:G9,offsetY:G9,blur:G9,spread:G9,inset:!1},n=0,i=0;i<t.length;i++){var a=t[i];H9(a,"inset")?r.inset=!0:V9(a)?(0===n?r.offsetX=a:1===n?r.offsetY=a:2===n?r.blur=a:r.spread=a,n++):r.color=a7(e,a)}return r})}},hte={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(e,t){var r=[];return t.filter(D9).forEach(function(e){switch(e.value){case"stroke":r.push(1);break;case"fill":r.push(0);break;case"markers":r.push(2)}}),[0,1,2].forEach(function(e){-1===r.indexOf(e)&&r.push(e)}),r}},pte={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},fte={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(e,t){return P9(t)?t.number:0}},mte=function(){function e(e,t){var r,n;this.animationDuration=vte(e,lte,t.animationDuration),this.backgroundClip=vte(e,m7,t.backgroundClip),this.backgroundColor=vte(e,g7,t.backgroundColor),this.backgroundImage=vte(e,M7,t.backgroundImage),this.backgroundOrigin=vte(e,D7,t.backgroundOrigin),this.backgroundPosition=vte(e,L7,t.backgroundPosition),this.backgroundRepeat=vte(e,H7,t.backgroundRepeat),this.backgroundSize=vte(e,z7,t.backgroundSize),this.borderTopColor=vte(e,W7,t.borderTopColor),this.borderRightColor=vte(e,G7,t.borderRightColor),this.borderBottomColor=vte(e,q7,t.borderBottomColor),this.borderLeftColor=vte(e,Y7,t.borderLeftColor),this.borderTopLeftRadius=vte(e,J7,t.borderTopLeftRadius),this.borderTopRightRadius=vte(e,Z7,t.borderTopRightRadius),this.borderBottomRightRadius=vte(e,eee,t.borderBottomRightRadius),this.borderBottomLeftRadius=vte(e,tee,t.borderBottomLeftRadius),this.borderTopStyle=vte(e,nee,t.borderTopStyle),this.borderRightStyle=vte(e,iee,t.borderRightStyle),this.borderBottomStyle=vte(e,aee,t.borderBottomStyle),this.borderLeftStyle=vte(e,oee,t.borderLeftStyle),this.borderTopWidth=vte(e,Aee,t.borderTopWidth),this.borderRightWidth=vte(e,lee,t.borderRightWidth),this.borderBottomWidth=vte(e,cee,t.borderBottomWidth),this.borderLeftWidth=vte(e,uee,t.borderLeftWidth),this.boxShadow=vte(e,dte,t.boxShadow),this.color=vte(e,dee,t.color),this.direction=vte(e,hee,t.direction),this.display=vte(e,pee,t.display),this.float=vte(e,mee,t.cssFloat),this.fontFamily=vte(e,ete,t.fontFamily),this.fontSize=vte(e,tte,t.fontSize),this.fontStyle=vte(e,ite,t.fontStyle),this.fontVariant=vte(e,nte,t.fontVariant),this.fontWeight=vte(e,rte,t.fontWeight),this.letterSpacing=vte(e,gee,t.letterSpacing),this.lineBreak=vte(e,xee,t.lineBreak),this.lineHeight=vte(e,wee,t.lineHeight),this.listStyleImage=vte(e,Bee,t.listStyleImage),this.listStylePosition=vte(e,Cee,t.listStylePosition),this.listStyleType=vte(e,Eee,t.listStyleType),this.marginTop=vte(e,See,t.marginTop),this.marginRight=vte(e,jee,t.marginRight),this.marginBottom=vte(e,Fee,t.marginBottom),this.marginLeft=vte(e,Qee,t.marginLeft),this.opacity=vte(e,Xee,t.opacity);var i=vte(e,Nee,t.overflow);this.overflowX=i[0],this.overflowY=i[i.length>1?1:0],this.overflowWrap=vte(e,Uee,t.overflowWrap),this.paddingTop=vte(e,Iee,t.paddingTop),this.paddingRight=vte(e,Tee,t.paddingRight),this.paddingBottom=vte(e,Pee,t.paddingBottom),this.paddingLeft=vte(e,Mee,t.paddingLeft),this.paintOrder=vte(e,hte,t.paintOrder),this.position=vte(e,Lee,t.position),this.textAlign=vte(e,Dee,t.textAlign),this.textDecorationColor=vte(e,Jee,null!==(r=t.textDecorationColor)&&void 0!==r?r:t.color),this.textDecorationLine=vte(e,Zee,null!==(n=t.textDecorationLine)&&void 0!==n?n:t.textDecoration),this.textShadow=vte(e,Hee,t.textShadow),this.textTransform=vte(e,_ee,t.textTransform),this.transform=vte(e,Ree,t.transform),this.transformOrigin=vte(e,$ee,t.transformOrigin),this.visibility=vte(e,Wee,t.visibility),this.webkitTextStrokeColor=vte(e,pte,t.webkitTextStrokeColor),this.webkitTextStrokeWidth=vte(e,fte,t.webkitTextStrokeWidth),this.wordBreak=vte(e,Gee,t.wordBreak),this.zIndex=vte(e,qee,t.zIndex)}return e.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&0===this.visibility},e.prototype.isTransparent=function(){return o7(this.backgroundColor)},e.prototype.isTransformed=function(){return null!==this.transform},e.prototype.isPositioned=function(){return 0!==this.position},e.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},e.prototype.isFloating=function(){return 0!==this.float},e.prototype.isInlineLevel=function(){return ate(this.display,4)||ate(this.display,33554432)||ate(this.display,268435456)||ate(this.display,536870912)||ate(this.display,67108864)||ate(this.display,134217728)},e}(),gte=function(){return function(e,t){this.content=vte(e,ote,t.content),this.quotes=vte(e,cte,t.quotes)}}(),yte=function(){return function(e,t){this.counterIncrement=vte(e,ste,t.counterIncrement),this.counterReset=vte(e,Ate,t.counterReset)}}(),vte=function(e,t,r){var n=new I9,i=null!=r?r.toString():t.initialValue;n.write(i);var a=new T9(n.read());switch(t.type){case 2:var o=a.parseComponentValue();return t.parse(e,D9(o)?o.value:t.initialValue);case 0:return t.parse(e,a.parseComponentValue());case 1:return t.parse(e,a.parseComponentValues());case 4:return a.parseComponentValue();case 3:switch(t.format){case"angle":return t7(e,a.parseComponentValue());case"color":return a7(e,a.parseComponentValue());case"image":return O7(e,a.parseComponentValue());case"length":var s=a.parseComponentValue();return V9(s)?s:G9;case"length-percentage":var A=a.parseComponentValue();return $9(A)?A:G9;case"time":return Yee(e,a.parseComponentValue())}}},xte=function(e,t){var r=function(e){switch(e.getAttribute("data-html2canvas-debug")){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}}(e);return 1===r||t===r},wte=function(){return function(e,t){this.context=e,this.textNodes=[],this.elements=[],this.flags=0,xte(t,3),this.styles=new mte(e,window.getComputedStyle(t,null)),kre(t)&&(this.styles.animationDuration.some(function(e){return e>0})&&(t.style.animationDuration="0s"),null!==this.styles.transform&&(t.style.transform="none")),this.bounds=$6(this.context,t),xte(t,4)&&(this.flags|=16)}}(),bte="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Bte="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Cte=0;Cte<64;Cte++)Bte[bte.charCodeAt(Cte)]=Cte;for(var Ete=function(e,t,r){return e.slice?e.slice(t,r):new Uint16Array(Array.prototype.slice.call(e,t,r))},kte=function(){function e(e,t,r,n,i,a){this.initialValue=e,this.errorValue=t,this.highStart=r,this.highValueIndex=n,this.index=i,this.data=a}return e.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return t=((t=this.index[e>>5])<<2)+(31&e),this.data[t];if(e<=65535)return t=((t=this.index[2048+(e-55296>>5)])<<2)+(31&e),this.data[t];if(e<this.highStart)return t=2080+(e>>11),t=this.index[t],t+=e>>5&63,t=((t=this.index[t])<<2)+(31&e),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),Ste="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",jte="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Fte=0;Fte<64;Fte++)jte[Ste.charCodeAt(Fte)]=Fte;var Qte,Nte,Ute=8,Ote=9,Ite=11,Tte=12,Pte=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var r=e.length;if(!r)return"";for(var n=[],i=-1,a="";++i<r;){var o=e[i];o<=65535?n.push(o):(o-=65536,n.push(55296+(o>>10),o%1024+56320)),(i+1===r||n.length>16384)&&(a+=String.fromCharCode.apply(String,n),n.length=0)}return a},Mte=function(e){var t=function(e){var t,r,n,i,a,o=.75*e.length,s=e.length,A=0;"="===e[e.length-1]&&(o--,"="===e[e.length-2]&&o--);var l="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(o):new Array(o),c=Array.isArray(l)?l:new Uint8Array(l);for(t=0;t<s;t+=4)r=Bte[e.charCodeAt(t)],n=Bte[e.charCodeAt(t+1)],i=Bte[e.charCodeAt(t+2)],a=Bte[e.charCodeAt(t+3)],c[A++]=r<<2|n>>4,c[A++]=(15&n)<<4|i>>2,c[A++]=(3&i)<<6|63&a;return l}(e),r=Array.isArray(t)?function(e){for(var t=e.length,r=[],n=0;n<t;n+=4)r.push(e[n+3]<<24|e[n+2]<<16|e[n+1]<<8|e[n]);return r}(t):new Uint32Array(t),n=Array.isArray(t)?function(e){for(var t=e.length,r=[],n=0;n<t;n+=2)r.push(e[n+1]<<8|e[n]);return r}(t):new Uint16Array(t),i=Ete(n,12,r[4]/2),a=2===r[5]?Ete(n,(24+r[4])/2):function(e,t,r){return e.slice?e.slice(t,r):new Uint32Array(Array.prototype.slice.call(e,t,r))}(r,Math.ceil((24+r[4])/4));return new kte(r[0],r[1],r[2],r[3],i,a)}("AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA="),Dte="×",Lte=function(e){return Mte.get(e)},Hte=function(e,t,r){var n=r-2,i=t[n],a=t[r-1],o=t[r];if(2===a&&3===o)return Dte;if(2===a||3===a||4===a)return"÷";if(2===o||3===o||4===o)return"÷";if(a===Ute&&-1!==[Ute,Ote,Ite,Tte].indexOf(o))return Dte;if(!(a!==Ite&&a!==Ote||o!==Ote&&10!==o))return Dte;if((a===Tte||10===a)&&10===o)return Dte;if(13===o||5===o)return Dte;if(7===o)return Dte;if(1===a)return Dte;if(13===a&&14===o){for(;5===i;)i=t[--n];if(14===i)return Dte}if(15===a&&15===o){for(var s=0;15===i;)s++,i=t[--n];if(s%2==0)return Dte}return"÷"},_te=function(e){var t=function(e){for(var t=[],r=0,n=e.length;r<n;){var i=e.charCodeAt(r++);if(i>=55296&&i<=56319&&r<n){var a=e.charCodeAt(r++);56320==(64512&a)?t.push(((1023&i)<<10)+(1023&a)+65536):(t.push(i),r--)}else t.push(i)}return t}(e),r=t.length,n=0,i=0,a=t.map(Lte);return{next:function(){if(n>=r)return{done:!0,value:null};for(var e=Dte;n<r&&(e=Hte(0,a,++n))===Dte;);if(e!==Dte||n===r){var o=Pte.apply(null,t.slice(i,n));return i=n,{value:o,done:!1}}return{done:!0,value:null}}}},Rte=function(e){return 0===e[0]&&255===e[1]&&0===e[2]&&255===e[3]},Kte=function(e,t,r,n,i){var a="http://www.w3.org/2000/svg",o=document.createElementNS(a,"svg"),s=document.createElementNS(a,"foreignObject");return o.setAttributeNS(null,"width",e.toString()),o.setAttributeNS(null,"height",t.toString()),s.setAttributeNS(null,"width","100%"),s.setAttributeNS(null,"height","100%"),s.setAttributeNS(null,"x",r.toString()),s.setAttributeNS(null,"y",n.toString()),s.setAttributeNS(null,"externalResourcesRequired","true"),o.appendChild(s),s.appendChild(i),o},zte=function(e){return new Promise(function(t,r){var n=new Image;n.onload=function(){return t(n)},n.onerror=r,n.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(e))})},Vte={get SUPPORT_RANGE_BOUNDS(){var e=function(e){if(e.createRange){var t=e.createRange();if(t.getBoundingClientRect){var r=e.createElement("boundtest");r.style.height="123px",r.style.display="block",e.body.appendChild(r),t.selectNode(r);var n=t.getBoundingClientRect(),i=Math.round(n.height);if(e.body.removeChild(r),123===i)return!0}}return!1}(document);return Object.defineProperty(Vte,"SUPPORT_RANGE_BOUNDS",{value:e}),e},get SUPPORT_WORD_BREAKING(){var e=Vte.SUPPORT_RANGE_BOUNDS&&function(e){var t=e.createElement("boundtest");t.style.width="50px",t.style.display="block",t.style.fontSize="12px",t.style.letterSpacing="0px",t.style.wordSpacing="0px",e.body.appendChild(t);var r=e.createRange();t.innerHTML="function"==typeof"".repeat?"👨".repeat(10):"";var n=t.firstChild,i=W6(n.data).map(function(e){return G6(e)}),a=0,o={},s=i.every(function(e,t){r.setStart(n,a),r.setEnd(n,a+e.length);var i=r.getBoundingClientRect();a+=e.length;var s=i.x>o.x||i.y>o.y;return o=i,0===t||s});return e.body.removeChild(t),s}(document);return Object.defineProperty(Vte,"SUPPORT_WORD_BREAKING",{value:e}),e},get SUPPORT_SVG_DRAWING(){var e=function(e){var t=new Image,r=e.createElement("canvas"),n=r.getContext("2d");if(!n)return!1;t.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{n.drawImage(t,0,0),r.toDataURL()}catch(eX){return!1}return!0}(document);return Object.defineProperty(Vte,"SUPPORT_SVG_DRAWING",{value:e}),e},get SUPPORT_FOREIGNOBJECT_DRAWING(){var e="function"==typeof Array.from&&"function"==typeof window.fetch?function(e){var t=e.createElement("canvas"),r=100;t.width=r,t.height=r;var n=t.getContext("2d");if(!n)return Promise.reject(!1);n.fillStyle="rgb(0, 255, 0)",n.fillRect(0,0,r,r);var i=new Image,a=t.toDataURL();i.src=a;var o=Kte(r,r,0,0,i);return n.fillStyle="red",n.fillRect(0,0,r,r),zte(o).then(function(t){n.drawImage(t,0,0);var i=n.getImageData(0,0,r,r).data;n.fillStyle="red",n.fillRect(0,0,r,r);var o=e.createElement("div");return o.style.backgroundImage="url("+a+")",o.style.height=r+"px",Rte(i)?zte(Kte(r,r,0,0,o)):Promise.reject(!1)}).then(function(e){return n.drawImage(e,0,0),Rte(n.getImageData(0,0,r,r).data)}).catch(function(){return!1})}(document):Promise.resolve(!1);return Object.defineProperty(Vte,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:e}),e},get SUPPORT_CORS_IMAGES(){var e=void 0!==(new Image).crossOrigin;return Object.defineProperty(Vte,"SUPPORT_CORS_IMAGES",{value:e}),e},get SUPPORT_RESPONSE_TYPE(){var e="string"==typeof(new XMLHttpRequest).responseType;return Object.defineProperty(Vte,"SUPPORT_RESPONSE_TYPE",{value:e}),e},get SUPPORT_CORS_XHR(){var e="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Vte,"SUPPORT_CORS_XHR",{value:e}),e},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var e=!("undefined"==typeof Intl||!Intl.Segmenter);return Object.defineProperty(Vte,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:e}),e}},$te=function(){return function(e,t){this.text=e,this.bounds=t}}(),Wte=function(e,t){var r=t.ownerDocument;if(r){var n=r.createElement("html2canvaswrapper");n.appendChild(t.cloneNode(!0));var i=t.parentNode;if(i){i.replaceChild(n,t);var a=$6(e,n);return n.firstChild&&i.replaceChild(n.firstChild,n),a}}return V6.EMPTY},Gte=function(e,t,r){var n=e.ownerDocument;if(!n)throw new Error("Node has no owner document");var i=n.createRange();return i.setStart(e,t),i.setEnd(e,t+r),i},qte=function(e){if(Vte.SUPPORT_NATIVE_TEXT_SEGMENTATION){var t=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(t.segment(e)).map(function(e){return e.segment})}return function(e){for(var t,r=_te(e),n=[];!(t=r.next()).done;)t.value&&n.push(t.value.slice());return n}(e)},Yte=function(e,t){return 0!==t.letterSpacing?qte(e):function(e,t){if(Vte.SUPPORT_NATIVE_TEXT_SEGMENTATION){var r=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(r.segment(e)).map(function(e){return e.segment})}return Jte(e,t)}(e,t)},Xte=[32,160,4961,65792,65793,4153,4241],Jte=function(e,t){for(var r,n=function(e,t){var r=W6(e),n=J8(r,t),i=n[0],a=n[1],o=n[2],s=r.length,A=0,l=0;return{next:function(){if(l>=s)return{done:!0,value:null};for(var e=L8;l<s&&(e=X8(r,a,i,++l,o))===L8;);if(e!==L8||l===s){var t=new Z8(r,e,A,l);return A=l,{value:t,done:!1}}return{done:!0,value:null}}}}(e,{lineBreak:t.lineBreak,wordBreak:"break-word"===t.overflowWrap?"break-word":t.wordBreak}),i=[],a=function(){if(r.value){var e=r.value.slice(),t=W6(e),n="";t.forEach(function(e){-1===Xte.indexOf(e)?n+=G6(e):(n.length&&i.push(n),i.push(G6(e)),n="")}),n.length&&i.push(n)}};!(r=n.next()).done;)a();return i},Zte=function(){return function(e,t,r){this.text=ere(t.data,r.textTransform),this.textBounds=function(e,t,r,n){var i=Yte(t,r),a=[],o=0;return i.forEach(function(t){if(r.textDecorationLine.length||t.trim().length>0)if(Vte.SUPPORT_RANGE_BOUNDS){var i=Gte(n,o,t.length).getClientRects();if(i.length>1){var s=qte(t),A=0;s.forEach(function(t){a.push(new $te(t,V6.fromDOMRectList(e,Gte(n,A+o,t.length).getClientRects()))),A+=t.length})}else a.push(new $te(t,V6.fromDOMRectList(e,i)))}else{var l=n.splitText(t.length);a.push(new $te(t,Wte(e,n))),n=l}else Vte.SUPPORT_RANGE_BOUNDS||(n=n.splitText(t.length));o+=t.length}),a}(e,this.text,r,t)}}(),ere=function(e,t){switch(t){case 1:return e.toLowerCase();case 3:return e.replace(tre,rre);case 2:return e.toUpperCase();default:return e}},tre=/(^|\s|:|-|\(|\))([a-z])/g,rre=function(e,t,r){return e.length>0?t+r.toUpperCase():e},nre=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.src=r.currentSrc||r.src,n.intrinsicWidth=r.naturalWidth,n.intrinsicHeight=r.naturalHeight,n.context.cache.addImage(n.src),n}return H6(t,e),t}(wte),ire=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.canvas=r,n.intrinsicWidth=r.width,n.intrinsicHeight=r.height,n}return H6(t,e),t}(wte),are=function(e){function t(t,r){var n=e.call(this,t,r)||this,i=new XMLSerializer,a=$6(t,r);return r.setAttribute("width",a.width+"px"),r.setAttribute("height",a.height+"px"),n.svg="data:image/svg+xml,"+encodeURIComponent(i.serializeToString(r)),n.intrinsicWidth=r.width.baseVal.value,n.intrinsicHeight=r.height.baseVal.value,n.context.cache.addImage(n.svg),n}return H6(t,e),t}(wte),ore=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.value=r.value,n}return H6(t,e),t}(wte),sre=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.start=r.start,n.reversed="boolean"==typeof r.reversed&&!0===r.reversed,n}return H6(t,e),t}(wte),Are=[{type:15,flags:0,unit:"px",number:3}],lre=[{type:16,flags:0,number:50}],cre="checkbox",ure="radio",dre="password",hre=707406591,pre=function(e){function t(t,r){var n,i,a,o=e.call(this,t,r)||this;switch(o.type=r.type.toLowerCase(),o.checked=r.checked,o.value=0===(i=(n=r).type===dre?new Array(n.value.length+1).join("•"):n.value).length?n.placeholder||"":i,o.type!==cre&&o.type!==ure||(o.styles.backgroundColor=3739148031,o.styles.borderTopColor=o.styles.borderRightColor=o.styles.borderBottomColor=o.styles.borderLeftColor=2779096575,o.styles.borderTopWidth=o.styles.borderRightWidth=o.styles.borderBottomWidth=o.styles.borderLeftWidth=1,o.styles.borderTopStyle=o.styles.borderRightStyle=o.styles.borderBottomStyle=o.styles.borderLeftStyle=1,o.styles.backgroundClip=[0],o.styles.backgroundOrigin=[0],o.bounds=(a=o.bounds).width>a.height?new V6(a.left+(a.width-a.height)/2,a.top,a.height,a.height):a.width<a.height?new V6(a.left,a.top+(a.height-a.width)/2,a.width,a.width):a),o.type){case cre:o.styles.borderTopRightRadius=o.styles.borderTopLeftRadius=o.styles.borderBottomRightRadius=o.styles.borderBottomLeftRadius=Are;break;case ure:o.styles.borderTopRightRadius=o.styles.borderTopLeftRadius=o.styles.borderBottomRightRadius=o.styles.borderBottomLeftRadius=lre}return o}return H6(t,e),t}(wte),fre=function(e){function t(t,r){var n=e.call(this,t,r)||this,i=r.options[r.selectedIndex||0];return n.value=i&&i.text||"",n}return H6(t,e),t}(wte),mre=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.value=r.value,n}return H6(t,e),t}(wte),gre=function(e){function t(t,r){var n=e.call(this,t,r)||this;n.src=r.src,n.width=parseInt(r.width,10)||0,n.height=parseInt(r.height,10)||0,n.backgroundColor=n.styles.backgroundColor;try{if(r.contentWindow&&r.contentWindow.document&&r.contentWindow.document.documentElement){n.tree=wre(t,r.contentWindow.document.documentElement);var i=r.contentWindow.document.documentElement?p7(t,getComputedStyle(r.contentWindow.document.documentElement).backgroundColor):f7.TRANSPARENT,a=r.contentWindow.document.body?p7(t,getComputedStyle(r.contentWindow.document.body).backgroundColor):f7.TRANSPARENT;n.backgroundColor=o7(i)?o7(a)?n.styles.backgroundColor:a:i}}catch(eX){}return n}return H6(t,e),t}(wte),yre=["OL","UL","MENU"],vre=function(e,t,r,n){for(var i=t.firstChild,a=void 0;i;i=a)if(a=i.nextSibling,Cre(i)&&i.data.trim().length>0)r.textNodes.push(new Zte(e,i,r.styles));else if(Ere(i))if(Hre(i)&&i.assignedNodes)i.assignedNodes().forEach(function(t){return vre(e,t,r,n)});else{var o=xre(e,i);o.styles.isVisible()&&(bre(i,o,n)?o.flags|=4:Bre(o.styles)&&(o.flags|=2),-1!==yre.indexOf(i.tagName)&&(o.flags|=8),r.elements.push(o),i.slot,i.shadowRoot?vre(e,i.shadowRoot,o,n):Dre(i)||Nre(i)||Lre(i)||vre(e,i,o,n))}},xre=function(e,t){return Tre(t)?new nre(e,t):Ore(t)?new ire(e,t):Nre(t)?new are(e,t):jre(t)?new ore(e,t):Fre(t)?new sre(e,t):Qre(t)?new pre(e,t):Lre(t)?new fre(e,t):Dre(t)?new mre(e,t):Pre(t)?new gre(e,t):new wte(e,t)},wre=function(e,t){var r=xre(e,t);return r.flags|=4,vre(e,t,r,r),r},bre=function(e,t,r){return t.styles.isPositionedWithZIndex()||t.styles.opacity<1||t.styles.isTransformed()||Ure(e)&&r.styles.isTransparent()},Bre=function(e){return e.isPositioned()||e.isFloating()},Cre=function(e){return e.nodeType===Node.TEXT_NODE},Ere=function(e){return e.nodeType===Node.ELEMENT_NODE},kre=function(e){return Ere(e)&&void 0!==e.style&&!Sre(e)},Sre=function(e){return"object"==typeof e.className},jre=function(e){return"LI"===e.tagName},Fre=function(e){return"OL"===e.tagName},Qre=function(e){return"INPUT"===e.tagName},Nre=function(e){return"svg"===e.tagName},Ure=function(e){return"BODY"===e.tagName},Ore=function(e){return"CANVAS"===e.tagName},Ire=function(e){return"VIDEO"===e.tagName},Tre=function(e){return"IMG"===e.tagName},Pre=function(e){return"IFRAME"===e.tagName},Mre=function(e){return"STYLE"===e.tagName},Dre=function(e){return"TEXTAREA"===e.tagName},Lre=function(e){return"SELECT"===e.tagName},Hre=function(e){return"SLOT"===e.tagName},_re=function(e){return e.tagName.indexOf("-")>0},Rre=function(){function e(){this.counters={}}return e.prototype.getCounterValue=function(e){var t=this.counters[e];return t&&t.length?t[t.length-1]:1},e.prototype.getCounterValues=function(e){var t=this.counters[e];return t||[]},e.prototype.pop=function(e){var t=this;e.forEach(function(e){return t.counters[e].pop()})},e.prototype.parse=function(e){var t=this,r=e.counterIncrement,n=e.counterReset,i=!0;null!==r&&r.forEach(function(e){var r=t.counters[e.counter];r&&0!==e.increment&&(i=!1,r.length||r.push(1),r[Math.max(0,r.length-1)]+=e.increment)});var a=[];return i&&n.forEach(function(e){var r=t.counters[e.counter];a.push(e.counter),r||(r=t.counters[e.counter]=[]),r.push(e.reset)}),a},e}(),Kre={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},zre={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},Vre={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},$re={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},Wre=function(e,t,r,n,i,a){return e<t||e>r?rne(e,i,a.length>0):n.integers.reduce(function(t,r,i){for(;e>=r;)e-=r,t+=n.values[i];return t},"")+a},Gre=function(e,t,r,n){var i="";do{r||e--,i=n(e)+i,e/=t}while(e*t>=t);return i},qre=function(e,t,r,n,i){var a=r-t+1;return(e<0?"-":"")+(Gre(Math.abs(e),a,n,function(e){return G6(Math.floor(e%a)+t)})+i)},Yre=function(e,t,r){void 0===r&&(r=". ");var n=t.length;return Gre(Math.abs(e),n,!1,function(e){return t[Math.floor(e%n)]})+r},Xre=function(e,t,r,n,i,a){if(e<-9999||e>9999)return rne(e,4,i.length>0);var o=Math.abs(e),s=i;if(0===o)return t[0]+s;for(var A=0;o>0&&A<=4;A++){var l=o%10;0===l&&ate(a,1)&&""!==s?s=t[l]+s:l>1||1===l&&0===A||1===l&&1===A&&ate(a,2)||1===l&&1===A&&ate(a,4)&&e>100||1===l&&A>1&&ate(a,8)?s=t[l]+(A>0?r[A-1]:"")+s:1===l&&A>0&&(s=r[A-1]+s),o=Math.floor(o/10)}return(e<0?n:"")+s},Jre="十百千萬",Zre="拾佰仟萬",ene="マイナス",tne="마이너스",rne=function(e,t,r){var n=r?". ":"",i=r?"、":"",a=r?", ":"",o=r?" ":"";switch(t){case 0:return"•"+o;case 1:return"◦"+o;case 2:return"◾"+o;case 5:var s=qre(e,48,57,!0,n);return s.length<4?"0"+s:s;case 4:return Yre(e,"〇一二三四五六七八九",i);case 6:return Wre(e,1,3999,Kre,3,n).toLowerCase();case 7:return Wre(e,1,3999,Kre,3,n);case 8:return qre(e,945,969,!1,n);case 9:return qre(e,97,122,!1,n);case 10:return qre(e,65,90,!1,n);case 11:return qre(e,1632,1641,!0,n);case 12:case 49:return Wre(e,1,9999,zre,3,n);case 35:return Wre(e,1,9999,zre,3,n).toLowerCase();case 13:return qre(e,2534,2543,!0,n);case 14:case 30:return qre(e,6112,6121,!0,n);case 15:return Yre(e,"子丑寅卯辰巳午未申酉戌亥",i);case 16:return Yre(e,"甲乙丙丁戊己庚辛壬癸",i);case 17:case 48:return Xre(e,"零一二三四五六七八九",Jre,"負",i,14);case 47:return Xre(e,"零壹貳參肆伍陸柒捌玖",Zre,"負",i,15);case 42:return Xre(e,"零一二三四五六七八九",Jre,"负",i,14);case 41:return Xre(e,"零壹贰叁肆伍陆柒捌玖",Zre,"负",i,15);case 26:return Xre(e,"〇一二三四五六七八九","十百千万",ene,i,0);case 25:return Xre(e,"零壱弐参四伍六七八九","拾百千万",ene,i,7);case 31:return Xre(e,"영일이삼사오육칠팔구","십백천만",tne,a,7);case 33:return Xre(e,"零一二三四五六七八九","十百千萬",tne,a,0);case 32:return Xre(e,"零壹貳參四五六七八九","拾百千",tne,a,7);case 18:return qre(e,2406,2415,!0,n);case 20:return Wre(e,1,19999,$re,3,n);case 21:return qre(e,2790,2799,!0,n);case 22:return qre(e,2662,2671,!0,n);case 22:return Wre(e,1,10999,Vre,3,n);case 23:return Yre(e,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return Yre(e,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return qre(e,3302,3311,!0,n);case 28:return Yre(e,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",i);case 29:return Yre(e,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",i);case 34:return qre(e,3792,3801,!0,n);case 37:return qre(e,6160,6169,!0,n);case 38:return qre(e,4160,4169,!0,n);case 39:return qre(e,2918,2927,!0,n);case 40:return qre(e,1776,1785,!0,n);case 43:return qre(e,3046,3055,!0,n);case 44:return qre(e,3174,3183,!0,n);case 45:return qre(e,3664,3673,!0,n);case 46:return qre(e,3872,3881,!0,n);default:return qre(e,48,57,!0,n)}},nne="data-html2canvas-ignore",ine=function(){function e(e,t,r){if(this.context=e,this.options=r,this.scrolledElements=[],this.referenceElement=t,this.counters=new Rre,this.quoteDepth=0,!t.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(t.ownerDocument.documentElement,!1)}return e.prototype.toIFrame=function(e,t){var r=this,n=sne(e,t);if(!n.contentWindow)return Promise.reject("Unable to find iframe window");var i=e.defaultView.pageXOffset,a=e.defaultView.pageYOffset,o=n.contentWindow,s=o.document,A=cne(n).then(function(){return R6(r,0,void 0,function(){var e,r;return K6(this,function(i){switch(i.label){case 0:return this.scrolledElements.forEach(fne),o&&(o.scrollTo(t.left,t.top),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||o.scrollY===t.top&&o.scrollX===t.left||(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(o.scrollX-t.left,o.scrollY-t.top,0,0))),e=this.options.onclone,void 0===(r=this.clonedReferenceElement)?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:s.fonts&&s.fonts.ready?[4,s.fonts.ready]:[3,2];case 1:i.sent(),i.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,lne(s)]:[3,4];case 3:i.sent(),i.label=4;case 4:return"function"==typeof e?[2,Promise.resolve().then(function(){return e(s,r)}).then(function(){return n})]:[2,n]}})})});return s.open(),s.write(hne(document.doctype)+"<html></html>"),pne(this.referenceElement.ownerDocument,i,a),s.replaceChild(s.adoptNode(this.documentElement),s.documentElement),s.close(),A},e.prototype.createElementClone=function(e){if(xte(e,2),Ore(e))return this.createCanvasClone(e);if(Ire(e))return this.createVideoClone(e);if(Mre(e))return this.createStyleClone(e);var t=e.cloneNode(!1);return Tre(t)&&(Tre(e)&&e.currentSrc&&e.currentSrc!==e.src&&(t.src=e.currentSrc,t.srcset=""),"lazy"===t.loading&&(t.loading="eager")),_re(t)?this.createCustomElementClone(t):t},e.prototype.createCustomElementClone=function(e){var t=document.createElement("html2canvascustomelement");return dne(e.style,t),t},e.prototype.createStyleClone=function(e){try{var t=e.sheet;if(t&&t.cssRules){var r=[].slice.call(t.cssRules,0).reduce(function(e,t){return t&&"string"==typeof t.cssText?e+t.cssText:e},""),n=e.cloneNode(!1);return n.textContent=r,n}}catch(eX){if(this.context.logger.error("Unable to access cssRules property",eX),"SecurityError"!==eX.name)throw eX}return e.cloneNode(!1)},e.prototype.createCanvasClone=function(e){var t;if(this.options.inlineImages&&e.ownerDocument){var r=e.ownerDocument.createElement("img");try{return r.src=e.toDataURL(),r}catch(eX){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",e)}}var n=e.cloneNode(!1);try{n.width=e.width,n.height=e.height;var i=e.getContext("2d"),a=n.getContext("2d");if(a)if(!this.options.allowTaint&&i)a.putImageData(i.getImageData(0,0,e.width,e.height),0,0);else{var o=null!==(t=e.getContext("webgl2"))&&void 0!==t?t:e.getContext("webgl");if(o){var s=o.getContextAttributes();!1===(null==s?void 0:s.preserveDrawingBuffer)&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",e)}a.drawImage(e,0,0)}return n}catch(eX){this.context.logger.info("Unable to clone canvas as it is tainted",e)}return n},e.prototype.createVideoClone=function(e){var t=e.ownerDocument.createElement("canvas");t.width=e.offsetWidth,t.height=e.offsetHeight;var r=t.getContext("2d");try{return r&&(r.drawImage(e,0,0,t.width,t.height),this.options.allowTaint||r.getImageData(0,0,t.width,t.height)),t}catch(eX){this.context.logger.info("Unable to clone video as it is tainted",e)}var n=e.ownerDocument.createElement("canvas");return n.width=e.offsetWidth,n.height=e.offsetHeight,n},e.prototype.appendChildNode=function(e,t,r){Ere(t)&&("SCRIPT"===t.tagName||t.hasAttribute(nne)||"function"==typeof this.options.ignoreElements&&this.options.ignoreElements(t))||this.options.copyStyles&&Ere(t)&&Mre(t)||e.appendChild(this.cloneNode(t,r))},e.prototype.cloneChildNodes=function(e,t,r){for(var n=this,i=e.shadowRoot?e.shadowRoot.firstChild:e.firstChild;i;i=i.nextSibling)if(Ere(i)&&Hre(i)&&"function"==typeof i.assignedNodes){var a=i.assignedNodes();a.length&&a.forEach(function(e){return n.appendChildNode(t,e,r)})}else this.appendChildNode(t,i,r)},e.prototype.cloneNode=function(e,t){if(Cre(e))return document.createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(!1);var r=e.ownerDocument.defaultView;if(r&&Ere(e)&&(kre(e)||Sre(e))){var n=this.createElementClone(e);n.style.transitionProperty="none";var i=r.getComputedStyle(e),a=r.getComputedStyle(e,":before"),o=r.getComputedStyle(e,":after");this.referenceElement===e&&kre(n)&&(this.clonedReferenceElement=n),Ure(n)&&vne(n);var s=this.counters.parse(new yte(this.context,i)),A=this.resolvePseudoContent(e,n,a,Qte.BEFORE);_re(e)&&(t=!0),Ire(e)||this.cloneChildNodes(e,n,t),A&&n.insertBefore(A,n.firstChild);var l=this.resolvePseudoContent(e,n,o,Qte.AFTER);return l&&n.appendChild(l),this.counters.pop(s),(i&&(this.options.copyStyles||Sre(e))&&!Pre(e)||t)&&dne(i,n),0===e.scrollTop&&0===e.scrollLeft||this.scrolledElements.push([n,e.scrollLeft,e.scrollTop]),(Dre(e)||Lre(e))&&(Dre(n)||Lre(n))&&(n.value=e.value),n}return e.cloneNode(!1)},e.prototype.resolvePseudoContent=function(e,t,r,n){var i=this;if(r){var a=r.content,o=t.ownerDocument;if(o&&a&&"none"!==a&&"-moz-alt-content"!==a&&"none"!==r.display){this.counters.parse(new yte(this.context,r));var s=new gte(this.context,r),A=o.createElement("html2canvaspseudoelement");dne(r,A),s.content.forEach(function(t){if(0===t.type)A.appendChild(o.createTextNode(t.value));else if(22===t.type){var r=o.createElement("img");r.src=t.value,r.style.opacity="1",A.appendChild(r)}else if(18===t.type){if("attr"===t.name){var n=t.values.filter(D9);n.length&&A.appendChild(o.createTextNode(e.getAttribute(n[0].value)||""))}else if("counter"===t.name){var a=t.values.filter(R9),l=a[0],c=a[1];if(l&&D9(l)){var u=i.counters.getCounterValue(l.value),d=c&&D9(c)?Eee.parse(i.context,c.value):3;A.appendChild(o.createTextNode(rne(u,d,!1)))}}else if("counters"===t.name){var h=t.values.filter(R9),p=(l=h[0],h[1]);c=h[2];if(l&&D9(l)){var f=i.counters.getCounterValues(l.value),m=c&&D9(c)?Eee.parse(i.context,c.value):3,g=p&&0===p.type?p.value:"",y=f.map(function(e){return rne(e,m,!1)}).join(g);A.appendChild(o.createTextNode(y))}}}else if(20===t.type)switch(t.value){case"open-quote":A.appendChild(o.createTextNode(ute(s.quotes,i.quoteDepth++,!0)));break;case"close-quote":A.appendChild(o.createTextNode(ute(s.quotes,--i.quoteDepth,!1)));break;default:A.appendChild(o.createTextNode(t.value))}}),A.className=mne+" "+gne;var l=n===Qte.BEFORE?" "+mne:" "+gne;return Sre(t)?t.className.baseValue+=l:t.className+=l,A}}},e.destroy=function(e){return!!e.parentNode&&(e.parentNode.removeChild(e),!0)},e}();(Nte=Qte||(Qte={}))[Nte.BEFORE=0]="BEFORE",Nte[Nte.AFTER=1]="AFTER";var ane,one,sne=function(e,t){var r=e.createElement("iframe");return r.className="html2canvas-container",r.style.visibility="hidden",r.style.position="fixed",r.style.left="-10000px",r.style.top="0px",r.style.border="0",r.width=t.width.toString(),r.height=t.height.toString(),r.scrolling="no",r.setAttribute(nne,"true"),e.body.appendChild(r),r},Ane=function(e){return new Promise(function(t){e.complete?t():e.src?(e.onload=t,e.onerror=t):t()})},lne=function(e){return Promise.all([].slice.call(e.images,0).map(Ane))},cne=function(e){return new Promise(function(t,r){var n=e.contentWindow;if(!n)return r("No window assigned for iframe");var i=n.document;n.onload=e.onload=function(){n.onload=e.onload=null;var r=setInterval(function(){i.body.childNodes.length>0&&"complete"===i.readyState&&(clearInterval(r),t(e))},50)}})},une=["all","d","content"],dne=function(e,t){for(var r=e.length-1;r>=0;r--){var n=e.item(r);-1===une.indexOf(n)&&t.style.setProperty(n,e.getPropertyValue(n))}return t},hne=function(e){var t="";return e&&(t+="<!DOCTYPE ",e.name&&(t+=e.name),e.internalSubset&&(t+=e.internalSubset),e.publicId&&(t+='"'+e.publicId+'"'),e.systemId&&(t+='"'+e.systemId+'"'),t+=">"),t},pne=function(e,t,r){e&&e.defaultView&&(t!==e.defaultView.pageXOffset||r!==e.defaultView.pageYOffset)&&e.defaultView.scrollTo(t,r)},fne=function(e){var t=e[0],r=e[1],n=e[2];t.scrollLeft=r,t.scrollTop=n},mne="___html2canvas___pseudoelement_before",gne="___html2canvas___pseudoelement_after",yne='{\n content: "" !important;\n display: none !important;\n}',vne=function(e){xne(e,"."+mne+":before"+yne+"\n ."+gne+":after"+yne)},xne=function(e,t){var r=e.ownerDocument;if(r){var n=r.createElement("style");n.textContent=t,e.appendChild(n)}},wne=function(){function e(){}return e.getOrigin=function(t){var r=e._link;return r?(r.href=t,r.href=r.href,r.protocol+r.hostname+r.port):"about:blank"},e.isSameOrigin=function(t){return e.getOrigin(t)===e._origin},e.setContext=function(t){e._link=t.document.createElement("a"),e._origin=e.getOrigin(t.location.href)},e._origin="about:blank",e}(),bne=function(){function e(e,t){this.context=e,this._options=t,this._cache={}}return e.prototype.addImage=function(e){var t=Promise.resolve();return this.has(e)?t:Fne(e)||kne(e)?((this._cache[e]=this.loadImage(e)).catch(function(){}),t):t},e.prototype.match=function(e){return this._cache[e]},e.prototype.loadImage=function(e){return R6(this,0,void 0,function(){var t,r,n,i,a=this;return K6(this,function(o){switch(o.label){case 0:return t=wne.isSameOrigin(e),r=!Sne(e)&&!0===this._options.useCORS&&Vte.SUPPORT_CORS_IMAGES&&!t,n=!Sne(e)&&!t&&!Fne(e)&&"string"==typeof this._options.proxy&&Vte.SUPPORT_CORS_XHR&&!r,t||!1!==this._options.allowTaint||Sne(e)||Fne(e)||n||r?(i=e,n?[4,this.proxy(i)]:[3,2]):[2];case 1:i=o.sent(),o.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise(function(e,t){var n=new Image;n.onload=function(){return e(n)},n.onerror=t,(jne(i)||r)&&(n.crossOrigin="anonymous"),n.src=i,!0===n.complete&&setTimeout(function(){return e(n)},500),a._options.imageTimeout>0&&setTimeout(function(){return t("Timed out ("+a._options.imageTimeout+"ms) loading image")},a._options.imageTimeout)})];case 3:return[2,o.sent()]}})})},e.prototype.has=function(e){return void 0!==this._cache[e]},e.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},e.prototype.proxy=function(e){var t=this,r=this._options.proxy;if(!r)throw new Error("No proxy defined");var n=e.substring(0,256);return new Promise(function(i,a){var o=Vte.SUPPORT_RESPONSE_TYPE?"blob":"text",s=new XMLHttpRequest;s.onload=function(){if(200===s.status)if("text"===o)i(s.response);else{var e=new FileReader;e.addEventListener("load",function(){return i(e.result)},!1),e.addEventListener("error",function(e){return a(e)},!1),e.readAsDataURL(s.response)}else a("Failed to proxy resource "+n+" with status code "+s.status)},s.onerror=a;var A=r.indexOf("?")>-1?"&":"?";if(s.open("GET",""+r+A+"url="+encodeURIComponent(e)+"&responseType="+o),"text"!==o&&s instanceof XMLHttpRequest&&(s.responseType=o),t._options.imageTimeout){var l=t._options.imageTimeout;s.timeout=l,s.ontimeout=function(){return a("Timed out ("+l+"ms) proxying "+n)}}s.send()})},e}(),Bne=/^data:image\/svg\+xml/i,Cne=/^data:image\/.*;base64,/i,Ene=/^data:image\/.*/i,kne=function(e){return Vte.SUPPORT_SVG_DRAWING||!Qne(e)},Sne=function(e){return Ene.test(e)},jne=function(e){return Cne.test(e)},Fne=function(e){return"blob"===e.substr(0,4)},Qne=function(e){return"svg"===e.substr(-3).toLowerCase()||Bne.test(e)},Nne=function(){function e(e,t){this.type=0,this.x=e,this.y=t}return e.prototype.add=function(t,r){return new e(this.x+t,this.y+r)},e}(),Une=function(e,t,r){return new Nne(e.x+(t.x-e.x)*r,e.y+(t.y-e.y)*r)},One=function(){function e(e,t,r,n){this.type=1,this.start=e,this.startControl=t,this.endControl=r,this.end=n}return e.prototype.subdivide=function(t,r){var n=Une(this.start,this.startControl,t),i=Une(this.startControl,this.endControl,t),a=Une(this.endControl,this.end,t),o=Une(n,i,t),s=Une(i,a,t),A=Une(o,s,t);return r?new e(this.start,n,o,A):new e(A,s,a,this.end)},e.prototype.add=function(t,r){return new e(this.start.add(t,r),this.startControl.add(t,r),this.endControl.add(t,r),this.end.add(t,r))},e.prototype.reverse=function(){return new e(this.end,this.endControl,this.startControl,this.start)},e}(),Ine=function(e){return 1===e.type},Tne=function(){return function(e){var t=e.styles,r=e.bounds,n=X9(t.borderTopLeftRadius,r.width,r.height),i=n[0],a=n[1],o=X9(t.borderTopRightRadius,r.width,r.height),s=o[0],A=o[1],l=X9(t.borderBottomRightRadius,r.width,r.height),c=l[0],u=l[1],d=X9(t.borderBottomLeftRadius,r.width,r.height),h=d[0],p=d[1],f=[];f.push((i+s)/r.width),f.push((h+c)/r.width),f.push((a+p)/r.height),f.push((A+u)/r.height);var m=Math.max.apply(Math,f);m>1&&(i/=m,a/=m,s/=m,A/=m,c/=m,u/=m,h/=m,p/=m);var g=r.width-s,y=r.height-u,v=r.width-c,x=r.height-p,w=t.borderTopWidth,b=t.borderRightWidth,B=t.borderBottomWidth,C=t.borderLeftWidth,E=J9(t.paddingTop,e.bounds.width),k=J9(t.paddingRight,e.bounds.width),S=J9(t.paddingBottom,e.bounds.width),j=J9(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=i>0||a>0?Pne(r.left+C/3,r.top+w/3,i-C/3,a-w/3,ane.TOP_LEFT):new Nne(r.left+C/3,r.top+w/3),this.topRightBorderDoubleOuterBox=i>0||a>0?Pne(r.left+g,r.top+w/3,s-b/3,A-w/3,ane.TOP_RIGHT):new Nne(r.left+r.width-b/3,r.top+w/3),this.bottomRightBorderDoubleOuterBox=c>0||u>0?Pne(r.left+v,r.top+y,c-b/3,u-B/3,ane.BOTTOM_RIGHT):new Nne(r.left+r.width-b/3,r.top+r.height-B/3),this.bottomLeftBorderDoubleOuterBox=h>0||p>0?Pne(r.left+C/3,r.top+x,h-C/3,p-B/3,ane.BOTTOM_LEFT):new Nne(r.left+C/3,r.top+r.height-B/3),this.topLeftBorderDoubleInnerBox=i>0||a>0?Pne(r.left+2*C/3,r.top+2*w/3,i-2*C/3,a-2*w/3,ane.TOP_LEFT):new Nne(r.left+2*C/3,r.top+2*w/3),this.topRightBorderDoubleInnerBox=i>0||a>0?Pne(r.left+g,r.top+2*w/3,s-2*b/3,A-2*w/3,ane.TOP_RIGHT):new Nne(r.left+r.width-2*b/3,r.top+2*w/3),this.bottomRightBorderDoubleInnerBox=c>0||u>0?Pne(r.left+v,r.top+y,c-2*b/3,u-2*B/3,ane.BOTTOM_RIGHT):new Nne(r.left+r.width-2*b/3,r.top+r.height-2*B/3),this.bottomLeftBorderDoubleInnerBox=h>0||p>0?Pne(r.left+2*C/3,r.top+x,h-2*C/3,p-2*B/3,ane.BOTTOM_LEFT):new Nne(r.left+2*C/3,r.top+r.height-2*B/3),this.topLeftBorderStroke=i>0||a>0?Pne(r.left+C/2,r.top+w/2,i-C/2,a-w/2,ane.TOP_LEFT):new Nne(r.left+C/2,r.top+w/2),this.topRightBorderStroke=i>0||a>0?Pne(r.left+g,r.top+w/2,s-b/2,A-w/2,ane.TOP_RIGHT):new Nne(r.left+r.width-b/2,r.top+w/2),this.bottomRightBorderStroke=c>0||u>0?Pne(r.left+v,r.top+y,c-b/2,u-B/2,ane.BOTTOM_RIGHT):new Nne(r.left+r.width-b/2,r.top+r.height-B/2),this.bottomLeftBorderStroke=h>0||p>0?Pne(r.left+C/2,r.top+x,h-C/2,p-B/2,ane.BOTTOM_LEFT):new Nne(r.left+C/2,r.top+r.height-B/2),this.topLeftBorderBox=i>0||a>0?Pne(r.left,r.top,i,a,ane.TOP_LEFT):new Nne(r.left,r.top),this.topRightBorderBox=s>0||A>0?Pne(r.left+g,r.top,s,A,ane.TOP_RIGHT):new Nne(r.left+r.width,r.top),this.bottomRightBorderBox=c>0||u>0?Pne(r.left+v,r.top+y,c,u,ane.BOTTOM_RIGHT):new Nne(r.left+r.width,r.top+r.height),this.bottomLeftBorderBox=h>0||p>0?Pne(r.left,r.top+x,h,p,ane.BOTTOM_LEFT):new Nne(r.left,r.top+r.height),this.topLeftPaddingBox=i>0||a>0?Pne(r.left+C,r.top+w,Math.max(0,i-C),Math.max(0,a-w),ane.TOP_LEFT):new Nne(r.left+C,r.top+w),this.topRightPaddingBox=s>0||A>0?Pne(r.left+Math.min(g,r.width-b),r.top+w,g>r.width+b?0:Math.max(0,s-b),Math.max(0,A-w),ane.TOP_RIGHT):new Nne(r.left+r.width-b,r.top+w),this.bottomRightPaddingBox=c>0||u>0?Pne(r.left+Math.min(v,r.width-C),r.top+Math.min(y,r.height-B),Math.max(0,c-b),Math.max(0,u-B),ane.BOTTOM_RIGHT):new Nne(r.left+r.width-b,r.top+r.height-B),this.bottomLeftPaddingBox=h>0||p>0?Pne(r.left+C,r.top+Math.min(x,r.height-B),Math.max(0,h-C),Math.max(0,p-B),ane.BOTTOM_LEFT):new Nne(r.left+C,r.top+r.height-B),this.topLeftContentBox=i>0||a>0?Pne(r.left+C+j,r.top+w+E,Math.max(0,i-(C+j)),Math.max(0,a-(w+E)),ane.TOP_LEFT):new Nne(r.left+C+j,r.top+w+E),this.topRightContentBox=s>0||A>0?Pne(r.left+Math.min(g,r.width+C+j),r.top+w+E,g>r.width+C+j?0:s-C+j,A-(w+E),ane.TOP_RIGHT):new Nne(r.left+r.width-(b+k),r.top+w+E),this.bottomRightContentBox=c>0||u>0?Pne(r.left+Math.min(v,r.width-(C+j)),r.top+Math.min(y,r.height+w+E),Math.max(0,c-(b+k)),u-(B+S),ane.BOTTOM_RIGHT):new Nne(r.left+r.width-(b+k),r.top+r.height-(B+S)),this.bottomLeftContentBox=h>0||p>0?Pne(r.left+C+j,r.top+x,Math.max(0,h-(C+j)),p-(B+S),ane.BOTTOM_LEFT):new Nne(r.left+C+j,r.top+r.height-(B+S))}}();(one=ane||(ane={}))[one.TOP_LEFT=0]="TOP_LEFT",one[one.TOP_RIGHT=1]="TOP_RIGHT",one[one.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",one[one.BOTTOM_LEFT=3]="BOTTOM_LEFT";var Pne=function(e,t,r,n,i){var a=(Math.sqrt(2)-1)/3*4,o=r*a,s=n*a,A=e+r,l=t+n;switch(i){case ane.TOP_LEFT:return new One(new Nne(e,l),new Nne(e,l-s),new Nne(A-o,t),new Nne(A,t));case ane.TOP_RIGHT:return new One(new Nne(e,t),new Nne(e+o,t),new Nne(A,l-s),new Nne(A,l));case ane.BOTTOM_RIGHT:return new One(new Nne(A,t),new Nne(A,t+s),new Nne(e+o,l),new Nne(e,l));case ane.BOTTOM_LEFT:default:return new One(new Nne(A,l),new Nne(A-o,l),new Nne(e,t+s),new Nne(e,t))}},Mne=function(e){return[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox]},Dne=function(e){return[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox]},Lne=function(){return function(e,t,r){this.offsetX=e,this.offsetY=t,this.matrix=r,this.type=0,this.target=6}}(),Hne=function(){return function(e,t){this.path=e,this.target=t,this.type=1}}(),_ne=function(){return function(e){this.opacity=e,this.type=2,this.target=6}}(),Rne=function(e){return 1===e.type},Kne=function(e,t){return e.length===t.length&&e.some(function(e,r){return e===t[r]})},zne=function(){return function(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}}(),Vne=function(){function e(e,t){if(this.container=e,this.parent=t,this.effects=[],this.curves=new Tne(this.container),this.container.styles.opacity<1&&this.effects.push(new _ne(this.container.styles.opacity)),null!==this.container.styles.transform){var r=this.container.bounds.left+this.container.styles.transformOrigin[0].number,n=this.container.bounds.top+this.container.styles.transformOrigin[1].number,i=this.container.styles.transform;this.effects.push(new Lne(r,n,i))}if(0!==this.container.styles.overflowX){var a=Mne(this.curves),o=Dne(this.curves);Kne(a,o)?this.effects.push(new Hne(a,6)):(this.effects.push(new Hne(a,2)),this.effects.push(new Hne(o,4)))}}return e.prototype.getEffects=function(e){for(var t=-1===[2,3].indexOf(this.container.styles.position),r=this.parent,n=this.effects.slice(0);r;){var i=r.effects.filter(function(e){return!Rne(e)});if(t||0!==r.container.styles.position||!r.parent){if(n.unshift.apply(n,i),t=-1===[2,3].indexOf(r.container.styles.position),0!==r.container.styles.overflowX){var a=Mne(r.curves),o=Dne(r.curves);Kne(a,o)||n.unshift(new Hne(o,6))}}else n.unshift.apply(n,i);r=r.parent}return n.filter(function(t){return ate(t.target,e)})},e}(),$ne=function(e,t,r,n){e.container.elements.forEach(function(i){var a=ate(i.flags,4),o=ate(i.flags,2),s=new Vne(i,e);ate(i.styles.display,2048)&&n.push(s);var A=ate(i.flags,8)?[]:n;if(a||o){var l=a||i.styles.isPositioned()?r:t,c=new zne(s);if(i.styles.isPositioned()||i.styles.opacity<1||i.styles.isTransformed()){var u=i.styles.zIndex.order;if(u<0){var d=0;l.negativeZIndex.some(function(e,t){return u>e.element.container.styles.zIndex.order?(d=t,!1):d>0}),l.negativeZIndex.splice(d,0,c)}else if(u>0){var h=0;l.positiveZIndex.some(function(e,t){return u>=e.element.container.styles.zIndex.order?(h=t+1,!1):h>0}),l.positiveZIndex.splice(h,0,c)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(c)}else i.styles.isFloating()?l.nonPositionedFloats.push(c):l.nonPositionedInlineLevel.push(c);$ne(s,c,a?c:r,A)}else i.styles.isInlineLevel()?t.inlineLevel.push(s):t.nonInlineLevel.push(s),$ne(s,t,r,A);ate(i.flags,8)&&Wne(i,A)})},Wne=function(e,t){for(var r=e instanceof sre?e.start:1,n=e instanceof sre&&e.reversed,i=0;i<t.length;i++){var a=t[i];a.container instanceof ore&&"number"==typeof a.container.value&&0!==a.container.value&&(r=a.container.value),a.listValue=rne(r,a.container.styles.listStyleType,!0),r+=n?-1:1}},Gne=function(e,t){switch(t){case 0:return Yne(e.topLeftBorderBox,e.topLeftPaddingBox,e.topRightBorderBox,e.topRightPaddingBox);case 1:return Yne(e.topRightBorderBox,e.topRightPaddingBox,e.bottomRightBorderBox,e.bottomRightPaddingBox);case 2:return Yne(e.bottomRightBorderBox,e.bottomRightPaddingBox,e.bottomLeftBorderBox,e.bottomLeftPaddingBox);default:return Yne(e.bottomLeftBorderBox,e.bottomLeftPaddingBox,e.topLeftBorderBox,e.topLeftPaddingBox)}},qne=function(e,t){var r=[];return Ine(e)?r.push(e.subdivide(.5,!1)):r.push(e),Ine(t)?r.push(t.subdivide(.5,!0)):r.push(t),r},Yne=function(e,t,r,n){var i=[];return Ine(e)?i.push(e.subdivide(.5,!1)):i.push(e),Ine(r)?i.push(r.subdivide(.5,!0)):i.push(r),Ine(n)?i.push(n.subdivide(.5,!0).reverse()):i.push(n),Ine(t)?i.push(t.subdivide(.5,!1).reverse()):i.push(t),i},Xne=function(e){var t=e.bounds,r=e.styles;return t.add(r.borderLeftWidth,r.borderTopWidth,-(r.borderRightWidth+r.borderLeftWidth),-(r.borderTopWidth+r.borderBottomWidth))},Jne=function(e){var t=e.styles,r=e.bounds,n=J9(t.paddingLeft,r.width),i=J9(t.paddingRight,r.width),a=J9(t.paddingTop,r.width),o=J9(t.paddingBottom,r.width);return r.add(n+t.borderLeftWidth,a+t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth+n+i),-(t.borderTopWidth+t.borderBottomWidth+a+o))},Zne=function(e,t,r){var n,i,a=(n=nie(e.styles.backgroundOrigin,t),i=e,0===n?i.bounds:2===n?Jne(i):Xne(i)),o=function(e,t){return 0===e?t.bounds:2===e?Jne(t):Xne(t)}(nie(e.styles.backgroundClip,t),e),s=rie(nie(e.styles.backgroundSize,t),r,a),A=s[0],l=s[1],c=X9(nie(e.styles.backgroundPosition,t),a.width-A,a.height-l);return[iie(nie(e.styles.backgroundRepeat,t),c,s,a,o),Math.round(a.left+c[0]),Math.round(a.top+c[1]),A,l]},eie=function(e){return D9(e)&&e.value===I7.AUTO},tie=function(e){return"number"==typeof e},rie=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=e[0],s=e[1];if(!o)return[0,0];if($9(o)&&s&&$9(s))return[J9(o,r.width),J9(s,r.height)];var A=tie(a);if(D9(o)&&(o.value===I7.CONTAIN||o.value===I7.COVER))return tie(a)?r.width/r.height<a!=(o.value===I7.COVER)?[r.width,r.width/a]:[r.height*a,r.height]:[r.width,r.height];var l=tie(n),c=tie(i),u=l||c;if(eie(o)&&(!s||eie(s)))return l&&c?[n,i]:A||u?u&&A?[l?n:i*a,c?i:n/a]:[l?n:r.width,c?i:r.height]:[r.width,r.height];if(A){var d=0,h=0;return $9(o)?d=J9(o,r.width):$9(s)&&(h=J9(s,r.height)),eie(o)?d=h*a:s&&!eie(s)||(h=d/a),[d,h]}var p=null,f=null;if($9(o)?p=J9(o,r.width):s&&$9(s)&&(f=J9(s,r.height)),null===p||s&&!eie(s)||(f=l&&c?p/n*i:r.height),null!==f&&eie(o)&&(p=l&&c?f/i*n:r.width),null!==p&&null!==f)return[p,f];throw new Error("Unable to calculate background-size for element")},nie=function(e,t){var r=e[t];return void 0===r?e[0]:r},iie=function(e,t,r,n,i){var a=t[0],o=t[1],s=r[0],A=r[1];switch(e){case 2:return[new Nne(Math.round(n.left),Math.round(n.top+o)),new Nne(Math.round(n.left+n.width),Math.round(n.top+o)),new Nne(Math.round(n.left+n.width),Math.round(A+n.top+o)),new Nne(Math.round(n.left),Math.round(A+n.top+o))];case 3:return[new Nne(Math.round(n.left+a),Math.round(n.top)),new Nne(Math.round(n.left+a+s),Math.round(n.top)),new Nne(Math.round(n.left+a+s),Math.round(n.height+n.top)),new Nne(Math.round(n.left+a),Math.round(n.height+n.top))];case 1:return[new Nne(Math.round(n.left+a),Math.round(n.top+o)),new Nne(Math.round(n.left+a+s),Math.round(n.top+o)),new Nne(Math.round(n.left+a+s),Math.round(n.top+o+A)),new Nne(Math.round(n.left+a),Math.round(n.top+o+A))];default:return[new Nne(Math.round(i.left),Math.round(i.top)),new Nne(Math.round(i.left+i.width),Math.round(i.top)),new Nne(Math.round(i.left+i.width),Math.round(i.height+i.top)),new Nne(Math.round(i.left),Math.round(i.height+i.top))]}},aie="Hidden Text",oie=function(){function e(e){this._data={},this._document=e}return e.prototype.parseMetrics=function(e,t){var r=this._document.createElement("div"),n=this._document.createElement("img"),i=this._document.createElement("span"),a=this._document.body;r.style.visibility="hidden",r.style.fontFamily=e,r.style.fontSize=t,r.style.margin="0",r.style.padding="0",r.style.whiteSpace="nowrap",a.appendChild(r),n.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",n.width=1,n.height=1,n.style.margin="0",n.style.padding="0",n.style.verticalAlign="baseline",i.style.fontFamily=e,i.style.fontSize=t,i.style.margin="0",i.style.padding="0",i.appendChild(this._document.createTextNode(aie)),r.appendChild(i),r.appendChild(n);var o=n.offsetTop-i.offsetTop+2;r.removeChild(i),r.appendChild(this._document.createTextNode(aie)),r.style.lineHeight="normal",n.style.verticalAlign="super";var s=n.offsetTop-r.offsetTop+2;return a.removeChild(r),{baseline:o,middle:s}},e.prototype.getMetrics=function(e,t){var r=e+" "+t;return void 0===this._data[r]&&(this._data[r]=this.parseMetrics(e,t)),this._data[r]},e}(),sie=function(){return function(e,t){this.context=e,this.options=t}}(),Aie=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n._activeEffects=[],n.canvas=r.canvas?r.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),r.canvas||(n.canvas.width=Math.floor(r.width*r.scale),n.canvas.height=Math.floor(r.height*r.scale),n.canvas.style.width=r.width+"px",n.canvas.style.height=r.height+"px"),n.fontMetrics=new oie(document),n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-r.x,-r.y),n.ctx.textBaseline="bottom",n._activeEffects=[],n.context.logger.debug("Canvas renderer initialized ("+r.width+"x"+r.height+") with scale "+r.scale),n}return H6(t,e),t.prototype.applyEffects=function(e){for(var t=this;this._activeEffects.length;)this.popEffect();e.forEach(function(e){return t.applyEffect(e)})},t.prototype.applyEffect=function(e){this.ctx.save(),function(e){return 2===e.type}(e)&&(this.ctx.globalAlpha=e.opacity),function(e){return 0===e.type}(e)&&(this.ctx.translate(e.offsetX,e.offsetY),this.ctx.transform(e.matrix[0],e.matrix[1],e.matrix[2],e.matrix[3],e.matrix[4],e.matrix[5]),this.ctx.translate(-e.offsetX,-e.offsetY)),Rne(e)&&(this.path(e.path),this.ctx.clip()),this._activeEffects.push(e)},t.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},t.prototype.renderStack=function(e){return R6(this,0,void 0,function(){return K6(this,function(t){switch(t.label){case 0:return e.element.container.styles.isVisible()?[4,this.renderStackContent(e)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})})},t.prototype.renderNode=function(e){return R6(this,0,void 0,function(){return K6(this,function(t){switch(t.label){case 0:return ate(e.container.flags,16),e.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(e)]:[3,3];case 1:return t.sent(),[4,this.renderNodeContent(e)];case 2:t.sent(),t.label=3;case 3:return[2]}})})},t.prototype.renderTextWithLetterSpacing=function(e,t,r){var n=this;0===t?this.ctx.fillText(e.text,e.bounds.left,e.bounds.top+r):qte(e.text).reduce(function(t,i){return n.ctx.fillText(i,t,e.bounds.top+r),t+n.ctx.measureText(i).width},e.bounds.left)},t.prototype.createFontStyle=function(e){var t=e.fontVariant.filter(function(e){return"normal"===e||"small-caps"===e}).join(""),r=hie(e.fontFamily).join(", "),n=P9(e.fontSize)?""+e.fontSize.number+e.fontSize.unit:e.fontSize.number+"px";return[[e.fontStyle,t,e.fontWeight,n,r].join(" "),r,n]},t.prototype.renderTextNode=function(e,t){return R6(this,0,void 0,function(){var r,n,i,a,o,s,A,l,c=this;return K6(this,function(u){return r=this.createFontStyle(t),n=r[0],i=r[1],a=r[2],this.ctx.font=n,this.ctx.direction=1===t.direction?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",o=this.fontMetrics.getMetrics(i,a),s=o.baseline,A=o.middle,l=t.paintOrder,e.textBounds.forEach(function(e){l.forEach(function(r){switch(r){case 0:c.ctx.fillStyle=s7(t.color),c.renderTextWithLetterSpacing(e,t.letterSpacing,s);var n=t.textShadow;n.length&&e.text.trim().length&&(n.slice(0).reverse().forEach(function(r){c.ctx.shadowColor=s7(r.color),c.ctx.shadowOffsetX=r.offsetX.number*c.options.scale,c.ctx.shadowOffsetY=r.offsetY.number*c.options.scale,c.ctx.shadowBlur=r.blur.number,c.renderTextWithLetterSpacing(e,t.letterSpacing,s)}),c.ctx.shadowColor="",c.ctx.shadowOffsetX=0,c.ctx.shadowOffsetY=0,c.ctx.shadowBlur=0),t.textDecorationLine.length&&(c.ctx.fillStyle=s7(t.textDecorationColor||t.color),t.textDecorationLine.forEach(function(t){switch(t){case 1:c.ctx.fillRect(e.bounds.left,Math.round(e.bounds.top+s),e.bounds.width,1);break;case 2:c.ctx.fillRect(e.bounds.left,Math.round(e.bounds.top),e.bounds.width,1);break;case 3:c.ctx.fillRect(e.bounds.left,Math.ceil(e.bounds.top+A),e.bounds.width,1)}}));break;case 1:t.webkitTextStrokeWidth&&e.text.trim().length&&(c.ctx.strokeStyle=s7(t.webkitTextStrokeColor),c.ctx.lineWidth=t.webkitTextStrokeWidth,c.ctx.lineJoin=window.chrome?"miter":"round",c.ctx.strokeText(e.text,e.bounds.left,e.bounds.top+s)),c.ctx.strokeStyle="",c.ctx.lineWidth=0,c.ctx.lineJoin="miter"}})}),[2]})})},t.prototype.renderReplacedElement=function(e,t,r){if(r&&e.intrinsicWidth>0&&e.intrinsicHeight>0){var n=Jne(e),i=Dne(t);this.path(i),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(r,0,0,e.intrinsicWidth,e.intrinsicHeight,n.left,n.top,n.width,n.height),this.ctx.restore()}},t.prototype.renderNodeContent=function(e){return R6(this,0,void 0,function(){var r,n,i,a,o,s,A,l,c,u,d,h,p,f,m,g,y,v;return K6(this,function(x){switch(x.label){case 0:this.applyEffects(e.getEffects(4)),r=e.container,n=e.curves,i=r.styles,a=0,o=r.textNodes,x.label=1;case 1:return a<o.length?(s=o[a],[4,this.renderTextNode(s,i)]):[3,4];case 2:x.sent(),x.label=3;case 3:return a++,[3,1];case 4:if(!(r instanceof nre))return[3,8];x.label=5;case 5:return x.trys.push([5,7,,8]),[4,this.context.cache.match(r.src)];case 6:return m=x.sent(),this.renderReplacedElement(r,n,m),[3,8];case 7:return x.sent(),this.context.logger.error("Error loading image "+r.src),[3,8];case 8:if(r instanceof ire&&this.renderReplacedElement(r,n,r.canvas),!(r instanceof are))return[3,12];x.label=9;case 9:return x.trys.push([9,11,,12]),[4,this.context.cache.match(r.svg)];case 10:return m=x.sent(),this.renderReplacedElement(r,n,m),[3,12];case 11:return x.sent(),this.context.logger.error("Error loading svg "+r.svg.substring(0,255)),[3,12];case 12:return r instanceof gre&&r.tree?[4,new t(this.context,{scale:this.options.scale,backgroundColor:r.backgroundColor,x:0,y:0,width:r.width,height:r.height}).render(r.tree)]:[3,14];case 13:A=x.sent(),r.width&&r.height&&this.ctx.drawImage(A,0,0,r.width,r.height,r.bounds.left,r.bounds.top,r.bounds.width,r.bounds.height),x.label=14;case 14:if(r instanceof pre&&(l=Math.min(r.bounds.width,r.bounds.height),r.type===cre?r.checked&&(this.ctx.save(),this.path([new Nne(r.bounds.left+.39363*l,r.bounds.top+.79*l),new Nne(r.bounds.left+.16*l,r.bounds.top+.5549*l),new Nne(r.bounds.left+.27347*l,r.bounds.top+.44071*l),new Nne(r.bounds.left+.39694*l,r.bounds.top+.5649*l),new Nne(r.bounds.left+.72983*l,r.bounds.top+.23*l),new Nne(r.bounds.left+.84*l,r.bounds.top+.34085*l),new Nne(r.bounds.left+.39363*l,r.bounds.top+.79*l)]),this.ctx.fillStyle=s7(hre),this.ctx.fill(),this.ctx.restore()):r.type===ure&&r.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(r.bounds.left+l/2,r.bounds.top+l/2,l/4,0,2*Math.PI,!0),this.ctx.fillStyle=s7(hre),this.ctx.fill(),this.ctx.restore())),lie(r)&&r.value.length){switch(c=this.createFontStyle(i),y=c[0],u=c[1],d=this.fontMetrics.getMetrics(y,u).baseline,this.ctx.font=y,this.ctx.fillStyle=s7(i.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=uie(r.styles.textAlign),v=Jne(r),h=0,r.styles.textAlign){case 1:h+=v.width/2;break;case 2:h+=v.width}p=v.add(h,0,0,-v.height/2+1),this.ctx.save(),this.path([new Nne(v.left,v.top),new Nne(v.left+v.width,v.top),new Nne(v.left+v.width,v.top+v.height),new Nne(v.left,v.top+v.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new $te(r.value,p),i.letterSpacing,d),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!ate(r.styles.display,2048))return[3,20];if(null===r.styles.listStyleImage)return[3,19];if(0!==(f=r.styles.listStyleImage).type)return[3,18];m=void 0,g=f.url,x.label=15;case 15:return x.trys.push([15,17,,18]),[4,this.context.cache.match(g)];case 16:return m=x.sent(),this.ctx.drawImage(m,r.bounds.left-(m.width+10),r.bounds.top),[3,18];case 17:return x.sent(),this.context.logger.error("Error loading list-style-image "+g),[3,18];case 18:return[3,20];case 19:e.listValue&&-1!==r.styles.listStyleType&&(y=this.createFontStyle(i)[0],this.ctx.font=y,this.ctx.fillStyle=s7(i.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",v=new V6(r.bounds.left,r.bounds.top+J9(r.styles.paddingTop,r.bounds.width),r.bounds.width,bee(i.lineHeight,i.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new $te(e.listValue,v),i.letterSpacing,bee(i.lineHeight,i.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),x.label=20;case 20:return[2]}})})},t.prototype.renderStackContent=function(e){return R6(this,0,void 0,function(){var t,r,n,i,a,o,s,A,l,c,u,d,h,p,f;return K6(this,function(m){switch(m.label){case 0:return ate(e.element.container.flags,16),[4,this.renderNodeBackgroundAndBorders(e.element)];case 1:m.sent(),t=0,r=e.negativeZIndex,m.label=2;case 2:return t<r.length?(f=r[t],[4,this.renderStack(f)]):[3,5];case 3:m.sent(),m.label=4;case 4:return t++,[3,2];case 5:return[4,this.renderNodeContent(e.element)];case 6:m.sent(),n=0,i=e.nonInlineLevel,m.label=7;case 7:return n<i.length?(f=i[n],[4,this.renderNode(f)]):[3,10];case 8:m.sent(),m.label=9;case 9:return n++,[3,7];case 10:a=0,o=e.nonPositionedFloats,m.label=11;case 11:return a<o.length?(f=o[a],[4,this.renderStack(f)]):[3,14];case 12:m.sent(),m.label=13;case 13:return a++,[3,11];case 14:s=0,A=e.nonPositionedInlineLevel,m.label=15;case 15:return s<A.length?(f=A[s],[4,this.renderStack(f)]):[3,18];case 16:m.sent(),m.label=17;case 17:return s++,[3,15];case 18:l=0,c=e.inlineLevel,m.label=19;case 19:return l<c.length?(f=c[l],[4,this.renderNode(f)]):[3,22];case 20:m.sent(),m.label=21;case 21:return l++,[3,19];case 22:u=0,d=e.zeroOrAutoZIndexOrTransformedOrOpacity,m.label=23;case 23:return u<d.length?(f=d[u],[4,this.renderStack(f)]):[3,26];case 24:m.sent(),m.label=25;case 25:return u++,[3,23];case 26:h=0,p=e.positiveZIndex,m.label=27;case 27:return h<p.length?(f=p[h],[4,this.renderStack(f)]):[3,30];case 28:m.sent(),m.label=29;case 29:return h++,[3,27];case 30:return[2]}})})},t.prototype.mask=function(e){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(e.slice(0).reverse()),this.ctx.closePath()},t.prototype.path=function(e){this.ctx.beginPath(),this.formatPath(e),this.ctx.closePath()},t.prototype.formatPath=function(e){var t=this;e.forEach(function(e,r){var n=Ine(e)?e.start:e;0===r?t.ctx.moveTo(n.x,n.y):t.ctx.lineTo(n.x,n.y),Ine(e)&&t.ctx.bezierCurveTo(e.startControl.x,e.startControl.y,e.endControl.x,e.endControl.y,e.end.x,e.end.y)})},t.prototype.renderRepeat=function(e,t,r,n){this.path(e),this.ctx.fillStyle=t,this.ctx.translate(r,n),this.ctx.fill(),this.ctx.translate(-r,-n)},t.prototype.resizeImage=function(e,t,r){var n;if(e.width===t&&e.height===r)return e;var i=(null!==(n=this.canvas.ownerDocument)&&void 0!==n?n:document).createElement("canvas");return i.width=Math.max(1,t),i.height=Math.max(1,r),i.getContext("2d").drawImage(e,0,0,e.width,e.height,0,0,t,r),i},t.prototype.renderBackgroundImage=function(e){return R6(this,0,void 0,function(){var t,r,n,i,a,o;return K6(this,function(s){switch(s.label){case 0:t=e.styles.backgroundImage.length-1,r=function(r){var i,a,o,s,A,l,c,u,d,h,p,f,m,g,y,v,x,w,b,B,C,E,k,S,j,F,Q,N,U,O,I;return K6(this,function(T){switch(T.label){case 0:if(0!==r.type)return[3,5];i=void 0,a=r.url,T.label=1;case 1:return T.trys.push([1,3,,4]),[4,n.context.cache.match(a)];case 2:return i=T.sent(),[3,4];case 3:return T.sent(),n.context.logger.error("Error loading background-image "+a),[3,4];case 4:return i&&(o=Zne(e,t,[i.width,i.height,i.width/i.height]),v=o[0],E=o[1],k=o[2],b=o[3],B=o[4],g=n.ctx.createPattern(n.resizeImage(i,b,B),"repeat"),n.renderRepeat(v,g,E,k)),[3,6];case 5:1===r.type?(s=Zne(e,t,[null,null,null]),v=s[0],E=s[1],k=s[2],b=s[3],B=s[4],A=x7(r.angle,b,B),l=A[0],c=A[1],u=A[2],d=A[3],h=A[4],(p=document.createElement("canvas")).width=b,p.height=B,f=p.getContext("2d"),m=f.createLinearGradient(c,d,u,h),v7(r.stops,l).forEach(function(e){return m.addColorStop(e.stop,s7(e.color))}),f.fillStyle=m,f.fillRect(0,0,b,B),b>0&&B>0&&(g=n.ctx.createPattern(p,"repeat"),n.renderRepeat(v,g,E,k))):function(e){return 2===e.type}(r)&&(y=Zne(e,t,[null,null,null]),v=y[0],x=y[1],w=y[2],b=y[3],B=y[4],C=0===r.position.length?[q9]:r.position,E=J9(C[0],b),k=J9(C[C.length-1],B),S=function(e,t,r,n,i){var a=0,o=0;switch(e.size){case 0:0===e.shape?a=o=Math.min(Math.abs(t),Math.abs(t-n),Math.abs(r),Math.abs(r-i)):1===e.shape&&(a=Math.min(Math.abs(t),Math.abs(t-n)),o=Math.min(Math.abs(r),Math.abs(r-i)));break;case 2:if(0===e.shape)a=o=Math.min(w7(t,r),w7(t,r-i),w7(t-n,r),w7(t-n,r-i));else if(1===e.shape){var s=Math.min(Math.abs(r),Math.abs(r-i))/Math.min(Math.abs(t),Math.abs(t-n)),A=b7(n,i,t,r,!0),l=A[0],c=A[1];o=s*(a=w7(l-t,(c-r)/s))}break;case 1:0===e.shape?a=o=Math.max(Math.abs(t),Math.abs(t-n),Math.abs(r),Math.abs(r-i)):1===e.shape&&(a=Math.max(Math.abs(t),Math.abs(t-n)),o=Math.max(Math.abs(r),Math.abs(r-i)));break;case 3:if(0===e.shape)a=o=Math.max(w7(t,r),w7(t,r-i),w7(t-n,r),w7(t-n,r-i));else if(1===e.shape){s=Math.max(Math.abs(r),Math.abs(r-i))/Math.max(Math.abs(t),Math.abs(t-n));var u=b7(n,i,t,r,!1);l=u[0],c=u[1],o=s*(a=w7(l-t,(c-r)/s))}}return Array.isArray(e.size)&&(a=J9(e.size[0],n),o=2===e.size.length?J9(e.size[1],i):a),[a,o]}(r,E,k,b,B),j=S[0],F=S[1],j>0&&F>0&&(Q=n.ctx.createRadialGradient(x+E,w+k,0,x+E,w+k,j),v7(r.stops,2*j).forEach(function(e){return Q.addColorStop(e.stop,s7(e.color))}),n.path(v),n.ctx.fillStyle=Q,j!==F?(N=e.bounds.left+.5*e.bounds.width,U=e.bounds.top+.5*e.bounds.height,I=1/(O=F/j),n.ctx.save(),n.ctx.translate(N,U),n.ctx.transform(1,0,0,O,0,0),n.ctx.translate(-N,-U),n.ctx.fillRect(x,I*(w-U)+U,b,B*I),n.ctx.restore()):n.ctx.fill())),T.label=6;case 6:return t--,[2]}})},n=this,i=0,a=e.styles.backgroundImage.slice(0).reverse(),s.label=1;case 1:return i<a.length?(o=a[i],[5,r(o)]):[3,4];case 2:s.sent(),s.label=3;case 3:return i++,[3,1];case 4:return[2]}})})},t.prototype.renderSolidBorder=function(e,t,r){return R6(this,0,void 0,function(){return K6(this,function(n){return this.path(Gne(r,t)),this.ctx.fillStyle=s7(e),this.ctx.fill(),[2]})})},t.prototype.renderDoubleBorder=function(e,t,r,n){return R6(this,0,void 0,function(){var i,a;return K6(this,function(o){switch(o.label){case 0:return t<3?[4,this.renderSolidBorder(e,r,n)]:[3,2];case 1:return o.sent(),[2];case 2:return i=function(e,t){switch(t){case 0:return Yne(e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox,e.topRightBorderBox,e.topRightBorderDoubleOuterBox);case 1:return Yne(e.topRightBorderBox,e.topRightBorderDoubleOuterBox,e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox);case 2:return Yne(e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox,e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox);default:return Yne(e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox,e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox)}}(n,r),this.path(i),this.ctx.fillStyle=s7(e),this.ctx.fill(),a=function(e,t){switch(t){case 0:return Yne(e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox,e.topRightBorderDoubleInnerBox,e.topRightPaddingBox);case 1:return Yne(e.topRightBorderDoubleInnerBox,e.topRightPaddingBox,e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox);case 2:return Yne(e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox,e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox);default:return Yne(e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox,e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox)}}(n,r),this.path(a),this.ctx.fill(),[2]}})})},t.prototype.renderNodeBackgroundAndBorders=function(e){return R6(this,0,void 0,function(){var t,r,n,i,a,o,s,A,l=this;return K6(this,function(c){switch(c.label){case 0:return this.applyEffects(e.getEffects(2)),t=e.container.styles,r=!o7(t.backgroundColor)||t.backgroundImage.length,n=[{style:t.borderTopStyle,color:t.borderTopColor,width:t.borderTopWidth},{style:t.borderRightStyle,color:t.borderRightColor,width:t.borderRightWidth},{style:t.borderBottomStyle,color:t.borderBottomColor,width:t.borderBottomWidth},{style:t.borderLeftStyle,color:t.borderLeftColor,width:t.borderLeftWidth}],i=cie(nie(t.backgroundClip,0),e.curves),r||t.boxShadow.length?(this.ctx.save(),this.path(i),this.ctx.clip(),o7(t.backgroundColor)||(this.ctx.fillStyle=s7(t.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(e.container)]):[3,2];case 1:c.sent(),this.ctx.restore(),t.boxShadow.slice(0).reverse().forEach(function(t){l.ctx.save();var r,n,i,a,o,s=Mne(e.curves),A=t.inset?0:1e4,c=(r=s,n=-A+(t.inset?1:-1)*t.spread.number,i=(t.inset?1:-1)*t.spread.number,a=t.spread.number*(t.inset?-2:2),o=t.spread.number*(t.inset?-2:2),r.map(function(e,t){switch(t){case 0:return e.add(n,i);case 1:return e.add(n+a,i);case 2:return e.add(n+a,i+o);case 3:return e.add(n,i+o)}return e}));t.inset?(l.path(s),l.ctx.clip(),l.mask(c)):(l.mask(s),l.ctx.clip(),l.path(c)),l.ctx.shadowOffsetX=t.offsetX.number+A,l.ctx.shadowOffsetY=t.offsetY.number,l.ctx.shadowColor=s7(t.color),l.ctx.shadowBlur=t.blur.number,l.ctx.fillStyle=t.inset?s7(t.color):"rgba(0,0,0,1)",l.ctx.fill(),l.ctx.restore()}),c.label=2;case 2:a=0,o=0,s=n,c.label=3;case 3:return o<s.length?0!==(A=s[o]).style&&!o7(A.color)&&A.width>0?2!==A.style?[3,5]:[4,this.renderDashedDottedBorder(A.color,A.width,a,e.curves,2)]:[3,11]:[3,13];case 4:return c.sent(),[3,11];case 5:return 3!==A.style?[3,7]:[4,this.renderDashedDottedBorder(A.color,A.width,a,e.curves,3)];case 6:return c.sent(),[3,11];case 7:return 4!==A.style?[3,9]:[4,this.renderDoubleBorder(A.color,A.width,a,e.curves)];case 8:return c.sent(),[3,11];case 9:return[4,this.renderSolidBorder(A.color,a,e.curves)];case 10:c.sent(),c.label=11;case 11:a++,c.label=12;case 12:return o++,[3,3];case 13:return[2]}})})},t.prototype.renderDashedDottedBorder=function(e,t,r,n,i){return R6(this,0,void 0,function(){var a,o,s,A,l,c,u,d,h,p,f,m,g,y,v,x;return K6(this,function(w){return this.ctx.save(),a=function(e,t){switch(t){case 0:return qne(e.topLeftBorderStroke,e.topRightBorderStroke);case 1:return qne(e.topRightBorderStroke,e.bottomRightBorderStroke);case 2:return qne(e.bottomRightBorderStroke,e.bottomLeftBorderStroke);default:return qne(e.bottomLeftBorderStroke,e.topLeftBorderStroke)}}(n,r),o=Gne(n,r),2===i&&(this.path(o),this.ctx.clip()),Ine(o[0])?(s=o[0].start.x,A=o[0].start.y):(s=o[0].x,A=o[0].y),Ine(o[1])?(l=o[1].end.x,c=o[1].end.y):(l=o[1].x,c=o[1].y),u=0===r||2===r?Math.abs(s-l):Math.abs(A-c),this.ctx.beginPath(),3===i?this.formatPath(a):this.formatPath(o.slice(0,2)),d=t<3?3*t:2*t,h=t<3?2*t:t,3===i&&(d=t,h=t),p=!0,u<=2*d?p=!1:u<=2*d+h?(d*=f=u/(2*d+h),h*=f):(m=Math.floor((u+h)/(d+h)),g=(u-m*d)/(m-1),h=(y=(u-(m+1)*d)/m)<=0||Math.abs(h-g)<Math.abs(h-y)?g:y),p&&(3===i?this.ctx.setLineDash([0,d+h]):this.ctx.setLineDash([d,h])),3===i?(this.ctx.lineCap="round",this.ctx.lineWidth=t):this.ctx.lineWidth=2*t+1.1,this.ctx.strokeStyle=s7(e),this.ctx.stroke(),this.ctx.setLineDash([]),2===i&&(Ine(o[0])&&(v=o[3],x=o[0],this.ctx.beginPath(),this.formatPath([new Nne(v.end.x,v.end.y),new Nne(x.start.x,x.start.y)]),this.ctx.stroke()),Ine(o[1])&&(v=o[1],x=o[2],this.ctx.beginPath(),this.formatPath([new Nne(v.end.x,v.end.y),new Nne(x.start.x,x.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},t.prototype.render=function(e){return R6(this,0,void 0,function(){var t;return K6(this,function(r){switch(r.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=s7(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),n=new Vne(e,null),i=new zne(n),$ne(n,i,i,a=[]),Wne(n.container,a),t=i,[4,this.renderStack(t)];case 1:return r.sent(),this.applyEffects([]),[2,this.canvas]}var n,i,a})})},t}(sie),lie=function(e){return e instanceof mre||(e instanceof fre||e instanceof pre&&e.type!==ure&&e.type!==cre)},cie=function(e,t){switch(e){case 0:return Mne(t);case 2:return function(e){return[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox]}(t);default:return Dne(t)}},uie=function(e){switch(e){case 1:return"center";case 2:return"right";default:return"left"}},die=["-apple-system","system-ui"],hie=function(e){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?e.filter(function(e){return-1===die.indexOf(e)}):e},pie=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.canvas=r.canvas?r.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),n.options=r,n.canvas.width=Math.floor(r.width*r.scale),n.canvas.height=Math.floor(r.height*r.scale),n.canvas.style.width=r.width+"px",n.canvas.style.height=r.height+"px",n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-r.x,-r.y),n.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+r.width+"x"+r.height+" at "+r.x+","+r.y+") with scale "+r.scale),n}return H6(t,e),t.prototype.render=function(e){return R6(this,0,void 0,function(){var t,r;return K6(this,function(n){switch(n.label){case 0:return t=Kte(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,e),[4,fie(t)];case 1:return r=n.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=s7(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(r,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},t}(sie),fie=function(e){return new Promise(function(t,r){var n=new Image;n.onload=function(){t(n)},n.onerror=r,n.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(e))})},mie=function(){function e(e){var t=e.id,r=e.enabled;this.id=t,this.enabled=r,this.start=Date.now()}return e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.debug?console.debug.apply(console,z6([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},e.prototype.getTime=function(){return Date.now()-this.start},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&"undefined"!=typeof window&&window.console&&"function"==typeof console.info&&console.info.apply(console,z6([this.id,this.getTime()+"ms"],e))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.warn?console.warn.apply(console,z6([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.error?console.error.apply(console,z6([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},e.instances={},e}(),gie=function(){function e(t,r){var n;this.windowBounds=r,this.instanceName="#"+e.instanceCount++,this.logger=new mie({id:this.instanceName,enabled:t.logging}),this.cache=null!==(n=t.cache)&&void 0!==n?n:new bne(this,t)}return e.instanceCount=1,e}();"undefined"!=typeof window&&wne.setContext(window);var yie=function(e,t){return R6(void 0,0,void 0,function(){var r,n,i,a,o,s,A,l,c,u,d,h,p,f,m,g,y,v,x,w,b,B,C,E,k,S,j,F,Q,N,U,O,I,T,P,M,D,L;return K6(this,function(H){switch(H.label){case 0:if(!e||"object"!=typeof e)return[2,Promise.reject("Invalid element provided as first argument")];if(!(r=e.ownerDocument))throw new Error("Element is not attached to a Document");if(!(n=r.defaultView))throw new Error("Document is not attached to a Window");return i={allowTaint:null!==(B=t.allowTaint)&&void 0!==B&&B,imageTimeout:null!==(C=t.imageTimeout)&&void 0!==C?C:15e3,proxy:t.proxy,useCORS:null!==(E=t.useCORS)&&void 0!==E&&E},a=_6({logging:null===(k=t.logging)||void 0===k||k,cache:t.cache},i),o={windowWidth:null!==(S=t.windowWidth)&&void 0!==S?S:n.innerWidth,windowHeight:null!==(j=t.windowHeight)&&void 0!==j?j:n.innerHeight,scrollX:null!==(F=t.scrollX)&&void 0!==F?F:n.pageXOffset,scrollY:null!==(Q=t.scrollY)&&void 0!==Q?Q:n.pageYOffset},s=new V6(o.scrollX,o.scrollY,o.windowWidth,o.windowHeight),A=new gie(a,s),l=null!==(N=t.foreignObjectRendering)&&void 0!==N&&N,c={allowTaint:null!==(U=t.allowTaint)&&void 0!==U&&U,onclone:t.onclone,ignoreElements:t.ignoreElements,inlineImages:l,copyStyles:l},A.logger.debug("Starting document clone with size "+s.width+"x"+s.height+" scrolled to "+-s.left+","+-s.top),u=new ine(A,e,c),(d=u.clonedReferenceElement)?[4,u.toIFrame(r,s)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return h=H.sent(),p=Ure(d)||"HTML"===d.tagName?function(e){var t=e.body,r=e.documentElement;if(!t||!r)throw new Error("Unable to get document size");var n=Math.max(Math.max(t.scrollWidth,r.scrollWidth),Math.max(t.offsetWidth,r.offsetWidth),Math.max(t.clientWidth,r.clientWidth)),i=Math.max(Math.max(t.scrollHeight,r.scrollHeight),Math.max(t.offsetHeight,r.offsetHeight),Math.max(t.clientHeight,r.clientHeight));return new V6(0,0,n,i)}(d.ownerDocument):$6(A,d),f=p.width,m=p.height,g=p.left,y=p.top,v=vie(A,d,t.backgroundColor),x={canvas:t.canvas,backgroundColor:v,scale:null!==(I=null!==(O=t.scale)&&void 0!==O?O:n.devicePixelRatio)&&void 0!==I?I:1,x:(null!==(T=t.x)&&void 0!==T?T:0)+g,y:(null!==(P=t.y)&&void 0!==P?P:0)+y,width:null!==(M=t.width)&&void 0!==M?M:Math.ceil(f),height:null!==(D=t.height)&&void 0!==D?D:Math.ceil(m)},l?(A.logger.debug("Document cloned, using foreign object rendering"),[4,new pie(A,x).render(d)]):[3,3];case 2:return w=H.sent(),[3,5];case 3:return A.logger.debug("Document cloned, element located at "+g+","+y+" with size "+f+"x"+m+" using computed rendering"),A.logger.debug("Starting DOM parsing"),b=wre(A,d),v===b.styles.backgroundColor&&(b.styles.backgroundColor=f7.TRANSPARENT),A.logger.debug("Starting renderer for element at "+x.x+","+x.y+" with size "+x.width+"x"+x.height),[4,new Aie(A,x).render(b)];case 4:w=H.sent(),H.label=5;case 5:return(null===(L=t.removeContainer)||void 0===L||L)&&(ine.destroy(h)||A.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),A.logger.debug("Finished rendering"),[2,w]}})})},vie=function(e,t,r){var n=t.ownerDocument,i=n.documentElement?p7(e,getComputedStyle(n.documentElement).backgroundColor):f7.TRANSPARENT,a=n.body?p7(e,getComputedStyle(n.body).backgroundColor):f7.TRANSPARENT,o="string"==typeof r?p7(e,r):null===r?f7.TRANSPARENT:4294967295;return t===n.documentElement?o7(i)?o7(a)?o:a:i:o};const xie=["#3b82f6","#8b5cf6","#06b6d4","#10b981","#f59e0b","#ef4444","#ec4899","#6366f1","#14b8a6","#f97316","#84cc16","#a855f7","#0ea5e9","#22c55e","#eab308"];function wie(e,t=0){return 0===t?e:xie[t%xie.length]}function bie(e){return Math.abs(e)>=1e6?`${(e/1e6).toFixed(1)}M`:Math.abs(e)>=1e3?`${(e/1e3).toFixed(1)}K`:e.toLocaleString()}function Bie({active:e,payload:t,label:r,xLabel:n,yLabel:i}){return e&&(null==t?void 0:t.length)?Ie.jsxs("div",{className:"bg-white px-3 py-2 rounded-lg shadow-lg border border-gray-100 text-xs max-w-[220px]",style:{zIndex:50},children:[Ie.jsxs("p",{className:"font-medium text-gray-700 truncate mb-0.5",children:[n,": ",Ie.jsx("span",{className:"text-gray-900",children:r})]}),t.map((e,t)=>{var r;return Ie.jsxs("p",{className:"text-gray-600",style:{color:e.color},children:[i,": ",Ie.jsx("span",{className:"font-semibold",children:null==(r=e.value)?void 0:r.toLocaleString()})]},t)})]}):null}function Cie({active:e,payload:t}){var r,n;if(!e||!(null==t?void 0:t.length))return null;const i=t[0];return Ie.jsxs("div",{className:"bg-white px-3 py-2 rounded-lg shadow-lg border border-gray-100 text-xs",style:{zIndex:50},children:[Ie.jsx("p",{className:"font-medium text-gray-700",children:i.name}),Ie.jsxs("p",{className:"text-gray-600",children:["Value: ",Ie.jsx("span",{className:"font-semibold",children:null==(r=i.value)?void 0:r.toLocaleString()})]}),Ie.jsxs("p",{className:"text-gray-400",children:[(100*((null==(n=i.payload)?void 0:n.percent)??0)).toFixed(1),"%"]})]})}function Eie({type:e,color:t}){const r="w-3.5 h-3.5",n={color:t};switch(e){case"serial_data_line":return Ie.jsx(hm,{className:r,style:n});case"serial_data_scatter":return Ie.jsx(Yp,{className:r,style:n});case"pie_chart_data":return Ie.jsx(Af,{className:r,style:n});default:return Ie.jsx(sf,{className:r,style:n})}}function kie({onClick:e,title:t,disabled:r,children:n}){return Ie.jsx("button",{onClick:e,disabled:r,title:t,className:"p-1 rounded-md transition-all duration-150 "+(r?"text-gray-300 cursor-not-allowed":"text-gray-500 hover:text-gray-700 hover:bg-gray-200/60 active:scale-95"),children:n})}const Sie=30;const jie=Te.memo(function({serialData:e,responseType:t,primaryColor:r}){var n,i,a;const o=Te.useRef(null),[s,A]=Te.useState(!1),l=Te.useMemo(()=>{var r;if("serial_data_line"===t)return"line";if("serial_data_scatter"===t)return"scatter";if("pie_chart_data"===t)return"pie";if("serial_data_bar"===t)return"bar";const n=null==(r=e.graph_type)?void 0:r.toLowerCase();return"line"===n?"line":"scatter"===n?"scatter":"pie"===n?"pie":"bar"},[t,e.graph_type]),c=Te.useMemo(()=>{const t=e.data.x||[],r=e.data.y||[];return t.map((e,t)=>({name:e,value:r[t]??0}))},[e]),u=c.length,d="pie"===l,h=Math.min(29,u-1),[p,f]=Te.useState(0),[m,g]=Te.useState(h),y=m-p+1,v=Te.useCallback(e=>{e&&"number"==typeof e.startIndex&&"number"==typeof e.endIndex&&(f(e.startIndex),g(e.endIndex))},[]),x=Te.useCallback(()=>{const e=Math.floor((p+m)/2),t=Math.max(Math.floor(y/4),Math.floor(2.5)),r=Math.max(0,e-t),n=Math.min(u-1,e+t);n-r+1>=5&&(f(r),g(n))},[p,m,y,u]),w=Te.useCallback(()=>{const e=Math.floor((p+m)/2),t=Math.min(y,Math.floor(u/2)),r=Math.max(0,e-t),n=Math.min(u-1,e+t);f(r),g(n)},[p,m,y,u]),b=Te.useCallback(()=>{f(0),g(u-1)},[u]),B=Te.useCallback(()=>{f(0),g(Math.min(29,u-1))},[u]),C=Math.max(1,Math.floor(y/3)),E=Te.useCallback(()=>{const e=Math.min(C,p);e>0&&(f(p-e),g(m-e))},[C,p,m]),k=Te.useCallback(()=>{const e=Math.min(C,u-1-m);e>0&&(f(p+e),g(m+e))},[C,p,m,u]),S=Te.useCallback(async()=>{if(o.current&&!s){A(!0);try{const r=await(e=o.current,t={backgroundColor:"#ffffff",scale:2,logging:!1,useCORS:!0},void 0===t&&(t={}),yie(e,t)),n=document.createElement("a");n.download=`chart-${Date.now()}.png`,n.href=r.toDataURL("image/png"),n.click()}catch(r){console.error("PNG export failed:",r)}finally{A(!1)}var e,t}},[s]),j=Te.useMemo(()=>{if(!d)return[];const e=[...c].sort((e,t)=>t.value-e.value);if(e.length<=15)return e;return[...e.slice(0,14),{name:"Other",value:e.slice(14).reduce((e,t)=>e+t.value,0)}]},[d,c]),F=(null==(n=e.legends)?void 0:n.title)||"Chart",Q=(null==(i=e.legends)?void 0:i.x)||"X",N=(null==(a=e.legends)?void 0:a.y)||"Y",U={dataKey:"name",tick:{fontSize:9,fill:"#9ca3af"},tickLine:!1,axisLine:{stroke:"#e5e7eb"},interval:Math.max(0,Math.floor(y/10)),angle:-35,textAnchor:"end",height:45},O={tick:{fontSize:9,fill:"#9ca3af"},tickLine:!1,axisLine:{stroke:"#e5e7eb"},tickFormatter:bie,width:48},I=!d&&u>Sie,T=y>5,P=y<u,M=p>0,D=m<u-1,L=0===p&&m===u-1;return Ie.jsxs("div",{className:"mt-3 bg-white rounded-xl border border-gray-200 overflow-hidden shadow-sm",ref:o,children:[Ie.jsxs("div",{className:"flex items-center justify-between px-3 pt-2.5 pb-1",children:[Ie.jsxs("p",{className:"text-xs font-semibold text-gray-700 flex items-center gap-1.5 min-w-0",children:[Ie.jsx(Eie,{type:t,color:r}),Ie.jsx("span",{className:"truncate",children:F})]}),Ie.jsxs("div",{className:"flex items-center gap-0.5 flex-shrink-0",children:[!d&&Ie.jsxs(Ie.Fragment,{children:[Ie.jsx(kie,{onClick:x,title:"Zoom in",disabled:!T,children:Ie.jsx(Cm,{className:"w-3.5 h-3.5"})}),Ie.jsx(kie,{onClick:w,title:"Zoom out",disabled:!P,children:Ie.jsx(Em,{className:"w-3.5 h-3.5"})}),Ie.jsx(kie,{onClick:L?B:b,title:L?"Fit view":"Reset zoom",children:L?Ie.jsx(Df,{className:"w-3.5 h-3.5"}):Ie.jsx(Zf,{className:"w-3.5 h-3.5"})}),Ie.jsx("div",{className:"w-px h-3.5 bg-gray-200 mx-0.5"})]}),!d&&u>Sie&&Ie.jsxs(Ie.Fragment,{children:[Ie.jsx(kie,{onClick:E,title:"Pan left",disabled:!M,children:Ie.jsx(uf,{className:"w-3.5 h-3.5"})}),Ie.jsx(kie,{onClick:k,title:"Pan right",disabled:!D,children:Ie.jsx(df,{className:"w-3.5 h-3.5"})}),Ie.jsx("div",{className:"w-px h-3.5 bg-gray-200 mx-0.5"})]}),Ie.jsx(kie,{onClick:S,title:"Save as PNG",disabled:s,children:Ie.jsx(of,{className:"w-3.5 h-3.5"})})]})]}),!d&&Ie.jsxs("div",{className:"px-3 pb-1 flex items-center gap-2",children:[Ie.jsxs("span",{className:"text-[10px] text-gray-400",children:["Showing ",p+1,"–",m+1," of ",u]}),!d&&u>Sie&&Ie.jsx("span",{className:"text-[10px] text-gray-300",children:"|"}),!d&&u>Sie&&Ie.jsx("span",{className:"text-[10px] text-gray-400",children:"Drag brush below to scroll"})]}),Ie.jsx("div",{className:"px-1",style:{width:"100%",height:d?260:I?280:240},children:Ie.jsx(aP,{width:"100%",height:"100%",children:"bar"===l?Ie.jsxs(E6,{data:c,margin:{top:8,right:12,bottom:4,left:0},children:[Ie.jsx(v2,{strokeDasharray:"3 3",stroke:"#f3f4f6",vertical:!1}),Ie.jsx(A3,{...U}),Ie.jsx(w3,{...O}),Ie.jsx(MY,{content:Ie.jsx(Bie,{xLabel:Q,yLabel:N})}),Ie.jsx(v5,{dataKey:"value",fill:r,radius:[3,3,0,0],maxBarSize:28,animationDuration:400}),I&&Ie.jsx(k1,{dataKey:"name",height:22,stroke:r,fill:"#f9fafb",travellerWidth:8,startIndex:p,endIndex:m,onChange:v,tickFormatter:()=>""})]}):"line"===l?Ie.jsxs(B6,{data:c,margin:{top:8,right:12,bottom:4,left:0},children:[Ie.jsx(v2,{strokeDasharray:"3 3",stroke:"#f3f4f6",vertical:!1}),Ie.jsx(A3,{...U}),Ie.jsx(w3,{...O}),Ie.jsx(MY,{content:Ie.jsx(Bie,{xLabel:Q,yLabel:N})}),Ie.jsx(S4,{type:"monotone",dataKey:"value",stroke:r,strokeWidth:2,dot:y<=50&&{fill:r,r:2,strokeWidth:0},activeDot:{r:5,fill:r,stroke:"#fff",strokeWidth:2},animationDuration:400}),I&&Ie.jsx(k1,{dataKey:"name",height:22,stroke:r,fill:"#f9fafb",travellerWidth:8,startIndex:p,endIndex:m,onChange:v,tickFormatter:()=>""})]}):"scatter"===l?Ie.jsxs(D6,{margin:{top:8,right:12,bottom:4,left:0},children:[Ie.jsx(v2,{strokeDasharray:"3 3",stroke:"#f3f4f6",vertical:!1}),Ie.jsx(A3,{...U}),Ie.jsx(w3,{dataKey:"value",name:N,...O}),Ie.jsx(MY,{content:Ie.jsx(Bie,{xLabel:Q,yLabel:N})}),Ie.jsx(z5,{data:c.slice(p,m+1),fill:r,fillOpacity:.7,animationDuration:400})]}):Ie.jsxs(P6,{children:[Ie.jsx(MY,{content:Ie.jsx(Cie,{})}),Ie.jsx(h0,{data:j,dataKey:"value",nameKey:"name",cx:"50%",cy:"45%",outerRadius:85,innerRadius:40,paddingAngle:2,animationDuration:500,label:({name:e,percent:t})=>`${(null==e?void 0:e.length)>12?e.slice(0,12)+"…":e} ${(100*t).toFixed(0)}%`,labelLine:{stroke:"#d1d5db",strokeWidth:1},children:j.map((e,t)=>Ie.jsx(DY,{fill:wie(r,t),stroke:"#fff",strokeWidth:1.5},t))}),Ie.jsx(CM,{wrapperStyle:{fontSize:10,color:"#6b7280",paddingTop:4},iconSize:8,iconType:"circle"})]})})}),Ie.jsx("div",{className:"flex items-center justify-between px-3 pb-2 pt-0.5",children:d?Ie.jsxs("div",{className:"text-[10px] text-gray-400",children:[u," items"]}):Ie.jsxs("div",{className:"flex gap-3 text-[10px] text-gray-400",children:[Ie.jsxs("span",{children:["X: ",Q]}),Ie.jsxs("span",{children:["Y: ",N]})]})})]})});jie.displayName="ChartRenderer";const Fie=[{label:"Parsing your request",icon:nf,duration:1400},{label:"Inferring your intent",icon:tm,duration:1800},{label:"Locating relevant data",icon:wf,duration:2200},{label:"Constructing the query",icon:im,duration:1600},{label:"Running validations",icon:Uf,duration:2e3},{label:"Compiling the results",icon:Yf,duration:1800},{label:"Presenting your insights",icon:sm,duration:2e3}];function Qie({primaryColor:e}){const[t,r]=Te.useState(0),n=Te.useRef(null);Te.useEffect(()=>{const e=()=>{r(t=>{const r=t+1;return r>=Fie.length?t:(n.current=setTimeout(e,Fie[r].duration),r)})};return n.current=setTimeout(e,Fie[0].duration),()=>{n.current&&clearTimeout(n.current)}},[]);const i=Te.useMemo(()=>Math.min((t+1)/Fie.length*100,100),[t]),a=Fie[t],o=a.icon;return Ie.jsxs("div",{className:"py-1",children:[Ie.jsx(hl,{mode:"wait",children:Ie.jsxs(ch.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0,y:-8},transition:{duration:.25,ease:"easeOut"},className:"flex items-center gap-2",children:[Ie.jsxs("div",{className:"relative flex-shrink-0 w-[18px] h-[18px]",children:[Ie.jsx(ch.div,{className:"absolute inset-[-4px] rounded-full",style:{background:`${e}10`},animate:{scale:[1,1.8,1],opacity:[.4,0,.4]},transition:{duration:2,repeat:1/0,ease:"easeInOut"}}),Ie.jsxs("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",className:"block",children:[Ie.jsx("circle",{cx:"9",cy:"9",r:"7.5",stroke:`${e}20`,strokeWidth:"2"}),Ie.jsx(ch.circle,{cx:"9",cy:"9",r:"7.5",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"32 15",fill:"none",animate:{rotate:360},transition:{duration:1,repeat:1/0,ease:"linear"},style:{transformOrigin:"center"}})]})]}),Ie.jsx(o,{className:"w-3.5 h-3.5 flex-shrink-0",style:{color:e}}),Ie.jsx("span",{className:"text-[13px] text-gray-600 font-medium leading-snug",children:a.label}),Ie.jsx("span",{className:"inline-flex gap-[2px] ml-0.5 flex-shrink-0",children:[0,1,2].map(t=>Ie.jsx(ch.span,{className:"block w-[3px] h-[3px] rounded-full",style:{background:e},animate:{opacity:[.15,.8,.15]},transition:{duration:.9,repeat:1/0,delay:.18*t,ease:"easeInOut"}},t))})]},t)}),Ie.jsxs("div",{className:"flex items-center gap-2 mt-2.5",children:[Ie.jsx("div",{className:"flex-1 h-[2px] rounded-full bg-gray-100 overflow-hidden",children:Ie.jsx(ch.div,{className:"h-full rounded-full",style:{background:`linear-gradient(90deg, ${e}, ${e}bb)`},initial:{width:"0%"},animate:{width:`${i}%`},transition:{duration:.5,ease:"easeOut"}})}),Ie.jsxs("span",{className:"text-[10px] font-medium tabular-nums text-gray-400",children:[t+1,"/",Fie.length]})]})]})}const Nie=new Set(["serial_data","serial_data_bar","serial_data_line","serial_data_scatter","pie_chart_data"]);function Uie({url:e}){return Ie.jsx("div",{className:"mt-2 rounded-xl overflow-hidden border border-gray-100",children:Ie.jsx("img",{src:e,alt:"Agent response",className:"w-full h-auto max-h-64 object-contain bg-gray-50"})})}function Oie({label:e,value:t}){return Ie.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] text-gray-400 bg-gray-50 px-1.5 py-0.5 rounded",children:[Ie.jsx(bf,{className:"w-2.5 h-2.5"}),e,": ",t]})}function Iie({sql:e,primaryColor:t}){const[r,n]=Te.useState(!1);return Ie.jsxs(ch.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.2},className:"mt-2 rounded-lg border border-gray-200 overflow-hidden",children:[Ie.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 bg-gray-50 border-b border-gray-100",children:[Ie.jsxs("span",{className:"text-[10px] font-medium text-gray-500 flex items-center gap-1",children:[Ie.jsx(vf,{className:"w-3 h-3"}),"Generated SQL"]}),Ie.jsxs("button",{onClick:async()=>{try{await navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),2e3)}catch(t){console.error("Failed to copy SQL:",t)}},className:"text-[10px] text-gray-400 hover:text-gray-600 flex items-center gap-0.5 transition-colors",children:[r?Ie.jsx(lf,{className:"w-3 h-3 text-green-500"}):Ie.jsx(xf,{className:"w-3 h-3"}),r?"Copied":"Copy"]})]}),Ie.jsx("pre",{className:"px-3 py-2 text-[11px] text-gray-700 bg-gray-50/50 overflow-x-auto whitespace-pre-wrap break-all font-mono leading-relaxed",children:e})]})}function Tie({onClick:e,title:t,active:r,activeClass:n,children:i}){return Ie.jsx("button",{onClick:e,className:`p-1.5 rounded-lg transition-all duration-200 ${r?n||"bg-blue-100 text-blue-600":"text-gray-400 hover:text-gray-600 hover:bg-gray-100"}`,title:t,children:i})}const Pie=Te.memo(function({message:e,onFeedback:t,primaryColor:r}){var n,i,a;const[o,s]=Te.useState(!1),[A,l]=Te.useState(!1),c="user"===e.role,u=e.isLoading,d=!c&&e.serialData&&e.responseType&&Nie.has(e.responseType),h=!c&&e.imageUrl&&"image_png"===e.responseType,p=!c&&!!e.generatedSql,f=!c&&!!(null==(a=null==(i=null==(n=e.serialData)?void 0:n.data)?void 0:i.x)?void 0:a.length),m=c?null:e.metaData,g=e.timestamp?function(e){try{return new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}catch{return""}}(e.timestamp):"";return Ie.jsxs(ch.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},className:"flex gap-3 "+(c?"flex-row-reverse":"flex-row"),children:[Ie.jsx("div",{className:"flex-shrink-0 w-9 h-9 rounded-xl flex items-center justify-center shadow-sm "+(c?"bg-gradient-to-br from-gray-100 to-gray-200":""),style:c?void 0:{background:`linear-gradient(135deg, ${r}20, ${r}35)`},children:c?Ie.jsx(gm,{className:"w-4 h-4 text-gray-600"}):Ie.jsx(tf,{className:"w-4 h-4",style:{color:r}})}),Ie.jsxs("div",{className:"flex flex-col max-w-[85%] "+(c?"items-end":"items-start"),children:[Ie.jsx("div",{className:"px-4 py-3 rounded-2xl shadow-sm "+(c?"rounded-tr-md text-white":"rounded-tl-md bg-white border border-gray-100 text-gray-800"),style:c?{background:`linear-gradient(135deg, ${r}, ${r}dd)`}:void 0,children:u?Ie.jsx(Qie,{primaryColor:r}):Ie.jsxs(Ie.Fragment,{children:[Ie.jsx($k,{answer:e.content}),d&&e.serialData&&e.responseType&&Ie.jsx(jie,{serialData:e.serialData,responseType:e.responseType,primaryColor:r}),h&&e.imageUrl&&Ie.jsx(Uie,{url:e.imageUrl}),Ie.jsx(hl,{children:A&&p&&e.generatedSql&&Ie.jsx(Iie,{sql:e.generatedSql,primaryColor:r})})]})}),!u&&Ie.jsxs("div",{className:"flex items-center gap-1.5 mt-1 px-1 flex-wrap",children:[m&&m.row_count>0&&Ie.jsx(Oie,{label:"Rows",value:m.row_count}),m&&m.execution_status&&"success"!==m.execution_status&&Ie.jsx(Oie,{label:"Status",value:m.execution_status}),g&&Ie.jsxs("span",{className:"inline-flex items-center gap-0.5 text-[10px] text-gray-300",children:[Ie.jsx(yf,{className:"w-2.5 h-2.5"}),g]})]}),!c&&!u&&Ie.jsxs("div",{className:"flex items-center gap-0.5 mt-1 px-1 flex-wrap",children:[Ie.jsx(Tie,{onClick:async()=>{try{await navigator.clipboard.writeText(e.content||""),s(!0),setTimeout(()=>s(!1),2e3)}catch(t){console.error("Failed to copy:",t)}},title:"Copy response",children:o?Ie.jsx(lf,{className:"w-3.5 h-3.5 text-green-500"}):Ie.jsx(xf,{className:"w-3.5 h-3.5"})}),p&&Ie.jsx(Tie,{onClick:()=>l(!A),title:A?"Hide SQL":"View SQL",active:A,activeClass:"bg-indigo-50 text-indigo-600",children:Ie.jsx(vf,{className:"w-3.5 h-3.5"})}),f&&e.serialData&&Ie.jsx(Tie,{onClick:()=>{var t;return function(e,t){var r,n;const i=e.data.x||[],a=e.data.y||[];let o=`${(null==(r=e.legends)?void 0:r.x)||"X"},${(null==(n=e.legends)?void 0:n.y)||"Y"}\n`;for(let l=0;l<i.length;l++)o+=`${String(i[l]).includes(",")?`"${i[l]}"`:i[l]},${a[l]??""}\n`;const s=new Blob([o],{type:"text/csv;charset=utf-8;"}),A=document.createElement("a");A.href=URL.createObjectURL(s),A.download=`${t.replace(/[^a-zA-Z0-9]/g,"_")}_${Date.now()}.csv`,A.click(),URL.revokeObjectURL(A.href)}(e.serialData,(null==(t=e.serialData.legends)?void 0:t.title)||"data")},title:"Download CSV",children:Ie.jsx(Cf,{className:"w-3.5 h-3.5"})}),Ie.jsx("div",{className:"w-px h-3 bg-gray-200 mx-0.5"}),Ie.jsx(Tie,{onClick:()=>t(e.id,"positive"),title:"Helpful",active:"positive"===e.feedback,activeClass:"bg-green-100 text-green-600",children:Ie.jsx(cm,{className:"w-3.5 h-3.5"})}),Ie.jsx(Tie,{onClick:()=>t(e.id,"negative"),title:"Not helpful",active:"negative"===e.feedback,activeClass:"bg-red-100 text-red-600",children:Ie.jsx(lm,{className:"w-3.5 h-3.5"})})]})]})]})},(e,t)=>e.message.id===t.message.id&&e.message.content===t.message.content&&e.message.feedback===t.message.feedback&&e.message.isLoading===t.message.isLoading&&e.primaryColor===t.primaryColor&&e.onFeedback===t.onFeedback);function Mie({question:e,onClick:t,primaryColor:r,index:n}){return Ie.jsx(ch.button,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.1*n},onClick:t,className:"group text-left p-3 rounded-xl border border-gray-200 bg-white hover:border-transparent hover:shadow-md transition-all duration-200",style:{"--hover-bg":`${r}08`},onMouseEnter:e=>{e.currentTarget.style.borderColor=r,e.currentTarget.style.backgroundColor=`${r}08`},onMouseLeave:e=>{e.currentTarget.style.borderColor="#e5e7eb",e.currentTarget.style.backgroundColor="white"},children:Ie.jsx("p",{className:"text-sm text-gray-700 group-hover:text-gray-900 line-clamp-2",children:e})})}function Die({onSelectQuestion:e,primaryColor:t}){return Ie.jsxs("div",{className:"flex flex-col items-center justify-center h-full px-4 py-6 overflow-y-auto",children:[Ie.jsxs(ch.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.4},className:"flex flex-col items-center mb-8",children:[Ie.jsxs(ch.div,{className:"relative w-20 h-20 mb-5",initial:{rotate:-10},animate:{rotate:0},transition:{duration:.5,type:"spring"},children:[Ie.jsx("div",{className:"absolute inset-0 rounded-2xl shadow-xl",style:{background:`linear-gradient(135deg, ${t}, ${t}cc)`}}),Ie.jsx("div",{className:"absolute inset-0 rounded-2xl opacity-50",style:{background:`linear-gradient(135deg, transparent, ${t}40)`}}),Ie.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:Ie.jsx(Bm,{className:"w-10 h-10 text-white drop-shadow-lg"})})]}),Ie.jsx(ch.h2,{className:"text-2xl font-bold text-gray-900 mb-2",initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.2},children:"Ask Ultra"}),Ie.jsx(ch.p,{className:"text-sm text-gray-500 text-center max-w-xs leading-relaxed",initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.3},children:"Your AI-powered assistant for real-time logistics insights and data queries"})]}),Ie.jsxs("div",{className:"w-full max-w-md",children:[Ie.jsxs(ch.div,{className:"flex items-center gap-2 mb-4",initial:{opacity:0},animate:{opacity:1},transition:{delay:.4},children:[Ie.jsx("div",{className:"w-6 h-6 rounded-lg flex items-center justify-center",style:{backgroundColor:"#fef3c7"},children:Ie.jsx(sm,{className:"w-3.5 h-3.5 text-amber-500"})}),Ie.jsx("span",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider",children:"Try asking"})]}),Ie.jsx("div",{className:"grid grid-cols-1 gap-3",children:Kk.map((r,n)=>Ie.jsx(Mie,{question:r.text,onClick:()=>e(r.text),primaryColor:t,index:n},r.id))})]})]})}function Lie(){return"undefined"==typeof window?null:window.SpeechRecognition||window.webkitSpeechRecognition||null}function Hie({color:e}){return Ie.jsx("span",{className:"inline-flex items-center gap-[2px] h-4",children:[0,1,2,3,4].map(t=>Ie.jsx(ch.span,{className:"block w-[3px] rounded-full",style:{background:e},animate:{height:["6px","14px","6px"]},transition:{duration:.6,repeat:1/0,delay:.1*t,ease:"easeInOut"}},t))})}function _ie({value:e,onChange:t,onSend:r,isSending:n,primaryColor:i,placeholder:a="Ask me anything about your data..."}){const o=Te.useRef(null),s=Te.useRef(null),A=Te.useRef(""),[l,c]=Te.useState(!1),[u]=Te.useState(()=>!!Lie());Te.useEffect(()=>{(()=>{const e=o.current;e&&(e.style.height="auto",e.style.height=`${Math.min(e.scrollHeight,120)}px`)})()},[e]),Te.useEffect(()=>{o.current&&o.current.focus()},[]),Te.useEffect(()=>()=>{if(s.current)try{s.current.abort()}catch{}},[]);const d=Te.useCallback(()=>{if(l||n)return;const e=Lie();if(!e)return;const i=new e;i.continuous=!1,i.interimResults=!0,i.lang="en-US",A.current="",i.onstart=()=>{c(!0)},i.onresult=e=>{let r="",n="";for(let t=0;t<e.results.length;t++){const i=e.results[t][0].transcript;e.results[t].isFinal?n+=i:r+=i}A.current=n,t((n+r).trim())},i.onerror=()=>{c(!1),s.current=null},i.onend=()=>{c(!1),s.current=null;const e=A.current.trim();e&&(t(e),setTimeout(()=>r(),50))},s.current=i,i.start()},[l,n,t,r]);return Ie.jsxs("div",{className:"border-t bg-gradient-to-t from-gray-50 to-white p-4",children:[Ie.jsxs("div",{className:"flex items-end gap-2 p-2 rounded-2xl border bg-white shadow-sm focus-within:shadow-md transition-all duration-200 "+(l?"border-blue-200 shadow-blue-50":"border-gray-200 focus-within:border-gray-300"),style:l?{borderColor:`${i}40`}:void 0,children:[l?Ie.jsxs("div",{className:"flex-1 flex items-center gap-3 py-2 px-2 min-h-[36px]",children:[Ie.jsx(Hie,{color:i}),Ie.jsx("span",{className:"text-sm text-gray-500 truncate",children:e||"Listening…"})]}):Ie.jsx("textarea",{ref:o,value:e,onChange:e=>t(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),r())},placeholder:a,rows:1,className:"flex-1 bg-transparent border-none outline-none resize-none text-sm text-gray-800 placeholder-gray-400 min-h-[36px] max-h-[120px] py-2 px-1",disabled:n}),u&&!n&&!e.trim()&&!l&&Ie.jsx(ch.button,{onClick:d,className:"relative flex-shrink-0 w-10 h-10 rounded-xl flex items-center justify-center transition-all duration-200",style:{background:`${i}10`,color:i},whileHover:{scale:1.05},whileTap:{scale:.95},title:"Voice input",children:Ie.jsx(_f,{className:"w-4 h-4"})}),Ie.jsx(ch.button,{onClick:r,disabled:(!e.trim()||n)&&!l,className:"flex-shrink-0 w-10 h-10 rounded-xl flex items-center justify-center text-white transition-all duration-200 disabled:opacity-40 disabled:cursor-not-allowed shadow-sm hover:shadow-md",style:{background:e.trim()&&!n?`linear-gradient(135deg, ${i}, ${i}dd)`:"#d1d5db"},whileHover:e.trim()&&!n?{scale:1.05}:{},whileTap:e.trim()&&!n?{scale:.95}:{},children:n?Ie.jsx(If,{className:"w-4 h-4 animate-spin"}):Ie.jsx(rm,{className:"w-4 h-4"})})]}),Ie.jsxs("p",{className:"text-xs text-gray-400 text-center mt-2",children:["Press"," ",Ie.jsx("kbd",{className:"px-1.5 py-0.5 bg-gray-100 rounded text-gray-500 font-mono text-[10px]",children:"Enter"})," ","to send",u&&Ie.jsxs("span",{className:"text-gray-300",children:[" · tap ",Ie.jsx(_f,{className:"inline w-3 h-3 -mt-0.5"})," to speak"]})]})]})}function Rie(e){const t=new Date(e),r=(new Date).getTime()-t.getTime(),n=Math.floor(r/6e4),i=Math.floor(r/36e5),a=Math.floor(r/864e5);return n<1?"Just now":n<60?`${n}m ago`:i<24?`${i}h ago`:a<7?`${a}d ago`:t.toLocaleDateString("en-US",{month:"short",day:"numeric"})}function Kie(e){return e.title?e.title.length>50?e.title.substring(0,50)+"...":e.title:"New conversation"}function zie({session:e,isActive:t,onSelect:r,onDelete:n,primaryColor:i}){const[a,o]=Te.useState(!1);return Ie.jsx(ch.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},exit:{opacity:0,x:-10},className:"group relative p-3 rounded-xl cursor-pointer transition-all duration-200 "+(t?"bg-white shadow-sm border border-gray-200":"hover:bg-white/60"),onClick:r,onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),style:t?{borderColor:`${i}40`}:void 0,children:Ie.jsxs("div",{className:"flex items-start gap-3",children:[Ie.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded-lg flex items-center justify-center "+(t?"":"bg-gray-100"),style:t?{backgroundColor:`${i}15`}:void 0,children:Ie.jsx(Hf,{className:"w-4 h-4",style:{color:t?i:"#6b7280"}})}),Ie.jsxs("div",{className:"flex-1 min-w-0",children:[Ie.jsx("p",{className:"text-sm font-medium truncate "+(t?"text-gray-900":"text-gray-700"),children:Kie(e)}),Ie.jsxs("div",{className:"flex items-center gap-1.5 mt-1",children:[Ie.jsx(yf,{className:"w-3 h-3 text-gray-400"}),Ie.jsx("span",{className:"text-xs text-gray-400",children:Rie(e.updatedAt)}),e.totalTurns>0&&Ie.jsxs(Ie.Fragment,{children:[Ie.jsx("span",{className:"text-xs text-gray-300",children:"•"}),Ie.jsxs("span",{className:"text-xs text-gray-400",children:[e.totalTurns," ",1===e.totalTurns?"turn":"turns"]})]})]})]}),Ie.jsx(hl,{children:a&&Ie.jsx(ch.button,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},onClick:e=>{e.stopPropagation(),n()},className:"absolute right-2 top-1/2 -translate-y-1/2 p-2 rounded-lg text-gray-400 hover:text-red-500 hover:bg-red-50 transition-colors",title:"Delete conversation",children:Ie.jsx(um,{className:"w-4 h-4"})})})]})})}function Vie({isOpen:e,onClose:t,sessions:r,isLoading:n,currentConversationId:i,onSelectSession:a,onDeleteSession:o,onNewConversation:s,primaryColor:A}){return Ie.jsx(hl,{children:e&&Ie.jsxs(Ie.Fragment,{children:[Ie.jsx(ch.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"absolute inset-0 bg-black/10 z-10",onClick:t}),Ie.jsxs(ch.div,{initial:{x:"-100%",opacity:0},animate:{x:0,opacity:1},exit:{x:"-100%",opacity:0},transition:{type:"spring",damping:25,stiffness:300},className:"absolute left-0 top-0 bottom-0 w-72 bg-gradient-to-b from-gray-50 to-white border-r border-gray-200 z-20 flex flex-col shadow-xl",children:[Ie.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-gray-100",children:[Ie.jsx("h3",{className:"font-semibold text-gray-900",children:"Chat History"}),Ie.jsx("button",{onClick:t,className:"p-1.5 rounded-lg text-gray-400 hover:text-gray-600 hover:bg-gray-100 transition-colors",children:Ie.jsx(bm,{className:"w-5 h-5"})})]}),Ie.jsx("div",{className:"p-3 border-b border-gray-100",children:Ie.jsxs(ch.button,{onClick:s,className:"w-full flex items-center justify-center gap-2 px-4 py-2.5 rounded-xl text-white font-medium shadow-sm hover:shadow-md transition-all",style:{background:`linear-gradient(135deg, ${A}, ${A}dd)`},whileHover:{scale:1.02},whileTap:{scale:.98},children:[Ie.jsx(Gf,{className:"w-4 h-4"}),"New Conversation"]})}),Ie.jsx("div",{className:"flex-1 overflow-y-auto p-2",children:n?Ie.jsx("div",{className:"flex items-center justify-center py-8",children:Ie.jsx(If,{className:"w-6 h-6 animate-spin text-gray-400"})}):0===r.length?Ie.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[Ie.jsx("div",{className:"w-12 h-12 rounded-full bg-gray-100 flex items-center justify-center mb-3",children:Ie.jsx(Hf,{className:"w-6 h-6 text-gray-400"})}),Ie.jsx("p",{className:"text-sm text-gray-500",children:"No conversations yet"}),Ie.jsx("p",{className:"text-xs text-gray-400 mt-1",children:"Start a new conversation to begin"})]}):Ie.jsx("div",{className:"space-y-1",children:r.map(e=>Ie.jsx(zie,{session:e,isActive:e.chatSessionId===i,onSelect:()=>a(e.chatSessionId),onDelete:()=>o(e.chatSessionId),primaryColor:A},e.chatSessionId))})})]})]})})}function $ie({primaryColor:e,hasMessages:t,onToggleHistory:r,onNewConversation:n,onExportConversation:i}){const[a,o]=Te.useState(!1);return Ie.jsx("div",{className:"px-4 py-3 flex items-center justify-end",children:Ie.jsxs("div",{className:"flex items-center gap-1 justify-end",children:[t&&i&&Ie.jsx(ch.button,{onClick:()=>{null==i||i(),o(!0),setTimeout(()=>o(!1),2e3)},className:"p-2 rounded-lg text-gray-500 hover:text-gray-700 hover:bg-gray-100 transition-colors",title:"Copy conversation",whileHover:{scale:1.05},whileTap:{scale:.95},children:a?Ie.jsx(lf,{className:"w-5 h-5 text-green-500"}):Ie.jsx(gf,{className:"w-5 h-5"})}),Ie.jsx(ch.button,{onClick:r,className:"p-2 rounded-lg text-gray-500 hover:text-gray-700 hover:bg-gray-100 transition-colors",title:"Chat history",whileHover:{scale:1.05},whileTap:{scale:.95},children:Ie.jsx(Ff,{className:"w-5 h-5"})}),t&&Ie.jsx(ch.button,{onClick:n,className:"p-2 rounded-lg text-gray-500 hover:text-gray-700 hover:bg-gray-100 transition-colors",title:"New conversation",whileHover:{scale:1.05},whileTap:{scale:.95},children:Ie.jsx(Zf,{className:"w-5 h-5"})})]})})}const Wie=Te.memo(function({primaryColor:e}){const t=Vk(e=>e.inputValue),r=Vk(e=>e.isSending),n=Vk(e=>e.setInputValue),i=Vk(e=>e.sendMessage),a=Te.useCallback(()=>{const e=Vk.getState().inputValue;e.trim()&&i(e)},[i]);return Ie.jsx(_ie,{value:t,onChange:n,onSend:a,isSending:r,primaryColor:e})}),Gie=Te.memo(function({primaryColor:e}){const t=Vk(e=>e.messages),r=Vk(e=>e.hasOlderTurns),n=Vk(e=>e.isLoadingOlderTurns),i=Vk(e=>e.loadOlderTurns),a=Vk(e=>e.submitFeedback),o=Te.useRef(null),s=Te.useRef(null),A=Te.useRef(0);Te.useEffect(()=>{const e=A.current,r=t.length;if(r>e&&o.current){const n=t[r-1],i=e>0?t[e-1]:null;i&&(null==n?void 0:n.id)===(null==i?void 0:i.id)||o.current.scrollIntoView({behavior:"smooth"})}A.current=r},[t]);const l=Te.useCallback(()=>{const e=s.current;if(e&&e.scrollTop<60&&r&&!n){const t=e.scrollHeight;i().then(()=>{requestAnimationFrame(()=>{if(s.current){const e=s.current.scrollHeight;s.current.scrollTop=e-t}})})}},[r,n,i]),c=Te.useCallback((e,t)=>{a(e,t)},[a]);return Ie.jsxs("div",{ref:s,className:"h-full overflow-y-auto px-4 py-4",onScroll:l,children:[n&&Ie.jsxs("div",{className:"flex items-center justify-center py-3 mb-2",children:[Ie.jsx(If,{className:"w-5 h-5 animate-spin text-gray-400 mr-2"}),Ie.jsx("span",{className:"text-xs text-gray-400",children:"Loading older messages..."})]}),r&&!n&&Ie.jsxs("button",{onClick:()=>i(),className:"w-full flex items-center justify-center gap-1.5 py-2 mb-3 text-xs text-gray-400 hover:text-gray-600 transition-colors",children:[Ie.jsx(hf,{className:"w-4 h-4"}),"Load older messages"]}),Ie.jsx("div",{className:"space-y-4 max-w-2xl mx-auto",children:Ie.jsx(hl,{initial:!1,children:t.map(t=>Ie.jsx(Pie,{message:t,onFeedback:c,primaryColor:e},t.id))})}),Ie.jsx("div",{ref:o,className:"h-4"})]})});function qie(){const{theme:e}=ea(),t=Vk(e=>e.isLoading),r=Vk(e=>e.error),n=Vk(e=>e.sessions),i=Vk(e=>e.isLoadingHistory),a=Vk(e=>e.showHistory),o=Vk(e=>e.conversationId),s=Vk(e=>e.messages.length),A=Vk(e=>e.toggleHistory),l=Vk(e=>e.loadSession),c=Vk(e=>e.deleteSession),u=Vk(e=>e.startNewConversation),d=Vk(e=>e.fetchSessions),h=Vk(e=>e.sendMessage),p=e.primaryColor||"#1e40af",f=s>0;Te.useEffect(()=>{d()},[d]);const m=Te.useCallback(e=>{h(e)},[h]),g=Te.useCallback(()=>{const e=Vk.getState().messages;if(!e.length)return;const t=e.filter(e=>!e.isLoading).map(e=>{var t,r;const n="user"===e.role?"You":"Agent",i=e.timestamp?new Date(e.timestamp).toLocaleString([],{dateStyle:"short",timeStyle:"short"}):"";let a=`[${n}]${i?` (${i})`:""}\n${e.content||""}`;return e.generatedSql&&(a+=`\n\nSQL: ${e.generatedSql}`),(null==(r=null==(t=e.serialData)?void 0:t.legends)?void 0:r.title)&&(a+=`\n[Chart: ${e.serialData.legends.title} — ${e.serialData.data.x.length} data points]`),a}).join("\n\n─────────────────────\n\n");navigator.clipboard.writeText(t).catch(e=>console.error("Export failed:",e))},[]);return Ie.jsxs("div",{className:"relative flex flex-col h-full bg-gradient-to-b from-gray-50 to-white overflow-hidden",style:{fontFamily:e.fontFamily},children:[Ie.jsx(Vie,{isOpen:a,onClose:A,sessions:n,isLoading:i,currentConversationId:o,onSelectSession:l,onDeleteSession:c,onNewConversation:u,primaryColor:p}),Ie.jsx($ie,{primaryColor:p,hasMessages:f,onToggleHistory:A,onNewConversation:u,onExportConversation:g}),Ie.jsx(hl,{children:r&&Ie.jsx(ch.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"mx-4 mt-3 p-3 bg-red-50 border border-red-200 rounded-xl",children:Ie.jsx("p",{className:"text-sm text-red-600",children:r})})}),Ie.jsx(hl,{children:t&&Ie.jsx(ch.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"absolute inset-0 bg-white/80 z-30 flex items-center justify-center",children:Ie.jsxs("div",{className:"flex flex-col items-center gap-3",children:[Ie.jsx(If,{className:"w-8 h-8 animate-spin",style:{color:p}}),Ie.jsx("p",{className:"text-sm text-gray-500",children:"Loading conversation..."})]})})}),Ie.jsx("div",{className:"flex-1 overflow-hidden",children:f||t?Ie.jsx(Gie,{primaryColor:p}):Ie.jsx(Die,{onSelectQuestion:m,primaryColor:p})}),Ie.jsx(Wie,{primaryColor:p})]})}let Yie=null;function Xie(e){return{id:e.id,name:e.name,email:e.email,emailsToday:e.emails_today??e.emailsToday??0,emailsCarrierToday:e.emails_carrier_today??e.emailsCarrierToday??0,emailsInternalToday:e.emails_internal_today??e.emailsInternalToday??0,leadsToday:e.leads_today??e.leadsToday??0,leadsTillDate:e.leads_till_date??e.leadsTillDate??0,leadsWithActionNeed:e.leads_with_action_need??e.leadsWithActionNeed??0,leadsWithProspectCreation:e.leads_with_prospect_creation??e.leadsWithProspectCreation??0}}function Jie(e){return{id:e.id,tenantId:e.tenant_id??e.tenantId??"",createdBy:e.created_by??e.createdBy??"",shipperEmail:e.shipper_email??e.shipperEmail??"",shipperName:e.shipper_name??e.shipperName??"",shipperCompanyName:e.shipper_company_name??e.shipperCompanyName??null,origin:e.origin??"",destination:e.destination??"",pickupTimestamp:e.pickup_timestamp??e.pickupTimestamp??null,emailSubject:e.email_subject??e.emailSubject??"",status:e.status??"new",actionNeeded:e.action_needed??e.actionNeeded??!1,prospectCreation:e.prospect_creation??e.prospectCreation??!1,createdAt:e.created_at??e.createdAt??"",updatedAt:e.updated_at??e.updatedAt??""}}function Zie(e){return{id:e.id,tenantId:e.tenant_id??e.tenantId??"",createdBy:e.created_by??e.createdBy??null,messageId:e.message_id??e.messageId??"",conversationId:e.conversation_id??e.conversationId??"",conversationIndex:e.conversation_index??e.conversationIndex??null,senderEmail:e.sender_email??e.senderEmail??"",receiverEmail:e.receiver_email??e.receiverEmail??"",subject:e.subject??"",receivedDatetime:e.received_datetime??e.receivedDatetime??"",bodyHtml:e.body_html??e.bodyHtml??"",bodyText:e.body_text??e.bodyText??"",category:e.category??null,classificationConfidence:e.classification_confidence??e.classificationConfidence??null,status:e.status??"",userId:e.user_id??e.userId??"",metadata:e.metadata??{},referencedLeadId:e.referenced_lead_id??e.referencedLeadId??null,processedAt:e.processed_at??e.processedAt??null,createdAt:e.created_at??e.createdAt??"",updatedAt:e.updated_at??e.updatedAt??""}}class eae{static async checkIsTeamLead(e=!1){if(!e&&Yie&&Date.now()-Yie.timestamp<6e5)return Yie.isLead;try{const e=(await Vi.get("/workspace/users/team/if_teamLead")).data,t=(null==e?void 0:e.data)??e,r=(null==t?void 0:t.is_lead)??(null==t?void 0:t.isLead)??!1;return Yie={isLead:r,timestamp:Date.now()},r}catch(t){return console.error("[TeamService] Error checking team lead:",t),(null==Yie?void 0:Yie.isLead)??!1}}static clearCache(){Yie=null}static async getTeamData(){const e=(await Vi.get("/crm/agents/email/team/data")).data,t=(null==e?void 0:e.team)??{};return{teamId:t.team_id??t.teamId??"",teamLead:t.team_lead??t.teamLead??{id:"",name:"",email:""},members:t.members??[]}}static async getTeamTotals(){var e;const t=(await Vi.get("/crm/agents/email/team/email_agent_metrics")).data,r=(null==(e=null==t?void 0:t.metrics)?void 0:e.totals)??{};return{emailsToday:r.emails_today??r.emailsToday??0,emailsCarrierToday:r.emails_carrier_today??r.emailsCarrierToday??0,emailsInternalToday:r.emails_internal_today??r.emailsInternalToday??0,leadsToday:r.leads_today??r.leadsToday??0,leadsTillDate:r.leads_till_date??r.leadsTillDate??0,leadsWithActionNeed:r.leads_with_action_need??r.leadsWithActionNeed??0,leadsWithProspectCreation:r.leads_with_prospect_creation??r.leadsWithProspectCreation??0}}static async getPerMemberMetrics(e){var t,r;const n={};e&&e.length>0&&(n.user_id=e.join(","));const i=(await Vi.get("/crm/agents/email/team/per_member/email_agent_metrics",{params:n})).data;return((null==(t=null==i?void 0:i.metrics)?void 0:t.per_member)??(null==(r=null==i?void 0:i.metrics)?void 0:r.perMember)??[]).map(Xie)}static async getTeamLeads(e){const t=(await Vi.get("/crm/public/team/leads/check",{params:{page:(null==e?void 0:e.page)??1,size:(null==e?void 0:e.size)??20,...(null==e?void 0:e.searchBroker)?{search_broker:e.searchBroker}:{},...(null==e?void 0:e.dateFrom)?{date_from:e.dateFrom}:{},...(null==e?void 0:e.dateTo)?{date_to:e.dateTo}:{},...(null==e?void 0:e.userId)?{user_id:e.userId}:{}}})).data;return{leads:((null==t?void 0:t.leads)??[]).map(Jie),count:(null==t?void 0:t.count)??0,page:(null==t?void 0:t.page)??1,size:(null==t?void 0:t.size)??20}}static async getLeadEmails(e,t){const r=(await Vi.get(`/crm/public/leads/emails/${e}`,{params:{page:(null==t?void 0:t.page)??1,size:(null==t?void 0:t.size)??20}})).data;return{emails:((null==r?void 0:r.emails)??[]).map(Zie),count:(null==r?void 0:r.count)??0,page:(null==r?void 0:r.page)??1,size:(null==r?void 0:r.size)??20}}}const tae={isTeamLead:null,isCheckingAccess:!1,teamData:null,isLoadingTeamData:!1,totals:null,isLoadingMetrics:!1,metricsError:null,perMemberMetrics:[],isLoadingPerMember:!1,perMemberError:null,selectedMemberIds:[],leads:[],leadsCount:0,leadsPage:1,leadsSize:20,isLoadingLeads:!1,leadsError:null,dateFrom:"",dateTo:"",activeTab:"overview"},rae=Tp()((e,t)=>({...tae,checkAccess:async()=>{e({isCheckingAccess:!0});try{const t=await eae.checkIsTeamLead();e({isTeamLead:t,isCheckingAccess:!1})}catch{e({isTeamLead:!1,isCheckingAccess:!1})}},fetchTeamData:async()=>{e({isLoadingTeamData:!0});try{const t=await eae.getTeamData();e({teamData:t,isLoadingTeamData:!1})}catch{e({isLoadingTeamData:!1})}},fetchMetrics:async()=>{e({isLoadingMetrics:!0,metricsError:null});try{const t=await eae.getTeamTotals();e({totals:t,isLoadingMetrics:!1})}catch(t){e({isLoadingMetrics:!1,metricsError:t.message||"Failed to fetch team metrics"})}},fetchPerMemberMetrics:async t=>{e({isLoadingPerMember:!0,perMemberError:null});try{const r=await eae.getPerMemberMetrics(t);e({perMemberMetrics:r,isLoadingPerMember:!1})}catch(r){e({isLoadingPerMember:!1,perMemberError:r.message||"Failed to fetch member metrics"})}},fetchLeads:async r=>{const n=t(),i=(null==r?void 0:r.userId)??(n.selectedMemberIds.length>0?n.selectedMemberIds.join(","):void 0);e({isLoadingLeads:!0,leadsError:null});try{const t=await eae.getTeamLeads({page:(null==r?void 0:r.page)??n.leadsPage,dateFrom:(null==r?void 0:r.dateFrom)??(n.dateFrom||void 0),dateTo:(null==r?void 0:r.dateTo)??(n.dateTo||void 0),userId:i});e({leads:t.leads,leadsCount:t.count,leadsPage:t.page,leadsSize:t.size,isLoadingLeads:!1})}catch(a){e({isLoadingLeads:!1,leadsError:a.message||"Failed to fetch team leads"})}},setSelectedMembers:r=>{e({selectedMemberIds:r,leadsPage:1});const n=t();r.length>0?n.fetchPerMemberMetrics(r):n.fetchPerMemberMetrics();const i=r.length>0?r.join(","):void 0;n.fetchLeads({page:1,userId:i})},setDateRange:(r,n)=>{e({dateFrom:r,dateTo:n,leadsPage:1}),t().fetchLeads({dateFrom:r,dateTo:n,page:1})},clearDateRange:()=>{e({dateFrom:"",dateTo:"",leadsPage:1}),t().fetchLeads({dateFrom:void 0,dateTo:void 0,page:1})},setActiveTab:t=>{e({activeTab:t})},setLeadsPage:r=>{e({leadsPage:r}),t().fetchLeads({page:r})},reset:()=>{e({...tae})}}));function nae({activeTab:e,onTabChange:t,primaryColor:r}){return Ie.jsxs("div",{className:"inline-flex p-1 bg-gray-100 rounded-lg",children:[Ie.jsxs("button",{onClick:()=>t("overview"),className:"relative px-4 py-1.5 text-sm font-medium rounded-md transition-all duration-200 "+("overview"===e?"text-white":"text-gray-600 hover:text-gray-900"),children:["overview"===e&&Ie.jsx(ch.div,{layoutId:"activeTab",className:"absolute inset-0 rounded-md",style:{backgroundColor:r},transition:{type:"spring",bounce:.2,duration:.4}}),Ie.jsxs("span",{className:"relative z-10 flex items-center gap-1.5",children:[Ie.jsx(sf,{className:"w-4 h-4"}),"Overview"]})]}),Ie.jsxs("button",{onClick:()=>t("leads"),className:"relative px-4 py-1.5 text-sm font-medium rounded-md transition-all duration-200 "+("leads"===e?"text-white":"text-gray-600 hover:text-gray-900"),children:["leads"===e&&Ie.jsx(ch.div,{layoutId:"activeTab",className:"absolute inset-0 rounded-md",style:{backgroundColor:r},transition:{type:"spring",bounce:.2,duration:.4}}),Ie.jsxs("span",{className:"relative z-10 flex items-center gap-1.5",children:[Ie.jsx(Of,{className:"w-4 h-4"}),"Leads"]})]})]})}function iae({label:e,value:t,color:r,icon:n}){return Ie.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 bg-white rounded-lg border border-gray-100 shadow-sm",children:[Ie.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center flex-shrink-0",style:{backgroundColor:`${r}15`},children:Ie.jsx(n,{className:"w-4 h-4",style:{color:r}})}),Ie.jsxs("div",{className:"min-w-0",children:[Ie.jsx("p",{className:"text-lg font-bold leading-none",style:{color:r},children:t}),Ie.jsx("p",{className:"text-xs text-gray-500 truncate",children:e})]})]})}function aae(e){return e.split(" ").map(e=>e[0]).join("").toUpperCase().slice(0,2)}function oae({members:e,primaryColor:t}){if(0===e.length)return null;const r=Math.max(...e.map(e=>e.leadsToday),1);return Ie.jsxs("div",{className:"bg-white rounded-xl p-4 border border-gray-100 shadow-sm",children:[Ie.jsx("h4",{className:"text-sm font-semibold text-gray-900 mb-4",children:"Leads Today by Member"}),Ie.jsx("div",{className:"space-y-3",children:e.map(e=>{const n=e.leadsToday/r*100;return Ie.jsxs("div",{className:"flex items-center gap-3",children:[Ie.jsx("div",{className:"w-7 h-7 rounded-full flex items-center justify-center text-white text-xs font-bold flex-shrink-0",style:{backgroundColor:t},children:aae(e.name)}),Ie.jsxs("div",{className:"flex-1 min-w-0",children:[Ie.jsxs("div",{className:"flex items-center justify-between mb-1",children:[Ie.jsx("span",{className:"text-xs font-medium text-gray-700 truncate",children:e.name.split(" ")[0]}),Ie.jsx("span",{className:"text-xs font-bold",style:{color:t},children:e.leadsToday})]}),Ie.jsx("div",{className:"h-2 bg-gray-100 rounded-full overflow-hidden",children:Ie.jsx(ch.div,{initial:{width:0},animate:{width:`${n}%`},transition:{duration:.5,ease:"easeOut"},className:"h-full rounded-full",style:{backgroundColor:t}})})]})]},e.id)})})]})}function sae({member:e,primaryColor:t}){return Ie.jsxs(ch.div,{layout:!0,initial:{opacity:0,y:5},animate:{opacity:1,y:0},className:"rounded-lg p-3 border border-gray-100 bg-white hover:border-gray-200 hover:shadow-sm transition-all",children:[Ie.jsxs("div",{className:"flex items-center justify-between mb-2",children:[Ie.jsxs("div",{className:"flex items-center gap-2",children:[Ie.jsx("div",{className:"w-8 h-8 rounded-full flex items-center justify-center text-white text-xs font-bold",style:{backgroundColor:t},children:aae(e.name)}),Ie.jsxs("div",{children:[Ie.jsx("h4",{className:"text-sm font-semibold text-gray-900 leading-tight",children:e.name}),Ie.jsx("p",{className:"text-xs text-gray-500",children:e.email})]})]}),e.leadsWithActionNeed>0&&Ie.jsxs("span",{className:"text-xs px-2 py-0.5 rounded-full bg-amber-100 text-amber-700 font-medium flex items-center gap-1",children:[Ie.jsx(pm,{className:"w-3 h-3"}),e.leadsWithActionNeed]})]}),Ie.jsxs("div",{className:"grid grid-cols-3 gap-2 text-center mb-2",children:[Ie.jsxs("div",{className:"py-1.5 rounded-md bg-gray-50",children:[Ie.jsx("div",{className:"text-[10px] text-gray-500",children:"Emails"}),Ie.jsx("div",{className:"text-sm font-bold",style:{color:t},children:e.emailsToday})]}),Ie.jsxs("div",{className:"py-1.5 rounded-md bg-gray-50",children:[Ie.jsx("div",{className:"text-[10px] text-gray-500",children:"Carrier"}),Ie.jsx("div",{className:"text-sm font-bold text-blue-600",children:e.emailsCarrierToday})]}),Ie.jsxs("div",{className:"py-1.5 rounded-md bg-gray-50",children:[Ie.jsx("div",{className:"text-[10px] text-gray-500",children:"Internal"}),Ie.jsx("div",{className:"text-sm font-bold text-gray-600",children:e.emailsInternalToday})]})]}),Ie.jsxs("div",{className:"grid grid-cols-4 gap-2 text-center",children:[Ie.jsxs("div",{className:"py-1.5 rounded-md bg-gray-50",children:[Ie.jsx("div",{className:"text-[10px] text-gray-500",children:"Total"}),Ie.jsx("div",{className:"text-sm font-bold text-gray-700",children:e.leadsTillDate})]}),Ie.jsxs("div",{className:"py-1.5 rounded-md bg-gray-50",children:[Ie.jsx("div",{className:"text-[10px] text-gray-500",children:"Today"}),Ie.jsx("div",{className:"text-sm font-bold text-green-600",children:e.leadsToday})]}),Ie.jsxs("div",{className:"py-1.5 rounded-md bg-gray-50",children:[Ie.jsx("div",{className:"text-[10px] text-gray-500",children:"Action"}),Ie.jsx("div",{className:"text-sm font-bold text-amber-600",children:e.leadsWithActionNeed})]}),Ie.jsxs("div",{className:"py-1.5 rounded-md bg-gray-50",children:[Ie.jsx("div",{className:"text-[10px] text-gray-500",children:"Prospect"}),Ie.jsx("div",{className:"text-sm font-bold text-orange-600",children:e.leadsWithProspectCreation})]})]})]})}function Aae({members:e,selectedIds:t,onChange:r,primaryColor:n}){const[i,a]=Te.useState(!1),[o,s]=Te.useState(""),[A,l]=Te.useState(t),c=Te.useRef(null);Te.useEffect(()=>{i||l(t)},[t,i]),Te.useEffect(()=>{i&&c.current&&c.current.focus()},[i]);const u=()=>{[...t].sort().join(",")!==[...A].sort().join(",")&&r(A),a(!1),s("")},d=o.trim()?e.filter(e=>e.name.toLowerCase().includes(o.toLowerCase())||e.email.toLowerCase().includes(o.toLowerCase())):e,h=()=>{l([])},p=e.filter(e=>t.includes(e.id)),f=t.length>0;return Ie.jsxs("div",{className:"space-y-2",children:[Ie.jsxs("div",{className:"flex items-center gap-2",children:[Ie.jsxs("button",{onClick:()=>{i?u():(l(t),a(!0))},className:"relative flex items-center gap-2 px-3 py-2 border rounded-lg text-sm font-medium transition-colors flex-1 min-w-0 "+(f?"bg-white border-gray-300 text-gray-900":"bg-white border-gray-200 text-gray-700 hover:border-gray-300"),children:[Ie.jsx(ym,{className:"w-4 h-4 text-gray-400 flex-shrink-0"}),Ie.jsx("span",{className:"flex-1 text-left truncate",children:f?`${t.length} member${t.length>1?"s":""} selected`:"All Team Members"}),f&&Ie.jsx("span",{className:"text-xs min-w-[20px] h-5 flex items-center justify-center rounded-full text-white flex-shrink-0",style:{backgroundColor:n},children:t.length}),Ie.jsx(cf,{className:"w-4 h-4 text-gray-400 transition-transform flex-shrink-0 "+(i?"rotate-180":"")})]}),f&&Ie.jsxs("button",{onClick:()=>{r([]),l([])},className:"flex items-center gap-1 px-2.5 py-2 text-xs font-medium text-gray-500 bg-white border border-gray-200 rounded-lg hover:bg-gray-50 hover:text-gray-700 transition-colors flex-shrink-0",title:"Clear all",children:[Ie.jsx(bm,{className:"w-3.5 h-3.5"}),"Clear"]})]}),f&&Ie.jsx("div",{className:"flex flex-wrap gap-1.5",children:p.map(e=>Ie.jsxs("span",{className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md text-xs font-medium border border-gray-200 bg-gray-50 text-gray-700",children:[Ie.jsx("span",{className:"truncate max-w-[100px]",children:e.name.split(" ")[0]}),Ie.jsx("button",{onClick:()=>{return n=e.id,void r(t.filter(e=>e!==n));var n},className:"w-4 h-4 rounded-full flex items-center justify-center text-gray-400 hover:text-gray-600 hover:bg-gray-200 transition-colors",children:Ie.jsx(bm,{className:"w-3 h-3"})})]},e.id))}),i&&Ie.jsx("div",{className:"fixed inset-0 z-40",onClick:u}),i&&Ie.jsx("div",{className:"relative",children:Ie.jsxs("div",{className:"absolute z-50 top-0 left-0 right-0 bg-white border border-gray-200 rounded-lg shadow-lg overflow-hidden",children:[Ie.jsx("div",{className:"p-2 border-b border-gray-100",children:Ie.jsxs("div",{className:"relative",children:[Ie.jsx(tm,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-gray-400"}),Ie.jsx("input",{ref:c,type:"text",placeholder:"Search members...",value:o,onChange:e=>s(e.target.value),className:"w-full pl-8 pr-3 py-1.5 text-sm border border-gray-200 rounded-md focus:outline-none focus:border-gray-300"})]})}),Ie.jsxs("div",{className:"max-h-48 overflow-y-auto",children:[!o&&Ie.jsxs(Ie.Fragment,{children:[Ie.jsxs("button",{onClick:h,className:"w-full flex items-center gap-2 px-3 py-2.5 text-sm text-left hover:bg-gray-50 transition-colors "+(0===A.length?"bg-gray-50":""),children:[Ie.jsx("div",{className:"w-6 h-6 rounded-full bg-gray-200 flex items-center justify-center flex-shrink-0",children:Ie.jsx(ym,{className:"w-3 h-3 text-gray-500"})}),Ie.jsx("span",{className:"flex-1 font-medium",children:"All Team Members"}),0===A.length&&Ie.jsx(lf,{className:"w-4 h-4",style:{color:n}})]}),Ie.jsx("div",{className:"h-px bg-gray-100"})]}),0===d.length?Ie.jsx("div",{className:"px-3 py-4 text-center text-sm text-gray-400",children:"No members found"}):d.map(e=>{const t=A.includes(e.id);return Ie.jsxs("button",{onClick:()=>{return t=e.id,void l(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t]);var t},className:"w-full flex items-center gap-2 px-3 py-2.5 text-sm text-left hover:bg-gray-50 transition-colors "+(t?"bg-gray-50":""),children:[Ie.jsx("div",{className:"w-4 h-4 rounded border flex items-center justify-center flex-shrink-0 transition-colors "+(t?"border-transparent":"border-gray-300"),style:t?{backgroundColor:n}:void 0,children:t&&Ie.jsx(lf,{className:"w-3 h-3 text-white"})}),Ie.jsx("div",{className:"w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-bold flex-shrink-0",style:{backgroundColor:t?n:"#94a3b8"},children:aae(e.name)}),Ie.jsxs("div",{className:"flex-1 min-w-0",children:[Ie.jsx("p",{className:"font-medium truncate",children:e.name}),Ie.jsx("p",{className:"text-xs text-gray-400 truncate",children:e.email})]})]},e.id)})]}),Ie.jsxs("div",{className:"flex items-center gap-2 p-2 border-t border-gray-100",children:[A.length>0&&Ie.jsx("button",{onClick:h,className:"text-xs font-medium px-3 py-1.5 rounded-md hover:bg-gray-50 transition-colors text-gray-500",children:"Clear"}),Ie.jsx("button",{onClick:u,className:"ml-auto text-xs font-medium px-4 py-1.5 rounded-md text-white transition-colors",style:{backgroundColor:n},children:"Done"})]})]})})]})}function lae({primaryColor:e}){const{teamData:t,totals:r,perMemberMetrics:n,isLoadingMetrics:i,isLoadingPerMember:a,metricsError:o,perMemberError:s,selectedMemberIds:A,fetchMetrics:l,fetchPerMemberMetrics:c,setSelectedMembers:u}=rae();Te.useEffect(()=>{l(),A.length>0?c(A):c()},[]);const d=o||s;if(i&&!r)return Ie.jsx("div",{className:"flex items-center justify-center py-16",children:Ie.jsx("div",{className:"w-6 h-6 border-2 border-gray-300 border-t-blue-500 rounded-full animate-spin"})});if(d&&!r)return Ie.jsxs("div",{className:"mx-4 my-4 p-3 bg-red-50 border border-red-200 rounded-lg",children:[Ie.jsx("p",{className:"text-sm text-red-600",children:d}),Ie.jsx("button",{onClick:()=>{l(),c()},className:"mt-2 text-xs text-red-700 underline",children:"Try again"})]});const h=A.length>0&&n.length>0?n.reduce((e,t)=>({emailsToday:e.emailsToday+t.emailsToday,emailsCarrierToday:e.emailsCarrierToday+t.emailsCarrierToday,emailsInternalToday:e.emailsInternalToday+t.emailsInternalToday,leadsToday:e.leadsToday+t.leadsToday,leadsTillDate:e.leadsTillDate+t.leadsTillDate,leadsWithActionNeed:e.leadsWithActionNeed+t.leadsWithActionNeed}),{emailsToday:0,emailsCarrierToday:0,emailsInternalToday:0,leadsToday:0,leadsTillDate:0,leadsWithActionNeed:0}):r?{emailsToday:r.emailsToday,emailsCarrierToday:r.emailsCarrierToday,emailsInternalToday:r.emailsInternalToday,leadsToday:r.leadsToday,leadsTillDate:r.leadsTillDate,leadsWithActionNeed:r.leadsWithActionNeed}:null,p=(null==t?void 0:t.members)??[];return Ie.jsxs("div",{className:"space-y-4 px-4 py-3",children:[p.length>0&&Ie.jsx(Aae,{members:p,selectedIds:A,onChange:u,primaryColor:e}),h&&Ie.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[Ie.jsx(iae,{label:"Emails Today",value:h.emailsToday,color:e,icon:Pf}),Ie.jsx(iae,{label:"Carrier Emails",value:h.emailsCarrierToday,color:"#8b5cf6",icon:rm}),Ie.jsx(iae,{label:"Internal",value:h.emailsInternalToday,color:"#06b6d4",icon:$f}),Ie.jsx(iae,{label:"Leads Today",value:h.leadsToday,color:"#22c55e",icon:hm}),Ie.jsx(iae,{label:"Total Leads",value:h.leadsTillDate,color:"#64748b",icon:sf}),Ie.jsx(iae,{label:"Action Needed",value:h.leadsWithActionNeed,color:h.leadsWithActionNeed>0?"#f59e0b":"#22c55e",icon:pm})]}),Ie.jsx(oae,{members:n,primaryColor:e}),a&&0===n.length?Ie.jsx("div",{className:"flex items-center justify-center py-8",children:Ie.jsx("div",{className:"w-5 h-5 border-2 border-gray-300 border-t-blue-500 rounded-full animate-spin"})}):Ie.jsxs("div",{children:[Ie.jsx("h4",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider mb-3",children:"Member Details"}),Ie.jsx("div",{className:"space-y-2",children:n.map(t=>Ie.jsx(sae,{member:t,primaryColor:e},t.id))})]})]})}const cae=["Su","Mo","Tu","We","Th","Fr","Sa"],uae=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dae=["January","February","March","April","May","June","July","August","September","October","November","December"];function hae({value:e,onChange:t,placeholder:r="Select date",primaryColor:n="#1e40af",className:i=""}){const[a,o]=Te.useState(!1),[s,A]=Te.useState(()=>e?vv(e):vv()),[l,c]=Te.useState("days"),u=e?vv(e):null;Te.useEffect(()=>{e&&A(vv(e))},[e]),Te.useEffect(()=>{a&&c("days")},[a]);const d=()=>{o(!1),c("days")},h=(()=>{if("days"===l)return`${dae[s.month()]} ${s.year()}`;if("months"===l)return`${s.year()}`;const e=s.year()-5;return`${e} – ${e+11}`})(),p=vv(),f=e=>s.year()===p.year()&&s.month()===p.month()&&e===p.date(),m=e=>!!u&&(s.year()===u.year()&&s.month()===u.month()&&e===u.date());return Ie.jsxs("div",{className:`relative ${i}`,children:[Ie.jsxs("button",{type:"button",onClick:()=>o(!a),className:"flex items-center gap-2 w-full px-3 py-2 bg-white border border-gray-200 rounded-lg text-sm text-left hover:border-gray-300 transition-colors",children:[Ie.jsx(af,{className:"w-4 h-4 text-gray-400 flex-shrink-0"}),Ie.jsx("span",{className:"flex-1 truncate "+(e?"text-gray-900":"text-gray-400"),children:e?vv(e).format("MMM DD, YYYY"):r}),e&&Ie.jsx("button",{type:"button",onClick:e=>{e.stopPropagation(),t("")},className:"text-gray-400 hover:text-gray-600 p-0.5",children:"×"})]}),a&&Ie.jsx("div",{className:"fixed inset-0 z-[9998]",onClick:d}),a&&Ie.jsxs("div",{className:"absolute top-full left-0 mt-1 bg-white border border-gray-200 rounded-lg shadow-xl p-3 w-64",style:{zIndex:9999},children:[Ie.jsxs("div",{className:"flex items-center justify-between mb-3",children:[Ie.jsx("button",{type:"button",onClick:()=>{A("days"===l?s.subtract(1,"month"):"months"===l?s.subtract(1,"year"):s.subtract(12,"year"))},className:"p-1.5 hover:bg-gray-100 rounded-md transition-colors",children:Ie.jsx(uf,{className:"w-4 h-4 text-gray-600"})}),Ie.jsx("button",{type:"button",onClick:()=>{"days"===l?c("months"):"months"===l&&c("years")},className:"text-sm font-semibold text-gray-900 px-2 py-0.5 rounded-md transition-colors "+("years"!==l?"hover:bg-gray-100 cursor-pointer":"cursor-default"),children:h}),Ie.jsx("button",{type:"button",onClick:()=>{A("days"===l?s.add(1,"month"):"months"===l?s.add(1,"year"):s.add(12,"year"))},className:"p-1.5 hover:bg-gray-100 rounded-md transition-colors",children:Ie.jsx(df,{className:"w-4 h-4 text-gray-600"})})]}),"days"===l&&Ie.jsxs(Ie.Fragment,{children:[Ie.jsx("div",{className:"grid grid-cols-7 gap-1 mb-1",children:cae.map(e=>Ie.jsx("div",{className:"text-center text-xs font-medium text-gray-400 py-1",children:e},e))}),Ie.jsx("div",{className:"grid grid-cols-7 gap-1",children:(()=>{const e=s.daysInMonth(),t=s.startOf("month").day(),r=[];for(let n=0;n<t;n++)r.push(null);for(let n=1;n<=e;n++)r.push(n);return r})().map((e,r)=>Ie.jsx("div",{className:"aspect-square",children:null!==e&&Ie.jsx("button",{type:"button",onClick:()=>(e=>{const r=s.date(e);t(r.format("YYYY-MM-DD")),d()})(e),className:"w-full h-full flex items-center justify-center text-xs rounded-full transition-colors "+(m(e)?"text-white font-semibold":f(e)?"font-semibold":"text-gray-700 hover:bg-gray-100"),style:m(e)?{backgroundColor:n}:f(e)?{color:n}:void 0,children:e})},r))})]}),"months"===l&&Ie.jsx("div",{className:"grid grid-cols-3 gap-2",children:uae.map((e,t)=>{const r=s.month()===t&&(null==u?void 0:u.year())===s.year()&&(null==u?void 0:u.month())===t,i=p.year()===s.year()&&p.month()===t;return Ie.jsx("button",{type:"button",onClick:()=>{return e=t,A(s.month(e)),void c("days");var e},className:"py-2 text-xs font-medium rounded-lg transition-colors "+(r?"text-white":i?"font-semibold":"text-gray-700 hover:bg-gray-100"),style:r?{backgroundColor:n}:i?{color:n}:void 0,children:e},e)})}),"years"===l&&Ie.jsx("div",{className:"grid grid-cols-3 gap-2",children:(()=>{const e=s.year()-5;return Array.from({length:12},(t,r)=>e+r)})().map(e=>{const t=(null==u?void 0:u.year())===e,r=p.year()===e;return Ie.jsx("button",{type:"button",onClick:()=>{return t=e,A(s.year(t)),void c("months");var t},className:"py-2 text-xs font-medium rounded-lg transition-colors "+(t?"text-white":r?"font-semibold":"text-gray-700 hover:bg-gray-100"),style:t?{backgroundColor:n}:r?{color:n}:void 0,children:e},e)})}),Ie.jsx("div",{className:"mt-2 pt-2 border-t border-gray-100",children:Ie.jsx("button",{type:"button",onClick:()=>{A(p),t(p.format("YYYY-MM-DD")),d()},className:"w-full text-xs font-medium py-1.5 rounded hover:bg-gray-50 transition-colors",style:{color:n},children:"Today"})})]})]})}function pae({item:e,primaryColor:t}){const r=hg(),n=e.pickupTimestamp?vv(e.pickupTimestamp).format("MMM DD, YYYY"):"—";return Ie.jsx(ch.div,{layout:!0,initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},onClick:()=>r(`/team-view/${e.id}`),className:"bg-white rounded-lg border-l-4 shadow-sm overflow-hidden cursor-pointer hover:shadow-md transition-shadow",style:{borderLeftColor:e.actionNeeded?"#f59e0b":t},children:Ie.jsxs("div",{className:"px-3 py-2.5",children:[Ie.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[Ie.jsx("span",{className:"text-sm font-semibold truncate",style:{color:t},children:e.shipperName||"Unknown Shipper"}),Ie.jsxs("div",{className:"flex items-center gap-1.5 flex-shrink-0",children:[e.actionNeeded&&Ie.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded font-medium bg-amber-100 text-amber-700 flex items-center gap-0.5",children:Ie.jsx(pm,{className:"w-3 h-3"})}),Ie.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded font-medium capitalize "+("new"===e.status?"bg-green-500 text-white":"bg-blue-500 text-white"),children:e.status})]})]}),e.shipperCompanyName&&Ie.jsx("p",{className:"text-xs text-gray-500 mb-1.5",children:e.shipperCompanyName}),Ie.jsxs("div",{className:"grid grid-cols-3 gap-1.5 text-xs text-gray-600",children:[Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(Vf,{className:"w-3 h-3 text-green-500 flex-shrink-0"}),Ie.jsx("span",{className:"truncate",children:e.origin})]}),Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(Vf,{className:"w-3 h-3 rotate-180 text-red-500 flex-shrink-0"}),Ie.jsx("span",{className:"truncate",children:e.destination})]}),Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(af,{className:"w-3 h-3 flex-shrink-0"}),Ie.jsx("span",{children:n})]})]}),Ie.jsx("div",{className:"flex justify-between items-center mt-1.5",children:Ie.jsx("span",{className:"text-xs text-gray-400",children:vv(e.createdAt).format("MMM DD, h:mm A")})})]})})}function fae({currentPage:e,totalPages:t,onPageChange:r,primaryColor:n}){const i=[];if(t<=5)for(let a=1;a<=t;a++)i.push(a);else{i.push(1),e>3&&i.push(-1);const r=Math.max(2,e-1),n=Math.min(t-1,e+1);for(let e=r;e<=n;e++)i.push(e);e<t-2&&i.push(-1),i.push(t)}return Ie.jsxs("div",{className:"flex items-center justify-center gap-1 py-3",children:[Ie.jsx("button",{onClick:()=>r(e-1),disabled:1===e,className:"p-1 rounded hover:bg-gray-100 disabled:opacity-50",children:Ie.jsx(uf,{className:"w-4 h-4"})}),i.map((t,i)=>-1===t?Ie.jsx("span",{className:"px-2 text-gray-400",children:".."},`ellipsis-${i}`):Ie.jsx("button",{onClick:()=>r(t),className:"w-7 h-7 rounded text-xs font-medium "+(e===t?"text-white":"text-gray-700 hover:bg-gray-100"),style:e===t?{backgroundColor:n}:void 0,children:t},t)),Ie.jsx("button",{onClick:()=>r(e+1),disabled:e===t,className:"p-1 rounded hover:bg-gray-100 disabled:opacity-50",children:Ie.jsx(df,{className:"w-4 h-4"})})]})}function mae({primaryColor:e}){const{leads:t,leadsCount:r,leadsPage:n,leadsSize:i,isLoadingLeads:a,leadsError:o,dateFrom:s,dateTo:A,teamData:l,selectedMemberIds:c,fetchLeads:u,setSelectedMembers:d,setDateRange:h,clearDateRange:p,setLeadsPage:f}=rae(),[m,g]=Te.useState(s?s.split("T")[0]:""),[y,v]=Te.useState(A?A.split("T")[0]:""),[x,w]=Te.useState(!1),b=(null==l?void 0:l.members)??[];Te.useEffect(()=>{u()},[]);const B=m&&y&&m>y?'"From" date cannot be after "To" date':null,C=(m||y)&&!B,E=s||A,k=Math.ceil(r/i);return Ie.jsxs("div",{className:"flex flex-col h-full",children:[Ie.jsxs("div",{className:"px-4 py-3 border-b space-y-3",children:[b.length>0&&Ie.jsx(Aae,{members:b,selectedIds:c,onChange:d,primaryColor:e}),Ie.jsxs("div",{className:"flex items-center gap-2",children:[Ie.jsxs("button",{onClick:()=>w(!x),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium border transition-colors "+(E?"border-transparent text-white":"border-gray-200 text-gray-600 bg-white hover:bg-gray-50"),style:E?{backgroundColor:e}:void 0,children:[Ie.jsx(af,{className:"w-3.5 h-3.5"}),E?"Date Filtered":"Filter by Date"]}),E&&Ie.jsxs("button",{onClick:()=>{g(""),v(""),p(),w(!1)},className:"flex items-center gap-1 px-2 py-1.5 text-xs text-gray-500 hover:text-gray-700",children:[Ie.jsx(bm,{className:"w-3 h-3"}),"Clear"]})]}),x&&Ie.jsx(ch.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:Ie.jsxs("div",{className:"p-3 bg-gray-50 rounded-lg border border-gray-200 space-y-3 relative",style:{zIndex:100},children:[Ie.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[Ie.jsxs("div",{children:[Ie.jsx("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"From Date"}),Ie.jsx(hae,{value:m,onChange:e=>{g(e),e&&y&&e>y&&v("")},placeholder:"Select start date",primaryColor:e})]}),Ie.jsxs("div",{children:[Ie.jsx("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"To Date"}),Ie.jsx(hae,{value:y,onChange:e=>{v(e),e&&m&&e<m&&g("")},placeholder:"Select end date",primaryColor:e})]})]}),B&&Ie.jsx("p",{className:"text-xs text-red-500",children:B}),Ie.jsxs("div",{className:"flex justify-end gap-2",children:[Ie.jsx("button",{onClick:()=>w(!1),className:"px-3 py-1.5 text-xs font-medium text-gray-600 hover:text-gray-800",children:"Cancel"}),Ie.jsx("button",{onClick:()=>{if(!C)return;h(m?`${m}T00:00:00Z`:"",y?`${y}T23:59:59Z`:""),w(!1)},disabled:!C,className:"px-3 py-1.5 text-xs font-medium text-white rounded-lg disabled:opacity-40",style:{backgroundColor:e},children:"Apply Filter"})]})]})})]}),Ie.jsxs("div",{className:"px-4 py-2 flex items-center justify-between bg-gray-50",children:[Ie.jsxs("h3",{className:"text-sm font-semibold text-gray-900",children:["Email Leads ",r>0&&Ie.jsxs("span",{className:"text-gray-500 font-normal",children:["(",r,")"]})]}),a&&Ie.jsx("div",{className:"w-4 h-4 border-2 border-gray-300 border-t-blue-500 rounded-full animate-spin"})]}),o&&Ie.jsxs("div",{className:"mx-4 mb-3 p-3 bg-red-50 border border-red-200 rounded-lg",children:[Ie.jsx("p",{className:"text-sm text-red-600",children:o}),Ie.jsx("button",{onClick:()=>u(),className:"mt-2 text-xs text-red-700 underline",children:"Try again"})]}),Ie.jsx("div",{className:"flex-1 overflow-y-auto px-4 space-y-2 pb-4",children:a||0!==t.length?Ie.jsx(hl,{initial:!1,children:t.map(t=>Ie.jsx(pae,{item:t,primaryColor:e},t.id))}):Ie.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-gray-500 p-8 text-center",children:[Ie.jsx("div",{className:"w-14 h-14 bg-gray-100 rounded-full flex items-center justify-center mb-3",children:Ie.jsx(Pf,{className:"h-7 w-7 text-gray-400"})}),Ie.jsx("h3",{className:"text-base font-medium text-gray-900 mb-1",children:"No Email leads found"}),Ie.jsx("p",{className:"text-sm",children:"Try adjusting your filters"})]})}),t.length>0&&k>1&&Ie.jsx(fae,{currentPage:n,totalPages:k,onPageChange:f,primaryColor:e})]})}function gae(){const{theme:e}=ea(),{activeTab:t,setActiveTab:r,isTeamLead:n,isCheckingAccess:i,checkAccess:a,fetchTeamData:o}=rae(),s=e.primaryColor||"#1e40af";return Te.useEffect(()=>{a(),o()},[]),i?Ie.jsx("div",{className:"flex items-center justify-center h-full",style:{fontFamily:e.fontFamily},children:Ie.jsx("div",{className:"w-6 h-6 border-2 border-gray-300 border-t-blue-500 rounded-full animate-spin"})}):!1===n?Ie.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8 text-center",style:{fontFamily:e.fontFamily},children:[Ie.jsx("div",{className:"w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center mb-4",children:Ie.jsx(ym,{className:"h-8 w-8 text-gray-400"})}),Ie.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-1",children:"Access Restricted"}),Ie.jsx("p",{className:"text-sm text-gray-500",children:"Team View is only available for team leads."})]}):Ie.jsxs("div",{className:"flex flex-col h-full bg-gray-50",style:{fontFamily:e.fontFamily},children:[Ie.jsx("div",{className:"px-4 py-3 bg-white border-b",children:Ie.jsxs("div",{className:"flex items-center justify-between",children:[Ie.jsxs("div",{className:"flex items-center gap-2",children:[Ie.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center",style:{backgroundColor:`${s}15`},children:Ie.jsx(mm,{className:"w-4 h-4",style:{color:s}})}),Ie.jsx("h2",{className:"text-base font-semibold text-gray-900",children:"Team View"})]}),Ie.jsx(nae,{activeTab:t,onTabChange:r,primaryColor:s})]})}),Ie.jsx("div",{className:"flex-1 overflow-y-auto",children:"overview"===t?Ie.jsx(lae,{primaryColor:s}):Ie.jsx(mae,{primaryColor:s})})]})}function yae(e){return e.prospectCreation?"Shipper information needs to be updated":"This lead requires attention — review and update the details"}function vae({item:e,primaryColor:t}){const r=e.pickupTimestamp?vv(e.pickupTimestamp).format("MMM DD, YYYY"):"—";return Ie.jsx("div",{className:"bg-white rounded-lg border-l-4 shadow-sm overflow-hidden",style:{borderLeftColor:e.actionNeeded?"#f59e0b":t},children:Ie.jsxs("div",{className:"px-4 py-3",children:[Ie.jsxs("div",{className:"flex items-center justify-between mb-2",children:[Ie.jsxs("div",{className:"flex items-center gap-2",children:[Ie.jsx("span",{className:"text-sm font-semibold",style:{color:t},children:e.shipperName||"Unknown Shipper"}),Ie.jsx(Pf,{className:"w-4 h-4 text-gray-400"})]}),Ie.jsxs("div",{className:"flex items-center gap-1.5",children:[e.actionNeeded&&Ie.jsxs("span",{className:"text-xs px-2 py-1 rounded font-medium bg-amber-100 text-amber-700 flex items-center gap-1",children:[Ie.jsx(pm,{className:"w-3 h-3"}),"Action Needed"]}),Ie.jsx("span",{className:"text-xs px-2 py-1 rounded font-medium capitalize "+("new"===e.status?"bg-green-500 text-white":"bg-blue-500 text-white"),children:e.status})]})]}),e.shipperCompanyName&&Ie.jsx("p",{className:"text-xs text-gray-500 mb-2",children:e.shipperCompanyName}),Ie.jsxs("div",{className:"grid grid-cols-3 gap-2 text-xs text-gray-600",children:[Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(Vf,{className:"w-3 h-3 text-green-500 flex-shrink-0"}),Ie.jsx("span",{className:"truncate",children:e.origin})]}),Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(Vf,{className:"w-3 h-3 rotate-180 text-red-500 flex-shrink-0"}),Ie.jsx("span",{className:"truncate",children:e.destination})]}),Ie.jsxs("div",{className:"flex items-center gap-1",children:[Ie.jsx(af,{className:"w-3 h-3 flex-shrink-0"}),Ie.jsx("span",{children:r})]})]}),e.actionNeeded&&Ie.jsxs("div",{className:"mt-3 pt-3 border-t border-gray-100 flex items-start gap-2",children:[Ie.jsx(pm,{className:"w-4 h-4 text-amber-500 flex-shrink-0 mt-0.5"}),Ie.jsx("p",{className:"text-xs text-amber-700",children:yae(e)})]})]})})}function xae({emails:e,primaryColor:t,isLoading:r,error:n,onRetry:i}){var a;return r?Ie.jsxs("div",{className:"flex flex-col items-center justify-center py-12",children:[Ie.jsx(If,{className:"w-8 h-8 animate-spin text-gray-400 mb-3"}),Ie.jsx("p",{className:"text-sm text-gray-500",children:"Loading emails..."})]}):n?Ie.jsxs("div",{className:"flex flex-col items-center justify-center py-12",children:[Ie.jsx(pf,{className:"w-8 h-8 text-red-400 mb-3"}),Ie.jsx("p",{className:"text-sm text-red-500 mb-2",children:n}),Ie.jsx("button",{onClick:i,className:"text-xs text-red-700 underline",children:"Try again"})]}):0===e.length?Ie.jsxs("div",{className:"flex flex-col items-center justify-center py-12",children:[Ie.jsx(Pf,{className:"w-12 h-12 text-gray-300 mb-3"}),Ie.jsx("p",{className:"text-sm text-gray-500",children:"No emails found"})]}):Ie.jsxs("div",{className:"p-4 space-y-4",children:[Ie.jsxs("div",{className:"flex items-start gap-3",children:[Ie.jsx("div",{className:"w-10 h-10 rounded-lg flex items-center justify-center",style:{backgroundColor:`${t}15`},children:Ie.jsx(Pf,{className:"w-5 h-5",style:{color:t}})}),Ie.jsxs("div",{className:"flex-1 min-w-0",children:[Ie.jsx("h3",{className:"text-base font-semibold text-gray-900",children:(null==(a=e[0])?void 0:a.subject)||"No Subject"}),Ie.jsxs("p",{className:"text-xs text-gray-500 mt-0.5",children:[e.length," email",1!==e.length?"s":""," in thread"]})]})]}),e.map((e,r)=>{var n,i,a;const o="outgoing"===(null==(n=e.metadata)?void 0:n.direction),s=(null==(a=null==(i=e.senderEmail)?void 0:i.split("@")[0])?void 0:a.slice(0,2).toUpperCase())||"U";return Ie.jsxs(ch.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.05*r},className:"rounded-lg border "+(o?"border-blue-200 bg-blue-50":"border-gray-200 bg-white"),children:[Ie.jsxs("div",{className:"px-4 py-3 border-b border-gray-100 flex items-center justify-between",children:[Ie.jsxs("div",{className:"flex items-center gap-2",children:[Ie.jsx("div",{className:"w-8 h-8 rounded-full flex items-center justify-center text-white text-xs font-medium",style:{backgroundColor:o?"#3b82f6":t},children:s}),Ie.jsxs("div",{children:[Ie.jsx("p",{className:"text-sm font-medium text-gray-900",children:e.senderEmail}),Ie.jsxs("p",{className:"text-xs text-gray-500",children:["To: ",e.receiverEmail]})]})]}),Ie.jsx("span",{className:"text-xs text-gray-400 flex-shrink-0",children:vv(e.receivedDatetime).format("MMM DD, YYYY h:mm A")})]}),Ie.jsx("div",{className:"px-4 py-3",children:e.bodyHtml?Ie.jsx("div",{className:"text-sm text-gray-700 prose prose-sm max-w-none",dangerouslySetInnerHTML:{__html:e.bodyHtml}}):Ie.jsx("p",{className:"text-sm text-gray-700 whitespace-pre-wrap",children:e.bodyText})})]},e.id)})]})}function wae(){const{leadId:e}=pg(),t=hg(),{theme:r}=ea(),n=r.primaryColor||"#1e40af",i=rae(e=>e.leads).find(t=>t.id===e)??null,[a,o]=Te.useState([]),[s,A]=Te.useState(!0),[l,c]=Te.useState(null),u=async()=>{if(e){A(!0),c(null);try{const t=await eae.getLeadEmails(e);o(t.emails)}catch(t){c(t.message||"Failed to load emails")}finally{A(!1)}}};return Te.useEffect(()=>{u()},[e]),i||s?Ie.jsxs("div",{className:"flex flex-col h-full bg-gray-50",style:{fontFamily:r.fontFamily},children:[Ie.jsxs("div",{className:"px-4 py-3 bg-white border-b flex items-center gap-3",children:[Ie.jsxs("button",{onClick:()=>t("/team-view"),className:"flex items-center gap-1 text-sm text-gray-600 hover:text-gray-900",children:[Ie.jsx(Xp,{className:"w-4 h-4"}),Ie.jsx("span",{children:"Back"})]}),Ie.jsx("h2",{className:"text-sm font-semibold text-gray-900",children:"Lead Details"})]}),i&&Ie.jsx("div",{className:"p-4",children:Ie.jsx(vae,{item:i,primaryColor:n})}),Ie.jsx("div",{className:"flex-1 overflow-y-auto mx-4 mb-4 bg-white rounded-lg border border-gray-200 shadow-sm",children:Ie.jsx(xae,{emails:a,primaryColor:n,isLoading:s,error:l,onRetry:u})})]}):Ie.jsxs("div",{className:"flex flex-col h-full bg-gray-50",style:{fontFamily:r.fontFamily},children:[Ie.jsx("div",{className:"px-4 py-3 bg-white border-b flex items-center gap-3",children:Ie.jsxs("button",{onClick:()=>t("/team-view"),className:"flex items-center gap-1 text-sm text-gray-600 hover:text-gray-900",children:[Ie.jsx(Xp,{className:"w-4 h-4"}),Ie.jsx("span",{children:"Back"})]})}),Ie.jsx("div",{className:"flex-1 flex items-center justify-center",children:Ie.jsxs("div",{className:"text-center",children:[Ie.jsx(pf,{className:"w-12 h-12 text-gray-300 mx-auto mb-3"}),Ie.jsx("p",{className:"text-gray-500",children:"Lead not found. Please go back and try again."})]})})]})}function bae(){return Ie.jsxs(Fg,{children:[Ie.jsx(Sg,{path:"/",element:Ie.jsx(Xv,{})}),Ie.jsx(Sg,{path:"/search",element:Ie.jsx(Ly,{})}),Ie.jsx(Sg,{path:"/results",element:Ie.jsx(Wy,{})}),Ie.jsx(Sg,{path:"/call-details/:callId",element:Ie.jsx(nv,{})}),Ie.jsx(Sg,{path:"/call-logs/:callId",element:Ie.jsx(nv,{})}),Ie.jsx(Sg,{path:"/history",element:Ie.jsx(cv,{})}),Ie.jsx(Sg,{path:"/call-logs",element:Ie.jsx(hv,{})}),Ie.jsx(Sg,{path:"/email-leads",element:Ie.jsx(Ev,{})}),Ie.jsx(Sg,{path:"/email-leads/:leadId",element:Ie.jsx(Uv,{})}),Ie.jsx(Sg,{path:"/email-leads/:leadId/action",element:Ie.jsx(Wv,{})}),Ie.jsx(Sg,{path:"/data-agent",element:Ie.jsx(Dk,{})}),Ie.jsx(Sg,{path:"/v2-data-agent",element:Ie.jsx(qie,{})}),Ie.jsx(Sg,{path:"/team-view",element:Ie.jsx(gae,{})}),Ie.jsx(Sg,{path:"/team-view/:leadId",element:Ie.jsx(wae,{})}),Ie.jsx(Sg,{path:"*",element:Ie.jsx(kg,{to:"/",replace:!0})})]})}class Bae extends Te.Component{constructor(e){super(e),Se(this,"handleReset",()=>{this.setState({hasError:!1,error:void 0})}),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error("ErrorBoundary caught an error:",e,t)}render(){return this.state.hasError?this.props.fallback?this.props.fallback:Ie.jsx("div",{className:"flex items-center justify-center h-full p-4",children:Ie.jsxs(ky,{className:"p-6 max-w-md w-full text-center",children:[Ie.jsx("div",{className:"flex justify-center mb-4",children:Ie.jsx(pm,{className:"h-12 w-12 text-red-500"})}),Ie.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Something went wrong"}),Ie.jsx("p",{className:"text-gray-600 mb-4 text-sm",children:"An error occurred while loading this page. Please try again."}),Ie.jsxs("div",{className:"space-y-2",children:[Ie.jsx(Np,{onClick:this.handleReset,className:"w-full",children:"Try Again"}),Ie.jsx(Np,{variant:"outline",onClick:()=>window.location.reload(),className:"w-full",children:"Reload Page"})]}),"development"===process.env.NODE_ENV&&this.state.error&&Ie.jsxs("details",{className:"mt-4 text-left",children:[Ie.jsx("summary",{className:"cursor-pointer text-sm text-gray-500",children:"Error Details"}),Ie.jsx("pre",{className:"mt-2 text-xs bg-gray-100 p-2 rounded overflow-auto",children:this.state.error.stack})]})]})}):this.props.children}}class Cae{static async login2FA(e,t){var r,n,i;try{return(await Vi.post("/workspace/users/tenant/application/2_fa_auth",{email:e,tenant_id:t})).data}catch(a){if(console.log("Login 2FA Error:",a),404===(null==(r=a.response)?void 0:r.status))throw new Error("User not found");if(null==(i=null==(n=a.response)?void 0:n.data)?void 0:i.detail)throw new Error(a.response.data.detail);throw new Error("Failed to send OTP. Please try again.")}}static async verifyOTP(e,t,r){var n,i,a,o;try{const n=await Vi.post("/workspace/users/tenant/application/otp_validate",{email:e,tenant_id:t,otp:r});return console.log("Verify OTP Response:",n.data),n.data}catch(s){if(400===(null==(n=s.response)?void 0:n.status)||401===(null==(i=s.response)?void 0:i.status))throw new Error("Invalid or expired OTP");if(null==(o=null==(a=s.response)?void 0:a.data)?void 0:o.detail)throw new Error(s.response.data.detail);throw new Error("Failed to verify OTP. Please try again.")}}}function Eae({onAuthSuccess:e}){const{theme:t,tenantId:r,email:n}=ea(),[i,a]=Te.useState({step:"email",email:n||"",otp:"",isLoading:!1,error:null,otpSent:!1,countdown:0}),o=Te.useRef(null),s=Te.useRef(null),A=Te.useRef(null);Te.useEffect(()=>{var e,t;"email"===i.step?null==(e=o.current)||e.focus():"otp"===i.step&&(null==(t=s.current)||t.focus())},[i.step]),Te.useEffect(()=>(i.countdown>0&&(A.current=setTimeout(()=>{a(e=>({...e,countdown:e.countdown-1}))},1e3)),()=>{A.current&&clearTimeout(A.current)}),[i.countdown]);const l=async e=>{var t,n,o;if(e.preventDefault(),o=i.email,/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(o))if(a(e=>({...e,isLoading:!0,error:null})),r)try{await Cae.login2FA(i.email,r);a(e=>({...e,step:"otp",isLoading:!1,otpSent:!0,countdown:60}))}catch(s){console.log("Login 2FA Error:",null==(t=s.response)?void 0:t.data);let e="Failed to send OTP. Please try again.";404===(null==(n=s.response)?void 0:n.status)?e="User not found. Please check your email address.":s.message&&(e=s.message),a(t=>({...t,isLoading:!1,error:e}))}else a(e=>({...e,isLoading:!1,error:"Tenant ID is required"}));else a(e=>({...e,error:"Please enter a valid email address"}))},c=async t=>{var n,o;if(t.preventDefault(),o=i.otp,/^\d{6}$/.test(o))if(a(e=>({...e,isLoading:!0,error:null})),r)try{const t=await Cae.verifyOTP(i.email,r,i.otp);console.log("Verify OTP Response:",t),Bi(t.data.bearer),Fi(),a(e=>({...e,step:"success",isLoading:!1})),setTimeout(()=>{e(i.email,t.data.bearer)},1500)}catch(s){let e="Invalid OTP. Please try again.";400===(null==(n=s.response)?void 0:n.status)?e="Invalid or expired OTP. Please try again.":s.message&&(e=s.message),a(t=>({...t,isLoading:!1,error:e}))}else a(e=>({...e,isLoading:!1,error:"Tenant ID is required"}));else a(e=>({...e,error:"Please enter a valid 6-digit OTP"}))},u=async()=>{var e;if(!(i.countdown>0))if(a(e=>({...e,isLoading:!0,error:null})),r)try{await Cae.login2FA(i.email,r);a(e=>({...e,isLoading:!1,countdown:60,error:null}))}catch(t){let r="Failed to resend OTP. Please try again.";404===(null==(e=t.response)?void 0:e.status)?r="User not found. Please check your email address.":t.message&&(r=t.message),a(e=>({...e,isLoading:!1,error:r}))}else a(e=>({...e,isLoading:!1,error:"Tenant ID is required"}))},d=()=>{a(e=>({...e,step:"email",otp:"",error:null,otpSent:!1,countdown:0}))};return Ie.jsx("div",{className:"flex flex-col h-full w-full",style:{fontFamily:t.fontFamily},children:Ie.jsx("div",{className:"flex-1 flex items-center justify-center px-6 py-8 w-full",children:Ie.jsxs("div",{className:"w-full max-w-md mx-auto",children:[Ie.jsxs(hl,{mode:"wait",children:["email"===i.step&&Ie.jsxs(ch.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.3},className:"space-y-6",children:[Ie.jsxs("div",{className:"text-center space-y-2",children:[Ie.jsx("div",{className:"w-16 h-16 rounded-full flex items-center justify-center mx-auto mb-4",style:{backgroundColor:t.primaryColor+"20"},children:Ie.jsx(Pf,{className:"h-8 w-8",style:{color:t.primaryColor}})}),Ie.jsx("h2",{className:"text-xl font-semibold",style:{fontFamily:t.fontFamily,color:t.headerBg},children:"Welcome Back"}),Ie.jsx("p",{className:"text-gray-600 text-sm",style:{fontFamily:t.fontFamily},children:"Enter your email address to continue"})]}),Ie.jsxs("form",{onSubmit:l,className:"space-y-4",children:[Ie.jsx("div",{children:Ie.jsx(Sy,{ref:o,type:"email",value:i.email,onChange:e=>a(t=>({...t,email:e.target.value,error:null})),placeholder:"Enter your email address",disabled:i.isLoading,className:"w-full",style:{fontFamily:t.fontFamily},"aria-label":"Email address"})}),Ie.jsx(Np,{type:"submit",disabled:!i.email||i.isLoading,className:"w-full flex items-center justify-center gap-2",style:{backgroundColor:t.primaryColor,fontFamily:t.fontFamily},children:i.isLoading?Ie.jsx(If,{className:"h-4 w-4 animate-spin text-white"}):Ie.jsxs(Ie.Fragment,{children:["Continue",Ie.jsx(Jp,{className:"h-4 w-4"})]})})]})]},"email"),"otp"===i.step&&Ie.jsxs(ch.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.3},className:"space-y-6",children:[Ie.jsxs("div",{className:"text-center space-y-2",children:[Ie.jsx("div",{className:"w-16 h-16 rounded-full flex items-center justify-center mx-auto mb-4",style:{backgroundColor:t.primaryColor+"20"},children:Ie.jsx(am,{className:"h-8 w-8",style:{color:t.primaryColor}})}),Ie.jsx("h2",{className:"text-xl font-semibold",style:{fontFamily:t.fontFamily,color:t.headerBg},children:"Verify Your Email"}),Ie.jsx("p",{className:"text-gray-600 text-sm",style:{fontFamily:t.fontFamily},children:"We've sent a 6-digit code to"}),Ie.jsx("p",{className:"font-medium text-sm",style:{fontFamily:t.fontFamily,color:t.primaryColor},children:i.email})]}),Ie.jsxs("form",{onSubmit:c,className:"space-y-4",children:[Ie.jsx("div",{children:Ie.jsx(Sy,{ref:s,type:"text",inputMode:"numeric",pattern:"[0-9]*",maxLength:6,value:i.otp,onChange:e=>{const t=e.target.value.replace(/\D/g,"");a(e=>({...e,otp:t,error:null}))},placeholder:"Enter 6-digit code",disabled:i.isLoading,className:"w-full text-center text-lg tracking-widest",style:{fontFamily:t.fontFamily},"aria-label":"One-time password"})}),Ie.jsx(Np,{type:"submit",disabled:6!==i.otp.length||i.isLoading,className:"w-full flex items-center justify-center gap-2",style:{backgroundColor:t.primaryColor,fontFamily:t.fontFamily},children:i.isLoading?Ie.jsx(If,{className:"h-4 w-4 animate-spin text-white"}):Ie.jsxs(Ie.Fragment,{children:["Verify Code",Ie.jsx(Jp,{className:"h-4 w-4"})]})})]}),Ie.jsxs("div",{className:"text-center space-y-2",children:[Ie.jsx("p",{className:"text-sm text-gray-600",style:{fontFamily:t.fontFamily},children:"Didn't receive the code?"}),Ie.jsx(Np,{variant:"ghost",size:"sm",onClick:u,disabled:i.countdown>0||i.isLoading,style:{fontFamily:t.fontFamily},children:i.countdown>0?`Resend in ${i.countdown}s`:"Resend Code"}),Ie.jsx(Np,{variant:"ghost",size:"sm",onClick:d,disabled:i.isLoading,style:{fontFamily:t.fontFamily},children:"Change Email"})]})]},"otp"),"success"===i.step&&Ie.jsxs(ch.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.5},className:"text-center space-y-6",children:[Ie.jsx("div",{className:"w-20 h-20 rounded-full flex items-center justify-center mx-auto",style:{backgroundColor:"#10b98120"},children:Ie.jsx(ff,{className:"h-10 w-10 text-green-500"})}),Ie.jsxs("div",{className:"space-y-2",children:[Ie.jsx("h2",{className:"text-xl font-semibold text-green-600",style:{fontFamily:t.fontFamily},children:"Authentication Successful!"}),Ie.jsx("p",{className:"text-gray-600 text-sm",style:{fontFamily:t.fontFamily},children:"Redirecting to dashboard..."})]}),Ie.jsx("div",{className:"flex justify-center",children:Ie.jsx(If,{className:"h-6 w-6 animate-spin text-primary"})})]},"success")]}),Ie.jsx(hl,{children:i.error&&Ie.jsxs(ch.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"mt-4 p-3 bg-red-50 border border-red-200 rounded-lg flex items-center gap-2",children:[Ie.jsx(pf,{className:"h-4 w-4 text-red-500 flex-shrink-0"}),Ie.jsx("p",{className:"text-sm text-red-700",style:{fontFamily:t.fontFamily},children:i.error})]})})]})})})}function kae({error:e,onRetry:t,isRetrying:r=!1,errorType:n="validation"}){const i="network"===n||"server"===n||"rate_limit"===n;return Ie.jsx("div",{className:"flex-1 flex items-center justify-center p-6",children:Ie.jsxs("div",{className:"max-w-sm w-full text-center",children:[Ie.jsx("div",{className:"flex justify-center mb-4",children:Ie.jsx("div",{className:"p-3 rounded-full "+("rate_limit"===n?"bg-orange-100":"bg-red-100"),children:(()=>{switch(n){case"network":return Ie.jsx(xm,{className:"w-6 h-6 text-red-600"});case"rate_limit":return Ie.jsx(pm,{className:"w-6 h-6 text-orange-600"});default:return Ie.jsx(pm,{className:"w-6 h-6 text-red-600"})}})()})}),Ie.jsx("h2",{className:"text-lg font-semibold text-gray-900 mb-2",children:(()=>{switch(n){case"network":return"Connection Error";case"rate_limit":return"Rate Limit Exceeded";case"server":return"Server Error";default:return"Access Denied"}})()}),Ie.jsx("p",{className:"text-gray-600 text-sm mb-4",children:e}),Ie.jsxs("div",{className:"bg-gray-50 rounded-lg p-3 mb-4",children:[Ie.jsxs("div",{className:"flex items-center justify-center mb-2",children:[Ie.jsx(Nf,{className:"w-4 h-4 text-gray-500 mr-2"}),Ie.jsx("span",{className:"text-xs font-medium text-gray-700",children:"network"===n?"Connection Issue":"API Key Required"})]}),Ie.jsx("p",{className:"text-xs text-gray-500",children:(()=>{switch(n){case"network":return"Unable to connect to the validation server. Please check your internet connection.";case"rate_limit":return"Too many validation requests. Please wait a moment before trying again.";case"server":return"The validation server is currently unavailable. Please try again later.";default:return"Please provide a valid Pangents API key to access the widget."}})()})]}),i&&t&&Ie.jsx(Np,{onClick:t,disabled:r,variant:"outline",size:"sm",className:"mb-4",children:r?Ie.jsxs(Ie.Fragment,{children:[Ie.jsx(Xf,{className:"w-4 h-4 mr-2 animate-spin"}),"Retrying..."]}):Ie.jsxs(Ie.Fragment,{children:[Ie.jsx(Xf,{className:"w-4 h-4 mr-2"}),"Try Again"]})}),Ie.jsx("div",{className:"text-xs text-gray-400",children:Ie.jsx("p",{children:"validation"===n?"Contact your administrator for API key access.":"If the problem persists, contact support."})})]})})}function Sae(){return function(){if("undefined"==typeof window)return null;const e=new URLSearchParams(window.location.search);return e.get("apiKey")||e.get("api_key")}()||("undefined"!=typeof window&&(null==(e=window.PangentsConfig)?void 0:e.apiKey)?window.PangentsConfig.apiKey:null);var e}const jae=(e,t,r,n)=>({message:e,status:t,code:r,details:n,timestamp:(new Date).toISOString()}),Fae="/settings/applications/validate",Qae="/workspace/users/tenant/application/auth",Nae=9e5,Uae="api_key_validation_",Oae="pangents_bearer_token",Iae=3,Tae=1e3,Pae=1e4,Mae=10,Dae=6e4,Lae="api_key_validation_rate_limit";class Hae{static sanitizeApiKey(e){if("string"!=typeof e)throw new Error("API key must be a string");const t=e.trim().replace(/[\x00-\x1F\x7F]/g,"");if(t.length<this.MIN_KEY_LENGTH||t.length>this.MAX_KEY_LENGTH)throw new Error(`API key length must be between ${this.MIN_KEY_LENGTH} and ${this.MAX_KEY_LENGTH} characters`);return t}static validateApiKeyFormat(e){return this.API_KEY_PATTERN.test(e)}static isValidApiKey(e){try{const t=this.sanitizeApiKey(e);return this.validateApiKeyFormat(t)?{isValid:!0}:{isValid:!1,error:"Invalid API key format."}}catch(t){return{isValid:!1,error:t instanceof Error?t.message:"Invalid API key format."}}}}Se(Hae,"API_KEY_PATTERN",/^[A-Za-z0-9_-]{32,64}$/),Se(Hae,"MAX_KEY_LENGTH",100),Se(Hae,"MIN_KEY_LENGTH",20);class _ae{static getRequestHistory(){try{const e=localStorage.getItem(Lae);return e?JSON.parse(e):[]}catch{return[]}}static setRequestHistory(e){try{localStorage.setItem(Lae,JSON.stringify(e))}catch{}}static isRateLimited(){const e=Date.now();return this.getRequestHistory().filter(t=>e-t<Dae).length>=Mae}static recordRequest(){const e=Date.now(),t=[...this.getRequestHistory(),e].filter(t=>e-t<Dae);this.setRequestHistory(t)}static getRemainingRequests(){const e=Date.now(),t=this.getRequestHistory().filter(t=>e-t<Dae);return Math.max(0,Mae-t.length)}static getResetTime(){const e=this.getRequestHistory();if(0===e.length)return 0;return Math.min(...e)+Dae}}class Rae{static getCacheKey(e){const t=btoa(e).replace(/[^a-zA-Z0-9]/g,"").substring(0,16);return`${Uae}${t}`}static get(e){try{if(this.shouldClearCacheForApiKey(e))return this.clear(),null;const t=this.getCacheKey(e),r=localStorage.getItem(t);if(!r)return null;const n=JSON.parse(r);return Date.now()>n.expiresAt?(this.remove(e),null):n}catch{return null}}static shouldClearCacheForApiKey(e){try{const{apiKeyTracker:t}=require("../cache/ApiKeyTracker");return t.getCurrentApiKey()||t.initialize(e),t.hasApiKeyChanged(e)?(t.updateApiKey(e),!0):t.shouldClearCache()}catch(t){return console.warn("[ValidationCache] Failed to check API key alignment:",t),!1}}static set(e,t){try{const n=this.getCacheKey(e);localStorage.setItem(n,JSON.stringify(t));try{const{apiKeyTracker:e}=require("../cache/ApiKeyTracker");e.markCacheAligned()}catch(r){console.warn("[ValidationCache] Failed to mark cache as aligned:",r)}}catch{}}static remove(e){try{const t=this.getCacheKey(e);localStorage.removeItem(t)}catch{}}static clear(){try{Object.keys(localStorage).forEach(e=>{e.startsWith(Uae)&&localStorage.removeItem(e)});try{const{apiKeyTracker:e}=require("../cache/ApiKeyTracker");e.markCacheAligned()}catch(e){console.warn("[ValidationCache] Failed to reset cache alignment:",e)}}catch{}}static getStats(){try{const e=Object.keys(localStorage).filter(e=>e.startsWith(Uae));let t=0,r=0;const n=Date.now();return e.forEach(e=>{try{const i=localStorage.getItem(e);if(i){const e=JSON.parse(i);n>e.expiresAt?r++:t++}}catch{}}),{totalCached:e.length,validCached:t,expiredCached:r}}catch{return{totalCached:0,validCached:0,expiredCached:0}}}}class Kae{static recordCacheHit(){this.metrics.cacheHits++,this.metrics.totalRequests++}static recordCacheMiss(){this.metrics.cacheMisses++}static recordValidationSuccess(e){this.metrics.validationSuccesses++,this.metrics.totalRequests++,this.updateAverageResponseTime(e),this.metrics.lastRequestTime=Date.now()}static recordValidationFailure(e){this.metrics.validationFailures++,this.metrics.totalRequests++,this.updateAverageResponseTime(e),this.metrics.lastRequestTime=Date.now()}static recordNetworkError(){this.metrics.networkErrors++,this.metrics.totalRequests++,this.metrics.lastRequestTime=Date.now()}static updateAverageResponseTime(e){const t=this.metrics.validationSuccesses+this.metrics.validationFailures;this.metrics.averageResponseTime=1===t?e:(this.metrics.averageResponseTime*(t-1)+e)/t}static getMetrics(){return{...this.metrics}}static getCacheHitRate(){const e=this.metrics.cacheHits+this.metrics.cacheMisses;return e>0?this.metrics.cacheHits/e:0}static getSuccessRate(){const e=this.metrics.validationSuccesses+this.metrics.validationFailures;return e>0?this.metrics.validationSuccesses/e:0}static reset(){this.metrics={totalRequests:0,cacheHits:0,cacheMisses:0,validationSuccesses:0,validationFailures:0,networkErrors:0,averageResponseTime:0,lastRequestTime:0}}}Se(Kae,"metrics",{totalRequests:0,cacheHits:0,cacheMisses:0,validationSuccesses:0,validationFailures:0,networkErrors:0,averageResponseTime:0,lastRequestTime:0});class zae{static async makeTenantAuthRequest(e,t,r,n=0){var i,a,o,s,A,l;const c=Date.now();try{const n=await Vi.post(Qae,{email:t,tenant_id:r},{timeout:Pae,headers:{"Content-Type":"application/json",api_key:e,request_origin:"tenant"},transformRequest:[e=>JSON.stringify(e)],transformResponse:[e=>"string"==typeof e?JSON.parse(e):e]}),i=Date.now()-c;return Kae.recordValidationSuccess(i),n.data}catch(u){const d=Date.now()-c;if(401===(null==(i=u.response)?void 0:i.status))throw Kae.recordValidationFailure(d),jae("Invalid API key or credentials",401,"INVALID_API_KEY");if(403===(null==(a=u.response)?void 0:a.status))throw Kae.recordValidationFailure(d),jae("Access forbidden. Invalid tenant or email.",403,"FORBIDDEN");if(429===(null==(o=u.response)?void 0:o.status))throw Kae.recordValidationFailure(d),jae("Rate limit exceeded",429,"RATE_LIMIT_EXCEEDED");if(n<Iae&&(!u.response||u.response.status>=500))return await new Promise(e=>setTimeout(e,Tae*Math.pow(2,n))),this.makeTenantAuthRequest(e,t,r,n+1);throw Kae.recordNetworkError(),jae((null==(A=null==(s=u.response)?void 0:s.data)?void 0:A.detail)||"Network error occurred",(null==(l=u.response)?void 0:l.status)||0,"NETWORK_ERROR")}}static async makeValidationRequest(e,t,r=0){var n,i,a,o,s;const A=Date.now();try{const r=await Vi.post(Fae,{api_key:e,tenant_id:t},{timeout:Pae,headers:{"Content-Type":"application/json",api_key:e,request_origin:"tenant"}}),n=Date.now()-A;return Kae.recordValidationSuccess(n),r.data}catch(l){const c=Date.now()-A;if(401===(null==(n=l.response)?void 0:n.status))throw Kae.recordValidationFailure(c),jae("Invalid API key",401,"INVALID_API_KEY");if(429===(null==(i=l.response)?void 0:i.status))throw Kae.recordValidationFailure(c),jae("Rate limit exceeded",429,"RATE_LIMIT_EXCEEDED");if(r<Iae&&(!l.response||l.response.status>=500))return await new Promise(e=>setTimeout(e,Tae*Math.pow(2,r))),this.makeValidationRequest(e,t,r+1);throw Kae.recordNetworkError(),jae((null==(o=null==(a=l.response)?void 0:a.data)?void 0:o.detail)||"Network error occurred",(null==(s=l.response)?void 0:s.status)||0,"NETWORK_ERROR")}}static saveBearerToken(e){try{localStorage.setItem(Oae,e)}catch{}}static getBearerToken(){try{return localStorage.getItem(Oae)}catch{return null}}static clearBearerToken(){try{localStorage.removeItem(Oae)}catch{}}static saveAuthEmail(e){try{localStorage.setItem("pangents_auth_email",e)}catch{}}static getAuthEmail(){try{return localStorage.getItem("pangents_auth_email")}catch{return null}}static clearAuthEmail(){try{localStorage.removeItem("pangents_auth_email")}catch{}}static hasValidSession(){const e=this.getBearerToken(),t=this.getAuthEmail();return!(!e||!t)}static getExistingSession(){const e=this.getBearerToken(),t=this.getAuthEmail();return e&&t?{bearerToken:e,email:t}:null}static clearAllAuthData(){this.clearBearerToken(),this.clearAuthEmail(),this.clearCache()}static async validateWithTenantAuth(e,t,r){var n;const i=this.getExistingSession();if(i)return console.log("[ApiKeyValidation] Found existing session, using cached auth"),{isValid:!0,bearerToken:i.bearerToken,email:i.email,fromCache:!0};try{if(_ae.isRateLimited()){const e=_ae.getResetTime();return{isValid:!1,error:`Rate limit exceeded. Please try again in ${Math.ceil((e-Date.now())/1e3)} seconds.`}}_ae.recordRequest();const i=await this.makeTenantAuthRequest(e,t,r);return console.log("[ApiKeyValidation] Auth response:",i),i.status&&(null==(n=i.data)?void 0:n.bearer)?(this.saveBearerToken(i.data.bearer),t&&this.saveAuthEmail(t),{isValid:!0,bearerToken:i.data.bearer,email:t,fromCache:!1}):{isValid:!1,error:"Authentication failed. No bearer token received."}}catch(a){const e=(null==a?void 0:a.message)||"Authentication request failed";return this.clearBearerToken(),{isValid:!1,error:e}}}static async validateApiKey(e,t){try{const r=Hae.sanitizeApiKey(e),n=Hae.isValidApiKey(r);if(!n.isValid)return{isValid:!1,error:n.error};if(_ae.isRateLimited()){const e=_ae.getResetTime();return{isValid:!1,error:`Rate limit exceeded. Please try again in ${Math.ceil((e-Date.now())/1e3)} seconds.`}}const i=Rae.get(r);if(console.log("cached",i),i)return Kae.recordCacheHit(),{isValid:i.isValid,response:i.response,error:i.error,fromCache:!0};Kae.recordCacheMiss(),_ae.recordRequest();const a=await this.makeValidationRequest(r,t),o=a.success&&a.data.valid,s=Date.now(),A={isValid:o,response:a.data,cachedAt:s,expiresAt:s+Nae};return Rae.set(r,A),{isValid:o,response:a.data,fromCache:!1}}catch(r){const t=(null==r?void 0:r.message)||"Validation request failed";console.log("Text Error",t);const n=Date.now(),i={isValid:!1,error:t,cachedAt:n,expiresAt:n+Nae/3};try{const t=Hae.sanitizeApiKey(e);Rae.set(t,i)}catch{}return{isValid:!1,error:t}}}static clearCache(){Rae.clear()}static getCacheStats(){return Rae.getStats()}static getMetrics(){return{...Kae.getMetrics(),cacheHitRate:Kae.getCacheHitRate(),successRate:Kae.getSuccessRate(),rateLimitInfo:{remainingRequests:_ae.getRemainingRequests(),resetTime:_ae.getResetTime(),isLimited:_ae.isRateLimited()}}}static resetMetrics(){Kae.reset()}static async prevalidateApiKey(e){try{await this.validateApiKey(e)}catch{}}static async validateMultipleApiKeys(e){return(await Promise.allSettled(e.map(async e=>({apiKey:e,...await this.validateApiKey(e)})))).map((t,r)=>"fulfilled"===t.status?t.value:{apiKey:e[r],isValid:!1,error:"Validation failed"})}}const Vae="pangents_current_api_key",$ae="pangents_cache_api_key_alignment",Wae=class e{constructor(){Se(this,"currentApiKey",null),Se(this,"listeners",new Set),Se(this,"initialized",!1)}static getInstance(){return e.instance||(e.instance=new e),e.instance}initialize(e){if(this.initialized)return;const t=this.getStoredApiKey(),r=t!==e;this.currentApiKey=e,this.storeApiKey(e);let n="initial_load";r&&null!==t?n="key_change":r||null===t||(n="page_reload"),(r||"initial_load"===n)&&this.notifyListeners({previousKey:t,currentKey:e,timestamp:Date.now(),reason:n}),this.initialized=!0}updateApiKey(e){const t=this.currentApiKey,r=t!==e;return r&&(this.currentApiKey=e,this.storeApiKey(e),this.notifyListeners({previousKey:t,currentKey:e,timestamp:Date.now(),reason:"key_change"})),r}getCurrentApiKey(){return this.currentApiKey}hasApiKeyChanged(e){return this.currentApiKey!==e}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}getCacheAlignment(){const e=this.getCacheAlignmentInfo(),t=e.apiKey===this.currentApiKey;return{currentApiKey:this.currentApiKey,cacheApiKey:e.apiKey,isAligned:t,lastUpdate:e.timestamp}}markCacheAligned(){this.setCacheAlignmentInfo({apiKey:this.currentApiKey,timestamp:Date.now()})}shouldClearCache(){const e=this.getCacheAlignment();return!e.isAligned&&null!==e.cacheApiKey}reset(){this.currentApiKey=null,this.initialized=!1,this.listeners.clear(),this.clearStoredData()}getStoredApiKey(){try{return localStorage.getItem(Vae)}catch(e){return console.warn("[ApiKeyTracker] Failed to get stored API key:",e),null}}storeApiKey(e){try{e?localStorage.setItem(Vae,e):localStorage.removeItem(Vae)}catch(t){console.warn("[ApiKeyTracker] Failed to store API key:",t)}}getCacheAlignmentInfo(){try{const e=localStorage.getItem($ae);if(e)return JSON.parse(e)}catch(e){console.warn("[ApiKeyTracker] Failed to get cache alignment info:",e)}return{apiKey:null,timestamp:0}}setCacheAlignmentInfo(e){try{localStorage.setItem($ae,JSON.stringify(e))}catch(t){console.warn("[ApiKeyTracker] Failed to set cache alignment info:",t)}}notifyListeners(e){this.listeners.forEach(t=>{try{t(e)}catch(r){console.error("[ApiKeyTracker] Error in listener:",r)}})}clearStoredData(){try{localStorage.removeItem(Vae),localStorage.removeItem($ae)}catch(e){console.warn("[ApiKeyTracker] Failed to clear stored data:",e)}}};Se(Wae,"instance",null);const Gae=Wae.getInstance();function qae(){const{closeWidget:e,theme:t,isAuthenticated:r,user:n,logout:i,environment:a}=ea(),[o,s]=Te.useState(!1),[A,l]=Te.useState(!1);return Te.useEffect(()=>{const e=new CustomEvent("widget:aspect_ratio_lock",{detail:{locked:A}});window.dispatchEvent(e)},[A]),Ie.jsxs("div",{className:"flex items-center justify-between p-3 sm:p-4 border-b relative overflow-hidden",style:{background:`\n linear-gradient(\n to right,\n ${t.primaryColor}ff 0%,\n ${t.primaryColor}f2 40%,\n ${t.primaryColor}cc 100%\n )\n `,color:t.headerText,fontFamily:t.fontFamily},children:[Ie.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{background:"\n linear-gradient(\n to right,\n transparent 0%,\n #ffffff11 20%,\n #ffffff44 45%,\n #ffffff66 50%,\n #ffffff44 55%,\n #ffffff11 80%,\n transparent 100%\n)\n ",backgroundSize:"300% 100%",animation:"headerShimmer 3s linear infinite",mixBlendMode:"screen"}}),Ie.jsx("div",{className:"flex items-center gap-2",children:Ie.jsx("div",{className:"flex flex-col",children:Ie.jsxs("div",{className:"flex items-center gap-2",children:[Ie.jsx("h2",{id:"search-modal-title",className:"font-semibold",children:"Ultra Agents"}),a&&"production"!==a&&Ie.jsx("span",{className:"px-2 py-1 text-xs font-medium rounded-full bg-orange-500 text-white border border-orange-500",children:"development"===a?"DEV":"STAGING"})]})})}),Ie.jsxs("div",{className:"flex items-center gap-2",children:[r&&Ie.jsx(Np,{variant:"ghost",size:"sm",onClick:i,className:"h-8 px-2 text-xs hover:bg-white/10",style:{color:t.headerText},"aria-label":"Logout",children:Ie.jsx(qf,{className:"h-4 w-4"})}),Ie.jsx(Np,{variant:"ghost",size:"sm",onClick:()=>{s(e=>{const t=!e;return window.dispatchEvent(new CustomEvent("widget:maximize_toggle",{detail:{maximized:t}})),t})},className:"h-8 w-8 p-0 hover:bg-white/10",style:{color:t.headerText},"aria-label":o?"Exit full-screen":"Enter full-screen",children:o?Ie.jsx(Kf,{className:"h-4 w-4"}):Ie.jsx(Lf,{className:"h-4 w-4"})}),Ie.jsxs(Np,{variant:"ghost",size:"sm",onClick:e,className:"h-8 w-8 p-0 hover:bg-white/10",style:{color:t.headerText},"aria-label":"Close search modal",children:[Ie.jsx(bm,{className:"h-4 w-4"}),Ie.jsx("span",{className:"sr-only",children:"Close search"})]})]})]})}function Yae(){const e=cg();return Te.useEffect(()=>{e.pathname&&(Li.saveCurrentRoute(e.pathname),console.log("[RouteTracker] Saved route:",e.pathname))},[e.pathname]),null}function Xae(){const e=hg(),t=cg(),{theme:r,user:n}=ea(),[i,a]=Te.useState(!1);console.log("[WidgetNavigation] isTeamLead state:",i),Te.useEffect(()=>{console.log("[WidgetNavigation] Checking team lead status..."),eae.checkIsTeamLead().then(e=>{console.log("[WidgetNavigation] Team lead check result:",e),a(e)}).catch(e=>{console.error("[WidgetNavigation] Team lead check error:",e),a(!1)})},[]);const o=[{id:"Home",label:"Home",icon:Qf,path:"/"},{id:"Email",label:"Email",icon:Tf,path:"/email-leads"},{id:"DataAgentV2",label:"Data Agent",icon:ef,path:"/v2-data-agent"}],s=i?[...o,{id:"TeamView",label:"Team View",icon:ym,path:"/team-view"}]:o,A=t.pathname,l=r.primaryColor||"#1e40af";return Ie.jsxs("div",{className:"w-14 flex flex-col items-center py-4 h-full relative overflow-hidden",style:{fontFamily:r.fontFamily,background:`\n linear-gradient(\n to top,\n ${l}ff 0%,\n ${l}f2 40%,\n ${l}f2 45%,\n ${l}f2 50%,\n ${l}cc 100%\n )\n `},"aria-label":"Sidebar navigation",children:[Ie.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{background:"\n linear-gradient(\n to top,\n transparent 0%,\n #ffffff11 20%,\n #ffffff44 45%,\n #ffffff66 50%,\n #ffffff44 55%,\n #ffffff11 80%,\n transparent 100%\n )\n ",backgroundSize:"100% 100%",animation:"sidebarShimmer 3s ease-in-out infinite",mixBlendMode:"screen"}}),Ie.jsx("div",{className:"flex flex-col items-center gap-3 w-full px-2 relative z-10",children:s.map(t=>{const r=A===t.path||"/"!==t.path&&A.startsWith(t.path);return Ie.jsx("button",{onClick:()=>e(t.path),className:`\n group relative flex items-center justify-center w-10 h-10 rounded-xl transition-all duration-200\n ${r?"bg-white shadow-md":"bg-white/20 hover:bg-white/40"}\n `,children:Ie.jsx(t.icon,{className:"h-5 w-5 transition-transform duration-200 "+(r?"scale-105":"group-hover:scale-105"),style:{color:r?l:"white"}})},t.id)})})]})}function Jae(){const{isAuthenticated:e,setCurrentScreen:t,login:r,apiKey:n,tenantId:i}=ea(),[a,o]=Te.useState({isValid:!1,isLoading:!0});Te.useEffect(()=>{const e=n||Sae();Gae.initialize(e);const t=Gae.subscribe(e=>{console.log("[WidgetPopup] API key change detected:",{reason:e.reason,hasChanged:e.previousKey!==e.currentKey,timestamp:new Date(e.timestamp).toISOString()}),("key_change"===e.reason||"page_reload"===e.reason&&e.previousKey!==e.currentKey)&&(console.log("[WidgetPopup] Clearing cache due to API key change"),zae.clearCache(),Li.clearApiKey(),e.currentKey&&s(!0))}),r=()=>{console.log("[WidgetPopup] API key invalidated by server"),o({isValid:!1,isLoading:!1,error:"API key has been invalidated. Please check your credentials.",errorType:"validation"})};return window.addEventListener("api:key_invalid",r),()=>{t(),window.removeEventListener("api:key_invalid",r)}},[]);const s=async(e=!1)=>{var t,r,a,s,A;const l=n||Sae();if(l){Gae.updateApiKey(l)&&!e&&(console.log("[WidgetPopup] API key changed, clearing cache"),zae.clearCache(),e=!0)}if(l)if(i)try{o(e=>({...e,isLoading:!0})),e&&(zae.clearCache(),zae.clearAllAuthData());const t=await zae.validateApiKey(l,i);t.isValid?(Li.saveApiKey(l),console.log("[WidgetPopup] API key validated successfully")):(Li.clearApiKey(),zae.clearAllAuthData()),o({isValid:t.isValid,isLoading:!1,error:t.isValid?void 0:t.error||"Invalid credentials. Access denied.",errorType:t.isValid?void 0:"validation"})}catch(c){console.error("API key validation failed:",c);let e="network",n="Connection failed. Please check your internet connection.";(null==(t=c.message)?void 0:t.includes("Rate limit"))?(e="rate_limit",n=c.message):(null==(r=c.message)?void 0:r.includes("Invalid API key"))||(null==(a=c.message)?void 0:a.includes("Invalid credentials"))?(e="validation",n="Invalid credentials. Access denied."):(null==(s=c.message)?void 0:s.includes("forbidden"))?(e="validation",n="Access forbidden. Invalid tenant or email."):(null==(A=c.response)?void 0:A.status)>=500&&(e="server",n="Server error. Please try again later."),o({isValid:!1,isLoading:!1,error:n,errorType:e})}else o({isValid:!1,isLoading:!1,error:"Tenant ID is required for authentication.",errorType:"validation"});else o({isValid:!1,isLoading:!1,error:"API key is required to access the Pangents chatbot widget.",errorType:"validation"})};Te.useRef({}),Te.useEffect(()=>{s()},[n,i]);const A=()=>{s(!0)};if(a.isLoading)return Ie.jsxs("div",{className:"flex items-center justify-center p-8 w-full h-full",children:[Ie.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"}),Ie.jsx("span",{className:"ml-3 text-sm text-gray-600",children:"Validating API key..."})]});if(!a.isValid)return Ie.jsx(kae,{error:a.error,errorType:a.errorType,onRetry:A,isRetrying:a.isLoading});const l=(e,n)=>{r(e,n),t("chat")};return e?Ie.jsx("div",{className:"flex-1 flex flex-col overflow-hidden",children:Ie.jsx("div",{className:"flex-1 overflow-hidden",children:Ie.jsx(Bae,{children:Ie.jsx(bae,{})})})}):Ie.jsx("div",{className:"flex-1 flex flex-col overflow-hidden w-full",children:Ie.jsx(Eae,{onAuthSuccess:l})})}function Zae(e){const t=e.trim().split(/\s+/);switch(t.length){case 1:return{top:t[0],right:t[0],bottom:t[0],left:t[0]};case 2:return{top:t[0],right:t[1],bottom:t[0],left:t[1]};case 3:return{top:t[0],right:t[1],bottom:t[2],left:t[1]};case 4:return{top:t[0],right:t[1],bottom:t[2],left:t[3]};default:return{top:"0px",right:"0px",bottom:"0px",left:"0px"}}}function eoe(e){const{left:t,right:r}=Zae(e);return`${t} + ${r}`}function toe(e){const{top:t,bottom:r}=Zae(e);return`${t} + ${r}`}function roe({position:e="bottom-right",paddingWidgetContainer:t,zIndex:r}){const{isOpen:n,theme:i,closeWidget:a,isAuthenticated:o}=ea(),s="bottom-left"===e||"top-left"===e,A=Te.useRef(null),[l,c]=Te.useState(()=>({width:Math.min(.38*window.innerWidth,650),height:window.innerHeight})),u=Te.useMemo(()=>{if(n){const e=Li.getCurrentRoute();return console.log("[WidgetPopup] Loading initial route:",e||"/"),e||"/"}return"/"},[n]),[d,h]=Te.useState(!1),[p,f]=Te.useState(null),[m,g]=Te.useState(!1),[y,v]=Te.useState(!1),x=Te.useRef(l.width/Math.max(l.height,1));Te.useEffect(()=>{const e=e=>{const t=e.detail;t&&"boolean"==typeof t.locked&&g(t.locked)};return window.addEventListener("widget:aspect_ratio_lock",e),()=>window.removeEventListener("widget:aspect_ratio_lock",e)},[]),Te.useEffect(()=>{const e=e=>{const t=e.detail;t&&"boolean"==typeof t.maximized&&v(t.maximized)};return window.addEventListener("widget:maximize_toggle",e),()=>window.removeEventListener("widget:maximize_toggle",e)},[]),Te.useEffect(()=>{x.current=l.width/Math.max(l.height,1)},[l]);const w=Math.min(.95*window.innerWidth,950),b=window.innerHeight,B=(e,t)=>{t.preventDefault(),t.stopPropagation(),h(!0),f({x:t.clientX,y:t.clientY,width:l.width,height:l.height,edge:e})};return Te.useEffect(()=>{const e=e=>{if(!d||!p)return;let t=0,r=0;p.edge.includes("right")&&(t=e.clientX-p.x),p.edge.includes("left")&&(t=p.x-e.clientX),p.edge.includes("bottom")&&(r=e.clientY-p.y),p.edge.includes("top")&&(r=p.y-e.clientY);let n=p.width+t,i=p.height+r;const a="left"===p.edge||"right"===p.edge;if(m&&!a){const e=x.current;Math.abs(t)>Math.abs(r)?i=n/e:n=i*e}a&&(i=p.height),n=Math.max(320,Math.min(w,n)),i=Math.max(400,Math.min(b,i)),c({width:n,height:i})},t=()=>{h(!1),f(null)};return window.addEventListener("mousemove",e),window.addEventListener("mouseup",t),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",t)}},[d,p,m]),Te.useEffect(()=>{const e=()=>{c(e=>{const t=Math.min(.95*window.innerWidth,950),r=window.innerHeight;return{width:Math.min(e.width,t),height:r}})};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),console.log("WidgetPopup: Component rendered"),console.log("WidgetPopup: isOpen state:",n),console.log("WidgetPopup: isAuthenticated:",o),console.log("WidgetPopup: theme:",i),Te.useEffect(()=>{const e=e=>{"Escape"===e.key&&n&&a()};if(n){document.addEventListener("keydown",e);const t=document.querySelector('[role="dialog"]');t&&t.focus()}return()=>{document.removeEventListener("keydown",e)}},[n,a]),Ie.jsx(hl,{children:n&&Ie.jsxs(ch.div,{className:"fixed inset-0 z-50",style:{zIndex:r??999999},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},children:[Ie.jsx(ch.div,{className:"absolute inset-0 bg-black/10",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:a}),Ie.jsx(ch.div,{ref:A,id:"pangents-widget-container",className:"fixed top-0 "+(s?"left-0":"right-0"),style:{width:y?t?`calc(100vw - ${eoe(t)})`:`${window.innerWidth}px`:`${l.width}px`,height:y?t?`calc(100vh - ${toe(t)})`:`${window.innerHeight}px`:`${l.height}px`,...t?{padding:t}:{}},initial:{x:s?"-100%":"100%"},animate:{x:0},exit:{x:s?"-100%":"100%"},transition:{type:"spring",stiffness:300,damping:30},role:"dialog","aria-modal":"true","aria-labelledby":"search-modal-title",tabIndex:-1,children:Ie.jsxs(ky,{className:"h-full flex flex-col overflow-hidden shadow-2xl rounded-none",style:{fontFamily:i.fontFamily},children:[Ie.jsxs(Eg,{initialEntries:[u],initialIndex:0,children:[Ie.jsx(Yae,{}),Ie.jsx(qae,{}),Ie.jsxs("div",{className:"flex flex-1 min-h-0",children:[o?Ie.jsx(Xae,{}):null,Ie.jsx(Jae,{})]})]},`router-${n}`),Ie.jsx("div",{id:"widget-toast-container",style:{position:"absolute",top:"60px",left:"10px",right:"10px",zIndex:999999,pointerEvents:"none"},children:Ie.jsx(Ey,{position:"top-center",richColors:!0,closeButton:!0,expand:!1,visibleToasts:3,containerAriaLabel:"Notifications",toastOptions:{style:{marginTop:"0px",pointerEvents:"auto"},className:"widget-toast"}})}),Ie.jsxs("div",{className:"absolute inset-0 pointer-events-none",children:[Ie.jsx("div",{className:"absolute top-0 left-0 right-0 h-3 pointer-events-auto focus:bg-blue-500/60","aria-label":"Resize top",role:"slider",onMouseDown:e=>B("top",e),style:{cursor:"ns-resize"}}),Ie.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-3 pointer-events-auto focus:bg-blue-500/60","aria-label":"Resize bottom",role:"slider",onMouseDown:e=>B("bottom",e),style:{cursor:"ns-resize"}}),Ie.jsx("div",{className:"absolute top-0 bottom-0 left-0 w-3 pointer-events-auto focus:bg-blue-500/60","aria-label":"Resize left",role:"slider",onMouseDown:e=>B("left",e),style:{cursor:"ew-resize"}}),Ie.jsx("div",{className:"absolute top-0 bottom-0 right-0 w-3 pointer-events-auto focus:bg-blue-500/60","aria-label":"Resize right",role:"slider",onMouseDown:e=>B("right",e),style:{cursor:"ew-resize"}}),Ie.jsx("div",{className:"absolute top-0 left-0 w-4 h-4 pointer-events-auto focus:bg-blue-500/60","aria-label":"Resize top-left",role:"slider",onMouseDown:e=>B("top-left",e),style:{cursor:"nwse-resize"}}),Ie.jsx("div",{className:"absolute top-0 right-0 w-4 h-4 pointer-events-auto focus:bg-blue-500/60","aria-label":"Resize top-right",role:"slider",onMouseDown:e=>B("top-right",e),style:{cursor:"nesw-resize"}}),Ie.jsx("div",{className:"absolute bottom-0 left-0 w-4 h-4 pointer-events-auto focus:bg-blue-500/60","aria-label":"Resize bottom-left",role:"slider",onMouseDown:e=>B("bottom-left",e),style:{cursor:"nesw-resize"}}),Ie.jsx("div",{className:"absolute bottom-0 right-0 w-4 h-4 pointer-events-auto focus:bg-blue-500/60","aria-label":"Resize bottom-right",role:"slider",onMouseDown:e=>B("bottom-right",e),style:{cursor:"nwse-resize"}})]})]})})]})})}function noe({theme:e,className:t,position:r,margin:n,paddingWidgetContainer:i,pangentsApiKey:a,tenantId:o,email:s,zIndex:A,environment:l}){const c=Te.useRef(null),[u,d]=Te.useState(null);return Te.useEffect(()=>{if(!c.current||u)return;const e=c.current.shadowRoot,t=e||c.current.attachShadow({mode:"open"}),r=window.__PANGENTS_WIDGET_CSS||'*,: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:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";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}:host,.pg-widget-root{--background: 0 0% 100%;--foreground: 0 0% 3.9%;--card: 0 0% 100%;--card-foreground: 0 0% 3.9%;--popover: 0 0% 100%;--popover-foreground: 0 0% 3.9%;--primary: 0 0% 9%;--primary-foreground: 0 0% 98%;--secondary: 0 0% 96.1%;--secondary-foreground: 0 0% 9%;--muted: 0 0% 96.1%;--muted-foreground: 0 0% 45.1%;--accent: 0 0% 96.1%;--accent-foreground: 0 0% 9%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 0 0% 98%;--border: 0 0% 89.8%;--input: 0 0% 89.8%;--ring: 0 0% 3.9%;--chart-1: 12 76% 61%;--chart-2: 173 58% 39%;--chart-3: 197 37% 24%;--chart-4: 43 74% 66%;--chart-5: 27 87% 67%;--radius: .5rem}:host(.pg-dark),.pg-widget-root.pg-dark{--background: 0 0% 3.9%;--foreground: 0 0% 98%;--card: 0 0% 3.9%;--card-foreground: 0 0% 98%;--popover: 0 0% 3.9%;--popover-foreground: 0 0% 98%;--primary: 0 0% 98%;--primary-foreground: 0 0% 9%;--secondary: 0 0% 14.9%;--secondary-foreground: 0 0% 98%;--muted: 0 0% 14.9%;--muted-foreground: 0 0% 63.9%;--accent: 0 0% 14.9%;--accent-foreground: 0 0% 98%;--destructive: 0 62.8% 30.6%;--destructive-foreground: 0 0% 98%;--border: 0 0% 14.9%;--input: 0 0% 14.9%;--ring: 0 0% 83.1%;--chart-1: 220 70% 50%;--chart-2: 160 60% 45%;--chart-3: 30 80% 55%;--chart-4: 280 65% 60%;--chart-5: 340 75% 55%}*{border-color:hsl(var(--border))}.pg-widget-root{background-color:hsl(var(--background));color:hsl(var(--foreground))}.\\!container{width:100%!important;margin-right:auto!important;margin-left:auto!important}.container{width:100%;margin-right:auto;margin-left:auto}@media(min-width:640px){.\\!container{max-width:640px!important}.container{max-width:640px}}@media(min-width:768px){.\\!container{max-width:768px!important}.container{max-width:768px}}@media(min-width:1024px){.\\!container{max-width:1024px!important}.container{max-width:1024px}}@media(min-width:1280px){.\\!container{max-width:1280px!important}.container{max-width:1280px}}@media(min-width:1536px){.\\!container{max-width:1536px!important}.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-\\[-4px\\]{top:-4px;right:-4px;bottom:-4px;left:-4px}.-right-1{right:-.25rem}.-top-1{top:-.25rem}.bottom-0{bottom:0}.bottom-6{bottom:1.5rem}.bottom-full{bottom:100%}.left-0{left:0}.left-2\\.5{left:.625rem}.left-3{left:.75rem}.left-6{left:1.5rem}.right-0{right:0}.right-2{right:.5rem}.right-3{right:.75rem}.right-6{right:1.5rem}.top-0{top:0}.top-1\\/2{top:50%}.top-6{top:1.5rem}.top-full{top:100%}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\\[9998\\]{z-index:9998}.col-span-2{grid-column:span 2 / span 2}.col-span-full{grid-column:1 / -1}.mx-0\\.5{margin-left:.125rem;margin-right:.125rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-3{margin-top:.75rem;margin-bottom:.75rem}.my-4{margin-top:1rem;margin-bottom:1rem}.-ml-1{margin-left:-.25rem}.-mt-0\\.5{margin-top:-.125rem}.mb-0\\.5{margin-bottom:.125rem}.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-0\\.5{margin-left:.125rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mt-0\\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-2\\.5{margin-top:.625rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-auto{margin-top:auto}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.h-0\\.5{height:.125rem}.h-1{height:.25rem}.h-1\\.5{height:.375rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\\.5{height:.625rem}.h-20{height:5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\\[18px\\]{height:18px}.h-\\[1px\\]{height:1px}.h-\\[2px\\]{height:2px}.h-\\[3px\\]{height:3px}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.max-h-40{max-height:10rem}.max-h-48{max-height:12rem}.max-h-60{max-height:15rem}.max-h-64{max-height:16rem}.max-h-80{max-height:20rem}.max-h-96{max-height:24rem}.max-h-\\[120px\\]{max-height:120px}.min-h-0{min-height:0px}.min-h-\\[110px\\]{min-height:110px}.min-h-\\[120px\\]{min-height:120px}.min-h-\\[130px\\]{min-height:130px}.min-h-\\[140px\\]{min-height:140px}.min-h-\\[36px\\]{min-height:36px}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-1\\.5{width:.375rem}.w-10{width:2.5rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\\.5{width:.625rem}.w-20{width:5rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\\.5{width:.875rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-\\[18px\\]{width:18px}.w-\\[3px\\]{width:3px}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:0px}.min-w-\\[20px\\]{min-width:20px}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-4xl{max-width:56rem}.max-w-6xl{max-width:72rem}.max-w-\\[100px\\]{max-width:100px}.max-w-\\[220px\\]{max-width:220px}.max-w-\\[80\\%\\]{max-width:80%}.max-w-\\[85\\%\\]{max-width:85%}.max-w-full{max-width:100%}.max-w-md{max-width:28rem}.max-w-none{max-width:none}.max-w-sm{max-width:24rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-105{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@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-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.resize{resize:both}.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-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.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-2\\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-\\[2px\\]{gap:2px}.gap-y-2{row-gap:.5rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.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-1\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * 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))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.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}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.rounded-tl-md{border-top-left-radius:calc(var(--radius) - 2px)}.rounded-tr-md{border-top-right-radius:calc(var(--radius) - 2px)}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-none{border-style:none}.border-amber-200{--tw-border-opacity: 1;border-color:rgb(253 230 138 / 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-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-blue-600{--tw-border-opacity: 1;border-color:rgb(37 99 235 / 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-green-200{--tw-border-opacity: 1;border-color:rgb(187 247 208 / var(--tw-border-opacity, 1))}.border-input{border-color:hsl(var(--input))}.border-orange-200{--tw-border-opacity: 1;border-color:rgb(254 215 170 / var(--tw-border-opacity, 1))}.border-orange-500{--tw-border-opacity: 1;border-color:rgb(249 115 22 / var(--tw-border-opacity, 1))}.border-primary{border-color:hsl(var(--primary))}.border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity, 1))}.border-red-300{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity, 1))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / 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-yellow-200{--tw-border-opacity: 1;border-color:rgb(254 240 138 / var(--tw-border-opacity, 1))}.border-t-blue-500{--tw-border-opacity: 1;border-top-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.bg-amber-100{--tw-bg-opacity: 1;background-color:rgb(254 243 199 / 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-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity, 1))}.bg-background{background-color:hsl(var(--background))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-black\\/10{background-color:#0000001a}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 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-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / 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-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / 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-indigo-50{--tw-bg-opacity: 1;background-color:rgb(238 242 255 / var(--tw-bg-opacity, 1))}.bg-muted{background-color:hsl(var(--muted))}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(255 237 213 / var(--tw-bg-opacity, 1))}.bg-orange-50{--tw-bg-opacity: 1;background-color:rgb(255 247 237 / var(--tw-bg-opacity, 1))}.bg-orange-500{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity, 1))}.bg-purple-100{--tw-bg-opacity: 1;background-color:rgb(243 232 255 / var(--tw-bg-opacity, 1))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / 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-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\\/20{background-color:#fff3}.bg-white\\/30{background-color:#ffffff4d}.bg-white\\/80{background-color:#fffc}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.bg-yellow-200{--tw-bg-opacity: 1;background-color:rgb(254 240 138 / var(--tw-bg-opacity, 1))}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity, 1))}.bg-yellow-600{--tw-bg-opacity: 1;background-color:rgb(202 138 4 / var(--tw-bg-opacity, 1))}.bg-opacity-50{--tw-bg-opacity: .5}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.from-amber-50{--tw-gradient-from: #fffbeb var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 251 235 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-gray-100{--tw-gradient-from: #f3f4f6 var(--tw-gradient-from-position);--tw-gradient-to: rgb(243 244 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-gray-50{--tw-gradient-from: #f9fafb var(--tw-gradient-from-position);--tw-gradient-to: rgb(249 250 251 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-gray-200{--tw-gradient-to: #e5e7eb var(--tw-gradient-to-position)}.to-orange-50{--tw-gradient-to: #fff7ed var(--tw-gradient-to-position)}.to-white{--tw-gradient-to: #fff var(--tw-gradient-to-position)}.fill-current{fill:currentColor}.fill-yellow-400{fill:#facc15}.object-contain{-o-object-fit:contain;object-fit:contain}.p-0{padding:0}.p-0\\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\\.5{padding:.375rem}.p-2{padding:.5rem}.p-2\\.5{padding:.625rem}.p-3{padding:.75rem}.p-3\\.5{padding:.875rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1{padding-left:.25rem;padding-right:.25rem}.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}.px-8{padding-left:2rem;padding-right:2rem}.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-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-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pb-8{padding-bottom:2rem}.pl-10{padding-left:2.5rem}.pl-8{padding-left:2rem}.pl-9{padding-left:2.25rem}.pr-10{padding-right:2.5rem}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pt-0{padding-top:0}.pt-0\\.5{padding-top:.125rem}.pt-2{padding-top:.5rem}.pt-2\\.5{padding-top:.625rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.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-3xl{font-size:1.875rem;line-height:2.25rem}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[13px\\]{font-size:13px}.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-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-6{line-height:1.5rem}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.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-400{--tw-text-opacity: 1;color:rgb(96 165 250 / 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-800{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.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-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-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity, 1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-orange-600{--tw-text-opacity: 1;color:rgb(234 88 12 / var(--tw-text-opacity, 1))}.text-orange-700{--tw-text-opacity: 1;color:rgb(194 65 12 / var(--tw-text-opacity, 1))}.text-primary{color:hsl(var(--primary))}.text-purple-800{--tw-text-opacity: 1;color:rgb(107 33 168 / 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-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity, 1))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.placeholder-gray-400::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}.placeholder-gray-400::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}.opacity-25{opacity:.25}.opacity-50{opacity:.5}.opacity-75{opacity:.75}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px 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-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px 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-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px 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-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px 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-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)}.shadow-blue-50{--tw-shadow-color: #eff6ff;--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-1{--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)}.ring-inset{--tw-ring-inset: inset}.ring-gray-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity, 1))}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-lg{--tw-drop-shadow: drop-shadow(0 10px 8px rgb(0 0 0 / .04)) drop-shadow(0 4px 3px rgb(0 0 0 / .1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.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}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.duration-150{animation-duration:.15s}.duration-200{animation-duration:.2s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.running{animation-play-state:running}:root{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";line-height:1.5;font-weight:400;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.widget-bubble-button svg{width:2rem!important;height:2rem!important}.widget-bubble-button img{width:2rem!important;height:2rem!important;max-width:2rem!important}.widget-toast{position:relative!important;max-width:calc(100% - 20px)!important;margin:0 auto!important}[data-sonner-toaster]{position:absolute!important;width:100%!important;max-width:100%!important}[data-sonner-toaster] [data-sonner-toast]{max-width:calc(100% - 20px)!important;margin:0 auto!important}@media screen and (-webkit-min-device-pixel-ratio:2){.widget-container{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*{text-rendering:optimizeLegibility}.mac-optimized-padding{padding:.75rem!important}button{letter-spacing:.025em}}@supports (-webkit-appearance: none){input[type=text],input[type=email],input[type=password],input[type=date],input[type=time],select{-webkit-appearance:none;border-radius:.375rem}.flex{display:flex}}@media(max-width:450px){html{font-size:14px}.text-xs{font-size:.7rem!important}.text-sm{font-size:.8rem!important}}@media(max-width:380px){html{font-size:13px}.text-xs{font-size:.65rem!important}.text-sm{font-size:.75rem!important}}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:#0000001a;border-radius:10px}::-webkit-scrollbar-thumb:hover{background:#0003}.dark ::-webkit-scrollbar-thumb{background:#ffffff1a}.dark ::-webkit-scrollbar-thumb:hover{background:#fff3}@keyframes shimmer{0%{transform:translate(-100%)}to{transform:translate(100%)}}@keyframes shimmerVertical{0%{transform:translateY(100%)}to{transform:translateY(-100%)}}@keyframes sidebarShimmer{0%{transform:translateY(100%)}to{transform:translateY(-100%)}}@keyframes headerShimmer{0%{background-position:0% 0%}to{background-position:100% 0%}}.ai-answer-container{line-height:1.6}.table-scroll{width:100%;max-width:100%;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}.ai-table{width:-moz-max-content;width:max-content;min-width:100%;border-collapse:collapse}.shaky-gradient{filter:blur(24px);transform-origin:center;background-size:200% 200%;animation:shakyMotion 2s steps(1) infinite}@keyframes shakyMotion{0%{background-position:40% 60%;transform:scale(1.1) translate(0) rotate(0)}10%{background-position:45% 55%;transform:scale(1.12) translate(-6px,4px) rotate(.3deg)}20%{background-position:50% 65%;transform:scale(1.15) translate(8px,-6px) rotate(-.4deg)}30%{background-position:55% 50%;transform:scale(1.13) translate(-10px,8px) rotate(.6deg)}40%{background-position:48% 58%;transform:scale(1.14) translate(6px,-4px) rotate(-.5deg)}50%{background-position:60% 45%;transform:scale(1.16) translate(-8px,6px) rotate(.4deg)}70%{background-position:52% 62%;transform:scale(1.13) translate(10px,-6px) rotate(-.3deg)}to{background-position:40% 60%;transform:scale(1.1) translate(0) rotate(0)}}.file\\:border-0::file-selector-button{border-width:0px}.file\\:bg-transparent::file-selector-button{background-color:transparent}.file\\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:font-medium::file-selector-button{font-weight:500}.file\\:text-foreground::file-selector-button{color:hsl(var(--foreground))}.placeholder\\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.focus-within\\:border-gray-300:focus-within{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.focus-within\\:shadow-md:focus-within{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\\:scale-105:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.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\\:border-transparent:hover{border-color:transparent}.hover\\:bg-accent:hover{background-color:hsl(var(--accent))}.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-600:hover{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / 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-destructive\\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.hover\\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.hover\\:bg-gray-200\\/60:hover{background-color:#e5e7eb99}.hover\\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\\:bg-green-50:hover{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / 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-red-700:hover{--tw-bg-opacity: 1;background-color:rgb(185 28 28 / var(--tw-bg-opacity, 1))}.hover\\:bg-secondary\\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\\:bg-white:hover{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.hover\\:bg-white\\/10:hover{background-color:#ffffff1a}.hover\\:bg-white\\/40:hover{background-color:#fff6}.hover\\:bg-white\\/60:hover{background-color:#fff9}.hover\\:bg-yellow-700:hover{--tw-bg-opacity: 1;background-color:rgb(161 98 7 / var(--tw-bg-opacity, 1))}.hover\\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\\:text-blue-800:hover{--tw-text-opacity: 1;color:rgb(30 64 175 / 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-800:hover{--tw-text-opacity: 1;color:rgb(31 41 55 / 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-green-600:hover{--tw-text-opacity: 1;color:rgb(22 163 74 / 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\\:text-red-800:hover{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-90:hover{opacity:.9}.hover\\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\\:shadow-sm:hover{--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)}.hover\\:shadow-xl:hover{--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)}.hover\\:\\[background-color\\:var\\(--hover-bg\\)\\]:hover{background-color:var(--hover-bg)}.focus\\:border-gray-300:focus{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.focus\\:border-gray-400:focus{--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity, 1))}.focus\\:border-transparent:focus{border-color:transparent}.focus\\:bg-blue-500\\/60:focus{background-color:#3b82f699}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.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))}.focus\\:ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity, 1))}.focus\\:ring-red-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity, 1))}.focus\\:ring-yellow-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(234 179 8 / var(--tw-ring-opacity, 1))}.focus\\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:ring-1:focus-visible{--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-visible\\:ring-2:focus-visible{--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-visible\\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.active\\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\\:bg-accent\\/80:active{background-color:hsl(var(--accent) / .8)}.active\\:bg-destructive\\/95:active{background-color:hsl(var(--destructive) / .95)}.active\\:bg-secondary\\/90:active{background-color:hsl(var(--secondary) / .9)}.active\\:underline:active{text-decoration-line:underline}.active\\:\\[background-color\\:var\\(--active-bg\\)\\]:active{background-color:var(--active-bg)}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-40:disabled{opacity:.4}.disabled\\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\\:scale-105{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\\:bg-amber-200{--tw-bg-opacity: 1;background-color:rgb(253 230 138 / var(--tw-bg-opacity, 1))}.group:hover .group-hover\\:bg-orange-200{--tw-bg-opacity: 1;background-color:rgb(254 215 170 / var(--tw-bg-opacity, 1))}.group:hover .group-hover\\:text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.data-\\[state\\=active\\]\\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\\[state\\=active\\]\\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\\[state\\=active\\]\\:shadow[data-state=active]{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}@media(min-width:640px){.sm\\:mx-0{margin-left:0;margin-right:0}.sm\\:my-8{margin-top:2rem;margin-bottom:2rem}.sm\\:ml-3{margin-left:.75rem}.sm\\:ml-4{margin-left:1rem}.sm\\:mt-0{margin-top:0}.sm\\:inline{display:inline}.sm\\:flex{display:flex}.sm\\:hidden{display:none}.sm\\:h-10{height:2.5rem}.sm\\:w-10{width:2.5rem}.sm\\:w-auto{width:auto}.sm\\:w-full{width:100%}.sm\\:max-w-lg{max-width:32rem}.sm\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\\:flex-row-reverse{flex-direction:row-reverse}.sm\\:items-start{align-items:flex-start}.sm\\:items-center{align-items:center}.sm\\:p-0{padding:0}.sm\\:p-4{padding:1rem}.sm\\:p-6{padding:1.5rem}.sm\\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\\:pb-4{padding-bottom:1rem}.sm\\:text-left{text-align:left}}@media(min-width:768px){.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.md\\:text-sm{font-size:.875rem;line-height:1.25rem}}@media(min-width:1024px){.lg\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}.\\[\\&_svg\\]\\:pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:size-4 svg{width:1rem;height:1rem}.\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}';if(e){const t=e.getElementById("pg-widget-shadow-mount"),n=e.getElementById("pangents-widget-styles");if(n&&r&&n.textContent!==r&&(n.textContent=r),t)return void d(t)}const n=document.createElement("style");n.id="pangents-widget-styles",n.textContent=r,t.appendChild(n);const i=document.createElement("div");i.id="pg-widget-shadow-mount",t.appendChild(i),d(i)},[u]),Ie.jsx("div",{ref:c,className:t?`pg-widget-root ${t}`:"pg-widget-root",style:{zIndex:A??9999},children:u&&Pe.createPortal(Ie.jsx(Ht,{client:Oy,children:Ie.jsxs(Zi,{initialTheme:e,apiKey:a,tenantId:o,email:s,themeTarget:u,environment:l,children:[Ie.jsx(Kp,{position:r,margin:n,zIndex:A}),Ie.jsx(roe,{position:r,paddingWidgetContainer:i,zIndex:A})]})}),u)})}var ioe,aoe={};var ooe=function(){if(ioe)return aoe;ioe=1;var e=Pe;if("production"===process.env.NODE_ENV)aoe.createRoot=e.createRoot,aoe.hydrateRoot=e.hydrateRoot;else{var t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;aoe.createRoot=function(r,n){t.usingClientEntryPoint=!0;try{return e.createRoot(r,n)}finally{t.usingClientEntryPoint=!1}},aoe.hydrateRoot=function(r,n,i){t.usingClientEntryPoint=!0;try{return e.hydrateRoot(r,n,i)}finally{t.usingClientEntryPoint=!1}}}return aoe}();const soe=new class{constructor(){Se(this,"container",null),Se(this,"shadow",null),Se(this,"mountEl",null),Se(this,"root",null),Se(this,"config",{})}init(e){const t={...e};if(this.container&&this.root){const e=JSON.stringify(this.config.theme)!==JSON.stringify(t.theme),r=this.config.position!==t.position,n=this.config.margin!==t.margin,i=this.config.paddingWidgetContainer!==t.paddingWidgetContainer,a=this.config.zIndex!==t.zIndex;if(!(!e||r||n||i||a))return this.config=t,void this.render();if(r||n||i||a)return this.config=t,this.createContainer(),void this.render()}this.config=t,this.createContainer(),this.render()}createContainer(){this.container&&this.destroy(),this.container=document.createElement("div"),this.container.id="pangents-chatbot-widget",this.container.style.zIndex=String(this.config.zIndex||9999),this.shadow=this.container.attachShadow({mode:"open"}),this.mountEl=document.createElement("div"),this.mountEl.id="pg-widget-mount";const e=window.__PANGENTS_WIDGET_CSS||"";if(e){const t=document.createElement("style");t.id="pangents-widget-styles",t.textContent=e,this.shadow.appendChild(t)}this.shadow.appendChild(this.mountEl),document.body.appendChild(this.container)}render(){this.mountEl&&(this.root||(this.root=ooe.createRoot(this.mountEl)),this.root.render(Ie.jsx(Te.StrictMode,{children:Ie.jsx(noe,{theme:this.config.theme,position:this.config.position,margin:this.config.margin,paddingWidgetContainer:this.config.paddingWidgetContainer,pangentsApiKey:this.config.pangentsApiKey,tenantId:this.config.tenantId,email:this.config.email,environment:this.config.environment},JSON.stringify(this.config.theme))})))}destroy(){this.root&&(this.root.unmount(),this.root=null),this.shadow=null,this.mountEl=null,this.container&&this.container.parentNode&&(this.container.parentNode.removeChild(this.container),this.container=null)}updateConfig(e){const t={...this.config,...e};JSON.stringify(this.config.theme),JSON.stringify(t.theme);const r=this.config.position!==t.position,n=this.config.margin!==t.margin,i=this.config.paddingWidgetContainer!==t.paddingWidgetContainer,a=this.config.zIndex!==t.zIndex;this.config=t,r||n||i||a?(this.createContainer(),this.render()):this.render()}updateTheme(e){e&&(this.config={...this.config,theme:e},this.render())}};"undefined"!=typeof window&&(window.Chatbot=soe),exports.Chatbot=soe,exports.Widget=noe;
|
|
90
|
+
//# sourceMappingURL=widget-embed-fsYKtB9Z.cjs.js.map
|